nomoreide 0.1.70 → 0.1.72
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-profiles/apply.d.ts +36 -0
- package/dist/core/agent-profiles/apply.js +160 -0
- package/dist/core/agent-profiles/apply.js.map +1 -0
- package/dist/core/agent-profiles/credentials.d.ts +26 -0
- package/dist/core/agent-profiles/credentials.js +151 -0
- package/dist/core/agent-profiles/credentials.js.map +1 -0
- package/dist/core/agent-profiles/index.d.ts +14 -0
- package/dist/core/agent-profiles/index.js +15 -0
- package/dist/core/agent-profiles/index.js.map +1 -0
- package/dist/core/agent-profiles/registry-auth.d.ts +25 -0
- package/dist/core/agent-profiles/registry-auth.js +78 -0
- package/dist/core/agent-profiles/registry-auth.js.map +1 -0
- package/dist/core/agent-profiles/registry-client.d.ts +65 -0
- package/dist/core/agent-profiles/registry-client.js +97 -0
- package/dist/core/agent-profiles/registry-client.js.map +1 -0
- package/dist/core/agent-profiles/registry-config.d.ts +48 -0
- package/dist/core/agent-profiles/registry-config.js +164 -0
- package/dist/core/agent-profiles/registry-config.js.map +1 -0
- package/dist/core/agent-profiles/registry-transfer.d.ts +42 -0
- package/dist/core/agent-profiles/registry-transfer.js +102 -0
- package/dist/core/agent-profiles/registry-transfer.js.map +1 -0
- package/dist/core/agent-profiles/store.d.ts +35 -0
- package/dist/core/agent-profiles/store.js +210 -0
- package/dist/core/agent-profiles/store.js.map +1 -0
- package/dist/core/agent-profiles/transfer.d.ts +26 -0
- package/dist/core/agent-profiles/transfer.js +141 -0
- package/dist/core/agent-profiles/transfer.js.map +1 -0
- package/dist/core/agent-profiles/types.d.ts +250 -0
- package/dist/core/agent-profiles/types.js +63 -0
- package/dist/core/agent-profiles/types.js.map +1 -0
- package/dist/mcp/tools/agent-profiles.d.ts +9 -0
- package/dist/mcp/tools/agent-profiles.js +165 -0
- package/dist/mcp/tools/agent-profiles.js.map +1 -0
- package/dist/mcp/tools/agent-registry.d.ts +9 -0
- package/dist/mcp/tools/agent-registry.js +81 -0
- package/dist/mcp/tools/agent-registry.js.map +1 -0
- package/dist/mcp/tools/index.d.ts +1 -1
- package/dist/mcp/tools/index.js +6 -0
- package/dist/mcp/tools/index.js.map +1 -1
- package/dist/web/client/assets/{code-editor-tF2NdMJV.js → code-editor-fZ2dpXfw.js} +1 -1
- package/dist/web/client/assets/{index-CQmdoyuK.js → index-CraqLFuO.js} +140 -140
- package/dist/web/client/assets/index-n7aEcfkd.css +1 -0
- package/dist/web/client/index.html +2 -2
- package/dist/web/routes/agent-profile-routes.d.ts +8 -0
- package/dist/web/routes/agent-profile-routes.js +180 -0
- package/dist/web/routes/agent-profile-routes.js.map +1 -0
- package/dist/web/routes/agent-registry-routes.d.ts +2 -0
- package/dist/web/routes/agent-registry-routes.js +295 -0
- package/dist/web/routes/agent-registry-routes.js.map +1 -0
- package/dist/web/routes/index.js +6 -0
- package/dist/web/routes/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/web/client/assets/index-C7lI87cF.css +0 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Profiles (ROR-62) — named bundles of MCP servers + skills that can be
|
|
3
|
+
* saved, applied to agents, and shared as portable `.tar.gz` archives.
|
|
4
|
+
*
|
|
5
|
+
* Profiles use nomoreide's own vocabulary (the same local/remote MCP shapes
|
|
6
|
+
* the agent-env readers emit) and are stored as Zod-validated JSON under
|
|
7
|
+
* `~/.config/nomoreide/agent-profiles/<name>/`. This deliberately does NOT
|
|
8
|
+
* read brainctl's YAML profiles — brainctl users migrate by re-snapshotting
|
|
9
|
+
* their live agent configs (one call), which recreates the profile here.
|
|
10
|
+
*/
|
|
11
|
+
import { z } from "zod";
|
|
12
|
+
const stringMapSchema = z.record(z.string());
|
|
13
|
+
export const profileLocalMcpSchema = z.object({
|
|
14
|
+
kind: z.literal("local"),
|
|
15
|
+
command: z.string().min(1),
|
|
16
|
+
args: z.array(z.string()).optional(),
|
|
17
|
+
env: stringMapSchema.optional(),
|
|
18
|
+
});
|
|
19
|
+
export const profileRemoteMcpSchema = z.object({
|
|
20
|
+
kind: z.literal("remote"),
|
|
21
|
+
transport: z.enum(["http", "sse"]),
|
|
22
|
+
url: z.string().min(1),
|
|
23
|
+
headers: stringMapSchema.optional(),
|
|
24
|
+
env: stringMapSchema.optional(),
|
|
25
|
+
});
|
|
26
|
+
export const profileMcpSchema = z.discriminatedUnion("kind", [
|
|
27
|
+
profileLocalMcpSchema,
|
|
28
|
+
profileRemoteMcpSchema,
|
|
29
|
+
]);
|
|
30
|
+
/** A skill bundled with the profile; its files live at `<profile>/skills/<name>/`. */
|
|
31
|
+
export const profileSkillSchema = z.object({
|
|
32
|
+
name: z.string().min(1),
|
|
33
|
+
});
|
|
34
|
+
export const PROFILE_NAME_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
|
|
35
|
+
export const profileSchema = z.object({
|
|
36
|
+
name: z.string().regex(PROFILE_NAME_PATTERN),
|
|
37
|
+
description: z.string().optional(),
|
|
38
|
+
mcps: z.record(profileMcpSchema).default({}),
|
|
39
|
+
skills: z.array(profileSkillSchema).default([]),
|
|
40
|
+
});
|
|
41
|
+
/** Credential a portable archive needs filled in at import time. */
|
|
42
|
+
export const credentialSpecSchema = z.object({
|
|
43
|
+
key: z.string().min(1),
|
|
44
|
+
required: z.boolean().default(true),
|
|
45
|
+
description: z.string().optional(),
|
|
46
|
+
});
|
|
47
|
+
/** `manifest.json` inside a portable archive. */
|
|
48
|
+
export const profileManifestSchema = z.object({
|
|
49
|
+
schemaVersion: z.literal(1),
|
|
50
|
+
profileName: z.string().min(1),
|
|
51
|
+
createdBy: z.object({ tool: z.string(), version: z.string() }).optional(),
|
|
52
|
+
credentials: z.array(credentialSpecSchema).optional(),
|
|
53
|
+
});
|
|
54
|
+
export function slugifyProfileName(input) {
|
|
55
|
+
return input
|
|
56
|
+
.trim()
|
|
57
|
+
.toLowerCase()
|
|
58
|
+
.replace(/[\s_]+/g, "-")
|
|
59
|
+
.replace(/[^a-z0-9.-]/g, "")
|
|
60
|
+
.replace(/-+/g, "-")
|
|
61
|
+
.replace(/^[-.]+|[-.]+$/g, "");
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/agent-profiles/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;AAE7C,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IACxB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACpC,GAAG,EAAE,eAAe,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IACzB,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAClC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,OAAO,EAAE,eAAe,CAAC,QAAQ,EAAE;IACnC,GAAG,EAAE,eAAe,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAC3D,q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,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE;IACzE,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE;CACtD,CAAC,CAAC;AAYH,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,OAAO,KAAK;SACT,IAAI,EAAE;SACN,WAAW,EAAE;SACb,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC;SACvB,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC;SAC3B,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FastMCP } from "fastmcp";
|
|
2
|
+
import { type ToolContext } from "./context.js";
|
|
3
|
+
export declare const AGENT_PROFILE_TOOL_NAMES: readonly ["nomoreide_profiles_list", "nomoreide_profiles_get", "nomoreide_profiles_create", "nomoreide_profiles_update", "nomoreide_profiles_delete", "nomoreide_profiles_snapshot", "nomoreide_profiles_apply", "nomoreide_profiles_export", "nomoreide_profiles_import", "nomoreide_profiles_copy_items"];
|
|
4
|
+
/**
|
|
5
|
+
* Agent Profiles (ROR-62): named MCP+skill bundles. Mutations of agent
|
|
6
|
+
* configs (apply) flow through the write-guarded agent-env layer and echo
|
|
7
|
+
* backup paths; profile CRUD only touches `~/.config/nomoreide/agent-profiles/`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function registerAgentProfileTools(server: FastMCP, _ctx: ToolContext): void;
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { applyProfile, copySkillBetweenProfiles, createProfile, deleteProfile, exportProfile, getProfile, importProfile, listProfiles, previewProfileApply, profileMcpSchema, snapshotProfileFromAgent, updateProfile, } from "../../core/agent-profiles/index.js";
|
|
3
|
+
import { stringify } from "./context.js";
|
|
4
|
+
export const AGENT_PROFILE_TOOL_NAMES = [
|
|
5
|
+
"nomoreide_profiles_list",
|
|
6
|
+
"nomoreide_profiles_get",
|
|
7
|
+
"nomoreide_profiles_create",
|
|
8
|
+
"nomoreide_profiles_update",
|
|
9
|
+
"nomoreide_profiles_delete",
|
|
10
|
+
"nomoreide_profiles_snapshot",
|
|
11
|
+
"nomoreide_profiles_apply",
|
|
12
|
+
"nomoreide_profiles_export",
|
|
13
|
+
"nomoreide_profiles_import",
|
|
14
|
+
"nomoreide_profiles_copy_items",
|
|
15
|
+
];
|
|
16
|
+
const agentSchema = z.enum(["claude", "codex", "antigravity"]);
|
|
17
|
+
const nameField = z.string().min(1).describe("Profile name.");
|
|
18
|
+
const cwdField = z
|
|
19
|
+
.string()
|
|
20
|
+
.min(1)
|
|
21
|
+
.optional()
|
|
22
|
+
.describe("Project directory (defaults to the server's cwd).");
|
|
23
|
+
/**
|
|
24
|
+
* Agent Profiles (ROR-62): named MCP+skill bundles. Mutations of agent
|
|
25
|
+
* configs (apply) flow through the write-guarded agent-env layer and echo
|
|
26
|
+
* backup paths; profile CRUD only touches `~/.config/nomoreide/agent-profiles/`.
|
|
27
|
+
*/
|
|
28
|
+
export function registerAgentProfileTools(server, _ctx) {
|
|
29
|
+
server.addTool({
|
|
30
|
+
name: "nomoreide_profiles_list",
|
|
31
|
+
description: "List saved agent profiles (named bundles of MCP servers + skills).",
|
|
32
|
+
parameters: z.object({}),
|
|
33
|
+
execute: async () => stringify(await listProfiles()),
|
|
34
|
+
});
|
|
35
|
+
server.addTool({
|
|
36
|
+
name: "nomoreide_profiles_get",
|
|
37
|
+
description: "Get a profile's full config: MCP servers and bundled skills.",
|
|
38
|
+
parameters: z.object({ name: nameField }),
|
|
39
|
+
execute: async ({ name }) => stringify(await getProfile(name)),
|
|
40
|
+
});
|
|
41
|
+
server.addTool({
|
|
42
|
+
name: "nomoreide_profiles_create",
|
|
43
|
+
description: 'Create an empty profile. Name must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/.',
|
|
44
|
+
parameters: z.object({ name: nameField, description: z.string().optional() }),
|
|
45
|
+
execute: async (input) => stringify(await createProfile(input)),
|
|
46
|
+
});
|
|
47
|
+
server.addTool({
|
|
48
|
+
name: "nomoreide_profiles_update",
|
|
49
|
+
description: "Update a profile's description, MCP map, or skill list (name is immutable).",
|
|
50
|
+
parameters: z.object({
|
|
51
|
+
name: nameField,
|
|
52
|
+
description: z.string().optional(),
|
|
53
|
+
mcps: z.record(profileMcpSchema).optional(),
|
|
54
|
+
skills: z.array(z.object({ name: z.string().min(1) })).optional(),
|
|
55
|
+
}),
|
|
56
|
+
execute: async ({ name, ...patch }) => stringify(await updateProfile(name, patch)),
|
|
57
|
+
});
|
|
58
|
+
server.addTool({
|
|
59
|
+
name: "nomoreide_profiles_delete",
|
|
60
|
+
description: "Delete a saved profile (does not touch any agent's live config).",
|
|
61
|
+
parameters: z.object({ name: nameField }),
|
|
62
|
+
execute: async ({ name }) => {
|
|
63
|
+
await deleteProfile(name);
|
|
64
|
+
return stringify({ ok: true, deleted: name });
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
server.addTool({
|
|
68
|
+
name: "nomoreide_profiles_snapshot",
|
|
69
|
+
description: "Snapshot an agent's live MCPs and user skills into a new profile — useful as a backup before bulk changes or to capture a setup for sharing.",
|
|
70
|
+
parameters: z.object({
|
|
71
|
+
agent: agentSchema,
|
|
72
|
+
name: nameField,
|
|
73
|
+
description: z.string().optional(),
|
|
74
|
+
cwd: cwdField,
|
|
75
|
+
}),
|
|
76
|
+
execute: async (input) => stringify(await snapshotProfileFromAgent({ ...input, cwd: input.cwd ?? process.cwd() })),
|
|
77
|
+
});
|
|
78
|
+
server.addTool({
|
|
79
|
+
name: "nomoreide_profiles_apply",
|
|
80
|
+
description: "Apply a profile's MCPs and skills to an agent. Set dryRun=true for a conflict preview (add/identical/conflict per item). A real apply snapshots the agent config first and returns every backup path.",
|
|
81
|
+
parameters: z.object({
|
|
82
|
+
name: nameField,
|
|
83
|
+
agent: agentSchema,
|
|
84
|
+
dryRun: z.boolean().default(false),
|
|
85
|
+
skipMcps: z.array(z.string()).optional().describe("MCP keys to leave untouched."),
|
|
86
|
+
skipSkills: z.array(z.string()).optional().describe("Skill names to leave untouched."),
|
|
87
|
+
cwd: cwdField,
|
|
88
|
+
}),
|
|
89
|
+
execute: async (input) => {
|
|
90
|
+
const cwd = input.cwd ?? process.cwd();
|
|
91
|
+
if (input.dryRun) {
|
|
92
|
+
return stringify(await previewProfileApply({ cwd, name: input.name, agent: input.agent }));
|
|
93
|
+
}
|
|
94
|
+
return stringify(await applyProfile({
|
|
95
|
+
cwd,
|
|
96
|
+
name: input.name,
|
|
97
|
+
agent: input.agent,
|
|
98
|
+
skip: { mcps: input.skipMcps, skills: input.skipSkills },
|
|
99
|
+
}));
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
server.addTool({
|
|
103
|
+
name: "nomoreide_profiles_export",
|
|
104
|
+
description: "Export a profile as a portable .tar.gz. Secret-looking env/header values are redacted to ${credentials.*} placeholders — the archive never contains raw secrets.",
|
|
105
|
+
parameters: z.object({
|
|
106
|
+
name: nameField,
|
|
107
|
+
outputPath: z.string().optional().describe("Defaults to <cwd>/<name>.tar.gz."),
|
|
108
|
+
cwd: cwdField,
|
|
109
|
+
}),
|
|
110
|
+
execute: async (input) => stringify(await exportProfile({
|
|
111
|
+
name: input.name,
|
|
112
|
+
outputPath: input.outputPath,
|
|
113
|
+
cwd: input.cwd ?? process.cwd(),
|
|
114
|
+
})),
|
|
115
|
+
});
|
|
116
|
+
server.addTool({
|
|
117
|
+
name: "nomoreide_profiles_import",
|
|
118
|
+
description: "Import a portable profile .tar.gz. Supplied credentials (or matching environment variables) fill ${credentials.*} placeholders; unresolved keys are reported.",
|
|
119
|
+
parameters: z.object({
|
|
120
|
+
archivePath: z.string().min(1),
|
|
121
|
+
force: z.boolean().default(false).describe("Overwrite an existing profile of the same name."),
|
|
122
|
+
as: z.string().optional().describe("Import under a different profile name."),
|
|
123
|
+
credentials: z.record(z.string()).optional(),
|
|
124
|
+
}),
|
|
125
|
+
execute: async (input) => stringify(await importProfile(input)),
|
|
126
|
+
});
|
|
127
|
+
server.addTool({
|
|
128
|
+
name: "nomoreide_profiles_copy_items",
|
|
129
|
+
description: "Copy selected MCPs and/or skills from one profile into another (overwrites same-named items in the target).",
|
|
130
|
+
parameters: z.object({
|
|
131
|
+
from: z.string().min(1),
|
|
132
|
+
to: z.string().min(1),
|
|
133
|
+
mcps: z.array(z.string()).optional().describe("MCP keys to copy."),
|
|
134
|
+
skills: z.array(z.string()).optional().describe("Skill names to copy."),
|
|
135
|
+
}),
|
|
136
|
+
execute: async (input) => {
|
|
137
|
+
const source = await getProfile(input.from);
|
|
138
|
+
const target = await getProfile(input.to);
|
|
139
|
+
const mcps = { ...target.mcps };
|
|
140
|
+
const copiedMcps = [];
|
|
141
|
+
for (const key of input.mcps ?? []) {
|
|
142
|
+
const entry = source.mcps[key];
|
|
143
|
+
if (!entry)
|
|
144
|
+
throw new Error(`MCP "${key}" not found in profile "${input.from}".`);
|
|
145
|
+
mcps[key] = entry;
|
|
146
|
+
copiedMcps.push(key);
|
|
147
|
+
}
|
|
148
|
+
const skills = [...target.skills];
|
|
149
|
+
const copiedSkills = [];
|
|
150
|
+
for (const skillName of input.skills ?? []) {
|
|
151
|
+
if (!source.skills.some((skill) => skill.name === skillName)) {
|
|
152
|
+
throw new Error(`Skill "${skillName}" not found in profile "${input.from}".`);
|
|
153
|
+
}
|
|
154
|
+
await copySkillBetweenProfiles(input.from, input.to, skillName);
|
|
155
|
+
if (!skills.some((skill) => skill.name === skillName)) {
|
|
156
|
+
skills.push({ name: skillName });
|
|
157
|
+
}
|
|
158
|
+
copiedSkills.push(skillName);
|
|
159
|
+
}
|
|
160
|
+
await updateProfile(input.to, { mcps, skills });
|
|
161
|
+
return stringify({ ok: true, copiedMcps, copiedSkills });
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=agent-profiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-profiles.js","sourceRoot":"","sources":["../../../src/mcp/tools/agent-profiles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,aAAa,EACb,aAAa,EACb,aAAa,EACb,UAAU,EACV,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,aAAa,GACd,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAoB,MAAM,cAAc,CAAC;AAE3D,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,yBAAyB;IACzB,wBAAwB;IACxB,2BAA2B;IAC3B,2BAA2B;IAC3B,2BAA2B;IAC3B,6BAA6B;IAC7B,0BAA0B;IAC1B,2BAA2B;IAC3B,2BAA2B;IAC3B,+BAA+B;CACvB,CAAC;AAEX,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC;AAC/D,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;AAC9D,MAAM,QAAQ,GAAG,CAAC;KACf,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,QAAQ,EAAE;KACV,QAAQ,CAAC,mDAAmD,CAAC,CAAC;AAEjE;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CAAC,MAAe,EAAE,IAAiB;IAC1E,MAAM,CAAC,OAAO,CAAC;QACb,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EAAE,oEAAoE;QACjF,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;QACxB,OAAO,EAAE,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,KAAK,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;gBAChE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,EAAE,CAAC;oBACtD,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;gBACnC,CAAC;gBACD,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YAC/B,CAAC;YAED,MAAM,aAAa,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;YAChD,OAAO,SAAS,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC;QAC3D,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FastMCP } from "fastmcp";
|
|
2
|
+
import { type ToolContext } from "./context.js";
|
|
3
|
+
export declare const AGENT_REGISTRY_TOOL_NAMES: readonly ["nomoreide_profiles_publish", "nomoreide_profiles_install_from_registry", "nomoreide_profiles_register_github"];
|
|
4
|
+
/**
|
|
5
|
+
* Hosted profile registry (ROR-63; the brainctl platform, kept as-is).
|
|
6
|
+
* Auth comes from the stored registry sign-in (`~/.brainctl/config.json`) or
|
|
7
|
+
* `BRAINCTL_API_TOKEN` — sign-in itself is a browser flow in the web UI.
|
|
8
|
+
*/
|
|
9
|
+
export declare function registerAgentRegistryTools(server: FastMCP, _ctx: ToolContext): void;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { createRegistryClient, createRegistryTokenManager, installProfileFromRegistry, publishProfileToRegistry, resolveRegistryApiBaseUrl, resolveRegistryApiToken, } from "../../core/agent-profiles/index.js";
|
|
3
|
+
import { stringify } from "./context.js";
|
|
4
|
+
export const AGENT_REGISTRY_TOOL_NAMES = [
|
|
5
|
+
"nomoreide_profiles_publish",
|
|
6
|
+
"nomoreide_profiles_install_from_registry",
|
|
7
|
+
"nomoreide_profiles_register_github",
|
|
8
|
+
];
|
|
9
|
+
/**
|
|
10
|
+
* Hosted profile registry (ROR-63; the brainctl platform, kept as-is).
|
|
11
|
+
* Auth comes from the stored registry sign-in (`~/.brainctl/config.json`) or
|
|
12
|
+
* `BRAINCTL_API_TOKEN` — sign-in itself is a browser flow in the web UI.
|
|
13
|
+
*/
|
|
14
|
+
export function registerAgentRegistryTools(server, _ctx) {
|
|
15
|
+
const tokenManager = createRegistryTokenManager();
|
|
16
|
+
const authenticatedFetch = (input, init) => tokenManager.authenticatedFetch(typeof input === "string" ? input : input.toString(), init);
|
|
17
|
+
async function requireToken() {
|
|
18
|
+
if ((await tokenManager.getAccessToken()) === null) {
|
|
19
|
+
throw new Error("Not signed in to the profile registry. Sign in from the web UI (Agent Environments → Registry) or set BRAINCTL_API_TOKEN.");
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
server.addTool({
|
|
23
|
+
name: "nomoreide_profiles_publish",
|
|
24
|
+
description: "Publish a saved profile to the hosted registry so others can install it by slug. Uploads the credential-redacted export archive — raw secrets never leave the machine.",
|
|
25
|
+
parameters: z.object({
|
|
26
|
+
name: z.string().min(1).describe("Local profile name."),
|
|
27
|
+
slug: z.string().min(1).describe("Registry slug to publish under."),
|
|
28
|
+
title: z.string().min(1),
|
|
29
|
+
summary: z.string().optional(),
|
|
30
|
+
version: z.string().optional().describe("Defaults to 1.0.0."),
|
|
31
|
+
changelog: z.string().optional(),
|
|
32
|
+
visibility: z.enum(["public", "private"]).default("public"),
|
|
33
|
+
cwd: z.string().min(1).optional().describe("Project directory (defaults to the server's cwd)."),
|
|
34
|
+
}),
|
|
35
|
+
execute: async (input) => {
|
|
36
|
+
await requireToken();
|
|
37
|
+
return stringify(await publishProfileToRegistry({
|
|
38
|
+
...input,
|
|
39
|
+
cwd: input.cwd ?? process.cwd(),
|
|
40
|
+
apiBaseUrl: await resolveRegistryApiBaseUrl(),
|
|
41
|
+
fetch: authenticatedFetch,
|
|
42
|
+
}));
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
server.addTool({
|
|
46
|
+
name: "nomoreide_profiles_install_from_registry",
|
|
47
|
+
description: "Install a published profile from the hosted registry by slug. Supplied credentials (or matching environment variables) fill ${credentials.*} placeholders; unresolved keys are reported.",
|
|
48
|
+
parameters: z.object({
|
|
49
|
+
slug: z.string().min(1),
|
|
50
|
+
force: z.boolean().default(false).describe("Overwrite an existing profile of the same name."),
|
|
51
|
+
as: z.string().optional().describe("Install under a different local profile name."),
|
|
52
|
+
credentials: z.record(z.string()).optional(),
|
|
53
|
+
}),
|
|
54
|
+
execute: async (input) => stringify(await installProfileFromRegistry({
|
|
55
|
+
...input,
|
|
56
|
+
apiBaseUrl: await resolveRegistryApiBaseUrl(),
|
|
57
|
+
token: (await resolveRegistryApiToken())?.token,
|
|
58
|
+
})),
|
|
59
|
+
});
|
|
60
|
+
server.addTool({
|
|
61
|
+
name: "nomoreide_profiles_register_github",
|
|
62
|
+
description: "Register a GitHub repository as a registry profile — the registry serves it without a package upload (free sharing path).",
|
|
63
|
+
parameters: z.object({
|
|
64
|
+
repoUrl: z.string().min(1).describe("GitHub repository URL."),
|
|
65
|
+
slug: z.string().min(1),
|
|
66
|
+
title: z.string().min(1),
|
|
67
|
+
summary: z.string().optional(),
|
|
68
|
+
refName: z.string().optional().describe("Branch or tag (defaults to main)."),
|
|
69
|
+
profilePath: z.string().optional().describe("Path to the profile file inside the repo."),
|
|
70
|
+
}),
|
|
71
|
+
execute: async (input) => {
|
|
72
|
+
await requireToken();
|
|
73
|
+
const client = createRegistryClient({
|
|
74
|
+
baseUrl: await resolveRegistryApiBaseUrl(),
|
|
75
|
+
fetch: authenticatedFetch,
|
|
76
|
+
});
|
|
77
|
+
return stringify(await client.registerGithubProfile({ ...input, manifestJson: { name: input.slug } }));
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=agent-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-registry.js","sourceRoot":"","sources":["../../../src/mcp/tools/agent-registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAoB,MAAM,cAAc,CAAC;AAE3D,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,4BAA4B;IAC5B,0CAA0C;IAC1C,oCAAoC;CAC5B,CAAC;AAEX;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,MAAe,EAAE,IAAiB;IAC3E,MAAM,YAAY,GAAG,0BAA0B,EAAE,CAAC;IAClD,MAAM,kBAAkB,GAAG,CAAC,KAA6B,EAAE,IAAkB,EAAE,EAAE,CAC/E,YAAY,CAAC,kBAAkB,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,CAAC;IAE9F,KAAK,UAAU,YAAY;QACzB,IAAI,CAAC,MAAM,YAAY,CAAC,cAAc,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC;YACnD,MAAM,IAAI,KAAK,CACb,2HAA2H,CAC5H,CAAC;QACJ,CAAC;IACH,CAAC;IAED,MAAM,CAAC,OAAO,CAAC;QACb,IAAI,EAAE,4BAA4B;QAClC,WAAW,EACT,wKAAwK;QAC1K,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC;YACnB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,qBAAqB,CAAC;YACvD,IAAI,EA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BAClC,OAAO,EAAE,MAAM,yBAAyB,EAAE;gBAC1C,KAAK,EAAE,kBAAkB;aAC1B,CAAC,CAAC;YACH,OAAO,SAAS,CACd,MAAM,MAAM,CAAC,qBAAqB,CAAC,EAAE,GAAG,KAAK,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,CACrF,CAAC;QACJ,CAAC;KACF,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", "nomoreide_agents_add_mcp", "nomoreide_agents_remove_mcp", "nomoreide_agents_move_mcp_scope", "nomoreide_agents_move_skill_scope", "nomoreide_agents_snapshot_agent"];
|
|
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", "nomoreide_profiles_list", "nomoreide_profiles_get", "nomoreide_profiles_create", "nomoreide_profiles_update", "nomoreide_profiles_delete", "nomoreide_profiles_snapshot", "nomoreide_profiles_apply", "nomoreide_profiles_export", "nomoreide_profiles_import", "nomoreide_profiles_copy_items", "nomoreide_profiles_publish", "nomoreide_profiles_install_from_registry", "nomoreide_profiles_register_github"];
|
|
14
14
|
interface RegisterNoMoreIdeToolsOptions extends ToolContext {
|
|
15
15
|
server: FastMCP;
|
|
16
16
|
toolCallStore?: ToolCallStore;
|
package/dist/mcp/tools/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { wrapServerForRecording } from "./context.js";
|
|
2
2
|
import { AGENT_TOOL_NAMES, registerAgentTools } from "./agent.js";
|
|
3
3
|
import { AGENT_ENV_TOOL_NAMES, registerAgentEnvTools } from "./agent-env.js";
|
|
4
|
+
import { AGENT_PROFILE_TOOL_NAMES, registerAgentProfileTools } from "./agent-profiles.js";
|
|
5
|
+
import { AGENT_REGISTRY_TOOL_NAMES, registerAgentRegistryTools } from "./agent-registry.js";
|
|
4
6
|
import { DATABASE_TOOL_NAMES, registerDatabaseTools } from "./database.js";
|
|
5
7
|
import { DOC_TOOL_NAMES, registerDocTools } from "./docs.js";
|
|
6
8
|
import { ERROR_TOOL_NAMES, registerErrorTools } from "./errors.js";
|
|
@@ -28,6 +30,8 @@ export const NOMOREIDE_TOOL_NAMES = [
|
|
|
28
30
|
...DOC_TOOL_NAMES,
|
|
29
31
|
...AGENT_TOOL_NAMES,
|
|
30
32
|
...AGENT_ENV_TOOL_NAMES,
|
|
33
|
+
...AGENT_PROFILE_TOOL_NAMES,
|
|
34
|
+
...AGENT_REGISTRY_TOOL_NAMES,
|
|
31
35
|
];
|
|
32
36
|
export function registerNoMoreIdeTools(options) {
|
|
33
37
|
const { server: rawServer, toolCallStore, agentSessions, ...ctx } = options;
|
|
@@ -44,5 +48,7 @@ export function registerNoMoreIdeTools(options) {
|
|
|
44
48
|
registerDocTools(server, ctx);
|
|
45
49
|
registerAgentTools(server, ctx);
|
|
46
50
|
registerAgentEnvTools(server, ctx);
|
|
51
|
+
registerAgentProfileTools(server, ctx);
|
|
52
|
+
registerAgentRegistryTools(server, ctx);
|
|
47
53
|
}
|
|
48
54
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp/tools/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAoB,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE5E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,GAAG,kBAAkB;IACrB,GAAG,kBAAkB;IACrB,GAAG,cAAc;IACjB,GAAG,mBAAmB;IACtB,GAAG,iBAAiB;IACpB,GAAG,gBAAgB;IACnB,GAAG,mBAAmB;IACtB,GAAG,cAAc;IACjB,GAAG,gBA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