capable-kit 0.0.1-alpha.0 → 0.0.1-alpha.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 +58 -0
- package/dist/ai-sdk.d.mts +2 -2
- package/dist/ai-sdk.mjs +1 -1
- package/dist/app.d.mts +1 -1
- package/dist/app.mjs +1 -1
- package/dist/bin.mjs +396 -48
- package/dist/bin.mjs.map +1 -1
- package/dist/cli.d.mts +27 -2
- package/dist/cli.mjs +2 -2
- package/dist/core.d.mts +3 -3
- package/dist/core.mjs +1 -1
- package/dist/eve.d.mts +1 -1
- package/dist/eve.mjs +1 -1
- package/dist/http.d.mts +1 -1
- package/dist/http.mjs +1 -1
- package/dist/{index-DLcYNpfo.d.mts → index-BB5ogMv-.d.mts} +17 -14
- package/dist/{index-C9ZThFPN.d.mts → index-BxJhwhKm.d.mts} +2 -2
- package/dist/{index-BuXwkN8G.d.mts → index-CThfifn8.d.mts} +4 -4
- package/dist/{index-u9ZOETR5.d.mts → index-Dp-D73pf.d.mts} +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/mcp.d.mts +2 -2
- package/dist/mcp.mjs +1 -139
- package/dist/mount--YHrgRHJ.mjs +140 -0
- package/dist/mount--YHrgRHJ.mjs.map +1 -0
- package/dist/runtime-support.d.mts +19 -0
- package/dist/runtime-support.mjs +567 -0
- package/dist/runtime-support.mjs.map +1 -0
- package/dist/server.d.mts +1 -1
- package/dist/server.mjs +1 -81
- package/dist/{src-CT4fbWqb.mjs → src-3UaBqI8H.mjs} +26 -16
- package/dist/src-3UaBqI8H.mjs.map +1 -0
- package/dist/{src-DX-_J6l2.mjs → src-B53ZbNtC.mjs} +6 -7
- package/dist/src-B53ZbNtC.mjs.map +1 -0
- package/dist/{src-CvWOGyGW.mjs → src-BjBxOv7x.mjs} +148 -96
- package/dist/src-BjBxOv7x.mjs.map +1 -0
- package/dist/src-DpSA-hBO.mjs +82 -0
- package/dist/src-DpSA-hBO.mjs.map +1 -0
- package/dist/{src-DlSJtEhv.mjs → src-XRJ9hgYX.mjs} +7 -7
- package/dist/src-XRJ9hgYX.mjs.map +1 -0
- package/dist/{subscription-CBnnIU42.d.mts → subscription-McaLyHM2.d.mts} +2 -2
- package/package.json +59 -17
- package/src/ai-sdk.ts +1 -0
- package/src/app.ts +1 -0
- package/src/bin.ts +4 -0
- package/src/cli.ts +1 -0
- package/src/core.ts +1 -0
- package/src/eve.ts +1 -0
- package/src/http.ts +1 -0
- package/src/index.test.ts +56 -0
- package/src/index.ts +38 -0
- package/src/mcp.ts +2 -0
- package/src/runtime-support.ts +1 -0
- package/src/server.ts +1 -0
- package/dist/mcp.mjs.map +0 -1
- package/dist/server.mjs.map +0 -1
- package/dist/src-CT4fbWqb.mjs.map +0 -1
- package/dist/src-CvWOGyGW.mjs.map +0 -1
- package/dist/src-DX-_J6l2.mjs.map +0 -1
- package/dist/src-DlSJtEhv.mjs.map +0 -1
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { a as TransportError, c as getAppRuntime, o as createApp } from "./src-3UaBqI8H.mjs";
|
|
2
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
3
|
+
import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
|
|
4
|
+
import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
5
|
+
//#region packages/mcp/src/index.ts
|
|
6
|
+
async function createMcp(app) {
|
|
7
|
+
const runtime = getAppRuntime(app);
|
|
8
|
+
const tools = flatten((await runtime.manifest()).capabilities).filter((capability) => capability.meta.mcp !== false).map((capability) => {
|
|
9
|
+
const meta = capability.meta.mcp;
|
|
10
|
+
return Object.freeze({
|
|
11
|
+
name: meta?.name ?? capability.path.join("__"),
|
|
12
|
+
...capability.title ? { title: capability.title } : {},
|
|
13
|
+
...capability.description ? { description: capability.description } : {},
|
|
14
|
+
inputSchema: capability.input ?? {
|
|
15
|
+
type: "object",
|
|
16
|
+
properties: {},
|
|
17
|
+
additionalProperties: false
|
|
18
|
+
},
|
|
19
|
+
...capability.output ? { outputSchema: mcpOutputSchema(capability.output) } : {},
|
|
20
|
+
annotations: {
|
|
21
|
+
readOnlyHint: capability.effect === "read",
|
|
22
|
+
destructiveHint: capability.effect === "destructive"
|
|
23
|
+
},
|
|
24
|
+
call(input, options) {
|
|
25
|
+
return runtime.call({
|
|
26
|
+
id: capability.id,
|
|
27
|
+
input,
|
|
28
|
+
...options?.signal ? { signal: options.signal } : {}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
const names = /* @__PURE__ */ new Set();
|
|
34
|
+
for (const tool of tools) {
|
|
35
|
+
if (names.has(tool.name)) throw new Error(`Duplicate MCP tool name "${tool.name}"`);
|
|
36
|
+
names.add(tool.name);
|
|
37
|
+
}
|
|
38
|
+
return tools;
|
|
39
|
+
}
|
|
40
|
+
function mcpOutputSchema(schema) {
|
|
41
|
+
if (schema.type === "object") return schema;
|
|
42
|
+
return {
|
|
43
|
+
type: "object",
|
|
44
|
+
properties: { value: schema },
|
|
45
|
+
required: ["value"],
|
|
46
|
+
additionalProperties: false
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function flatten(nodes) {
|
|
50
|
+
return nodes.flatMap((node) => node.type === "capability" ? [node] : flatten(node.children));
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region packages/mcp/src/mount.ts
|
|
54
|
+
function mcp(options = {}) {
|
|
55
|
+
const path = normalizePath(options.path ?? "/mcp");
|
|
56
|
+
return {
|
|
57
|
+
kind: "capable.server.mount",
|
|
58
|
+
compile(app, context) {
|
|
59
|
+
return {
|
|
60
|
+
name: "mcp",
|
|
61
|
+
async fetch(request) {
|
|
62
|
+
if (new URL(request.url).pathname !== path) return void 0;
|
|
63
|
+
const server = createMcpServer(await createMcp(createApp(app, context ? { context: () => context({ request }) } : void 0)), {
|
|
64
|
+
name: options.name ?? app.name ?? "capable",
|
|
65
|
+
version: options.version ?? app.version ?? "0.0.0"
|
|
66
|
+
});
|
|
67
|
+
const transport = new WebStandardStreamableHTTPServerTransport({ enableJsonResponse: true });
|
|
68
|
+
await server.connect(transport);
|
|
69
|
+
try {
|
|
70
|
+
return await transport.handleRequest(request);
|
|
71
|
+
} finally {
|
|
72
|
+
await transport.close();
|
|
73
|
+
await server.close();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function createMcpServer(tools, info) {
|
|
81
|
+
const server = new Server(info, { capabilities: { tools: {} } });
|
|
82
|
+
server.setRequestHandler(ListToolsRequestSchema, () => ({ tools: tools.map(toProtocolTool) }));
|
|
83
|
+
server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
|
|
84
|
+
const tool = tools.find(({ name }) => name === request.params.name);
|
|
85
|
+
if (!tool) return toolError(`Unknown tool "${request.params.name}"`);
|
|
86
|
+
try {
|
|
87
|
+
const result = await tool.call(request.params.arguments ?? {}, { signal: extra.signal });
|
|
88
|
+
return {
|
|
89
|
+
content: [{
|
|
90
|
+
type: "text",
|
|
91
|
+
text: result.markdown ?? stringify(result.output)
|
|
92
|
+
}],
|
|
93
|
+
structuredContent: isRecord(result.output) ? result.output : { value: result.output }
|
|
94
|
+
};
|
|
95
|
+
} catch (error) {
|
|
96
|
+
if (!(error instanceof TransportError)) throw error;
|
|
97
|
+
return toolError(error.message, {
|
|
98
|
+
code: error.code,
|
|
99
|
+
status: error.status,
|
|
100
|
+
data: error.data
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
return server;
|
|
105
|
+
}
|
|
106
|
+
function toProtocolTool(tool) {
|
|
107
|
+
return {
|
|
108
|
+
name: tool.name,
|
|
109
|
+
...tool.title ? { title: tool.title } : {},
|
|
110
|
+
...tool.description ? { description: tool.description } : {},
|
|
111
|
+
inputSchema: tool.inputSchema,
|
|
112
|
+
...tool.outputSchema ? { outputSchema: tool.outputSchema } : {},
|
|
113
|
+
annotations: tool.annotations
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function toolError(message, details) {
|
|
117
|
+
return {
|
|
118
|
+
isError: true,
|
|
119
|
+
content: [{
|
|
120
|
+
type: "text",
|
|
121
|
+
text: details ? JSON.stringify({
|
|
122
|
+
message,
|
|
123
|
+
...details
|
|
124
|
+
}) : message
|
|
125
|
+
}]
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
function stringify(value) {
|
|
129
|
+
return typeof value === "string" ? value : JSON.stringify(value) ?? String(value);
|
|
130
|
+
}
|
|
131
|
+
function normalizePath(value) {
|
|
132
|
+
return `/${value.split("/").filter(Boolean).join("/")}`;
|
|
133
|
+
}
|
|
134
|
+
function isRecord(value) {
|
|
135
|
+
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
136
|
+
}
|
|
137
|
+
//#endregion
|
|
138
|
+
export { createMcp as n, mcp as t };
|
|
139
|
+
|
|
140
|
+
//# sourceMappingURL=mount--YHrgRHJ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mount--YHrgRHJ.mjs","names":[],"sources":["../../mcp/src/index.ts","../../mcp/src/mount.ts"],"sourcesContent":["import type { CapabilityMetaRegistry } from \"@capable/core\";\nimport {\n getAppRuntime,\n type AnyApp,\n type JsonSchema,\n type ManifestNode,\n type ManifestCapability,\n type CapabilityResult,\n} from \"@capable/app\";\n\nexport type McpCapabilityMeta =\n | false\n | {\n readonly name?: string;\n };\n\ndeclare module \"@capable/core\" {\n interface CapabilityMetaRegistry {\n readonly mcp?: McpCapabilityMeta;\n }\n}\n\nexport type McpTool = {\n readonly name: string;\n readonly title?: string;\n readonly description?: string;\n readonly inputSchema: JsonSchema;\n readonly outputSchema?: JsonSchema;\n readonly annotations: {\n readonly readOnlyHint: boolean;\n readonly destructiveHint: boolean;\n };\n call(\n input: unknown,\n options?: { readonly signal?: AbortSignal },\n ): Promise<CapabilityResult>;\n};\n\nexport async function createMcp(\n app: AnyApp,\n): Promise<readonly McpTool[]> {\n const runtime = getAppRuntime(app);\n const manifest = await runtime.manifest();\n const tools = flatten(manifest.capabilities)\n .filter((capability) => capability.meta.mcp !== false)\n .map((capability) => {\n const meta = capability.meta.mcp as Exclude<McpCapabilityMeta, false> | undefined;\n return Object.freeze({\n name: meta?.name ?? capability.path.join(\"__\"),\n ...(capability.title ? { title: capability.title } : {}),\n ...(capability.description ? { description: capability.description } : {}),\n inputSchema: capability.input ?? {\n type: \"object\",\n properties: {},\n additionalProperties: false,\n },\n ...(capability.output\n ? { outputSchema: mcpOutputSchema(capability.output) }\n : {}),\n annotations: {\n readOnlyHint: capability.effect === \"read\",\n destructiveHint: capability.effect === \"destructive\",\n },\n call(input: unknown, options?: { readonly signal?: AbortSignal }) {\n return runtime.call({\n id: capability.id,\n input,\n ...(options?.signal ? { signal: options.signal } : {}),\n });\n },\n });\n });\n const names = new Set<string>();\n for (const tool of tools) {\n if (names.has(tool.name)) {\n throw new Error(`Duplicate MCP tool name \"${tool.name}\"`);\n }\n names.add(tool.name);\n }\n return tools;\n}\n\nfunction mcpOutputSchema(schema: JsonSchema): JsonSchema {\n if (schema.type === \"object\") return schema;\n return {\n type: \"object\",\n properties: { value: schema },\n required: [\"value\"],\n additionalProperties: false,\n };\n}\n\nfunction flatten(nodes: readonly ManifestNode[]): readonly ManifestCapability[] {\n return nodes.flatMap((node) =>\n node.type === \"capability\" ? [node] : flatten(node.children)\n );\n}\n","import type { ServerMount } from \"@capable/server\";\nimport { createApp, TransportError } from \"@capable/app\";\nimport { Server } from \"@modelcontextprotocol/sdk/server/index.js\";\nimport { WebStandardStreamableHTTPServerTransport } from \"@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js\";\nimport {\n CallToolRequestSchema,\n type CallToolResult,\n ListToolsRequestSchema,\n type Tool,\n} from \"@modelcontextprotocol/sdk/types.js\";\nimport { createMcp, type McpTool } from \"./index.ts\";\n\nexport function mcp<TContext = any>(\n options: {\n readonly path?: string;\n readonly name?: string;\n readonly version?: string;\n } = {},\n): ServerMount<TContext> {\n const path = normalizePath(options.path ?? \"/mcp\");\n return {\n kind: \"capable.server.mount\",\n compile(app, context) {\n return {\n name: \"mcp\",\n async fetch(request) {\n if (new URL(request.url).pathname !== path) return undefined;\n const executable = createApp(\n app,\n context\n ? { context: () => context({ request }) }\n : undefined as never,\n );\n const tools = await createMcp(executable);\n const server = createMcpServer(tools, {\n name: options.name ?? app.name ?? \"capable\",\n version: options.version ?? app.version ?? \"0.0.0\",\n });\n const transport = new WebStandardStreamableHTTPServerTransport({\n enableJsonResponse: true,\n });\n await server.connect(transport);\n try {\n return await transport.handleRequest(request);\n } finally {\n await transport.close();\n await server.close();\n }\n },\n };\n },\n };\n}\n\nfunction createMcpServer(\n tools: readonly McpTool[],\n info: { readonly name: string; readonly version: string },\n): Server {\n const server = new Server(info, {\n capabilities: { tools: {} },\n });\n server.setRequestHandler(ListToolsRequestSchema, () => ({\n tools: tools.map(toProtocolTool),\n }));\n server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {\n const tool = tools.find(({ name }) => name === request.params.name);\n if (!tool) {\n return toolError(`Unknown tool \"${request.params.name}\"`);\n }\n try {\n const result = await tool.call(request.params.arguments ?? {}, {\n signal: extra.signal,\n });\n return {\n content: [{\n type: \"text\",\n text: result.markdown ?? stringify(result.output),\n }],\n structuredContent: isRecord(result.output)\n ? result.output\n : { value: result.output },\n } satisfies CallToolResult;\n } catch (error) {\n if (!(error instanceof TransportError)) throw error;\n return toolError(error.message, {\n code: error.code,\n status: error.status,\n data: error.data,\n });\n }\n });\n return server;\n}\n\nfunction toProtocolTool(tool: McpTool): Tool {\n return {\n name: tool.name,\n ...(tool.title ? { title: tool.title } : {}),\n ...(tool.description ? { description: tool.description } : {}),\n inputSchema: tool.inputSchema as Tool[\"inputSchema\"],\n ...(tool.outputSchema\n ? { outputSchema: tool.outputSchema as Tool[\"outputSchema\"] }\n : {}),\n annotations: tool.annotations,\n };\n}\n\nfunction toolError(\n message: string,\n details?: Record<string, unknown>,\n): CallToolResult {\n return {\n isError: true,\n content: [{\n type: \"text\",\n text: details ? JSON.stringify({ message, ...details }) : message,\n }],\n };\n}\n\nfunction stringify(value: unknown): string {\n return typeof value === \"string\"\n ? value\n : JSON.stringify(value) ?? String(value);\n}\n\nfunction normalizePath(value: string): string {\n return `/${value.split(\"/\").filter(Boolean).join(\"/\")}`;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return Boolean(value && typeof value === \"object\" && !Array.isArray(value));\n}\n"],"mappings":";;;;;AAsCA,eAAsB,UACpB,KAC6B;CAC7B,MAAM,UAAU,cAAc,GAAG;CAEjC,MAAM,QAAQ,SAAQ,MADC,QAAQ,SAAS,EAAA,CACT,YAAY,CAAC,CACzC,QAAQ,eAAe,WAAW,KAAK,QAAQ,KAAK,CAAC,CACrD,KAAK,eAAe;EACnB,MAAM,OAAO,WAAW,KAAK;EAC7B,OAAO,OAAO,OAAO;GACnB,MAAM,MAAM,QAAQ,WAAW,KAAK,KAAK,IAAI;GAC7C,GAAI,WAAW,QAAQ,EAAE,OAAO,WAAW,MAAM,IAAI,CAAC;GACtD,GAAI,WAAW,cAAc,EAAE,aAAa,WAAW,YAAY,IAAI,CAAC;GACxE,aAAa,WAAW,SAAS;IAC/B,MAAM;IACN,YAAY,CAAC;IACb,sBAAsB;GACxB;GACA,GAAI,WAAW,SACX,EAAE,cAAc,gBAAgB,WAAW,MAAM,EAAE,IACnD,CAAC;GACL,aAAa;IACX,cAAc,WAAW,WAAW;IACpC,iBAAiB,WAAW,WAAW;GACzC;GACA,KAAK,OAAgB,SAA6C;IAChE,OAAO,QAAQ,KAAK;KAClB,IAAI,WAAW;KACf;KACA,GAAI,SAAS,SAAS,EAAE,QAAQ,QAAQ,OAAO,IAAI,CAAC;IACtD,CAAC;GACH;EACF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,IAAI;EAC5D,CAAC;CACH;AACF;AAEA,SAAS,UAAU,OAAwB;CACzC,OAAO,OAAO,UAAU,WACpB,QACA,KAAK,UAAU,KAAK,KAAK,OAAO,KAAK;AAC3C;AAEA,SAAS,cAAc,OAAuB;CAC5C,OAAO,IAAI,MAAM,MAAM,GAAG,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;AACtD;AAEA,SAAS,SAAS,OAAkD;CAClE,OAAO,QAAQ,SAAS,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK,CAAC;AAC5E"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { t as CapableServer } from "./index-CThfifn8.mjs";
|
|
2
|
+
//#region packages/nitro-host/src/runtime-support.d.ts
|
|
3
|
+
type CapableNitroEntryOptions = {
|
|
4
|
+
/** The default export of the project's `capable.app.*`. */
|
|
5
|
+
readonly definition: unknown;
|
|
6
|
+
/** The default export of `capable.server.*`, when the project has one. */
|
|
7
|
+
readonly server?: {
|
|
8
|
+
readonly fetch: (request: Request) => unknown;
|
|
9
|
+
} | undefined;
|
|
10
|
+
readonly dev: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Build the server Nitro hosts. The generated entry in the project supplies the
|
|
14
|
+
* project's own modules, so nothing here depends on how they were resolved.
|
|
15
|
+
*/
|
|
16
|
+
declare function createCapableNitroEntry(options: CapableNitroEntryOptions): CapableServer;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { CapableNitroEntryOptions, createCapableNitroEntry };
|
|
19
|
+
//# sourceMappingURL=runtime-support.d.mts.map
|