@dmsdc-ai/aigentry-deliberation 0.0.1 → 0.0.2
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/index.js +15 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2154,7 +2154,6 @@ server.tool(
|
|
|
2154
2154
|
}
|
|
2155
2155
|
|
|
2156
2156
|
const sessionId = generateSessionId(topic);
|
|
2157
|
-
const hasManualSpeakers = Array.isArray(speakers) && speakers.length > 0;
|
|
2158
2157
|
const candidateSnapshot = await collectSpeakerCandidates({ include_cli: true, include_browser: true });
|
|
2159
2158
|
|
|
2160
2159
|
// Resolve effective settings from config
|
|
@@ -2165,12 +2164,26 @@ server.tool(
|
|
|
2165
2164
|
// Resolve "auto": 2 speakers → cyclic, 3+ → weighted-random
|
|
2166
2165
|
ordering_strategy = rawOrdering === "auto" ? undefined : rawOrdering; // resolved after speakers are known
|
|
2167
2166
|
|
|
2167
|
+
// When require_speaker_selection is explicitly true in config,
|
|
2168
|
+
// ignore LLM-provided speakers UNLESS require_manual_speakers: true is explicitly passed
|
|
2169
|
+
// (which signals the user has confirmed the speaker selection)
|
|
2170
|
+
const configRequiresSelection = config.require_speaker_selection === true;
|
|
2171
|
+
const llmExplicitlyConfirmed = require_manual_speakers === true;
|
|
2172
|
+
const hasManualSpeakers = Array.isArray(speakers) && speakers.length > 0
|
|
2173
|
+
&& (!configRequiresSelection || llmExplicitlyConfirmed);
|
|
2174
|
+
|
|
2168
2175
|
if (!hasManualSpeakers && effectiveRequireManual) {
|
|
2169
2176
|
const candidateText = formatSpeakerCandidatesReport(candidateSnapshot);
|
|
2177
|
+
const llmSuggested = Array.isArray(speakers) && speakers.length > 0
|
|
2178
|
+
? `\n\n💡 **LLM이 제안한 스피커:** ${speakers.join(", ")}\n위 제안을 사용하려면 \`require_manual_speakers: true\`와 함께 speakers를 다시 전달하세요.`
|
|
2179
|
+
: "";
|
|
2180
|
+
const configNote = configRequiresSelection
|
|
2181
|
+
? "\n\n⚙️ `require_speaker_selection: true` 설정에 의해 사용자가 직접 스피커를 선택해야 합니다."
|
|
2182
|
+
: "";
|
|
2170
2183
|
return {
|
|
2171
2184
|
content: [{
|
|
2172
2185
|
type: "text",
|
|
2173
|
-
text: `스피커를 직접 선택해야 deliberation을 시작할 수
|
|
2186
|
+
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
2187
|
}],
|
|
2175
2188
|
};
|
|
2176
2189
|
}
|
package/package.json
CHANGED