fix(athena): replace unsafe type cast with type-safe construction

This commit is contained in:
ismeth
2026-02-20 14:21:17 +01:00
committed by YeonGyu-Kim
parent 0d30d717e1
commit 9748688983

View File

@@ -1,7 +1,7 @@
import type { AgentConfig } from "@opencode-ai/sdk"
import type { AgentMode, AgentPromptMetadata } from "../types"
import { isGptModel } from "../types"
import { createAgentToolRestrictions } from "../../shared/permission-compat"
import { createAgentToolRestrictions, type PermissionValue } from "../../shared/permission-compat"
const MODE: AgentMode = "primary"
@@ -211,10 +211,10 @@ The switch_agent tool switches the active agent. After you call it, end your res
export function createAthenaAgent(model: string): AgentConfig {
const restrictions = createAgentToolRestrictions(["write", "edit", "call_omo_agent"])
const permission = {
const permission: Record<string, PermissionValue> = {
...restrictions.permission,
question: "allow",
} as AgentConfig["permission"]
}
const base = {
description: