@nexrall/code-core 1.4.66 → 1.4.67

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.
Files changed (75) hide show
  1. package/dist/agent/agentTypes.d.ts +6 -2
  2. package/dist/agent/agentTypes.d.ts.map +1 -1
  3. package/dist/agent/agentTypes.js +13 -4
  4. package/dist/agent/askOnce.d.ts +12 -0
  5. package/dist/agent/askOnce.d.ts.map +1 -0
  6. package/dist/agent/askOnce.js +41 -0
  7. package/dist/agent/compaction.d.ts +244 -0
  8. package/dist/agent/compaction.d.ts.map +1 -0
  9. package/dist/agent/compaction.js +976 -0
  10. package/dist/agent/fileLocks.d.ts +34 -0
  11. package/dist/agent/fileLocks.d.ts.map +1 -0
  12. package/dist/agent/fileLocks.js +114 -0
  13. package/dist/agent/hooks.d.ts +324 -0
  14. package/dist/agent/hooks.d.ts.map +1 -0
  15. package/dist/agent/hooks.js +1228 -0
  16. package/dist/agent/iterationPolicy.d.ts +121 -0
  17. package/dist/agent/iterationPolicy.d.ts.map +1 -0
  18. package/dist/agent/iterationPolicy.js +297 -0
  19. package/dist/agent/lifecycleHost.d.ts +55 -0
  20. package/dist/agent/lifecycleHost.d.ts.map +1 -0
  21. package/dist/agent/lifecycleHost.js +294 -0
  22. package/dist/agent/loop.d.ts +11 -491
  23. package/dist/agent/loop.d.ts.map +1 -1
  24. package/dist/agent/loop.js +417 -3031
  25. package/dist/agent/planMode.d.ts.map +1 -1
  26. package/dist/agent/planMode.js +1 -0
  27. package/dist/agent/sharedTasks.d.ts +7 -0
  28. package/dist/agent/sharedTasks.d.ts.map +1 -1
  29. package/dist/agent/sharedTasks.js +16 -0
  30. package/dist/agent/subAgentBudget.d.ts +65 -0
  31. package/dist/agent/subAgentBudget.d.ts.map +1 -0
  32. package/dist/agent/subAgentBudget.js +269 -0
  33. package/dist/agent/subTask.d.ts +6 -0
  34. package/dist/agent/subTask.d.ts.map +1 -0
  35. package/dist/agent/subTask.js +713 -0
  36. package/dist/agent/subTaskSupport.d.ts +156 -0
  37. package/dist/agent/subTaskSupport.d.ts.map +1 -0
  38. package/dist/agent/subTaskSupport.js +409 -0
  39. package/dist/agent/toolDescriptions.d.ts +3 -0
  40. package/dist/agent/toolDescriptions.d.ts.map +1 -0
  41. package/dist/agent/toolDescriptions.js +116 -0
  42. package/dist/api/client.d.ts.map +1 -1
  43. package/dist/api/client.js +17 -0
  44. package/dist/index.d.ts +3 -0
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +3 -0
  47. package/dist/mcp/client.d.ts +104 -0
  48. package/dist/mcp/client.d.ts.map +1 -1
  49. package/dist/mcp/client.js +136 -2
  50. package/dist/mcp/httpClient.d.ts +17 -1
  51. package/dist/mcp/httpClient.d.ts.map +1 -1
  52. package/dist/mcp/httpClient.js +120 -19
  53. package/dist/mcp/manager.d.ts +77 -2
  54. package/dist/mcp/manager.d.ts.map +1 -1
  55. package/dist/mcp/manager.js +275 -9
  56. package/dist/mcp/sseClient.d.ts +7 -1
  57. package/dist/mcp/sseClient.d.ts.map +1 -1
  58. package/dist/mcp/sseClient.js +45 -1
  59. package/dist/mcp/stats.d.ts +41 -0
  60. package/dist/mcp/stats.d.ts.map +1 -0
  61. package/dist/mcp/stats.js +108 -0
  62. package/dist/permissions/destructive.d.ts +2 -0
  63. package/dist/permissions/destructive.d.ts.map +1 -1
  64. package/dist/permissions/destructive.js +6 -2
  65. package/dist/permissions/destructiveTokens.d.ts +5 -0
  66. package/dist/permissions/destructiveTokens.d.ts.map +1 -1
  67. package/dist/permissions/destructiveTokens.js +9 -3
  68. package/dist/permissions/modePolicy.d.ts.map +1 -1
  69. package/dist/permissions/modePolicy.js +5 -2
  70. package/dist/permissions/rules.d.ts +4 -1
  71. package/dist/permissions/rules.d.ts.map +1 -1
  72. package/dist/permissions/rules.js +29 -0
  73. package/dist/types.d.ts +45 -1
  74. package/dist/types.d.ts.map +1 -1
  75. package/package.json +1 -1
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.McpHttpClient = exports.McpOAuthRequiredError = void 0;
7
7
  const node_fetch_1 = __importDefault(require("node-fetch"));
