Commit Graph

664 Commits

Author SHA1 Message Date
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
YeonGyu-Kim
385e8a97b0 Add builtin-commands feature with init-deep command and disabled_commands config option
- 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
2025-12-28 17:48:33 +09:00
YeonGyu-Kim
7daabf9617 Add ctx.metadata() calls for session navigation UI in background/subagent tasks
Add metadata() calls to background_task and call_omo_agent tools so that OpenCode UI displays session navigation hints (ctrl+x + arrow keys) like the original Task tool does. This enhances UX by providing consistent session navigation UI for background and subagent tasks.

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 17:48:33 +09:00
YeonGyu-Kim
5fbcb88a3f fix(todo-continuation-enforcer): persist errorBypass mode until user sends message
Previously, errorBypass mode was cleared on session.idle, causing continuation
to fire again on next idle event. This led to unwanted task resumption after
user abort.

Changes:
- Don't clear errorBypass on session.idle - stay in errorBypass mode
- Clear errorBypass to idle only when user sends a new message

This ensures that once user aborts, the enforcer respects that decision until
the user explicitly sends a message to resume.

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 17:48:33 +09:00
YeonGyu-Kim
daa5f6ee5b fix(todo-continuation-enforcer): redesign with version-token state machine
Fixes race conditions, enables continuous enforcement, and eliminates false positives/negatives.

- Complete redesign using version-token state machine for race condition prevention
- Replaced 5 separate Sets with single Map<sessionID, SessionState>
- Changed cancelCountdown() to invalidate() that ALWAYS bumps version regardless of mode
- Added background task check BEFORE starting countdown (prevents toast spam when bg tasks running)
- Added lastAttemptedAt throttling (10s minimum between attempts, set BEFORE API call)
- Removed non-interactive preemptive injection (all paths now use countdown)
- Added 3 version checks in executeInjection (start, after todo fetch, before API call)
- Removed remindedSessions flag for continuous enforcement

