@genclass/mcp 0.0.0-stage → 0.2.0
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/CHANGELOG.md +83 -0
- package/LICENSE +202 -0
- package/README.md +363 -2
- package/bin/genclass-mcp.mjs +21 -0
- package/dist/cli.d.ts +21 -0
- package/dist/cli.js +3097 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +736 -0
- package/dist/index.js +2941 -0
- package/dist/index.js.map +1 -0
- package/package.json +71 -4
- package/plugin/.claude-plugin/plugin.json +30 -0
- package/plugin/.mcp.json +11 -0
- package/plugin/README.md +64 -0
- package/plugin/hooks/hooks.json +15 -0
- package/plugin/mcp.json +13 -0
- package/plugin/plugin.json +22 -0
- package/plugin/skills/genclass/SKILL.md +64 -0
- package/server.json +24 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// genclass-mcp: the GenClass MCP server and its helper commands (see src/cli.ts).
|
|
3
|
+
import { runCli } from "../dist/cli.js";
|
|
4
|
+
|
|
5
|
+
runCli(process.argv.slice(2), {
|
|
6
|
+
cwd: process.cwd(),
|
|
7
|
+
env: process.env,
|
|
8
|
+
out: (s) => void process.stdout.write(s),
|
|
9
|
+
err: (s) => void process.stderr.write(s),
|
|
10
|
+
stdin: process.stdin,
|
|
11
|
+
stdout: process.stdout,
|
|
12
|
+
stderr: process.stderr,
|
|
13
|
+
}).then(
|
|
14
|
+
(code) => {
|
|
15
|
+
process.exitCode = code;
|
|
16
|
+
},
|
|
17
|
+
(e) => {
|
|
18
|
+
process.stderr.write(`[genclass-mcp] ${e instanceof Error ? e.stack ?? e.message : String(e)}\n`);
|
|
19
|
+
process.exitCode = 1;
|
|
20
|
+
},
|
|
21
|
+
);
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface CliIo {
|
|
2
|
+
cwd: string;
|
|
3
|
+
env: Record<string, string | undefined>;
|
|
4
|
+
out: (s: string) => void;
|
|
5
|
+
err: (s: string) => void;
|
|
6
|
+
}
|
|
7
|
+
declare function init(io: CliIo, hook: boolean): number;
|
|
8
|
+
/**
|
|
9
|
+
* The prompt hook: findings changed since the cursor stored in hook-cursor (state directory), tied to the bridge's
|
|
10
|
+
* epoch (a restarted bridge counts from 0 again). Silent when there is nothing new or no bridge.
|
|
11
|
+
*/
|
|
12
|
+
declare function hookCmd(io: CliIo): Promise<number>;
|
|
13
|
+
/** `config [client]`: one client's install block, or every client's. */
|
|
14
|
+
declare function configCmd(io: CliIo, id: string | undefined): number;
|
|
15
|
+
declare function runCli(argv: string[], io: CliIo & {
|
|
16
|
+
stdin: NodeJS.ReadableStream;
|
|
17
|
+
stdout: NodeJS.WritableStream;
|
|
18
|
+
stderr: NodeJS.WritableStream;
|
|
19
|
+
}): Promise<number>;
|
|
20
|
+
|
|
21
|
+
export { type CliIo, configCmd, hookCmd, init, runCli };
|