ferock on Discord: with "使用 magpie 的全部 MCP 服务器" on, a chat got only the servers in library.json, never magpie's own web search, image recognition or image generation. ownMcp (lib/gateway.mjs) asks the gateway's GET /v1/magpie/mcp (magpie v0.1.2397) for the ones on now and mounts each at the gateway's address with the gateway key. readMcp adds them after the Library's, which every route takes its MCP list from: the page's list (libraryView), a chat's tools, a tool call and the connection check; a Library server of the same name (an installed magpie-image) is used in its place. One turned off in magpie's Settings is left out of the next chat. An older magpie (404), a gateway that doesn't answer, or a bad reply lists none, as before. lib/mcp.mjs loadServers (library.json only) is unchanged; the page calls listTools/callTool with server objects, never by name. Run (mote): bun test chat.test.mjs, 29 pass; the new test is red on the old lib (Expected 2 more tools, Received 0), checked by hand. bun scripts/check.mjs ok. magpie's side was run against its real binary (magpie commit cac655c14's body). Not tried: the page in magpie's window against a real magpie with the switch on (the test drives the page's service with a fake gateway).
69 lines
2.1 KiB
JSON
69 lines
2.1 KiB
JSON
{
|
|
"name": "@magpie-community/page-chat",
|
|
"version": "0.1.7",
|
|
"description": "在 magpie 窗口里加一个「对话」页面:用 magpie 自己的模型、MCP 服务器、指令和技能聊天,支持图片与 LaTeX。A chat page inside magpie's window: talk with magpie's own models, MCP servers, instructions and skills, with images and LaTeX.",
|
|
"author": "Magic_zero (https://github.com/Magiczerowxy)",
|
|
"files": [
|
|
"index.mjs",
|
|
"lib",
|
|
"chat",
|
|
"page",
|
|
"assets",
|
|
"serve.mjs",
|
|
"start-server.cmd",
|
|
"start-server.vbs",
|
|
"install-autostart.cmd",
|
|
"install-autostart.ps1",
|
|
"README.md",
|
|
"SERVE.md",
|
|
"LICENSE"
|
|
],
|
|
"keywords": [
|
|
"magpie",
|
|
"magpie-page",
|
|
"magpie-plugin",
|
|
"opencode",
|
|
"opencode-plugin",
|
|
"chat",
|
|
"llm"
|
|
],
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/magpie-community/plugins.git",
|
|
"directory": "packages/chat"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/magpie-community/plugins/issues"
|
|
},
|
|
"homepage": "https://github.com/Magiczerowxy/magpie-chat#readme",
|
|
"engines": {
|
|
"magpie": ">=0.1.1340"
|
|
},
|
|
"magpie": {
|
|
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjggMTI4IiB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCI+CiAgPHJlY3Qgd2lkdGg9IjEyOCIgaGVpZ2h0PSIxMjgiIHJ4PSIyOCIgZmlsbD0iIzRmNDZlNSIvPgogIDxwYXRoIGQ9Ik0zMCAzOGg2OGE4IDggMCAwIDEgOCA4djM0YTggOCAwIDAgMS04IDhINjBsLTE2IDE0di0xNGgtMTRhOCA4IDAgMCAxLTgtOFY0NmE4IDggMCAwIDEgOC04eiIgZmlsbD0iI2ZmZiIvPgogIDxnIGZpbGw9IiM0ZjQ2ZTUiPgogICAgPGNpcmNsZSBjeD0iNDYiIGN5PSI1OCIgcj0iNSIvPgogICAgPGNpcmNsZSBjeD0iNjQiIGN5PSI1OCIgcj0iNSIvPgogICAgPGNpcmNsZSBjeD0iODIiIGN5PSI1OCIgcj0iNSIvPgogIDwvZz4KPC9zdmc+Cg==",
|
|
"page": {
|
|
"title": "Chat",
|
|
"titles": {
|
|
"zh": "对话",
|
|
"zh-TW": "對話",
|
|
"ja": "チャット"
|
|
},
|
|
"file": "page/index.html",
|
|
"icon": "assets/icon.svg",
|
|
"service": {
|
|
"port": 3477,
|
|
"option": "port"
|
|
}
|
|
},
|
|
"options": {
|
|
"port": 3477
|
|
}
|
|
},
|
|
"scripts": {
|
|
"start": "node serve.mjs"
|
|
},
|
|
"main": "./index.mjs",
|
|
"type": "module"
|
|
}
|