@dmsdc-ai/aigentry-deliberation 0.0.23 → 0.0.24

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.
Files changed (3) hide show
  1. package/README.md +6 -0
  2. package/index.js +8 -5
  3. package/package.json +2 -1
package/README.md CHANGED
@@ -179,6 +179,12 @@ cp skills/deliberation-gate/SKILL.md ~/.claude/skills/deliberation-gate/SKILL.md
179
179
 
180
180
  ## What's New
181
181
 
182
+ ### v0.0.24
183
+ - **Role inference**: Heading marker weight increased from +5 to +8, added critic(검증/평가/Review) and researcher(데이터/Data) patterns to reduce false positives
184
+ - **Logging payload**: TURN log includes `suggested_role`, `role_drift`; CLI_TURN log includes `prior_turns`, `effective_timeout`
185
+ - **Vote marker warning**: WARN-level `INVALID_TURN` logged when response lacks [AGREE]/[DISAGREE]/[CONDITIONAL] markers
186
+ - **Auto-deploy**: `postversion` hook auto-installs to MCP server path after `npm version`
187
+
182
188
  ### v0.0.23
183
189
  - **Vote enforcement**: Turn prompts now require [AGREE]/[DISAGREE]/[CONDITIONAL] markers for reliable consensus measurement
184
190
  - **Dynamic CLI timeout**: First CLI invocation gets 180s (cold-start buffer), subsequent turns use default 120s
package/index.js CHANGED
@@ -219,10 +219,10 @@ const ROLE_KEYWORDS = {
219
219
  };
220
220
 
221
221
  const ROLE_HEADING_MARKERS = {
222
- critic: /^##?\s*(Critic|비판|약점|심각도|위험\s*분석)/m,
222
+ critic: /^##?\s*(Critic|비판|약점|심각도|위험\s*분석|검증|평가|Review)/m,
223
223
  implementer: /^##?\s*(코드\s*스케치|구현|Implementation|제안\s*코드)/m,
224
224
  mediator: /^##?\s*(합의|종합|중재|Consensus|Mediation)/m,
225
- researcher: /^##?\s*(조사\s*결과|비교\s*분석|Research|사례\s*연구|근거)/m,
225
+ researcher: /^##?\s*(조사\s*결과|비교\s*분석|Research|사례\s*연구|근거|데이터|Data)/m,
226
226
  };
227
227
 
228
228
  function inferSuggestedRole(text) {
@@ -234,7 +234,7 @@ function inferSuggestedRole(text) {
234
234
  // Structural heading markers get extra weight (equivalent to 5 keyword matches)
235
235
  for (const [role, pattern] of Object.entries(ROLE_HEADING_MARKERS)) {
236
236
  if (pattern.test(text)) {
237
- scores[role] = (scores[role] || 0) + 5;
237
+ scores[role] = (scores[role] || 0) + 8;
238
238
  }
239
239
  }
240
240
  if (Object.keys(scores).length === 0) return "free";
@@ -2304,6 +2304,9 @@ function submitDeliberationTurn({ session_id, speaker, content, turn_id, channel
2304
2304
  }
2305
2305
 
2306
2306
  const votes = parseVotes(content);
2307
+ if (votes.length === 0) {
2308
+ appendRuntimeLog("WARN", `INVALID_TURN: ${state.id} | R${state.current_round} | speaker: ${normalizedSpeaker} | reason: no_vote_marker`);
2309
+ }
2307
2310
  const suggestedRole = inferSuggestedRole(content);
2308
2311
  const assignedRole = (state.speaker_roles || {})[normalizedSpeaker] || "free";
2309
2312
  const roleDrift = assignedRole !== "free" && suggestedRole !== "free" && assignedRole !== suggestedRole;
@@ -2319,7 +2322,7 @@ function submitDeliberationTurn({ session_id, speaker, content, turn_id, channel
2319
2322
  suggested_next_role: suggestedRole !== "free" ? suggestedRole : undefined,
2320
2323
  role_drift: roleDrift || undefined,
2321
2324
  });
2322
- appendRuntimeLog("INFO", `TURN: ${state.id} | R${state.current_round} | speaker: ${normalizedSpeaker} | votes: ${votes.length > 0 ? votes.map(v => v.vote).join(",") : "none"} | channel: ${channel_used || "respond"}`);
2325
+ appendRuntimeLog("INFO", `TURN: ${state.id} | R${state.current_round} | speaker: ${normalizedSpeaker} | votes: ${votes.length > 0 ? votes.map(v => v.vote).join(",") : "none"} | channel: ${channel_used || "respond"} | suggested_role: ${suggestedRole} | role_drift: ${roleDrift || false}`);
2323
2326
 
2324
2327
  state.current_speaker = selectNextSpeaker(state);
2325
2328
 
@@ -3092,7 +3095,7 @@ server.tool(
3092
3095
  });
3093
3096
 
3094
3097
  const elapsedMs = Date.now() - startTime;
3095
- appendRuntimeLog("INFO", `CLI_TURN: ${resolved} | speaker: ${speaker} | cli: ${hint.cmd} | elapsed: ${elapsedMs}ms | response_len: ${response.length}`);
3098
+ appendRuntimeLog("INFO", `CLI_TURN: ${resolved} | speaker: ${speaker} | cli: ${hint.cmd} | elapsed: ${elapsedMs}ms | response_len: ${response.length} | prior_turns: ${speakerPriorTurns} | effective_timeout: ${effectiveTimeout}s`);
3096
3099
 
3097
3100
  if (!response) {
3098
3101
  return { content: [{ type: "text", text: `⚠️ CLI "${speaker}"가 빈 응답을 반환했습니다.` }] };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dmsdc-ai/aigentry-deliberation",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
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",
@@ -48,6 +48,7 @@
48
48
  "test": "vitest run",
49
49
  "test:watch": "vitest",
50
50
  "prepublishOnly": "vitest run",
51
+ "postversion": "node install.js",
51
52
  "release:patch": "npm version patch && git push && git push --tags",
52
53
  "release:minor": "npm version minor && git push && git push --tags",
53
54
  "release:major": "npm version major && git push && git push --tags"