CodeNomad/packages/server/src
Pascal André ec1c0bedbf
feat(plugins): add scoped V2 plugin activation controls (#726)
## Summary

- Add narrow CodeNomad routes for native OpenCode V2 plugin inventory
and activation-rule mutations.
- Present one row per user/configured plugin with exactly two compact
**Global** and **Project** switches, sharing Yolo/MCP switch geometry.
Builtins are hidden; exact configured disabled IDs remain available.
- Keep complete names, source paths, failures and configuration targets
readable on narrow keyboard/touch layouts. Retain focused rows across
refreshes and guard repeated pending activation without removing
keyboard focus.
- Provide translated feedback in all ten locales and suppress stale
feedback after the owning surface is disposed.

## Authority and refresh behavior

- Discover roots through the authenticated daemon's `config.get`, after
native-location ownership and connection-generation checks.
- Append only exact activation rules while preserving JSONC comments,
source options, unknown keys, formatting, BOM and native permissions.
Bound reads, check optimistic conflicts, serialize by write target and
use atomic replacement with nonce-owned locks.
- Require proven raw/normalized alignment before acknowledging a no-op.
Watcher lag cannot report success for a rule that is no longer saved on
disk.
- Account for inherited `.opencode` precedence by choosing a
higher-precedence target in the active project location; preserve
ancestor files and reject an escaping fallback target.
- Use native WSL filesystem operations. Retain canonical invalidation
and one trailing reconciliation when host/native cache records converge.
- Cache display snapshots by instance/worktree, share them across
sessions in that worktree, and refresh only on visible demand. Global
writes invalidate sibling snapshots without background reads.

## Compatibility

The current server/UI/bundled-plugin dependency pin and recommended
runtime are **2.0.16**, aligned with `dev`. The demonstrated technical
minimum remains **2.0.7**. Activation writes use the narrow local JSONC
operation rather than a runtime-specific write endpoint.

## Validation status and provenance

Final reviewed head: **`5204d97694ca8ced954bddc9cc94ea464e46119d`**,
aligned with `dev@9d7ea5d6`. Both independent resumed review loops
reached **ZERO actionable findings**: UX R6 and quality/optimization R5.

Local validation on the final head: **100 plugin/server/cache/WSL tests
passed**, **eight real-component browser regressions passed**, **14
restoration/metadata integration tests passed**, server/UI typechecks
and UI production build passed. Translation keys/placeholders match
across all ten locales. The current-dev baseline and PR browser
comparison passed the same 34 shared cases with one optional native
Electron skip; detailed revision provenance is in the final review
comment.

**CI qualification is excluded at the user's explicit request.** No
final CI success is claimed, and CI completion is not being awaited.

The earlier head `38845060` failed typechecking because `noticeId` was
undeclared; the earlier historical UX R4 zero-finding claim was also
incorrect and has been [explicitly
corrected](https://github.com/NeuralNomadsAI/CodeNomad/pull/726#issuecomment-5816956417).

Historical test results and the installer built from `bd31dcd0` are not
validation or artifacts of the final corrected head. See the final
review comment for completed counts, review evidence and revision
boundaries. The PR remains open.

## Scope note

Implemented independently; no code was copied from PR #593.

This separate V2 implementation supersedes PR #593.
2026-09-25 01:29:14 +02:00
..
auth feat(sidecars): add proxied sidecar tabs (#279) 2026-04-02 23:00:17 +01:00
automation fix(automation): remove the active-conversation targeting requirement (#746) 2026-09-22 10:15:37 +02:00
clients feat(opencode): migrate CodeNomad to native V2 (#647) 2026-09-04 11:36:11 +01:00
config fix(chat): hide system context updates by default (#727) 2026-09-20 13:41:21 +02:00
events fix(worktrees): bound ownership refreshes and lazily cache inventories (#708) 2026-09-18 13:58:35 +02:00
filesystem fix(server): keep filesystem requests responsive during slow disk I/O (#700) 2026-09-18 01:29:09 +02:00
opencode feat(plugins): add scoped V2 plugin activation controls (#726) 2026-09-25 01:29:14 +02:00
opencode-update chore(opencode): qualify 2.0.16 with aligned clients and plugin (#772) 2026-09-24 20:42:08 +02:00
permissions feat(v2): manage session families across worktrees (#649) 2026-09-17 22:57:37 +02:00
previews feat(opencode): migrate CodeNomad to native V2 (#647) 2026-09-04 11:36:11 +01:00
releases ci: add the OpenCode V2 prerelease channel (#659) 2026-08-28 11:31:00 +01:00
server feat(plugins): add scoped V2 plugin activation controls (#726) 2026-09-25 01:29:14 +02:00
settings fix(opencode): retire private runtime fallback and restore first-run setup (#760) 2026-09-24 00:25:40 +02:00
sidecars feat(ui): manage visible provider models (#637) 2026-08-13 09:33:23 +01:00
speech feat(speech): separate STT/TTS provider configuration (#579) 2026-07-13 13:27:50 +02:00
storage Rename CLI package to @neuralnomads/codenomad and bin codenomad 2025-11-20 23:51:44 +00:00
ui fix(tauri): stop stale UI assets from shadowing desktop builds (#258) 2026-03-30 20:54:29 +01:00
usage feat(opencode): migrate CodeNomad to native V2 (#647) 2026-09-04 11:36:11 +01:00
workspaces feat(plugins): add scoped V2 plugin activation controls (#726) 2026-09-25 01:29:14 +02:00
api-types.ts feat(plugins): add scoped V2 plugin activation controls (#726) 2026-09-25 01:29:14 +02:00
bin.ts Rename CLI package to @neuralnomads/codenomad and bin codenomad 2025-11-20 23:51:44 +00:00
cli-upgrade.test.ts feat(server): add CLI upgrade command (#374) 2026-04-26 17:14:27 +01:00
cli-upgrade.ts feat(server): add CLI upgrade command (#374) 2026-04-26 17:14:27 +01:00
developer-cdp.test.ts fix(automation): remove the active-conversation targeting requirement (#746) 2026-09-22 10:15:37 +02:00
developer-cdp.ts fix(automation): remove the active-conversation targeting requirement (#746) 2026-09-22 10:15:37 +02:00
index.test.ts feat(ui): improve cross-platform server diagnostics (#643) 2026-09-09 23:39:11 +02:00
index.ts feat(browser): add autonomous native previews (#666) 2026-09-18 17:46:14 +02:00
launcher.ts fix(server): expand Linux browser launch candidates (#475) 2026-05-17 16:15:30 +01:00
loader.ts Rename CLI package to @neuralnomads/codenomad and bin codenomad 2025-11-20 23:51:44 +00:00
logger.ts Rename CLI package to @neuralnomads/codenomad and bin codenomad 2025-11-20 23:51:44 +00:00
native-parent.test.ts feat(opencode): migrate CodeNomad to native V2 (#647) 2026-09-04 11:36:11 +01:00
native-parent.ts feat(opencode): migrate CodeNomad to native V2 (#647) 2026-09-04 11:36:11 +01:00
shutdown.test.ts fix(restore): simplify persistence and harden cross-platform cleanup (#602) 2026-07-17 22:17:15 +01:00
shutdown.ts fix(restore): simplify persistence and harden cross-platform cleanup (#602) 2026-07-17 22:17:15 +01:00