Fixes:
1. Race condition where session.idle fired before message.updated cleared reminded state
2. Single-shot behavior that prevented multiple reminders
3. Phantom reminders sent even after agent started working
4. Toast spam when background tasks are running

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 17:48:33 +09:00
Sisyphus
4d66ea9730 fix(lsp): improve error messages when LSP server is not installed (#305)
Previously, when an LSP server was configured but not installed, the error
message said "No LSP server configured" which was misleading. Now the
error message distinguishes between:

1. Server not configured at all
2. Server configured but not installed (with installation hints)

The new error messages include:
- Clear indication of whether server is configured vs installed
- Installation commands for each built-in server
- Supported file extensions
- Configuration examples for custom servers

Fixes #304

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2025-12-28 17:38:23 +09:00
sisyphus-dev-ai
4d4273603a chore: changes by sisyphus-dev-ai 2025-12-28 07:57:05 +00:00
YeonGyu-Kim
7b7c14301e fix(dcp): correct storage path to match OpenCode's actual location
DCP was failing to find session messages because it was looking in
~/.config/opencode/sessions instead of ~/.local/share/opencode/storage.
Unified all hooks to use getOpenCodeStorageDir() for cross-platform consistency.

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 16:13:50 +09:00
Sisyphus
e3be656f86 fix: disable todo-continuation for plan mode agents (#303)
* fix: disable todo-continuation for plan mode agents

Plan mode agents (e.g., 'plan', 'Planner-Sisyphus') only analyze and plan,
they don't implement. The todo-continuation hook was incorrectly triggering
for these agents because the existing write permission check only looked at
the stored message's tools field, not the agent's permission configuration.

This fix adds an explicit check for plan mode agents by name to skip the
todo continuation prompt injection.

Fixes #293

* chore: changes by sisyphus-dev-ai

* fix: address review comments for plan mode agent check

- Use exact match for plan mode agents instead of substring match to
  prevent false positives on agents like 'deployment-planner'
- Add plan mode agent check to preemptive injection path (non-interactive
  mode) which was missing from the initial fix

---------

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2025-12-28 16:02:04 +09:00
Sisyphus
c11cb2e3f1 fix: defer module-level side effects to prevent Bun 1.3.5 + macOS 15 segfault (#301)
- Remove eager SG_CLI_PATH constant; use getSgCliPath() lazily in checkEnvironment()
- Move setInterval to inside createCommentCheckerHooks() with guard flag

These changes eliminate module-level side effects that could trigger segfaults
during plugin initialization on Bun 1.3.5 + macOS 15 due to createRequire()
being called during module evaluation.

Fixes #292

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2025-12-28 15:55:47 +09:00
YeonGyu-Kim
195e8dcb17 refactor(todo-continuation-enforcer): improve state machine and injection logic
Refactored state management to use a single source of truth per-session using
a state machine pattern with versioning. Key improvements:

- Replace multiple Sets with unified SessionState map for cleaner logic
- Add version tokens to invalidate pending callbacks on state changes
- Improve countdown timer management with proper cleanup
- Add throttle check to prevent rapid injection spam (10s minimum interval)
- Enhance injection checks: re-verify todos before injection, check bg tasks
- Handle message.part.updated events for streaming activity detection
- Add isMainSession() helper for consistent session filtering
- Clearer event handler logic with inline comments explaining state transitions
- Better logging for debugging state changes and decision points

State modes: idle → countingDown → injecting → idle (with recovery/errorBypass)
Prevents race conditions from async operations and UI state changes during countdown.

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 15:49:13 +09:00
YeonGyu-Kim
284e7f5bc3 fix(anthropic-auto-compact): use correct MESSAGE_STORAGE path for session messages
The DCP pruning modules were using a hardcoded path (~/.config/opencode/sessions) that doesn't exist.
Sessions are actually stored at ~/.local/share/opencode/storage/message.

All pruning modules now import MESSAGE_STORAGE from hook-message-injector, which uses the correct path via getOpenCodeStorageDir().
This fixes the issue where DCP would fail with 'message dir not found' when trying to recover from token limit errors.

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 15:49:04 +09:00
YeonGyu-Kim
465c9e511f feat(comment-checker): pass custom_prompt to CLI
- Add customPrompt parameter to runCommentChecker function
- Pass --prompt flag to comment-checker CLI when custom_prompt is configured
- Wire up config from plugin initialization

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 15:02:00 +09:00
YeonGyu-Kim
18d134fa57 fix(background-agent): prevent memory leak - completed tasks now removed from Map (#302)
- 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)
2025-12-28 14:59:06 +09:00
YeonGyu-Kim
092718f82d fix(thinking-block-validator): handle text content parts in message validation
Previously, the validator only checked for tool_use parts, causing 'Expected thinking but found text' errors when messages had text content. Renamed hasToolParts to hasContentParts to include both tool_use and text types.

Also added CommentCheckerConfigSchema support for custom prompt configuration.

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 14:55:27 +09:00
YeonGyu-Kim
19f504fcfa fix(session-recovery): improve empty message index search with expanded range
Expand the search range when finding empty messages by index to better handle API index vs storage index mismatches. This increases robustness when searching for messages to sanitize with more fallback indices.

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 14:40:06 +09:00
YeonGyu-Kim
49f3be5a1f fix(session-manager): convert blocking sync I/O to async for improved concurrency
Convert session-manager storage layer from synchronous blocking I/O (readdirSync, readFileSync) to non-blocking async I/O (readdir, readFile from fs/promises). This fixes hanging issues in session_search and other tools caused by blocking filesystem operations.

Changes:
- storage.ts: getAllSessions, readSessionMessages, getSessionInfo now async
- utils.ts: Updated utility functions to be async-compatible
- tools.ts: Added await calls for async storage functions
- storage.test.ts, utils.test.ts: Updated tests with async/await patterns

This resolves the session_search tool hang issue and improves overall responsiveness.

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 14:40:06 +09:00
YeonGyu-Kim
6d6102f1ff fix(anthropic-auto-compact): sanitize empty messages before summarization
Pre-emptively fix empty messages in sessions before running document compression to prevent summarization failures. This prevents accumulation of empty message placeholders that can interfere with context management.

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 14:40:06 +09:00
YeonGyu-Kim
1d7e534b92 Upgrade @code-yeongyu/comment-checker from ^0.6.0 to ^0.6.1
🤖 GENERATED WITH ASSISTANCE OF OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 14:40:06 +09:00
YeonGyu-Kim
17b7dd396e feat(cli): librarian/explore model fallback based on installer settings (#299)
* feat(cli): librarian uses gemini-3-flash when hasGemini (antigravity auth)

Closes #294

* feat(cli): add explore to gemini-3-flash when hasGemini + update docs

* feat(cli): fix explore agent fallback logic to use haiku for max20 Claude users

- Use gemini-3-flash for both librarian and explore when hasGemini
- Use haiku for explore when Claude max20 is available (hasClaude && isMax20)
- Fall back to big-pickle for both when other models unavailable
- Updated all README files to document the fallback precedence

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 14:27:35 +09:00
YeonGyu-Kim
889d80d0ca feat(anthropic-auto-compact): run DCP first on token limit errors before compaction
- Refactored DCP (Dynamic Context Pruning) to execute FIRST when token limit errors occur
- Previously, DCP only ran as a fallback after compaction failed
- Now DCP runs first to prune redundant context, then compaction executes immediately
- Simplified config flag: dcp_on_compaction_failure → dcp_for_compaction
- Updated documentation in all 4 README files (EN, KO, JA, ZH-CN)
- Updated schema.ts with new config field name and documentation
- Updated executor.ts with new DCP-first logic flow

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 14:13:50 +09:00
YeonGyu-Kim
87e229fb62 feat(auth): enhance Antigravity token refresh with robust error handling and retry logic
- Add AntigravityTokenRefreshError custom error class with code, description, and status fields
- Implement parseOAuthErrorPayload() for parsing Google's various OAuth error response formats
- Add retry logic with exponential backoff (3 retries, 1s→2s→4s delay) for transient failures
- Add special handling for invalid_grant error - immediately throws without retry and clears caches
- Add invalidateProjectContextByRefreshToken() for selective cache invalidation
- Update fetch.ts error handling to work with new error class and cache invalidation

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 13:22:42 +09:00
github-actions[bot]
78514ec6d4 release: v2.6.2 2025-12-27 17:35:06 +00:00
YeonGyu-Kim
1c12925c9e fix(plugin-loader): support installed_plugins.json v1 format for backward compatibility (#288)
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)
2025-12-28 02:33:14 +09:00
github-actions[bot]
262f0c3f1f release: v2.6.1 2025-12-27 17:22:11 +00:00
github-actions[bot]
aace1982ec @devxoul has signed the CLA in code-yeongyu/oh-my-opencode#288 2025-12-27 17:06:00 +00:00
github-actions[bot]
8d8ea4079d release: v2.6.0 2025-12-27 15:55:06 +00:00
YeonGyu-Kim
c5f51030f0 fix: defer config error toast to session.created for TUI readiness (#286)
* fix: defer config error toast to session.created for TUI readiness

Removed showToast calls from loadConfigFromPath() function. Error notifications were not visible during plugin initialization because the TUI was not ready yet.

Changes:
- Removed immediate showToast calls from validation error handler
- Removed immediate showToast calls from file load error handler
- Errors are still captured via addConfigLoadError() for later display
- auto-update-checker hook will display errors via showConfigErrorsIfAny() after session.created event

This ensures error messages are displayed when the TUI is fully ready and able to render them properly.

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

* fix: await config error toast before showing startup toast

Ensure config errors are awaited and displayed before the startup spinner toast is shown. Changed showConfigErrorsIfAny(ctx).catch(() => {}) to await showConfigErrorsIfAny(ctx) to guarantee proper error handling order.

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 00:46:05 +09:00
Sisyphus
b2c2c6eab7 feat: Add JSONC support for oh-my-opencode config files (#275)
Uses Microsoft's jsonc-parser package for reliable JSONC parsing:
- oh-my-opencode.jsonc (preferred) or oh-my-opencode.json
- Supports line comments (//), block comments (/* */), and trailing commas
- Better error reporting with line/column positions

Core changes:
- Added jsonc-parser dependency (Microsoft's VS Code parser)
- Shared JSONC utilities (parseJsonc, parseJsoncSafe, readJsoncFile, detectConfigFile)
- Main plugin config loader uses detectConfigFile for .jsonc priority
- CLI config manager supports JSONC parsing

Comprehensive test suite with 18 tests for JSONC parsing.

Fixes #265

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

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2025-12-28 00:45:17 +09:00
YeonGyu-Kim
c4c0d82f97 fix(anthropic-auto-compact): run DCP only on compaction failure and retry after pruning (#284)
Make DCP behavior opt-in via new 'dcp_on_compaction_failure' experimental flag (disabled by default).

When enabled, Dynamic Context Pruning only executes after summarization fails, then retries compaction. By default, DCP runs before truncation as before.

Changes:
- Add 'dcp_on_compaction_failure' boolean flag to experimental config (default: false)
- Update executor.ts to check flag before running DCP behavior
- Add corresponding documentation to all 4 README files (EN, KO, JA, ZH-CN)
- Update JSON schema

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 00:43:37 +09:00
YeonGyu-Kim
3e180cd9f1 docs: add Aaron Iker as sponsor to all README files (#287)
Add Aaron Iker (@aaroniker) with GitHub and X links to the sponsors
section in all language README files (EN, KO, JA, ZH-CN).

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 00:42:35 +09:00
YeonGyu-Kim
776d857fd2 feat: set Sisyphus as default agent when enabled (#285)
Uses OpenCode's `default_agent` config (PR #5843)
Sets Sisyphus as default when sisyphus_agent is not disabled
Closes #283

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 00:28:26 +09:00
Harsha Vardhan
90d43dc292 fix(dynamic-truncator): apply fallback truncation when context usage unavailable (#268)
When getContextWindowUsage returns null (no assistant messages yet, API
failure, or first request in session), the truncator was returning
untruncated output. This caused context overflow crashes on early
requests or when usage lookup failed.

Now applies conservative truncation (50k tokens) as fallback, preventing
prompt-too-long errors that crash sessions.
2025-12-28 00:22:02 +09:00
YeonGyu-Kim
6bc9a31ee4 feat(ultrawork-prompt): add TDD workflow integration with conditional applicability (#246)
- Add TDD cycle specification (SPEC → RED → GREEN → REFACTOR → NEXT)
- Add applicability check for test infrastructure and implementation tasks
- Add TDD execution rules (TEST FIRST, MINIMAL IMPLEMENTATION, etc.)
- Add 'NO TEST DELETION' to ZERO TOLERANCE FAILURES section
- Add skip notation requirement for non-applicable tasks

Addresses: #243

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2025-12-28 00:14:06 +09:00
github-actions[bot]
5c8cfbfad8 @adam2am has signed the CLA in code-yeongyu/oh-my-opencode#281 2025-12-27 14:49:14 +00:00
YeonGyu-Kim
1d2dc69ae5 fix: use pathToFileURL for Windows-compatible file URLs in look_at tool (#279)
Fixes #276 - The look_at tool was constructing invalid file:// URLs on Windows
by using template literals. Now uses Node.js pathToFileURL() which correctly
handles backslashes, spaces, and the triple-slash prefix required on Windows.

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-27 23:47:59 +09:00
Sisyphus
0cee39dafb fix: properly mock utility functions in session-notification tests (#274)
The test mock for ctx.$ was not handling tagged template literals correctly,
causing it to ignore interpolated values. Additionally, utility functions that
check for command availability (osascript, notify-send, etc.) were returning
null in test environments, causing sendNotification to exit early.

Changes:
- Fixed template literal reconstruction in mock $ function
- Added spyOn mocks for all utility path functions
- All session-notification tests now passing (11/11)

Fixes #273

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2025-12-27 23:22:17 +09:00
YeonGyu-Kim
dd12928390 fix: resolve GitHub Actions workflow hang after task completion
- 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)
2025-12-27 23:06:44 +09:00
Lukin
2246d1c5ef feat: add Claude Code plugin support (#240) 2025-12-27 18:56:40 +09:00
sisyphus-dev-ai
1fc7fe7122 feat(compaction): add dynamic context pruning as recovery stage
Implements DCP-style pruning strategies inspired by opencode-dynamic-context-pruning plugin:

- Deduplication: removes duplicate tool calls (same tool + args)
- Supersede writes: prunes write inputs when file subsequently read
- Purge errors: removes old error tool inputs after N turns

Integration:
- Added as Stage 2.5 in compaction pipeline (after truncation, before summarize)
- Configurable via experimental.dynamic_context_pruning
- Opt-in by default (experimental feature)
- Protected tools list prevents pruning critical tools

Configuration:
- Turn protection (default: 3 turns)
- Per-strategy enable/disable
- Aggressive/conservative modes for supersede writes
- Configurable error purge threshold (default: 5 turns)
- Toast notifications (off/minimal/detailed)

Testing:
- Added unit tests for deduplication signature creation
- Type check passes
- Schema regenerated

Closes #271
2025-12-27 09:20:42 +00:00