opencode_offline/opencode-schema.json

415 lines
11 KiB
JSON
Raw Normal View History

2025-04-21 20:29:03 +08:00
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"agent": {
"description": "Agent configuration",
"properties": {
"maxTokens": {
"description": "Maximum tokens for the agent",
"minimum": 1,
"type": "integer"
},
"model": {
"description": "Model ID for the agent",
"enum": [
2025-04-29 21:43:33 +08:00
"azure.o1-mini",
2025-05-01 00:05:59 +08:00
"openrouter.gemini-2.5-flash",
"claude-3-haiku",
"o1-mini",
"qwen-qwq",
2025-04-29 21:43:33 +08:00
"llama-3.3-70b-versatile",
"openrouter.claude-3.5-sonnet",
2025-05-01 00:05:59 +08:00
"o3-mini",
2025-04-29 21:43:33 +08:00
"o4-mini",
2025-05-01 00:05:59 +08:00
"gpt-4.1",
"azure.o3-mini",
"openrouter.gpt-4.1-nano",
2025-04-29 21:43:33 +08:00
"openrouter.gpt-4o",
2025-05-01 00:05:59 +08:00
"gemini-2.5",
2025-04-29 21:36:43 +08:00
"azure.gpt-4o",
2025-05-01 00:05:59 +08:00
"azure.gpt-4o-mini",
"claude-3.7-sonnet",
"azure.gpt-4.1-nano",
"openrouter.o1",
"openrouter.claude-3-haiku",
"bedrock.claude-3.7-sonnet",
"gemini-2.5-flash",
"azure.o3",
"openrouter.gemini-2.5",
"openrouter.o3",
"openrouter.o3-mini",
"openrouter.gpt-4.1-mini",
"openrouter.gpt-4.5-preview",
"openrouter.gpt-4o-mini",
"gpt-4.1-mini",
"meta-llama/llama-4-scout-17b-16e-instruct",
"openrouter.o1-mini",
"gpt-4.5-preview",
2025-04-29 21:43:33 +08:00
"o3",
2025-05-01 00:05:59 +08:00
"openrouter.claude-3.5-haiku",
2025-04-29 21:43:33 +08:00
"claude-3-opus",
2025-05-01 00:05:59 +08:00
"o1-pro",
"gemini-2.0-flash",
2025-04-29 21:43:33 +08:00
"azure.o4-mini",
2025-05-01 00:05:59 +08:00
"openrouter.o4-mini",
"claude-3.5-sonnet",
2025-04-29 21:43:33 +08:00
"meta-llama/llama-4-maverick-17b-128e-instruct",
2025-05-01 00:05:59 +08:00
"azure.o1",
2025-04-29 21:43:33 +08:00
"openrouter.gpt-4.1",
"openrouter.o1-pro",
2025-05-01 00:05:59 +08:00
"gpt-4.1-nano",
"azure.gpt-4.5-preview",
"openrouter.claude-3-opus",
"gpt-4o-mini",
"o1",
"deepseek-r1-distill-llama-70b",
"azure.gpt-4.1",
"gpt-4o",
2025-04-29 21:43:33 +08:00
"azure.gpt-4.1-mini",
2025-05-01 00:05:59 +08:00
"openrouter.claude-3.7-sonnet",
"claude-3.5-haiku",
"gemini-2.0-flash-lite"
2025-04-21 20:29:03 +08:00
],
"type": "string"
},
"reasoningEffort": {
"description": "Reasoning effort for models that support it (OpenAI, Anthropic)",
2025-04-28 21:46:09 +08:00
"enum": [
"low",
"medium",
"high"
],
2025-04-21 20:29:03 +08:00
"type": "string"
}
},
2025-04-28 21:46:09 +08:00
"required": [
"model"
],
2025-04-21 20:29:03 +08:00
"type": "object"
}
},
"description": "Configuration schema for the OpenCode application",
"properties": {
"agents": {
"additionalProperties": {
"description": "Agent configuration",
"properties": {
"maxTokens": {
"description": "Maximum tokens for the agent",
"minimum": 1,
"type": "integer"
},
"model": {
"description": "Model ID for the agent",
"enum": [
2025-04-29 21:43:33 +08:00
"azure.o1-mini",
2025-05-01 00:05:59 +08:00
"openrouter.gemini-2.5-flash",
"claude-3-haiku",
"o1-mini",
"qwen-qwq",
2025-04-29 21:43:33 +08:00
"llama-3.3-70b-versatile",
"openrouter.claude-3.5-sonnet",
2025-05-01 00:05:59 +08:00
"o3-mini",
2025-04-29 21:43:33 +08:00
"o4-mini",
2025-05-01 00:05:59 +08:00
"gpt-4.1",
"azure.o3-mini",
"openrouter.gpt-4.1-nano",
2025-04-29 21:43:33 +08:00
"openrouter.gpt-4o",
2025-05-01 00:05:59 +08:00
"gemini-2.5",
2025-04-29 21:36:43 +08:00
"azure.gpt-4o",
2025-05-01 00:05:59 +08:00
"azure.gpt-4o-mini",
"claude-3.7-sonnet",
"azure.gpt-4.1-nano",
"openrouter.o1",
"openrouter.claude-3-haiku",
"bedrock.claude-3.7-sonnet",
"gemini-2.5-flash",
"azure.o3",
"openrouter.gemini-2.5",
"openrouter.o3",
"openrouter.o3-mini",
"openrouter.gpt-4.1-mini",
"openrouter.gpt-4.5-preview",
"openrouter.gpt-4o-mini",
"gpt-4.1-mini",
"meta-llama/llama-4-scout-17b-16e-instruct",
"openrouter.o1-mini",
"gpt-4.5-preview",
2025-04-29 21:43:33 +08:00
"o3",
2025-05-01 00:05:59 +08:00
"openrouter.claude-3.5-haiku",
2025-04-29 21:43:33 +08:00
"claude-3-opus",
2025-05-01 00:05:59 +08:00
"o1-pro",
"gemini-2.0-flash",
2025-04-29 21:43:33 +08:00
"azure.o4-mini",
2025-05-01 00:05:59 +08:00
"openrouter.o4-mini",
"claude-3.5-sonnet",
2025-04-29 21:43:33 +08:00
"meta-llama/llama-4-maverick-17b-128e-instruct",
2025-05-01 00:05:59 +08:00
"azure.o1",
2025-04-29 21:43:33 +08:00
"openrouter.gpt-4.1",
"openrouter.o1-pro",
2025-05-01 00:05:59 +08:00
"gpt-4.1-nano",
"azure.gpt-4.5-preview",
"openrouter.claude-3-opus",
"gpt-4o-mini",
"o1",
"deepseek-r1-distill-llama-70b",
"azure.gpt-4.1",
"gpt-4o",
2025-04-29 21:43:33 +08:00
"azure.gpt-4.1-mini",
2025-05-01 00:05:59 +08:00
"openrouter.claude-3.7-sonnet",
"claude-3.5-haiku",
"gemini-2.0-flash-lite"
2025-04-21 20:29:03 +08:00
],
"type": "string"
},
"reasoningEffort": {
"description": "Reasoning effort for models that support it (OpenAI, Anthropic)",
2025-04-28 21:46:09 +08:00
"enum": [
"low",
"medium",
"high"
],
2025-04-21 20:29:03 +08:00
"type": "string"
}
},
2025-04-28 21:46:09 +08:00
"required": [
"model"
],
2025-04-21 20:29:03 +08:00
"type": "object"
},
"description": "Agent configurations",
"properties": {
"coder": {
"$ref": "#/definitions/agent"
},
"task": {
"$ref": "#/definitions/agent"
},
"title": {
"$ref": "#/definitions/agent"
}
},
"type": "object"
},
2025-04-28 02:11:09 +08:00
"contextPaths": {
"default": [
".github/copilot-instructions.md",
".cursorrules",
".cursor/rules/",
"CLAUDE.md",
"CLAUDE.local.md",
"opencode.md",
"opencode.local.md",
"OpenCode.md",
"OpenCode.local.md",
"OPENCODE.md",
"OPENCODE.local.md"
],
"description": "Context paths for the application",
"items": {
"type": "string"
},
"type": "array"
},
2025-04-21 20:29:03 +08:00
"data": {
"description": "Storage configuration",
"properties": {
"directory": {
"default": ".opencode",
"description": "Directory where application data is stored",
"type": "string"
}
},
2025-04-28 21:46:09 +08:00
"required": [
"directory"
],
2025-04-21 20:29:03 +08:00
"type": "object"
},
"debug": {
"default": false,
"description": "Enable debug mode",
"type": "boolean"
},
"debugLSP": {
"default": false,
"description": "Enable LSP debug mode",
"type": "boolean"
},
"lsp": {
"additionalProperties": {
"description": "LSP configuration for a language",
"properties": {
"args": {
"description": "Command arguments for the LSP server",
"items": {
"type": "string"
},
"type": "array"
},
"command": {
"description": "Command to execute for the LSP server",
"type": "string"
},
"disabled": {
"default": false,
"description": "Whether the LSP is disabled",
"type": "boolean"
},
"options": {
"description": "Additional options for the LSP server",
"type": "object"
}
},
2025-04-28 21:46:09 +08:00
"required": [
"command"
],
2025-04-21 20:29:03 +08:00
"type": "object"
},
"description": "Language Server Protocol configurations",
"type": "object"
},
"mcpServers": {
"additionalProperties": {
"description": "MCP server configuration",
"properties": {
"args": {
"description": "Command arguments for the MCP server",
"items": {
"type": "string"
},
"type": "array"
},
"command": {
"description": "Command to execute for the MCP server",
"type": "string"
},
"env": {
"description": "Environment variables for the MCP server",
"items": {
"type": "string"
},
"type": "array"
},
"headers": {
"additionalProperties": {
"type": "string"
},
"description": "HTTP headers for SSE type MCP servers",
"type": "object"
},
"type": {
"default": "stdio",
"description": "Type of MCP server",
2025-04-28 21:46:09 +08:00
"enum": [
"stdio",
"sse"
],
2025-04-21 20:29:03 +08:00
"type": "string"
},
"url": {
"description": "URL for SSE type MCP servers",
"type": "string"
}
},
2025-04-28 21:46:09 +08:00
"required": [
"command"
],
2025-04-21 20:29:03 +08:00
"type": "object"
},
"description": "Model Control Protocol server configurations",
"type": "object"
},
"providers": {
"additionalProperties": {
"description": "Provider configuration",
"properties": {
"apiKey": {
"description": "API key for the provider",
"type": "string"
},
"disabled": {
"default": false,
"description": "Whether the provider is disabled",
"type": "boolean"
},
"provider": {
"description": "Provider type",
"enum": [
"anthropic",
"openai",
"gemini",
"groq",
2025-04-28 21:46:09 +08:00
"openrouter",
2025-04-28 21:42:57 +08:00
"bedrock",
2025-04-28 21:46:09 +08:00
"azure"
2025-04-21 20:29:03 +08:00
],
"type": "string"
}
},
"type": "object"
},
"description": "LLM provider configurations",
"type": "object"
},
2025-04-28 21:46:09 +08:00
"tui": {
"description": "Terminal User Interface configuration",
"properties": {
2025-05-01 00:05:59 +08:00
"customTheme": {
"additionalProperties": {
"oneOf": [
{
"pattern": "^#[0-9a-fA-F]{6}$",
"type": "string"
},
{
"additionalProperties": false,
"properties": {
"dark": {
"pattern": "^#[0-9a-fA-F]{6}$",
"type": "string"
},
"light": {
"pattern": "^#[0-9a-fA-F]{6}$",
"type": "string"
}
},
"required": [
"dark",
"light"
],
"type": "object"
}
]
},
"description": "Custom theme color definitions",
"type": "object"
},
2025-04-28 21:46:09 +08:00
"theme": {
2025-04-29 21:20:41 +08:00
"default": "opencode",
2025-04-28 21:46:09 +08:00
"description": "TUI theme name",
"enum": [
2025-04-29 21:20:41 +08:00
"opencode",
2025-04-28 21:46:09 +08:00
"catppuccin",
2025-04-29 21:24:46 +08:00
"dracula",
2025-04-29 21:20:41 +08:00
"flexoki",
"gruvbox",
"monokai",
2025-04-29 21:36:43 +08:00
"onedark",
2025-04-29 21:43:33 +08:00
"tokyonight",
2025-05-01 00:05:59 +08:00
"tron",
"custom"
2025-04-28 21:46:09 +08:00
],
"type": "string"
}
},
"type": "object"
},
2025-04-21 20:29:03 +08:00
"wd": {
"description": "Working directory for the application",
"type": "string"
}
},
"title": "OpenCode Configuration",
"type": "object"
}