* refactor(agents): remove unused model references
Consistent cleanup of agent model references across all agent files.
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
* fix(agents): use glm-4.7-free as default librarian model
🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
* make playwright skill to be called more
Ports the refactor command from ~/.config/opencode/command/refactor.md to the project as a builtin command.
The /refactor command provides deterministic, LSP/AST-aware refactoring with:
- Automatic intent analysis and codebase mapping
- Risk assessment with test coverage verification
- Detailed planning via Plan agent
- Step-by-step execution with continuous verification
- Zero-regression guarantees via comprehensive testing
Supports multiple refactoring scopes (file/module/project) and strategies (safe/aggressive).
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Remove all sync functions from command loader (async now default)
- Remove sync load functions from skill loader (async now default)
- Add resolveSymlinkAsync to file-utils.ts
- Update all callers to use async versions:
- config-handler.ts
- index.ts
- tools/slashcommand/tools.ts
- tools/skill/tools.ts
- hooks/auto-slash-command/executor.ts
- loader.test.ts
- All 607 tests pass, build succeeds
Generated with assistance of 🤖 [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Add async versions of skill loader functions (loadUserSkillsAsync, loadProjectSkillsAsync, loadOpencodeGlobalSkillsAsync, loadOpencodeProjectSkillsAsync)
- Use Promise.all to load 8 loaders concurrently instead of sequentially
- Improves startup performance by eliminating serial I/O bottlenecks
Generated with assistance of OhMyOpenCode
- Skip skills with invalid YAML frontmatter using new parseError flag
- Add mode: "primary" to Planner-Sisyphus agent config for visibility
- Prevents silent failures when loading skills with malformed YAML
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
Keyword detection is now handled by claude-code-hooks, not by context-injector
messages.transform hook. Remove tests for keyword injection that are no longer
applicable.
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
Move keyword detection from experimental.chat.messages.transform to claude-code-hooks
chat.message handler. Uses proven injectHookMessage file system approach for reliable
context injection.
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
Fixes race condition where chat.message runs after experimental.chat.messages.transform,
preventing keyword-detected context from being injected. Moves detection logic inline
into the transform hook for atomic detection and injection.
Changes:
- Add detectKeywordsWithType and extractPromptText utilities to injector
- Detect keywords inline within messages transform hook
- Create synthetic message with merged context before last user message
- Add 4 comprehensive test cases for keyword detection scenarios
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Implement `createContextInjectorMessagesTransformHook` for messages transform hook
- Refactor existing `chat.message` handler to be a no-op (context injection moved to transform)
- Add comprehensive test suite for the new hook (4 test cases)
- Update exports to expose new hook function
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
Implement synchronous skill discovery using Node.js Worker Threads and Atomics.wait for blocking operations. Allows synchronous API access while leveraging async operations internally via dedicated worker thread.
Changes:
- blocking.ts: Main blocking discovery function using SharedArrayBuffer and MessagePort
- discover-worker.ts: Worker thread implementation for async skill discovery
- blocking.test.ts: Comprehensive test suite with BDD comments
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Add LazyContentLoader interface to LoadedSkill type
- Defer skill body loading until first use
- Cache loaded content for subsequent calls
- Reduce startup time by not reading full file contents
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Add async versions of skill discovery functions
- Create discoverAllSkillsAsync() with Promise.all parallelization
- Use fs.promises for async file operations
- Keep sync versions for backward compatibility
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Add async loadCommandsFromDirAsync using fs.promises API
- Add 4 async load functions for user/project/global/project-opencode commands
- Add loadAllCommandsAsync with Promise.all parallelization
- Sync versions preserved for backward compatibility
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Add ContextCollector class for managing and merging context entries across sessions
- Add types and interfaces for context management (ContextEntry, ContextPriority, PendingContext)
- Create context-injector hook for injection coordination
- Refactor keyword-detector to use context-injector instead of hook-message-injector
- Update src/index.ts to initialize context-injector infrastructure
🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
When running in pnpm projects, the .npmrc configuration propagates as
NPM_CONFIG_* environment variables to child processes. This can cause
MCP servers to fail due to registry/proxy conflicts or case sensitivity
issues between uppercase and lowercase variants.
This fix adds a createCleanMcpEnvironment function that filters out:
- NPM_CONFIG_* and npm_config_* (npm/pnpm config)
- YARN_* (yarn config)
- PNPM_* (pnpm config)
- NO_UPDATE_NOTIFIER
Fixes#456
Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
* fix(skill-mcp-manager): prevent memory leaks from orphaned MCP processes
- Close transport on connection failure to prevent zombie processes
- Add process exit handlers (SIGINT/SIGTERM) for graceful cleanup
- Use pendingConnections Map to prevent duplicate client spawns
Fixes#361🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
* fix(ci): replace deprecated rhysd/actionlint-action with direct installation
rhysd/actionlint-action repository was removed/archived.
Use official actionlint download script instead.
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
* fix(skill-mcp-manager): add transport.close() and idle timeout to fix memory leaks
Previously, disconnectSession() and disconnectAll() only called client.close() but NOT transport.close().
StdioClientTransport spawns child processes for MCP servers, and without transport.close(), these
processes remained orphaned and accumulated memory (6GB leak reported).
Changes:
- Added missing transport.close() calls in disconnectSession() and disconnectAll()
- Added idle timeout mechanism (5-minute timeout) with lastUsedAt tracking
- Added cleanup timer that runs every 60 seconds to remove idle clients
- Made signal handlers (SIGINT, SIGTERM, SIGBREAK) async to properly await cleanup
- Ensure proper cleanup order: clear from map first, then close client, then close transport
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
* fix(ci): pin actionlint download script to v1.7.10 for supply chain security
- Pin to specific release tag instead of 'main' branch
- Prevents potential supply chain attacks from upstream compromises
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Move clearNotificationsForTask() to finally block to ensure cleanup even on success
- Add TASK_TTL_MS (30 min) constant for stale task detection
- Implement pruneStaleTasksAndNotifications() to remove expired tasks and notifications
- Add comprehensive tests for pruning functionality (fresh tasks, stale tasks, notifications)
- Prevents indefinite Map growth when tasks complete without errors
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Always merge parent process.env when spawning MCP child processes
- Overlay config.env on top if present (for skill-specific overrides)
- Fixes issue where skills without explicit env: block started with zero environment variables
- Adds 2 tests for env inheritance behavior
🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
* feat(commands): add handoffs support for speckit compatibility
- Upgrade frontmatter parser to use js-yaml for complex YAML support
- Add HandoffDefinition interface for speckit-style workflow transitions
- Update CommandFrontmatter and CommandDefinition to include handoffs
- Add comprehensive tests for backward compatibility and complex YAML
- Fix type parameters in auto-slash-command and slashcommand tools
Closes#407
* fix(frontmatter): use JSON_SCHEMA for security and add extra fields tolerance tests
- Use JSON_SCHEMA in yaml.load() to prevent code execution via YAML tags
- Add tests to verify extra fields in frontmatter don't cause failures
- Address Greptile security review comment
---------
Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
Add getSystemMcpServerNames() sync function to detect system-configured MCP
servers from .mcp.json files (user, project, and local scopes). Builtin skills
like playwright are now automatically excluded when their MCP server is already
configured in system config, preventing duplicate MCP server registration.
Also adds comprehensive test suite with 5 BDD-style tests covering empty config,
project/local scopes, disabled servers, and merged configurations.
Changes:
- loader.ts: Add getSystemMcpServerNames() function + readFileSync import
- loader.test.ts: Add 5 tests for getSystemMcpServerNames() edge cases
- index.ts: Filter builtin skills to exclude those with overlapping MCP names
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Regenerated root AGENTS.md with overview, structure, and complexity hotspots
- Regenerated all 7 subdirectory AGENTS.md files: hooks, tools, features, agents, cli, auth, shared
- Used 11 background explore agents for comprehensive feature and architecture analysis
- All files within size limits (root: 112 lines, subdirs: 57-68 lines)
- Includes where-to-look guide, conventions, anti-patterns, and agent model information
🤖 Generated with assistance of oh-my-opencode
- Added 'MCP LOADER (claude-code-mcp-loader)' section to src/features/AGENTS.md
- Documented .mcp.json file locations with priority order (user, project, local)
- Specified .mcp.json format with complete structure and examples
- Documented server types (stdio, http, sse) with required fields
- Added environment variable expansion syntax documentation
- Provided practical examples for stdio, http, and disabled servers
- Added transformation reference table for Claude Code → OpenCode format
- Improved discoverability for users setting up MCP servers via Claude Code configuration
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Update timestamp to 2026-01-02T00:10:00+09:00 and commit hash b0c39e2
- Add 'Add skill' and 'Skill MCP' sections to WHERE TO LOOK table
- Add 'Self-planning for complex tasks' anti-pattern to ANTI-PATTERNS
- Update complexity hotspots with current accurate line counts (src/index.ts 723, src/cli/config-manager.ts 669, etc.)
- Add SKILL MCP MANAGER and BUILTIN SKILLS sections to src/features/AGENTS.md
- Document skill-mcp-manager lifecycle and builtin-skills location
- Update src/tools/AGENTS.md to include skill and skill-mcp tool categories
- Update testing note to reference 360+ tests passing
- Add Skill MCP note to NOTES section describing YAML frontmatter MCP config
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Add playwright as builtin skill with MCP server configuration
- Add disabled_skills config option to disable specific builtin skills
- Update BuiltinSkill type to include mcpConfig field
- Update skill merger to handle mcpConfig from builtin to loaded skills
- Merge disabled_skills config and filter unavailable builtin skills at plugin init
- Update README with Built-in Skills documentation
- Regenerate JSON schema
🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
- Added loadMcpJsonFromDir() to load MCP config from skill directory's mcp.json
- Supports AmpCode format (mcpServers wrapper) and direct format
- mcp.json takes priority over YAML frontmatter when both exist
- Added 3 tests covering mcpServers format, priority, and direct format
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
Support organizing commands in subdirectories with colon-separated naming
(e.g., myproject/deploy.md becomes myproject:deploy).
- Recursively traverse subdirectories and load all .md command files
- Prefix nested command names with directory path (colon-separated)
- Protect against circular symlinks via visited path tracking
- Skip hidden directories (consistent with other loaders)
- Graceful error handling with logging for debugging
Slash commands with arguments were silently failing in OpenCode TUI because
command definitions included 'name' and 'argumentHint' fields that don't exist
in OpenCode's Command schema. Strip these fields before registration across
all command/skill loaders to ensure compatibility.
Affected loaders:
- builtin commands
- claude-code command loader
- opencode skill loader
- claude-code plugin loader
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Step 1: Fire ALL background explore agents immediately (non-blocking)
- Step 2: Main session builds codemap understanding using LSP tools while background runs
- Step 3: Collect background results after main session analysis
This maximizes throughput by having agents discover patterns while the main session
analyzes code structure semantically via LSP.
* 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>
* 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)
- 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)
* 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>
- New src/features/builtin-commands/ module with CommandDefinition loader
- Implements init-deep command for hierarchical AGENTS.md knowledge base generation
- Adds BuiltinCommandName and BuiltinCommandNameSchema to config
- Integrates builtin commands loader into main plugin with proper config merging
- Supports disabling specific builtin commands via disabled_commands config array
🤖 Generated with assistance of https://github.com/code-yeongyu/oh-my-opencode
- Add finally block in notifyParentSession() to ensure task cleanup
- Call tasks.delete(taskId) after notification sent or on error
- Prevents memory accumulation when tasks complete or fail
- taskId captured before setTimeout to ensure proper cleanup in async context
🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
The installed_plugins.json file has two versions:
- v1: plugins stored as direct objects
- v2: plugins stored as arrays
Use discriminated union types (InstalledPluginsDatabaseV1/V2) for proper
type narrowing based on version field.
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
- Add process.exit(0) in runner.ts for immediate termination
- Fix Timer type to ReturnType<typeof setInterval> in manager.ts
- Add .unref() to BackgroundManager polling interval
- Add cleanup() method to BackgroundManager
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
Fixes#255
- Add getClaudeConfigDir() utility function that respects CLAUDE_CONFIG_DIR env var
- Update all hardcoded ~/.claude paths to use the new utility
- Add comprehensive tests for getClaudeConfigDir()
- Maintain backward compatibility with default ~/.claude when env var is not set
Files updated:
- src/shared/claude-config-dir.ts (new utility)
- src/shared/claude-config-dir.test.ts (tests)
- src/hooks/claude-code-hooks/config.ts
- src/hooks/claude-code-hooks/todo.ts
- src/hooks/claude-code-hooks/transcript.ts
- src/features/claude-code-command-loader/loader.ts
- src/features/claude-code-agent-loader/loader.ts
- src/features/claude-code-skill-loader/loader.ts
- src/features/claude-code-mcp-loader/loader.ts
- src/tools/session-manager/constants.ts
- src/tools/slashcommand/tools.ts
Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
Fixes#191
This commit ensures that the user's selected model is preserved when
background tasks complete and notify their parent sessions.
Changes:
- Add parentModel field to BackgroundTask and LaunchInput interfaces
- Capture model context when launching background tasks
- Pass model context when notifying parent sessions after task completion
Impact:
- Users with OAuth providers (Google, Anthropic) will now have their
model selection preserved across background task continuations
- Background agents no longer revert to hardcoded defaults
Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
* feat(tools): add session management tools for OpenCode sessions
- Add session_list tool for listing sessions with filtering
- Add session_read tool for reading session messages and history
- Add session_search tool for full-text search across sessions
- Add session_info tool for session metadata inspection
- Add comprehensive tests for storage, utils, and tools
- Update documentation in AGENTS.md
Closes#132
* fix(session-manager): add Windows compatibility for storage paths
- Create shared/data-path.ts utility for cross-platform data directory resolution
- On Windows: uses %LOCALAPPDATA% (e.g., C:\Users\Username\AppData\Local)
- On Unix: uses $XDG_DATA_HOME or ~/.local/share (XDG Base Directory spec)
- Update session-manager/constants.ts to use getOpenCodeStorageDir()
- Update hook-message-injector/constants.ts to use same utility
- Remove dependency on xdg-basedir package in session-manager
- Follows existing pattern from auto-update-checker for consistency
---------
Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>