@tomradex/mcp 0.18.0 → 0.20.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/dist/index.d.ts CHANGED
@@ -45,6 +45,8 @@ export interface PortClash {
45
45
  port: number;
46
46
  /** The Tomrade holding it, when it answered; null for anything else. */
47
47
  heldBy: InstanceBadge | null;
48
+ /** Windows keeps it in a reserved range (Hyper-V, WSL, Docker): nothing holds it, nothing can listen there. */
49
+ reserved?: true;
48
50
  }
49
51
  interface SyncSummaryLike {
50
52
  state: string;
@@ -129,7 +131,13 @@ export declare class Mcp extends Service implements McpReader {
129
131
  /** Captured from the injected context: HTTP callbacks run after Cordis's injection frame has closed. */
130
132
  private tools;
131
133
  private bindings;
134
+ /** Hear a tokenless hook; the first answer with anything in it goes back to the agent. */
132
135
  private eventListeners;
136
+ /**
137
+ * Where each outside client's connection runs, from the headers its first request carried: an agent's MCP
138
+ * config can name the herdr pane it was started in, so its claim lands on that pane without hooks.
139
+ */
140
+ private places;
133
141
  private prompts;
134
142
  private instructions;
135
143
  constructor(ctx: Context, config: McpConfig);
@@ -148,8 +156,8 @@ export declare class Mcp extends Service implements McpReader {
148
156
  eventUrlFor(token: string): string | null;
149
157
  /** Where hooks with no token post — the ones a repository commits for every developer. */
150
158
  get eventUrl(): string | null;
151
- /** Hear tokenless hook events. Reversible: the listener goes with the plugin that registered it. */
152
- onEvent(listener: (payload: unknown) => void): () => void;
159
+ /** 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
+ onEvent(listener: (payload: unknown) => unknown): () => void;
153
161
  /** Offer a prompt to every session opened from now on. Reversible with the plugin that registered it. */
154
162
  prompt(prompt: McpPrompt): () => void;
155
163
  /**
package/dist/words.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  export declare const MCP_WORDS: import("@tomradex/domain").WordBook<{
2
2
  readonly portClash: "MCP on {{port}} · {{clashPort}} held by {{holder}}";
3
3
  readonly portClashTitle: "Agents configured for the usual port reach the other Tomrade and its data, not this one. Quit the other, or give this instance its own port with TOMRADE_MCP_PORT.";
4
+ readonly portReservedTitle: "Windows reserves this port (Hyper-V, WSL or Docker), so agents configured for it cannot reach this Tomrade. Give this instance a port outside the reserved ranges with TOMRADE_MCP_PORT.";
4
5
  readonly holderUnknown: "another program";
6
+ readonly holderReserved: "a range Windows reserves";
5
7
  readonly holderPackaged: "the installed Tomrade";
6
8
  readonly holderDev: "a development Tomrade";
7
9
  readonly holder: "{{kind}} {{version}} (pid {{pid}})";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomradex/mcp",
3
- "version": "0.18.0",
3
+ "version": "0.20.0",
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.18.0",
31
- "@tomradex/contributions": "0.18.0",
32
- "@tomradex/domain": "0.2.26",
33
- "@tomradex/ipc": "0.18.0",
34
- "@tomradex/tools": "0.18.0",
30
+ "@tomradex/contracts": "0.20.0",
31
+ "@tomradex/contributions": "0.20.0",
32
+ "@tomradex/domain": "0.2.28",
33
+ "@tomradex/ipc": "0.20.0",
34
+ "@tomradex/tools": "0.20.0",
35
35
  "cordis": "4.0.0-rc.8",
36
36
  "zod": "^4.4.3"
37
37
  },