feat(bridge): RunicNPC, the site's NPC profiles and placements (runicnpc stage 4) #22

Merged
whitlocktech merged 2 commits from feat/runicnpc-stage4 into edge 2026-09-30 14:52:44 -05:00
Member

What

This is the bridge's part of RunicNPC stage 4. It joins protocol 13, which is still unreleased (D248). The spec is docs rust-link/PROTOCOL.md §19.12.

  • integrations.runicNpc (loaded, version, api) is in hello and status. Hello is sent again when RunicNPC loads or unloads.
  • New commands call RunicNPC's API 3:
    • npc.profiles: read the server's profiles, before the site adopts them (D244).
    • npc.profiles.set: the push (D221).
    • npc.placements: the list, with the routes and the cost warning.
    • npc.placement, by op: add (from a map point, D245, D246), set, remove, rename, respawn.
  • Refusals are npc.error with runicnpc-missing, runicnpc-old, malformed, not-found or refused, the last carrying RunicNPC's own sentence.
  • New frames come from RunicNPC's hooks: npc.died (profile, name, owner, run or placement, killer, contributors), npc.health (a threshold) and npc.placement.changed.
  • world.place takes a profile (D243). The NPCs are RunicNPC's, owned by the run; revert goes through RunicNpc_Despawn. New permanent reasons: runicnpc-missing and unknown-profile.
  • The killfeed names RunicNPC's NPCs with attackerNpc and attackerProfile, beside the unchanged attackerName.
  • player.tally gains npcProfileKills (D247).
  • rg.npc in the console. overlay.toml declares runicnpc_api = 3, the release copies it into the manifest, and checkPlugin.js holds it equal to RunicNpcApiNeeded.

Tested

  • checkPlugin.js passes (51 hooks), with a check that catches a runicnpc_api mismatch.
  • Compiled on both rigs.
  • Walked end to end on both, through the site: adoption, placements from the map, kills, an event's profile NPCs with a phase gate, and teardown. The results are in docs PLAN.md stage 4.

Pairs with

runicnpc-rust feat/stage-4-api3, Rust-Link, Module-Rust and installer feat/runicnpc-stage4, plus the docs PR.

Checklist

  • I have read CONTRIBUTING.md.
  • The change builds and existing tests/checks pass locally.
  • I have added or updated tests/docs where it makes sense.
  • My commits are reasonably scoped with clear messages.
  • AI tools were used. Tool(s): Claude Code (Claude Opus 5.5). Commits carry the Co-Authored-By trailer.
  • I agree that my contribution is licensed under GPL-3.0-or-later.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

## What This is the bridge's part of RunicNPC stage 4. It joins protocol 13, which is still unreleased (D248). The spec is docs `rust-link/PROTOCOL.md` §19.12. - **`integrations.runicNpc`** (`loaded`, `version`, `api`) is in hello and status. Hello is sent again when RunicNPC loads or unloads. - **New commands** call RunicNPC's API 3: - `npc.profiles`: read the server's profiles, before the site adopts them (D244). - `npc.profiles.set`: the push (D221). - `npc.placements`: the list, with the routes and the cost warning. - `npc.placement`, by `op`: `add` (from a map point, D245, D246), `set`, `remove`, `rename`, `respawn`. - **Refusals** are `npc.error` with `runicnpc-missing`, `runicnpc-old`, `malformed`, `not-found` or `refused`, the last carrying RunicNPC's own sentence. - **New frames** come from RunicNPC's hooks: `npc.died` (profile, name, owner, run or placement, killer, contributors), `npc.health` (a threshold) and `npc.placement.changed`. - **`world.place` takes a `profile`** (D243). The NPCs are RunicNPC's, owned by the run; revert goes through `RunicNpc_Despawn`. New permanent reasons: `runicnpc-missing` and `unknown-profile`. - **The killfeed names RunicNPC's NPCs** with `attackerNpc` and `attackerProfile`, beside the unchanged `attackerName`. - **`player.tally`** gains `npcProfileKills` (D247). - **`rg.npc`** in the console. `overlay.toml` declares `runicnpc_api = 3`, the release copies it into the manifest, and `checkPlugin.js` holds it equal to `RunicNpcApiNeeded`. ## Tested - `checkPlugin.js` passes (51 hooks), with a check that catches a `runicnpc_api` mismatch. - Compiled on both rigs. - Walked end to end on both, through the site: adoption, placements from the map, kills, an event's profile NPCs with a phase gate, and teardown. The results are in docs PLAN.md stage 4. ## Pairs with runicnpc-rust `feat/stage-4-api3`, Rust-Link, Module-Rust and installer `feat/runicnpc-stage4`, plus the docs PR. ## Checklist - [x] I have read CONTRIBUTING.md. - [x] The change builds and existing tests/checks pass locally. - [x] I have added or updated tests/docs where it makes sense. - [x] My commits are reasonably scoped with clear messages. - [x] AI tools were used. Tool(s): `Claude Code (Claude Opus 5.5)`. Commits carry the `Co-Authored-By` trailer. - [x] I agree that my contribution is licensed under GPL-3.0-or-later. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 2 commits 2026-09-30 08:46:39 -05:00
Protocol 13 gains npc.profiles, npc.profiles.set, npc.placements and
npc.placement (add, set, remove, rename, respawn), each calling RunicNPC's
API 3; the frames npc.died, npc.health and npc.placement.changed from its
hooks; runicNpc in the integrations body; world.place with a profile; the
killfeed's attackerNpc and attackerProfile; and the tally's
npcProfileKills. rg.npc reports it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
feat(release): declare the RunicNPC API the bridge needs (runicnpc stage 4, D224)
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in -1m36s
6347c25d57
overlay.toml gains runicnpc_api = 3, the release folds it into manifest.json,
and checkPlugin.js holds it equal to RunicNpcApiNeeded in the code. The
installer's bundle carries the latest RunicNPC release that answers it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit d1039ff95d into edge 2026-09-30 14:52:44 -05:00
whitlocktech deleted branch feat/runicnpc-stage4 2026-09-30 14:52:45 -05:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RunicGateway/Rust-Plugins#22
No description provided.