@dmsdc-ai/aigentry-deliberation 0.0.1 → 0.0.4
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/README.md +19 -21
- package/index.js +47 -2
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -16,39 +16,37 @@ MCP Deliberation Server — Multi-session AI deliberation with smart speaker ord
|
|
|
16
16
|
|
|
17
17
|
## Installation
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
원클릭 설치 — 어떤 프로젝트 환경에서든 동작합니다:
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
|
|
22
|
+
npx @dmsdc-ai/aigentry-deliberation install
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
이 명령은:
|
|
26
|
+
1. `~/.local/lib/mcp-deliberation/`에 서버 파일 설치 (Windows: `%LOCALAPPDATA%/mcp-deliberation/`)
|
|
27
|
+
2. npm 의존성 설치
|
|
28
|
+
3. `~/.claude/.mcp.json`에 MCP 서버 자동 등록
|
|
29
|
+
4. Claude Code 재시작하면 바로 사용 가능
|
|
30
|
+
|
|
31
|
+
### 기타 설치 방법
|
|
26
32
|
|
|
27
33
|
```bash
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
# 글로벌 설치
|
|
35
|
+
npm install -g @dmsdc-ai/aigentry-deliberation
|
|
36
|
+
deliberation-install
|
|
30
37
|
|
|
31
|
-
|
|
38
|
+
# aigentry-devkit 통합 설치
|
|
39
|
+
npx @dmsdc-ai/aigentry-devkit setup
|
|
32
40
|
|
|
33
|
-
|
|
41
|
+
# 소스에서 직접 설치
|
|
34
42
|
git clone https://github.com/dmsdc-ai/aigentry-deliberation.git
|
|
35
|
-
cd aigentry-deliberation
|
|
36
|
-
npm install
|
|
43
|
+
cd aigentry-deliberation && npm install && node install.js
|
|
37
44
|
```
|
|
38
45
|
|
|
39
|
-
|
|
46
|
+
### 제거
|
|
40
47
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
```json
|
|
44
|
-
{
|
|
45
|
-
"mcpServers": {
|
|
46
|
-
"deliberation": {
|
|
47
|
-
"command": "node",
|
|
48
|
-
"args": ["/path/to/aigentry-deliberation/index.js"]
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
48
|
+
```bash
|
|
49
|
+
npx @dmsdc-ai/aigentry-deliberation uninstall
|
|
52
50
|
```
|
|
53
51
|
|
|
54
52
|
## MCP Tools
|
package/index.js
CHANGED
|
@@ -1,4 +1,36 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// ── CLI command routing (must be before any imports) ──
|
|
4
|
+
// Supports: npx @dmsdc-ai/aigentry-deliberation install
|
|
5
|
+
// npx @dmsdc-ai/aigentry-deliberation --help
|
|
6
|
+
const _cliArg = process.argv[2];
|
|
7
|
+
if (_cliArg === "install" || _cliArg === "uninstall" || _cliArg === "--uninstall") {
|
|
8
|
+
const { execFileSync } = await import("node:child_process");
|
|
9
|
+
const { fileURLToPath } = await import("node:url");
|
|
10
|
+
const { dirname, join } = await import("node:path");
|
|
11
|
+
const __installDir = dirname(fileURLToPath(import.meta.url));
|
|
12
|
+
const installArgs = _cliArg === "install" ? [] : ["--uninstall"];
|
|
13
|
+
try {
|
|
14
|
+
execFileSync(process.execPath, [join(__installDir, "install.js"), ...installArgs], { stdio: "inherit" });
|
|
15
|
+
} catch (e) {
|
|
16
|
+
process.exit(e.status || 1);
|
|
17
|
+
}
|
|
18
|
+
process.exit(0);
|
|
19
|
+
}
|
|
20
|
+
if (_cliArg === "--help" || _cliArg === "-h") {
|
|
21
|
+
console.log(`
|
|
22
|
+
MCP Deliberation Server
|
|
23
|
+
|
|
24
|
+
Usage:
|
|
25
|
+
npx @dmsdc-ai/aigentry-deliberation install 설치 (MCP 서버 등록)
|
|
26
|
+
npx @dmsdc-ai/aigentry-deliberation uninstall 제거
|
|
27
|
+
npx @dmsdc-ai/aigentry-deliberation MCP 서버 실행 (stdio)
|
|
28
|
+
|
|
29
|
+
설치 후 Claude Code를 재시작하면 자동으로 사용 가능합니다.
|
|
30
|
+
`);
|
|
31
|
+
process.exit(0);
|
|
32
|
+
}
|
|
33
|
+
|
|
2
34
|
/**
|
|
3
35
|
* MCP Deliberation Server (Global) — v2.5 Multi-Session + Transport Routing + Cross-Platform + BrowserControlPort
|
|
4
36
|
*
|
|
@@ -2154,7 +2186,6 @@ server.tool(
|
|
|
2154
2186
|
}
|
|
2155
2187
|
|
|
2156
2188
|
const sessionId = generateSessionId(topic);
|
|
2157
|
-
const hasManualSpeakers = Array.isArray(speakers) && speakers.length > 0;
|
|
2158
2189
|
const candidateSnapshot = await collectSpeakerCandidates({ include_cli: true, include_browser: true });
|
|
2159
2190
|
|
|
2160
2191
|
// Resolve effective settings from config
|
|
@@ -2165,12 +2196,26 @@ server.tool(
|
|
|
2165
2196
|
// Resolve "auto": 2 speakers → cyclic, 3+ → weighted-random
|
|
2166
2197
|
ordering_strategy = rawOrdering === "auto" ? undefined : rawOrdering; // resolved after speakers are known
|
|
2167
2198
|
|
|
2199
|
+
// When require_speaker_selection is explicitly true in config,
|
|
2200
|
+
// ignore LLM-provided speakers UNLESS require_manual_speakers: true is explicitly passed
|
|
2201
|
+
// (which signals the user has confirmed the speaker selection)
|
|
2202
|
+
const configRequiresSelection = config.require_speaker_selection === true;
|
|
2203
|
+
const llmExplicitlyConfirmed = require_manual_speakers === true;
|
|
2204
|
+
const hasManualSpeakers = Array.isArray(speakers) && speakers.length > 0
|
|
2205
|
+
&& (!configRequiresSelection || llmExplicitlyConfirmed);
|
|
2206
|
+
|
|
2168
2207
|
if (!hasManualSpeakers && effectiveRequireManual) {
|
|
2169
2208
|
const candidateText = formatSpeakerCandidatesReport(candidateSnapshot);
|
|
2209
|
+
const llmSuggested = Array.isArray(speakers) && speakers.length > 0
|
|
2210
|
+
? `\n\n💡 **LLM이 제안한 스피커:** ${speakers.join(", ")}\n위 제안을 사용하려면 \`require_manual_speakers: true\`와 함께 speakers를 다시 전달하세요.`
|
|
2211
|
+
: "";
|
|
2212
|
+
const configNote = configRequiresSelection
|
|
2213
|
+
? "\n\n⚙️ `require_speaker_selection: true` 설정에 의해 사용자가 직접 스피커를 선택해야 합니다."
|
|
2214
|
+
: "";
|
|
2170
2215
|
return {
|
|
2171
2216
|
content: [{
|
|
2172
2217
|
type: "text",
|
|
2173
|
-
text: `스피커를 직접 선택해야 deliberation을 시작할 수
|
|
2218
|
+
text: `스피커를 직접 선택해야 deliberation을 시작할 수 있습니다.${configNote}${llmSuggested}\n\n${candidateText}\n\n예시:\n\ndeliberation_start(\n topic: "${topic.replace(/"/g, '\\"')}",\n rounds: ${rounds},\n speakers: ["codex", "web-claude-1", "web-chatgpt-1"],\n require_manual_speakers: true,\n first_speaker: "codex"\n)\n\n먼저 deliberation_speaker_candidates를 호출해 현재 선택 가능한 스피커를 확인하세요.`,
|
|
2174
2219
|
}],
|
|
2175
2220
|
};
|
|
2176
2221
|
}
|
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.4",
|
|
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",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"README.md"
|
|
41
41
|
],
|
|
42
42
|
"scripts": {
|
|
43
|
+
"postinstall": "node install.js || true",
|
|
43
44
|
"start": "node index.js",
|
|
44
45
|
"test": "vitest run",
|
|
45
46
|
"test:watch": "vitest"
|