From 62307d987c1705e62669a0e6d3bdef83c384e397 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Sun, 14 Dec 2025 20:26:08 +0900 Subject: [PATCH] docs: document missing hooks and permission options in README MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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) --- README.ko.md | 31 +++++++++++++++++++++++++++++++ README.md | 31 +++++++++++++++++++++++++++++++ assets/oh-my-opencode.schema.json | 1 + 3 files changed, 63 insertions(+) diff --git a/README.ko.md b/README.ko.md index 3861351..d7676d7 100644 --- a/README.ko.md +++ b/README.ko.md @@ -466,7 +466,12 @@ Oh My OpenCodeλŠ” λ‹€μŒ μœ„μΉ˜μ˜ 훅을 읽고 μ‹€ν–‰ν•©λ‹ˆλ‹€: - **Anthropic Auto Compact**: Claude λͺ¨λΈμ΄ 토큰 μ œν•œμ— λ„λ‹¬ν•˜λ©΄ μžλ™μœΌλ‘œ μ„Έμ…˜μ„ μš”μ•½ν•˜κ³  μ••μΆ•ν•©λ‹ˆλ‹€. μˆ˜λ™ κ°œμž… 없이 μž‘μ—…μ„ 계속할 수 μžˆμŠ΅λ‹ˆλ‹€. - **Session Recovery**: μ„Έμ…˜ μ—λŸ¬(λˆ„λ½λœ 도ꡬ κ²°κ³Ό, thinking 블둝 문제, 빈 λ©”μ‹œμ§€ λ“±)μ—μ„œ μžλ™ λ³΅κ΅¬ν•©λ‹ˆλ‹€. λŒλ‹€κ°€ μ„Έμ…˜μ΄ 망가지지 μ•ŠμŠ΅λ‹ˆλ‹€. 망가져도 λ³΅κ΅¬λ©λ‹ˆλ‹€. - **Auto Update Checker**: oh-my-opencode의 μƒˆ 버전이 μΆœμ‹œλ˜λ©΄ μ•Œλ¦Όμ„ ν‘œμ‹œν•©λ‹ˆλ‹€. +- **Startup Toast**: OhMyOpenCode λ‘œλ“œ μ‹œ ν™˜μ˜ λ©”μ‹œμ§€λ₯Ό ν‘œμ‹œν•©λ‹ˆλ‹€. μ„Έμ…˜μ„ μ œλŒ€λ‘œ μ‹œμž‘ν•˜κΈ° μœ„ν•œ μž‘μ€ "oMoMoMo". - **Background Notification**: λ°±κ·ΈλΌμš΄λ“œ μ—μ΄μ „νŠΈ μž‘μ—…μ΄ μ™„λ£Œλ˜λ©΄ μ•Œλ¦Όμ„ λ°›μŠ΅λ‹ˆλ‹€. +- **Session Notification**: μ—μ΄μ „νŠΈκ°€ λŒ€κΈ° μƒνƒœκ°€ 되면 OS μ•Œλ¦Όμ„ λ³΄λƒ…λ‹ˆλ‹€. macOS, Linux, Windowsμ—μ„œ μž‘λ™β€”μ—μ΄μ „νŠΈκ°€ μž…λ ₯을 기닀릴 λ•Œ λ†“μΉ˜μ§€ λ§ˆμ„Έμš”. +- **Empty Task Response Detector**: Task 도ꡬ가 빈 응닡을 λ°˜ν™˜ν•˜λ©΄ κ°μ§€ν•©λ‹ˆλ‹€. 이미 빈 응닡이 μ™”λŠ”λ° λ¬΄ν•œμ • κΈ°λ‹€λ¦¬λŠ” 상황을 λ°©μ§€ν•©λ‹ˆλ‹€. +- **Grep Output Truncator**: grep은 산더미 같은 ν…μŠ€νŠΈλ₯Ό λ°˜ν™˜ν•  수 μžˆμŠ΅λ‹ˆλ‹€. 남은 μ»¨ν…μŠ€νŠΈ μœˆλ„μš°μ— 따라 λ™μ μœΌλ‘œ 좜λ ₯을 μΆ•μ†Œν•©λ‹ˆλ‹€β€”50% μ—¬μœ  곡간 μœ μ§€, μ΅œλŒ€ 50k 토큰. +- **Tool Output Truncator**: 같은 아이디어, 더 넓은 λ²”μœ„. Grep, Glob, LSP 도ꡬ, AST-grep의 좜λ ₯을 μΆ•μ†Œν•©λ‹ˆλ‹€. ν•œ 번의 μž₯ν™©ν•œ 검색이 전체 μ»¨ν…μŠ€νŠΈλ₯Ό μž‘μ•„λ¨ΉλŠ” 것을 λ°©μ§€ν•©λ‹ˆλ‹€. ## μ„€μ • @@ -518,6 +523,32 @@ Google Gemini λͺ¨λΈμ„ μœ„ν•œ λ‚΄μž₯ Antigravity OAuthλ₯Ό ν™œμ„±ν™”ν•©λ‹ˆλ‹€: `OmO` (메인 μ˜€μΌ€μŠ€νŠΈλ ˆμ΄ν„°)와 `build` (κΈ°λ³Έ μ—μ΄μ „νŠΈ)도 λ™μΌν•œ μ˜΅μ…˜μœΌλ‘œ 섀정을 μ˜€λ²„λΌμ΄λ“œν•  수 μžˆμŠ΅λ‹ˆλ‹€. +#### Permission μ˜΅μ…˜ + +μ—μ΄μ „νŠΈκ°€ ν•  수 μžˆλŠ” μž‘μ—…μ„ μ„Έλ°€ν•˜κ²Œ μ œμ–΄ν•©λ‹ˆλ‹€: + +```json +{ + "agents": { + "explore": { + "permission": { + "edit": "deny", + "bash": "ask", + "webfetch": "allow" + } + } + } +} +``` + +| Permission | μ„€λͺ… | κ°’ | +|------------|------|-----| +| `edit` | 파일 νŽΈμ§‘ κΆŒν•œ | `ask` / `allow` / `deny` | +| `bash` | Bash λͺ…λ Ή μ‹€ν–‰ κΆŒν•œ | `ask` / `allow` / `deny` λ˜λŠ” λͺ…령별: `{ "git": "allow", "rm": "deny" }` | +| `webfetch` | μ›Ή μš”μ²­ κΆŒν•œ | `ask` / `allow` / `deny` | +| `doom_loop` | λ¬΄ν•œ 루프 감지 μ˜€λ²„λΌμ΄λ“œ ν—ˆμš© | `ask` / `allow` / `deny` | +| `external_directory` | ν”„λ‘œμ νŠΈ 루트 μ™ΈλΆ€ 파일 μ ‘κ·Ό | `ask` / `allow` / `deny` | + λ˜λŠ” ~/.config/opencode/oh-my-opencode.json ν˜Ήμ€ .opencode/oh-my-opencode.json 의 `disabled_agents` λ₯Ό μ‚¬μš©ν•˜μ—¬ λΉ„ν™œμ„±ν™”ν•  수 μžˆμŠ΅λ‹ˆλ‹€: ```json diff --git a/README.md b/README.md index 7b2b328..261919e 100644 --- a/README.md +++ b/README.md @@ -467,7 +467,12 @@ When agents thrive, you thrive. But I want to help you directly too. - **Anthropic Auto Compact**: When Claude models hit token limits, automatically summarizes and compacts the sessionβ€”no manual intervention needed. - **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. - **Auto Update Checker**: Notifies you when a new version of oh-my-opencode is available. +- **Startup Toast**: Shows a welcome message when OhMyOpenCode loads. A little "oMoMoMo" to start your session right. - **Background Notification**: Get notified when background agent tasks complete. +- **Session Notification**: Sends OS notifications when agents go idle. Works on macOS, Linux, and Windowsβ€”never miss when your agent needs input. +- **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. +- **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. +- **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. ## Configuration @@ -519,6 +524,32 @@ Each agent supports: `model`, `temperature`, `top_p`, `prompt`, `tools`, `disabl You can also override settings for `OmO` (the main orchestrator) and `build` (the default agent) using the same options. +#### Permission Options + +Fine-grained control over what agents can do: + +```json +{ + "agents": { + "explore": { + "permission": { + "edit": "deny", + "bash": "ask", + "webfetch": "allow" + } + } + } +} +``` + +| Permission | Description | Values | +|------------|-------------|--------| +| `edit` | File editing permission | `ask` / `allow` / `deny` | +| `bash` | Bash command execution | `ask` / `allow` / `deny` or per-command: `{ "git": "allow", "rm": "deny" }` | +| `webfetch` | Web request permission | `ask` / `allow` / `deny` | +| `doom_loop` | Allow infinite loop detection override | `ask` / `allow` / `deny` | +| `external_directory` | Access files outside project root | `ask` / `allow` / `deny` | + Or disable via `disabled_agents` in `~/.config/opencode/oh-my-opencode.json` or `.opencode/oh-my-opencode.json`: ```json diff --git a/assets/oh-my-opencode.schema.json b/assets/oh-my-opencode.schema.json index 46de579..fc5041c 100644 --- a/assets/oh-my-opencode.schema.json +++ b/assets/oh-my-opencode.schema.json @@ -65,6 +65,7 @@ "propertyNames": { "type": "string", "enum": [ + "build", "OmO", "oracle", "librarian",