- Forward temperature and permission through council-launcher to background manager - Add LaunchInput.temperature and LaunchInput.permission to background-agent types - Extract session guard with 5-minute timeout to prevent stale council locks - Make council optional in AthenaOverrideConfigSchema for partial user overrides - Support member lookup by both name and model ID in filterCouncilMembers - Add provider/model-id format validation to CouncilMemberSchema - Fix findings-presenter group header to show finding count instead of first finding's reporter count
85 lines
3.3 KiB
TypeScript
85 lines
3.3 KiB
TypeScript
import { z } from "zod"
|
|
import { FallbackModelsSchema } from "./fallback-models"
|
|
import { AthenaConfigSchema } from "./athena"
|
|
import { AgentPermissionSchema } from "./internal/permission"
|
|
|
|
export const AgentOverrideConfigSchema = z.object({
|
|
/** @deprecated Use `category` instead. Model is inherited from category defaults. */
|
|
model: z.string().optional(),
|
|
fallback_models: FallbackModelsSchema.optional(),
|
|
variant: z.string().optional(),
|
|
/** Category name to inherit model and other settings from CategoryConfig */
|
|
category: z.string().optional(),
|
|
/** Skill names to inject into agent prompt */
|
|
skills: z.array(z.string()).optional(),
|
|
temperature: z.number().min(0).max(2).optional(),
|
|
top_p: z.number().min(0).max(1).optional(),
|
|
prompt: z.string().optional(),
|
|
/** Text to append to agent prompt. Supports file:// URIs (file:///abs, file://./rel, file://~/home) */
|
|
prompt_append: z.string().optional(),
|
|
tools: z.record(z.string(), z.boolean()).optional(),
|
|
disable: z.boolean().optional(),
|
|
description: z.string().optional(),
|
|
mode: z.enum(["subagent", "primary", "all"]).optional(),
|
|
color: z
|
|
.string()
|
|
.regex(/^#[0-9A-Fa-f]{6}$/)
|
|
.optional(),
|
|
permission: AgentPermissionSchema.optional(),
|
|
/** Maximum tokens for response. Passed directly to OpenCode SDK. */
|
|
maxTokens: z.number().optional(),
|
|
/** Extended thinking configuration (Anthropic). Overrides category and default settings. */
|
|
thinking: z
|
|
.object({
|
|
type: z.enum(["enabled", "disabled"]),
|
|
budgetTokens: z.number().optional(),
|
|
})
|
|
.optional(),
|
|
/** Reasoning effort level (OpenAI). Overrides category and default settings. */
|
|
reasoningEffort: z.enum(["low", "medium", "high", "xhigh"]).optional(),
|
|
/** Text verbosity level. */
|
|
textVerbosity: z.enum(["low", "medium", "high"]).optional(),
|
|
/** Provider-specific options. Passed directly to OpenCode SDK. */
|
|
providerOptions: z.record(z.string(), z.unknown()).optional(),
|
|
/** Per-message ultrawork override model/variant when ultrawork keyword is detected. */
|
|
ultrawork: z
|
|
.object({
|
|
model: z.string().optional(),
|
|
variant: z.string().optional(),
|
|
})
|
|
.optional(),
|
|
compaction: z
|
|
.object({
|
|
model: z.string().optional(),
|
|
variant: z.string().optional(),
|
|
})
|
|
.optional(),
|
|
})
|
|
|
|
export const AthenaOverrideConfigSchema = AgentOverrideConfigSchema.merge(
|
|
z.object({
|
|
council: AthenaConfigSchema.shape.council.optional(),
|
|
})
|
|
)
|
|
|
|
export const AgentOverridesSchema = z.object({
|
|
build: AgentOverrideConfigSchema.optional(),
|
|
plan: AgentOverrideConfigSchema.optional(),
|
|
sisyphus: AgentOverrideConfigSchema.optional(),
|
|
hephaestus: AgentOverrideConfigSchema.optional(),
|
|
"sisyphus-junior": AgentOverrideConfigSchema.optional(),
|
|
"OpenCode-Builder": AgentOverrideConfigSchema.optional(),
|
|
prometheus: AgentOverrideConfigSchema.optional(),
|
|
metis: AgentOverrideConfigSchema.optional(),
|
|
momus: AgentOverrideConfigSchema.optional(),
|
|
oracle: AgentOverrideConfigSchema.optional(),
|
|
librarian: AgentOverrideConfigSchema.optional(),
|
|
explore: AgentOverrideConfigSchema.optional(),
|
|
"multimodal-looker": AgentOverrideConfigSchema.optional(),
|
|
atlas: AgentOverrideConfigSchema.optional(),
|
|
athena: AthenaOverrideConfigSchema.optional(),
|
|
})
|
|
|
|
export type AgentOverrideConfig = z.infer<typeof AgentOverrideConfigSchema>
|
|
export type AgentOverrides = z.infer<typeof AgentOverridesSchema>
|