8
+ const client_1 = require("./client");
8
9
  const REQUEST_TIMEOUT_MS = 30000;
9
10
  /** Thrown when a remote MCP server replies 401 — the caller should run the OAuth flow. */
10
11
  class McpOAuthRequiredError extends Error {
@@ -23,23 +24,52 @@ class McpHttpClient {
23
24
  this._nextId = 1;
24
25
  this._tools = [];
25
26
  this._sessionId = null;
27
+ this._elicitationHandler = null;
26
28
  this.name = name;
27
29
  }
28
30
  get tools() {
29
31
  return this._tools;
30
32
  }
33
+ setElicitationHandler(handler) { this._elicitationHandler = handler; }
31
34
  async connect() {
32
35
  if (!this.config.url)
33
36
  throw new Error(`MCP server "${this.name}" has no url (http/sse transport requires one).`);
34
37
  await this._rpc('initialize', {
35
38
  protocolVersion: '2024-11-05',
36
- capabilities: {},
39
+ capabilities: (0, client_1.elicitationCapability)(this.config.bareElicitationCapability),
37
40
  clientInfo: { name: 'nexrall-code', version: '1.0' },
38
41
  });
39
42
  await this._notify('notifications/initialized');
40
43
  const res = (await this._rpc('tools/list', {}));
41
44
  this._tools = res?.tools ?? [];
42
45
  }
46
+ async listResources() {
47
+ try {
48
+ const res = (await this._rpc('resources/list', {}));
49
+ return Array.isArray(res?.resources) ? res.resources : [];
50
+ }
51
+ catch {
52
+ return []; /* server has no resources capability */
53
+ }
54
+ }
55
+ async readResource(uri) {
56
+ return (0, client_1.flattenResourceContents)(await this._rpc('resources/read', { uri }));
57
+ }
58
+ async listPrompts() {
59
+ try {
60
+ const res = (await this._rpc('prompts/list', {}));
61
+ return Array.isArray(res?.prompts) ? res.prompts : [];
62
+ }
63
+ catch {
64
+ return []; /* server has no prompts capability */
65
+ }
66
+ }
67
+ async getPrompt(name, args) {
68
+ const params = { name };
69
+ if (Object.keys(args).length)
70
+ params.arguments = args;
71
+ return (0, client_1.flattenPromptMessages)(await this._rpc('prompts/get', params));
72
+ }
43
73
  async callTool(name, args) {
44
74
  const result = (await this._rpc('tools/call', { name, arguments: args }));
45
75
  if (!result)
@@ -108,35 +138,106 @@ class McpHttpClient {
108
138
  throw new Error(`MCP HTTP ${resp.status} ${resp.statusText}${body ? `: ${body.slice(0, 200)}` : ''}`);
109
139
  }
110
140
  const contentType = resp.headers.get('content-type') ?? '';
141
+ if (contentType.includes('text/event-stream'))
142
+ return await this._consumeSse(resp, id);
111
143
  const text = await resp.text();
112
144
  if (!text.trim())
113
145
  return null; // e.g. 202 ack for a notification
114
- const consume = (msg) => {
146
+ const msg = JSON.parse(text);
147
+ if (msg.error)
148
+ throw new Error(`MCP error ${msg.error.code}: ${msg.error.message}`);
149
+ return msg.result ?? null;
150
+ }
151
+ /**
152
+ * Read an SSE reply frame by frame. A server request (elicitation) is answered on the
153
+ * spot: the server WAITS for that answer before it sends our own result, so buffering
154
+ * the whole stream first would deadlock until the request timeout. As soon as our id
155
+ * arrives we stop and cancel the body (the stream may stay open for the session).
156
+ * Falls back to a buffered parse when the runtime hands us no readable body.
157
+ */
158
+ async _consumeSse(resp, id) {
159
+ const state = { have: false };
160
+ const handle = (msg) => {
161
+ if (typeof msg.method === 'string' && msg.id != null) {
162
+ this._answerServerRequest(msg.id, msg.method, msg.params);
163
+ return;
164
+ }
165
+ if (msg.id !== id)
166
+ return;
115
167
  if (msg.error)
116
- throw new Error(`MCP error ${msg.error.code}: ${msg.error.message}`);
117
- return msg.result ?? null;
168
+ state.failure = new Error(`MCP error ${msg.error.code}: ${msg.error.message}`);
169
+ else {
170
+ state.result = msg.result ?? null;
171
+ state.have = true;
172
+ }
118
173
  };
119
- if (contentType.includes('text/event-stream')) {
120
- // Walk SSE frames; return the JSON-RPC message matching our request id.
121
- for (const frame of text.split(/\r?\n\r?\n/)) {
122
- const dataLines = frame
123
- .split(/\r?\n/)
124
- .filter((l) => l.startsWith('data:'))
125
- .map((l) => l.slice(5).trim());
174
+ const body = resp.body;
175
+ if (body && typeof body[Symbol.asyncIterator] === 'function') {
176
+ let buf = '';
177
+ const dataLines = [];
178
+ const flush = () => {
126
179
  if (!dataLines.length)
127
- continue;
180
+ return;
181
+ const data = dataLines.join('\n');
182
+ dataLines.length = 0;
128
183
  try {
129
- const msg = JSON.parse(dataLines.join('\n'));
130
- if (msg.id === id)
131
- return consume(msg);
184
+ handle(JSON.parse(data));
132
185
  }
133
- catch {
134
- /* skip non-JSON frames (comments, pings) */
186
+ catch { /* comment/ping frame */ }
187
+ };
188
+ try {
189
+ for await (const chunk of body) {
190
+ buf += Buffer.from(chunk).toString('utf-8');
191
+ let nl;
192
+ while ((nl = buf.indexOf('\n')) !== -1) {
193
+ let line = buf.slice(0, nl);
194
+ buf = buf.slice(nl + 1);
195
+ if (line.endsWith('\r'))
196
+ line = line.slice(0, -1);
197
+ if (!line) {
198
+ flush();
199
+ if (state.have || state.failure)
200
+ break;
201
+ continue;
202
+ }
203
+ if (line.startsWith('data:'))
204
+ dataLines.push(line.slice(5).replace(/^ /, ''));
205
+ }
206
+ if (state.have || state.failure)
207
+ break;
135
208
  }
209
+ flush();
210
+ }
211
+ catch { /* a torn-down stream is not itself an error; the checks below decide */ }
212
+ try {
213
+ await body.cancel?.();
214
+ }
215
+ catch { /* best-effort */ }
216
+ }
217
+ else {
218
+ const text = await resp.text();
219
+ for (const frame of text.split(/\r?\n\r?\n/)) {
220
+ const data = frame.split(/\r?\n/).filter((l) => l.startsWith('data:')).map((l) => l.slice(5).trim()).join('\n');
221
+ if (!data)
222
+ continue;
223
+ try {
224
+ handle(JSON.parse(data));
225
+ }
226
+ catch { /* skip non-JSON frames */ }
136
227
  }
137
- throw new Error('No matching JSON-RPC response found in SSE stream');
138
228
  }
139
- return consume(JSON.parse(text));
229
+ if (state.failure)
230
+ throw state.failure;
231
+ if (!state.have)
232
+ throw new Error('No matching JSON-RPC response found in SSE stream');
233
+ return state.result;
234
+ }
235
+ /** Reply to a server→client request. Fire-and-forget: the in-flight reader must not block. */
236
+ _answerServerRequest(id, method, params) {
237
+ void (async () => {
238
+ const reply = await (0, client_1.serverRequestReply)(this.name, this._elicitationHandler, method, params);
239
+ await this._post({ jsonrpc: '2.0', id, ...reply });
240
+ })().catch(() => { });
140
241
  }
141
242
  }
142
243
  exports.McpHttpClient = McpHttpClient;
@@ -1,6 +1,15 @@
1
- import { McpServerConfig, McpToolDefinition } from './client';
1
+ import { McpServerConfig, McpToolDefinition, McpResource, McpPrompt } from './client';
2
+ import type { McpElicitationHandler } from './client';
3
+ import { ToolStats } from './stats';
2
4
  export interface McpConfig {
3
5
  mcpServers: Record<string, McpServerConfig>;
6
+ /**
7
+ * Names the user has switched off (spec §42). Stored as a list rather than a flag
8
+ * on the server so it also covers servers this file does not define — a plugin's
9
+ * mcp.json, for instance, which the user cannot edit but can perfectly well want
10
+ * to silence. Disabled servers are still listed by /mcp; they just never connect.
11
+ */
12
+ disabledServers?: string[];
4
13
  }
5
14
  export interface AnthropicTool {
6
15
  name: string;
@@ -14,9 +23,20 @@ export interface AnthropicTool {
14
23
  export declare class McpManager {
15
24
  private _clients;
16
25
  private _toolMap;
26
+ private _promptCache;
17
27
  private _configs;
18
28
  private _errors;
19
29
  private _needsAuth;
30
+ private _disabled;
31
+ /** Per-tool call counts and timings — the "is it slow or broken?" answer (spec §42). */
32
+ readonly stats: ToolStats;
33
+ private _elicitationHandler;
34
+ /**
35
+ * Route every server's elicitation (`elicitation/create`) through this handler —
36
+ * including servers that connect later, which is why it is also re-applied in
37
+ * connectAll/enable. Pass null to restore auto-decline.
38
+ */
39
+ setElicitationHandler(handler: McpElicitationHandler | null): void;
20
40
  /** Pick the transport for a server config: stdio (command), Streamable HTTP, or legacy SSE. */
21
41
  private static makeClient;
22
42
  /** Load config from ~/.nexrall/mcp.json, <workDir>/.nexrall/mcp.json, and plugin mcp.json files. */
@@ -45,28 +65,83 @@ export declare class McpManager {
45
65
  callTool(prefixedName: string, input: Record<string, unknown>, abortSignal?: {
46
66
  aborted: boolean;
47
67
  }): Promise<string | null>;
68
+ /** Resources across connected, enabled servers. One server failing never hides the others. */
69
+ listResources(server?: string): Promise<Array<McpResource & {
70
+ server: string;
71
+ }>>;
72
+ /** Read one resource. Throws a clear error for an unknown server; bounded by the tool timeout. */
73
+ readResource(server: string, uri: string): Promise<string>;
74
+ /**
75
+ * Prompt metadata for one connected server. Fetched once per connection and
76
+ * cached — including an empty list (server has no prompts capability), so the
77
+ * `/` menu does not re-ask a server on every keystroke; reconnecting clears
78
+ * the entry. Returns [] for a server that is not connected.
79
+ */
80
+ promptsFor(server: string): Promise<McpPrompt[]>;
81
+ /** Prompts across connected, enabled servers, tagged with the server they came from. */
82
+ listPrompts(server?: string): Promise<Array<McpPrompt & {
83
+ server: string;
84
+ }>>;
85
+ /**
86
+ * Expand one prompt to text. Positional values map, in order, onto the
87
+ * arguments the server declared in prompts/list — the same positional form
88
+ * Claude Code accepts (`/mcp__server__prompt first second`). Validation runs
89
+ * here, before the request, so mistakes read as sentences instead of raw
90
+ * JSON-RPC errors; the request itself is bounded by the same 60s timeout the
91
+ * resource reader uses.
92
+ */
93
+ getPrompt(server: string, name: string, values?: string[]): Promise<string>;
48
94
  /** True if this tool name belongs to an MCP server. */
49
95
  isMcpTool(name: string): boolean;
50
96
  get serverNames(): string[];
51
97
  get toolCount(): number;
52
98
  private static transportOf;
53
- /** Returns per-server status for UI display, including failed / auth-required connections. */
99
+ /** Returns per-server status for UI display, including failed / auth-required / disabled. */
54
100
  getStatus(): Array<{
55
101
  name: string;
56
102
  transport: 'stdio' | 'http' | 'sse';
57
103
  tools: McpToolDefinition[];
58
104
  connected: boolean;
105
+ disabled: boolean;
59
106
  error?: string;
60
107
  needsAuth?: boolean;
61
108
  }>;
62
109
  /** The WWW-Authenticate challenge a server returned on 401 (empty if none/unknown). */
63
110
  authChallenge(name: string): string;
111
+ /** True when the user has switched this server off for the session. */
112
+ isDisabled(name: string): boolean;
113
+ /**
114
+ * Switch a server off in THIS session: drop its client and forget its tool map, so
115
+ * the next turn's tool list no longer offers it. The caller persists the choice
116
+ * (McpManager.setServerDisabled) — this method deliberately does not touch disk.
117
+ */
118
+ disable(name: string): boolean;
119
+ /**
120
+ * Switch a server back on and connect it, without a restart. Resolves to an error
121
+ * message when the connection fails, so the caller can print it and leave the
122
+ * server listed as broken instead of silently reporting success.
123
+ */
124
+ enable(name: string): Promise<string | null>;
125
+ /** Disconnect one server for the session (its config stays; `enable` brings it back). */
126
+ disconnect(name: string): boolean;
127
+ /** Forgets one server's client and tools, leaving its config and status alone. */
128
+ private _dropClient;
64
129
  /** Path to an mcp.json for the given scope. */
65
130
  static configPath(workDir: string, scope: 'project' | 'user'): string;
66
131
  private static readConfigFile;
67
132
  private static writeConfigFile;
68
133
  /** Add (or overwrite) a server in the given scope's mcp.json. */
69
134
  static addServer(workDir: string, name: string, server: McpServerConfig, scope?: 'project' | 'user'): void;
135
+ /**
136
+ * Switch a server off/on in the config FILE, so the choice survives a restart.
137
+ * Written to the project scope even when the server came from elsewhere (a plugin
138
+ * or the user file), because the project is the only scope this session is sure it
139
+ * may edit — and `disabledServers` is a name list, so it works for all three.
140
+ * Returns the file that was written.
141
+ */
142
+ static setServerDisabled(workDir: string, name: string, disabled: boolean, scope?: 'project' | 'user'): string;
143
+ /** Where a server's definition comes from, for messages that have to be honest about it. */
144
+ static serverScope(workDir: string, name: string): 'project' | 'user' | 'plugin' | 'none';
70
145
  /** Remove a server from whichever scope(s) define it. Returns true if anything was removed. */
71
146
  static removeServer(workDir: string, name: string): boolean;
72
147
  disconnectAll(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/mcp/manager.ts"],"names":[],"mappings":"AAGA,OAAO,EAAa,eAAe,EAAE,iBAAiB,EAAgB,MAAM,UAAU,CAAC;AAOvF,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CAC7C;AAGD,MAAM,W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