OpenCode Plugin

nexus-compaction-plus

v1.8.0Published

Preserves Nexus session context across OpenCode compaction events and records each compaction as an auditable session entry.

Overview

When OpenCode compacts its context window, critical session metadata — such as the active Nexus project ID, session ID, and accumulated context — would normally be lost. nexus-compaction-plus intercepts compaction events at two stages: before compaction it injects session identifiers into the compaction prompt so the resuming agent retains full project context, and after compaction it records the event as an auditable entry in the active Nexus session via the platform REST API. This ensures continuity across compaction boundaries and provides a complete audit trail of context resets.

Registered Hooks

experimental.session.compacting

Injects active Nexus session/project IDs into the compaction prompt for context preservation. Fires before OpenCode compresses the context window.

event (session.compacted)

Records compaction event in the active Nexus session via REST API for audit trail. Fires after compaction completes successfully.

Details

DistributionTypeScript source via nexus pull into .opencode/plugins/ — no npm install required.
Dependency@opencode-ai/plugin (auto-installed via .opencode/package.json).
Agent OwnerOnly distributed to projects where the agent owner is set to opencode or both.
StartupShows TUI toast notification confirming plugin name, version, and API connection status.