@duom/cli 1.0.0 → 1.0.1

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/bin/duom.mjs CHANGED
@@ -1,100 +1,100 @@
1
- #!/usr/bin/env node
2
- import { homedir } from "node:os";
3
- import { createInterface } from "node:readline/promises";
4
- import { parseArgs } from "node:util";
5
- import { removeItem, undoLast } from "../src/files.mjs";
6
- import { prepare } from "../src/items.mjs";
7
-
8
- const CLIENTS = ["cursor", "vscode", "lmstudio", "claude-code", "codex", "grok", "gemini"];
9
- const USAGE = `duom: install MCP servers, skills, rules and stacks with a risk check, backup and undo
10
-
11
- duom add <name> [--client <${CLIENTS.join("|")}>] [--global] [--option N] [--yes] [--allow-high]
12
-
13
- <name> is what the item's DUOM page shows, for example:
14
- io.github.owner/repo MCP server (needs --client)
15
- skill/owner/repo/skill-name skill -> the tool's skills folder (.claude/skills, .cursor/skills,
16
- .github/skills, .gemini/skills; .agents/skills for codex or no --client)
17
- rule/nextjs rule -> one marked block in AGENTS.md (CLAUDE.md for claude-code,
18
- GEMINI.md for gemini); the rest of the file is left alone
19
- stack/nextjs-supabase stack -> every member above (needs --client if it has MCP servers)
20
-
21
- --global skills: install into your home folder, for every project
22
- --option N MCP servers: pick another install option (npx, Docker, remote ...)
23
- --yes skip the "Install?" question (high risk signals still ask)
24
- --allow-high install despite high risk signals without asking
25
-
26
- duom remove <name> take out one item you added (a stack name removes its members);
27
- rules and MCP entries come out of the file, the rest of it stays as it is now
28
- duom undo remove whatever the last add put in (a whole stack at once)
29
- duom mcp run the local MCP server (stdio) so an agent can install, or run a server and use it
30
- right away, with your approval (keys for those: ~/.duom/keys.env, NAME=value)
31
-
32
- DUOM_API_URL another DUOM site, e.g. a self-hosted one (http://localhost:3000 while developing)
33
- DUOM_API_KEY optional API key for higher rate limits`;
34
-
35
- async function ask(question) {
36
- if (!process.stdin.isTTY) return "";
37
- const rl = createInterface({ input: process.stdin, output: process.stdout });
38
- const a = await rl.question(question);
39
- rl.close();
40
- return a.trim().toLowerCase();
41
- }
42
-
43
- async function add(args) {
44
- const { values, positionals } = parseArgs({
45
- args,
46
- allowPositionals: true,
47
- options: {
48
- client: { type: "string" },
49
- global: { type: "boolean" },
50
- option: { type: "string", default: "0" },
51
- yes: { type: "boolean" },
52
- "allow-high": { type: "boolean" },
53
- },
54
- });
55
- const [name] = positionals;
56
- if (!name || (values.client && !CLIENTS.includes(values.client))) throw new Error(USAGE);
57
- const steps = await prepare(name, values.client ?? "", { cwd: process.cwd(), home: homedir(), global: values.global, option: Number(values.option) });
58
- console.log(steps.map((s) => s.text).join("\n\n"));
59
- console.log("");
60
-
61
- // High signals always need a typed "yes"; --yes alone does not skip them.
62
- const high = steps.flatMap((s) => s.high);
63
- if (high.length && !values["allow-high"]) {
64
- if ((await ask(`HIGH risk signals above (${high.length}). Type "yes" to install anyway: `)) !== "yes") throw new Error("Cancelled.");
65
- } else if (!values.yes && (await ask(`Install${steps.length > 1 ? ` ${steps.length} items` : ""}? [y/N] `)) !== "y") {
66
- throw new Error(process.stdin.isTTY ? "Cancelled." : "No terminal to confirm in. Re-run with --yes after reading the details above.");
67
- }
68
-
69
- const group = `${name}@${Date.now()}`;
70
- let failed = 0;
71
- for (const s of steps) {
72
- try {
73
- const where = await s.apply({ item: s.info.name, version: s.info.version, client: values.client ?? null, group });
74
- console.log(`Added ${s.info.title} -> ${where}`);
75
- if (s.blanks?.length) console.log(` Fill in ${s.blanks.join(", ")} in that file.`);
76
- } catch (e) {
77
- failed++;
78
- console.log(`Skipped ${s.info.title}: ${e.message}`);
79
- }
80
- }
81
- if (failed === steps.length) throw new Error("Nothing was installed.");
82
- console.log(`Undo with: npx @duom/cli@1 undo (or later: npx @duom/cli@1 remove ${name})`);
83
- }
84
-
85
- const [cmd, ...rest] = process.argv.slice(2);
86
- try {
87
- if (cmd === "add") await add(rest);
88
- else if (cmd === "undo") {
89
- const done = undoLast();
90
- console.log(done ? done.map((e) => `Undid ${e.item ?? e.server}: ${e.result}`).join("\n") : "Nothing to undo.");
91
- } else if (cmd === "remove") {
92
- if (!rest[0]) throw new Error("Usage: duom remove <name>");
93
- const done = removeItem(rest[0]);
94
- console.log(done.length ? done.map((e) => `Removed ${e.item}: ${e.result}`).join("\n") : `duom has no record of adding ${rest[0]} on this computer.`);
95
- } else if (cmd === "mcp") await (await import("../src/mcp.mjs")).serve();
96
- else console.log(USAGE);
97
- } catch (e) {
98
- console.error(e.message);
99
- process.exit(1);
100
- }
1
+ #!/usr/bin/env node
2
+ import { homedir } from "node:os";
3
+ import { createInterface } from "node:readline/promises";
4
+ import { parseArgs } from "node:util";
5
+ import { removeItem, undoLast } from "../src/files.mjs";
6
+ import { prepare } from "../src/items.mjs";
7
+
8
+ const CLIENTS = ["cursor", "vscode", "lmstudio", "claude-code", "codex", "grok", "gemini"];
9
+ const USAGE = `duom: install MCP servers, skills, rules and stacks with a risk check, backup and undo
10
+
11
+ duom add <name> [--client <${CLIENTS.join("|")}>] [--global] [--option N] [--yes] [--allow-high]
12
+
13
+ <name> is what the item's DuoM page shows, for example:
14
+ io.github.owner/repo MCP server (needs --client)
15
+ skill/owner/repo/skill-name skill -> the tool's skills folder (.claude/skills, .cursor/skills,
16
+ .github/skills, .gemini/skills; .agents/skills for codex or no --client)
17
+ rule/nextjs rule -> one marked block in AGENTS.md (CLAUDE.md for claude-code,
18
+ GEMINI.md for gemini); the rest of the file is left alone
19
+ stack/nextjs-supabase stack -> every member above (needs --client if it has MCP servers)
20
+
21
+ --global skills: install into your home folder, for every project
22
+ --option N MCP servers: pick another install option (npx, Docker, remote ...)
23
+ --yes skip the "Install?" question (high risk signals still ask)
24
+ --allow-high install despite high risk signals without asking
25
+
26
+ duom remove <name> take out one item you added (a stack name removes its members);
27
+ rules and MCP entries come out of the file, the rest of it stays as it is now
28
+ duom undo remove whatever the last add put in (a whole stack at once)
29
+ duom mcp run the local MCP server (stdio) so an agent can install, or run a server and use it
30
+ right away, with your approval (keys for those: ~/.duom/keys.env, NAME=value)
31
+
32
+ DUOM_API_URL another DuoM site, e.g. a self-hosted one (http://localhost:3000 while developing)
33
+ DUOM_API_KEY optional API key for higher rate limits`;
34
+
35
+ async function ask(question) {
36
+ if (!process.stdin.isTTY) return "";
37
+ const rl = createInterface({ input: process.stdin, output: process.stdout });
38
+ const a = await rl.question(question);
39
+ rl.close();
40
+ return a.trim().toLowerCase();
41
+ }
42
+
43
+ async function add(args) {
44
+ const { values, positionals } = parseArgs({
45
+ args,
46
+ allowPositionals: true,
47
+ options: {
48
+ client: { type: "string" },
49
+ global: { type: "boolean" },
50
+ option: { type: "string", default: "0" },
51
+ yes: { type: "boolean" },
52
+ "allow-high": { type: "boolean" },
53
+ },
54
+ });
55
+ const [name] = positionals;
56
+ if (!name || (values.client && !CLIENTS.includes(values.client))) throw new Error(USAGE);
57
+ const steps = await prepare(name, values.client ?? "", { cwd: process.cwd(), home: homedir(), global: values.global, option: Number(values.option) });
58
+ console.log(steps.map((s) => s.text).join("\n\n"));
59
+ console.log("");
60
+
61
+ // High signals always need a typed "yes"; --yes alone does not skip them.
62
+ const high = steps.flatMap((s) => s.high);
63
+ if (high.length && !values["allow-high"]) {
64
+ if ((await ask(`HIGH risk signals above (${high.length}). Type "yes" to install anyway: `)) !== "yes") throw new Error("Cancelled.");
65
+ } else if (!values.yes && (await ask(`Install${steps.length > 1 ? ` ${steps.length} items` : ""}? [y/N] `)) !== "y") {
66
+ throw new Error(process.stdin.isTTY ? "Cancelled." : "No terminal to confirm in. Re-run with --yes after reading the details above.");
67
+ }
68
+
69
+ const group = `${name}@${Date.now()}`;
70
+ let failed = 0;
71
+ for (const s of steps) {
72
+ try {
73
+ const where = await s.apply({ item: s.info.name, version: s.info.version, client: values.client ?? null, group });
74
+ console.log(`Added ${s.info.title} -> ${where}`);
75
+ if (s.blanks?.length) console.log(` Fill in ${s.blanks.join(", ")} in that file.`);
76
+ } catch (e) {
77
+ failed++;
78
+ console.log(`Skipped ${s.info.title}: ${e.message}`);
79
+ }
80
+ }
81
+ if (failed === steps.length) throw new Error("Nothing was installed.");
82
+ console.log(`Undo with: npx @duom/cli@1 undo (or later: npx @duom/cli@1 remove ${name})`);
83
+ }
84
+
85
+ const [cmd, ...rest] = process.argv.slice(2);
86
+ try {
87
+ if (cmd === "add") await add(rest);
88
+ else if (cmd === "undo") {
89
+ const done = undoLast();
90
+ console.log(done ? done.map((e) => `Undid ${e.item ?? e.server}: ${e.result}`).join("\n") : "Nothing to undo.");
91
+ } else if (cmd === "remove") {
92
+ if (!rest[0]) throw new Error("Usage: duom remove <name>");
93
+ const done = removeItem(rest[0]);
94
+ console.log(done.length ? done.map((e) => `Removed ${e.item}: ${e.result}`).join("\n") : `duom has no record of adding ${rest[0]} on this computer.`);
95
+ } else if (cmd === "mcp") await (await import("../src/mcp.mjs")).serve();
96
+ else console.log(USAGE);
97
+ } catch (e) {
98
+ console.error(e.message);
99
+ process.exit(1);
100
+ }
package/package.json CHANGED
@@ -1,43 +1,43 @@
1
- {
2
- "name": "@duom/cli",
3
- "version": "1.0.0",
4
- "description": "Install MCP servers, skills, rules and stacks into Claude Code, Cursor, VS Code, Codex, Gemini CLI and more, checked for risk first, with undo.",
5
- "homepage": "https://duom.cloud",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/studodoum-sys/DuoM.git",
9
- "directory": "packages/cli"
10
- },
11
- "keywords": [
12
- "mcp",
13
- "model-context-protocol",
14
- "agent-skills",
15
- "claude-code",
16
- "cursor",
17
- "codex",
18
- "gemini-cli"
19
- ],
20
- "type": "module",
21
- "bin": {
22
- "duom": "bin/duom.mjs"
23
- },
24
- "files": [
25
- "bin",
26
- "src",
27
- "!src/*.test.mjs"
28
- ],
29
- "engines": {
30
- "node": ">=20"
31
- },
32
- "scripts": {
33
- "test": "node --test src/files.test.mjs src/gateway.test.mjs",
34
- "prepublishOnly": "node -e \"import('./src/api.mjs').then(m => { if (!m.DEFAULT_API) { console.error('Set DEFAULT_API in src/api.mjs to the production URL first.'); process.exit(1) } })\""
35
- },
36
- "dependencies": {
37
- "@modelcontextprotocol/sdk": "1.32.2",
38
- "zod": "4.6.7"
39
- },
40
- "publishConfig": {
41
- "access": "public"
42
- }
43
- }
1
+ {
2
+ "name": "@duom/cli",
3
+ "version": "1.0.1",
4
+ "description": "Install MCP servers, skills, rules and stacks into Claude Code, Cursor, VS Code, Codex, Gemini CLI and more, checked for risk first, with undo.",
5
+ "homepage": "https://duom.cloud",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/studodoum-sys/DuoM.git",
9
+ "directory": "packages/cli"
10
+ },
11
+ "keywords": [
12
+ "mcp",
13
+ "model-context-protocol",
14
+ "agent-skills",
15
+ "claude-code",
16
+ "cursor",
17
+ "codex",
18
+ "gemini-cli"
19
+ ],
20
+ "type": "module",
21
+ "bin": {
22
+ "duom": "bin/duom.mjs"
23
+ },
24
+ "files": [
25
+ "bin",
26
+ "src",
27
+ "!src/*.test.mjs"
28
+ ],
29
+ "engines": {
30
+ "node": ">=20"
31
+ },
32
+ "scripts": {
33
+ "test": "node --test src/files.test.mjs src/gateway.test.mjs",
34
+ "prepublishOnly": "node -e \"import('./src/api.mjs').then(m => { if (!m.DEFAULT_API) { console.error('Set DEFAULT_API in src/api.mjs to the production URL first.'); process.exit(1) } })\""
35
+ },
36
+ "dependencies": {
37
+ "@modelcontextprotocol/sdk": "1.32.2",
38
+ "zod": "4.6.7"
39
+ },
40
+ "publishConfig": {
41
+ "access": "public"
42
+ }
43
+ }
package/src/api.mjs CHANGED
@@ -1,41 +1,41 @@
1
- // The production site. The vercel.app address, not duom.cloud: if the domain ever lapsed, whoever bought it would be
2
- // answering every installed CLI (supply-chain risk), while the vercel.app name stays ours.
3
- // Never localhost: a published CLI pointing there would talk to whatever happens to run on the user's port 3000.
4
- export const DEFAULT_API = "https://duom-brown.vercel.app";
5
- const base = process.env.DUOM_API_URL || DEFAULT_API;
6
- export const API = base.replace(/\/$/, "");
7
-
8
- export async function api(path) {
9
- if (!API) throw new Error("No DUOM site set. For a self-hosted or local DUOM, set DUOM_API_URL (for example http://localhost:3000).");
10
- const headers = process.env.DUOM_API_KEY ? { authorization: `Bearer ${process.env.DUOM_API_KEY}` } : {};
11
- const res = await fetch(API + path, { headers });
12
- const body = await res.json().catch(() => ({}));
13
- if (!res.ok) throw new Error(body.error === "not_found" ? "Not found in DUOM. Check the name on the item's page." : `DUOM API error ${res.status}: ${body.error ?? "unknown"}`);
14
- return body;
15
- }
16
-
17
- export const installInfo = (name, client = "") =>
18
- api(`/api/v1/install/${name.split("/").map(encodeURIComponent).join("/")}${client ? `?client=${encodeURIComponent(client)}` : ""}`);
19
-
20
- // What will change on disk for one install option; shared by the CLI and the local MCP server.
21
- export function plan(info, optionIndex = 0) {
22
- const o = info.options[optionIndex];
23
- if (!o) throw new Error(`No install option ${optionIndex}. Options: ${info.options.map((x, i) => `${i}=${x.option}`).join(", ")}`);
24
- const name = info.name.split("/").pop().replace(/[^\w-]/g, "-");
25
- const high = info.signals.filter((s) => s.severity === "high");
26
- const blanks = o.launch.type === "stdio" ? o.launch.env : o.launch.headers;
27
- return { o, name, high, blanks };
28
- }
29
-
30
- export function describe(info, p) {
31
- const lines = [
32
- `${info.title} (${info.name}) v${info.version}`,
33
- `Install option: ${p.o.option}`,
34
- `Will run on your machine: ${p.o.runs}`,
35
- `Config file: ${p.o.file.path.default}`,
36
- info.signals.length ? "Risk signals:" : "Risk signals: none found in registry metadata (code not scanned; not a safety guarantee)",
37
- ...info.signals.map((s) => ` [${s.severity}] ${s.message} (${s.evidence})`),
38
- ];
39
- if (p.blanks.length) lines.push(`You will need to fill in: ${p.blanks.join(", ")}`);
40
- return lines.join("\n");
41
- }
1
+ // The production site. The vercel.app address, not duom.cloud: if the domain ever lapsed, whoever bought it would be
2
+ // answering every installed CLI (supply-chain risk), while the vercel.app name stays ours.
3
+ // Never localhost: a published CLI pointing there would talk to whatever happens to run on the user's port 3000.
4
+ export const DEFAULT_API = "https://duom-brown.vercel.app";
5
+ const base = process.env.DUOM_API_URL || DEFAULT_API;
6
+ export const API = base.replace(/\/$/, "");
7
+
8
+ export async function api(path) {
9
+ if (!API) throw new Error("No DuoM site set. For a self-hosted or local DuoM, set DUOM_API_URL (for example http://localhost:3000).");
10
+ const headers = process.env.DUOM_API_KEY ? { authorization: `Bearer ${process.env.DUOM_API_KEY}` } : {};
11
+ const res = await fetch(API + path, { headers });
12
+ const body = await res.json().catch(() => ({}));
13
+ if (!res.ok) throw new Error(body.error === "not_found" ? "Not found in DuoM. Check the name on the item's page." : `DuoM API error ${res.status}: ${body.error ?? "unknown"}`);
14
+ return body;
15
+ }
16
+
17
+ export const installInfo = (name, client = "") =>
18
+ api(`/api/v1/install/${name.split("/").map(encodeURIComponent).join("/")}${client ? `?client=${encodeURIComponent(client)}` : ""}`);
19
+
20
+ // What will change on disk for one install option; shared by the CLI and the local MCP server.
21
+ export function plan(info, optionIndex = 0) {
22
+ const o = info.options[optionIndex];
23
+ if (!o) throw new Error(`No install option ${optionIndex}. Options: ${info.options.map((x, i) => `${i}=${x.option}`).join(", ")}`);
24
+ const name = info.name.split("/").pop().replace(/[^\w-]/g, "-");
25
+ const high = info.signals.filter((s) => s.severity === "high");
26
+ const blanks = o.launch.type === "stdio" ? o.launch.env : o.launch.headers;
27
+ return { o, name, high, blanks };
28
+ }
29
+
30
+ export function describe(info, p) {
31
+ const lines = [
32
+ `${info.title} (${info.name}) v${info.version}`,
33
+ `Install option: ${p.o.option}`,
34
+ `Will run on your machine: ${p.o.runs}`,
35
+ `Config file: ${p.o.file.path.default}`,
36
+ info.signals.length ? "Risk signals:" : "Risk signals: none found in registry metadata (code not scanned; not a safety guarantee)",
37
+ ...info.signals.map((s) => ` [${s.severity}] ${s.message} (${s.evidence})`),
38
+ ];
39
+ if (p.blanks.length) lines.push(`You will need to fill in: ${p.blanks.join(", ")}`);
40
+ return lines.join("\n");
41
+ }
package/src/items.mjs CHANGED
@@ -1,4 +1,4 @@
1
- // Turns any DUOM item (MCP server, skill, rule, stack) into install steps: what will change, its risk signals, and apply().
1
+ // Turns any DuoM item (MCP server, skill, rule, stack) into install steps: what will change, its risk signals, and apply().
2
2
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
3
3
  import { dirname, join, resolve, sep } from "node:path";
