feat(bridge): protocol 5 — configuration from the site, and the reload that undoes itself
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in 10s

R18. Three request/reply verbs — `config.list`, `config.read`, `config.write` —
and the first command on this bridge that writes to the game host's filesystem.

The walk is rooted at `Interface.Oxide.ConfigDirectory`, never a literal, so it
is right on Oxide, on Carbon and on a server whose operator moved it; the data
directory is never walked, because it holds live state and both frameworks'
permission stores, which is protocol 4's mirror one directory over.

A write is resolved, version-checked and parse-checked before the first byte
lands, then backed up, written and reloaded — and the reload is WATCHED. If
`OnPluginLoaded` does not arrive within four seconds the whole set is restored,
reloaded again, and reported with the tail of the newest log file. Without that
this is a web form that takes a required plugin off a production server one typo
at a time.

Four seconds is arithmetic, not taste: the worst path is two windows while a
caller holds the sidecar's ten-second RPC budget.

This plugin will not reload itself — the reload would close the link carrying
the answer — and the site composes the file's bytes, so nothing here has an
opinion about content beyond "it parses".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PMH6bw1jXMgbyF3ZWGEzSM
This commit is contained in:
2026-09-22 08:53:45 -05:00
parent bd8cb24ecf
commit 48eeb56300
2 changed files with 1140 additions and 7 deletions

View File

@@ -26,9 +26,9 @@
# the same change that alters the emitters, exactly as the sidecar bumps
# PROTOCOL_VERSION and the module bumps its own constant.
#
# Current: 4 — the transport, the read path, identity, and the permission mirror
# (docs/rust-link/PROTOCOL.md §10).
protocol = 4
# Current: 5 — the transport, the read path, identity, the permission mirror, and
# configuration from the site (docs/rust-link/PROTOCOL.md §11).
protocol = 5
# ── Oxide compatibility ──────────────────────────────────────────────────────
#

File diff suppressed because it is too large Load Diff