@stone-js/mcp-dev 0.8.8 → 0.8.10
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 +60 -12
- package/dist/McpDevServer.d.ts +1 -1
- package/dist/appContext.d.ts +60 -0
- package/dist/cli.d.ts +53 -0
- package/dist/cli.js +915 -0
- package/dist/commands/McpCommand.d.ts +1 -1
- package/dist/declarations.d.ts +16 -1
- package/dist/index.d.ts +11 -13
- package/dist/index.js +179 -109
- package/dist/introspection.d.ts +21 -2
- package/dist/knowledge.d.ts +1 -1
- package/dist/llms.d.ts +1 -1
- package/dist/mcpJson.d.ts +8 -2
- package/dist/tools.d.ts +1 -1
- package/package.json +15 -12
- package/dist/browser/decorators/McpDev.d.ts +0 -19
- package/dist/browser/options/McpDevBlueprint.d.ts +0 -18
- package/dist/browser.js +0 -37
- package/dist/decorators/McpDev.d.ts +0 -24
- package/dist/middleware/BlueprintMiddleware.d.ts +0 -17
- package/dist/options/McpDevBlueprint.d.ts +0 -34
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { McpDevOptions } from '../../declarations';
|
|
2
|
-
import { McpDevBlueprint } from '../../options/McpDevBlueprint';
|
|
3
|
-
/**
|
|
4
|
-
* Browser stub of the MCP dev blueprint.
|
|
5
|
-
*
|
|
6
|
-
* It carries the config bucket but wires **no** blueprint middleware, so importing it into a browser
|
|
7
|
-
* bundle never pulls the Node-only `stone mcp` command, its server (`@modelcontextprotocol/sdk`,
|
|
8
|
-
* stdio) or the filesystem. The `stone mcp` command is a development, Node-only concern; in the
|
|
9
|
-
* browser this keeps the app compiling and inert.
|
|
10
|
-
*/
|
|
11
|
-
export declare const mcpDevBlueprint: McpDevBlueprint;
|
|
12
|
-
/**
|
|
13
|
-
* Browser stub of `defineMcpDev`: returns the config bucket with no Node wiring.
|
|
14
|
-
*
|
|
15
|
-
* @param options - The MCP dev options.
|
|
16
|
-
* @returns The (inert) blueprint.
|
|
17
|
-
*/
|
|
18
|
-
export declare function defineMcpDev(options?: McpDevOptions): McpDevBlueprint;
|
package/dist/browser.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { classDecoratorLegacyWrapper } from '@stone-js/core';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Browser stub of `@McpDev()`: a no-op.
|
|
5
|
-
*
|
|
6
|
-
* The dev MCP server (`stone mcp`) is a Node-only, development concern. Stubbing the decorator for
|
|
7
|
-
* the browser keeps an isomorphic app compiling and inert there, without dragging the CLI command,
|
|
8
|
-
* the MCP SDK server, or `node:fs` into the browser bundle (which would break a SPA). The real
|
|
9
|
-
* decorator lives in the Node build.
|
|
10
|
-
*
|
|
11
|
-
* @param _options - Ignored in the browser.
|
|
12
|
-
* @returns A no-op class decorator.
|
|
13
|
-
*/
|
|
14
|
-
const McpDev = (_options = {}) => {
|
|
15
|
-
return classDecoratorLegacyWrapper((_target, _context) => { });
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Browser stub of the MCP dev blueprint.
|
|
20
|
-
*
|
|
21
|
-
* It carries the config bucket but wires **no** blueprint middleware, so importing it into a browser
|
|
22
|
-
* bundle never pulls the Node-only `stone mcp` command, its server (`@modelcontextprotocol/sdk`,
|
|
23
|
-
* stdio) or the filesystem. The `stone mcp` command is a development, Node-only concern; in the
|
|
24
|
-
* browser this keeps the app compiling and inert.
|
|
25
|
-
*/
|
|
26
|
-
const mcpDevBlueprint = { stone: { mcpDev: {} } };
|
|
27
|
-
/**
|
|
28
|
-
* Browser stub of `defineMcpDev`: returns the config bucket with no Node wiring.
|
|
29
|
-
*
|
|
30
|
-
* @param options - The MCP dev options.
|
|
31
|
-
* @returns The (inert) blueprint.
|
|
32
|
-
*/
|
|
33
|
-
function defineMcpDev(options = {}) {
|
|
34
|
-
return { stone: { mcpDev: options } };
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export { McpDev, defineMcpDev, mcpDevBlueprint };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { McpDevOptions } from '../declarations';
|
|
2
|
-
import { ClassType } from '@stone-js/core';
|
|
3
|
-
/**
|
|
4
|
-
* Options for the `McpDev` decorator.
|
|
5
|
-
*/
|
|
6
|
-
export interface McpDevDecoratorOptions extends McpDevOptions {
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* A class decorator that adds the `stone mcp` command to your app.
|
|
10
|
-
*
|
|
11
|
-
* Declarative counterpart of registering {@link mcpDevBlueprint}: apply it to your app class to
|
|
12
|
-
* expose the framework-knowledge tools (plus any you declare) to a coding agent over MCP.
|
|
13
|
-
*
|
|
14
|
-
* @param options - The MCP dev options (server name, instructions, your tools).
|
|
15
|
-
* @returns A class decorator.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```typescript
|
|
19
|
-
* @McpDev({ tools: [myTool] })
|
|
20
|
-
* @StoneApp({ name: 'my-app' })
|
|
21
|
-
* export class Application {}
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
export declare const McpDev: <T extends ClassType = ClassType>(options?: McpDevDecoratorOptions) => ClassDecorator;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { BlueprintContext, IBlueprint, ClassType, MetaMiddleware, NextMiddleware } from '@stone-js/core';
|
|
2
|
-
/**
|
|
3
|
-
* Middleware that registers the `mcp` command when the app runs on the Node CLI adapter.
|
|
4
|
-
*
|
|
5
|
-
* It mirrors the router's command registration: contribute a `MetaCommandHandler` to
|
|
6
|
-
* `stone.adapter.commands` so the CLI (itself a Stone.js app on the Node CLI adapter) discovers
|
|
7
|
-
* `stone mcp` by introspection, no hard-coding.
|
|
8
|
-
*
|
|
9
|
-
* @param context - The blueprint context.
|
|
10
|
-
* @param next - The next pipeline function.
|
|
11
|
-
* @returns The updated blueprint.
|
|
12
|
-
*/
|
|
13
|
-
export declare const SetMcpCommandsMiddleware: (context: BlueprintContext<IBlueprint, ClassType>, next: NextMiddleware<BlueprintContext<IBlueprint, ClassType>, IBlueprint>) => Promise<IBlueprint>;
|
|
14
|
-
/**
|
|
15
|
-
* The blueprint middleware contributed by the MCP dev module.
|
|
16
|
-
*/
|
|
17
|
-
export declare const metaMcpDevBlueprintMiddleware: Array<MetaMiddleware<BlueprintContext<IBlueprint, ClassType>, IBlueprint>>;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { McpDevOptions } from '../declarations';
|
|
2
|
-
import { AppConfig, StoneBlueprint } from '@stone-js/core';
|
|
3
|
-
/**
|
|
4
|
-
* MCP dev configuration bucket (`stone.mcpDev`).
|
|
5
|
-
*/
|
|
6
|
-
export interface McpDevConfig extends McpDevOptions {
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Application config augmented with the MCP dev bucket.
|
|
10
|
-
*/
|
|
11
|
-
export interface McpDevAppConfig extends Partial<AppConfig> {
|
|
12
|
-
mcpDev: Partial<McpDevConfig>;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Blueprint for the MCP dev module.
|
|
16
|
-
*/
|
|
17
|
-
export interface McpDevBlueprint extends StoneBlueprint {
|
|
18
|
-
stone: McpDevAppConfig;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Opt-in blueprint: import and register it to add the `stone mcp` command.
|
|
22
|
-
*
|
|
23
|
-
* It contributes a blueprint middleware that registers the command on the Node CLI adapter. Add
|
|
24
|
-
* your own tools and the server name/instructions under `stone.mcpDev` (or via `@McpDev()` /
|
|
25
|
-
* `defineMcpDev()`).
|
|
26
|
-
*/
|
|
27
|
-
export declare const mcpDevBlueprint: McpDevBlueprint;
|
|
28
|
-
/**
|
|
29
|
-
* Imperative helper: build an MCP dev blueprint with the given options.
|
|
30
|
-
*
|
|
31
|
-
* @param options - The MCP dev options (server name, instructions, your tools, report tools).
|
|
32
|
-
* @returns The blueprint to register in your app.
|
|
33
|
-
*/
|
|
34
|
-
export declare function defineMcpDev(options?: McpDevOptions): McpDevBlueprint;
|