From 69c8960ea949b03f407cd37efc7953be141fbd6b Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Tue, 2 Jun 2026 22:45:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(mcp):=20@snowluma/mcp=20=E2=80=94=20read-o?= =?UTF-8?q?nly=20MCP=20server=20for=20the=20OneBot=20action=20catalog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A new published package that exposes every OneBot action's docs + a ready-to-use JSON Schema to LLM clients over stdio. Tools: list_actions / get_action / search_actions / list_categories, plus the whole catalog as a resource. The catalog is a build-time snapshot generated from @snowluma/onebot's live action specs (collectActionDocs()) — so it auto-tracks action add/remove and the published package carries zero runtime dependency on the private onebot package. action-kit enrichment (the data source): - Field.toJsonSchema() per coercer (uint→integer/minimum:1, messageId→integer/ not-const-0, int→min/max, string→minLength/maxLength, array→items, enum→enum). - describe() composes a per-action inputSchema; ActionDoc gains inputSchema + category. action-docs.ts tags each doc with its domain category. Wiring: onebot exports ./action-kit + ./action-docs; root build:all includes mcp; mcp-npm-publish.yml mirrors the sdk/ui publish workflows (triggers on changes under packages/mcp/** or packages/onebot/**, since the catalog derives from it). onebot typecheck + 318 tests green; mcp typecheck/build/smoke green; the 142 registered OneBot action names are unchanged. --- .github/workflows/mcp-npm-publish.yml | 109 + package.json | 3 +- packages/mcp/.gitignore | 1 + packages/mcp/README.md | 40 + packages/mcp/package.json | 49 + packages/mcp/scripts/gen-catalog.test.ts | 32 + packages/mcp/src/generated/catalog.ts | 5751 ++++++++++++++++++++++ packages/mcp/src/server.ts | 148 + packages/mcp/src/types.ts | 34 + packages/mcp/tsconfig.json | 13 + packages/mcp/vitest.config.ts | 17 + packages/onebot/package.json | 8 + packages/onebot/src/action-docs.ts | 37 +- packages/onebot/src/action-kit.ts | 92 +- packages/onebot/tests/action-kit.test.ts | 36 + pnpm-lock.yaml | 675 +++ 16 files changed, 7012 insertions(+), 33 deletions(-) create mode 100644 .github/workflows/mcp-npm-publish.yml create mode 100644 packages/mcp/.gitignore create mode 100644 packages/mcp/README.md create mode 100644 packages/mcp/package.json create mode 100644 packages/mcp/scripts/gen-catalog.test.ts create mode 100644 packages/mcp/src/generated/catalog.ts create mode 100644 packages/mcp/src/server.ts create mode 100644 packages/mcp/src/types.ts create mode 100644 packages/mcp/tsconfig.json create mode 100644 packages/mcp/vitest.config.ts diff --git a/.github/workflows/mcp-npm-publish.yml b/.github/workflows/mcp-npm-publish.yml new file mode 100644 index 00000000..9f842af6 --- /dev/null +++ b/.github/workflows/mcp-npm-publish.yml @@ -0,0 +1,109 @@ +name: Publish MCP to npm + +on: + push: + branches: [main] + paths: + - 'packages/mcp/**' + # The action catalog is generated from @snowluma/onebot's specs, so an + # action change must republish the MCP snapshot. + - 'packages/onebot/**' + - 'package.json' + - 'pnpm-lock.yaml' + - 'pnpm-workspace.yaml' + - 'tsconfig.base.json' + workflow_dispatch: + +permissions: + contents: read + id-token: write + +concurrency: + group: mcp-npm-publish-${{ github.ref }} + cancel-in-progress: false + +jobs: + publish: + name: Build, test, and publish MCP + runs-on: ubuntu-latest + environment: SnowLuma + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup pnpm + uses: pnpm/action-setup@v6 + with: + version: 10.28.0 + run_install: false + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: '22' + cache: 'pnpm' + registry-url: 'https://registry.npmjs.org' + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Type check MCP + run: pnpm --filter @snowluma/mcp typecheck + + - name: Test MCP (regenerates + validates the action catalog) + run: pnpm --filter @snowluma/mcp test + + - name: Build MCP + run: pnpm --filter @snowluma/mcp build + + - name: Check npm package version + id: npm + working-directory: packages/mcp + shell: bash + run: | + set -euo pipefail + package_name="$(node -e "const fs = require('node:fs'); console.log(JSON.parse(fs.readFileSync('package.json', 'utf8')).name)")" + package_version="$(node -e "const fs = require('node:fs'); console.log(JSON.parse(fs.readFileSync('package.json', 'utf8')).version)")" + + { + echo "package_name=${package_name}" + echo "package_version=${package_version}" + } >> "${GITHUB_OUTPUT}" + + if npm view "${package_name}@${package_version}" version >/dev/null 2>&1; then + echo "already_published=true" >> "${GITHUB_OUTPUT}" + echo "::notice::${package_name}@${package_version} already exists on npm; skipping publish." + else + echo "already_published=false" >> "${GITHUB_OUTPUT}" + fi + + - name: Validate npm token + if: steps.npm.outputs.already_published != 'true' + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + if [ -z "${NODE_AUTH_TOKEN}" ]; then + echo 'Missing NPM_TOKEN in the SnowLuma environment secrets.' >&2 + exit 1 + fi + + - name: Publish MCP to npm + if: steps.npm.outputs.already_published != 'true' + working-directory: packages/mcp + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npm publish --access public --provenance + + - name: Summary + shell: bash + run: | + { + echo "## MCP npm publish" + echo + echo "| Key | Value |" + echo "| --- | --- |" + echo "| Package | \`${{ steps.npm.outputs.package_name }}\` |" + echo "| Version | \`${{ steps.npm.outputs.package_version }}\` |" + echo "| Already published | \`${{ steps.npm.outputs.already_published }}\` |" + echo "| Environment | \`SnowLuma\` |" + } >> "${GITHUB_STEP_SUMMARY}" diff --git a/package.json b/package.json index 36790e82..630acf63 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "build": "pnpm --filter @snowluma/core build", "build:sdk": "pnpm --filter @snowluma/sdk build", "build:webui": "pnpm --filter webui build", - "build:all": "pnpm --filter @snowluma/core build:all && pnpm --filter @snowluma/sdk build && pnpm --filter webui build", + "build:mcp": "pnpm --filter @snowluma/mcp build", + "build:all": "pnpm --filter @snowluma/core build:all && pnpm --filter @snowluma/sdk build && pnpm --filter @snowluma/mcp build && pnpm --filter webui build", "dev": "pnpm --filter @snowluma/core dev", "dev:mode": "cd dist && cross-env SNOWLUMA_DEV_MODE=1 SNOWLUMA_DEV_WEBUI=1 node index.mjs", "dev:web": "pnpm --filter webui dev", diff --git a/packages/mcp/.gitignore b/packages/mcp/.gitignore new file mode 100644 index 00000000..849ddff3 --- /dev/null +++ b/packages/mcp/.gitignore @@ -0,0 +1 @@ +dist/ diff --git a/packages/mcp/README.md b/packages/mcp/README.md new file mode 100644 index 00000000..dab67871 --- /dev/null +++ b/packages/mcp/README.md @@ -0,0 +1,40 @@ +# @snowluma/mcp + +A read-only [MCP](https://modelcontextprotocol.io) server that exposes the +**SnowLuma OneBot action catalog** — every action's docs, parameters, cross-field +constraints, and a ready-to-use **JSON Schema** — to LLM clients. + +Point an LLM at it and it can answer "what params does `set_group_ban` take?" or +"which actions send messages?" on demand, without holding the whole catalog in +context. + +## Usage + +Add to your MCP client (Claude Desktop, Cline, …): + +```json +{ + "mcpServers": { + "snowluma": { "command": "npx", "args": ["-y", "@snowluma/mcp"] } + } +} +``` + +## Tools + +- `list_actions({ category? })` — lightweight index (name / category / summary / aliases). +- `get_action({ name })` — full doc for one action incl. `inputSchema` (accepts aliases). +- `search_actions({ query })` — fuzzy match over name / summary / aliases. +- `list_categories()` — categories and their action counts. + +Also exposes the whole catalog as a resource: `snowluma://onebot/actions`. + +## How it stays in sync + +The catalog is a **build-time snapshot** generated from `@snowluma/onebot`'s live +action specs (`collectActionDocs()`) on every build — so it auto-tracks action +add/remove and the published package carries **zero runtime dependency** on the +private `@snowluma/onebot`. The snapshot is pinned to the SnowLuma version it was +built from; a new SnowLuma release republishes a fresh catalog. + +This package is generated; do not hand-edit `src/generated/catalog.ts`. diff --git a/packages/mcp/package.json b/packages/mcp/package.json new file mode 100644 index 00000000..e2738fd6 --- /dev/null +++ b/packages/mcp/package.json @@ -0,0 +1,49 @@ +{ + "name": "@snowluma/mcp", + "version": "1.9.4", + "description": "MCP server exposing the SnowLuma OneBot action catalog (read-only docs + JSON Schemas) to LLM clients.", + "type": "module", + "bin": { + "snowluma-mcp": "./dist/server.js" + }, + "main": "./dist/server.js", + "types": "./dist/server.d.ts", + "files": [ + "dist", + "README.md" + ], + "scripts": { + "clean": "node -e \"const fs=require('node:fs');fs.rmSync('dist',{recursive:true,force:true})\"", + "gen": "vitest run scripts/gen-catalog.test.ts", + "prebuild": "pnpm run clean && pnpm run gen", + "build": "tsc -p tsconfig.json", + "prepack": "pnpm run build", + "typecheck": "tsc --noEmit", + "test": "vitest run", + "start": "node dist/server.js" + }, + "keywords": [ + "mcp", + "model-context-protocol", + "onebot", + "snowluma", + "qq" + ], + "dependencies": { + "@modelcontextprotocol/sdk": "^1.0.0" + }, + "devDependencies": { + "@snowluma/onebot": "workspace:*", + "@snowluma/proton": "workspace:*", + "@types/node": "^24.12.2", + "typescript": "catalog:", + "vite": "catalog:", + "vitest": "^4.1.4" + }, + "engines": { + "node": ">=22" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/mcp/scripts/gen-catalog.test.ts b/packages/mcp/scripts/gen-catalog.test.ts new file mode 100644 index 00000000..292a710b --- /dev/null +++ b/packages/mcp/scripts/gen-catalog.test.ts @@ -0,0 +1,32 @@ +// Catalog generator. Runs under vitest (so @snowluma/onebot/action-docs resolves +// via the proton plugin, exactly as onebot's own tests do) and writes a build-time +// snapshot of the OneBot action catalog into src/generated/catalog.ts. +// +// This is the whole "auto-track Action 增减" mechanic: the snapshot is regenerated +// from the live specs on every build, so it can never describe a stale action set. +import { mkdirSync, writeFileSync } from 'node:fs'; +import { it, expect } from 'vitest'; +import { collectActionDocs, collectCategories } from '@snowluma/onebot/action-docs'; + +it('generates src/generated/catalog.ts from the live action specs', () => { + const actions = collectActionDocs(); + const categories = collectCategories(); + + expect(actions.length).toBeGreaterThan(100); + // every action must carry a composed input schema (the MCP's payoff) + for (const a of actions) { + expect(a.inputSchema).toBeTypeOf('object'); + expect(a.name).toBeTruthy(); + } + + const body = + '// GENERATED by scripts/gen-catalog.test.ts — do not edit. Run `pnpm gen`.\n' + + '/* eslint-disable */\n' + + "import type { CatalogAction, CatalogCategory } from '../types.js';\n\n" + + `export const ACTIONS: CatalogAction[] = ${JSON.stringify(actions, null, 2)};\n\n` + + `export const CATEGORIES: CatalogCategory[] = ${JSON.stringify(categories, null, 2)};\n`; + + const dir = new URL('../src/generated/', import.meta.url); + mkdirSync(dir, { recursive: true }); + writeFileSync(new URL('../src/generated/catalog.ts', import.meta.url), body); +}); diff --git a/packages/mcp/src/generated/catalog.ts b/packages/mcp/src/generated/catalog.ts new file mode 100644 index 00000000..37df0c15 --- /dev/null +++ b/packages/mcp/src/generated/catalog.ts @@ -0,0 +1,5751 @@ +// GENERATED by scripts/gen-catalog.test.ts — do not edit. Run `pnpm gen`. +/* eslint-disable */ +import type { CatalogAction, CatalogCategory } from '../types.js'; + +export const ACTIONS: CatalogAction[] = [ + { + "name": "_del_group_notice", + "aliases": [], + "summary": "删除群公告(fid 或 notice_id 二选一)", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "fid", + "type": "string", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "notice_id", + "type": "string", + "required": false, + "schema": { + "type": "string" + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "fid": { + "type": "string" + }, + "notice_id": { + "type": "string" + } + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "_get_group_notice", + "aliases": [], + "summary": "获取群公告", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + } + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "_get_model_show", + "aliases": [], + "summary": "获取机型展示(占位)", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "_mark_all_as_read", + "aliases": [], + "summary": "标记全部已读", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "_send_group_notice", + "aliases": [], + "summary": "发送群公告", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "content", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "image", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + }, + { + "name": "pinned", + "type": "raw", + "required": false, + "schema": {} + }, + { + "name": "type", + "type": "raw", + "required": false, + "schema": {} + }, + { + "name": "confirm_required", + "type": "raw", + "required": false, + "schema": {} + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "content": { + "type": "string", + "minLength": 1 + }, + "image": { + "type": "string", + "default": "" + }, + "pinned": {}, + "type": {}, + "confirm_required": {} + }, + "required": [ + "group_id", + "content" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "_set_model_show", + "aliases": [], + "summary": "设置机型展示(占位)", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": ".get_word_slices", + "aliases": [], + "summary": "分词(未实现)", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "bot_exit", + "aliases": [], + "summary": "退出机器人", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "can_send_image", + "aliases": [], + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "信息" + }, + { + "name": "can_send_record", + "aliases": [], + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "信息" + }, + { + "name": "cancel_group_album_media_like", + "aliases": [], + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "album_id", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "batch_id", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "lloc", + "type": "string", + "required": false, + "schema": { + "type": "string" + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "album_id": { + "type": "string", + "minLength": 1 + }, + "batch_id": { + "type": "string", + "minLength": 1 + }, + "lloc": { + "type": "string" + } + }, + "required": [ + "group_id", + "album_id", + "batch_id" + ], + "additionalProperties": true + }, + "category": "群相册" + }, + { + "name": "cancel_group_todo", + "aliases": [], + "summary": "取消群待办", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "message_id", + "type": "messageId", + "required": true, + "schema": { + "type": "integer", + "not": { + "const": 0 + } + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "message_id": { + "type": "integer", + "not": { + "const": 0 + } + } + }, + "required": [ + "group_id", + "message_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "check_url_safely", + "aliases": [], + "summary": "检查链接安全性", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "clean_cache", + "aliases": [], + "summary": "清理缓存", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "click_inline_keyboard_button", + "aliases": [], + "summary": "点击内联键盘按钮", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "bot_appid", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "msg_seq", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "bot_appid": { + "type": "integer", + "minimum": 1 + }, + "msg_seq": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "group_id", + "bot_appid", + "msg_seq" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "complete_group_todo", + "aliases": [], + "summary": "完成群待办", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "message_id", + "type": "messageId", + "required": true, + "schema": { + "type": "integer", + "not": { + "const": 0 + } + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "message_id": { + "type": "integer", + "not": { + "const": 0 + } + } + }, + "required": [ + "group_id", + "message_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "create_collection", + "aliases": [], + "summary": "创建收藏(未实现)", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "create_group_file_folder", + "aliases": [], + "summary": "创建群文件夹", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "name", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "parent_id", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "/" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "name": { + "type": "string", + "minLength": 1 + }, + "parent_id": { + "type": "string", + "default": "/" + } + }, + "required": [ + "group_id", + "name" + ], + "additionalProperties": true + }, + "category": "群文件" + }, + { + "name": "del_group_album_media", + "aliases": [], + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "album_id", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "lloc", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "album_id": { + "type": "string", + "minLength": 1 + }, + "lloc": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "group_id", + "album_id", + "lloc" + ], + "additionalProperties": true + }, + "category": "群相册" + }, + { + "name": "delete_essence_msg", + "aliases": [], + "summary": "移除精华消息", + "params": [ + { + "name": "message_id", + "type": "messageId", + "required": true, + "schema": { + "type": "integer", + "not": { + "const": 0 + } + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "message_id": { + "type": "integer", + "not": { + "const": 0 + } + } + }, + "required": [ + "message_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "delete_friend", + "aliases": [], + "summary": "删除好友", + "params": [ + { + "name": "user_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "QQ 号" + }, + { + "name": "block", + "type": "bool", + "required": false, + "schema": { + "type": "boolean" + }, + "default": false + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "user_id": { + "type": "integer", + "minimum": 1, + "description": "QQ 号" + }, + "block": { + "type": "boolean", + "default": false + } + }, + "required": [ + "user_id" + ], + "additionalProperties": true + }, + "category": "好友" + }, + { + "name": "delete_group_file", + "aliases": [], + "summary": "删除群文件", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "file_id", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "file_id": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "group_id", + "file_id" + ], + "additionalProperties": true + }, + "category": "群文件" + }, + { + "name": "delete_group_file_folder", + "aliases": [], + "summary": "删除群文件夹", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "folder_id", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "folder_id": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "group_id", + "folder_id" + ], + "additionalProperties": true + }, + "category": "群文件" + }, + { + "name": "delete_group_folder", + "aliases": [], + "summary": "删除群文件夹", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "folder_id", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "folder_id": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "group_id", + "folder_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "delete_msg", + "aliases": [], + "summary": "撤回消息", + "params": [ + { + "name": "message_id", + "type": "messageId", + "required": true, + "schema": { + "type": "integer", + "not": { + "const": 0 + } + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "message_id": { + "type": "integer", + "not": { + "const": 0 + } + } + }, + "required": [ + "message_id" + ], + "additionalProperties": true + }, + "category": "消息" + }, + { + "name": "do_group_album_comment", + "aliases": [], + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "album_id", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "lloc", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "content", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "album_id": { + "type": "string", + "minLength": 1 + }, + "lloc": { + "type": "string", + "minLength": 1 + }, + "content": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "group_id", + "album_id", + "lloc", + "content" + ], + "additionalProperties": true + }, + "category": "群相册" + }, + { + "name": "download_file", + "aliases": [], + "summary": "下载文件(url 或 base64)到 data/downloads", + "returns": "{ file }", + "params": [ + { + "name": "url", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + }, + { + "name": "base64", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + }, + { + "name": "name", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "default": "" + }, + "base64": { + "type": "string", + "default": "" + }, + "name": { + "type": "string", + "default": "" + } + }, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "fetch_custom_face", + "aliases": [], + "summary": "获取自定义表情", + "params": [ + { + "name": "count", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "default": 10 + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0, + "default": 10 + } + }, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "fetch_emoji_like", + "aliases": [], + "summary": "获取表情回应用户(NapCat 分页)", + "params": [ + { + "name": "message_id", + "type": "messageId", + "required": true, + "schema": { + "type": "integer", + "not": { + "const": 0 + } + } + }, + { + "name": "emojiId", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "count", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "default": 10 + }, + { + "name": "cookie", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "message_id": { + "type": "integer", + "not": { + "const": 0 + } + }, + "emojiId": { + "type": "string", + "minLength": 1 + }, + "count": { + "type": "integer", + "minimum": 0, + "default": 10 + }, + "cookie": { + "type": "string", + "default": "" + } + }, + "required": [ + "message_id", + "emojiId" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "fetch_ptt_text", + "aliases": [ + "get_ptt_text", + "get_record_text" + ], + "summary": "获取语音转文字结果", + "params": [ + { + "name": "message_id", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "message_id": { + "type": "string", + "default": "" + } + }, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "forward_friend_single_msg", + "aliases": [], + "summary": "转发单条消息给好友", + "params": [ + { + "name": "message_id", + "type": "messageId", + "required": true, + "schema": { + "type": "integer", + "not": { + "const": 0 + } + } + }, + { + "name": "user_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "message_id": { + "type": "integer", + "not": { + "const": 0 + } + }, + "user_id": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "message_id", + "user_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "forward_group_single_msg", + "aliases": [], + "summary": "转发单条消息到群", + "params": [ + { + "name": "message_id", + "type": "messageId", + "required": true, + "schema": { + "type": "integer", + "not": { + "const": 0 + } + } + }, + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "message_id": { + "type": "integer", + "not": { + "const": 0 + } + }, + "group_id": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "message_id", + "group_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "friend_poke", + "aliases": [], + "summary": "好友拍一拍", + "params": [ + { + "name": "user_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "target_id", + "type": "uint", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "user_id": { + "type": "integer", + "minimum": 1 + }, + "target_id": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "user_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_ai_characters", + "aliases": [], + "summary": "获取 AI 语音角色", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "chat_type", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "default": 1 + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "chat_type": { + "type": "integer", + "minimum": 0, + "default": 1 + } + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_ai_record", + "aliases": [], + "summary": "生成 AI 语音", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "character", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "text", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "chat_type", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "default": 1 + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "character": { + "type": "string", + "minLength": 1 + }, + "text": { + "type": "string", + "minLength": 1 + }, + "chat_type": { + "type": "integer", + "minimum": 0, + "default": 1 + } + }, + "required": [ + "group_id", + "character", + "text" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_clientkey", + "aliases": [], + "summary": "获取 clientkey", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_collection_list", + "aliases": [], + "summary": "获取收藏列表(占位)", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_cookies", + "aliases": [], + "summary": "获取 Cookies", + "params": [ + { + "name": "domain", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "qun.qq.com" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "default": "qun.qq.com" + } + }, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_credentials", + "aliases": [], + "summary": "获取凭证", + "params": [ + { + "name": "domain", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "qun.qq.com" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "default": "qun.qq.com" + } + }, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_csrf_token", + "aliases": [], + "summary": "获取 CSRF 令牌", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_emoji_likes", + "aliases": [], + "summary": "获取表情回应用户", + "params": [ + { + "name": "message_id", + "type": "messageId", + "required": true, + "schema": { + "type": "integer", + "not": { + "const": 0 + } + } + }, + { + "name": "emoji_id", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "message_id": { + "type": "integer", + "not": { + "const": 0 + } + }, + "emoji_id": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "message_id", + "emoji_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_essence_msg_list", + "aliases": [], + "summary": "获取精华消息列表", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + } + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_file", + "aliases": [], + "summary": "获取文件(未实现)", + "params": [ + { + "name": "file_id", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + }, + { + "name": "file", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "file_id": { + "type": "string", + "default": "" + }, + "file": { + "type": "string", + "default": "" + } + }, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_forward_msg", + "aliases": [], + "summary": "获取合并转发消息(id 或 message_id)", + "returns": "{ messages }", + "params": [ + { + "name": "id", + "type": "string", + "required": false, + "schema": { + "type": "string" + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_friend_list", + "aliases": [], + "summary": "获取好友列表", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "好友" + }, + { + "name": "get_friend_msg_history", + "aliases": [], + "summary": "获取好友消息历史", + "params": [ + { + "name": "user_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "message_id", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "default": 0 + }, + { + "name": "count", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "default": 20 + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "user_id": { + "type": "integer", + "minimum": 1 + }, + "message_id": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "count": { + "type": "integer", + "minimum": 0, + "default": 20 + } + }, + "required": [ + "user_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_friends_with_category", + "aliases": [], + "summary": "获取分组好友列表", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_group_album_list", + "aliases": [], + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + } + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "群相册" + }, + { + "name": "get_group_album_media_list", + "aliases": [], + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "album_id", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "attach_info", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "album_id": { + "type": "string", + "minLength": 1 + }, + "attach_info": { + "type": "string", + "default": "" + } + }, + "required": [ + "group_id", + "album_id" + ], + "additionalProperties": true + }, + "category": "群相册" + }, + { + "name": "get_group_at_all_remain", + "aliases": [], + "summary": "获取群 @全体成员 剩余次数", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + } + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_group_detail_info", + "aliases": [], + "summary": "获取群详细信息", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_group_file_system_info", + "aliases": [], + "summary": "获取群文件系统信息", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + } + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_group_file_url", + "aliases": [], + "summary": "获取群文件下载链接", + "returns": "{ url: string }", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "file_id", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "busid", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "default": 102 + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "file_id": { + "type": "string", + "minLength": 1 + }, + "busid": { + "type": "integer", + "minimum": 0, + "default": 102 + } + }, + "required": [ + "group_id", + "file_id" + ], + "additionalProperties": true + }, + "category": "群文件" + }, + { + "name": "get_group_files_by_folder", + "aliases": [], + "summary": "获取群子目录文件列表", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "folder_id", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + }, + { + "name": "folder", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "folder_id": { + "type": "string", + "default": "" + }, + "folder": { + "type": "string", + "default": "" + } + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "群文件" + }, + { + "name": "get_group_honor_info", + "aliases": [], + "summary": "获取群荣誉信息", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "type", + "type": "raw", + "required": false, + "schema": {} + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "type": {} + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "群信息" + }, + { + "name": "get_group_ignore_add_request", + "aliases": [], + "summary": "获取被忽略的入群请求(NapCat)", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_group_ignored_notifies", + "aliases": [], + "summary": "获取被过滤的入群请求", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_group_info", + "aliases": [], + "summary": "获取群信息", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "no_cache", + "type": "bool", + "required": false, + "schema": { + "type": "boolean" + }, + "default": false + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "no_cache": { + "type": "boolean", + "default": false + } + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "群信息" + }, + { + "name": "get_group_info_ex", + "aliases": [], + "summary": "获取群信息(扩展)", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_group_list", + "aliases": [], + "summary": "获取群列表", + "params": [ + { + "name": "no_cache", + "type": "bool", + "required": false, + "schema": { + "type": "boolean" + }, + "default": false + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "no_cache": { + "type": "boolean", + "default": false + } + }, + "additionalProperties": true + }, + "category": "群信息" + }, + { + "name": "get_group_member_info", + "aliases": [], + "summary": "获取群成员信息", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "user_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "QQ 号" + }, + { + "name": "no_cache", + "type": "bool", + "required": false, + "schema": { + "type": "boolean" + }, + "default": false + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "user_id": { + "type": "integer", + "minimum": 1, + "description": "QQ 号" + }, + "no_cache": { + "type": "boolean", + "default": false + } + }, + "required": [ + "group_id", + "user_id" + ], + "additionalProperties": true + }, + "category": "群信息" + }, + { + "name": "get_group_member_list", + "aliases": [], + "summary": "获取群成员列表", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "no_cache", + "type": "bool", + "required": false, + "schema": { + "type": "boolean" + }, + "default": false + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "no_cache": { + "type": "boolean", + "default": false + } + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "群信息" + }, + { + "name": "get_group_msg_history", + "aliases": [], + "summary": "获取群消息历史", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "message_id", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "default": 0 + }, + { + "name": "count", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "default": 20 + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "message_id": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "count": { + "type": "integer", + "minimum": 0, + "default": 20 + } + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_group_root_files", + "aliases": [], + "summary": "获取群根目录文件列表", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + } + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "群文件" + }, + { + "name": "get_group_shut_list", + "aliases": [], + "summary": "获取群禁言列表(占位)", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_group_system_msg", + "aliases": [], + "summary": "获取群系统消息", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "群信息" + }, + { + "name": "get_image", + "aliases": [], + "summary": "获取图片信息", + "params": [ + { + "name": "file", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + }, + { + "name": "file_id", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "default": "" + }, + "file_id": { + "type": "string", + "default": "" + } + }, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_login_info", + "aliases": [], + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "信息" + }, + { + "name": "get_mini_app_ark", + "aliases": [], + "summary": "获取小程序卡片 ark", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_msg", + "aliases": [], + "summary": "获取消息", + "params": [ + { + "name": "message_id", + "type": "messageId", + "required": true, + "schema": { + "type": "integer", + "not": { + "const": 0 + } + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "message_id": { + "type": "integer", + "not": { + "const": 0 + } + } + }, + "required": [ + "message_id" + ], + "additionalProperties": true + }, + "category": "消息" + }, + { + "name": "get_online_clients", + "aliases": [], + "summary": "获取在线客户端(占位)", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_private_file_url", + "aliases": [], + "summary": "获取私聊文件下载链接", + "returns": "{ url: string }", + "params": [ + { + "name": "user_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "file_id", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "file_hash", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "user_id": { + "type": "integer", + "minimum": 1 + }, + "file_id": { + "type": "string", + "minLength": 1 + }, + "file_hash": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "user_id", + "file_id", + "file_hash" + ], + "additionalProperties": true + }, + "category": "群文件" + }, + { + "name": "get_profile_like", + "aliases": [], + "summary": "获取资料点赞", + "params": [ + { + "name": "user_id", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "default": 0 + }, + { + "name": "start", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "default": 0 + }, + { + "name": "count", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "default": 10 + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "user_id": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "start": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "count": { + "type": "integer", + "minimum": 0, + "default": 10 + } + }, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_record", + "aliases": [], + "summary": "获取语音信息", + "params": [ + { + "name": "file", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + }, + { + "name": "file_id", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "default": "" + }, + "file_id": { + "type": "string", + "default": "" + } + }, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_rkey", + "aliases": [ + "nc_get_rkey" + ], + "summary": "获取下载 rkey", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_status", + "aliases": [], + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "信息" + }, + { + "name": "get_stranger_info", + "aliases": [], + "summary": "获取陌生人信息", + "params": [ + { + "name": "user_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "QQ 号" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "user_id": { + "type": "integer", + "minimum": 1, + "description": "QQ 号" + } + }, + "required": [ + "user_id" + ], + "additionalProperties": true + }, + "category": "好友" + }, + { + "name": "get_unidirectional_friend_list", + "aliases": [], + "summary": "获取单向好友列表", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "get_version_info", + "aliases": [], + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "信息" + }, + { + "name": "group_poke", + "aliases": [], + "summary": "群拍一拍", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "user_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "QQ 号" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "user_id": { + "type": "integer", + "minimum": 1, + "description": "QQ 号" + } + }, + "required": [ + "group_id", + "user_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "mark_group_msg_as_read", + "aliases": [], + "summary": "标记群消息已读", + "params": [ + { + "name": "message_id", + "type": "messageId", + "required": true, + "schema": { + "type": "integer", + "not": { + "const": 0 + } + } + }, + { + "name": "group_id", + "type": "uint", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "message_id": { + "type": "integer", + "not": { + "const": 0 + } + }, + "group_id": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "message_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "mark_msg_as_read", + "aliases": [], + "summary": "标记消息已读(群聊/私聊自动路由)", + "params": [ + { + "name": "message_id", + "type": "messageId", + "required": true, + "schema": { + "type": "integer", + "not": { + "const": 0 + } + } + }, + { + "name": "target_id", + "type": "uint", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "message_id": { + "type": "integer", + "not": { + "const": 0 + } + }, + "target_id": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "message_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "mark_private_msg_as_read", + "aliases": [], + "summary": "标记私聊消息已读", + "params": [ + { + "name": "message_id", + "type": "messageId", + "required": true, + "schema": { + "type": "integer", + "not": { + "const": 0 + } + } + }, + { + "name": "user_id", + "type": "uint", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "message_id": { + "type": "integer", + "not": { + "const": 0 + } + }, + "user_id": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "message_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "move_group_file", + "aliases": [], + "summary": "移动群文件", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "file_id", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "parent_directory", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "target_directory", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "file_id": { + "type": "string", + "minLength": 1 + }, + "parent_directory": { + "type": "string", + "minLength": 1 + }, + "target_directory": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "group_id", + "file_id", + "parent_directory", + "target_directory" + ], + "additionalProperties": true + }, + "category": "群文件" + }, + { + "name": "nc_get_packet_status", + "aliases": [], + "summary": "获取 packet 状态(占位)", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "nc_get_user_status", + "aliases": [], + "summary": "获取用户在线/扩展状态", + "params": [ + { + "name": "user_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "user_id": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "user_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "ocr_image", + "aliases": [ + ".ocr_image" + ], + "summary": "OCR 图片(未实现)", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "rename_group_file", + "aliases": [], + "summary": "重命名群文件(未实现)", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "rename_group_file_folder", + "aliases": [], + "summary": "重命名群文件夹", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "folder_id", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "new_folder_name", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + }, + { + "name": "name", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "folder_id": { + "type": "string", + "minLength": 1 + }, + "new_folder_name": { + "type": "string", + "default": "" + }, + "name": { + "type": "string", + "default": "" + } + }, + "required": [ + "group_id", + "folder_id" + ], + "additionalProperties": true + }, + "category": "群文件" + }, + { + "name": "request_decrypt_key", + "aliases": [], + "summary": "请求数据库解密密钥", + "params": [ + { + "name": "db_path", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "db_path": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "db_path" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "send_forward_msg", + "aliases": [], + "summary": "发送合并转发(按 message_type/群号自动路由)", + "returns": "{ message_id, res_id, forward_id }", + "params": [ + { + "name": "messages", + "type": "message", + "required": false, + "schema": { + "description": "OneBot message: string | segment[] | object" + } + }, + { + "name": "message", + "type": "message", + "required": false, + "schema": { + "description": "OneBot message: string | segment[] | object" + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "messages": { + "description": "OneBot message: string | segment[] | object" + }, + "message": { + "description": "OneBot message: string | segment[] | object" + } + }, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "send_group_ai_record", + "aliases": [], + "summary": "发送 AI 语音到群", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "character", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "text", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "chat_type", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "default": 1 + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "character": { + "type": "string", + "minLength": 1 + }, + "text": { + "type": "string", + "minLength": 1 + }, + "chat_type": { + "type": "integer", + "minimum": 0, + "default": 1 + } + }, + "required": [ + "group_id", + "character", + "text" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "send_group_forward_msg", + "aliases": [], + "summary": "发送群合并转发", + "returns": "{ message_id, res_id, forward_id }", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "messages", + "type": "message", + "required": false, + "schema": { + "description": "OneBot message: string | segment[] | object" + } + }, + { + "name": "message", + "type": "message", + "required": false, + "schema": { + "description": "OneBot message: string | segment[] | object" + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "messages": { + "description": "OneBot message: string | segment[] | object" + }, + "message": { + "description": "OneBot message: string | segment[] | object" + } + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "send_group_msg", + "aliases": [], + "summary": "发送群消息", + "returns": "{ message_id: number }", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "message", + "type": "message", + "required": true, + "schema": { + "description": "OneBot message: string | segment[] | object" + } + }, + { + "name": "auto_escape", + "type": "bool", + "required": false, + "schema": { + "type": "boolean" + }, + "default": false + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "message": { + "description": "OneBot message: string | segment[] | object" + }, + "auto_escape": { + "type": "boolean", + "default": false + } + }, + "required": [ + "group_id", + "message" + ], + "additionalProperties": true + }, + "category": "消息" + }, + { + "name": "send_like", + "aliases": [], + "summary": "点赞", + "params": [ + { + "name": "user_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "times", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "default": 1 + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "user_id": { + "type": "integer", + "minimum": 1 + }, + "times": { + "type": "integer", + "minimum": 0, + "default": 1 + } + }, + "required": [ + "user_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "send_msg", + "aliases": [], + "summary": "发送消息(按 message_type/群号 自动路由群聊或私聊)", + "returns": "{ message_id: number }", + "params": [ + { + "name": "message", + "type": "message", + "required": true, + "schema": { + "description": "OneBot message: string | segment[] | object" + } + }, + { + "name": "message_type", + "type": "string", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "group_id", + "type": "uint", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "user_id", + "type": "uint", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "auto_escape", + "type": "bool", + "required": false, + "schema": { + "type": "boolean" + }, + "default": false + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "message": { + "description": "OneBot message: string | segment[] | object" + }, + "message_type": { + "type": "string" + }, + "group_id": { + "type": "integer", + "minimum": 1 + }, + "user_id": { + "type": "integer", + "minimum": 1 + }, + "auto_escape": { + "type": "boolean", + "default": false + } + }, + "required": [ + "message" + ], + "additionalProperties": true + }, + "category": "消息" + }, + { + "name": "send_packet", + "aliases": [ + ".send_packet" + ], + "summary": "发送原始 SSO 包(cmd + hex data)", + "params": [ + { + "name": "cmd", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "data", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + }, + { + "name": "rsp", + "type": "bool", + "required": false, + "schema": { + "type": "boolean" + }, + "default": true + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "cmd": { + "type": "string", + "minLength": 1 + }, + "data": { + "type": "string", + "default": "" + }, + "rsp": { + "type": "boolean", + "default": true + } + }, + "required": [ + "cmd" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "send_poke", + "aliases": [], + "summary": "拍一拍(群聊/私聊自动路由)", + "params": [ + { + "name": "user_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "group_id", + "type": "uint", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "user_id": { + "type": "integer", + "minimum": 1 + }, + "group_id": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "user_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "send_private_forward_msg", + "aliases": [], + "summary": "发送私聊合并转发", + "returns": "{ message_id, res_id, forward_id }", + "params": [ + { + "name": "user_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "messages", + "type": "message", + "required": false, + "schema": { + "description": "OneBot message: string | segment[] | object" + } + }, + { + "name": "message", + "type": "message", + "required": false, + "schema": { + "description": "OneBot message: string | segment[] | object" + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "user_id": { + "type": "integer", + "minimum": 1 + }, + "messages": { + "description": "OneBot message: string | segment[] | object" + }, + "message": { + "description": "OneBot message: string | segment[] | object" + } + }, + "required": [ + "user_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "send_private_msg", + "aliases": [], + "summary": "发送私聊消息", + "returns": "{ message_id: number }", + "params": [ + { + "name": "user_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "message", + "type": "message", + "required": true, + "schema": { + "description": "OneBot message: string | segment[] | object" + } + }, + { + "name": "auto_escape", + "type": "bool", + "required": false, + "schema": { + "type": "boolean" + }, + "default": false + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "user_id": { + "type": "integer", + "minimum": 1 + }, + "message": { + "description": "OneBot message: string | segment[] | object" + }, + "auto_escape": { + "type": "boolean", + "default": false + } + }, + "required": [ + "user_id", + "message" + ], + "additionalProperties": true + }, + "category": "消息" + }, + { + "name": "set_diy_online_status", + "aliases": [], + "summary": "设置自定义在线状态", + "params": [ + { + "name": "face_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "face_type", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "default": 1 + }, + { + "name": "wording", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "face_id": { + "type": "integer", + "minimum": 1 + }, + "face_type": { + "type": "integer", + "minimum": 0, + "default": 1 + }, + "wording": { + "type": "string", + "default": "" + } + }, + "required": [ + "face_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "set_essence_msg", + "aliases": [], + "summary": "设置精华消息", + "params": [ + { + "name": "message_id", + "type": "messageId", + "required": true, + "schema": { + "type": "integer", + "not": { + "const": 0 + } + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "message_id": { + "type": "integer", + "not": { + "const": 0 + } + } + }, + "required": [ + "message_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "set_friend_add_request", + "aliases": [], + "summary": "处理好友添加请求", + "params": [ + { + "name": "flag", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "approve", + "type": "bool", + "required": false, + "schema": { + "type": "boolean" + }, + "default": true + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "flag": { + "type": "string", + "minLength": 1 + }, + "approve": { + "type": "boolean", + "default": true + } + }, + "required": [ + "flag" + ], + "additionalProperties": true + }, + "category": "请求" + }, + { + "name": "set_friend_remark", + "aliases": [], + "summary": "设置好友备注", + "params": [ + { + "name": "user_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "remark", + "type": "string", + "required": true, + "schema": { + "type": "string" + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "user_id": { + "type": "integer", + "minimum": 1 + }, + "remark": { + "type": "string" + } + }, + "required": [ + "user_id", + "remark" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "set_group_add_option", + "aliases": [], + "summary": "设置加群选项", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "add_type", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "default": 0 + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "add_type": { + "type": "integer", + "minimum": 0, + "default": 0 + } + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "群管理" + }, + { + "name": "set_group_add_request", + "aliases": [], + "summary": "处理加群请求", + "params": [ + { + "name": "flag", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "sub_type", + "type": "raw", + "required": false, + "schema": {} + }, + { + "name": "type", + "type": "raw", + "required": false, + "schema": {} + }, + { + "name": "approve", + "type": "bool", + "required": false, + "schema": { + "type": "boolean" + }, + "default": true + }, + { + "name": "reason", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "flag": { + "type": "string", + "minLength": 1 + }, + "sub_type": {}, + "type": {}, + "approve": { + "type": "boolean", + "default": true + }, + "reason": { + "type": "string", + "default": "" + } + }, + "required": [ + "flag" + ], + "additionalProperties": true + }, + "category": "请求" + }, + { + "name": "set_group_admin", + "aliases": [], + "summary": "设置/取消管理员", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "user_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "QQ 号" + }, + { + "name": "enable", + "type": "bool", + "required": false, + "schema": { + "type": "boolean" + }, + "default": true + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "user_id": { + "type": "integer", + "minimum": 1, + "description": "QQ 号" + }, + "enable": { + "type": "boolean", + "default": true + } + }, + "required": [ + "group_id", + "user_id" + ], + "additionalProperties": true + }, + "category": "群管理" + }, + { + "name": "set_group_album_media_like", + "aliases": [], + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "album_id", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "batch_id", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "lloc", + "type": "string", + "required": false, + "schema": { + "type": "string" + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "album_id": { + "type": "string", + "minLength": 1 + }, + "batch_id": { + "type": "string", + "minLength": 1 + }, + "lloc": { + "type": "string" + } + }, + "required": [ + "group_id", + "album_id", + "batch_id" + ], + "additionalProperties": true + }, + "category": "群相册" + }, + { + "name": "set_group_anonymous", + "aliases": [], + "summary": "匿名开关(未实现,返回 ok)", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "群管理" + }, + { + "name": "set_group_anonymous_ban", + "aliases": [], + "summary": "匿名禁言(未实现,返回 ok)", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "群管理" + }, + { + "name": "set_group_ban", + "aliases": [], + "summary": "禁言群成员(duration=0 解除)", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "user_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "QQ 号" + }, + { + "name": "duration", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "default": 1800 + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "user_id": { + "type": "integer", + "minimum": 1, + "description": "QQ 号" + }, + "duration": { + "type": "integer", + "minimum": 0, + "default": 1800 + } + }, + "required": [ + "group_id", + "user_id" + ], + "additionalProperties": true + }, + "category": "群管理" + }, + { + "name": "set_group_card", + "aliases": [], + "summary": "设置群名片(空字符串清除)", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "user_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "QQ 号" + }, + { + "name": "card", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "user_id": { + "type": "integer", + "minimum": 1, + "description": "QQ 号" + }, + "card": { + "type": "string", + "default": "" + } + }, + "required": [ + "group_id", + "user_id" + ], + "additionalProperties": true + }, + "category": "群管理" + }, + { + "name": "set_group_kick", + "aliases": [], + "summary": "踢出群成员", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "user_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "QQ 号" + }, + { + "name": "reject_add_request", + "type": "bool", + "required": false, + "schema": { + "type": "boolean" + }, + "default": false + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "user_id": { + "type": "integer", + "minimum": 1, + "description": "QQ 号" + }, + "reject_add_request": { + "type": "boolean", + "default": false + } + }, + "required": [ + "group_id", + "user_id" + ], + "additionalProperties": true + }, + "category": "群管理" + }, + { + "name": "set_group_kick_members", + "aliases": [], + "summary": "批量踢出群成员", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "user_id", + "type": "uint[]", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "integer", + "minimum": 1 + }, + "minItems": 1 + } + }, + { + "name": "reject_add_request", + "type": "bool", + "required": false, + "schema": { + "type": "boolean" + }, + "default": false + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "user_id": { + "type": "array", + "items": { + "type": "integer", + "minimum": 1 + }, + "minItems": 1 + }, + "reject_add_request": { + "type": "boolean", + "default": false + } + }, + "required": [ + "group_id", + "user_id" + ], + "additionalProperties": true + }, + "category": "群管理" + }, + { + "name": "set_group_leave", + "aliases": [], + "summary": "退群", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + } + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "群管理" + }, + { + "name": "set_group_name", + "aliases": [], + "summary": "设置群名", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "group_name", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "group_name": { + "type": "string", + "default": "" + } + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "群管理" + }, + { + "name": "set_group_portrait", + "aliases": [], + "summary": "设置群头像", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "file", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "file": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "group_id", + "file" + ], + "additionalProperties": true + }, + "category": "群管理" + }, + { + "name": "set_group_reaction", + "aliases": [], + "summary": "群聊表情回应", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "message_id", + "type": "messageId", + "required": true, + "schema": { + "type": "integer", + "not": { + "const": 0 + } + } + }, + { + "name": "code", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "is_set", + "type": "bool", + "required": false, + "schema": { + "type": "boolean" + }, + "default": true + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1 + }, + "message_id": { + "type": "integer", + "not": { + "const": 0 + } + }, + "code": { + "type": "string", + "minLength": 1 + }, + "is_set": { + "type": "boolean", + "default": true + } + }, + "required": [ + "message_id", + "code" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "set_group_remark", + "aliases": [], + "summary": "设置群备注", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "remark", + "type": "string", + "required": true, + "schema": { + "type": "string" + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1 + }, + "remark": { + "type": "string" + } + }, + "required": [ + "group_id", + "remark" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "set_group_search", + "aliases": [], + "summary": "允许群被搜索", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + } + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "群管理" + }, + { + "name": "set_group_sign", + "aliases": [ + "send_group_sign" + ], + "summary": "群签到", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + } + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "set_group_special_title", + "aliases": [], + "summary": "设置群头衔", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "user_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "QQ 号" + }, + { + "name": "special_title", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "user_id": { + "type": "integer", + "minimum": 1, + "description": "QQ 号" + }, + "special_title": { + "type": "string", + "default": "" + } + }, + "required": [ + "group_id", + "user_id" + ], + "additionalProperties": true + }, + "category": "群管理" + }, + { + "name": "set_group_todo", + "aliases": [], + "summary": "设置群待办", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "message_id", + "type": "messageId", + "required": true, + "schema": { + "type": "integer", + "not": { + "const": 0 + } + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "message_id": { + "type": "integer", + "not": { + "const": 0 + } + } + }, + "required": [ + "group_id", + "message_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "set_group_whole_ban", + "aliases": [], + "summary": "全员禁言开关", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "enable", + "type": "bool", + "required": false, + "schema": { + "type": "boolean" + }, + "default": true + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "enable": { + "type": "boolean", + "default": true + } + }, + "required": [ + "group_id" + ], + "additionalProperties": true + }, + "category": "群管理" + }, + { + "name": "set_input_status", + "aliases": [], + "summary": "设置输入状态", + "params": [ + { + "name": "user_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "event_type", + "type": "int", + "required": false, + "schema": { + "type": "integer" + }, + "default": 0 + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "user_id": { + "type": "integer", + "minimum": 1 + }, + "event_type": { + "type": "integer", + "default": 0 + } + }, + "required": [ + "user_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "set_msg_emoji_like", + "aliases": [], + "summary": "设置消息表情回应", + "params": [ + { + "name": "message_id", + "type": "messageId", + "required": true, + "schema": { + "type": "integer", + "not": { + "const": 0 + } + } + }, + { + "name": "emoji_id", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "set", + "type": "bool", + "required": false, + "schema": { + "type": "boolean" + }, + "default": true + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "message_id": { + "type": "integer", + "not": { + "const": 0 + } + }, + "emoji_id": { + "type": "string", + "minLength": 1 + }, + "set": { + "type": "boolean", + "default": true + } + }, + "required": [ + "message_id", + "emoji_id" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "set_online_status", + "aliases": [], + "summary": "设置在线状态", + "params": [ + { + "name": "status", + "type": "int", + "required": true, + "schema": { + "type": "integer", + "not": { + "const": 0 + } + } + }, + { + "name": "ext_status", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "default": 0 + }, + { + "name": "battery_status", + "type": "int", + "required": false, + "schema": { + "type": "integer", + "minimum": 0 + }, + "default": 100 + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "status": { + "type": "integer", + "not": { + "const": 0 + } + }, + "ext_status": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "battery_status": { + "type": "integer", + "minimum": 0, + "default": 100 + } + }, + "required": [ + "status" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "set_qq_avatar", + "aliases": [], + "summary": "设置 QQ 头像", + "params": [ + { + "name": "file", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "file" + ], + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "set_qq_profile", + "aliases": [], + "summary": "设置 QQ 资料", + "params": [ + { + "name": "nickname", + "type": "string", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "personal_note", + "type": "string", + "required": false, + "schema": { + "type": "string" + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "nickname": { + "type": "string" + }, + "personal_note": { + "type": "string" + } + }, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "set_restart", + "aliases": [], + "summary": "重启(不支持)", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "set_self_longnick", + "aliases": [], + "summary": "设置个性签名(longNick/long_nick,严格 string)", + "params": [ + { + "name": "longNick", + "type": "raw", + "required": false, + "schema": {} + }, + { + "name": "long_nick", + "type": "raw", + "required": false, + "schema": {} + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "longNick": {}, + "long_nick": {} + }, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "trans_group_file", + "aliases": [], + "summary": "转存群文件(未实现)", + "params": [], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "translate_en2zh", + "aliases": [], + "summary": "英译中", + "returns": "{ words }", + "params": [ + { + "name": "words", + "type": "raw", + "required": false, + "schema": {} + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "words": {} + }, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "upload_forward_msg", + "aliases": [], + "summary": "上传转发消息", + "params": [ + { + "name": "messages", + "type": "message", + "required": false, + "schema": { + "description": "OneBot message: string | segment[] | object" + } + }, + { + "name": "message", + "type": "message", + "required": false, + "schema": { + "description": "OneBot message: string | segment[] | object" + } + }, + { + "name": "group_id", + "type": "uint", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "messages": { + "description": "OneBot message: string | segment[] | object" + }, + "message": { + "description": "OneBot message: string | segment[] | object" + }, + "group_id": { + "type": "integer", + "minimum": 1 + } + }, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "upload_foward_msg", + "aliases": [], + "summary": "上传转发消息(别名拼写)", + "params": [ + { + "name": "messages", + "type": "message", + "required": false, + "schema": { + "description": "OneBot message: string | segment[] | object" + } + }, + { + "name": "message", + "type": "message", + "required": false, + "schema": { + "description": "OneBot message: string | segment[] | object" + } + }, + { + "name": "group_id", + "type": "uint", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "messages": { + "description": "OneBot message: string | segment[] | object" + }, + "message": { + "description": "OneBot message: string | segment[] | object" + }, + "group_id": { + "type": "integer", + "minimum": 1 + } + }, + "additionalProperties": true + }, + "category": "扩展" + }, + { + "name": "upload_group_file", + "aliases": [], + "summary": "上传群文件", + "returns": "{ file_id: string }", + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "file", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "name", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + }, + { + "name": "folder", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + }, + { + "name": "folder_id", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + }, + { + "name": "upload_file", + "type": "bool", + "required": false, + "schema": { + "type": "boolean" + }, + "default": true + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "file": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string", + "default": "" + }, + "folder": { + "type": "string", + "default": "" + }, + "folder_id": { + "type": "string", + "default": "" + }, + "upload_file": { + "type": "boolean", + "default": true + } + }, + "required": [ + "group_id", + "file" + ], + "additionalProperties": true + }, + "category": "群文件" + }, + { + "name": "upload_image_to_qun_album", + "aliases": [], + "params": [ + { + "name": "group_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + }, + "desc": "群号" + }, + { + "name": "album_id", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "album_name", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "file", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "minimum": 1, + "description": "群号" + }, + "album_id": { + "type": "string", + "minLength": 1 + }, + "album_name": { + "type": "string", + "minLength": 1 + }, + "file": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "group_id", + "album_id", + "album_name", + "file" + ], + "additionalProperties": true + }, + "category": "群相册" + }, + { + "name": "upload_private_file", + "aliases": [], + "summary": "上传私聊文件", + "returns": "{ file_id: string }", + "params": [ + { + "name": "user_id", + "type": "uint", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "file", + "type": "string", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "name": "name", + "type": "string", + "required": false, + "schema": { + "type": "string" + }, + "default": "" + }, + { + "name": "upload_file", + "type": "bool", + "required": false, + "schema": { + "type": "boolean" + }, + "default": true + } + ], + "invariants": [], + "inputSchema": { + "type": "object", + "properties": { + "user_id": { + "type": "integer", + "minimum": 1 + }, + "file": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string", + "default": "" + }, + "upload_file": { + "type": "boolean", + "default": true + } + }, + "required": [ + "user_id", + "file" + ], + "additionalProperties": true + }, + "category": "群文件" + } +]; + +export const CATEGORIES: CatalogCategory[] = [ + { + "category": "信息", + "count": 5 + }, + { + "category": "消息", + "count": 5 + }, + { + "category": "好友", + "count": 3 + }, + { + "category": "群信息", + "count": 6 + }, + { + "category": "群管理", + "count": 14 + }, + { + "category": "群文件", + "count": 11 + }, + { + "category": "请求", + "count": 2 + }, + { + "category": "扩展", + "count": 85 + }, + { + "category": "群相册", + "count": 7 + } +]; diff --git a/packages/mcp/src/server.ts b/packages/mcp/src/server.ts new file mode 100644 index 00000000..57c92fb1 --- /dev/null +++ b/packages/mcp/src/server.ts @@ -0,0 +1,148 @@ +#!/usr/bin/env node +// @snowluma/mcp — a read-only MCP server that exposes the SnowLuma OneBot action +// catalog (docs + per-action JSON Schemas) to LLM clients over stdio. +// +// The catalog is a build-time snapshot (src/generated/catalog.ts), regenerated +// from @snowluma/onebot's live action specs on every build — so it auto-tracks +// action add/remove and ships zero runtime dependency on onebot. +// +// NOTE: stdout is the MCP protocol channel — all diagnostics go to stderr. + +import { readFileSync } from 'node:fs'; +import { Server } from '@modelcontextprotocol/sdk/server/index.js'; +import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; +import { + CallToolRequestSchema, + ListResourcesRequestSchema, + ListToolsRequestSchema, + ReadResourceRequestSchema, +} from '@modelcontextprotocol/sdk/types.js'; +import { ACTIONS, CATEGORIES } from './generated/catalog.js'; +import type { CatalogAction } from './types.js'; + +const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')) as { version: string }; +const VERSION = pkg.version; + +const RESOURCE_URI = 'snowluma://onebot/actions'; + +// name + every alias → the action, so get_action accepts aliases too. +const byName = new Map(); +for (const a of ACTIONS) { + for (const n of [a.name, ...a.aliases]) byName.set(n, a); +} + +/** Lightweight index entry (keeps list/search payloads small). */ +function lite(a: CatalogAction) { + return { name: a.name, category: a.category, summary: a.summary, aliases: a.aliases }; +} + +const TOOLS = [ + { + name: 'list_actions', + description: '列出所有 OneBot action(可按 category 过滤)。返回轻量索引(名称/分类/摘要/别名)。', + inputSchema: { + type: 'object', + properties: { category: { type: 'string', description: '按分类过滤,如 群管理 / 消息 / 好友' } }, + additionalProperties: false, + }, + }, + { + name: 'get_action', + description: '获取某个 OneBot action 的完整文档:摘要、参数表、跨字段约束、返回,以及可直接用于构造调用的参数 JSON Schema(inputSchema)。', + inputSchema: { + type: 'object', + properties: { name: { type: 'string', description: 'action 名(接受别名)' } }, + required: ['name'], + additionalProperties: false, + }, + }, + { + name: 'search_actions', + description: '按关键字模糊搜索 action(匹配名称 / 摘要 / 别名)。返回轻量索引。', + inputSchema: { + type: 'object', + properties: { query: { type: 'string', description: '关键字' } }, + required: ['query'], + additionalProperties: false, + }, + }, + { + name: 'list_categories', + description: '列出所有分类及其 action 数量。', + inputSchema: { type: 'object', properties: {}, additionalProperties: false }, + }, +]; + +function asText(data: unknown) { + return { content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }] }; +} +function asError(message: string) { + return { content: [{ type: 'text' as const, text: message }], isError: true }; +} + +const server = new Server( + { name: 'snowluma-mcp', version: VERSION }, + { capabilities: { tools: {}, resources: {} } }, +); + +server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS })); + +server.setRequestHandler(CallToolRequestSchema, async (req) => { + const name = req.params.name; + const args = (req.params.arguments ?? {}) as Record; + switch (name) { + case 'list_actions': { + const category = typeof args.category === 'string' ? args.category : undefined; + const list = ACTIONS.filter((a) => !category || a.category === category).map(lite); + return asText({ count: list.length, actions: list }); + } + case 'get_action': { + const q = typeof args.name === 'string' ? args.name : ''; + const action = byName.get(q); + if (!action) return asError(`未找到 action: ${JSON.stringify(q)}。用 list_actions / search_actions 查可用项。`); + return asText(action); + } + case 'search_actions': { + const q = (typeof args.query === 'string' ? args.query : '').toLowerCase(); + const list = ACTIONS.filter( + (a) => + a.name.toLowerCase().includes(q) || + (a.summary ?? '').toLowerCase().includes(q) || + a.aliases.some((al) => al.toLowerCase().includes(q)), + ).map(lite); + return asText({ count: list.length, actions: list }); + } + case 'list_categories': + return asText(CATEGORIES); + default: + return asError(`未知工具: ${name}`); + } +}); + +server.setRequestHandler(ListResourcesRequestSchema, async () => ({ + resources: [ + { + uri: RESOURCE_URI, + name: 'SnowLuma OneBot action catalog', + mimeType: 'application/json', + description: `SnowLuma v${VERSION} 的 ${ACTIONS.length} 个 OneBot action 完整目录(文档 + JSON Schema)。`, + }, + ], +})); + +server.setRequestHandler(ReadResourceRequestSchema, async (req) => { + if (req.params.uri !== RESOURCE_URI) throw new Error(`unknown resource: ${req.params.uri}`); + return { + contents: [ + { + uri: RESOURCE_URI, + mimeType: 'application/json', + text: JSON.stringify({ version: VERSION, categories: CATEGORIES, actions: ACTIONS }, null, 2), + }, + ], + }; +}); + +const transport = new StdioServerTransport(); +await server.connect(transport); +console.error(`[snowluma-mcp] v${VERSION} ready — ${ACTIONS.length} actions, ${CATEGORIES.length} categories`); diff --git a/packages/mcp/src/types.ts b/packages/mcp/src/types.ts new file mode 100644 index 00000000..92334a01 --- /dev/null +++ b/packages/mcp/src/types.ts @@ -0,0 +1,34 @@ +// The MCP's own view of the OneBot action catalog. Mirrors @snowluma/onebot's +// ActionDoc, but is defined HERE so the published package does not couple to +// onebot's internals — the generated `catalog.ts` (a build-time snapshot) is the +// only contract (ADR-0005: the wire/data shape is the seam, not a shared type). + +export interface CatalogParam { + name: string; + /** Display type ('uint' | 'int' | 'messageId' | 'string' | 'bool' | 'message' | 'enum' | 'X[]' | 'raw'). */ + type: string; + required: boolean; + default?: unknown; + desc?: string; + values?: ReadonlyArray; + /** JSON Schema fragment for this single field. */ + schema?: Record; +} + +export interface CatalogAction { + name: string; + aliases: string[]; + category?: string; + summary?: string; + returns?: string; + params: CatalogParam[]; + /** Cross-field invariants, e.g. "exactly one of: message_id | (group_id+user_id)". */ + invariants: string[]; + /** Composed JSON Schema for the whole params object. */ + inputSchema: Record; +} + +export interface CatalogCategory { + category: string; + count: number; +} diff --git a/packages/mcp/tsconfig.json b/packages/mcp/tsconfig.json new file mode 100644 index 00000000..b73094e4 --- /dev/null +++ b/packages/mcp/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "module": "NodeNext", + "moduleResolution": "NodeNext", + "outDir": "./dist", + "rootDir": "./src", + "declaration": true, + "noEmit": false, + "types": ["node"] + }, + "include": ["src/**/*"] +} diff --git a/packages/mcp/vitest.config.ts b/packages/mcp/vitest.config.ts new file mode 100644 index 00000000..20b7342c --- /dev/null +++ b/packages/mcp/vitest.config.ts @@ -0,0 +1,17 @@ +// Vitest config — used only to RUN the catalog generator (scripts/gen-catalog.test.ts) +// in an environment where `@snowluma/onebot/action-docs` resolves. The proton +// plugin provides the same bare-specifier resolver @snowluma/onebot's own tests +// use, so importing the action specs works identically here. +import protobufVitePlugin from '@snowluma/proton/vite'; +import { defineConfig } from 'vitest/config'; + +export default defineConfig({ + plugins: [protobufVitePlugin()], + test: { + include: ['scripts/**/*.test.ts'], + environment: 'node', + env: { + SNOWLUMA_LOG_FILE: '0', + }, + }, +}); diff --git a/packages/onebot/package.json b/packages/onebot/package.json index b211986d..14b093cb 100644 --- a/packages/onebot/package.json +++ b/packages/onebot/package.json @@ -11,6 +11,14 @@ "types": "./src/index.ts", "default": "./src/index.ts" }, + "./action-kit": { + "types": "./src/action-kit.ts", + "default": "./src/action-kit.ts" + }, + "./action-docs": { + "types": "./src/action-docs.ts", + "default": "./src/action-docs.ts" + }, "./manager": { "types": "./src/manager.ts", "default": "./src/manager.ts" diff --git a/packages/onebot/src/action-docs.ts b/packages/onebot/src/action-docs.ts index 0d89e09b..43982da9 100644 --- a/packages/onebot/src/action-docs.ts +++ b/packages/onebot/src/action-docs.ts @@ -25,21 +25,29 @@ import { actions as groupAlbumActions } from './actions/group-album'; type AnySpec = ActionSpec>>; -const ALL_SPECS: readonly AnySpec[] = [ - ...infoActions, - ...messageActions, - ...friendActions, - ...groupInfoActions, - ...groupAdminActions, - ...groupFileActions, - ...requestActions, - ...extendedActions, - ...groupAlbumActions, +// Source file = domain category. Each doc is tagged so the MCP / UI can group. +const GROUPS: ReadonlyArray<{ category: string; specs: readonly AnySpec[] }> = [ + { category: '信息', specs: infoActions }, + { category: '消息', specs: messageActions }, + { category: '好友', specs: friendActions }, + { category: '群信息', specs: groupInfoActions }, + { category: '群管理', specs: groupAdminActions }, + { category: '群文件', specs: groupFileActions }, + { category: '请求', specs: requestActions }, + { category: '扩展', specs: extendedActions }, + { category: '群相册', specs: groupAlbumActions }, ]; -/** Every declarative action's doc, sorted by name. */ -export function collectActionDocs(specs: readonly AnySpec[] = ALL_SPECS): ActionDoc[] { - return specs.map((s) => s.describe()).sort((a, b) => a.name.localeCompare(b.name)); +/** Every declarative action's doc (with category), sorted by name. */ +export function collectActionDocs(): ActionDoc[] { + return GROUPS + .flatMap(({ category, specs }) => specs.map((s) => ({ ...s.describe(), category }))) + .sort((a, b) => a.name.localeCompare(b.name)); +} + +/** Distinct categories with action counts. */ +export function collectCategories(): Array<{ category: string; count: number }> { + return GROUPS.map(({ category, specs }) => ({ category, count: specs.length })); } function paramRow(p: ActionDoc['params'][number]): string { @@ -52,7 +60,8 @@ function paramRow(p: ActionDoc['params'][number]): string { function renderAction(doc: ActionDoc): string { const lines: string[] = []; const alias = doc.aliases.length ? ` _(别名: ${doc.aliases.map((a) => `\`${a}\``).join(', ')})_` : ''; - lines.push(`### \`${doc.name}\`${alias}`); + const cat = doc.category ? ` · ${doc.category}` : ''; + lines.push(`### \`${doc.name}\`${cat}${alias}`); if (doc.summary) lines.push('', doc.summary); if (doc.params.length) { lines.push('', '| 参数 | 类型 | 必填 | 默认 | 说明 |', '| --- | --- | --- | --- | --- |'); diff --git a/packages/onebot/src/action-kit.ts b/packages/onebot/src/action-kit.ts index 644686a0..d3944431 100644 --- a/packages/onebot/src/action-kit.ts +++ b/packages/onebot/src/action-kit.ts @@ -39,12 +39,19 @@ type Raw = JsonValue | typeof MISSING; // ─────────────────────────── Field (param coercer) ─────────────────────────── +/** A JSON Schema fragment (loose). Each coercer emits one; `describe()` composes + * them into an action's `inputSchema` (consumed by docs / the MCP). */ +export type JsonSchema = Record; + export interface FieldDoc { type: string; required: boolean; default?: JsonValue; desc?: string; values?: readonly (string | number)[]; + /** JSON Schema fragment for this field's value (constraints only; presence + * and default are applied at the object level by `describe()`). */ + schema?: JsonSchema; } export interface Field { @@ -57,6 +64,9 @@ export interface Field { * numeric field is an error, not a silent fallback). */ default(value: T): Field; describe(text: string): Field; + /** Complete JSON Schema for this field's value (constraints + description + + * default). Object-level required-ness is handled by `describe()`. */ + toJsonSchema(): JsonSchema; } /** Core coerces a PRESENT value (never MISSING). Presence policy is applied @@ -92,6 +102,13 @@ class FieldImpl implements Field { describe(text: string): Field { return new FieldImpl(this.core, { ...this.doc, desc: text }); } + + toJsonSchema(): JsonSchema { + const out: JsonSchema = { ...(this.doc.schema ?? {}) }; + if (this.doc.desc) out.description = this.doc.desc; + if (this.doc.default !== undefined) out.default = this.doc.default; + return out; + } } // ─────────────────────────── coercer vocabulary `f` ─────────────────────────── @@ -113,8 +130,23 @@ function intCore(typeName: string, opts: IntOpts): Core { }; } +function intSchema(opts: IntOpts): JsonSchema { + const s: JsonSchema = { type: 'integer' }; + if (opts.min !== undefined) s.minimum = opts.min; + if (opts.max !== undefined) s.maximum = opts.max; + if (opts.nonZero) s.not = { const: 0 }; + return s; +} + interface StrOpts { allowEmpty?: boolean; maxLen?: number } +function strSchema(opts: StrOpts): JsonSchema { + const s: JsonSchema = { type: 'string' }; + if (opts.allowEmpty === false) s.minLength = 1; + if (opts.maxLen !== undefined) s.maxLength = opts.maxLen; + return s; +} + function arrayField(el: Field, mustBeNonEmpty: boolean): Field & { nonEmpty(): Field } { const core: Core = (raw, field) => { if (!Array.isArray(raw)) return err(field, 'expected an array'); @@ -127,24 +159,28 @@ function arrayField(el: Field, mustBeNonEmpty: boolean): Field & { no if (mustBeNonEmpty && out.length === 0) return err(field, 'must not be empty'); return ok(out); }; - const base = new FieldImpl(core, { type: `${el.doc.type}[]`, required: true }); + const base = new FieldImpl(core, { + type: `${el.doc.type}[]`, + required: true, + schema: { type: 'array', items: el.toJsonSchema(), ...(mustBeNonEmpty ? { minItems: 1 } : {}) }, + }); return Object.assign(base, { nonEmpty: () => arrayField(el, true) }); } export const f = { /** Positive integer (>0): group_id / user_id / message_id. */ uint(): Field { - return new FieldImpl(intCore('a positive integer', { min: 1 }), { type: 'uint', required: true }); + return new FieldImpl(intCore('a positive integer', { min: 1 }), { type: 'uint', required: true, schema: intSchema({ min: 1 }) }); }, /** Integer with optional bounds; allows 0 / negatives unless bounded. * e.g. a duration where 0 is meaningful: `f.int({ min: 0 })`. */ int(opts: IntOpts = {}): Field { - return new FieldImpl(intCore('an integer', opts), { type: 'int', required: true }); + return new FieldImpl(intCore('an integer', opts), { type: 'int', required: true, schema: intSchema(opts) }); }, /** OneBot message id: a non-zero integer. NEGATIVES ARE VALID (ids are a * signed int32 hash) — do NOT use `uint()` for message_id. */ messageId(): Field { - return new FieldImpl(intCore('a message id', { nonZero: true }), { type: 'messageId', required: true }); + return new FieldImpl(intCore('a message id', { nonZero: true }), { type: 'messageId', required: true, schema: intSchema({ nonZero: true }) }); }, /** Finite number (fractions allowed). */ number(): Field { @@ -152,7 +188,7 @@ export const f = { if (typeof raw === 'number' && Number.isFinite(raw)) return ok(raw); if (typeof raw === 'string' && raw.trim() !== '' && Number.isFinite(Number(raw))) return ok(Number(raw)); return err(field, 'expected a number'); - }, { type: 'number', required: true }); + }, { type: 'number', required: true, schema: { type: 'number' } }); }, /** String. Numbers/booleans stringify (matches legacy `asString`). Empty * allowed by default; `{ allowEmpty: false }` rejects ''. */ @@ -165,7 +201,7 @@ export const f = { if (opts.allowEmpty === false && s === '') return err(field, 'must not be empty'); if (opts.maxLen !== undefined && s.length > opts.maxLen) return err(field, `must be <= ${opts.maxLen} chars`); return ok(s); - }, { type: 'string', required: true }); + }, { type: 'string', required: true, schema: strSchema(opts) }); }, /** true/1/yes/on ⇒ true; false/0/no/off ⇒ false (matches legacy `asBoolean`). */ bool(): Field { @@ -178,7 +214,7 @@ export const f = { if (t === 'false' || t === '0' || t === 'no' || t === 'off') return ok(false); } return err(field, 'expected a boolean'); - }, { type: 'bool', required: true }); + }, { type: 'bool', required: true, schema: { type: 'boolean' } }); }, /** OneBot message union: string | segment[] | object. A string that looks * like a JSON array is parsed (matches legacy `asMessage`); otherwise the @@ -197,7 +233,7 @@ export const f = { } } return ok(raw); - }, { type: 'message', required: true }); + }, { type: 'message', required: true, schema: { description: 'OneBot message: string | segment[] | object' } }); }, /** Homogeneous array; `.nonEmpty()` rejects []. */ array(el: Field): Field & { nonEmpty(): Field } { @@ -210,11 +246,11 @@ export const f = { return ok(raw as V[number]); } return err(field, `expected one of: ${values.join(', ')}`); - }, { type: 'enum', required: true, values }); + }, { type: 'enum', required: true, values, schema: { enum: [...values] } }); }, /** Escape hatch — pass the raw value (or undefined) through, validate nothing. */ raw(): Field { - return new FieldImpl((raw) => ok(raw), { type: 'raw', required: false, default: undefined }); + return new FieldImpl((raw) => ok(raw), { type: 'raw', required: false, default: undefined, schema: {} }); }, }; @@ -291,10 +327,14 @@ export interface ParamDoc extends FieldDoc { export interface ActionDoc { name: string; aliases: string[]; + /** Domain category (set by the doc collector, e.g. 群管理/消息). */ + category?: string; summary?: string; returns?: string; params: ParamDoc[]; invariants: string[]; + /** Composed JSON Schema for the whole params object (properties + required). */ + inputSchema: JsonSchema; } type Handler = (params: JsonObject) => Promise; @@ -359,14 +399,30 @@ export function defineAction(def: ActionDef): ActionSpec { params: def.params, parse, toHandler, - describe: () => ({ - name: names[0], - aliases: names.slice(1), - summary: def.summary, - returns: def.returns, - params: Object.entries(def.params).map(([name, field]) => ({ name, ...field.doc })), - invariants: rules.map((rule) => rule.doc), - }), + describe: () => { + const entries = Object.entries(def.params); + const properties: Record = {}; + const required: string[] = []; + for (const [name, field] of entries) { + properties[name] = field.toJsonSchema(); + if (field.doc.required) required.push(name); + } + const inputSchema: JsonSchema = { + type: 'object', + properties, + ...(required.length ? { required } : {}), + additionalProperties: true, + }; + return { + name: names[0], + aliases: names.slice(1), + summary: def.summary, + returns: def.returns, + params: entries.map(([name, field]) => ({ name, ...field.doc })), + invariants: rules.map((rule) => rule.doc), + inputSchema, + }; + }, register: (h, ctx) => { const handler = toHandler(ctx); for (const name of names) h.registerAction(name, handler); diff --git a/packages/onebot/tests/action-kit.test.ts b/packages/onebot/tests/action-kit.test.ts index 6ddf74d6..02a3d4cb 100644 --- a/packages/onebot/tests/action-kit.test.ts +++ b/packages/onebot/tests/action-kit.test.ts @@ -164,6 +164,42 @@ describe('run raw escape hatch — original params as 3rd arg', () => { }); }); +describe('toJsonSchema / inputSchema (for the MCP)', () => { + it('emits a JSON Schema fragment per coercer', () => { + expect(f.uint().toJsonSchema()).toEqual({ type: 'integer', minimum: 1 }); + expect(f.messageId().toJsonSchema()).toEqual({ type: 'integer', not: { const: 0 } }); + expect(f.int({ min: 0 }).default(1800).toJsonSchema()).toEqual({ type: 'integer', minimum: 0, default: 1800 }); + expect(f.string({ allowEmpty: false }).toJsonSchema()).toEqual({ type: 'string', minLength: 1 }); + expect(f.bool().toJsonSchema()).toEqual({ type: 'boolean' }); + expect(f.enum('a', 'b').toJsonSchema()).toEqual({ enum: ['a', 'b'] }); + expect(f.array(f.uint()).nonEmpty().toJsonSchema()).toEqual({ + type: 'array', + items: { type: 'integer', minimum: 1 }, + minItems: 1, + }); + expect(f.uint().describe('群号').toJsonSchema()).toEqual({ type: 'integer', minimum: 1, description: '群号' }); + }); + + it('composes an action inputSchema (object + required + defaults)', () => { + const spec = groupUserAction({ + name: 'set_group_ban', + params: { duration: f.int({ min: 0 }).default(1800) }, + run: () => okResponse(), + }); + const { inputSchema } = spec.describe(); + expect(inputSchema).toMatchObject({ + type: 'object', + additionalProperties: true, + required: ['group_id', 'user_id'], + properties: { + group_id: { type: 'integer', minimum: 1 }, + user_id: { type: 'integer', minimum: 1 }, + duration: { type: 'integer', minimum: 0, default: 1800 }, + }, + }); + }); +}); + describe('describe — doc metadata for self-generated docs (D4)', () => { const spec = groupUserAction({ name: ['set_group_ban', 'ban'], diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2715a2c4..ce40a072 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -137,6 +137,31 @@ importers: specifier: ^4.1.4 version: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.0.8(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) + packages/mcp: + dependencies: + '@modelcontextprotocol/sdk': + specifier: ^1.0.0 + version: 1.29.0(zod@4.3.6) + devDependencies: + '@snowluma/onebot': + specifier: workspace:* + version: link:../onebot + '@snowluma/proton': + specifier: workspace:* + version: link:../proton + '@types/node': + specifier: ^24.12.2 + version: 24.12.2 + typescript: + specifier: 'catalog:' + version: 6.0.2 + vite: + specifier: 'catalog:' + version: 8.0.8(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0) + vitest: + specifier: ^4.1.4 + version: 4.1.4(@types/node@24.12.2)(@vitest/coverage-istanbul@4.1.4)(@vitest/coverage-v8@4.1.4)(vite@8.0.8(@types/node@24.12.2)(esbuild@0.27.7)(jiti@2.6.1)(sass@1.99.0)(tsx@4.21.0)) + packages/onebot: dependencies: '@snowluma/common': @@ -763,6 +788,16 @@ packages: '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + '@modelcontextprotocol/sdk@1.29.0': + resolution: {integrity: sha512-zo37mZA9hJWpULgkRpowewez1y6ML5GsXJPY8FI0tBBCd77HEvza4jDqRKOXgHNn867PVGCyTdzqpz0izu5ZjQ==} + engines: {node: '>=18'} + peerDependencies: + '@cfworker/json-schema': ^4.1.1 + zod: ^3.25 || ^4.0 + peerDependenciesMeta: + '@cfworker/json-schema': + optional: true + '@napi-rs/wasm-runtime@1.1.4': resolution: {integrity: sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==} peerDependencies: @@ -1830,6 +1865,10 @@ packages: '@vitest/utils@4.1.4': resolution: {integrity: sha512-13QMT+eysM5uVGa1rG4kegGYNp6cnQcsTc67ELFbhNLQO+vgsygtYJx2khvdt4gVQqSSpC/KT5FZZxUpP3Oatw==} + accepts@2.0.0: + resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==} + engines: {node: '>= 0.6'} + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -1840,9 +1879,20 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + ajv-formats@3.0.1: + resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + ajv@6.14.0: resolution: {integrity: sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==} + ajv@8.20.0: + resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} + any-promise@1.3.0: resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} @@ -1875,6 +1925,10 @@ packages: blf-debug-appender@1.0.5: resolution: {integrity: sha512-ftNcGiVW2nxzG0WJ8Hcs58CbygPl2vMuLDDSxsfhGZmVl2NFGmZOuXhDDeJifvWmP0FHzP/L8dblxn65eQjgEA==} + body-parser@2.2.2: + resolution: {integrity: sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==} + engines: {node: '>=18'} + brace-expansion@5.0.5: resolution: {integrity: sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==} engines: {node: 18 || 20 || >=22} @@ -1890,10 +1944,22 @@ packages: peerDependencies: esbuild: '>=0.18' + bytes@3.1.2: + resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} + engines: {node: '>= 0.8'} + cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + + call-bound@1.0.4: + resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} + engines: {node: '>= 0.4'} + caniuse-lite@1.0.30001788: resolution: {integrity: sha512-6q8HFp+lOQtcf7wBK+uEenxymVWkGKkjFpCvw5W25cmMwEDU45p1xQFBQv8JDlMMry7eNxyBaR+qxgmTUZkIRQ==} @@ -1927,12 +1993,36 @@ packages: resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==} engines: {node: ^14.18.0 || >=16.10.0} + content-disposition@1.1.0: + resolution: {integrity: sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==} + engines: {node: '>=18'} + + content-type@1.0.5: + resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} + engines: {node: '>= 0.6'} + + content-type@2.0.0: + resolution: {integrity: sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==} + engines: {node: '>=18'} + convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} cookie-es@3.1.1: resolution: {integrity: sha512-UaXxwISYJPTr9hwQxMFYZ7kNhSXboMXP+Z3TRX6f1/NyaGPfuNUZOWP1pUEb75B2HjfklIYLVRfWiFZJyC6Npg==} + cookie-signature@1.2.2: + resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==} + engines: {node: '>=6.6.0'} + + cookie@0.7.2: + resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} + engines: {node: '>= 0.6'} + + cors@2.8.6: + resolution: {integrity: sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==} + engines: {node: '>= 0.10'} + cross-env@10.1.0: resolution: {integrity: sha512-GsYosgnACZTADcmEyJctkJIoqAhHjttw7RsFrVoJNXbsWWqaq6Ym+7kZjq6mS45O0jij6vtiReppKQEtqWy6Dw==} engines: {node: '>=20'} @@ -1964,6 +2054,10 @@ packages: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} + depd@2.0.0: + resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} + engines: {node: '>= 0.8'} + detect-libc@2.1.2: resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} engines: {node: '>=8'} @@ -1971,13 +2065,28 @@ packages: detect-node-es@1.1.0: resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + + ee-first@1.1.1: + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + electron-to-chromium@1.5.339: resolution: {integrity: sha512-Is+0BBHJ4NrdpAYiperrmp53pLywG/yV/6lIMTAnhxvzj/Cmn5Q/ogSHC6AKe7X+8kPLxxFk0cs5oc/3j/fxIg==} + encodeurl@2.0.0: + resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} + engines: {node: '>= 0.8'} + enhanced-resolve@5.20.1: resolution: {integrity: sha512-Qohcme7V1inbAfvjItgw0EaxVX5q2rdVEZHRBrEQdRZTssLDGsL8Lwrznl8oQ/6kuTJONLaDcGjkNP247XEhcA==} engines: {node: '>=10.13.0'} + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + es-errors@1.3.0: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} @@ -1985,6 +2094,10 @@ packages: es-module-lexer@2.0.0: resolution: {integrity: sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw==} + es-object-atoms@1.1.2: + resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} + engines: {node: '>= 0.4'} + esbuild@0.27.7: resolution: {integrity: sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==} engines: {node: '>=18'} @@ -1994,6 +2107,9 @@ packages: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} + escape-html@1.0.3: + resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} @@ -2057,10 +2173,32 @@ packages: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} + etag@1.8.1: + resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} + engines: {node: '>= 0.6'} + + eventsource-parser@3.1.0: + resolution: {integrity: sha512-kJezFj9YFAMLeORyi7aCLxLbD5/qWMQnoMVlVPyHIll7lgRJCc3JVln9Vgl9nwQi0YkMnhdGTMNn7CkRRAptMg==} + engines: {node: '>=18.0.0'} + + eventsource@3.0.7: + resolution: {integrity: sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==} + engines: {node: '>=18.0.0'} + expect-type@1.3.0: resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==} engines: {node: '>=12.0.0'} + express-rate-limit@8.5.2: + resolution: {integrity: sha512-5Kb34ipNX694DH48vN9irak1Qx30nb0PLYHXfJgw4YEjiC3ZEmZJhwOp+VfiCYwFzvFTdB9QkArYS5kXa2cx2A==} + engines: {node: '>= 16'} + peerDependencies: + express: '>= 4.11' + + express@5.2.1: + resolution: {integrity: sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==} + engines: {node: '>= 18'} + fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -2070,6 +2208,9 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + fast-uri@3.1.2: + resolution: {integrity: sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==} + fdir@6.5.0: resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} engines: {node: '>=12.0.0'} @@ -2088,6 +2229,10 @@ packages: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} + finalhandler@2.1.1: + resolution: {integrity: sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==} + engines: {node: '>= 18.0.0'} + find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} @@ -2102,6 +2247,10 @@ packages: flatted@3.4.2: resolution: {integrity: sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==} + forwarded@0.2.0: + resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} + engines: {node: '>= 0.6'} + framer-motion@12.38.0: resolution: {integrity: sha512-rFYkY/pigbcswl1XQSb7q424kSTQ8q6eAC+YUsSKooHQYuLdzdHjrt6uxUC+PRAO++q5IS7+TamgIw1AphxR+g==} peerDependencies: @@ -2116,6 +2265,10 @@ packages: react-dom: optional: true + fresh@2.0.0: + resolution: {integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==} + engines: {node: '>= 0.8'} + fs-extra@11.3.4: resolution: {integrity: sha512-CTXd6rk/M3/ULNQj8FBqBWHYBVYybQ3VPBw0xGKFe3tuH7ytT6ACnvzpIQ3UZtB8yvUKC2cXn1a+x+5EVQLovA==} engines: {node: '>=14.14'} @@ -2132,10 +2285,18 @@ packages: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + get-nonce@1.0.1: resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==} engines: {node: '>=6'} + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + get-tsconfig@4.14.0: resolution: {integrity: sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==} @@ -2147,6 +2308,10 @@ packages: resolution: {integrity: sha512-qoV+HK2yFl/366t2/Cb3+xxPUo5BuMynomoDmiaZBIdbs+0pYbjfZU+twLhGKp4uCZ/+NbtpVepH5bGCxRyy2g==} engines: {node: '>=18'} + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} @@ -2154,6 +2319,10 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} @@ -2171,6 +2340,14 @@ packages: html-escaper@2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} + http-errors@2.0.1: + resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==} + engines: {node: '>= 0.8'} + + iconv-lite@0.7.2: + resolution: {integrity: sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==} + engines: {node: '>=0.10.0'} + ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} @@ -2186,6 +2363,17 @@ packages: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + ip-address@10.2.0: + resolution: {integrity: sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA==} + engines: {node: '>= 12'} + + ipaddr.js@1.9.1: + resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} + engines: {node: '>= 0.10'} + is-core-module@2.16.1: resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} engines: {node: '>= 0.4'} @@ -2201,6 +2389,9 @@ packages: is-module@1.0.0: resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} + is-promise@4.0.0: + resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} + is-what-type@1.1.4: resolution: {integrity: sha512-120PeT8LdXO7m503rQtOapWA7lHBtWErN+asRxKyxF/SFGeqLEAZhlItjNynNVABHteRMSjomQCdAnxEJldMMQ==} @@ -2227,6 +2418,9 @@ packages: resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} hasBin: true + jose@6.2.3: + resolution: {integrity: sha512-YYVDInQKFJfR/xa3ojUTl8c2KoTwiL1R5Wg9YCydwH0x0B9grbzlg5HC7mMjCtUJjbQ/YnGEZIhI5tCgfTb4Hw==} + joycon@3.1.1: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} engines: {node: '>=10'} @@ -2248,6 +2442,12 @@ packages: json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + + json-schema-typed@8.0.2: + resolution: {integrity: sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==} + json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} @@ -2373,6 +2573,26 @@ packages: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + + media-typer@1.1.0: + resolution: {integrity: sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==} + engines: {node: '>= 0.8'} + + merge-descriptors@2.0.0: + resolution: {integrity: sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==} + engines: {node: '>=18'} + + mime-db@1.54.0: + resolution: {integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==} + engines: {node: '>= 0.6'} + + mime-types@3.0.2: + resolution: {integrity: sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==} + engines: {node: '>=18'} + minimatch@10.2.5: resolution: {integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==} engines: {node: 18 || 20 || >=22} @@ -2414,6 +2634,10 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + negotiator@1.0.0: + resolution: {integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==} + engines: {node: '>= 0.6'} + node-addon-api@7.1.1: resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==} @@ -2424,9 +2648,20 @@ packages: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} + object-inspect@1.13.4: + resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} + engines: {node: '>= 0.4'} + obug@2.1.1: resolution: {integrity: sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==} + on-finished@2.4.1: + resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} + engines: {node: '>= 0.8'} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} @@ -2439,6 +2674,10 @@ packages: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} + parseurl@1.3.3: + resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} + engines: {node: '>= 0.8'} + path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} @@ -2450,6 +2689,9 @@ packages: path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + path-to-regexp@8.4.2: + resolution: {integrity: sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==} + pathe@2.0.3: resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} @@ -2464,6 +2706,10 @@ packages: resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==} engines: {node: '>= 6'} + pkce-challenge@5.0.1: + resolution: {integrity: sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==} + engines: {node: '>=16.20.0'} + pkg-types@1.3.1: resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} @@ -2493,10 +2739,26 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} + proxy-addr@2.0.7: + resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} + engines: {node: '>= 0.10'} + punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} + qs@6.15.2: + resolution: {integrity: sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==} + engines: {node: '>=0.6'} + + range-parser@1.2.1: + resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} + engines: {node: '>= 0.6'} + + raw-body@3.0.2: + resolution: {integrity: sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==} + engines: {node: '>= 0.10'} + react-dom@19.2.5: resolution: {integrity: sha512-J5bAZz+DXMMwW/wV3xzKke59Af6CHY7G4uYLN1OvBcKEsWOs4pQExj86BBKamxl/Ik5bx9whOrvBlSDfWzgSag==} peerDependencies: @@ -2540,6 +2802,10 @@ packages: resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} engines: {node: '>= 14.18.0'} + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + resolve-from@5.0.0: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} @@ -2562,6 +2828,13 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + router@2.2.0: + resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==} + engines: {node: '>= 18'} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + sass@1.99.0: resolution: {integrity: sha512-kgW13M54DUB7IsIRM5LvJkNlpH+WhMpooUcaWGFARkF1Tc82v9mIWkCbCYf+MBvpIUBSeSOTilpZjEPr2VYE6Q==} engines: {node: '>=14.0.0'} @@ -2579,6 +2852,10 @@ packages: engines: {node: '>=10'} hasBin: true + send@1.2.1: + resolution: {integrity: sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==} + engines: {node: '>= 18'} + seroval-plugins@1.5.4: resolution: {integrity: sha512-S0xQPhUTefAhNvNWFg0c1J8qJArHt5KdtJ/cFAofo06KD1MVSeFWyl4iiu+ApDIuw0WhjpOfCdgConOfAnLgkw==} engines: {node: '>=10'} @@ -2589,6 +2866,13 @@ packages: resolution: {integrity: sha512-46uFvgrXTVxZcUorgSSRZ4y+ieqLLQRMlG4bnCZKW3qI6BZm7Rg4ntMW4p1mILEEBZWrFlcpp0AyIIlM6jD9iw==} engines: {node: '>=10'} + serve-static@2.2.1: + resolution: {integrity: sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==} + engines: {node: '>= 18'} + + setprototypeof@1.2.0: + resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -2597,6 +2881,22 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} + side-channel-list@1.0.1: + resolution: {integrity: sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==} + engines: {node: '>= 0.4'} + + side-channel-map@1.0.1: + resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} + engines: {node: '>= 0.4'} + + side-channel-weakmap@1.0.2: + resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} + engines: {node: '>= 0.4'} + + side-channel@1.1.0: + resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==} + engines: {node: '>= 0.4'} + siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} @@ -2617,6 +2917,10 @@ packages: stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + statuses@2.0.2: + resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} + engines: {node: '>= 0.8'} + std-env@4.1.0: resolution: {integrity: sha512-Rq7ybcX2RuC55r9oaPVEW7/xu3tj8u4GeBYHBWCychFtzMIr86A7e3PPEBPT37sHStKX3+TiX/Fr/ACmJLVlLQ==} @@ -2668,6 +2972,10 @@ packages: resolution: {integrity: sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==} engines: {node: '>=14.0.0'} + toidentifier@1.0.1: + resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} + engines: {node: '>=0.6'} + tree-kill@1.2.2: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true @@ -2715,6 +3023,10 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} + type-is@2.1.0: + resolution: {integrity: sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==} + engines: {node: '>= 18'} + typescript-eslint@8.58.2: resolution: {integrity: sha512-V8iSng9mRbdZjl54VJ9NKr6ZB+dW0J3TzRXRGcSbLIej9jV86ZRtlYeTKDR/QLxXykocJ5icNzbsl2+5TzIvcQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2740,6 +3052,10 @@ packages: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} + unpipe@1.0.0: + resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} + engines: {node: '>= 0.8'} + update-browserslist-db@1.2.3: resolution: {integrity: sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==} hasBin: true @@ -2774,6 +3090,10 @@ packages: peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + vary@1.1.2: + resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} + engines: {node: '>= 0.8'} + vite-plugin-cp@6.0.3: resolution: {integrity: sha512-qxKGH3v9wPwUDbDchJf4IH4mRE1zkLWgzZSxwrl8LapwUWm48IFS7SlbRmcF4NquC/fESA5cHFge9E2Ps+woxg==} engines: {node: '>=14.18.0', vite: '>=3.1.0'} @@ -2880,6 +3200,9 @@ packages: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} @@ -2887,6 +3210,11 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + zod-to-json-schema@3.25.2: + resolution: {integrity: sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA==} + peerDependencies: + zod: ^3.25.28 || ^4 + zod-validation-error@4.0.2: resolution: {integrity: sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==} engines: {node: '>=18.0.0'} @@ -3187,6 +3515,28 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 + '@modelcontextprotocol/sdk@1.29.0(zod@4.3.6)': + dependencies: + '@hono/node-server': 1.19.14(hono@4.12.18) + ajv: 8.20.0 + ajv-formats: 3.0.1(ajv@8.20.0) + content-type: 1.0.5 + cors: 2.8.6 + cross-spawn: 7.0.6 + eventsource: 3.0.7 + eventsource-parser: 3.1.0 + express: 5.2.1 + express-rate-limit: 8.5.2(express@5.2.1) + hono: 4.12.18 + jose: 6.2.3 + json-schema-typed: 8.0.2 + pkce-challenge: 5.0.1 + raw-body: 3.0.2 + zod: 4.3.6 + zod-to-json-schema: 3.25.2(zod@4.3.6) + transitivePeerDependencies: + - supports-color + '@napi-rs/wasm-runtime@1.1.4(@emnapi/core@1.9.2)(@emnapi/runtime@1.9.2)': dependencies: '@emnapi/core': 1.9.2 @@ -4140,12 +4490,21 @@ snapshots: convert-source-map: 2.0.0 tinyrainbow: 3.1.0 + accepts@2.0.0: + dependencies: + mime-types: 3.0.2 + negotiator: 1.0.0 + acorn-jsx@5.3.2(acorn@8.16.0): dependencies: acorn: 8.16.0 acorn@8.16.0: {} + ajv-formats@3.0.1(ajv@8.20.0): + optionalDependencies: + ajv: 8.20.0 + ajv@6.14.0: dependencies: fast-deep-equal: 3.1.3 @@ -4153,6 +4512,13 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 + ajv@8.20.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-uri: 3.1.2 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + any-promise@1.3.0: {} aria-hidden@1.2.6: @@ -4191,6 +4557,20 @@ snapshots: transitivePeerDependencies: - supports-color + body-parser@2.2.2: + dependencies: + bytes: 3.1.2 + content-type: 1.0.5 + debug: 4.4.3 + http-errors: 2.0.1 + iconv-lite: 0.7.2 + on-finished: 2.4.1 + qs: 6.15.2 + raw-body: 3.0.2 + type-is: 2.1.0 + transitivePeerDependencies: + - supports-color + brace-expansion@5.0.5: dependencies: balanced-match: 4.0.4 @@ -4208,8 +4588,20 @@ snapshots: esbuild: 0.27.7 load-tsconfig: 0.2.5 + bytes@3.1.2: {} + cac@6.7.14: {} + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + + call-bound@1.0.4: + dependencies: + call-bind-apply-helpers: 1.0.2 + get-intrinsic: 1.3.0 + caniuse-lite@1.0.30001788: {} chai@6.2.2: {} @@ -4232,10 +4624,25 @@ snapshots: consola@3.4.2: {} + content-disposition@1.1.0: {} + + content-type@1.0.5: {} + + content-type@2.0.0: {} + convert-source-map@2.0.0: {} cookie-es@3.1.1: {} + cookie-signature@1.2.2: {} + + cookie@0.7.2: {} + + cors@2.8.6: + dependencies: + object-assign: 4.1.1 + vary: 1.1.2 + cross-env@10.1.0: dependencies: '@epic-web/invariant': 1.0.0 @@ -4259,21 +4666,39 @@ snapshots: deepmerge@4.3.1: {} + depd@2.0.0: {} + detect-libc@2.1.2: {} detect-node-es@1.1.0: {} + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + + ee-first@1.1.1: {} + electron-to-chromium@1.5.339: {} + encodeurl@2.0.0: {} + enhanced-resolve@5.20.1: dependencies: graceful-fs: 4.2.11 tapable: 2.3.2 + es-define-property@1.0.1: {} + es-errors@1.3.0: {} es-module-lexer@2.0.0: {} + es-object-atoms@1.1.2: + dependencies: + es-errors: 1.3.0 + esbuild@0.27.7: optionalDependencies: '@esbuild/aix-ppc64': 0.27.7 @@ -4305,6 +4730,8 @@ snapshots: escalade@3.2.0: {} + escape-html@1.0.3: {} + escape-string-regexp@4.0.0: {} eslint-plugin-react-hooks@7.0.1(eslint@10.2.0(jiti@2.6.1)): @@ -4394,14 +4821,62 @@ snapshots: esutils@2.0.3: {} + etag@1.8.1: {} + + eventsource-parser@3.1.0: {} + + eventsource@3.0.7: + dependencies: + eventsource-parser: 3.1.0 + expect-type@1.3.0: {} + express-rate-limit@8.5.2(express@5.2.1): + dependencies: + express: 5.2.1 + ip-address: 10.2.0 + + express@5.2.1: + dependencies: + accepts: 2.0.0 + body-parser: 2.2.2 + content-disposition: 1.1.0 + content-type: 1.0.5 + cookie: 0.7.2 + cookie-signature: 1.2.2 + debug: 4.4.3 + depd: 2.0.0 + encodeurl: 2.0.0 + escape-html: 1.0.3 + etag: 1.8.1 + finalhandler: 2.1.1 + fresh: 2.0.0 + http-errors: 2.0.1 + merge-descriptors: 2.0.0 + mime-types: 3.0.2 + on-finished: 2.4.1 + once: 1.4.0 + parseurl: 1.3.3 + proxy-addr: 2.0.7 + qs: 6.15.2 + range-parser: 1.2.1 + router: 2.2.0 + send: 1.2.1 + serve-static: 2.2.1 + statuses: 2.0.2 + type-is: 2.1.0 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color + fast-deep-equal@3.1.3: {} fast-json-stable-stringify@2.1.0: {} fast-levenshtein@2.0.6: {} + fast-uri@3.1.2: {} + fdir@6.5.0(picomatch@4.0.4): optionalDependencies: picomatch: 4.0.4 @@ -4414,6 +4889,17 @@ snapshots: dependencies: flat-cache: 4.0.1 + finalhandler@2.1.1: + dependencies: + debug: 4.4.3 + encodeurl: 2.0.0 + escape-html: 1.0.3 + on-finished: 2.4.1 + parseurl: 1.3.3 + statuses: 2.0.2 + transitivePeerDependencies: + - supports-color + find-up@5.0.0: dependencies: locate-path: 6.0.0 @@ -4432,6 +4918,8 @@ snapshots: flatted@3.4.2: {} + forwarded@0.2.0: {} + framer-motion@12.38.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5): dependencies: motion-dom: 12.38.0 @@ -4441,6 +4929,8 @@ snapshots: react: 19.2.5 react-dom: 19.2.5(react@19.2.5) + fresh@2.0.0: {} + fs-extra@11.3.4: dependencies: graceful-fs: 4.2.11 @@ -4454,8 +4944,26 @@ snapshots: gensync@1.0.0-beta.2: {} + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.2 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.2 + math-intrinsics: 1.1.0 + get-nonce@1.0.1: {} + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.2 + get-tsconfig@4.14.0: dependencies: resolve-pkg-maps: 1.0.0 @@ -4466,10 +4974,14 @@ snapshots: globals@17.5.0: {} + gopd@1.2.0: {} + graceful-fs@4.2.11: {} has-flag@4.0.0: {} + has-symbols@1.1.0: {} + hasown@2.0.2: dependencies: function-bind: 1.1.2 @@ -4484,6 +4996,18 @@ snapshots: html-escaper@2.0.2: {} + http-errors@2.0.1: + dependencies: + depd: 2.0.0 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 2.0.2 + toidentifier: 1.0.1 + + iconv-lite@0.7.2: + dependencies: + safer-buffer: 2.1.2 + ignore@5.3.2: {} ignore@7.0.5: {} @@ -4493,6 +5017,12 @@ snapshots: imurmurhash@0.1.4: {} + inherits@2.0.4: {} + + ip-address@10.2.0: {} + + ipaddr.js@1.9.1: {} + is-core-module@2.16.1: dependencies: hasown: 2.0.2 @@ -4505,6 +5035,8 @@ snapshots: is-module@1.0.0: {} + is-promise@4.0.0: {} + is-what-type@1.1.4: {} isbot@5.1.40: {} @@ -4526,6 +5058,8 @@ snapshots: jiti@2.6.1: {} + jose@6.2.3: {} + joycon@3.1.1: {} js-tokens@10.0.0: {} @@ -4538,6 +5072,10 @@ snapshots: json-schema-traverse@0.4.1: {} + json-schema-traverse@1.0.0: {} + + json-schema-typed@8.0.2: {} + json-stable-stringify-without-jsonify@1.0.1: {} json5@2.2.3: {} @@ -4638,6 +5176,18 @@ snapshots: dependencies: semver: 7.7.4 + math-intrinsics@1.1.0: {} + + media-typer@1.1.0: {} + + merge-descriptors@2.0.0: {} + + mime-db@1.54.0: {} + + mime-types@3.0.2: + dependencies: + mime-db: 1.54.0 + minimatch@10.2.5: dependencies: brace-expansion: 5.0.5 @@ -4675,6 +5225,8 @@ snapshots: natural-compare@1.4.0: {} + negotiator@1.0.0: {} + node-addon-api@7.1.1: optional: true @@ -4682,8 +5234,18 @@ snapshots: object-assign@4.1.1: {} + object-inspect@1.13.4: {} + obug@2.1.1: {} + on-finished@2.4.1: + dependencies: + ee-first: 1.1.1 + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + optionator@0.9.4: dependencies: deep-is: 0.1.4 @@ -4701,12 +5263,16 @@ snapshots: dependencies: p-limit: 3.1.0 + parseurl@1.3.3: {} + path-exists@4.0.0: {} path-key@3.1.1: {} path-parse@1.0.7: {} + path-to-regexp@8.4.2: {} + pathe@2.0.3: {} picocolors@1.1.1: {} @@ -4715,6 +5281,8 @@ snapshots: pirates@4.0.7: {} + pkce-challenge@5.0.1: {} + pkg-types@1.3.1: dependencies: confbox: 0.1.8 @@ -4737,8 +5305,26 @@ snapshots: prelude-ls@1.2.1: {} + proxy-addr@2.0.7: + dependencies: + forwarded: 0.2.0 + ipaddr.js: 1.9.1 + punycode@2.3.1: {} + qs@6.15.2: + dependencies: + side-channel: 1.1.0 + + range-parser@1.2.1: {} + + raw-body@3.0.2: + dependencies: + bytes: 3.1.2 + http-errors: 2.0.1 + iconv-lite: 0.7.2 + unpipe: 1.0.0 + react-dom@19.2.5(react@19.2.5): dependencies: react: 19.2.5 @@ -4775,6 +5361,8 @@ snapshots: readdirp@4.1.2: {} + require-from-string@2.0.2: {} + resolve-from@5.0.0: {} resolve-pkg-maps@1.0.0: {} @@ -4838,6 +5426,18 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.60.4 fsevents: 2.3.3 + router@2.2.0: + dependencies: + debug: 4.4.3 + depd: 2.0.0 + is-promise: 4.0.0 + parseurl: 1.3.3 + path-to-regexp: 8.4.2 + transitivePeerDependencies: + - supports-color + + safer-buffer@2.1.2: {} + sass@1.99.0: dependencies: chokidar: 4.0.3 @@ -4853,18 +5453,73 @@ snapshots: semver@7.7.4: {} + send@1.2.1: + dependencies: + debug: 4.4.3 + encodeurl: 2.0.0 + escape-html: 1.0.3 + etag: 1.8.1 + fresh: 2.0.0 + http-errors: 2.0.1 + mime-types: 3.0.2 + ms: 2.1.3 + on-finished: 2.4.1 + range-parser: 1.2.1 + statuses: 2.0.2 + transitivePeerDependencies: + - supports-color + seroval-plugins@1.5.4(seroval@1.5.4): dependencies: seroval: 1.5.4 seroval@1.5.4: {} + serve-static@2.2.1: + dependencies: + encodeurl: 2.0.0 + escape-html: 1.0.3 + parseurl: 1.3.3 + send: 1.2.1 + transitivePeerDependencies: + - supports-color + + setprototypeof@1.2.0: {} + shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 shebang-regex@3.0.0: {} + side-channel-list@1.0.1: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + + side-channel-map@1.0.1: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + + side-channel-weakmap@1.0.2: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + side-channel-map: 1.0.1 + + side-channel@1.1.0: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + side-channel-list: 1.0.1 + side-channel-map: 1.0.1 + side-channel-weakmap: 1.0.2 + siginfo@2.0.0: {} sonner@2.0.7(react-dom@19.2.5(react@19.2.5))(react@19.2.5): @@ -4878,6 +5533,8 @@ snapshots: stackback@0.0.2: {} + statuses@2.0.2: {} + std-env@4.1.0: {} sucrase@3.35.1: @@ -4923,6 +5580,8 @@ snapshots: tinyrainbow@3.1.0: {} + toidentifier@1.0.1: {} + tree-kill@1.2.2: {} ts-api-utils@2.5.0(typescript@6.0.2): @@ -4974,6 +5633,12 @@ snapshots: dependencies: prelude-ls: 1.2.1 + type-is@2.1.0: + dependencies: + content-type: 2.0.0 + media-typer: 1.1.0 + mime-types: 3.0.2 + typescript-eslint@8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2): dependencies: '@typescript-eslint/eslint-plugin': 8.58.2(@typescript-eslint/parser@8.58.2(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2))(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) @@ -4995,6 +5660,8 @@ snapshots: universalify@2.0.1: {} + unpipe@1.0.0: {} + update-browserslist-db@1.2.3(browserslist@4.28.2): dependencies: browserslist: 4.28.2 @@ -5024,6 +5691,8 @@ snapshots: dependencies: react: 19.2.5 + vary@1.1.2: {} + vite-plugin-cp@6.0.3: dependencies: fs-extra: 11.3.4 @@ -5114,10 +5783,16 @@ snapshots: word-wrap@1.2.5: {} + wrappy@1.0.2: {} + yallist@3.1.1: {} yocto-queue@0.1.0: {} + zod-to-json-schema@3.25.2(zod@4.3.6): + dependencies: + zod: 4.3.6 + zod-validation-error@4.0.2(zod@4.3.6): dependencies: zod: 4.3.6