@tomradex/mcp 0.22.0 → 0.23.1
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/dist/index.d.ts +5 -0
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -86,6 +86,8 @@ export interface RunBinding {
|
|
|
86
86
|
/** A lifecycle event posted to `/sessions/<token>/event` — a coding agent's hook reporting it started, stopped, or is waiting. */
|
|
87
87
|
event?(payload: unknown): unknown | Promise<unknown>;
|
|
88
88
|
}
|
|
89
|
+
/** What `tomrade <name> …` (Tomrade's own command, in the person's terminal) asks, answered with JSON. */
|
|
90
|
+
export type CliHandler = (request: Record<string, unknown>) => unknown | Promise<unknown>;
|
|
89
91
|
/** Where a session stands: its project when it opened on `/mcp/<projectId>`, none on the bare endpoint. */
|
|
90
92
|
export interface McpScope {
|
|
91
93
|
projectId?: string;
|
|
@@ -140,6 +142,7 @@ export declare class Mcp extends Service implements McpReader {
|
|
|
140
142
|
private places;
|
|
141
143
|
private prompts;
|
|
142
144
|
private instructions;
|
|
145
|
+
private cliHandlers;
|
|
143
146
|
constructor(ctx: Context, config: McpConfig);
|
|
144
147
|
[Service.init](): Promise<() => Promise<void>>;
|
|
145
148
|
/** This instance, as `GET /instance` tells another one. */
|
|
@@ -158,6 +161,8 @@ export declare class Mcp extends Service implements McpReader {
|
|
|
158
161
|
get eventUrl(): string | null;
|
|
159
162
|
/** Hear tokenless hook events, and answer them (the first answer with anything in it is the agent's). Reversible: the listener goes with the plugin that registered it. */
|
|
160
163
|
onEvent(listener: (payload: unknown) => unknown): () => void;
|
|
164
|
+
/** Answer `tomrade <name> …` from the person's own terminal: `POST /cli/<name>` on this port, JSON both ways. Reversible with the plugin that registered it. */
|
|
165
|
+
cli(name: string, handler: CliHandler): () => void;
|
|
161
166
|
/** Offer a prompt to every session opened from now on. Reversible with the plugin that registered it. */
|
|
162
167
|
prompt(prompt: McpPrompt): () => void;
|
|
163
168
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomradex/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "Haoyuan Tang",
|
|
6
6
|
"engines": {
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@tomradex/contracts": "0.
|
|
31
|
-
"@tomradex/contributions": "0.
|
|
32
|
-
"@tomradex/domain": "0.2.
|
|
33
|
-
"@tomradex/ipc": "0.
|
|
34
|
-
"@tomradex/tools": "0.
|
|
30
|
+
"@tomradex/contracts": "0.23.1",
|
|
31
|
+
"@tomradex/contributions": "0.23.1",
|
|
32
|
+
"@tomradex/domain": "0.2.30",
|
|
33
|
+
"@tomradex/ipc": "0.23.1",
|
|
34
|
+
"@tomradex/tools": "0.23.1",
|
|
35
35
|
"cordis": "4.0.0-rc.8",
|
|
36
36
|
"zod": "^4.4.3"
|
|
37
37
|
},
|