Skip to content

feat: evolve plugin as primary install mode with content-aware deployment and cache hygiene - #21

Merged
diegohb merged 24 commits into
mainfrom
evolve-plugin
Oct 2, 2026
Merged

diegohb merged 24 commits into
mainfrom
evolve-plugin

Conversation

@diegohb

@diegohb diegohb commented Oct 2, 2026

Copy link
Copy Markdown
Member

Summary

  • Install now performs plugin registration via a surgical config editor; copy installs migrate and --mode copy is refused for code-backed packages (ADR-0008, supersedes ADR-0004).
  • Generated packages declare content (assets vs code); installers use content-based deployment plans: assets-only copy-install by default, code-backed packages always register.
  • New clear-cache CLI subcommand with confirmation gates, --dry-run, and a class-based CacheCleaner; installs prune stale package-cache copies so OpenCode re-fetches the just-installed version.
  • Packager gains a bin surface, mandatory frontmatter quoting, and promoted-source retirement; load-time advisory suggests bunx <pkg> clear-cache.
  • Conformance rubric and references catch up with ADR-0008 (B5, B6, E1, E2 added to hard non-conformance) and ADR-0009 documents skills-market compatibility.

Why

Plugin-mode installs are safer and reversible than copying payload files, and stale OpenCode cache entries were causing outdated versions to load after install. Content declarations let generated packages pick the correct deployment strategy automatically.

Testing

  • New regression tests: cache-cleaner, content-declaration, deployment-plan, plugin-config, plus extended cli/installer coverage.
  • bun test wired via a start script.

Diego B. added 24 commits September 22, 2026 08:16
Packager derives the package.json content declaration from its asset
inventory (ADR-0008): assets for skills/commands-only packages, code when
any agent, tool, or plugin content ships. Templates carry the field
defaulting to assets; publisher verifies it at intake, carries it through
expansion, and covers it in post-publish verification. Closes #16.
…#17)

install ensures the plugin entry via the surgical editor, writes a
generalized plugin-mode manifest, and is a zero-write no-op when up to
date; --mode copy is refused for this code-backed package. Legacy copy
installs migrate: payload removed per the old manifest (after a read-only
config parse check) with a printed notice, before the entry is added.
uninstall surgically removes the entry plus manifest and residual payload;
status reports mode, version, and registration file. Manifest schema also
covers copy mode with a folder-hash content-hash. README and CHANGELOG
updated. Grounded in ADR-0008, supersedes ADR-0004.
…#18)

Installer template reads the content declaration: assets-only packages
copy-install by default (no config writes) with --mode plugin as the
opt-in; code-backed packages always register and --mode copy throws
CopyModeUnsupportedError. Plugin-array edits go through a ported
surgical editor (plugin-config.template.txt), the manifest generalizes
to record mode, entry, and target config file (preserving payload
hashes across both paths), registration detection adds global
config.json, and status/uninstall reflect mode, version, and
registration. The load-time hook ensures assets only in registered
scopes, performs zero writes when the manifest matches and the entry
is present, and never throws.
Checklist adds B5 (surgical writes), B6 (registration zero-write no-op),
E1 (content declaration consistency), E2 (binary mode enforcement), with
E1-E2/B5-B6 in the hard non-conformance set; the auditor reviews A-E.
Plugins and config references document the allowed config patterns
(including global config.json), the repo-root opencode.jsonc
create-default, and the surgical-writer rule. Closes #19
Every install invocation, including a no-op, removes opencode-architect,
opencode-architect@latest, and opencode-architect@<version> from the
OpenCode package cache (XDG_CACHE_HOME || ~/.cache + opencode/packages)
so OpenCode re-fetches the just-installed version on next start. Pinned
versions and other packages are preserved; removal failures warn without
failing the install, and cleared paths are reported.
@diegohb
diegohb merged commit d7ebb86 into main Oct 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant