Skip to content

Commit 62307d9

Browse files
committed
docs: document missing hooks and permission options in README
- Add 5 undocumented hooks: Startup Toast, Session Notification, Empty Task Response Detector, Grep/Tool Output Truncators - Add Permission Options section with detailed table (edit, bash, webfetch, doom_loop, external_directory) - Fix JSON schema: add 'build' to agents propertyNames 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
1 parent 24f2ee0 commit 62307d9

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed

README.ko.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,12 @@ Oh My OpenCode는 다음 위치의 훅을 읽고 실행합니다:
466466
- **Anthropic Auto Compact**: Claude 모델이 토큰 제한에 도달하면 자동으로 세션을 요약하고 압축합니다. 수동 개입 없이 작업을 계속할 수 있습니다.
467467
- **Session Recovery**: 세션 에러(누락된 도구 결과, thinking 블록 문제, 빈 메시지 등)에서 자동 복구합니다. 돌다가 세션이 망가지지 않습니다. 망가져도 복구됩니다.
468468
- **Auto Update Checker**: oh-my-opencode의 새 버전이 출시되면 알림을 표시합니다.
469+
- **Startup Toast**: OhMyOpenCode 로드 시 환영 메시지를 표시합니다. 세션을 제대로 시작하기 위한 작은 "oMoMoMo".
469470
- **Background Notification**: 백그라운드 에이전트 작업이 완료되면 알림을 받습니다.
471+
- **Session Notification**: 에이전트가 대기 상태가 되면 OS 알림을 보냅니다. macOS, Linux, Windows에서 작동—에이전트가 입력을 기다릴 때 놓치지 마세요.
472+
- **Empty Task Response Detector**: Task 도구가 빈 응답을 반환하면 감지합니다. 이미 빈 응답이 왔는데 무한정 기다리는 상황을 방지합니다.
473+
- **Grep Output Truncator**: grep은 산더미 같은 텍스트를 반환할 수 있습니다. 남은 컨텍스트 윈도우에 따라 동적으로 출력을 축소합니다—50% 여유 공간 유지, 최대 50k 토큰.
474+
- **Tool Output Truncator**: 같은 아이디어, 더 넓은 범위. Grep, Glob, LSP 도구, AST-grep의 출력을 축소합니다. 한 번의 장황한 검색이 전체 컨텍스트를 잡아먹는 것을 방지합니다.
470475

471476
## 설정
472477

@@ -518,6 +523,32 @@ Google Gemini 모델을 위한 내장 Antigravity OAuth를 활성화합니다:
518523

519524
`OmO` (메인 오케스트레이터)와 `build` (기본 에이전트)도 동일한 옵션으로 설정을 오버라이드할 수 있습니다.
520525

526+
#### Permission 옵션
527+
528+
에이전트가 할 수 있는 작업을 세밀하게 제어합니다:
529+
530+
```json
531+
{
532+
"agents": {
533+
"explore": {
534+
"permission": {
535+
"edit": "deny",
536+
"bash": "ask",
537+
"webfetch": "allow"
538+
}
539+
}
540+
}
541+
}
542+
```
543+
544+
| Permission | 설명 ||
545+
|------------|------|-----|
546+
| `edit` | 파일 편집 권한 | `ask` / `allow` / `deny` |
547+
| `bash` | Bash 명령 실행 권한 | `ask` / `allow` / `deny` 또는 명령별: `{ "git": "allow", "rm": "deny" }` |
548+
| `webfetch` | 웹 요청 권한 | `ask` / `allow` / `deny` |
549+
| `doom_loop` | 무한 루프 감지 오버라이드 허용 | `ask` / `allow` / `deny` |
550+
| `external_directory` | 프로젝트 루트 외부 파일 접근 | `ask` / `allow` / `deny` |
551+
521552
또는 ~/.config/opencode/oh-my-opencode.json 혹은 .opencode/oh-my-opencode.json 의 `disabled_agents` 를 사용하여 비활성화할 수 있습니다:
522553

523554
```json

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,12 @@ When agents thrive, you thrive. But I want to help you directly too.
467467
- **Anthropic Auto Compact**: When Claude models hit token limits, automatically summarizes and compacts the session—no manual intervention needed.
468468
- **Session Recovery**: Automatically recovers from session errors (missing tool results, thinking block issues, empty messages). Sessions don't crash mid-run. Even if they do, they recover.
469469
- **Auto Update Checker**: Notifies you when a new version of oh-my-opencode is available.
470+
- **Startup Toast**: Shows a welcome message when OhMyOpenCode loads. A little "oMoMoMo" to start your session right.
470471
- **Background Notification**: Get notified when background agent tasks complete.
472+
- **Session Notification**: Sends OS notifications when agents go idle. Works on macOS, Linux, and Windows—never miss when your agent needs input.
473+
- **Empty Task Response Detector**: Catches when Task tool returns nothing. Warns you about potential agent failures so you don't wait forever for a response that already came back empty.
474+
- **Grep Output Truncator**: Grep can return mountains of text. This dynamically truncates output based on your remaining context window—keeps 50% headroom, caps at 50k tokens.
475+
- **Tool Output Truncator**: Same idea, broader scope. Truncates output from Grep, Glob, LSP tools, and AST-grep. Prevents one verbose search from eating your entire context.
471476

472477
## Configuration
473478

@@ -519,6 +524,32 @@ Each agent supports: `model`, `temperature`, `top_p`, `prompt`, `tools`, `disabl
519524

520525
You can also override settings for `OmO` (the main orchestrator) and `build` (the default agent) using the same options.
521526

527+
#### Permission Options
528+
529+
Fine-grained control over what agents can do:
530+
531+
```json
532+
{
533+
"agents": {
534+
"explore": {
535+
"permission": {
536+
"edit": "deny",
537+
"bash": "ask",
538+
"webfetch": "allow"
539+
}
540+
}
541+
}
542+
}
543+
```
544+
545+
| Permission | Description | Values |
546+
|------------|-------------|--------|
547+
| `edit` | File editing permission | `ask` / `allow` / `deny` |
548+
| `bash` | Bash command execution | `ask` / `allow` / `deny` or per-command: `{ "git": "allow", "rm": "deny" }` |
549+
| `webfetch` | Web request permission | `ask` / `allow` / `deny` |
550+
| `doom_loop` | Allow infinite loop detection override | `ask` / `allow` / `deny` |
551+
| `external_directory` | Access files outside project root | `ask` / `allow` / `deny` |
552+
522553
Or disable via `disabled_agents` in `~/.config/opencode/oh-my-opencode.json` or `.opencode/oh-my-opencode.json`:
523554

524555
```json

assets/oh-my-opencode.schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"propertyNames": {
6666
"type": "string",
6767
"enum": [
68+
"build",
6869
"OmO",
6970
"oracle",
7071
"librarian",

0 commit comments

Comments
 (0)