@dmsdc-ai/aigentry-deliberation 0.0.34 → 0.0.35

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/install.js CHANGED
@@ -43,6 +43,8 @@ const FILES_TO_COPY = [
43
43
  "index.js",
44
44
  "observer.js",
45
45
  "clipboard.js",
46
+ "decision-engine.js",
47
+ "i18n.js",
46
48
  "browser-control-port.js",
47
49
  "degradation-state-machine.js",
48
50
  "model-router.js",
@@ -183,8 +185,23 @@ function install() {
183
185
 
184
186
  // Step 6b: Preserve existing config
185
187
  const configPath = path.join(INSTALL_DIR, "config.json");
188
+ const defaultConfig = {
189
+ require_speaker_selection: true,
190
+ include_browser_speakers: false,
191
+ };
186
192
  if (!fs.existsSync(configPath)) {
187
- fs.writeFileSync(configPath, JSON.stringify({}, null, 2));
193
+ fs.writeFileSync(configPath, JSON.stringify(defaultConfig, null, 2));
194
+ } else {
195
+ try {
196
+ const existingConfig = JSON.parse(fs.readFileSync(configPath, "utf-8"));
197
+ const mergedConfig = {
198
+ ...defaultConfig,
199
+ ...existingConfig,
200
+ };
201
+ fs.writeFileSync(configPath, JSON.stringify(mergedConfig, null, 2));
202
+ } catch {
203
+ fs.writeFileSync(configPath, JSON.stringify(defaultConfig, null, 2));
204
+ }
188
205
  }
189
206
 
190
207
  // Step 7: Deploy deliberation-gate skill
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dmsdc-ai/aigentry-deliberation",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
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",
@@ -32,6 +32,7 @@
32
32
  "i18n.js",
33
33
  "decision-engine.js",
34
34
  "model-router.js",
35
+ "clipboard.js",
35
36
  "install.js",
36
37
  "doctor.js",
37
38
  "observer.js",
@@ -58,7 +58,7 @@ Claude/Codex를 포함해 MCP를 지원하는 임의 CLI들이 구조화된 토
58
58
 
59
59
  > **이 규칙은 예외 없이 반드시 지켜야 합니다.**
60
60
 
61
- 1. **MUST** — 토론 시작 전 반드시 `deliberation_speaker_candidates`로 후보 조회 후 `AskUserQuestion(multiSelect)`으로 사용자에게 참가자 선택을 받아야 합니다.
61
+ 1. **MUST** — 토론 시작 전 반드시 `deliberation_speaker_candidates`로 후보 조회 후 `AskUserQuestion(multiSelect)`으로 사용자에게 참가자 선택을 받아야 합니다. 후보에는 로컬 CLI, telepty 활성 세션, 브라우저 LLM이 포함될 수 있습니다. 이 호출이 반환한 candidate token은 그대로 시작에 쓰면 안 되고, **반드시** `deliberation_confirm_speakers`로 사용자 선택을 확정한 뒤 그 confirmed `selection_token`만 `deliberation_start`에 전달해야 합니다.
62
62
  2. **MUST** — 각 턴 진행 시 반드시 `deliberation_route_turn`을 사용해야 합니다. 이 도구가 transport를 자동 감지합니다:
63
63
  - CLI speaker → `deliberation_cli_auto_turn`으로 실제 CLI 실행
64
64
  - browser_auto → CDP로 자동 전송/수집
@@ -70,7 +70,7 @@ Claude/Codex를 포함해 MCP를 지원하는 임의 CLI들이 구조화된 토
70
70
  ## 워크플로우
71
71
 
72
72
  ### A. 사용자 선택형 진행 (권장)
73
- 1. `deliberation_speaker_candidates` → 참가 가능한 CLI/브라우저 speaker 확인
73
+ 1. `deliberation_speaker_candidates` → 참가 가능한 CLI/telepty/브라우저 speaker 확인 + candidate token 획득
74
74
  2. **AskUserQuestion으로 참가자 선택 (필수)** — 감지된 CLI/브라우저 speaker 목록을 `multiSelect: true`로 제시하여 사용자가 원하는 참가자만 체크. 예:
75
75
  ```
76
76
  AskUserQuestion({
@@ -89,13 +89,14 @@ Claude/Codex를 포함해 MCP를 지원하는 임의 CLI들이 구조화된 토
89
89
  }]
90
90
  })
91
91
  ```
92
- 3. `deliberation_start` (선택된 speakers 전달) → session_id 획득
93
- 4. **`deliberation_route_turn` 호출 (필수)** 현재 차례 speaker transport 자동 결정 및 실행
92
+ 3. `deliberation_confirm_speakers` (선택된 speakers + candidate token 전달) → confirmed `selection_token` 획득
93
+ 4. `deliberation_start` (같은 speakers + confirmed `selection_token` 전달) session_id 획득
94
+ 5. **`deliberation_route_turn` 호출 (필수)** → 현재 차례 speaker transport 자동 결정 및 실행
94
95
  - CLI speaker → `deliberation_cli_auto_turn`이 실제 CLI를 실행하고 응답 수집
95
96
  - browser_auto → CDP로 자동 전송/수집
96
97
  - 자기 자신(claude)이 speaker → 직접 `deliberation_respond`로 응답 제출
97
- 5. 반복 후 `deliberation_synthesize(session_id)` → 합성 완료
98
- 6. 구현이 필요하면 `deliberation-executor` 스킬로 handoff
98
+ 6. 반복 후 `deliberation_synthesize(session_id)` → 합성 완료
99
+ 7. 구현이 필요하면 `deliberation-executor` 스킬로 handoff
99
100
  예: "session_id {id} 합의안 구현해줘"
100
101
 
101
102
  ### B. 병렬 세션 운영
@@ -80,22 +80,26 @@ When user approves, execute this sequence:
80
80
 
81
81
  ### Standard Path (brainstorming, debugging, general)
82
82
 
83
- 1. **Speaker discovery**: `deliberation_speaker_candidates` → get available CLI + browser speakers
83
+ 1. **Speaker discovery**: `deliberation_speaker_candidates` → get available CLI + telepty active sessions + browser speakers and capture the returned candidate token
84
84
  2. **Speaker selection**: `AskUserQuestion(multiSelect: true)` → user selects which speakers to include
85
- 3. **Start deliberation**: `deliberation_start`
85
+ 3. **Confirm selection**: `deliberation_confirm_speakers`
86
+ - `selection_token`: candidate token returned by `deliberation_speaker_candidates`
87
+ - `speakers`: exact user-selected list
88
+ 4. **Start deliberation**: `deliberation_start`
86
89
  - `topic`: the artifact being validated (design summary / error description + hypotheses / user's question)
90
+ - `selection_token`: confirmed token returned by `deliberation_confirm_speakers`
87
91
  - `speakers`: user-selected list
88
92
  - `speaker_roles`: from scenario preset map above
89
93
  - `rounds`: from scenario preset map above
90
94
  - `ordering_strategy`: "auto"
91
95
  - `role_preset`: from scenario preset map above
92
- 4. **Turn loop**: For each turn:
96
+ 5. **Turn loop**: For each turn:
93
97
  - Call `deliberation_route_turn` — it auto-detects the correct transport
94
98
  - **Self-speaker** (you are the current speaker): Compose your response based on your role, submit via `deliberation_respond(speaker: "claude", content: "...")`
95
99
  - **Other CLI speaker**: `deliberation_route_turn` will guide to `deliberation_cli_auto_turn` which spawns the actual CLI
96
100
  - **Browser speaker**: `deliberation_route_turn` will auto-execute via CDP
97
- 5. **Synthesize**: After all rounds complete, call `deliberation_synthesize` with a summary of the consensus
98
- 6. **Apply synthesis**: Follow the Integration Rules below
101
+ 6. **Synthesize**: After all rounds complete, call `deliberation_synthesize` with a summary of the consensus
102
+ 7. **Apply synthesis**: Follow the Integration Rules below
99
103
 
100
104
  ### Lightweight Path (code-review only)
101
105