Merge pull request #2 from code-yeongyu/docs-schema-and-readme-config
docs: add comprehensive configuration documentation
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,7 +2,8 @@
|
||||
node_modules/
|
||||
|
||||
# Build output
|
||||
dist/
|
||||
dist/*
|
||||
!dist/oh-my-opencode.schema.json
|
||||
|
||||
# IDE
|
||||
.idea/
|
||||
|
||||
125
README.ko.md
125
README.ko.md
@@ -4,6 +4,11 @@
|
||||
|
||||
- [Oh My OpenCode](#oh-my-opencode)
|
||||
- [설치](#설치)
|
||||
- [설정](#설정)
|
||||
- [JSON 스키마 지원](#json-스키마-지원)
|
||||
- [특정 MCP 비활성화](#특정-mcp-비활성화)
|
||||
- [특정 Agent 비활성화](#특정-agent-비활성화)
|
||||
- [Agent 설정](#agent-설정)
|
||||
- [LLM Agent를 위한 안내](#llm-agent를-위한-안내)
|
||||
- [세 줄 요약](#세-줄-요약)
|
||||
- [Why OpenCode \& Why Oh My OpenCode](#why-opencode--why-oh-my-opencode)
|
||||
@@ -46,6 +51,124 @@ OpenCode 가 낭만이 사라진것같은 오늘날의 시대에, 당신에게
|
||||
}
|
||||
```
|
||||
|
||||
## 설정
|
||||
|
||||
`oh-my-opencode.json` (또는 `.oh-my-opencode.json`) 파일을 프로젝트 루트에 생성해서 Oh My OpenCode를 입맛대로 설정할 수 있어.
|
||||
|
||||
### JSON 스키마 지원
|
||||
|
||||
VS Code 같은 에디터에서 자동완성을 쓰려면 스키마를 추가해.
|
||||
|
||||
**원격 스키마 사용:**
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/dist/oh-my-opencode.schema.json"
|
||||
}
|
||||
```
|
||||
|
||||
**로컬 스키마 사용 (개발 중일 때):**
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "./node_modules/oh-my-opencode/dist/oh-my-opencode.schema.json"
|
||||
}
|
||||
```
|
||||
|
||||
### 특정 MCP 비활성화
|
||||
|
||||
특정 MCP가 거슬린다면 끌 수 있어.
|
||||
|
||||
```json
|
||||
{
|
||||
"disabled_mcps": ["websearch_exa"]
|
||||
}
|
||||
```
|
||||
|
||||
### 특정 Agent 비활성화
|
||||
|
||||
특정 에이전트가 마음에 안 들거나, 토큰을 아끼고 싶다면 비활성화해.
|
||||
비활성화 가능한 목록: `oracle`, `librarian`, `explore`, `frontend-ui-ux-engineer`, `document-writer`
|
||||
|
||||
```json
|
||||
{
|
||||
"disabled_agents": ["frontend-ui-ux-engineer"]
|
||||
}
|
||||
```
|
||||
|
||||
### Agent 설정
|
||||
|
||||
각 에이전트의 모델, 프롬프트, 권한 등을 세밀하게 조정할 수 있어.
|
||||
|
||||
**설정 옵션:**
|
||||
|
||||
| 옵션 | 설명 |
|
||||
|------|------|
|
||||
| `model` | 사용할 모델 ID (예: `anthropic/claude-sonnet-4`) |
|
||||
| `temperature` | 창의성 조절 (0.0 ~ 2.0) |
|
||||
| `top_p` | 단어 선택 다양성 (0.0 ~ 1.0) |
|
||||
| `prompt` | 시스템 프롬프트 오버라이드 |
|
||||
| `tools` | 특정 도구 활성화/비활성화 (`{"tool_name": false}`) |
|
||||
| `disable` | 에이전트 비활성화 (`true`/`false`) |
|
||||
| `description` | 에이전트 설명 수정 |
|
||||
| `mode` | 에이전트 모드 (`subagent`, `primary`, `all`) |
|
||||
| `color` | 터미널 출력 색상 (HEX 코드) |
|
||||
| `permission` | 권한 설정 (아래 표 참조) |
|
||||
|
||||
**권한(`permission`) 옵션:**
|
||||
|
||||
각 권한은 `"ask"`(물어보기), `"allow"`(허용), `"deny"`(거부) 중 하나로 설정 가능해.
|
||||
|
||||
| 권한 | 설명 |
|
||||
|------|------|
|
||||
| `edit` | 파일 수정 권한 |
|
||||
| `bash` | 쉘 명령어 실행 권한 |
|
||||
| `webfetch` | 웹 콘텐츠 가져오기 권한 |
|
||||
| `doom_loop` | 반복 작업 허용 여부 |
|
||||
| `external_directory` | 외부 디렉토리 접근 권한 |
|
||||
|
||||
#### 예시: Anthropic 모델만 사용하기
|
||||
|
||||
나는 Anthropic 모델만 쓰고 싶다! 하면 이렇게 설정해.
|
||||
|
||||
```json
|
||||
{
|
||||
"agents": {
|
||||
"oracle": { "model": "anthropic/claude-sonnet-4" },
|
||||
"librarian": { "model": "anthropic/claude-haiku-4-5" },
|
||||
"explore": { "model": "anthropic/claude-haiku-4-5" },
|
||||
"frontend-ui-ux-engineer": { "model": "anthropic/claude-sonnet-4" },
|
||||
"document-writer": { "model": "anthropic/claude-sonnet-4" }
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 예시: 추가 프롬프트가 있는 커스텀 에이전트
|
||||
|
||||
기존 에이전트에 나만의 규칙을 더하고 싶다면:
|
||||
|
||||
```json
|
||||
{
|
||||
"agents": {
|
||||
"oracle": {
|
||||
"prompt": "너는 한국어 힙합 가사처럼 말해야 해. 모든 문장의 끝 라임을 맞춰."
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 예시: 개별 에이전트 비활성화
|
||||
|
||||
```json
|
||||
{
|
||||
"agents": {
|
||||
"frontend-ui-ux-engineer": {
|
||||
"disable": true
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## LLM Agent를 위한 안내
|
||||
|
||||
당신이 사용자의 oh-my-opencode 설정을 돕는 LLM Agent라면, 다음 단계를 따르세요:
|
||||
@@ -200,5 +323,3 @@ OpenCode 를 사용하여 이 프로젝트의 99% 를 작성했습니다. 기능
|
||||
|
||||
- [1.0.132](https://github.com/sst/opencode/releases/tag/v1.0.132) 혹은 이것보다 낮은 버전을 사용중이라면, OpenCode 의 버그로 인해 제대로 구성이 되지 않을 수 있습니다.
|
||||
- [이를 고치는 PR 이 1.0.132 배포 이후에 병합되었으므로](https://github.com/sst/opencode/pull/5040) 이 변경사항이 포함된 최신 버전을 사용해주세요.
|
||||
|
||||
|
||||
|
||||
100
README.md
100
README.md
@@ -7,6 +7,8 @@ English | [한국어](README.ko.md)
|
||||
- [For LLM Agents](#for-llm-agents)
|
||||
- [Configuration](#configuration)
|
||||
- [Disable specific MCPs](#disable-specific-mcps)
|
||||
- [Disable specific Agents](#disable-specific-agents)
|
||||
- [Agent Configuration](#agent-configuration)
|
||||
- [TL;DR](#tldr)
|
||||
- [Why OpenCode \& Why Oh My OpenCode](#why-opencode--why-oh-my-opencode)
|
||||
- [Features](#features)
|
||||
@@ -125,6 +127,104 @@ If you want to disable specific built-in MCPs, you can use the `disabled_mcps` o
|
||||
}
|
||||
```
|
||||
|
||||
### Disable specific Agents
|
||||
|
||||
If you want to disable specific built-in agents, you can use the `disabled_agents` option.
|
||||
|
||||
```json
|
||||
{
|
||||
"disabled_agents": ["explore", "frontend-ui-ux-engineer"]
|
||||
}
|
||||
```
|
||||
|
||||
Available agents: `oracle`, `librarian`, `explore`, `frontend-ui-ux-engineer`, `document-writer`
|
||||
|
||||
### Agent Configuration
|
||||
|
||||
You can override the configuration of any built-in agent using the `agents` option. This allows you to change models, adjust creativity, modify permissions, or disable agents individually.
|
||||
|
||||
#### Configuration Options
|
||||
|
||||
| Option | Type | Description |
|
||||
|--------|------|-------------|
|
||||
| `model` | string | Override the default model (e.g., "anthropic/claude-sonnet-4") |
|
||||
| `temperature` | number (0-2) | Controls randomness (0 = deterministic, 2 = creative) |
|
||||
| `top_p` | number (0-1) | Nucleus sampling parameter |
|
||||
| `prompt` | string | Additional system prompt to append |
|
||||
| `tools` | object | Enable/disable specific tools (e.g., `{"websearch_exa": false}`) |
|
||||
| `disable` | boolean | Completely disable the agent |
|
||||
| `description` | string | Override agent description |
|
||||
| `mode` | "subagent" \| "primary" \| "all" | When agent is available |
|
||||
| `color` | string | Hex color code for terminal output (e.g., "#FF0000") |
|
||||
| `permission` | object | Permission settings for sensitive operations |
|
||||
|
||||
#### Permission Options
|
||||
|
||||
| Option | Values | Description |
|
||||
|--------|--------|-------------|
|
||||
| `edit` | "ask" \| "allow" \| "deny" | File modification permissions |
|
||||
| `bash` | "ask" \| "allow" \| "deny" \| object | Shell command execution permissions |
|
||||
| `webfetch` | "ask" \| "allow" \| "deny" | Web access permissions |
|
||||
| `doom_loop` | "ask" \| "allow" \| "deny" | Infinite loop prevention |
|
||||
| `external_directory` | "ask" \| "allow" \| "deny" | Access outside project root |
|
||||
|
||||
#### Examples
|
||||
|
||||
**Using Only Anthropic Models**
|
||||
|
||||
This configuration forces all agents to use Anthropic models, suitable for users with only Anthropic API access.
|
||||
|
||||
```json
|
||||
{
|
||||
"agents": {
|
||||
"oracle": {
|
||||
"model": "anthropic/claude-sonnet-4"
|
||||
},
|
||||
"librarian": {
|
||||
"model": "anthropic/claude-haiku-4-5"
|
||||
},
|
||||
"explore": {
|
||||
"model": "anthropic/claude-haiku-4-5"
|
||||
},
|
||||
"frontend-ui-ux-engineer": {
|
||||
"model": "anthropic/claude-sonnet-4"
|
||||
},
|
||||
"document-writer": {
|
||||
"model": "anthropic/claude-sonnet-4"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Custom Agent with Additional Prompt**
|
||||
|
||||
Inject custom instructions into an agent's system prompt.
|
||||
|
||||
```json
|
||||
{
|
||||
"agents": {
|
||||
"frontend-ui-ux-engineer": {
|
||||
"prompt": "ALWAYS use Tailwind CSS. NEVER use inline styles. Prefer dark mode defaults.",
|
||||
"temperature": 0.8
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Disable Agents Individually**
|
||||
|
||||
You can also disable agents using the `disable` property within the agent config.
|
||||
|
||||
```json
|
||||
{
|
||||
"agents": {
|
||||
"explore": {
|
||||
"disable": true
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## TL;DR
|
||||
|
||||
- **Model Setup Required**
|
||||
|
||||
159
dist/oh-my-opencode.schema.json
vendored
Normal file
159
dist/oh-my-opencode.schema.json
vendored
Normal file
@@ -0,0 +1,159 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/dist/oh-my-opencode.schema.json",
|
||||
"title": "Oh My OpenCode Configuration",
|
||||
"description": "Configuration schema for oh-my-opencode plugin",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"$schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"disabled_mcps": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"websearch_exa",
|
||||
"context7"
|
||||
]
|
||||
}
|
||||
},
|
||||
"disabled_agents": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"oracle",
|
||||
"librarian",
|
||||
"explore",
|
||||
"frontend-ui-ux-engineer",
|
||||
"document-writer"
|
||||
]
|
||||
}
|
||||
},
|
||||
"agents": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"oracle",
|
||||
"librarian",
|
||||
"explore",
|
||||
"frontend-ui-ux-engineer",
|
||||
"document-writer"
|
||||
]
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"model": {
|
||||
"type": "string"
|
||||
},
|
||||
"temperature": {
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"maximum": 2
|
||||
},
|
||||
"top_p": {
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"maximum": 1
|
||||
},
|
||||
"prompt": {
|
||||
"type": "string"
|
||||
},
|
||||
"tools": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"disable": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"mode": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"subagent",
|
||||
"primary",
|
||||
"all"
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"type": "string",
|
||||
"pattern": "^#[0-9A-Fa-f]{6}$"
|
||||
},
|
||||
"permission": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"edit": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ask",
|
||||
"allow",
|
||||
"deny"
|
||||
]
|
||||
},
|
||||
"bash": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ask",
|
||||
"allow",
|
||||
"deny"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ask",
|
||||
"allow",
|
||||
"deny"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"webfetch": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ask",
|
||||
"allow",
|
||||
"deny"
|
||||
]
|
||||
},
|
||||
"doom_loop": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ask",
|
||||
"allow",
|
||||
"deny"
|
||||
]
|
||||
},
|
||||
"external_directory": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ask",
|
||||
"allow",
|
||||
"deny"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user