@dmsdc-ai/aigentry-deliberation 0.0.27 → 0.0.28
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/doctor.js +39 -39
- package/i18n.js +40 -0
- package/index.js +283 -283
- package/install.js +50 -50
- package/package.json +2 -1
- package/selectors/role-presets.json +6 -6
- package/selectors/roles/critic.md +9 -9
- package/selectors/roles/free.md +1 -1
- package/selectors/roles/implementer.md +9 -9
- package/selectors/roles/mediator.md +9 -9
- package/selectors/roles/researcher.md +9 -9
package/install.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* 3. Registers MCP server in ~/.claude/.mcp.json (Claude Code)
|
|
14
14
|
* 4. Registers MCP server in ~/.gemini/settings.json (Gemini CLI)
|
|
15
15
|
* 5. Ready to use — next Claude Code or Gemini CLI session will auto-load
|
|
16
|
-
* 6.
|
|
16
|
+
* 6. Installs skill file (~/.claude/skills/deliberation-gate/SKILL.md)
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import { execSync } from "node:child_process";
|
|
@@ -81,15 +81,15 @@ function copyDirRecursive(src, dest) {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
function install() {
|
|
84
|
-
console.log("\n🎯 Deliberation MCP Server —
|
|
84
|
+
console.log("\n🎯 Deliberation MCP Server — Installation started\n");
|
|
85
85
|
|
|
86
86
|
// Step 1: Create install directory
|
|
87
|
-
log("📁
|
|
87
|
+
log("📁 Creating install directory...");
|
|
88
88
|
fs.mkdirSync(INSTALL_DIR, { recursive: true });
|
|
89
89
|
log(` → ${INSTALL_DIR}`);
|
|
90
90
|
|
|
91
91
|
// Step 2: Copy files
|
|
92
|
-
log("📦
|
|
92
|
+
log("📦 Copying server files...");
|
|
93
93
|
let copied = 0;
|
|
94
94
|
for (const file of FILES_TO_COPY) {
|
|
95
95
|
if (copyFileIfExists(path.join(__dirname, file), path.join(INSTALL_DIR, file))) {
|
|
@@ -103,23 +103,23 @@ function install() {
|
|
|
103
103
|
copied++;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
log(` → ${copied}
|
|
106
|
+
log(` → ${copied} item(s) copied`);
|
|
107
107
|
|
|
108
108
|
// Step 3: Install dependencies
|
|
109
|
-
log("📥
|
|
109
|
+
log("📥 Installing dependencies...");
|
|
110
110
|
try {
|
|
111
111
|
execSync("npm install --production --no-audit --no-fund", {
|
|
112
112
|
cwd: INSTALL_DIR,
|
|
113
113
|
stdio: "pipe",
|
|
114
114
|
});
|
|
115
|
-
log(" → npm install
|
|
115
|
+
log(" → npm install complete");
|
|
116
116
|
} catch (err) {
|
|
117
|
-
log(` ⚠️ npm install
|
|
118
|
-
log("
|
|
117
|
+
log(` ⚠️ npm install failed: ${err.message}`);
|
|
118
|
+
log(" Manual fix: cd ~/.local/lib/mcp-deliberation && npm install");
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
// Step 4: Register MCP server
|
|
122
|
-
log("🔧 Claude Code MCP
|
|
122
|
+
log("🔧 Registering Claude Code MCP server...");
|
|
123
123
|
const claudeDir = path.join(HOME, ".claude");
|
|
124
124
|
fs.mkdirSync(claudeDir, { recursive: true });
|
|
125
125
|
|
|
@@ -142,11 +142,11 @@ function install() {
|
|
|
142
142
|
|
|
143
143
|
fs.writeFileSync(MCP_CONFIG, JSON.stringify(mcpConfig, null, 2));
|
|
144
144
|
log(alreadyRegistered
|
|
145
|
-
? " →
|
|
146
|
-
: " →
|
|
145
|
+
? " → Existing registration updated"
|
|
146
|
+
: " → Registered successfully");
|
|
147
147
|
|
|
148
148
|
// Step 5: Register Gemini CLI MCP server
|
|
149
|
-
log("🔧 Gemini CLI MCP
|
|
149
|
+
log("🔧 Registering Gemini CLI MCP server...");
|
|
150
150
|
const geminiDir = path.join(HOME, ".gemini");
|
|
151
151
|
if (!fs.existsSync(geminiDir)) fs.mkdirSync(geminiDir, { recursive: true });
|
|
152
152
|
|
|
@@ -169,8 +169,8 @@ function install() {
|
|
|
169
169
|
|
|
170
170
|
fs.writeFileSync(GEMINI_CONFIG, JSON.stringify(geminiConfig, null, 2));
|
|
171
171
|
log(geminiAlreadyRegistered
|
|
172
|
-
? " → Gemini CLI
|
|
173
|
-
: " → Gemini CLI
|
|
172
|
+
? " → Gemini CLI existing registration updated"
|
|
173
|
+
: " → Gemini CLI registered successfully");
|
|
174
174
|
|
|
175
175
|
// Step 6: Make session-monitor.sh executable
|
|
176
176
|
const monitorScript = path.join(INSTALL_DIR, "session-monitor.sh");
|
|
@@ -187,9 +187,9 @@ function install() {
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
// Step 7: Deploy deliberation-gate skill
|
|
190
|
-
log("🎓 deliberation-gate
|
|
190
|
+
log("🎓 Installing deliberation-gate skill file...");
|
|
191
191
|
if (!fs.existsSync(SKILL_SRC)) {
|
|
192
|
-
log(" ⚠️
|
|
192
|
+
log(" ⚠️ Skill source file not found, skipping: " + SKILL_SRC);
|
|
193
193
|
} else {
|
|
194
194
|
try {
|
|
195
195
|
fs.mkdirSync(SKILL_DEST_DIR, { recursive: true });
|
|
@@ -198,11 +198,11 @@ function install() {
|
|
|
198
198
|
const existing = fs.readFileSync(SKILL_DEST, "utf-8");
|
|
199
199
|
const incoming = fs.readFileSync(SKILL_SRC, "utf-8");
|
|
200
200
|
if (existing === incoming) {
|
|
201
|
-
log(" →
|
|
201
|
+
log(" → Already up to date, skipping");
|
|
202
202
|
shouldCopy = false;
|
|
203
203
|
} else {
|
|
204
204
|
fs.copyFileSync(SKILL_DEST, SKILL_DEST + ".backup");
|
|
205
|
-
log(" →
|
|
205
|
+
log(" → Existing file backed up: SKILL.md.backup");
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
if (shouldCopy) {
|
|
@@ -210,7 +210,7 @@ function install() {
|
|
|
210
210
|
log(" → " + SKILL_DEST);
|
|
211
211
|
}
|
|
212
212
|
} catch (err) {
|
|
213
|
-
log(` ⚠️
|
|
213
|
+
log(` ⚠️ Skill installation failed: ${err.message}`);
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
|
|
@@ -224,15 +224,15 @@ function install() {
|
|
|
224
224
|
};
|
|
225
225
|
fs.writeFileSync(MANIFEST_PATH, JSON.stringify(manifest, null, 2));
|
|
226
226
|
} catch (err) {
|
|
227
|
-
log(` ⚠️
|
|
227
|
+
log(` ⚠️ Failed to write manifest: ${err.message}`);
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
// Done
|
|
231
|
-
console.log("\n✅
|
|
232
|
-
console.log("
|
|
233
|
-
console.log(" 1. Claude Code
|
|
234
|
-
console.log(" 2.
|
|
235
|
-
console.log(" 3.
|
|
231
|
+
console.log("\n✅ Installation complete!\n");
|
|
232
|
+
console.log(" Next steps:");
|
|
233
|
+
console.log(" 1. Restart your Claude Code or Gemini CLI session");
|
|
234
|
+
console.log(" 2. Call deliberation_start(topic: \"...\") to start a deliberation");
|
|
235
|
+
console.log(" 3. On first use, the onboarding wizard will guide you through initial setup\n");
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
// Entry point
|
|
@@ -247,23 +247,23 @@ Usage:
|
|
|
247
247
|
node install.js
|
|
248
248
|
|
|
249
249
|
Options:
|
|
250
|
-
--help, -h
|
|
251
|
-
--uninstall
|
|
252
|
-
--force
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
-
|
|
256
|
-
- npm
|
|
257
|
-
- Claude Code / Gemini CLI
|
|
258
|
-
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
MCP
|
|
262
|
-
Gemini:
|
|
263
|
-
|
|
250
|
+
--help, -h Show this help message
|
|
251
|
+
--uninstall Remove the server
|
|
252
|
+
--force Overwrite existing skill file without comparison
|
|
253
|
+
|
|
254
|
+
Features:
|
|
255
|
+
- Copies server files to install directory
|
|
256
|
+
- Installs npm dependencies
|
|
257
|
+
- Registers MCP server in Claude Code / Gemini CLI
|
|
258
|
+
- Installs skill file (~/.claude/skills/deliberation-gate/SKILL.md)
|
|
259
|
+
|
|
260
|
+
Install path: ${INSTALL_DIR}
|
|
261
|
+
MCP config: ${MCP_CONFIG}
|
|
262
|
+
Gemini: ${GEMINI_CONFIG}
|
|
263
|
+
Skill path: ${SKILL_DEST}
|
|
264
264
|
`);
|
|
265
265
|
} else if (args.includes("--uninstall") || args.includes("uninstall")) {
|
|
266
|
-
console.log("\n🗑️ Deliberation MCP Server
|
|
266
|
+
console.log("\n🗑️ Deliberation MCP Server — Uninstalling\n");
|
|
267
267
|
|
|
268
268
|
// Remove from Claude MCP config
|
|
269
269
|
if (fs.existsSync(MCP_CONFIG)) {
|
|
@@ -272,7 +272,7 @@ Gemini: ${GEMINI_CONFIG}
|
|
|
272
272
|
if (mcpConfig.mcpServers?.deliberation) {
|
|
273
273
|
delete mcpConfig.mcpServers.deliberation;
|
|
274
274
|
fs.writeFileSync(MCP_CONFIG, JSON.stringify(mcpConfig, null, 2));
|
|
275
|
-
log("Claude Code MCP
|
|
275
|
+
log("Claude Code MCP server unregistered");
|
|
276
276
|
}
|
|
277
277
|
} catch { /* ignore */ }
|
|
278
278
|
}
|
|
@@ -284,7 +284,7 @@ Gemini: ${GEMINI_CONFIG}
|
|
|
284
284
|
if (geminiConfig.mcpServers?.deliberation) {
|
|
285
285
|
delete geminiConfig.mcpServers.deliberation;
|
|
286
286
|
fs.writeFileSync(GEMINI_CONFIG, JSON.stringify(geminiConfig, null, 2));
|
|
287
|
-
log("Gemini CLI MCP
|
|
287
|
+
log("Gemini CLI MCP server unregistered");
|
|
288
288
|
}
|
|
289
289
|
} catch { /* ignore */ }
|
|
290
290
|
}
|
|
@@ -304,20 +304,20 @@ Gemini: ${GEMINI_CONFIG}
|
|
|
304
304
|
if (fs.existsSync(skillPath)) {
|
|
305
305
|
try {
|
|
306
306
|
fs.rmSync(skillPath, { force: true });
|
|
307
|
-
log(
|
|
307
|
+
log(`Skill file removed: ${skillPath}`);
|
|
308
308
|
const backupPath = skillPath + ".backup";
|
|
309
309
|
if (fs.existsSync(backupPath)) {
|
|
310
|
-
log(` 💡
|
|
311
|
-
log(`
|
|
310
|
+
log(` 💡 Backup file remains: ${backupPath}`);
|
|
311
|
+
log(` To restore: cp "${backupPath}" "${skillPath}"`);
|
|
312
312
|
}
|
|
313
313
|
// Remove directory if empty
|
|
314
314
|
const dir = path.dirname(skillPath);
|
|
315
315
|
if (fs.existsSync(dir) && fs.readdirSync(dir).length === 0) {
|
|
316
316
|
fs.rmdirSync(dir);
|
|
317
|
-
log(
|
|
317
|
+
log(`Empty skill directory removed: ${dir}`);
|
|
318
318
|
}
|
|
319
319
|
} catch (err) {
|
|
320
|
-
log(` ⚠️
|
|
320
|
+
log(` ⚠️ Failed to remove skill file: ${err.message}`);
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
}
|
|
@@ -325,10 +325,10 @@ Gemini: ${GEMINI_CONFIG}
|
|
|
325
325
|
// Remove install directory
|
|
326
326
|
if (fs.existsSync(INSTALL_DIR)) {
|
|
327
327
|
fs.rmSync(INSTALL_DIR, { recursive: true, force: true });
|
|
328
|
-
log("
|
|
328
|
+
log("Install directory removed");
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
console.log("\n✅
|
|
331
|
+
console.log("\n✅ Uninstall complete. Please restart Claude Code / Gemini CLI.\n");
|
|
332
332
|
} else {
|
|
333
333
|
install();
|
|
334
334
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dmsdc-ai/aigentry-deliberation",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.28",
|
|
4
4
|
"description": "MCP Deliberation Server — Multi-session AI deliberation with smart speaker ordering and persona roles",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"index.js",
|
|
32
|
+
"i18n.js",
|
|
32
33
|
"decision-engine.js",
|
|
33
34
|
"model-router.js",
|
|
34
35
|
"install.js",
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"presets": {
|
|
3
3
|
"balanced": {
|
|
4
|
-
"description": "
|
|
4
|
+
"description": "Balanced discussion — critic, implementer, mediator perspectives",
|
|
5
5
|
"roles": ["critic", "implementer", "mediator"]
|
|
6
6
|
},
|
|
7
7
|
"debate": {
|
|
8
|
-
"description": "
|
|
8
|
+
"description": "Pro/con debate — critic-focused with mediator",
|
|
9
9
|
"roles": ["critic", "critic", "mediator"]
|
|
10
10
|
},
|
|
11
11
|
"research": {
|
|
12
|
-
"description": "
|
|
12
|
+
"description": "Research-driven — multiple researchers with critical validation",
|
|
13
13
|
"roles": ["researcher", "researcher", "critic"]
|
|
14
14
|
},
|
|
15
15
|
"brainstorm": {
|
|
16
|
-
"description": "
|
|
16
|
+
"description": "Free brainstorming — no role constraints",
|
|
17
17
|
"roles": ["free", "free", "free"]
|
|
18
18
|
},
|
|
19
19
|
"review": {
|
|
20
|
-
"description": "
|
|
20
|
+
"description": "Code/design review — critic, implementer, researcher perspectives",
|
|
21
21
|
"roles": ["critic", "implementer", "researcher"]
|
|
22
22
|
},
|
|
23
23
|
"consensus": {
|
|
24
|
-
"description": "
|
|
24
|
+
"description": "Consensus building — mediator-focused",
|
|
25
25
|
"roles": ["mediator", "critic", "implementer"]
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
You are a **Critic**. Identify weaknesses, risks, and logical flaws in every proposal.
|
|
2
|
+
Your goal is not to oppose for its own sake, but to raise the quality of discussion through constructive criticism.
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
(
|
|
4
|
+
Response structure:
|
|
5
|
+
## Criticism
|
|
6
|
+
(List specific problems)
|
|
7
7
|
|
|
8
|
-
##
|
|
9
|
-
(
|
|
8
|
+
## Rationale
|
|
9
|
+
(Explain why each issue is a problem, using evidence or logic)
|
|
10
10
|
|
|
11
|
-
##
|
|
12
|
-
minor / major / blocking
|
|
11
|
+
## Severity
|
|
12
|
+
Choose one: minor / major / blocking
|
package/selectors/roles/free.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Share your thoughts freely. Without being constrained by a specific role, contribute your own perspective on the discussion topic.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
You are an **Implementer**. Analyze the feasibility of proposals and present concrete implementation plans.
|
|
2
|
+
Transform abstract ideas into actionable plans.
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
(
|
|
4
|
+
Response structure:
|
|
5
|
+
## Proposal
|
|
6
|
+
(Concrete implementation approach)
|
|
7
7
|
|
|
8
|
-
##
|
|
9
|
-
low / medium / high
|
|
8
|
+
## Implementation Complexity
|
|
9
|
+
Choose one: low / medium / high + estimated code change volume
|
|
10
10
|
|
|
11
|
-
##
|
|
12
|
-
(
|
|
11
|
+
## Code Sketch
|
|
12
|
+
(Pseudocode or actual code for the core logic)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
You are a **Mediator**. Synthesize the participants' views and find common ground.
|
|
2
|
+
Resolve conflicts and guide the discussion toward productive conclusions.
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
(
|
|
4
|
+
Response structure:
|
|
5
|
+
## Points of Agreement
|
|
6
|
+
(Summarize what participants agree on)
|
|
7
7
|
|
|
8
|
-
##
|
|
9
|
-
(
|
|
8
|
+
## Unresolved Issues
|
|
9
|
+
(Points that have not yet reached consensus)
|
|
10
10
|
|
|
11
|
-
##
|
|
12
|
-
(
|
|
11
|
+
## Recommendation
|
|
12
|
+
(Your final recommendation as mediator)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
You are a **Researcher**. Support the discussion with external case studies, data, and benchmarks.
|
|
2
|
+
Every claim must be backed by evidence.
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
(
|
|
4
|
+
Response structure:
|
|
5
|
+
## Findings
|
|
6
|
+
(Relevant case studies, data, and existing solutions)
|
|
7
7
|
|
|
8
|
-
##
|
|
9
|
-
(
|
|
8
|
+
## Comparative Analysis
|
|
9
|
+
(Comparison table of alternatives with pros and cons)
|
|
10
10
|
|
|
11
|
-
##
|
|
12
|
-
(
|
|
11
|
+
## Evidence-Based Recommendation
|
|
12
|
+
(Recommendation grounded in data)
|