export type OpenCodePermission = "allow" | "ask" | "deny" export type OpenCodeConfig = { $schema?: string model?: string default_agent?: string tools?: Record permission?: Record> agent?: Record mcp?: Record } export type OpenCodeAgentConfig = { description?: string mode?: "primary" | "subagent" model?: string temperature?: number tools?: Record permission?: Record } export type OpenCodeMcpServer = { type: "local" | "remote" command?: string[] url?: string environment?: Record headers?: Record enabled?: boolean } export type OpenCodeAgentFile = { name: string content: string } export type OpenCodePluginFile = { name: string content: string } export type OpenCodeCommandFile = { name: string content: string } export type OpenCodeBundle = { config: OpenCodeConfig agents: OpenCodeAgentFile[] // Commands are written as individual .md files, not in opencode.json. See ADR-001. commandFiles: OpenCodeCommandFile[] plugins: OpenCodePluginFile[] skillDirs: { sourceDir: string; name: string }[] }