@xn-intenton-z2a/agentic-lib 7.4.7 → 7.4.9
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/{src → .github}/agents/agent-apply-fix.md +14 -0
- package/{src → .github}/agents/agent-director.md +14 -0
- package/{src → .github}/agents/agent-discovery.md +12 -0
- package/{src → .github}/agents/agent-discussion-bot.md +13 -0
- package/{src → .github}/agents/agent-issue-resolution.md +16 -0
- package/{src → .github}/agents/agent-iterate.md +12 -0
- package/{src → .github}/agents/agent-maintain-features.md +12 -0
- package/{src → .github}/agents/agent-maintain-library.md +11 -0
- package/{src → .github}/agents/agent-ready-issue.md +4 -0
- package/{src → .github}/agents/agent-review-issue.md +12 -0
- package/{src → .github}/agents/agent-supervisor.md +13 -0
- package/.github/workflows/agentic-lib-bot.yml +1 -1
- package/.github/workflows/agentic-lib-test.yml +4 -2
- package/.github/workflows/agentic-lib-workflow.yml +79 -35
- package/README.md +5 -7
- package/agentic-lib.toml +16 -38
- package/bin/agentic-lib.js +59 -61
- package/package.json +3 -4
- package/src/actions/agentic-step/action.yml +2 -2
- package/src/actions/agentic-step/copilot.js +0 -5
- package/src/actions/agentic-step/index.js +8 -1
- package/src/actions/agentic-step/logging.js +14 -2
- package/src/actions/agentic-step/tasks/direct.js +86 -65
- package/src/actions/agentic-step/tasks/discussions.js +198 -264
- package/src/actions/agentic-step/tasks/enhance-issue.js +84 -33
- package/src/actions/agentic-step/tasks/fix-code.js +111 -57
- package/src/actions/agentic-step/tasks/maintain-features.js +69 -52
- package/src/actions/agentic-step/tasks/maintain-library.js +57 -19
- package/src/actions/agentic-step/tasks/resolve-issue.js +43 -18
- package/src/actions/agentic-step/tasks/review-issue.js +117 -117
- package/src/actions/agentic-step/tasks/supervise.js +140 -151
- package/src/actions/agentic-step/tasks/transform.js +106 -258
- package/src/copilot/agents.js +2 -2
- package/src/copilot/config.js +4 -20
- package/src/copilot/{hybrid-session.js → copilot-session.js} +39 -7
- package/src/copilot/github-tools.js +514 -0
- package/src/copilot/guards.js +1 -1
- package/src/copilot/session.js +0 -141
- package/src/copilot/tools.js +4 -0
- package/src/iterate.js +1 -1
- package/src/scripts/accept-release.sh +4 -4
- package/src/scripts/push-to-logs.sh +1 -1
- package/src/seeds/zero-SCREENSHOT_INDEX.png +0 -0
- package/src/seeds/zero-package.json +1 -1
- package/src/agents/agentic-lib.yml +0 -66
- package/src/copilot/context.js +0 -457
- package/src/mcp/server.js +0 -830
package/src/mcp/server.js
DELETED
|
@@ -1,830 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// SPDX-License-Identifier: GPL-3.0-only
|
|
3
|
-
// Copyright (C) 2025-2026 Polycode Limited
|
|
4
|
-
// src/mcp/server.js — MCP server for agentic-lib
|
|
5
|
-
//
|
|
6
|
-
// Exposes agentic-lib capabilities as MCP tools for Claude Code and other MCP clients.
|
|
7
|
-
// Usage: npx @xn-intenton-z2a/agentic-lib mcp
|
|
8
|
-
|
|
9
|
-
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
10
|
-
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
11
|
-
import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
12
|
-
import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "fs";
|
|
13
|
-
import { execSync } from "child_process";
|
|
14
|
-
import { resolve, dirname, join } from "path";
|
|
15
|
-
import { fileURLToPath } from "url";
|
|
16
|
-
import { tmpdir, homedir } from "os";
|
|
17
|
-
|
|
18
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
19
|
-
const pkgRoot = resolve(__dirname, "../..");
|
|
20
|
-
const binPath = resolve(pkgRoot, "bin/agentic-lib.js");
|
|
21
|
-
const seedsDir = resolve(pkgRoot, "src/seeds/missions");
|
|
22
|
-
|
|
23
|
-
// Workspace base directory
|
|
24
|
-
const workspacesBase =
|
|
25
|
-
process.env.AGENTIC_LIB_WORKSPACES || join(homedir(), ".agentic-lib", "workspaces");
|
|
26
|
-
|
|
27
|
-
// ─── Workspace Helpers ──────────────────────────────────────────────
|
|
28
|
-
|
|
29
|
-
function ensureWorkspacesDir() {
|
|
30
|
-
if (!existsSync(workspacesBase)) {
|
|
31
|
-
mkdirSync(workspacesBase, { recursive: true });
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function workspacePath(id) {
|
|
36
|
-
return join(workspacesBase, id);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function metadataPath(wsPath) {
|
|
40
|
-
return join(wsPath, ".agentic-lib-workspace.json");
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function readMetadata(wsPath) {
|
|
44
|
-
const mp = metadataPath(wsPath);
|
|
45
|
-
if (!existsSync(mp)) return null;
|
|
46
|
-
return JSON.parse(readFileSync(mp, "utf8"));
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function writeMetadata(wsPath, metadata) {
|
|
50
|
-
writeFileSync(metadataPath(wsPath), JSON.stringify(metadata, null, 2));
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function listWorkspaces() {
|
|
54
|
-
ensureWorkspacesDir();
|
|
55
|
-
const entries = readdirSync(workspacesBase, { withFileTypes: true });
|
|
56
|
-
return entries
|
|
57
|
-
.filter((e) => e.isDirectory())
|
|
58
|
-
.map((e) => {
|
|
59
|
-
const wsPath = workspacePath(e.name);
|
|
60
|
-
const meta = readMetadata(wsPath);
|
|
61
|
-
return meta || { id: e.name, status: "unknown" };
|
|
62
|
-
})
|
|
63
|
-
.filter((m) => m.status !== "unknown");
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function runCli(args, wsPath, timeoutMs = 300000) {
|
|
67
|
-
const cmd = `node ${binPath} ${args}`;
|
|
68
|
-
try {
|
|
69
|
-
const stdout = execSync(cmd, {
|
|
70
|
-
cwd: wsPath || pkgRoot,
|
|
71
|
-
encoding: "utf8",
|
|
72
|
-
timeout: timeoutMs,
|
|
73
|
-
env: { ...process.env },
|
|
74
|
-
stdio: ["pipe", "pipe", "pipe"],
|
|
75
|
-
});
|
|
76
|
-
return { success: true, output: stdout };
|
|
77
|
-
} catch (err) {
|
|
78
|
-
return {
|
|
79
|
-
success: false,
|
|
80
|
-
output: `STDOUT:\n${err.stdout || ""}\nSTDERR:\n${err.stderr || ""}`,
|
|
81
|
-
exitCode: err.status || 1,
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function runInWorkspace(command, wsPath, timeoutMs = 120000) {
|
|
87
|
-
try {
|
|
88
|
-
const stdout = execSync(command, {
|
|
89
|
-
cwd: wsPath,
|
|
90
|
-
encoding: "utf8",
|
|
91
|
-
timeout: timeoutMs,
|
|
92
|
-
env: { ...process.env },
|
|
93
|
-
stdio: ["pipe", "pipe", "pipe"],
|
|
94
|
-
});
|
|
95
|
-
return { success: true, output: stdout, exitCode: 0 };
|
|
96
|
-
} catch (err) {
|
|
97
|
-
return {
|
|
98
|
-
success: false,
|
|
99
|
-
output: `STDOUT:\n${err.stdout || ""}\nSTDERR:\n${err.stderr || ""}`,
|
|
100
|
-
exitCode: err.status || 1,
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// ─── Tool Definitions ───────────────────────────────────────────────
|
|
106
|
-
|
|
107
|
-
const TOOLS = [
|
|
108
|
-
{
|
|
109
|
-
name: "list_missions",
|
|
110
|
-
description:
|
|
111
|
-
"List available mission seeds that can be used to create workspaces. Each mission is a MISSION.md template describing what the autonomous code should build.",
|
|
112
|
-
inputSchema: { type: "object", properties: {}, required: [] },
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
name: "workspace_create",
|
|
116
|
-
description:
|
|
117
|
-
"Create a new workspace from a mission seed. Runs init --purge, npm install, and sets up the Copilot SDK. Returns the workspace ID and path.",
|
|
118
|
-
inputSchema: {
|
|
119
|
-
type: "object",
|
|
120
|
-
properties: {
|
|
121
|
-
mission: {
|
|
122
|
-
type: "string",
|
|
123
|
-
description: "Mission seed name (e.g. '6-kyu-understand-hamming-distance', '7-kyu-understand-fizz-buzz')",
|
|
124
|
-
},
|
|
125
|
-
profile: {
|
|
126
|
-
type: "string",
|
|
127
|
-
enum: ["min", "recommended", "max"],
|
|
128
|
-
description: "Tuning profile: min (fast/cheap), recommended (balanced), max (thorough). Default: min",
|
|
129
|
-
},
|
|
130
|
-
model: {
|
|
131
|
-
type: "string",
|
|
132
|
-
description: "LLM model override (e.g. 'gpt-5-mini', 'claude-sonnet-4'). Uses profile default if omitted.",
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
required: ["mission"],
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
name: "workspace_list",
|
|
140
|
-
description: "List all active workspaces with their current status, mission, profile, and iteration count.",
|
|
141
|
-
inputSchema: { type: "object", properties: {}, required: [] },
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
name: "workspace_status",
|
|
145
|
-
description:
|
|
146
|
-
"Get detailed status of a workspace: mission content, features, test results, iteration history, and current configuration.",
|
|
147
|
-
inputSchema: {
|
|
148
|
-
type: "object",
|
|
149
|
-
properties: {
|
|
150
|
-
workspace: { type: "string", description: "Workspace ID" },
|
|
151
|
-
},
|
|
152
|
-
required: ["workspace"],
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
name: "workspace_destroy",
|
|
157
|
-
description: "Delete a workspace and all its contents.",
|
|
158
|
-
inputSchema: {
|
|
159
|
-
type: "object",
|
|
160
|
-
properties: {
|
|
161
|
-
workspace: { type: "string", description: "Workspace ID" },
|
|
162
|
-
},
|
|
163
|
-
required: ["workspace"],
|
|
164
|
-
},
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
name: "iterate",
|
|
168
|
-
description:
|
|
169
|
-
"Run N cycles of the autonomous development loop (maintain-features -> transform -> test -> fix-code). Stops early if tests pass for 2 consecutive iterations or if no files change for 2 consecutive iterations. Returns iteration-by-iteration results.",
|
|
170
|
-
inputSchema: {
|
|
171
|
-
type: "object",
|
|
172
|
-
properties: {
|
|
173
|
-
workspace: { type: "string", description: "Workspace ID" },
|
|
174
|
-
cycles: {
|
|
175
|
-
type: "number",
|
|
176
|
-
description: "Maximum number of iterations to run. Default: 3",
|
|
177
|
-
},
|
|
178
|
-
steps: {
|
|
179
|
-
type: "array",
|
|
180
|
-
items: { type: "string", enum: ["maintain-features", "transform", "fix-code"] },
|
|
181
|
-
description:
|
|
182
|
-
"Which steps to run per cycle. Default: ['maintain-features', 'transform', 'fix-code']. Use ['transform'] for transform-only cycles.",
|
|
183
|
-
},
|
|
184
|
-
},
|
|
185
|
-
required: ["workspace"],
|
|
186
|
-
},
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
name: "run_tests",
|
|
190
|
-
description: "Run tests in a workspace and return pass/fail status with output.",
|
|
191
|
-
inputSchema: {
|
|
192
|
-
type: "object",
|
|
193
|
-
properties: {
|
|
194
|
-
workspace: { type: "string", description: "Workspace ID" },
|
|
195
|
-
},
|
|
196
|
-
required: ["workspace"],
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
name: "config_get",
|
|
201
|
-
description: "Read the agentic-lib.toml configuration from a workspace.",
|
|
202
|
-
inputSchema: {
|
|
203
|
-
type: "object",
|
|
204
|
-
properties: {
|
|
205
|
-
workspace: { type: "string", description: "Workspace ID" },
|
|
206
|
-
},
|
|
207
|
-
required: ["workspace"],
|
|
208
|
-
},
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
name: "config_set",
|
|
212
|
-
description:
|
|
213
|
-
"Update configuration in a workspace. Can change the tuning profile, model, or individual tuning knobs. Changes take effect on the next iteration.",
|
|
214
|
-
inputSchema: {
|
|
215
|
-
type: "object",
|
|
216
|
-
properties: {
|
|
217
|
-
workspace: { type: "string", description: "Workspace ID" },
|
|
218
|
-
profile: {
|
|
219
|
-
type: "string",
|
|
220
|
-
enum: ["min", "recommended", "max"],
|
|
221
|
-
description: "Tuning profile to switch to",
|
|
222
|
-
},
|
|
223
|
-
model: {
|
|
224
|
-
type: "string",
|
|
225
|
-
description: "LLM model to use (e.g. 'gpt-5-mini', 'claude-sonnet-4', 'gpt-4.1')",
|
|
226
|
-
},
|
|
227
|
-
overrides: {
|
|
228
|
-
type: "object",
|
|
229
|
-
description:
|
|
230
|
-
"Individual tuning knob overrides. Keys: reasoning-effort, infinite-sessions, max-feature-files, max-source-files, max-source-chars, max-issues, max-summary-chars, max-discussion-comments",
|
|
231
|
-
},
|
|
232
|
-
},
|
|
233
|
-
required: ["workspace"],
|
|
234
|
-
},
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
name: "prepare_iteration",
|
|
238
|
-
description:
|
|
239
|
-
"Gather full context for a workspace iteration: mission, features, source code, test results, and transformation instructions. Use this when YOU (Claude/the MCP client) are the LLM — read the returned context, write code via workspace_write_file, then verify with run_tests. No Copilot token needed.",
|
|
240
|
-
inputSchema: {
|
|
241
|
-
type: "object",
|
|
242
|
-
properties: {
|
|
243
|
-
workspace: { type: "string", description: "Workspace ID" },
|
|
244
|
-
focus: {
|
|
245
|
-
type: "string",
|
|
246
|
-
enum: ["transform", "maintain-features", "fix-code"],
|
|
247
|
-
description: "What kind of iteration to prepare context for. Default: transform",
|
|
248
|
-
},
|
|
249
|
-
},
|
|
250
|
-
required: ["workspace"],
|
|
251
|
-
},
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
name: "workspace_read_file",
|
|
255
|
-
description: "Read a file from a workspace. Use with prepare_iteration when Claude is the LLM.",
|
|
256
|
-
inputSchema: {
|
|
257
|
-
type: "object",
|
|
258
|
-
properties: {
|
|
259
|
-
workspace: { type: "string", description: "Workspace ID" },
|
|
260
|
-
path: { type: "string", description: "Relative path within the workspace (e.g. 'src/lib/main.js')" },
|
|
261
|
-
},
|
|
262
|
-
required: ["workspace", "path"],
|
|
263
|
-
},
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
name: "workspace_write_file",
|
|
267
|
-
description:
|
|
268
|
-
"Write a file to a workspace. Parent directories are created automatically. Use with prepare_iteration when Claude is the LLM.",
|
|
269
|
-
inputSchema: {
|
|
270
|
-
type: "object",
|
|
271
|
-
properties: {
|
|
272
|
-
workspace: { type: "string", description: "Workspace ID" },
|
|
273
|
-
path: { type: "string", description: "Relative path within the workspace (e.g. 'src/lib/main.js')" },
|
|
274
|
-
content: { type: "string", description: "File content to write" },
|
|
275
|
-
},
|
|
276
|
-
required: ["workspace", "path", "content"],
|
|
277
|
-
},
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
name: "workspace_exec",
|
|
281
|
-
description:
|
|
282
|
-
"Run a shell command in a workspace. Use for builds, custom test commands, or inspecting workspace state. Git write commands are blocked.",
|
|
283
|
-
inputSchema: {
|
|
284
|
-
type: "object",
|
|
285
|
-
properties: {
|
|
286
|
-
workspace: { type: "string", description: "Workspace ID" },
|
|
287
|
-
command: { type: "string", description: "Shell command to execute" },
|
|
288
|
-
},
|
|
289
|
-
required: ["workspace", "command"],
|
|
290
|
-
},
|
|
291
|
-
},
|
|
292
|
-
];
|
|
293
|
-
|
|
294
|
-
// ─── Tool Handlers ──────────────────────────────────────────────────
|
|
295
|
-
|
|
296
|
-
async function handleListMissions() {
|
|
297
|
-
if (!existsSync(seedsDir)) {
|
|
298
|
-
return text("No missions directory found.");
|
|
299
|
-
}
|
|
300
|
-
const missions = readdirSync(seedsDir)
|
|
301
|
-
.filter((f) => f.endsWith(".md"))
|
|
302
|
-
.map((f) => {
|
|
303
|
-
const name = f.replace(/\.md$/, "");
|
|
304
|
-
const content = readFileSync(join(seedsDir, f), "utf8");
|
|
305
|
-
const firstLine = content.split("\n").find((l) => l.trim()) || "";
|
|
306
|
-
return `- **${name}**: ${firstLine.replace(/^#\s*/, "")}`;
|
|
307
|
-
});
|
|
308
|
-
return text(`Available missions (${missions.length}):\n\n${missions.join("\n")}`);
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
async function handleWorkspaceCreate({ mission, profile = "min", model }) {
|
|
312
|
-
// Validate mission exists
|
|
313
|
-
const missionFile = join(seedsDir, `${mission}.md`);
|
|
314
|
-
if (!existsSync(missionFile)) {
|
|
315
|
-
const available = readdirSync(seedsDir)
|
|
316
|
-
.filter((f) => f.endsWith(".md"))
|
|
317
|
-
.map((f) => f.replace(/\.md$/, ""));
|
|
318
|
-
return text(`Unknown mission "${mission}". Available: ${available.join(", ")}`);
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
// Create workspace
|
|
322
|
-
ensureWorkspacesDir();
|
|
323
|
-
const timestamp = new Date().toISOString().replace(/[:.]/g, "").substring(0, 15);
|
|
324
|
-
const id = `${mission}-${timestamp}`;
|
|
325
|
-
const wsPath = workspacePath(id);
|
|
326
|
-
mkdirSync(wsPath, { recursive: true });
|
|
327
|
-
|
|
328
|
-
// Initialize git repo (required for init)
|
|
329
|
-
runInWorkspace("git init", wsPath);
|
|
330
|
-
|
|
331
|
-
// Run init --purge
|
|
332
|
-
const initResult = runCli(`init --purge --mission ${mission} --target ${wsPath}`, wsPath);
|
|
333
|
-
if (!initResult.success) {
|
|
334
|
-
return text(`Failed to initialize workspace:\n${initResult.output}`);
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
// Update config with profile and model
|
|
338
|
-
const tomlPath = join(wsPath, "agentic-lib.toml");
|
|
339
|
-
if (existsSync(tomlPath)) {
|
|
340
|
-
let toml = readFileSync(tomlPath, "utf8");
|
|
341
|
-
toml = toml.replace(/^profile\s*=\s*"[^"]*"/m, `profile = "${profile}"`);
|
|
342
|
-
if (model) {
|
|
343
|
-
toml = toml.replace(/^model\s*=\s*"[^"]*"/m, `model = "${model}"`);
|
|
344
|
-
}
|
|
345
|
-
writeFileSync(tomlPath, toml);
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
// npm install
|
|
349
|
-
const npmResult = runInWorkspace("npm install --ignore-scripts 2>&1", wsPath, 120000);
|
|
350
|
-
|
|
351
|
-
// Install Copilot SDK in action dir
|
|
352
|
-
const actionDir = join(wsPath, ".github/agentic-lib/actions/agentic-step");
|
|
353
|
-
let sdkResult = { success: true, output: "skipped" };
|
|
354
|
-
if (existsSync(join(actionDir, "package.json"))) {
|
|
355
|
-
sdkResult = runInWorkspace(`cd "${actionDir}" && npm ci 2>&1`, wsPath, 120000);
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
// Write metadata
|
|
359
|
-
const metadata = {
|
|
360
|
-
id,
|
|
361
|
-
mission,
|
|
362
|
-
created: new Date().toISOString(),
|
|
363
|
-
profile,
|
|
364
|
-
model: model || profileDefaultModel(profile),
|
|
365
|
-
iterations: [],
|
|
366
|
-
status: "ready",
|
|
367
|
-
path: wsPath,
|
|
368
|
-
};
|
|
369
|
-
writeMetadata(wsPath, metadata);
|
|
370
|
-
|
|
371
|
-
const summary = [
|
|
372
|
-
`Workspace created: **${id}**`,
|
|
373
|
-
`Path: ${wsPath}`,
|
|
374
|
-
`Mission: ${mission}`,
|
|
375
|
-
`Profile: ${profile}`,
|
|
376
|
-
`Model: ${metadata.model}`,
|
|
377
|
-
"",
|
|
378
|
-
`Init: ${initResult.success ? "OK" : "FAILED"}`,
|
|
379
|
-
`npm install: ${npmResult.success ? "OK" : "FAILED"}`,
|
|
380
|
-
`Copilot SDK: ${sdkResult.success ? "OK" : "FAILED"}`,
|
|
381
|
-
"",
|
|
382
|
-
"Ready for `iterate` or `run_tests`.",
|
|
383
|
-
];
|
|
384
|
-
return text(summary.join("\n"));
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
async function handleWorkspaceList() {
|
|
388
|
-
const workspaces = listWorkspaces();
|
|
389
|
-
if (workspaces.length === 0) {
|
|
390
|
-
return text("No workspaces found. Use `workspace_create` to create one.");
|
|
391
|
-
}
|
|
392
|
-
const lines = workspaces.map((w) => {
|
|
393
|
-
const iters = w.iterations?.length || 0;
|
|
394
|
-
return `- **${w.id}** | mission: ${w.mission} | profile: ${w.profile} | model: ${w.model} | iterations: ${iters} | status: ${w.status}`;
|
|
395
|
-
});
|
|
396
|
-
return text(`Workspaces (${workspaces.length}):\n\n${lines.join("\n")}`);
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
async function handleWorkspaceStatus({ workspace }) {
|
|
400
|
-
const wsPath = workspacePath(workspace);
|
|
401
|
-
const meta = readMetadata(wsPath);
|
|
402
|
-
if (!meta) {
|
|
403
|
-
return text(`Workspace "${workspace}" not found.`);
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
const sections = [`# Workspace: ${meta.id}`, ""];
|
|
407
|
-
|
|
408
|
-
// Mission
|
|
409
|
-
const missionPath = join(wsPath, "MISSION.md");
|
|
410
|
-
if (existsSync(missionPath)) {
|
|
411
|
-
const mission = readFileSync(missionPath, "utf8");
|
|
412
|
-
sections.push("## Mission", mission.substring(0, 1000), "");
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
// Config
|
|
416
|
-
sections.push("## Configuration");
|
|
417
|
-
sections.push(`- Profile: ${meta.profile}`);
|
|
418
|
-
sections.push(`- Model: ${meta.model}`);
|
|
419
|
-
sections.push(`- Status: ${meta.status}`);
|
|
420
|
-
sections.push("");
|
|
421
|
-
|
|
422
|
-
// Features
|
|
423
|
-
const featuresDir = join(wsPath, "features");
|
|
424
|
-
if (existsSync(featuresDir)) {
|
|
425
|
-
const features = readdirSync(featuresDir).filter((f) => f.endsWith(".md"));
|
|
426
|
-
sections.push(`## Features (${features.length})`);
|
|
427
|
-
for (const f of features.slice(0, 10)) {
|
|
428
|
-
const content = readFileSync(join(featuresDir, f), "utf8");
|
|
429
|
-
sections.push(`### ${f}`, content.substring(0, 300), "");
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
// Source files
|
|
434
|
-
const srcDir = join(wsPath, "src/lib");
|
|
435
|
-
if (existsSync(srcDir)) {
|
|
436
|
-
const srcFiles = readdirSync(srcDir, { recursive: true }).filter((f) =>
|
|
437
|
-
String(f).match(/\.(js|ts)$/),
|
|
438
|
-
);
|
|
439
|
-
sections.push(`## Source files (${srcFiles.length})`);
|
|
440
|
-
for (const f of srcFiles.slice(0, 5)) {
|
|
441
|
-
const content = readFileSync(join(srcDir, String(f)), "utf8");
|
|
442
|
-
sections.push(`### ${f}`, "```js", content.substring(0, 2000), "```", "");
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
// Iteration history
|
|
447
|
-
if (meta.iterations && meta.iterations.length > 0) {
|
|
448
|
-
sections.push(`## Iteration History (${meta.iterations.length} cycles)`);
|
|
449
|
-
for (const iter of meta.iterations) {
|
|
450
|
-
sections.push(
|
|
451
|
-
`### Iteration ${iter.number} (${iter.profile}/${iter.model})`,
|
|
452
|
-
`- Steps: ${iter.steps?.map((s) => `${s.step}: ${s.success ? "OK" : "FAIL"}`).join(", ") || "none"}`,
|
|
453
|
-
`- Tests: ${iter.testsPassed ? "PASS" : "FAIL"}`,
|
|
454
|
-
`- Elapsed: ${iter.elapsed || "?"}s`,
|
|
455
|
-
"",
|
|
456
|
-
);
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
// Run tests for current status
|
|
461
|
-
const testResult = runInWorkspace("npm test 2>&1", wsPath, 60000);
|
|
462
|
-
sections.push("## Current Test Status");
|
|
463
|
-
sections.push(testResult.success ? "All tests passing." : "Tests failing.");
|
|
464
|
-
sections.push("```", testResult.output.substring(0, 2000), "```");
|
|
465
|
-
|
|
466
|
-
return text(sections.join("\n"));
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
async function handleWorkspaceDestroy({ workspace }) {
|
|
470
|
-
const wsPath = workspacePath(workspace);
|
|
471
|
-
if (!existsSync(wsPath)) {
|
|
472
|
-
return text(`Workspace "${workspace}" not found.`);
|
|
473
|
-
}
|
|
474
|
-
rmSync(wsPath, { recursive: true, force: true });
|
|
475
|
-
return text(`Workspace "${workspace}" destroyed.`);
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
async function handleIterate({ workspace, cycles = 3, steps }) {
|
|
479
|
-
const wsPath = workspacePath(workspace);
|
|
480
|
-
const meta = readMetadata(wsPath);
|
|
481
|
-
if (!meta) {
|
|
482
|
-
return text(`Workspace "${workspace}" not found.`);
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
const { runHybridSession } = await import("../copilot/hybrid-session.js");
|
|
486
|
-
|
|
487
|
-
let config;
|
|
488
|
-
try {
|
|
489
|
-
const { loadConfig } = await import("../copilot/config.js");
|
|
490
|
-
config = loadConfig(join(wsPath, "agentic-lib.toml"));
|
|
491
|
-
} catch {
|
|
492
|
-
config = { tuning: {}, model: meta.model || "gpt-5-mini" };
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
meta.status = "iterating";
|
|
496
|
-
writeMetadata(wsPath, meta);
|
|
497
|
-
|
|
498
|
-
const result = await runHybridSession({
|
|
499
|
-
workspacePath: wsPath,
|
|
500
|
-
model: meta.model || config.model || "gpt-5-mini",
|
|
501
|
-
tuning: config.tuning || {},
|
|
502
|
-
timeoutMs: 600000,
|
|
503
|
-
});
|
|
504
|
-
|
|
505
|
-
const iterNum = (meta.iterations?.length || 0) + 1;
|
|
506
|
-
meta.iterations.push({
|
|
507
|
-
number: iterNum,
|
|
508
|
-
profile: meta.profile,
|
|
509
|
-
model: meta.model,
|
|
510
|
-
testsPassed: result.testsPassed,
|
|
511
|
-
toolCalls: result.toolCalls,
|
|
512
|
-
testRuns: result.testRuns,
|
|
513
|
-
filesWritten: result.filesWritten,
|
|
514
|
-
elapsed: `${result.totalTime}`,
|
|
515
|
-
endReason: result.endReason,
|
|
516
|
-
});
|
|
517
|
-
meta.status = "ready";
|
|
518
|
-
writeMetadata(wsPath, meta);
|
|
519
|
-
|
|
520
|
-
const lines = [
|
|
521
|
-
`# Iterate: ${workspace}`,
|
|
522
|
-
"",
|
|
523
|
-
`- Success: ${result.success}`,
|
|
524
|
-
`- Tests passed: ${result.testsPassed}`,
|
|
525
|
-
`- Session time: ${result.sessionTime}s`,
|
|
526
|
-
`- Total time: ${result.totalTime}s`,
|
|
527
|
-
`- Tool calls: ${result.toolCalls}`,
|
|
528
|
-
`- Test runs: ${result.testRuns}`,
|
|
529
|
-
`- Files written: ${result.filesWritten}`,
|
|
530
|
-
`- Tokens: ${result.tokensIn + result.tokensOut} (in=${result.tokensIn} out=${result.tokensOut})`,
|
|
531
|
-
`- End reason: ${result.endReason}`,
|
|
532
|
-
"",
|
|
533
|
-
`- Total iterations for this workspace: ${meta.iterations.length}`,
|
|
534
|
-
`- Profile: ${meta.profile} | Model: ${meta.model}`,
|
|
535
|
-
];
|
|
536
|
-
return text(lines.join("\n"));
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
async function handleRunTests({ workspace }) {
|
|
540
|
-
const wsPath = workspacePath(workspace);
|
|
541
|
-
if (!readMetadata(wsPath)) {
|
|
542
|
-
return text(`Workspace "${workspace}" not found.`);
|
|
543
|
-
}
|
|
544
|
-
const result = runInWorkspace("npm test 2>&1", wsPath, 120000);
|
|
545
|
-
return text(
|
|
546
|
-
[
|
|
547
|
-
`## Test Results: ${workspace}`,
|
|
548
|
-
"",
|
|
549
|
-
result.success ? "**PASS** — all tests passing." : "**FAIL** — tests are failing.",
|
|
550
|
-
"",
|
|
551
|
-
"```",
|
|
552
|
-
result.output.substring(0, 5000),
|
|
553
|
-
"```",
|
|
554
|
-
].join("\n"),
|
|
555
|
-
);
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
async function handleConfigGet({ workspace }) {
|
|
559
|
-
const wsPath = workspacePath(workspace);
|
|
560
|
-
if (!readMetadata(wsPath)) {
|
|
561
|
-
return text(`Workspace "${workspace}" not found.`);
|
|
562
|
-
}
|
|
563
|
-
const tomlPath = join(wsPath, "agentic-lib.toml");
|
|
564
|
-
if (!existsSync(tomlPath)) {
|
|
565
|
-
return text("No agentic-lib.toml found in workspace.");
|
|
566
|
-
}
|
|
567
|
-
const content = readFileSync(tomlPath, "utf8");
|
|
568
|
-
return text(`## Configuration: ${workspace}\n\n\`\`\`toml\n${content}\n\`\`\``);
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
async function handleConfigSet({ workspace, profile, model, overrides }) {
|
|
572
|
-
const wsPath = workspacePath(workspace);
|
|
573
|
-
const meta = readMetadata(wsPath);
|
|
574
|
-
if (!meta) {
|
|
575
|
-
return text(`Workspace "${workspace}" not found.`);
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
const tomlPath = join(wsPath, "agentic-lib.toml");
|
|
579
|
-
if (!existsSync(tomlPath)) {
|
|
580
|
-
return text("No agentic-lib.toml found in workspace.");
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
let toml = readFileSync(tomlPath, "utf8");
|
|
584
|
-
const changes = [];
|
|
585
|
-
|
|
586
|
-
if (profile) {
|
|
587
|
-
toml = toml.replace(/^profile\s*=\s*"[^"]*"/m, `profile = "${profile}"`);
|
|
588
|
-
meta.profile = profile;
|
|
589
|
-
if (!model) {
|
|
590
|
-
meta.model = profileDefaultModel(profile);
|
|
591
|
-
}
|
|
592
|
-
changes.push(`profile -> ${profile}`);
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
if (model) {
|
|
596
|
-
toml = toml.replace(/^model\s*=\s*"[^"]*"/m, `model = "${model}"`);
|
|
597
|
-
meta.model = model;
|
|
598
|
-
changes.push(`model -> ${model}`);
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
if (overrides) {
|
|
602
|
-
for (const [key, value] of Object.entries(overrides)) {
|
|
603
|
-
const regex = new RegExp(`^${key}\\s*=\\s*.*$`, "m");
|
|
604
|
-
const line = typeof value === "string" ? `${key} = "${value}"` : `${key} = ${value}`;
|
|
605
|
-
if (regex.test(toml)) {
|
|
606
|
-
toml = toml.replace(regex, line);
|
|
607
|
-
} else {
|
|
608
|
-
// Add under [tuning] section
|
|
609
|
-
toml = toml.replace(/^\[tuning\]/m, `[tuning]\n${line}`);
|
|
610
|
-
}
|
|
611
|
-
changes.push(`${key} -> ${value}`);
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
writeFileSync(tomlPath, toml);
|
|
616
|
-
writeMetadata(wsPath, meta);
|
|
617
|
-
|
|
618
|
-
return text(`Configuration updated for ${workspace}:\n${changes.map((c) => `- ${c}`).join("\n")}`);
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
async function handlePrepareIteration({ workspace, focus = "transform" }) {
|
|
622
|
-
const wsPath = workspacePath(workspace);
|
|
623
|
-
const meta = readMetadata(wsPath);
|
|
624
|
-
if (!meta) {
|
|
625
|
-
return text(`Workspace "${workspace}" not found.`);
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
const sections = [];
|
|
629
|
-
const iterNum = (meta.iterations?.length || 0) + 1;
|
|
630
|
-
|
|
631
|
-
sections.push(`# Iteration ${iterNum} — ${focus}`);
|
|
632
|
-
sections.push(`Workspace: ${meta.id} | Profile: ${meta.profile}`);
|
|
633
|
-
sections.push("");
|
|
634
|
-
|
|
635
|
-
// Mission
|
|
636
|
-
const missionFile = join(wsPath, "MISSION.md");
|
|
637
|
-
if (existsSync(missionFile)) {
|
|
638
|
-
sections.push("## Mission", readFileSync(missionFile, "utf8"), "");
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
// Features
|
|
642
|
-
const featuresDir = join(wsPath, "features");
|
|
643
|
-
if (existsSync(featuresDir)) {
|
|
644
|
-
const features = readdirSync(featuresDir).filter((f) => f.endsWith(".md"));
|
|
645
|
-
if (features.length > 0) {
|
|
646
|
-
sections.push(`## Features (${features.length})`);
|
|
647
|
-
for (const f of features.slice(0, 10)) {
|
|
648
|
-
sections.push(`### ${f}`, readFileSync(join(featuresDir, f), "utf8"), "");
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
// Source files
|
|
654
|
-
const srcDir = join(wsPath, "src/lib");
|
|
655
|
-
if (existsSync(srcDir)) {
|
|
656
|
-
const srcFiles = readdirSync(srcDir, { recursive: true })
|
|
657
|
-
.filter((f) => String(f).match(/\.(js|ts)$/))
|
|
658
|
-
.slice(0, 20);
|
|
659
|
-
sections.push(`## Source Files (${srcFiles.length})`);
|
|
660
|
-
for (const f of srcFiles) {
|
|
661
|
-
const content = readFileSync(join(srcDir, String(f)), "utf8");
|
|
662
|
-
sections.push(`### src/lib/${f}`, "```js", content.substring(0, 5000), "```", "");
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
// Test files
|
|
667
|
-
const testsDir = join(wsPath, "tests/unit");
|
|
668
|
-
if (existsSync(testsDir)) {
|
|
669
|
-
const testFiles = readdirSync(testsDir, { recursive: true })
|
|
670
|
-
.filter((f) => String(f).match(/\.(js|ts)$/))
|
|
671
|
-
.slice(0, 10);
|
|
672
|
-
sections.push(`## Test Files (${testFiles.length})`);
|
|
673
|
-
for (const f of testFiles) {
|
|
674
|
-
const content = readFileSync(join(testsDir, String(f)), "utf8");
|
|
675
|
-
sections.push(`### tests/unit/${f}`, "```js", content.substring(0, 3000), "```", "");
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
// Current test results
|
|
680
|
-
const testResult = runInWorkspace("npm test 2>&1", wsPath, 60000);
|
|
681
|
-
sections.push("## Current Test Results");
|
|
682
|
-
sections.push(testResult.success ? "**All tests passing.**" : "**Tests failing.**");
|
|
683
|
-
sections.push("```", testResult.output.substring(0, 3000), "```", "");
|
|
684
|
-
|
|
685
|
-
// Instructions based on focus
|
|
686
|
-
sections.push("## Your Task");
|
|
687
|
-
if (focus === "transform") {
|
|
688
|
-
sections.push(
|
|
689
|
-
"Analyze the mission, features, and source code above.",
|
|
690
|
-
"Determine the single most impactful next step to advance the code toward the mission.",
|
|
691
|
-
"Then implement it by calling `workspace_write_file` to modify source files.",
|
|
692
|
-
"After writing, call `run_tests` to verify your changes.",
|
|
693
|
-
);
|
|
694
|
-
} else if (focus === "maintain-features") {
|
|
695
|
-
sections.push(
|
|
696
|
-
"Review the mission and current features.",
|
|
697
|
-
"Create, update, or prune feature files to keep the project focused on its mission.",
|
|
698
|
-
"Use `workspace_write_file` to write feature files to `features/<name>.md`.",
|
|
699
|
-
"Each feature should have clear, testable acceptance criteria.",
|
|
700
|
-
);
|
|
701
|
-
} else if (focus === "fix-code") {
|
|
702
|
-
sections.push(
|
|
703
|
-
"The test output above shows failing tests.",
|
|
704
|
-
"Analyze the failures and fix the source code.",
|
|
705
|
-
"Make minimal, targeted changes using `workspace_write_file`.",
|
|
706
|
-
"Then call `run_tests` to verify the fix.",
|
|
707
|
-
);
|
|
708
|
-
}
|
|
709
|
-
sections.push("");
|
|
710
|
-
sections.push("## Writable Paths");
|
|
711
|
-
sections.push("- src/lib/ (source code)");
|
|
712
|
-
sections.push("- tests/unit/ (test files)");
|
|
713
|
-
sections.push("- features/ (feature specs)");
|
|
714
|
-
sections.push("- examples/ (output artifacts)");
|
|
715
|
-
sections.push("- README.md, package.json");
|
|
716
|
-
|
|
717
|
-
return text(sections.join("\n"));
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
async function handleWorkspaceReadFile({ workspace, path }) {
|
|
721
|
-
const wsPath = workspacePath(workspace);
|
|
722
|
-
if (!readMetadata(wsPath)) {
|
|
723
|
-
return text(`Workspace "${workspace}" not found.`);
|
|
724
|
-
}
|
|
725
|
-
const filePath = resolve(wsPath, path);
|
|
726
|
-
// Prevent path traversal
|
|
727
|
-
if (!filePath.startsWith(wsPath)) {
|
|
728
|
-
return text(`Path traversal not allowed: ${path}`);
|
|
729
|
-
}
|
|
730
|
-
if (!existsSync(filePath)) {
|
|
731
|
-
return text(`File not found: ${path}`);
|
|
732
|
-
}
|
|
733
|
-
const content = readFileSync(filePath, "utf8");
|
|
734
|
-
return text(`## ${path}\n\n\`\`\`\n${content}\n\`\`\``);
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
async function handleWorkspaceWriteFile({ workspace, path, content }) {
|
|
738
|
-
const wsPath = workspacePath(workspace);
|
|
739
|
-
if (!readMetadata(wsPath)) {
|
|
740
|
-
return text(`Workspace "${workspace}" not found.`);
|
|
741
|
-
}
|
|
742
|
-
const filePath = resolve(wsPath, path);
|
|
743
|
-
if (!filePath.startsWith(wsPath)) {
|
|
744
|
-
return text(`Path traversal not allowed: ${path}`);
|
|
745
|
-
}
|
|
746
|
-
const dir = dirname(filePath);
|
|
747
|
-
if (!existsSync(dir)) {
|
|
748
|
-
mkdirSync(dir, { recursive: true });
|
|
749
|
-
}
|
|
750
|
-
writeFileSync(filePath, content, "utf8");
|
|
751
|
-
return text(`Written ${content.length} chars to ${path}`);
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
async function handleWorkspaceExec({ workspace, command }) {
|
|
755
|
-
const wsPath = workspacePath(workspace);
|
|
756
|
-
if (!readMetadata(wsPath)) {
|
|
757
|
-
return text(`Workspace "${workspace}" not found.`);
|
|
758
|
-
}
|
|
759
|
-
// Block git write commands
|
|
760
|
-
const blocked = /\bgit\s+(commit|push|add|reset|checkout|rebase|merge|stash)\b/;
|
|
761
|
-
if (blocked.test(command)) {
|
|
762
|
-
return text(`Git write commands are not allowed: ${command}`);
|
|
763
|
-
}
|
|
764
|
-
const result = runInWorkspace(command, wsPath, 120000);
|
|
765
|
-
return text(
|
|
766
|
-
[
|
|
767
|
-
`## exec: ${command}`,
|
|
768
|
-
`Exit code: ${result.exitCode || 0}`,
|
|
769
|
-
"```",
|
|
770
|
-
result.output.substring(0, 5000),
|
|
771
|
-
"```",
|
|
772
|
-
].join("\n"),
|
|
773
|
-
);
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
// ─── Helpers ────────────────────────────────────────────────────────
|
|
777
|
-
|
|
778
|
-
function text(content) {
|
|
779
|
-
return { content: [{ type: "text", text: content }] };
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
function profileDefaultModel(profile) {
|
|
783
|
-
const models = { min: "gpt-5-mini", recommended: "claude-sonnet-4", max: "gpt-4.1" };
|
|
784
|
-
return models[profile] || "gpt-5-mini";
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
// ─── MCP Server ─────────────────────────────────────────────────────
|
|
788
|
-
|
|
789
|
-
const toolHandlers = {
|
|
790
|
-
list_missions: handleListMissions,
|
|
791
|
-
workspace_create: handleWorkspaceCreate,
|
|
792
|
-
workspace_list: handleWorkspaceList,
|
|
793
|
-
workspace_status: handleWorkspaceStatus,
|
|
794
|
-
workspace_destroy: handleWorkspaceDestroy,
|
|
795
|
-
iterate: handleIterate,
|
|
796
|
-
run_tests: handleRunTests,
|
|
797
|
-
config_get: handleConfigGet,
|
|
798
|
-
config_set: handleConfigSet,
|
|
799
|
-
prepare_iteration: handlePrepareIteration,
|
|
800
|
-
workspace_read_file: handleWorkspaceReadFile,
|
|
801
|
-
workspace_write_file: handleWorkspaceWriteFile,
|
|
802
|
-
workspace_exec: handleWorkspaceExec,
|
|
803
|
-
};
|
|
804
|
-
|
|
805
|
-
export async function startServer() {
|
|
806
|
-
const pkg = JSON.parse(readFileSync(join(pkgRoot, "package.json"), "utf8"));
|
|
807
|
-
|
|
808
|
-
const server = new Server(
|
|
809
|
-
{ name: "agentic-lib", version: pkg.version },
|
|
810
|
-
{ capabilities: { tools: {} } },
|
|
811
|
-
);
|
|
812
|
-
|
|
813
|
-
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
|
|
814
|
-
|
|
815
|
-
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
816
|
-
const { name, arguments: args } = request.params;
|
|
817
|
-
const handler = toolHandlers[name];
|
|
818
|
-
if (!handler) {
|
|
819
|
-
return text(`Unknown tool: ${name}`);
|
|
820
|
-
}
|
|
821
|
-
try {
|
|
822
|
-
return await handler(args || {});
|
|
823
|
-
} catch (err) {
|
|
824
|
-
return text(`Error in ${name}: ${err.message}\n${err.stack || ""}`);
|
|
825
|
-
}
|
|
826
|
-
});
|
|
827
|
-
|
|
828
|
-
const transport = new StdioServerTransport();
|
|
829
|
-
await server.connect(transport);
|
|
830
|
-
}
|