phase 01: type change for command files

This commit is contained in:
Adrian
2026-02-20 13:16:02 -05:00
parent d83c1a29c3
commit da94da90db
6 changed files with 115 additions and 17 deletions

View File

@@ -8,7 +8,7 @@ import type {
} from "../types/claude"
import type {
OpenCodeBundle,
OpenCodeCommandConfig,
OpenCodeCommandFile,
OpenCodeConfig,
OpenCodeMcpServer,
} from "../types/opencode"

View File

@@ -7,7 +7,6 @@ export type OpenCodeConfig = {
tools?: Record<string, boolean>
permission?: Record<string, OpenCodePermission | Record<string, OpenCodePermission>>
agent?: Record<string, OpenCodeAgentConfig>
command?: Record<string, OpenCodeCommandConfig>
mcp?: Record<string, OpenCodeMcpServer>
}
@@ -20,13 +19,6 @@ export type OpenCodeAgentConfig = {
permission?: Record<string, OpenCodePermission>
}
export type OpenCodeCommandConfig = {
description?: string
model?: string
agent?: string
template: string
}
export type OpenCodeMcpServer = {
type: "local" | "remote"
command?: string[]
@@ -46,9 +38,16 @@ export type OpenCodePluginFile = {
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 }[]
}