nomoreide 0.1.69 → 0.1.70
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/core/agent-env-actions.d.ts +117 -0
- package/dist/core/agent-env-actions.js +234 -0
- package/dist/core/agent-env-actions.js.map +1 -0
- package/dist/core/agent-env-writers.d.ts +46 -0
- package/dist/core/agent-env-writers.js +385 -0
- package/dist/core/agent-env-writers.js.map +1 -0
- package/dist/mcp/tools/agent-env.d.ts +4 -3
- package/dist/mcp/tools/agent-env.js +129 -9
- package/dist/mcp/tools/agent-env.js.map +1 -1
- package/dist/mcp/tools/index.d.ts +1 -1
- package/dist/web/client/assets/{code-editor-B4fwOZmz.js → code-editor-tF2NdMJV.js} +1 -1
- package/dist/web/client/assets/index-C7lI87cF.css +1 -0
- package/dist/web/client/assets/{index-Bv9X1Rmi.js → index-CQmdoyuK.js} +98 -98
- package/dist/web/client/index.html +2 -2
- package/dist/web/routes/agent-env-routes.d.ts +5 -3
- package/dist/web/routes/agent-env-routes.js +54 -4
- package/dist/web/routes/agent-env-routes.js.map +1 -1
- package/package.json +1 -1
- package/dist/web/client/assets/index-CNvFKnAK.css +0 -1
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Environments low-level writers — the ONLY code that mutates coding
|
|
3
|
+
* agents' config files. Ported from brainctl's agent-config-service (ROR-61).
|
|
4
|
+
* Kept separate from the read-safe `core/agent-env/` module, mirroring the
|
|
5
|
+
* GitManager/GitActions and DbPeek/DbWrite splits; callers go through the
|
|
6
|
+
* staged preview → apply flow in `agent-env-actions.ts`.
|
|
7
|
+
*
|
|
8
|
+
* Every mutation backs up the touched file to a timestamped sibling
|
|
9
|
+
* (`<file>.bak.<ts>`) and writes atomically (temp file + rename). Skill
|
|
10
|
+
* directory removals are backed up under
|
|
11
|
+
* `<home>/.config/nomoreide/agent-env-backups/` first.
|
|
12
|
+
*/
|
|
13
|
+
import { constants } from "node:fs";
|
|
14
|
+
import { copyFile, cp, mkdir, readFile, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
15
|
+
import { homedir } from "node:os";
|
|
16
|
+
import path from "node:path";
|
|
17
|
+
import { readAntigravityConfig, readCodexConfig, } from "./agent-env/index.js";
|
|
18
|
+
export function formatTimestamp() {
|
|
19
|
+
const now = new Date();
|
|
20
|
+
const pad = (n) => String(n).padStart(2, "0");
|
|
21
|
+
return `${now.getFullYear()}${pad(now.getMonth() + 1)}${pad(now.getDate())}-${pad(now.getHours())}${pad(now.getMinutes())}${pad(now.getSeconds())}`;
|
|
22
|
+
}
|
|
23
|
+
async function backupFile(filePath) {
|
|
24
|
+
const base = `${filePath}.bak.${formatTimestamp()}`;
|
|
25
|
+
// COPYFILE_EXCL + suffix loop: two writes within the same second (e.g. the
|
|
26
|
+
// add+remove halves of a move) must not overwrite each other's backup.
|
|
27
|
+
for (let attempt = 0; attempt < 10; attempt++) {
|
|
28
|
+
const backupPath = attempt === 0 ? base : `${base}-${attempt}`;
|
|
29
|
+
try {
|
|
30
|
+
await copyFile(filePath, backupPath, constants.COPYFILE_EXCL);
|
|
31
|
+
return backupPath;
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
const code = error.code;
|
|
35
|
+
if (code === "EEXIST")
|
|
36
|
+
continue;
|
|
37
|
+
return null; // source file does not exist yet — nothing to back up
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
async function atomicWrite(filePath, content) {
|
|
43
|
+
const tmpPath = `${filePath}.tmp.${Date.now()}`;
|
|
44
|
+
await writeFile(tmpPath, content, "utf8");
|
|
45
|
+
await rename(tmpPath, filePath);
|
|
46
|
+
}
|
|
47
|
+
async function atomicWriteJson(filePath, data) {
|
|
48
|
+
await atomicWrite(filePath, JSON.stringify(data, null, 2) + "\n");
|
|
49
|
+
}
|
|
50
|
+
export async function addMcp(options) {
|
|
51
|
+
const { agent, key, entry, remoteEntry, scope } = options;
|
|
52
|
+
if (!entry && !remoteEntry) {
|
|
53
|
+
throw new Error(`MCP "${key}" has neither a command nor a URL; nothing to add.`);
|
|
54
|
+
}
|
|
55
|
+
if (agent === "claude") {
|
|
56
|
+
return mutateClaudeConfig(options, scope, (servers) => {
|
|
57
|
+
servers[key] = remoteEntry ? toClaudeRemoteEntry(remoteEntry) : toClaudeEntry(entry);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
if (scope === "project") {
|
|
61
|
+
// Codex and Antigravity have no native per-project config; brainctl's
|
|
62
|
+
// `.brainctl/project-mcps.json` convention is kept for compatibility.
|
|
63
|
+
return mutateBrainctlProjectMcps(options, agent, (servers) => {
|
|
64
|
+
servers[key] = remoteEntry
|
|
65
|
+
? { transport: remoteEntry.transport, url: remoteEntry.url }
|
|
66
|
+
: {
|
|
67
|
+
command: entry.command,
|
|
68
|
+
...(entry.args ? { args: entry.args } : {}),
|
|
69
|
+
...(entry.env ? { env: entry.env } : {}),
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
if (agent === "codex") {
|
|
74
|
+
return mutateCodexConfig(options, (state) => {
|
|
75
|
+
delete state.mcpServers[key];
|
|
76
|
+
delete state.remoteMcpServers[key];
|
|
77
|
+
if (remoteEntry)
|
|
78
|
+
state.remoteMcpServers[key] = remoteEntry;
|
|
79
|
+
else
|
|
80
|
+
state.mcpServers[key] = entry;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
return mutateAntigravityConfig(options, (servers) => {
|
|
84
|
+
servers[key] = remoteEntry ? toAntigravityRemoteEntry(remoteEntry) : toAntigravityEntry(entry);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
export async function removeMcp(options) {
|
|
88
|
+
const { agent, key, scope } = options;
|
|
89
|
+
if (agent === "claude") {
|
|
90
|
+
return mutateClaudeConfig(options, scope, (servers) => {
|
|
91
|
+
delete servers[key];
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
if (scope === "project") {
|
|
95
|
+
return mutateBrainctlProjectMcps(options, agent, (servers) => {
|
|
96
|
+
delete servers[key];
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
if (agent === "codex") {
|
|
100
|
+
return mutateCodexConfig(options, (state) => {
|
|
101
|
+
delete state.mcpServers[key];
|
|
102
|
+
delete state.remoteMcpServers[key];
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
return mutateAntigravityConfig(options, (servers) => {
|
|
106
|
+
delete servers[key];
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
/* ---- Claude: ~/.claude.json with top-level and projects[cwd] mcpServers ---- */
|
|
110
|
+
async function mutateClaudeConfig(options, scope, mutate) {
|
|
111
|
+
const homeDir = options.homeDir ?? homedir();
|
|
112
|
+
const configPath = path.join(homeDir, ".claude.json");
|
|
113
|
+
const backups = [];
|
|
114
|
+
let existing = {};
|
|
115
|
+
try {
|
|
116
|
+
existing = JSON.parse(await readFile(configPath, "utf8"));
|
|
117
|
+
const backup = await backupFile(configPath);
|
|
118
|
+
if (backup)
|
|
119
|
+
backups.push(backup);
|
|
120
|
+
}
|
|
121
|
+
catch {
|
|
122
|
+
// fresh config
|
|
123
|
+
}
|
|
124
|
+
if (scope === "user") {
|
|
125
|
+
const servers = (existing.mcpServers ?? {});
|
|
126
|
+
mutate(servers);
|
|
127
|
+
existing.mcpServers = servers;
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
const projects = (existing.projects ?? {});
|
|
131
|
+
const projectConfig = (projects[options.cwd] ?? {});
|
|
132
|
+
const servers = (projectConfig.mcpServers ?? {});
|
|
133
|
+
mutate(servers);
|
|
134
|
+
projectConfig.mcpServers = servers;
|
|
135
|
+
projects[options.cwd] = projectConfig;
|
|
136
|
+
existing.projects = projects;
|
|
137
|
+
}
|
|
138
|
+
await atomicWriteJson(configPath, existing);
|
|
139
|
+
return { backups };
|
|
140
|
+
}
|
|
141
|
+
function toClaudeEntry(entry) {
|
|
142
|
+
return {
|
|
143
|
+
type: "stdio",
|
|
144
|
+
command: entry.command,
|
|
145
|
+
args: entry.args ?? [],
|
|
146
|
+
...(entry.env ? { env: entry.env } : {}),
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
function toClaudeRemoteEntry(entry) {
|
|
150
|
+
return {
|
|
151
|
+
type: entry.transport === "sse" ? "sse" : "http",
|
|
152
|
+
url: entry.url,
|
|
153
|
+
...(entry.headers ? { headers: entry.headers } : {}),
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
/* ---- Codex: [mcp_servers.*] TOML sections in ~/.codex/config.toml ---- */
|
|
157
|
+
async function mutateCodexConfig(options, mutate) {
|
|
158
|
+
const homeDir = options.homeDir ?? homedir();
|
|
159
|
+
const configPath = path.join(homeDir, ".codex", "config.toml");
|
|
160
|
+
const backups = [];
|
|
161
|
+
let existingContent = "";
|
|
162
|
+
try {
|
|
163
|
+
existingContent = await readFile(configPath, "utf8");
|
|
164
|
+
const backup = await backupFile(configPath);
|
|
165
|
+
if (backup)
|
|
166
|
+
backups.push(backup);
|
|
167
|
+
}
|
|
168
|
+
catch {
|
|
169
|
+
// fresh config
|
|
170
|
+
}
|
|
171
|
+
const current = await readCodexConfig({ cwd: options.cwd, homeDir });
|
|
172
|
+
const state = {
|
|
173
|
+
mcpServers: { ...current.mcpServers },
|
|
174
|
+
remoteMcpServers: { ...current.remoteMcpServers },
|
|
175
|
+
};
|
|
176
|
+
mutate(state);
|
|
177
|
+
// Rebuild the file: everything that isn't an mcp_servers section, then ours.
|
|
178
|
+
const nonMcp = stripCodexMcpSections(existingContent).trim();
|
|
179
|
+
const mcpToml = buildCodexMcpToml(state);
|
|
180
|
+
const final = [nonMcp, mcpToml].filter((part) => part.length > 0).join("\n\n");
|
|
181
|
+
await mkdir(path.dirname(configPath), { recursive: true });
|
|
182
|
+
await atomicWrite(configPath, final + "\n");
|
|
183
|
+
return { backups };
|
|
184
|
+
}
|
|
185
|
+
function stripCodexMcpSections(content) {
|
|
186
|
+
const lines = content.split("\n");
|
|
187
|
+
const result = [];
|
|
188
|
+
let inMcp = false;
|
|
189
|
+
for (const line of lines) {
|
|
190
|
+
if (/^\[mcp_servers[\].]/.test(line)) {
|
|
191
|
+
inMcp = true;
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
if (inMcp && /^\[/.test(line) && !/^\[mcp_servers[\].]/.test(line)) {
|
|
195
|
+
inMcp = false;
|
|
196
|
+
}
|
|
197
|
+
if (!inMcp)
|
|
198
|
+
result.push(line);
|
|
199
|
+
}
|
|
200
|
+
return result.join("\n");
|
|
201
|
+
}
|
|
202
|
+
function buildCodexMcpToml(state) {
|
|
203
|
+
const lines = [];
|
|
204
|
+
for (const [name, entry] of Object.entries(state.mcpServers)) {
|
|
205
|
+
lines.push(`[mcp_servers.${name}]`);
|
|
206
|
+
lines.push(`command = ${tomlStr(entry.command)}`);
|
|
207
|
+
if (entry.args && entry.args.length > 0) {
|
|
208
|
+
lines.push(`args = [${entry.args.map(tomlStr).join(", ")}]`);
|
|
209
|
+
}
|
|
210
|
+
if (entry.env && Object.keys(entry.env).length > 0) {
|
|
211
|
+
lines.push("");
|
|
212
|
+
lines.push(`[mcp_servers.${name}.env]`);
|
|
213
|
+
for (const [key, value] of Object.entries(entry.env)) {
|
|
214
|
+
lines.push(`${key} = ${tomlStr(value)}`);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
lines.push("");
|
|
218
|
+
}
|
|
219
|
+
// Codex TOML only carries a URL for remote servers; transport/headers are
|
|
220
|
+
// Claude/Antigravity concepts and are dropped (preview warns about this).
|
|
221
|
+
for (const [name, entry] of Object.entries(state.remoteMcpServers)) {
|
|
222
|
+
lines.push(`[mcp_servers.${name}]`);
|
|
223
|
+
lines.push(`url = ${tomlStr(entry.url)}`);
|
|
224
|
+
lines.push("");
|
|
225
|
+
}
|
|
226
|
+
return lines.join("\n").trim();
|
|
227
|
+
}
|
|
228
|
+
function tomlStr(value) {
|
|
229
|
+
return `"${value.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
|
|
230
|
+
}
|
|
231
|
+
/* ---- Antigravity: JSON mcpServers at the live candidate path ---- */
|
|
232
|
+
async function mutateAntigravityConfig(options, mutate) {
|
|
233
|
+
const homeDir = options.homeDir ?? homedir();
|
|
234
|
+
// Antigravity has shipped several config locations; write to whichever one
|
|
235
|
+
// is live (the reader resolves it), falling back to the current default.
|
|
236
|
+
const live = await readAntigravityConfig({ cwd: options.cwd, homeDir });
|
|
237
|
+
const configPath = live.configPath;
|
|
238
|
+
const backups = [];
|
|
239
|
+
let existing = {};
|
|
240
|
+
try {
|
|
241
|
+
const source = await readFile(configPath, "utf8");
|
|
242
|
+
if (source.trim().length > 0) {
|
|
243
|
+
existing = JSON.parse(source);
|
|
244
|
+
}
|
|
245
|
+
const backup = await backupFile(configPath);
|
|
246
|
+
if (backup)
|
|
247
|
+
backups.push(backup);
|
|
248
|
+
}
|
|
249
|
+
catch {
|
|
250
|
+
// fresh config
|
|
251
|
+
}
|
|
252
|
+
const servers = (existing.mcpServers ?? {});
|
|
253
|
+
mutate(servers);
|
|
254
|
+
existing.mcpServers = servers;
|
|
255
|
+
await mkdir(path.dirname(configPath), { recursive: true });
|
|
256
|
+
await atomicWriteJson(configPath, existing);
|
|
257
|
+
return { backups };
|
|
258
|
+
}
|
|
259
|
+
function toAntigravityEntry(entry) {
|
|
260
|
+
return {
|
|
261
|
+
command: entry.command,
|
|
262
|
+
args: entry.args ?? [],
|
|
263
|
+
...(entry.env ? { env: entry.env } : {}),
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
function toAntigravityRemoteEntry(entry) {
|
|
267
|
+
return {
|
|
268
|
+
...(entry.transport === "http" ? { httpUrl: entry.url } : { url: entry.url }),
|
|
269
|
+
...(entry.headers ? { headers: entry.headers } : {}),
|
|
270
|
+
...(entry.env ? { env: entry.env } : {}),
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
/* ---- brainctl-compat project MCPs: <cwd>/.brainctl/project-mcps.json ---- */
|
|
274
|
+
async function mutateBrainctlProjectMcps(options, agent, mutate) {
|
|
275
|
+
const filePath = path.join(options.cwd, ".brainctl", "project-mcps.json");
|
|
276
|
+
const backups = [];
|
|
277
|
+
let data = {};
|
|
278
|
+
try {
|
|
279
|
+
data = JSON.parse(await readFile(filePath, "utf8"));
|
|
280
|
+
const backup = await backupFile(filePath);
|
|
281
|
+
if (backup)
|
|
282
|
+
backups.push(backup);
|
|
283
|
+
}
|
|
284
|
+
catch {
|
|
285
|
+
// fresh file
|
|
286
|
+
}
|
|
287
|
+
const agentData = (data[agent] ?? {});
|
|
288
|
+
const servers = (agentData.mcpServers ?? {});
|
|
289
|
+
mutate(servers);
|
|
290
|
+
agentData.mcpServers = servers;
|
|
291
|
+
data[agent] = agentData;
|
|
292
|
+
await mkdir(path.dirname(filePath), { recursive: true });
|
|
293
|
+
await atomicWriteJson(filePath, data);
|
|
294
|
+
return { backups };
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Resolve the directory holding a skill's SKILL.md. Project scope is
|
|
298
|
+
* Claude-only — Codex and Antigravity have no project-skills concept.
|
|
299
|
+
*/
|
|
300
|
+
export function getSkillDir(location, cwd, homeDir) {
|
|
301
|
+
const { agent, scope } = location;
|
|
302
|
+
const safeName = path.basename(location.skillName);
|
|
303
|
+
if (scope === "project") {
|
|
304
|
+
if (agent !== "claude") {
|
|
305
|
+
throw new Error(`Project-scoped skills are not supported for ${agent}; only Claude reads .claude/skills/ from the workspace.`);
|
|
306
|
+
}
|
|
307
|
+
return path.join(cwd, ".claude", "skills", safeName);
|
|
308
|
+
}
|
|
309
|
+
const home = homeDir ?? homedir();
|
|
310
|
+
const agentDir = { claude: ".claude", codex: ".codex", antigravity: ".gemini" }[agent];
|
|
311
|
+
return path.join(home, agentDir, "skills", safeName);
|
|
312
|
+
}
|
|
313
|
+
export async function copySkill(options) {
|
|
314
|
+
const sourceDir = getSkillDir(options.source, options.cwd, options.homeDir);
|
|
315
|
+
const targetDir = getSkillDir(options.target, options.cwd, options.homeDir);
|
|
316
|
+
try {
|
|
317
|
+
await stat(sourceDir);
|
|
318
|
+
}
|
|
319
|
+
catch {
|
|
320
|
+
throw new Error(`Skill "${options.source.skillName}" not found for ${options.source.agent} at ${sourceDir}.`);
|
|
321
|
+
}
|
|
322
|
+
await mkdir(path.dirname(targetDir), { recursive: true });
|
|
323
|
+
await rm(targetDir, { recursive: true, force: true });
|
|
324
|
+
await cp(sourceDir, targetDir, { recursive: true });
|
|
325
|
+
return { backups: [] };
|
|
326
|
+
}
|
|
327
|
+
export async function removeSkill(options) {
|
|
328
|
+
const skillDir = getSkillDir(options.location, options.cwd, options.homeDir);
|
|
329
|
+
const backup = await backupSkillDir(options, skillDir);
|
|
330
|
+
await rm(skillDir, { recursive: true, force: true });
|
|
331
|
+
return { backups: backup ? [backup] : [] };
|
|
332
|
+
}
|
|
333
|
+
export async function moveSkill(options) {
|
|
334
|
+
const sourceDir = getSkillDir(options.source, options.cwd, options.homeDir);
|
|
335
|
+
const targetDir = getSkillDir(options.target, options.cwd, options.homeDir);
|
|
336
|
+
try {
|
|
337
|
+
await stat(sourceDir);
|
|
338
|
+
}
|
|
339
|
+
catch {
|
|
340
|
+
// Idempotent: source already gone but destination present → done.
|
|
341
|
+
try {
|
|
342
|
+
await stat(targetDir);
|
|
343
|
+
return { backups: [] };
|
|
344
|
+
}
|
|
345
|
+
catch {
|
|
346
|
+
throw new Error(`Skill "${options.source.skillName}" not found for ${options.source.agent} at ${sourceDir}.`);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
await mkdir(path.dirname(targetDir), { recursive: true });
|
|
350
|
+
await rm(targetDir, { recursive: true, force: true });
|
|
351
|
+
await cp(sourceDir, targetDir, { recursive: true });
|
|
352
|
+
const backup = await backupSkillDir(options, sourceDir);
|
|
353
|
+
await rm(sourceDir, { recursive: true, force: true });
|
|
354
|
+
return { backups: backup ? [backup] : [] };
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Copy a skill dir that is about to be deleted into the central backup area.
|
|
358
|
+
* Deliberately NOT a sibling `.bak.*` directory — the readers would list that
|
|
359
|
+
* as a new skill.
|
|
360
|
+
*/
|
|
361
|
+
async function backupSkillDir(options, skillDir) {
|
|
362
|
+
try {
|
|
363
|
+
await stat(skillDir);
|
|
364
|
+
}
|
|
365
|
+
catch {
|
|
366
|
+
return null;
|
|
367
|
+
}
|
|
368
|
+
const homeDir = options.homeDir ?? homedir();
|
|
369
|
+
const backupDir = path.join(homeDir, ".config", "nomoreide", "agent-env-backups", `${path.basename(skillDir)}.${formatTimestamp()}`);
|
|
370
|
+
await mkdir(path.dirname(backupDir), { recursive: true });
|
|
371
|
+
await cp(skillDir, backupDir, { recursive: true });
|
|
372
|
+
return backupDir;
|
|
373
|
+
}
|
|
374
|
+
/* ---- Snapshot: back up an agent's config file before bulk operations ---- */
|
|
375
|
+
export async function snapshotAgentConfig(options) {
|
|
376
|
+
const homeDir = options.homeDir ?? homedir();
|
|
377
|
+
const configPath = options.agent === "claude"
|
|
378
|
+
? path.join(homeDir, ".claude.json")
|
|
379
|
+
: options.agent === "codex"
|
|
380
|
+
? path.join(homeDir, ".codex", "config.toml")
|
|
381
|
+
: (await readAntigravityConfig({ cwd: options.cwd, homeDir })).configPath;
|
|
382
|
+
const backup = await backupFile(configPath);
|
|
383
|
+
return { backups: backup ? [backup] : [] };
|
|
384
|
+
}
|
|
385
|
+
//# sourceMappingURL=agent-env-writers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-env-writers.js","sourceRoot":"","sources":["../../src/core/agent-env-writers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI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AS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC1D,MAAM,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACnD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,+EAA+E;AAE/E,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,OAA6C;IAE7C,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,OAAO,EAAE,CAAC;IAC7C,MAAM,UAAU,GACd,OAAO,CAAC,KAAK,KAAK,QAAQ;QACxB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC;QACpC,CAAC,CAAC,OAAO,CAAC,KAAK,KAAK,OAAO;YACzB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,aAAa,CAAC;YAC7C,CAAC,CAAC,CAAC,MAAM,qBAAqB,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;IAEhF,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,UAAU,CAAC,CAAC;IAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AAC7C,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { FastMCP } from "fastmcp";
|
|
2
2
|
import { type ToolContext } from "./context.js";
|
|
3
|
-
export declare const AGENT_ENV_TOOL_NAMES: readonly ["nomoreide_agents_status", "nomoreide_agents_read_configs", "nomoreide_agents_doctor"];
|
|
3
|
+
export declare const AGENT_ENV_TOOL_NAMES: readonly ["nomoreide_agents_status", "nomoreide_agents_read_configs", "nomoreide_agents_doctor", "nomoreide_agents_add_mcp", "nomoreide_agents_remove_mcp", "nomoreide_agents_move_mcp_scope", "nomoreide_agents_move_skill_scope", "nomoreide_agents_snapshot_agent"];
|
|
4
4
|
/**
|
|
5
|
-
* Read
|
|
6
|
-
*
|
|
5
|
+
* Read tools shipped with ROR-60; write tools (ROR-61) are apply-scoped — each
|
|
6
|
+
* stages one change through the write-guarded agent-env-actions module and
|
|
7
|
+
* applies it immediately, echoing the backup files it created.
|
|
7
8
|
*/
|
|
8
9
|
export declare function registerAgentEnvTools(server: FastMCP, _ctx: ToolContext): void;
|
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { applyChanges, snapshotAgent, } from "../../core/agent-env-actions.js";
|
|
3
|
+
import { addMcp } from "../../core/agent-env-writers.js";
|
|
2
4
|
import { getAgentAvailability, readAllAgentConfigs, runAgentDoctor, } from "../../core/agent-env/index.js";
|
|
3
5
|
import { stringify } from "./context.js";
|
|
4
6
|
export const AGENT_ENV_TOOL_NAMES = [
|
|
5
7
|
"nomoreide_agents_status",
|
|
6
8
|
"nomoreide_agents_read_configs",
|
|
7
9
|
"nomoreide_agents_doctor",
|
|
10
|
+
"nomoreide_agents_add_mcp",
|
|
11
|
+
"nomoreide_agents_remove_mcp",
|
|
12
|
+
"nomoreide_agents_move_mcp_scope",
|
|
13
|
+
"nomoreide_agents_move_skill_scope",
|
|
14
|
+
"nomoreide_agents_snapshot_agent",
|
|
8
15
|
];
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
const agentSchema = z.enum(["claude", "codex", "antigravity"]);
|
|
17
|
+
const scopeSchema = z.enum(["user", "project"]);
|
|
18
|
+
const cwdField = z
|
|
19
|
+
.string()
|
|
20
|
+
.min(1)
|
|
21
|
+
.optional()
|
|
22
|
+
.describe("Project directory used to resolve project-scoped MCPs and skills.");
|
|
23
|
+
const agentEnvCwdSchema = z.object({ cwd: cwdField });
|
|
16
24
|
/**
|
|
17
|
-
* Read
|
|
18
|
-
*
|
|
25
|
+
* Read tools shipped with ROR-60; write tools (ROR-61) are apply-scoped — each
|
|
26
|
+
* stages one change through the write-guarded agent-env-actions module and
|
|
27
|
+
* applies it immediately, echoing the backup files it created.
|
|
19
28
|
*/
|
|
20
29
|
export function registerAgentEnvTools(server, _ctx) {
|
|
21
30
|
server.addTool({
|
|
@@ -36,5 +45,116 @@ export function registerAgentEnvTools(server, _ctx) {
|
|
|
36
45
|
parameters: agentEnvCwdSchema,
|
|
37
46
|
execute: async ({ cwd }) => stringify(await runAgentDoctor({ cwd: cwd ?? process.cwd() })),
|
|
38
47
|
});
|
|
48
|
+
server.addTool({
|
|
49
|
+
name: "nomoreide_agents_add_mcp",
|
|
50
|
+
description: "Add (or overwrite) an MCP server in a coding agent's config. Provide command/args/env for a stdio server, or url (+ transport) for a remote one. The previous config file is backed up first; the backup path is returned.",
|
|
51
|
+
parameters: z.object({
|
|
52
|
+
agent: agentSchema,
|
|
53
|
+
key: z.string().min(1).describe("MCP server name."),
|
|
54
|
+
command: z.string().optional().describe("Executable for a stdio MCP server."),
|
|
55
|
+
args: z.array(z.string()).optional(),
|
|
56
|
+
env: z.record(z.string()).optional(),
|
|
57
|
+
url: z.string().optional().describe("URL for a remote MCP server."),
|
|
58
|
+
transport: z.enum(["http", "sse"]).optional().describe("Remote transport (default http)."),
|
|
59
|
+
scope: scopeSchema.default("user"),
|
|
60
|
+
cwd: cwdField,
|
|
61
|
+
}),
|
|
62
|
+
execute: async (input) => {
|
|
63
|
+
if (!input.command && !input.url) {
|
|
64
|
+
throw new Error("Provide either command (stdio server) or url (remote server).");
|
|
65
|
+
}
|
|
66
|
+
const outcome = await addMcp({
|
|
67
|
+
cwd: input.cwd ?? process.cwd(),
|
|
68
|
+
agent: input.agent,
|
|
69
|
+
key: input.key,
|
|
70
|
+
scope: input.scope,
|
|
71
|
+
entry: input.command
|
|
72
|
+
? { command: input.command, args: input.args, env: input.env }
|
|
73
|
+
: undefined,
|
|
74
|
+
remoteEntry: input.url
|
|
75
|
+
? { transport: input.transport ?? "http", url: input.url }
|
|
76
|
+
: undefined,
|
|
77
|
+
});
|
|
78
|
+
return stringify({ ok: true, agent: input.agent, key: input.key, ...outcome });
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
server.addTool({
|
|
82
|
+
name: "nomoreide_agents_remove_mcp",
|
|
83
|
+
description: "Remove an MCP server from a coding agent's config. The config file is backed up first; the backup path is returned.",
|
|
84
|
+
parameters: z.object({
|
|
85
|
+
agent: agentSchema,
|
|
86
|
+
key: z.string().min(1),
|
|
87
|
+
scope: scopeSchema.default("user"),
|
|
88
|
+
cwd: cwdField,
|
|
89
|
+
}),
|
|
90
|
+
execute: async (input) => stringify(await applyChanges({
|
|
91
|
+
cwd: input.cwd ?? process.cwd(),
|
|
92
|
+
changes: [
|
|
93
|
+
{
|
|
94
|
+
category: "mcp",
|
|
95
|
+
action: "remove",
|
|
96
|
+
name: input.key,
|
|
97
|
+
sourceAgent: input.agent,
|
|
98
|
+
sourceScope: input.scope,
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
})),
|
|
102
|
+
});
|
|
103
|
+
server.addTool({
|
|
104
|
+
name: "nomoreide_agents_move_mcp_scope",
|
|
105
|
+
description: "Move an MCP server between an agent's user (global) and project scope. Config files are backed up first; backup paths are returned.",
|
|
106
|
+
parameters: z.object({
|
|
107
|
+
agent: agentSchema,
|
|
108
|
+
key: z.string().min(1),
|
|
109
|
+
fromScope: scopeSchema,
|
|
110
|
+
toScope: scopeSchema,
|
|
111
|
+
cwd: cwdField,
|
|
112
|
+
}),
|
|
113
|
+
execute: async (input) => stringify(await applyChanges({
|
|
114
|
+
cwd: input.cwd ?? process.cwd(),
|
|
115
|
+
changes: [
|
|
116
|
+
{
|
|
117
|
+
category: "mcp",
|
|
118
|
+
action: "move",
|
|
119
|
+
name: input.key,
|
|
120
|
+
sourceAgent: input.agent,
|
|
121
|
+
sourceScope: input.fromScope,
|
|
122
|
+
targetAgent: input.agent,
|
|
123
|
+
targetScope: input.toScope,
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
})),
|
|
127
|
+
});
|
|
128
|
+
server.addTool({
|
|
129
|
+
name: "nomoreide_agents_move_skill_scope",
|
|
130
|
+
description: "Move a skill between user and project scope (Claude only — other agents have no project skills). The removed source directory is backed up; the backup path is returned.",
|
|
131
|
+
parameters: z.object({
|
|
132
|
+
agent: agentSchema,
|
|
133
|
+
skillName: z.string().min(1),
|
|
134
|
+
fromScope: scopeSchema,
|
|
135
|
+
toScope: scopeSchema,
|
|
136
|
+
cwd: cwdField,
|
|
137
|
+
}),
|
|
138
|
+
execute: async (input) => stringify(await applyChanges({
|
|
139
|
+
cwd: input.cwd ?? process.cwd(),
|
|
140
|
+
changes: [
|
|
141
|
+
{
|
|
142
|
+
category: "skill",
|
|
143
|
+
action: "move",
|
|
144
|
+
name: input.skillName,
|
|
145
|
+
sourceAgent: input.agent,
|
|
146
|
+
sourceScope: input.fromScope,
|
|
147
|
+
targetAgent: input.agent,
|
|
148
|
+
targetScope: input.toScope,
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
})),
|
|
152
|
+
});
|
|
153
|
+
server.addTool({
|
|
154
|
+
name: "nomoreide_agents_snapshot_agent",
|
|
155
|
+
description: "Snapshot a coding agent's live config file to a timestamped .bak.* copy before bulk edits. Returns the backup path.",
|
|
156
|
+
parameters: z.object({ agent: agentSchema, cwd: cwdField }),
|
|
157
|
+
execute: async (input) => stringify(await snapshotAgent({ cwd: input.cwd ?? process.cwd(), agent: input.agent })),
|
|
158
|
+
});
|
|
39
159
|
}
|
|
40
160
|
//# sourceMappingURL=agent-env.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-env.js","sourceRoot":"","sources":["../../../src/mcp/tools/agent-env.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,GACf,MAAM,+BAA+B,C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,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;QAC3D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CACvB,SAAS,CACP,MAAM,aAAa,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAC7E;KACJ,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -10,7 +10,7 @@ import { type ToolContext } from "./context.js";
|
|
|
10
10
|
* a new domain module and register it below. This aggregator never grows a
|
|
11
11
|
* per-tool branch.
|
|
12
12
|
*/
|
|
13
|
-
export declare const NOMOREIDE_TOOL_NAMES: readonly ["nomoreide_list_services", "nomoreide_register_service", "nomoreide_start_service", "nomoreide_stop_service", "nomoreide_restart_service", "nomoreide_read_logs", "nomoreide_register_bundle", "nomoreide_start_bundle", "nomoreide_stop_bundle", "nomoreide_status", "nomoreide_service_context", "nomoreide_service_health", "nomoreide_timeline", "nomoreide_onboard_repo", "nomoreide_git_status", "nomoreide_git_branches", "nomoreide_git_switch_branch", "nomoreide_git_create_branch", "nomoreide_git_fetch", "nomoreide_git_diff", "nomoreide_git_staged_diff", "nomoreide_git_log", "nomoreide_git_stage", "nomoreide_git_unstage", "nomoreide_git_commit", "nomoreide_git_push", "nomoreide_git_clone", "nomoreide_git_register_repository", "nomoreide_git_select_repository", "nomoreide_snapshots_list", "nomoreide_snapshot_create", "nomoreide_github_set_token", "nomoreide_github_list_prs", "nomoreide_github_get_pr", "nomoreide_github_get_pr_diff", "nomoreide_github_create_pr", "nomoreide_github_merge_pr", "nomoreide_github_list_issues", "nomoreide_github_get_issue", "nomoreide_github_list_issue_comments", "nomoreide_github_add_issue_comment", "nomoreide_github_create_issue", "nomoreide_github_get_commit_ci", "nomoreide_github_list_workflow_runs", "nomoreide_list_errors", "nomoreide_error_prompt", "nomoreide_list_databases", "nomoreide_db_tables", "nomoreide_db_sample", "nomoreide_db_query", "nomoreide_docs", "nomoreide_open_ui", "nomoreide_close_ui", "nomoreide_agents_status", "nomoreide_agents_read_configs", "nomoreide_agents_doctor"];
|
|
13
|
+
export declare const NOMOREIDE_TOOL_NAMES: readonly ["nomoreide_list_services", "nomoreide_register_service", "nomoreide_start_service", "nomoreide_stop_service", "nomoreide_restart_service", "nomoreide_read_logs", "nomoreide_register_bundle", "nomoreide_start_bundle", "nomoreide_stop_bundle", "nomoreide_status", "nomoreide_service_context", "nomoreide_service_health", "nomoreide_timeline", "nomoreide_onboard_repo", "nomoreide_git_status", "nomoreide_git_branches", "nomoreide_git_switch_branch", "nomoreide_git_create_branch", "nomoreide_git_fetch", "nomoreide_git_diff", "nomoreide_git_staged_diff", "nomoreide_git_log", "nomoreide_git_stage", "nomoreide_git_unstage", "nomoreide_git_commit", "nomoreide_git_push", "nomoreide_git_clone", "nomoreide_git_register_repository", "nomoreide_git_select_repository", "nomoreide_snapshots_list", "nomoreide_snapshot_create", "nomoreide_github_set_token", "nomoreide_github_list_prs", "nomoreide_github_get_pr", "nomoreide_github_get_pr_diff", "nomoreide_github_create_pr", "nomoreide_github_merge_pr", "nomoreide_github_list_issues", "nomoreide_github_get_issue", "nomoreide_github_list_issue_comments", "nomoreide_github_add_issue_comment", "nomoreide_github_create_issue", "nomoreide_github_get_commit_ci", "nomoreide_github_list_workflow_runs", "nomoreide_list_errors", "nomoreide_error_prompt", "nomoreide_list_databases", "nomoreide_db_tables", "nomoreide_db_sample", "nomoreide_db_query", "nomoreide_docs", "nomoreide_open_ui", "nomoreide_close_ui", "nomoreide_agents_status", "nomoreide_agents_read_configs", "nomoreide_agents_doctor", "nomoreide_agents_add_mcp", "nomoreide_agents_remove_mcp", "nomoreide_agents_move_mcp_scope", "nomoreide_agents_move_skill_scope", "nomoreide_agents_snapshot_agent"];
|
|
14
14
|
interface RegisterNoMoreIdeToolsOptions extends ToolContext {
|
|
15
15
|
server: FastMCP;
|
|
16
16
|
toolCallStore?: ToolCallStore;
|