@lark-apaas/nestjs-mcp 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -265,6 +265,7 @@ interface Catalog {
|
|
|
265
265
|
version: number; // 当前为 3,平台响应结构版本
|
|
266
266
|
generatedAt: string; // 本次响应生成时间,UTC
|
|
267
267
|
endpoint: string; // /__innerapi__/mcp,相对应用根
|
|
268
|
+
serverInfo: { name: string }; // 与 MCP initialize 的 serverInfo.name 一致
|
|
268
269
|
tools: Tool[];
|
|
269
270
|
resources: Resource[];
|
|
270
271
|
prompts: Prompt[];
|
|
@@ -281,6 +282,8 @@ interface Catalog {
|
|
|
281
282
|
|
|
282
283
|
面板无需 MCP 握手;这是平台自定义 HTTP 接口,其外层结构不是 MCP 标准方法的返回值。接口不读写 `.spark/mcp/manifest.json`,每次读取 Skill 正文,返回 `Cache-Control: no-store`。空应用仍返回完整结构和空值;模块关闭为404,未就绪503,定义生成或文件读取失败500(RFC9457)。入口访问权限由平台负责。
|
|
283
284
|
|
|
285
|
+
`serverInfo.name` 优先使用 `PlatformModule.forRoot({ mcp: { serverName: 'expense-assistant' } })` 中的配置,未配置时使用 `SUDA_APP_ID`,再缺省为 `miaoda-app`。平台可用它生成客户端连接配置中的服务名称;平台目录目前只返回名称,不包含 `serverInfo.version`。
|
|
286
|
+
|
|
284
287
|
## 开发检查
|
|
285
288
|
|
|
286
289
|
应用启动时自动检查工具和资源定义,包括名称格式、重名及 UI 资源引用;定义错误会阻止启动。修改代码后,确认应用成功重启,再通过平台目录接口和标准 MCP 客户端验证当前能力。Skill 文件在读取时校验;类型检查、lint 与生产构建仍使用工程现有命令。
|
package/dist/index.cjs
CHANGED
|
@@ -887,6 +887,9 @@ async function buildManifest(input) {
|
|
|
887
887
|
version: MCP_MANIFEST_VERSION,
|
|
888
888
|
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
889
889
|
endpoint: MCP_ENDPOINT_PATH,
|
|
890
|
+
serverInfo: {
|
|
891
|
+
name: resolveServerInfo(input.options).name
|
|
892
|
+
},
|
|
890
893
|
tools: tools.sort((a2, b) => a2.name.localeCompare(b.name)),
|
|
891
894
|
resources: resources.sort((a2, b) => a2.uri.localeCompare(b.uri)),
|
|
892
895
|
prompts,
|