From 9748688983cd291dafe81020f131df6d98ad6a02 Mon Sep 17 00:00:00 2001 From: ismeth Date: Fri, 20 Feb 2026 14:21:17 +0100 Subject: [PATCH] fix(athena): replace unsafe type cast with type-safe construction --- src/agents/athena/agent.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/agents/athena/agent.ts b/src/agents/athena/agent.ts index 49d27042..83bf7a5b 100644 --- a/src/agents/athena/agent.ts +++ b/src/agents/athena/agent.ts @@ -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 = { ...restrictions.permission, question: "allow", - } as AgentConfig["permission"] + } const base = { description: