@dmsdc-ai/aigentry-deliberation 0.0.38 → 0.0.40
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 +156 -150
- package/doctor.js +6 -6
- package/examples/README.md +25 -0
- package/examples/basic-deliberation.md +99 -0
- package/examples/browser-automation.md +120 -0
- package/examples/code-review.md +78 -0
- package/examples/structured-synthesis.md +96 -0
- package/index.js +485 -3513
- package/install.js +3 -3
- package/lib/entitlement.js +120 -0
- package/lib/session.js +623 -0
- package/lib/speaker-discovery.js +1575 -0
- package/lib/telepty.js +868 -0
- package/lib/transport.js +1300 -0
- package/package.json +9 -3
- package/skills/deliberation/SKILL.md +108 -4
package/README.md
CHANGED
|
@@ -1,97 +1,63 @@
|
|
|
1
1
|
# @dmsdc-ai/aigentry-deliberation
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
13
|
-
- **
|
|
14
|
-
- **Vote parsing**: [AGREE] / [DISAGREE] / [CONDITIONAL] extraction
|
|
15
|
-
- **Browser LLM integration**: CDP-based auto-turn for ChatGPT, Claude, Gemini browser tabs
|
|
16
|
-
- **Chrome Extension support**: Side panel detection via title-based matching
|
|
17
|
-
- **Cross-platform**: macOS (tmux + Terminal.app), Windows (Windows Terminal), Linux
|
|
18
|
-
- **Telepty bus transport**: structured `turn_request` delivery for telepty-managed sessions
|
|
19
|
-
- **User-confirmed speaker selection**: candidates must be confirmed before a session can start
|
|
20
|
-
- **Obsidian archiving**: Auto-archive deliberation results to Obsidian vault
|
|
21
|
-
- **Session monitoring**: Real-time tmux/terminal monitoring
|
|
22
|
-
- **Vote enforcement**: Automatic [AGREE]/[DISAGREE]/[CONDITIONAL] vote marker requirement
|
|
23
|
-
- **Dynamic CLI timeout**: Smart cold-start handling (180s first turn, 120s subsequent)
|
|
24
|
-
- **Split telepty timeouts**: 5s transport ack + 60s semantic response tracking
|
|
25
|
-
- **Typed synthesis envelopes**: validated structured payloads for downstream automation
|
|
26
|
-
- **Runtime logging**: Session lifecycle event logging for observability
|
|
27
|
-
- **Resilient browser automation**: 5-stage degradation state machine with 60s SLO
|
|
28
|
-
- **Model routing**: Dynamic per-provider model selection based on prompt analysis
|
|
29
|
-
- **Role drift detection**: Structural heading markers + keyword analysis for accurate role inference
|
|
3
|
+
**Structured multi-AI discussions via MCP.**
|
|
4
|
+
|
|
5
|
+
The only MCP server that lets multiple AI agents debate a question before committing to a decision. Run structured discussions across CLI agents (Claude Code, Codex, Gemini) and browser LLMs (ChatGPT, Claude Web, Gemini Web) with full audit trails, vote tracking, and synthesis.
|
|
6
|
+
|
|
7
|
+
## What it does
|
|
8
|
+
|
|
9
|
+
- **Structured deliberation sessions** — pose a topic, route turns to each speaker, collect [AGREE]/[DISAGREE]/[CONDITIONAL] votes, synthesize consensus
|
|
10
|
+
- **Smart speaker ordering** — cyclic, random, or weighted-random strategies to balance participation
|
|
11
|
+
- **Persona roles** — assign critic, implementer, mediator, researcher, or free roles with built-in prompt templates
|
|
12
|
+
- **Browser LLM integration** — CDP-based auto-turn for ChatGPT, Claude Web, Gemini Web and more; clipboard fallback for unsupported providers
|
|
13
|
+
- **Typed synthesis output** — structured `ExecutionContractV2` envelopes with decisions, actionable tasks, and optional experiment verdicts for downstream automation
|
|
30
14
|
|
|
31
15
|
## Installation
|
|
32
16
|
|
|
33
|
-
|
|
17
|
+
One-command install — registers the MCP server with Claude Code and Gemini CLI automatically:
|
|
34
18
|
|
|
35
19
|
```bash
|
|
36
|
-
npx @dmsdc-ai/aigentry-deliberation install
|
|
20
|
+
npx --yes --package @dmsdc-ai/aigentry-deliberation deliberation-install
|
|
37
21
|
```
|
|
38
22
|
|
|
39
|
-
|
|
40
|
-
1. `~/.local/lib/mcp-deliberation/`에 서버 파일 설치 (Windows: `%LOCALAPPDATA%/mcp-deliberation/`)
|
|
41
|
-
2. npm 의존성 설치
|
|
42
|
-
3. `~/.claude/.mcp.json`에 MCP 서버 자동 등록
|
|
43
|
-
4. Claude Code 재시작하면 바로 사용 가능
|
|
44
|
-
5. Gemini CLI MCP 서버 자동 등록 (`~/.gemini/settings.json`)
|
|
45
|
-
6. deliberation-gate 스킬 자동 설치 (`~/.claude/skills/deliberation-gate/`)
|
|
23
|
+
This installs the server to `~/.local/lib/mcp-deliberation/` (Windows: `%LOCALAPPDATA%/mcp-deliberation/`), registers it in `~/.claude/.mcp.json` and `~/.gemini/settings.json`, and installs the `deliberation-gate` skill to `~/.claude/skills/`.
|
|
46
24
|
|
|
47
|
-
|
|
25
|
+
Restart Claude Code / Gemini CLI after install. That's it.
|
|
26
|
+
|
|
27
|
+
**Global install (alternative):**
|
|
48
28
|
|
|
49
29
|
```bash
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
deliberation-install
|
|
30
|
+
npm install -g @dmsdc-ai/aigentry-deliberation && deliberation-install
|
|
31
|
+
```
|
|
53
32
|
|
|
54
|
-
|
|
55
|
-
npx @dmsdc-ai/aigentry-devkit setup
|
|
33
|
+
**Uninstall:**
|
|
56
34
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
cd aigentry-deliberation && npm install && node install.js
|
|
35
|
+
```bash
|
|
36
|
+
npx --yes --package @dmsdc-ai/aigentry-deliberation deliberation-install --uninstall
|
|
60
37
|
```
|
|
61
38
|
|
|
62
|
-
|
|
39
|
+
Removes MCP registrations, installed files, and skill files automatically.
|
|
40
|
+
|
|
41
|
+
**Diagnostics:**
|
|
63
42
|
|
|
64
43
|
```bash
|
|
65
|
-
npx @dmsdc-ai/aigentry-deliberation
|
|
44
|
+
npx --yes --package @dmsdc-ai/aigentry-deliberation deliberation-doctor
|
|
66
45
|
```
|
|
67
46
|
|
|
68
|
-
MCP
|
|
47
|
+
Auto-diagnoses MCP configuration for Claude Code, Codex CLI, and Gemini CLI.
|
|
69
48
|
|
|
70
49
|
## Forum Demo
|
|
71
50
|
|
|
72
|
-
|
|
51
|
+
When a deliberation completes, the synthesized result can be visualized as a Forum view.
|
|
73
52
|
|
|
74
|
-
>
|
|
75
|
-
> Deliberation이 끝나면 Forum이 생성되고, 그게 끝입니다.
|
|
53
|
+
> Deliberation is the process. Forum is the output. When deliberation ends, the Forum is generated.
|
|
76
54
|
|
|
77
55
|

|
|
78
56
|
|
|
79
|
-
정적 데모를 브라우저에서 확인하려면:
|
|
80
|
-
|
|
81
57
|
```bash
|
|
82
58
|
open demo/forum/index.html
|
|
83
59
|
```
|
|
84
60
|
|
|
85
|
-
## Diagnostics
|
|
86
|
-
|
|
87
|
-
MCP 연결 문제 자동 진단:
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
npx @dmsdc-ai/aigentry-deliberation doctor
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
Claude Code, Codex CLI, Gemini CLI의 MCP 설정을 자동 점검하고 문제를 진단합니다.
|
|
94
|
-
|
|
95
61
|
## MCP Tools
|
|
96
62
|
|
|
97
63
|
| Tool | Description |
|
|
@@ -101,22 +67,25 @@ Claude Code, Codex CLI, Gemini CLI의 MCP 설정을 자동 점검하고 문제
|
|
|
101
67
|
| `deliberation_synthesize` | Generate synthesis report |
|
|
102
68
|
| `deliberation_status` | Check session status |
|
|
103
69
|
| `deliberation_context` | Load project context |
|
|
70
|
+
| `deliberation_inject_context` | Inject structured context or experiment history into an active session |
|
|
104
71
|
| `deliberation_history` | View discussion history |
|
|
105
72
|
| `deliberation_list_active` | List active sessions |
|
|
106
73
|
| `deliberation_list` | List archived sessions |
|
|
107
74
|
| `deliberation_reset` | Reset session(s) |
|
|
108
75
|
| `deliberation_speaker_candidates` | List available speakers |
|
|
109
76
|
| `deliberation_confirm_speakers` | Confirm the exact user-selected speaker set |
|
|
110
|
-
| `deliberation_browser_llm_tabs` | List browser LLM tabs |
|
|
111
|
-
| `deliberation_browser_auto_turn` | Auto-send turn to browser LLM |
|
|
77
|
+
| `deliberation_browser_llm_tabs` | List open browser LLM tabs |
|
|
78
|
+
| `deliberation_browser_auto_turn` | Auto-send turn to a browser LLM via CDP |
|
|
112
79
|
| `deliberation_route_turn` | Route turn to appropriate transport |
|
|
113
|
-
| `
|
|
114
|
-
| `
|
|
80
|
+
| `deliberation_run_until_blocked` | Auto-run mixed transports until completion or a manual block |
|
|
81
|
+
| `deliberation_request_review` | Request code review from deliberation participants |
|
|
82
|
+
| `deliberation_cli_auto_turn` | Auto-send turn to a CLI speaker |
|
|
83
|
+
| `deliberation_ingest_remote_reply` | Ingest a reply from a remote participant with explicit source metadata |
|
|
115
84
|
| `deliberation_cli_config` | Configure CLI settings |
|
|
116
85
|
|
|
117
86
|
## Start Flow
|
|
118
87
|
|
|
119
|
-
|
|
88
|
+
Speaker selection is enforced before a session can start. Raw candidate tokens cannot initiate a deliberation.
|
|
120
89
|
|
|
121
90
|
```text
|
|
122
91
|
1. deliberation_speaker_candidates(...)
|
|
@@ -125,18 +94,6 @@ Manual participant selection is enforced for both CLI speakers and telepty sessi
|
|
|
125
94
|
4. deliberation_start(selection_token: "<confirmed-token>", speakers: [...])
|
|
126
95
|
```
|
|
127
96
|
|
|
128
|
-
Raw candidate tokens cannot start a deliberation.
|
|
129
|
-
|
|
130
|
-
## Telepty Transport
|
|
131
|
-
|
|
132
|
-
Telepty-managed sessions are now routed through the telepty bus instead of raw PTY inject guidance.
|
|
133
|
-
|
|
134
|
-
- `deliberation_route_turn` publishes a typed `turn_request` envelope on `ws://localhost:3848/api/bus`
|
|
135
|
-
- transport delivery is tracked with a 5-second `inject_written` ack window
|
|
136
|
-
- semantic completion is tracked with a 60-second self-submit window
|
|
137
|
-
- `session_health` bus events are cached for operator visibility
|
|
138
|
-
- `deliberation_synthesize` validates and emits typed `deliberation_completed` envelopes for downstream automation
|
|
139
|
-
|
|
140
97
|
## Speaker Ordering Strategies
|
|
141
98
|
|
|
142
99
|
| Strategy | Description |
|
|
@@ -155,105 +112,154 @@ Telepty-managed sessions are now routed through the telepty bus instead of raw P
|
|
|
155
112
|
| `researcher` | Data, benchmarks, references |
|
|
156
113
|
| `free` | No role constraint (default) |
|
|
157
114
|
|
|
158
|
-
|
|
115
|
+
## Supported CLI Speakers
|
|
159
116
|
|
|
160
117
|
| CLI | Command | Status |
|
|
161
118
|
|-----|---------|--------|
|
|
162
|
-
| Claude Code | `claude` |
|
|
163
|
-
| Codex CLI | `codex` |
|
|
164
|
-
| Gemini CLI | `gemini` |
|
|
165
|
-
| Aider | `aider` |
|
|
166
|
-
| Cursor Agent | `cursor` |
|
|
167
|
-
| OpenCode | `opencode` |
|
|
168
|
-
| Continue | `continue` |
|
|
119
|
+
| Claude Code | `claude` | Tested |
|
|
120
|
+
| Codex CLI | `codex` | Tested |
|
|
121
|
+
| Gemini CLI | `gemini` | Tested |
|
|
122
|
+
| Aider | `aider` | Supported |
|
|
123
|
+
| Cursor Agent | `cursor` | Supported |
|
|
124
|
+
| OpenCode | `opencode` | Supported |
|
|
125
|
+
| Continue | `continue` | Supported |
|
|
169
126
|
|
|
170
|
-
|
|
127
|
+
## Supported Browser LLMs
|
|
171
128
|
|
|
172
129
|
| Provider | Transport | Status |
|
|
173
130
|
|----------|-----------|--------|
|
|
174
|
-
| ChatGPT | CDP / Clipboard |
|
|
175
|
-
| Claude Web | CDP / Clipboard |
|
|
176
|
-
| Gemini Web | CDP / Clipboard |
|
|
177
|
-
| DeepSeek | CDP / Clipboard |
|
|
178
|
-
| Qwen | CDP / Clipboard |
|
|
179
|
-
| Poe | CDP / Clipboard |
|
|
180
|
-
| Copilot | CDP / Clipboard |
|
|
181
|
-
| Perplexity | CDP / Clipboard |
|
|
182
|
-
| Mistral | CDP / Clipboard |
|
|
183
|
-
| Grok | CDP / Clipboard |
|
|
184
|
-
| HuggingChat | CDP / Clipboard |
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
131
|
+
| ChatGPT | CDP / Clipboard | Tested |
|
|
132
|
+
| Claude Web | CDP / Clipboard | Tested |
|
|
133
|
+
| Gemini Web | CDP / Clipboard | Tested |
|
|
134
|
+
| DeepSeek | CDP / Clipboard | Tested |
|
|
135
|
+
| Qwen | CDP / Clipboard | Tested |
|
|
136
|
+
| Poe | CDP / Clipboard | Tested |
|
|
137
|
+
| Copilot | CDP / Clipboard | Supported |
|
|
138
|
+
| Perplexity | CDP / Clipboard | Supported |
|
|
139
|
+
| Mistral | CDP / Clipboard | Supported |
|
|
140
|
+
| Grok | CDP / Clipboard | Supported |
|
|
141
|
+
| HuggingChat | CDP / Clipboard | Supported |
|
|
142
|
+
|
|
143
|
+
## Examples
|
|
144
|
+
|
|
145
|
+
See [`examples/`](examples/) for working session scripts and synthesis output samples.
|
|
146
|
+
|
|
147
|
+
## Experiment Retrospectives
|
|
148
|
+
|
|
149
|
+
For autoresearch-style keep/discard reviews, inject a compact experiment bundle after the session starts instead of bloating `topic`.
|
|
150
|
+
|
|
151
|
+
Guidelines:
|
|
152
|
+
- Keep injected JSON around 1.5–2KB
|
|
153
|
+
- Include only the last 3–5 relevant experiments
|
|
154
|
+
- Keep `key_changes` to at most 3 scalar before/after pairs
|
|
155
|
+
- Reference bulky artifacts (`results.tsv`, full `program.md`, JSONL logs) by path only
|
|
156
|
+
|
|
157
|
+
```text
|
|
158
|
+
deliberation_start(...)
|
|
159
|
+
deliberation_inject_context(
|
|
160
|
+
session_id: "experiment-review-123",
|
|
161
|
+
speaker: "dustcraw",
|
|
162
|
+
context: "{\"past_experiments\":[{\"experiment_id\":\"dg-20260310-001\",\"signal_kind\":\"INTEREST_DRIFT\",\"patch_summary\":\"Raised relevanceThreshold from 0.30 to 0.35\",\"patch_kind\":\"config\",\"key_changes\":{\"relevanceThreshold\":{\"before\":0.3,\"after\":0.35}},\"score\":0.08,\"score_label\":\"promotion_rate_delta\",\"metric_name\":\"promotion_rate_delta\",\"metric_delta\":0.08,\"verdict\":\"positive\",\"followup_action\":\"kept\",\"reasoning\":\"Threshold raise reduced noise; promotion quality improved 8%\"}],\"experiment_count\":1,\"success_rate\":1.0}"
|
|
163
|
+
)
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Synthesis output with an explicit experiment verdict:
|
|
167
|
+
|
|
168
|
+
```json
|
|
169
|
+
{
|
|
170
|
+
"summary": "Lower the blast radius and re-run with stricter constraints.",
|
|
171
|
+
"decisions": [
|
|
172
|
+
"Keep the experiment loop bounded to one editable file",
|
|
173
|
+
"Retry after restoring the failing test baseline"
|
|
174
|
+
],
|
|
175
|
+
"actionable_tasks": [
|
|
176
|
+
{ "id": 1, "task": "Tighten editable globs", "priority": "high" }
|
|
177
|
+
],
|
|
178
|
+
"experiment_outcome": {
|
|
179
|
+
"verdict": "modify",
|
|
180
|
+
"suggested_action": "iterate",
|
|
181
|
+
"confidence": 0.78,
|
|
182
|
+
"measurement_window_hours": 24
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## deliberation-gate (Superpowers Integration)
|
|
188
|
+
|
|
189
|
+
Installs a skill that inserts multi-AI verification gates at key [superpowers](https://github.com/obra/superpowers) workflow decision points.
|
|
189
190
|
|
|
190
191
|
**Scenarios:**
|
|
191
|
-
- **brainstorming**
|
|
192
|
-
- **code-review**
|
|
193
|
-
- **debugging**
|
|
192
|
+
- **brainstorming** — multi-AI design validation before writing plans
|
|
193
|
+
- **code-review** — multi-AI review via `deliberation_request_review`
|
|
194
|
+
- **debugging** — multi-AI hypothesis verification when stuck
|
|
194
195
|
|
|
195
196
|
**Trigger:** Semi-automatic — skill recommends deliberation, user approves.
|
|
196
197
|
|
|
197
|
-
**Fallback:** MCP
|
|
198
|
+
**Fallback:** Without MCP installed, falls back to self-criticism-based verification. With MCP installed, runs full multi-AI discussion.
|
|
198
199
|
|
|
199
|
-
**
|
|
200
|
+
**Auto-installed** by `deliberation-install`. Manual install:
|
|
200
201
|
|
|
201
|
-
수동 설치:
|
|
202
202
|
```bash
|
|
203
203
|
cp skills/deliberation-gate/SKILL.md ~/.claude/skills/deliberation-gate/SKILL.md
|
|
204
204
|
```
|
|
205
205
|
|
|
206
206
|
**RFC:** [Prerequisites header for tool-dependent skills](https://github.com/obra/superpowers/issues/589)
|
|
207
207
|
|
|
208
|
+
## Telepty Transport (Advanced)
|
|
209
|
+
|
|
210
|
+
For teams using [telepty](https://github.com/dmsdc-ai/telepty) to manage AI sessions, deliberation supports routing turns through the telepty bus — enabling cross-machine and cross-session deliberation flows.
|
|
211
|
+
|
|
212
|
+
- `deliberation_route_turn` publishes typed `turn_request` envelopes on `ws://localhost:3848/api/bus`
|
|
213
|
+
- `deliberation_run_until_blocked` continues across `cli_respond`, `browser_auto`, and `telepty_bus` speakers until a manual block
|
|
214
|
+
- Transport delivery tracked with a 5-second `inject_written` ack window
|
|
215
|
+
- Semantic completion tracked with a 60-second self-submit window
|
|
216
|
+
- `deliberation_synthesize` validates and emits typed `deliberation_completed` envelopes for downstream automation
|
|
217
|
+
|
|
218
|
+
### Cross-Machine Event Catalog
|
|
219
|
+
|
|
220
|
+
- **Guaranteed (daemon-emitted):** `inject_written`, `session_health`, `session_register`, `session.replaced`, `session.idle`, `thread.opened`, `thread.closed`, `handoff.*`, `message_routed`
|
|
221
|
+
- **Best-effort (bus relay only):** `turn_request`, `turn_completed`, `deliberation_completed`
|
|
222
|
+
- `kind` is the canonical event discriminator
|
|
223
|
+
- `target` identifies the telepty session target
|
|
224
|
+
- `payload.prompt` is the canonical prompt field for `turn_request`
|
|
225
|
+
- `source_host` is optional transport metadata for cross-machine tracing
|
|
226
|
+
|
|
227
|
+
## Remote Reply Ingress
|
|
228
|
+
|
|
229
|
+
For distributed setups where a remote participant cannot call local MCP tools directly, use the deliberation-owned semantic ingress instead of proxying raw bus events:
|
|
230
|
+
|
|
231
|
+
```text
|
|
232
|
+
deliberation_ingest_remote_reply(
|
|
233
|
+
session_id: "...",
|
|
234
|
+
speaker: "...",
|
|
235
|
+
turn_id: "...",
|
|
236
|
+
content: "...",
|
|
237
|
+
source_machine_id: "peer-01",
|
|
238
|
+
source_session_id: "remote-gemini-001",
|
|
239
|
+
transport_scope: "remote_mcp",
|
|
240
|
+
artifact_refs: ["results.jsonl"]
|
|
241
|
+
)
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
This preserves explicit provenance rather than inferring semantics from raw bus events.
|
|
245
|
+
|
|
208
246
|
## What's New
|
|
209
247
|
|
|
248
|
+
### v0.0.39
|
|
249
|
+
- Entitlement layer — Free/Pro/Team tier gating for deliberation features
|
|
250
|
+
- Gemini CLI model flags and Codex GPT-5.4 routing improvements
|
|
251
|
+
|
|
210
252
|
### v0.0.36
|
|
211
|
-
-
|
|
212
|
-
-
|
|
213
|
-
-
|
|
214
|
-
- **Operator guidance**: documented telepty bus transport as the automation path and unmanaged/manual sessions as the fallback path
|
|
253
|
+
- Clarified mandatory TUI speaker-selection flow and confirmed-token handoff before `deliberation_start`
|
|
254
|
+
- Documented active telepty session discovery with lightweight `session_id` + `host/pid` locators
|
|
255
|
+
- Cross-project delivery: active session lookup now resolves across project state directories
|
|
215
256
|
|
|
216
257
|
### v0.0.35
|
|
217
258
|
- **Manual selection enforcement**: `deliberation_confirm_speakers` binds a fresh candidate snapshot to the exact user-picked speaker set before `deliberation_start`
|
|
218
259
|
- **Telepty session candidates**: active telepty sessions appear in speaker discovery with lightweight host/pid locators
|
|
219
|
-
- **Cross-project sessions**: session lookup/load/save now resolves active deliberations across project state directories
|
|
220
260
|
- **Telepty bus routing**: telepty speakers route via typed `turn_request` envelopes with 5s transport and 60s semantic timeout tracking
|
|
221
261
|
- **Structured synthesis envelopes**: `deliberation_synthesize` validates typed payloads before telepty bus publication
|
|
222
|
-
- **Codex CLI hardening**: reduced prompt budgets, lower-friction exec profile,
|
|
223
|
-
- **Packaging**: install path now preserves default config and includes required runtime modules (`clipboard.js`, `decision-engine.js`, `i18n.js`)
|
|
224
|
-
|
|
225
|
-
### v0.0.24
|
|
226
|
-
- **Role inference**: Heading marker weight increased from +5 to +8, added critic(검증/평가/Review) and researcher(데이터/Data) patterns to reduce false positives
|
|
227
|
-
- **Logging payload**: TURN log includes `suggested_role`, `role_drift`; CLI_TURN log includes `prior_turns`, `effective_timeout`
|
|
228
|
-
- **Vote marker warning**: WARN-level `INVALID_TURN` logged when response lacks [AGREE]/[DISAGREE]/[CONDITIONAL] markers
|
|
229
|
-
- **Auto-deploy**: `postversion` hook auto-installs to MCP server path after `npm version`
|
|
230
|
-
|
|
231
|
-
### v0.0.23
|
|
232
|
-
- **Vote enforcement**: Turn prompts now require [AGREE]/[DISAGREE]/[CONDITIONAL] markers for reliable consensus measurement
|
|
233
|
-
- **Dynamic CLI timeout**: First CLI invocation gets 180s (cold-start buffer), subsequent turns use default 120s
|
|
234
|
-
- **Runtime logging**: INFO-level lifecycle logging (SESSION_CREATED, TURN, CLI_TURN, SYNTHESIZED) to `runtime.log`
|
|
235
|
-
- **Role inference improvement**: Structural heading markers (e.g., `## 조사 결과` → researcher) with +5 weight prevent false role drift detection
|
|
236
|
-
|
|
237
|
-
### v0.0.22
|
|
238
|
-
- **Security**: CDP `--remote-allow-origins` restricted to `127.0.0.1:9222` (was `*`)
|
|
239
|
-
- **Security**: Observer CORS restricted to localhost allowlist, server bound to `127.0.0.1`
|
|
240
|
-
- **Performance**: Async sleep for Chrome CDP initialization (was blocking event loop)
|
|
241
|
-
- **Bug fix**: Fabrication guard uses `detectCallerSpeaker()` instead of hardcoded `"claude"`
|
|
242
|
-
- **Bug fix**: CLI reviewer uses per-CLI invocation flags via `CLI_INVOCATION_HINTS`
|
|
243
|
-
- **Bug fix**: Windows monitor state directory path corrected
|
|
244
|
-
- **Memory**: SSE client Map cleanup on disconnect prevents memory leak
|
|
245
|
-
- **Code quality**: Removed unreachable dead code in browser-control-port
|
|
246
|
-
|
|
247
|
-
## aigentry Ecosystem
|
|
248
|
-
|
|
249
|
-
aigentry-deliberation is one component of the unified aigentry platform. All packages work together to make AI decisions transparent and auditable.
|
|
250
|
-
|
|
251
|
-
| Package | Description |
|
|
252
|
-
|---------|-------------|
|
|
253
|
-
| [`@dmsdc-ai/aigentry-brain`](https://github.com/dmsdc-ai/aigentry-brain) | Cross-LLM memory OS |
|
|
254
|
-
| [`@dmsdc-ai/aigentry-devkit`](https://github.com/dmsdc-ai/aigentry-devkit) | Developer tools and hooks |
|
|
255
|
-
| [`aigentry-registry`](https://github.com/dmsdc-ai/aigentry-registry) | AI agent evaluation (Python) |
|
|
256
|
-
| [`aigentry-ssot`](https://github.com/dmsdc-ai/aigentry-ssot) | MCP contract schemas |
|
|
262
|
+
- **Codex CLI hardening**: reduced prompt budgets, lower-friction exec profile, clearer timeout diagnostics
|
|
257
263
|
|
|
258
264
|
## License
|
|
259
265
|
|
package/doctor.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*
|
|
16
16
|
* Usage:
|
|
17
17
|
* node doctor.js
|
|
18
|
-
* npx @dmsdc-ai/aigentry-deliberation doctor
|
|
18
|
+
* npx --yes --package @dmsdc-ai/aigentry-deliberation deliberation-doctor
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
import fs from "node:fs";
|
|
@@ -209,7 +209,7 @@ function suggestFix(serverName, server, issue) {
|
|
|
209
209
|
switch (issue) {
|
|
210
210
|
case "path_missing":
|
|
211
211
|
if (serverName === "deliberation" || serverName === "mcp-deliberation") {
|
|
212
|
-
return `npx @dmsdc-ai/aigentry-deliberation install`;
|
|
212
|
+
return `npx --yes --package @dmsdc-ai/aigentry-deliberation deliberation-install`;
|
|
213
213
|
}
|
|
214
214
|
if (serverName.includes("brain") || serverName.includes("aigentry-brain")) {
|
|
215
215
|
return `npx @dmsdc-ai/aigentry-brain install`;
|
|
@@ -223,7 +223,7 @@ function suggestFix(serverName, server, issue) {
|
|
|
223
223
|
case "temp_path": {
|
|
224
224
|
const tempArg = (server.args || []).find((a) => isTempPath(a));
|
|
225
225
|
if (serverName === "deliberation" || serverName === "mcp-deliberation") {
|
|
226
|
-
return `npx @dmsdc-ai/aigentry-deliberation install # reinstall to permanent path`;
|
|
226
|
+
return `npx --yes --package @dmsdc-ai/aigentry-deliberation deliberation-install # reinstall to permanent path`;
|
|
227
227
|
}
|
|
228
228
|
if (serverName.includes("brain") || serverName.includes("aigentry-brain")) {
|
|
229
229
|
return `npx @dmsdc-ai/aigentry-brain install # reinstall to permanent path`;
|
|
@@ -357,7 +357,7 @@ function runDiagnostics() {
|
|
|
357
357
|
if (mod.includes("aigentry-brain") || mod.includes("brain")) {
|
|
358
358
|
fix = `npx @dmsdc-ai/aigentry-brain install # temporary path → reinstall to permanent path`;
|
|
359
359
|
} else if (mod.includes("deliberation") || mod.includes("mcp-deliberation")) {
|
|
360
|
-
fix = `npx @dmsdc-ai/aigentry-deliberation install # temporary path
|
|
360
|
+
fix = `npx --yes --package @dmsdc-ai/aigentry-deliberation deliberation-install # temporary path -> reinstall to permanent path`;
|
|
361
361
|
} else {
|
|
362
362
|
fix = `# temporary path (${mod}) — change to permanent path in MCP config`;
|
|
363
363
|
}
|
|
@@ -387,7 +387,7 @@ function runDiagnostics() {
|
|
|
387
387
|
} else {
|
|
388
388
|
totalIssues++;
|
|
389
389
|
console.log(` ❌ Server file not found: ${selfPath}`);
|
|
390
|
-
console.log(` fix: npx @dmsdc-ai/aigentry-deliberation install`);
|
|
390
|
+
console.log(` fix: npx --yes --package @dmsdc-ai/aigentry-deliberation deliberation-install`);
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
// Check node_modules
|
|
@@ -407,7 +407,7 @@ function runDiagnostics() {
|
|
|
407
407
|
} catch {
|
|
408
408
|
totalIssues++;
|
|
409
409
|
console.log(` ❌ Syntax error detected`);
|
|
410
|
-
console.log(` fix: npx @dmsdc-ai/aigentry-deliberation install`);
|
|
410
|
+
console.log(` fix: npx --yes --package @dmsdc-ai/aigentry-deliberation deliberation-install`);
|
|
411
411
|
}
|
|
412
412
|
|
|
413
413
|
// ── Summary ──
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Examples
|
|
2
|
+
|
|
3
|
+
Practical examples for using the aigentry-deliberation MCP server.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
|
|
7
|
+
| File | Description |
|
|
8
|
+
|------|-------------|
|
|
9
|
+
| `basic-deliberation.md` | Start a session, collect turns, and synthesize a decision |
|
|
10
|
+
| `code-review.md` | Multi-AI code review using `deliberation_request_review` |
|
|
11
|
+
| `structured-synthesis.md` | Structured JSON output (ExecutionContractV2) for automation |
|
|
12
|
+
| `browser-automation.md` | Include ChatGPT / Gemini via CDP browser automation |
|
|
13
|
+
|
|
14
|
+
## Prerequisites
|
|
15
|
+
|
|
16
|
+
- aigentry-deliberation MCP server registered (`node install.js`)
|
|
17
|
+
- At least one speaker available (CLI session, browser tab, or telepty session)
|
|
18
|
+
|
|
19
|
+
## Quick Start
|
|
20
|
+
|
|
21
|
+
1. Call `deliberation_speaker_candidates` to discover available speakers.
|
|
22
|
+
2. Confirm speakers with `deliberation_confirm_speakers`.
|
|
23
|
+
3. Start the session with `deliberation_start`.
|
|
24
|
+
4. Route turns with `deliberation_route_turn` or `deliberation_run_until_blocked`.
|
|
25
|
+
5. Call `deliberation_synthesize` to get a structured decision.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Basic Deliberation
|
|
2
|
+
|
|
3
|
+
A complete walkthrough of starting a deliberation session from scratch.
|
|
4
|
+
|
|
5
|
+
**Topic:** Should we use REST or GraphQL for our new API?
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Step 1 — Discover Available Speakers
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
// Tool: deliberation_speaker_candidates
|
|
13
|
+
{}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
**Response (example):**
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"candidates": [
|
|
20
|
+
{ "id": "claude-opus", "name": "Claude Opus", "transport": "cli_respond" },
|
|
21
|
+
{ "id": "gemini-pro", "name": "Gemini Pro", "transport": "cli_respond" }
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Step 2 — Confirm Speakers
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
// Tool: deliberation_confirm_speakers
|
|
32
|
+
{
|
|
33
|
+
"speaker_ids": ["claude-opus", "gemini-pro"]
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Step 3 — Start the Session
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
// Tool: deliberation_start
|
|
43
|
+
{
|
|
44
|
+
"topic": "Should we use REST or GraphQL for our new API?",
|
|
45
|
+
"context": "We are building a mobile app with complex nested data requirements and 3 client types.",
|
|
46
|
+
"max_turns": 4
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Response:**
|
|
51
|
+
```json
|
|
52
|
+
{ "deliberation_id": "delib-a1b2c3", "status": "active", "turn": 0 }
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Step 4 — Collect Turns (2 speakers)
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
// Tool: deliberation_respond (speaker: claude-opus)
|
|
61
|
+
{
|
|
62
|
+
"deliberation_id": "delib-a1b2c3",
|
|
63
|
+
"speaker_id": "claude-opus",
|
|
64
|
+
"content": "GraphQL is the stronger choice here. With 3 client types each needing different fields, GraphQL eliminates over-fetching and lets clients declare exactly what they need. The nested data model maps naturally to GraphQL resolvers."
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
// Tool: deliberation_respond (speaker: gemini-pro)
|
|
70
|
+
{
|
|
71
|
+
"deliberation_id": "delib-a1b2c3",
|
|
72
|
+
"speaker_id": "gemini-pro",
|
|
73
|
+
"content": "REST is simpler to cache and easier for teams already familiar with HTTP conventions. For a mobile app, HTTP/2 with REST and sparse fieldsets can achieve similar efficiency. Consider GraphQL only if query flexibility is genuinely required at launch."
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Step 5 — Synthesize the Decision
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
// Tool: deliberation_synthesize
|
|
83
|
+
{
|
|
84
|
+
"deliberation_id": "delib-a1b2c3"
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Response:**
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"verdict": "GraphQL recommended with phased rollout",
|
|
92
|
+
"confidence": 0.82,
|
|
93
|
+
"actionable_tasks": [
|
|
94
|
+
{ "id": 1, "task": "Set up Apollo Server with schema-first design", "priority": "high" },
|
|
95
|
+
{ "id": 2, "task": "Define GraphQL types for core entities", "priority": "high" },
|
|
96
|
+
{ "id": 3, "task": "Add REST compatibility layer for legacy clients", "priority": "medium" }
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
```
|