Commit Graph

703 Commits

Author SHA1 Message Date
Sisyphus
7cb3f23c2b feat: make preemptive compaction enabled by default (#372) 2025-12-31 12:55:39 +09:00
Sisyphus
471cf868ff fix(doctor): unify version check to use same source as get-local-version (#367) 2025-12-31 12:11:10 +09:00
github-actions[bot]
f890abdc11 release: v2.8.3 2025-12-30 14:23:38 +00:00
Sisyphus
a295202a81 fix(ralph-loop): generate transcript path from sessionID instead of relying on event properties (#355)
OpenCode doesn't pass transcriptPath in the session.idle event properties,
which caused detectCompletionPromise to always return false (the first check
returns early if transcriptPath is undefined).

This fix:
- Imports getTranscriptPath from claude-code-hooks/transcript
- Generates the transcript path from sessionID instead of reading from event
- Adds optional getTranscriptPath callback to RalphLoopOptions for testability

Fixes #354

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2025-12-30 23:08:30 +09:00
github-actions[bot]
e3040ecb28 release: v2.8.2 2025-12-30 13:42:51 +00:00
sisyphus-dev-ai
066ab4b303 chore: changes by sisyphus-dev-ai 2025-12-30 13:34:59 +00:00
YeonGyu-Kim
bceeba8ca9 feat(hooks): enable tool-output-truncator by default
Enable tool-output-truncator hook by default instead of requiring experimental config opt-in. Users can disable it via disabled_hooks if needed.

Changes:
- Add tool-output-truncator to HookNameSchema
- Remove tool_output_truncator from ExperimentalConfigSchema
- Update all README files (EN, KO, JA, ZH-CN)

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-30 22:23:20 +09:00
Sisyphus
d8f10f53d4 fix(windows): resolve paths[0] TypeError crash on Windows startup (#351)
- Fix comment-checker/downloader.ts to use Windows-appropriate cache paths (%LOCALAPPDATA% or %APPDATA%) instead of Unix-style ~/.cache
- Guard against undefined import.meta.url in cli.ts which can occur during Windows plugin loading
- Reorder cache check before module resolution for safer fallback behavior

Fixes #347

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2025-12-30 22:14:04 +09:00
Sisyphus
45076041af fix: improve installation error handling with actionable suggestions (#343)
- Add error classification helpers for permission, file-not-found, and filesystem errors
- Handle empty/corrupt config files gracefully with recovery suggestions
- Add 60-second timeout to runBunInstall() to prevent hanging forever
- Improve error messages with specific recovery suggestions for each error type
- Export BunInstallResult type with detailed error info (success, timedOut, error)
- Handle SyntaxError in JSON parsing with user-friendly suggestions
- Add validation for config file contents (empty, whitespace-only, non-object)

Fixes #338

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2025-12-30 22:04:56 +09:00
Sohye Choi
bcf1d02f13 chore: remove unused empty file (#349) 2025-12-30 22:04:14 +09:00
Sisyphus
a63f76107b fix: add --external @ast-grep/napi to CLI build command (#350)
The CLI build was missing --external @ast-grep/napi flag, causing the bundler
to inline absolute paths from the CI environment (/home/runner/work/...).
This made the doctor check for @ast-grep/napi always fail on user machines.

Fixes #344

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2025-12-30 22:03:30 +09:00
github-actions[bot]
7b57364aa2 @purelledhand has signed the CLA in code-yeongyu/oh-my-opencode#349 2025-12-30 12:05:09 +00:00
github-actions[bot]
37c92b86e6 release: v2.8.1 2025-12-30 11:45:42 +00:00
Sisyphus
058e6adf96 revert(truncation-compaction): rollback to experimental opt-in config (#348) 2025-12-30 20:42:06 +09:00
Sisyphus
355f18d411 revert(dcp-for-compaction): move back to experimental config from hook (#346) 2025-12-30 20:27:19 +09:00
github-actions[bot]
048ed36120 release: v2.8.0 2025-12-30 10:12:40 +00:00
YeonGyu-Kim
ec61350664 refactor(dcp-for-compaction): migrate from experimental config to hook system
- Add 'dcp-for-compaction' to HookNameSchema
- Remove dcp_for_compaction from ExperimentalConfigSchema
- Update executor.ts to use dcpForCompaction parameter
- Enable DCP by default (can be disabled via disabled_hooks)
- Update all 4 README files (EN, KO, JA, ZH-CN)

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-30 19:09:16 +09:00
sisyphus-dev-ai
61251737d4 chore: changes by sisyphus-dev-ai 2025-12-30 09:29:24 +00:00
github-actions[bot]
c11aa598d7 @lgandecki has signed the CLA in code-yeongyu/oh-my-opencode#341 2025-12-30 09:10:56 +00:00
Marcus R. Brown
5138c50a6a fix(think-mode): support GitHub Copilot proxy provider (#336)
* fix(think-mode): support GitHub Copilot proxy provider

### Summary
- Adds `github-copilot` support to think-mode by resolving the underlying provider from the model name (Claude → Anthropic, Gemini → Google, GPT/o* → OpenAI).
- Normalizes model IDs to handle dotted versions defensively (e.g. `claude-opus-4.5` → `claude-opus-4-5`, `gpt-5.2` → `gpt-5-2`) so high-variant upgrades and capability checks work reliably.
- Expands high-variant mappings to cover Gemini preview/flash variants and aligns GPT-5.1/5.2 mappings with normalized IDs.
- Adds OpenAI “thinking mode” config (`reasoning_effort: "high"`) alongside existing provider configs.

### Tests
- Adds unit coverage for the switcher (`switcher.test.ts`) and integration coverage for the hook (`index.test.ts`), including:
  - GitHub Copilot model routing + thinking config injection
  - Dots vs hyphens normalization
  - Already-`-high` variants not being re-upgraded
  - Unknown models/providers handled gracefully

* fix: support multiple digits in model minor
2025-12-30 17:46:16 +09:00
YeonGyu-Kim
0f0f49b823 feat: add Ralph Loop self-referential development loop (#337)
* feat(config): add RalphLoopConfigSchema and hook name

- Add ralph-loop to HookNameSchema enum
- Add RalphLoopConfigSchema with enabled, default_max_iterations, state_dir
- Add ralph_loop field to OhMyOpenCodeConfigSchema
- Export RalphLoopConfig type

* feat(ralph-loop): add hook directory structure with constants and types

- Add constants.ts with HOOK_NAME, DEFAULT_STATE_FILE, COMPLETION_TAG_PATTERN
- Add types.ts with RalphLoopState and RalphLoopOptions interfaces
- Export RalphLoopConfig from config/index.ts

* feat(ralph-loop): add storage module for markdown state file management

- Implement readState/writeState/clearState/incrementIteration
- Use YAML frontmatter format for state persistence
- Support custom state file paths via config

* feat(ralph-loop): implement main hook with session.idle handler

- Add createRalphLoopHook factory with event handler
- Implement startLoop, cancelLoop, getState API
- Detect completion promise in transcript
- Auto-continue with iteration tracking
- Handle max iterations limit
- Show toast notifications for status updates
- Support session recovery and cleanup

* test(ralph-loop): add comprehensive BDD-style tests

- Add 17 test cases covering storage, hook lifecycle, iteration
- Test completion detection, cancellation, recovery, session cleanup
- Fix storage.ts to handle YAML value parsing correctly
- Use BDD #given/#when/#then comments per project convention

* feat(builtin-commands): add ralph-loop and cancel-ralph commands

* feat(ralph-loop): register hook in main plugin

* docs: add Ralph Loop feature to all README files

* chore: regenerate JSON schema with ralph-loop config

* feat(ralph-loop): change state file path from .opencode to .sisyphus

🤖 Generated with assistance of https://github.com/code-yeongyu/oh-my-opencode

* feat(ralph-loop): integrate ralph-loop and cancel-ralph command handlers into plugin hooks

- Add chat.message hook to detect and start ralph-loop or cancel-ralph templates
- Add slashcommand hook to handle /ralph-loop and /cancel-ralph commands
- Support custom --max-iterations and --completion-promise options

🤖 Generated with assistance of https://github.com/code-yeongyu/oh-my-opencode

---------

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2025-12-30 17:41:03 +09:00
YeonGyu-Kim
c401113537 feat(skill): add builtin skill infrastructure and improve tool descriptions (#340)
* feat(skill): add builtin skill types and schemas with priority-based merging support

- Add BuiltinSkill interface for programmatic skill definitions
- Create builtin-skills module with createBuiltinSkills factory function
- Add SkillScope expansion to include 'builtin' and 'config' scopes
- Create SkillsConfig and SkillDefinition Zod schemas for config validation
- Add merger.ts utility with mergeSkills function for priority-based skill merging
- Update skill and command types to support optional paths for builtin/config skills
- Priority order: builtin < config < user < opencode < project < opencode-project

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* feat(skill): integrate programmatic skill discovery and merged skill support

- Add discovery functions for Claude and OpenCode skill directories
- Add discoverUserClaudeSkills, discoverProjectClaudeSkills functions
- Add discoverOpencodeGlobalSkills, discoverOpencodeProjectSkills functions
- Update createSkillTool to support pre-merged skills via options
- Add extractSkillBody utility to handle both file and programmatic skills
- Integrate mergeSkills in plugin initialization to apply priority-based merging
- Support optional path/resolvedPath for builtin and config-sourced skills

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* chore(slashcommand): support optional path for builtin and config command scopes

- Update CommandInfo type to make path and content optional properties
- Prepare command tool for builtin and config sourced commands
- Maintain backward compatibility with file-based command loading

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* docs(tools): improve tool descriptions for interactive-bash and slashcommand

- Added use case clarification to interactive-bash tool description (server processes, long-running tasks, background jobs, interactive CLI tools)
- Simplified slashcommand description to emphasize 'loading' skills concept and removed verbose documentation

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* refactor(skill-loader): simplify redundant condition in skill merging logic

Remove redundant 'else if (loaded)' condition that was always true since we're already inside the 'if (loaded)' block. Simplify to 'else' for clarity.

Addresses code review feedback on PR #340 for the skill infrastructure feature.

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2025-12-30 15:15:43 +09:00
Sisyphus
b8efd3c771 feat(cli): add doctor command for installation health checks (#334)
Implements a comprehensive 'doctor' command that diagnoses oh-my-opencode
installation health with a beautiful TUI output.

Checks performed:
- OpenCode installation (version, path, binary)
- Plugin registration in opencode.json
- Configuration file validity (oh-my-opencode.json)
- Auth providers (Anthropic, OpenAI, Google)
- Dependencies (ast-grep CLI/NAPI, comment-checker)
- LSP servers availability
- MCP servers (builtin and user)
- Version status and updates

Features:
- Beautiful TUI with symbols and colors
- --verbose flag for detailed output
- --json flag for machine-readable output
- --category flag for running specific checks
- Exit code 1 on failures for CI integration

Closes #333

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2025-12-30 15:06:41 +09:00
github-actions[bot]
b92cd6ab68 @marcusrbrown has signed the CLA in code-yeongyu/oh-my-opencode#336 2025-12-30 03:12:57 +00:00
YeonGyu-Kim
f7696a1fbb refactor: rename anthropic-auto-compact to anthropic-context-window-limit-recovery
The old name 'auto-compact' was misleading - the hook does much more than
just compaction. It's a full recovery pipeline for context window limit
errors including:
- DCP (Dynamic Context Pruning)
- Aggressive/single truncation
- Summarize with retry
- Emergency message revert

The new name accurately describes its purpose: recovering from Anthropic
context window limit exceeded errors.

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-30 12:00:02 +09:00
YeonGyu-Kim
d33d60fe3b fix(cli): skip verbose logging for partial message text updates
- Only log tool invocation state changes, not text streaming
- Remove redundant preview logging for message.part text events
- Reduce verbose output noise by filtering partial message updates

🤖 Generated with assistance of OhMyOpenCode
2025-12-30 11:47:50 +09:00
YeonGyu-Kim
64053f1252 docs(sisyphus-agent): update workflow to report results when done
- Remove 'I'm on it...' acknowledgment comment requirement
- Add instruction to report results to issue/PR when task completes
- Simplify prompt to focus on todo tools and planning

🤖 Generated with assistance of OhMyOpenCode
2025-12-30 11:47:50 +09:00
YeonGyu-Kim
15419d74c2 feat: wire skill tool to plugin with claude_code.skills toggle
- Export createSkillTool from src/tools/index.ts for public use
- Import and instantiate skill tool in OhMyOpenCodePlugin with configuration
- Use claude_code?.skills toggle to control inclusion of Claude Code paths
- When skills toggle is false, only OpenCode-specific paths are included
- Add skill to tools object and register with plugin for Claude Code compatibility
- Respects existing plugin configuration patterns and integration style

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-30 11:47:50 +09:00
YeonGyu-Kim
5e6ae77e73 feat: implement skill tool for loading and discovering skills
- Add skill tool types: SkillArgs, SkillInfo, SkillLoadOptions interfaces
- Implement createSkillTool() factory function with configurable discovery options
- Add parseSkillInfo() helper to convert LoadedSkill to user-facing SkillInfo format
- Add formatSkillsXml() helper to generate available skills XML for tool description
- Support opencodeOnly option to filter Claude Code paths from discovery
- Tool loads and parses skill frontmatter, returns skill content with base directory
- Export skill tool singleton instance for default usage

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-30 11:47:50 +09:00
YeonGyu-Kim
1f1fefe8b7 feat: add skill metadata and discovery functions to opencode-skill-loader
- Add license, compatibility, metadata, and allowed-tools fields to SkillMetadata interface
- Add corresponding fields to LoadedSkill interface with proper type transformations
- Implement parseAllowedTools() helper for parsing comma/space-separated allowed tools
- Add discoverSkills() function with includeClaudeCodePaths option for flexible skill discovery
- Add getSkillByName() function for efficient skill lookup by name
- Support both OpenCode and Claude Code skill paths based on configuration

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-30 11:47:50 +09:00
YeonGyu-Kim
2c778d9352 fix: extend look_at MIME type support for Gemini API media formats
- Add HEIC/HEIF image format support
- Add video formats (mp4, mpeg, mov, avi, flv, webm, wmv, 3gpp)
- Add audio formats (wav, mp3, aiff, aac, ogg, flac)
- Add CSV and Python document formats
- Remove unsupported formats (gif, svg, bmp, ico, css, ts)
- Update tool description to clarify purpose

🤖 Generated with assistance of OhMyOpenCode
2025-12-30 11:47:50 +09:00
Sisyphus
17e8746eff feat: add opencode-skill-loader with 4-source priority system (#331)
* feat: add opencode-skill-loader with 4-source priority system

- Create new opencode-skill-loader feature module independent from Claude Code
- Support 4 source paths with priority: opencode-project > project > opencode > user
  - .opencode/skill/ (opencode-project)
  - .claude/skills/ (project)
  - ~/.config/opencode/skill/ (opencode)
  - ~/.claude/skills/ (user)
- Support both SKILL.md and {SKILLNAME}.md file patterns
- Maintain path awareness for file references (@path syntax)

* feat: integrate opencode-skill-loader into main plugin

- Import and use new skill loader functions
- Load skills from all 4 sources and merge into config.command
- Also merge pluginComponents.skills (previously loaded but never used)

* feat: add skill discovery to slashcommand tool

- Import and use discoverAllSkills from opencode-skill-loader
- Display skills alongside commands in tool description and execution
- Update formatCommandList to handle combined commands and skills

* refactor: remove old claude-code-skill-loader

- Delete src/features/claude-code-skill-loader/ directory (was never integrated into main plugin)
- Update plugin loader import to use new opencode-skill-loader types

* docs: update AGENTS.md for new skill loader

- Update structure to show opencode-skill-loader instead of claude-code-skill-loader
- Update Skills priority order to include all 4 sources

---------

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2025-12-30 10:42:05 +09:00
Sisyphus
7324b6c6b5 docs: fix experimental config key typo in README examples (#329)
Fix dcp_on_compaction_failure → dcp_for_compaction in JSON examples
to match actual schema and code implementation.

Cherry-picked from #325 (merged to master instead of dev)

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2025-12-30 00:10:14 +09:00
adam2am
ca5dac71d9 fix(lsp): use fileURLToPath for Windows path handling (#281)
Ahoy! The old code be walkin' the plank on Windows, ARRRR! 🏴‍☠️

The Problem (a cursed treasure map):
- LSP returns URIs like file:///C:/path/to/file.ts
- Old code: uri.replace("file://", "") produces /C:/path (INVALID on Windows!)
- Windows needs the leadin' slash removed after file:///

The Fix (proper pirate navigation):
- Import fileURLToPath from node:url (the sacred scroll)
- Add uriToPath() helper function (our trusty compass)
- Replace all 10 occurrences of .replace("file://", "")

This matches how the OpenCode mothership handles it in packages/opencode/src/lsp/client.ts

Now Windows users can sail the LSP seas without crashin' on the rocks! 🦜
2025-12-29 23:02:04 +09:00
github-actions[bot]
2bdab59f22 release: v2.7.2 2025-12-29 07:24:54 +00:00
YeonGyu-Kim
59507500ea fix(todo-continuation-enforcer): allow background task sessions to receive todo-continuation
Background task sessions registered in subagentSessions were not receiving
todo-continuation prompts, causing a deadlock: background tasks waited for
continuation that never came.

Changes:
- Allow both main session and background task sessions to receive continuation
- Add test for background task session continuation behavior
- Cleanup subagentSessions in test setup/teardown

This fixes the deadlock introduced in commit 116a90d which added todo waiting
logic to background-agent/manager.ts.

🤖 Generated with assistance of OhMyOpenCode
2025-12-29 16:21:49 +09:00
Sisyphus
3a08dcaeb1 fix: detect opencode-desktop binary in installer (#313) 2025-12-29 10:34:11 +09:00
adam2am
c01b21d0f8 fix(lsp): improve isServerInstalled for custom server configs (#282) 2025-12-29 10:22:38 +09:00
Sisyphus
6dd98254be fix: improve glob tool Windows compatibility and rg resolution (#309) 2025-12-29 10:10:22 +09:00
github-actions[bot]
55a3a6c9eb @Fguedes90 has signed the CLA in code-yeongyu/oh-my-opencode#319 2025-12-28 23:34:29 +00:00
github-actions[bot]
765507648c release: v2.7.1 2025-12-28 18:14:11 +00:00
YeonGyu-Kim
c10bc5fcdf fix(todo-continuation-enforcer): simplify implementation and remove 10s throttle blocking background task completion
Removes the complex state machine and 10-second throttle (MIN_INJECTION_INTERVAL_MS)
that was causing background task completion to hang. The hook now:

- Uses straightforward error cooldown logic instead of complex injection throttling
- Removes unnecessary state tracking that was delaying continuation injection
- Maintains all safety checks (recovery mode, running tasks, error state)
- Keeps countdown behavior with toast notifications

Fixes #312 - Resolves v2.7.0 issue where background task completion would freeze
the agent due to injection delays.

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2025-12-29 03:10:43 +09:00
YeonGyu-Kim
c0b28b0715 improve sanitize 2025-12-29 02:29:46 +09:00
YeonGyu-Kim
dd60002a0d fix(sisyphus-agent): handle OpenCode installer failure with pinned version fallback
Replace retry loop with intelligent fallback strategy:
- Try default installer first (better for version discovery)
- On failure, fallback to pinned version 1.0.204
- Handle corrupted downloads with direct fallback install

This addresses the sisyphus-agent workflow failure where OpenCode's installer failed
with 'Failed to fetch version information' error.

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2025-12-29 01:09:28 +09:00
YeonGyu-Kim
25d2946b76 Update AGENTS.md with current project state (commit 122e918, 2025-12-28)
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 19:42:56 +09:00
YeonGyu-Kim
122e918503 Add LSP tool integration to init-deep template for code intelligence analysis
Enhanced init-deep.ts template with LSP-First core principle and Code Intelligence Analysis phase:
- Added LSP-First principle for semantic code understanding
- Integrated lsp_servers, lsp_document_symbols, lsp_workspace_symbols, lsp_find_references in Phase 1
- Added LSP-based scoring factors (symbol density, export count, reference centrality) in Phase 2
- Included CODE_INTELLIGENCE output format specification
- Added LSP fallback guidance for unavailable servers
- Updated scoring matrix with LSP sources and enhanced metrics

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 19:23:29 +09:00
YeonGyu-Kim
aeff184e0c docs: add missing hooks, session tools, and sync sections across all READMEs
- Added 4 missing hooks to disabled_hooks config: preemptive-compaction, compaction-context-injector, thinking-block-validator, claude-code-hooks
- Added session management tools section documenting: session_list, session_read, session_search, session_info, call_omo_agent
- Added Uninstallation section to KO/JA/ZH-CN READMEs (synced with EN)
- Added JSONC Support section to KO/JA/ZH-CN READMEs (synced with EN)

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 18:25:32 +09:00
github-actions[bot]
b995ea8595 @SyedTahirHussan has signed the CLA in code-yeongyu/oh-my-opencode#306 2025-12-28 09:24:13 +00:00
github-actions[bot]
6e5edafeee release: v2.7.0 2025-12-28 08:59:46 +00:00
YeonGyu-Kim
bfb5d43bc2 Add AGENTS.md knowledge base documentation files
- Add src/agents/AGENTS.md with agent module documentation
- Update root AGENTS.md with latest generation timestamp (2025-12-28T17:15:00+09:00, commit f5b74d5)
- Update src/features/AGENTS.md with builtin-commands and claude-code-plugin-loader documentation
- Update src/hooks/AGENTS.md with thinking-block-validator hook documentation

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 17:48:33 +09:00