perf: optimize plugin loading with better caching#15106
Closed
sureshsankaran wants to merge 31 commits intoanomalyco:devfrom
Closed
perf: optimize plugin loading with better caching#15106sureshsankaran wants to merge 31 commits intoanomalyco:devfrom
sureshsankaran wants to merge 31 commits intoanomalyco:devfrom
Conversation
- Add dag-orchestrator.md agent for DAG-based task execution - Add dag-analyzer.ts custom tool for dependency analysis - Configure as default agent with Hivemind MCP integration - Non-blocking parallel execution with progress updates - Tables and ASCII art formatting (no bullet lists)
Implements the Ralph Wiggum technique for self-referential AI loops: - Add session.stop hook to plugin system for loop control - Add ralph-loop command to start iterative loops - Add cancel-ralph and ralph-status commands/tools - Add state file verification at ~/.config/opencode/state/ralph-wiggum.json - Support --max, --promise, --state-file, --no-state options - Proper quoted string parsing for multi-word prompts - Remove console.log to fix TUI overlay issues Based on: https://github.com/anthropics/claude-code/tree/main/plugins/ralph-wiggum
Enable proactive context management via SQLite-backed summaries and allow plugins to perform async work during session stop.
Remove custom DAG orchestrator agent, tool, and provider configs. Add dedicated ralph-wiggum package for iterative development loops.
…system - Add context-drain plugin to opencode config with intelligent context management - Add packages/context-drain workspace for token budget management - Update ralph-wiggum with review phase system (working -> review -> fix cycle) - Add REVIEW_SYSTEM_PROMPT and FIX_SYSTEM_PROMPT for code review automation - Default max iterations changed from 10 to 8
Removed the context-drain plugin reference from config after the plugin file was deleted, which was causing OpenCode to crash with SIGTRAP on startup.
… plugin - Replace standalone plugin with symlink to packages/ralph-wiggum/src/index.ts - Add environment variable check to skip local plugin when global is preferred - Add README documenting usage, review system, and env var
- Changed ralph-wiggum plugin path from absolute file:// URL to relative path - Fixes plugin loading on Linux ARM64 systems - Path now resolves correctly from config file location - Works across Mac, Linux, and Windows environments
- Fixes TypeScript compilation errors in ralph-wiggum package - Adds proper Bun type definitions for development - Resolves pre-push typecheck failures
Gracefully handle missing Instance context to avoid cryptic native binding errors when tools are executed outside normal server flow (e.g., MCP, plugins). Related upstream PR: anomalyco#8302
This reverts commit b80881e.
- Add URL param persistence to localStorage for project context - Fix session loading with proper SDK client initialization - Add CORS support and launcher routes to server - Add 0.0.0.0 to localhost hosts for dev connectivity - Add SPA fallback configuration for vite - Add parallel plugin loading and bootstrap initialization - Add bun package install fast path - Fix prompt input ref assignment
- Add floating button group with 4 navigation buttons - Go to top/bottom buttons for quick scroll - Previous/next message buttons for message navigation - Add keyboard shortcuts: home for first, end for last message - Add data-session-scroll attribute for scroll targeting - Buttons only appear when viewing a session with messages
…ge previews - Add MIME type detection for code files, documents, and images - Replace createFocusSignal with custom focus handling for late-bound refs - Fix duplicate attachment rendering in share view - Add image preview support for shared sessions - Use h-dvh for better mobile viewport handling - Bump bun to 1.3.6
…uncher - Add empathy listener agent and plugin for conversation memory - Add custom commands: helpme, listen, tweets - Add e2e tests for app switching, file picker, image attachments, nav buttons, session list - Add launcher HTML page and test - Add server start script
Use Visual Viewport API to detect keyboard open/close and adjust prompt input and navigation buttons position. Force repaint when keyboard closes to eliminate leftover gap.
Merged upstream changes while preserving fork's unique features: - Ralph Wiggum plugin (iterative development loops) - Context-drain plugin - Empathy listener plugin - Navigation buttons for mobile - File attachment improvements (broader MIME types, image previews) - Virtual keyboard handling (createVisualViewport hook) - Portal-based header (renders to titlebar slots) - IME composition handling - Persisted caching with runWithOwner in global-sync - Message pagination/history loading in sync.tsx Added upstream features: - CORS support for 0.0.0.0 and dev ports (3000, 5173) - /launcher and /launcher/browse routes for directory browsing - DEV_APP environment variable for local development proxy - launcher.html static file
The DialogSelectDirectory component was using file.list which is sandboxed to the current project directory. This prevented browsing to select a new project from outside the current directory. - Add global.browse endpoint that can browse any directory on the filesystem - Update DialogSelectDirectory to use global.browse instead of file.list - Fix CORS to allow requests from any origin on dev ports (3000/5173) - Add e2e test for directory dialog functionality
- Add screen-analyzer.md: Custom subagent for AI-powered screen monitoring - Add tdd-loop.ts: Custom plugin for TDD workflow automation - Add design.md: Design documentation and notes - Update server.ts: Add executable option for customizing opencode binary path - Update bun.lock: Dependency lock file updates
- Add @sureshsankaran/opencode-destructive-check npm package - Plugin asks for permission before executing destructive commands - Detects 52 patterns across 8 categories (rm, git, database, system, sudo, container, packages, network) - Protects 28 dangerous file paths - Auto-loads for all sessions and agents via opencode.jsonc config
… fallbacks - Update destructive-check plugin to support both old (type/pattern) and new (permission/patterns) permission APIs - Integrate plugin hooks into prompt.ts to intercept permission requests and force 'ask' when needed - Add clipboard fallback using execCommand for environments where navigator.clipboard fails - Fix Shift+Enter to properly insert newline instead of submitting form - Change screen-analyzer agent to primary mode
…r input - Add new Chime module (util/chime.ts) with configurable audio notifications - Play chime when session status becomes idle (status.ts) - Play chime in run command when waiting for input (run.ts) - Add chime configuration options to config schema (config.ts) - Support custom sound file path via config - Only plays on macOS where afplay is available - Gracefully handles errors and missing contexts
- Add SessionRawContextTab component with sub-tabs for system prompts and LLM messages - Add Raw Context tab to desktop right panel and mobile dialog - Add i18n translations for all 14 languages - Fix mobile button to use valid 'code' icon - Import Dialog component for mobile modal - Add raw context button to mobile navigation - Improve destructive command check with enhanced warnings and metadata - Update session list to use projectID for worktree support
- Remove --force flag from bun add to leverage Bun's package cache - Move lock acquisition AFTER fast-path checks to reduce contention - Add double-check locking pattern after acquiring lock - Perform fast-path checks without holding lock for better concurrency This significantly speeds up plugin loading on subsequent runs by: 1. Skipping npm registry checks when packages are already cached 2. Avoiding unnecessary lock contention on read-only checks 3. Preventing duplicate installs when multiple processes race
Contributor
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
Contributor
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
Contributor
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--forceflag frombun addto leverage Bun package cacheBenefits
This significantly speeds up plugin loading on subsequent runs by:
Testing