4
4
  import { describe, installInfo, plan } from "./api.mjs";
@@ -39,7 +39,7 @@ function skillStep(info, opts) {
39
39
  return {
40
40
  info,
41
41
  high: highOf(info),
42
- text: [`${info.title} (${info.name}) @${info.version}`, `Skill folder: ${dir}`, `Files: ${info.skill.files.length} from GitHub at the checked commit (license included), plus a source notice`, ...signalLines(info, "skill files read by DUOM")].join("\n"),
42
+ text: [`${info.title} (${info.name}) @${info.version}`, `Skill folder: ${dir}`, `Files: ${info.skill.files.length} from GitHub at the checked commit (license included), plus a source notice`, ...signalLines(info, "skill files read by DuoM")].join("\n"),
43
43
  async apply(meta) {
44
44
  if (existsSync(dir)) throw new Error(`${dir} already exists. Remove it first.`);
45
45
  // Download everything before writing anything, so a failed download leaves no half-installed skill.
@@ -102,7 +102,7 @@ async function step(name, client, opts) {
102
102
  if (info.type === "skill") return skillStep(info, opts);
103
103
  if (info.type === "rule") return ruleStep(info, opts);
104
104
  if (info.type === "mcp" || info.options) return mcpStep(info, client, opts);
105
- throw new Error(`${name}: DUOM cannot install this type (${info.type}) yet.`);
105
+ throw new Error(`${name}: DuoM cannot install this type (${info.type}) yet.`);
106
106
  }
107
107
 
108
108
  // One step per item; a stack expands to its members.
package/src/mcp.mjs CHANGED
@@ -1,4 +1,4 @@
1
- // Local MCP server (stdio): lets an agent search DUOM and install an item (MCP server, skill, rule, stack) on this machine.
1
+ // Local MCP server (stdio): lets an agent search DuoM and install an item (MCP server, skill, rule, stack) on this machine.
2
2
  // Every install needs the user's approval through MCP elicitation; without it the tool refuses and hands back the CLI command.
3
3
  // use_server/call_tool: the agent can also run a catalog server right away; the user approves each server once per session.
4
4
  import { homedir } from "node:os";
@@ -10,7 +10,7 @@ import { Gateway, hasCommand, KEYS_FILE, loadKeys, resolveLaunch } from "./gatew
10
10
  import { prepare } from "./items.mjs";
11
11
 
12
12
  const CLIENTS = ["cursor", "vscode", "lmstudio", "claude-code", "codex", "grok", "gemini"];
13
- const text = (t) => ({ content: [{ type: "text", text: typeof t === "string" ? t : JSON.stringify(t, null, 2) }] });
13
+ const text = (t) => ({ content: [{ type: "text", text: typeof t === "string" ? t : JSON.stringify(t) }] });
14
14
  // No high signals: Accept alone approves (the box starts checked). High signals: the box must be ticked on purpose.
15
15
  const approval = (high, title) => ({
16
16
  type: "object",
@@ -18,24 +18,38 @@ const approval = (high, title) => ({
18
18
  ...(high ? { required: ["approve"] } : {}),
19
19
  });
20
20
  const approved = (answer, high) => answer.action === "accept" && (answer.content?.approve === true || (!high && answer.content?.approve !== false));
21
+ // Only what an agent needs to pick an item; empty values left out. Icons, dates and score internals cost tokens and help no one.
22
+ export const brief = ({ total, hasMore, items }) => ({
23
+ total,
24
+ hasMore,
25
+ items: items.map((r) =>
26
+ Object.fromEntries(
27
+ Object.entries({
28
+ name: r.name, title: r.title, description: r.description, runs: r.kinds?.join(","), auth: r.auth,
29
+ signals: r.signalCount || undefined, highestSignal: r.signalLevel, popularity: r.popularity,
30
+ stars: r.stars, weeklyDownloads: r.weeklyDownloads, installs: r.installs,
31
+ }).filter(([, v]) => v != null && v !== ""),
32
+ ),
33
+ ),
34
+ });
21
35
  const path = (name) => name.split("/").map(encodeURIComponent).join("/");
22
36
 
23
37
  export async function serve() {
24
- const server = new McpServer({ name: "duom-local", version: "0.2.0" });
38
+ const server = new McpServer({ name: "duom-local", version: "1.0.1" });
25
39
 
26
40
  server.registerTool(
27
41
  "search_catalog",
28
42
  {
29
- description: "Search DUOM: MCP servers, skills, stacks and rules, ranked by popularity.",
43
+ description: "Search DuoM: MCP servers, skills, stacks and rules, ranked by popularity.",
30
44
  inputSchema: { query: z.string().max(100), type: z.enum(["all", "mcp", "skill", "stack", "rule"]).optional() },
31
45
  annotations: { readOnlyHint: true },
32
46
  },
33
- async ({ query, type }) => text(await api(`/api/v1/items?q=${encodeURIComponent(query)}${type ? `&type=${type}` : ""}`)),
47
+ async ({ query, type }) => text(brief(await api(`/api/v1/items?q=${encodeURIComponent(query)}${type ? `&type=${type}` : ""}`))),
34
48
  );
35
49
 
36
50
  server.registerTool(
37
51
  "get_item",
38
- { description: "Details and risk signals of one DUOM item.", inputSchema: { name: z.string().max(300) }, annotations: { readOnlyHint: true } },
52
+ { description: "Details and risk signals of one DuoM item.", inputSchema: { name: z.string().max(300) }, annotations: { readOnlyHint: true } },
39
53
  async ({ name }) => text(await api(`/api/v1/items/${path(name)}`)),
40
54
  );
41
55
 
@@ -43,7 +57,7 @@ export async function serve() {
43
57
  "install_item",
44
58
  {
45
59
  description:
46
- "Install a DUOM item on this machine: an MCP server into a client's config, a skill into the project's skills folder, " +
60
+ "Install a DuoM item on this machine: an MCP server into a client's config, a skill into the project's skills folder, " +
47
61
  "a rule into AGENTS.md (or CLAUDE.md/GEMINI.md), or every member of a stack. The user must approve in their client; " +
48
62
  "changed files are backed up and `npx @duom/cli@1 undo` reverts the whole install.",
49
63
  inputSchema: {
@@ -88,7 +102,7 @@ export async function serve() {
88
102
  "use_server",
89
103
  {
90
104
  description:
91
- "Start a DUOM MCP server on this machine so you can use its tools now, with call_tool. The user approves each server once " +
105
+ "Start a DuoM MCP server on this machine so you can use its tools now, with call_tool. The user approves each server once " +
92
106
  "per session (they see the exact command, the keys it reads and its risk signals). Returns the server's tools. " +
93
107
  `API keys are never passed through you: the user puts them in ${KEYS_FILE} (NAME=value) or their environment.`,
94
108
  inputSchema: {
@@ -118,7 +132,7 @@ export async function serve() {
118
132
  "or to install the missing command. Never ask them to paste key values into the chat.",
119
133
  );
120
134
  if (!server.server.getClientCapabilities()?.elicitation)
121
- return text("Not started: this client cannot ask the user for approval, and DUOM never runs a server without it.");
135
+ return text("Not started: this client cannot ask the user for approval, and DuoM never runs a server without it.");
122
136
  const high = info.signals.filter((s) => s.severity === "high");
123
137
  const used = pick.o.launch.type === "stdio" ? pick.o.launch.env : pick.o.launch.headers;
124
138
  const details = [