fix: resolve 7 council-validated PR violations
- Fix misleading background_wait instructions to show loop pattern with remaining_task_ids (race semantics, not block-all) - Fix wrong Gemini model string: gemini-3-pro-preview → gemini-3-pro - Add getMainSessionID() fallback when input.sessionID is undefined - Narrow .gitignore packages/ to only ignore built binaries - Fix contradictory config doc: non_interactive_members 'all' → 'custom' - Add athena-junior to keyword-detector exclusion check - Add .trim() before .toUpperCase() in resolveCouncilIntent - Update snapshots for model string change
This commit is contained in:
@@ -61,21 +61,23 @@ call_omo_agent(subagent_type="explore", run_in_background=true, description="Fin
|
||||
call_omo_agent(subagent_type="explore", run_in_background=true, description="Find error handling", prompt="Find: custom Error classes, error response format, try/catch patterns. Skip tests.")
|
||||
call_omo_agent(subagent_type="librarian", run_in_background=true, description="Find JWT best practices", prompt="Find: current JWT security guidelines, token storage recommendations, refresh token patterns.")
|
||||
|
||||
// IMPORTANT: Use background_wait to block until results arrive — do NOT just stop and wait for notifications
|
||||
// IMPORTANT: background_wait returns when ANY task completes, not all — loop until done
|
||||
background_wait(task_ids=["<id1>", "<id2>", "<id3>"])
|
||||
// Check remaining_task_ids — call again if non-empty:
|
||||
background_wait(task_ids=result.remaining_task_ids)
|
||||
|
||||
// Then collect each result
|
||||
// Collect results after each background_wait returns completed tasks
|
||||
background_output(task_id="<id>")
|
||||
\`\`\`
|
||||
|
||||
**Rules:**
|
||||
- ALWAYS set \`run_in_background=true\` — never block on a single search
|
||||
- Launch ALL searches, then call \`background_wait\` with all task IDs to block until they complete
|
||||
- Launch ALL searches, then call \`background_wait\` — it returns when ANY task completes. Call again with remaining_task_ids until all are done.
|
||||
- Do NOT stop generating and wait for notifications — always use \`background_wait\` to stay active
|
||||
- Use \`explore\` for codebase pattern searches (internal)
|
||||
- Use \`librarian\` for documentation and external references
|
||||
- Keep targeted file reads (Read tool) for yourself — delegate broad searches
|
||||
- Collect results with \`background_output\` after \`background_wait\` returns
|
||||
- Collect results with \`background_output\` after each \`background_wait\` returns completed tasks
|
||||
- Before generating your final \`<COUNCIL_MEMBER_RESPONSE>\`, wait for all the background tasks to finish.
|
||||
- If you decide to form your final response before background tasks finishes, cancel any remaining pending tasks with \`background_cancel\`
|
||||
`
|
||||
|
||||
@@ -44,7 +44,7 @@ export function getValidCouncilIntents(): readonly CouncilIntent[] {
|
||||
|
||||
export function resolveCouncilIntent(intent?: string): CouncilIntent | null {
|
||||
if (!intent) return null
|
||||
const normalized = intent.toUpperCase()
|
||||
const normalized = intent.trim().toUpperCase()
|
||||
return (VALID_INTENTS as readonly string[]).includes(normalized)
|
||||
? (normalized as CouncilIntent)
|
||||
: null
|
||||
|
||||
@@ -531,7 +531,7 @@ exports[`generateModelConfig all native providers uses preferred models from fal
|
||||
"name": "GPT 5.3 Codex",
|
||||
},
|
||||
{
|
||||
"model": "google/gemini-3-pro-preview",
|
||||
"model": "google/gemini-3-pro",
|
||||
"name": "Gemini Pro 3",
|
||||
},
|
||||
],
|
||||
@@ -753,7 +753,7 @@ exports[`generateModelConfig all native providers uses preferred models with isM
|
||||
"name": "GPT 5.3 Codex",
|
||||
},
|
||||
{
|
||||
"model": "google/gemini-3-pro-preview",
|
||||
"model": "google/gemini-3-pro",
|
||||
"name": "Gemini Pro 3",
|
||||
},
|
||||
],
|
||||
@@ -2544,7 +2544,7 @@ exports[`generateModelConfig mixed provider scenarios uses Gemini + Claude combi
|
||||
"name": "Claude Opus 4.6",
|
||||
},
|
||||
{
|
||||
"model": "google/gemini-3-pro-preview",
|
||||
"model": "google/gemini-3-pro",
|
||||
"name": "Gemini Pro 3",
|
||||
},
|
||||
],
|
||||
@@ -3089,7 +3089,7 @@ exports[`generateModelConfig mixed provider scenarios uses all providers togethe
|
||||
"name": "GPT 5.3 Codex",
|
||||
},
|
||||
{
|
||||
"model": "google/gemini-3-pro-preview",
|
||||
"model": "google/gemini-3-pro",
|
||||
"name": "Gemini Pro 3",
|
||||
},
|
||||
],
|
||||
@@ -3661,7 +3661,7 @@ exports[`generateModelConfig mixed provider scenarios uses all providers with is
|
||||
"name": "GPT 5.3 Codex",
|
||||
},
|
||||
{
|
||||
"model": "google/gemini-3-pro-preview",
|
||||
"model": "google/gemini-3-pro",
|
||||
"name": "Gemini Pro 3",
|
||||
},
|
||||
],
|
||||
|
||||
@@ -22,7 +22,7 @@ const COUNCIL_CANDIDATES: Array<{
|
||||
},
|
||||
{
|
||||
provider: (a) => a.native.gemini,
|
||||
model: "google/gemini-3-pro-preview",
|
||||
model: "google/gemini-3-pro",
|
||||
name: "Gemini Pro 3",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -70,12 +70,12 @@ export function createKeywordDetectorHook(
|
||||
}
|
||||
}
|
||||
|
||||
// Athena is a council orchestrator — skip all keyword injections.
|
||||
// Athena and Athena-Junior are council orchestrators — skip all keyword injections.
|
||||
// search/analyze modes tell the agent to use explore agents and grep directly,
|
||||
// which conflicts with Athena's job of launching council members via task calls.
|
||||
// Use getAgentConfigKey to handle display name remapping ("Athena (Council)" → "athena").
|
||||
const agentConfigKey = currentAgent ? getAgentConfigKey(currentAgent) : undefined
|
||||
if (agentConfigKey === "athena") {
|
||||
if (agentConfigKey === "athena" || agentConfigKey === "athena-junior") {
|
||||
if (detectedKeywords.length > 0) {
|
||||
log(`[keyword-detector] Skipping keywords for Athena (council orchestrator)`, {
|
||||
sessionID: input.sessionID,
|
||||
|
||||
@@ -80,8 +80,9 @@ export function createToolExecuteBeforeHandler(args: {
|
||||
const toolNameLower = input.tool?.toLowerCase()
|
||||
|
||||
if (toolNameLower === "question" || toolNameLower === "askuserquestion" || toolNameLower === "ask_user_question" || toolNameLower === "switch_agent") {
|
||||
if (hasPendingCouncilMembers(input.sessionID)) {
|
||||
const sessionAgent = await resolveSessionAgent(ctx.client, input.sessionID)
|
||||
const sessionID = input.sessionID || getMainSessionID()
|
||||
if (sessionID && hasPendingCouncilMembers(sessionID)) {
|
||||
const sessionAgent = await resolveSessionAgent(ctx.client, sessionID)
|
||||
const sessionAgentKey = sessionAgent ? getAgentConfigKey(sessionAgent) : undefined
|
||||
|
||||
if (sessionAgentKey === "athena") {
|
||||
|
||||
Reference in New Issue
Block a user