feat: stage 0, an empty RunicNPC that releases through CI #1

Merged
whitlocktech merged 1 commits from chore/stage-0-scaffold into edge 2026-09-30 02:02:58 +00:00
Member

What & why

This is stage 0 of docs/runicnpc/PLAN.md §9: the repository RunicNPC will be built in.

Done when: an empty plugin releases through CI and loads on both rigs. This PR is the first half. The edge→main cutover after it cuts v0.1.0.

  • plugin/RunicNPC.cs contains only:

    • // Requires: Kits (D217);
    • [Info("RunicNPC", "Runic Gateway", "0.0.0")], with a placeholder version the release replaces;
    • RunicNpc_ApiVersion() returning API 1;
    • rnpc.status, which reports the version, the API version and which hooks have fired.

    It spawns nothing.

  • plugin.toml declares:

    • api = 1;
    • the framework versions it was actually loaded on (Oxide 2.0.7726, Carbon 2.0.259);
    • requires_plugins = ["Kits"].
  • scripts/checkPlugin.js is adapted from Rust-Plugins' checker. It enforces:

    • every hook is listed in ExpectedHooks, and returns nothing unless it's in ANSWERS_DELIBERATELY with a reason;
    • chat commands have the signature the frameworks bind;
    • no RunicNpc_* call is public without [HookMethod], because Call can't reach it. That's the HumanNPC trap (§1.2);
    • ApiVersion, // Requires: and the single [Info] line agree with plugin.toml.

    23 self-tests, including parsing the real plugin and reading a CRLF checkout.

  • Workflows.

    • PR Checks run on PRs into main and edge.
    • release.yml reuses Rust-Plugins' release steps unchanged; only the CI git username differs.
    • The new packaging step ships runicnpc-<ver>.tar.gz (runicnpc/RunicNPC.cs + manifest.json, which carries api, not protocol) and SHA256SUMS.
    • There is no installer bundle dispatch until stage 4.
  • tools/ holds the rig panel scripts. The panel address and server IDs are now in a git-ignored tools/rigs.json, with rigs.example.json committed.

  • Docs: README, CONTRIBUTING (the edge flow, AI disclosure, borrow-not-copy), SECURITY (a scope row for RunicNPC), the code of conduct, and the issue and PR templates.

Decided with the org lead today:

  • the repository was seeded with one chore: commit to main, then edge, and everything else goes by PR;
  • the layout is plugin/ + plugin.toml.

One rename from the plan: tools/con.js → tools/console.js. CON is a reserved device name on Windows, so git there cannot open the file. It failed git add on the dev machine.

How it was tested

  • node scripts/checkPlugin.js → plugin ok — API 1, 1 API call(s), 1 hook(s) declared, requires Kits.
  • node --test scripts/checkPlugin.test.js → 23/23 pass. The CRLF case was confirmed to fail before the fix.
  • release.yml, pr-checks.yml and the issue config parse as YAML. The version-stamp sed and the plugin.toml reads were dry-run locally ([Info("RunicNPC", "Runic Gateway", "0.1.0")], api=1, ["Kits"]).
  • Loaded from this branch on both rigs through the panel:
    • Oxide 2.0.7726: listed by oxide.plugins.
    • Carbon 2.0.259: Loaded plugin RunicNPC v0.0.0 by Runic Gateway [217ms].
    • On both, rnpc.status answers RunicNPC 0.0.0 api=1 hooks=1 fired=1 silent=0.
  • Not yet proven: the release itself. It runs on the cutover to main, and the released tarball then replaces these copies on both rigs.

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-assisted contributions (required)

  • No AI tools were used to produce this contribution.
  • AI tools were used. Tool(s): Claude Code (Claude Opus 5.5). I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with a Co-Authored-By / Assisted-By trailer.

License

By submitting this PR I agree my contribution is licensed under GPL-3.0-or-later.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

## What & why This is stage 0 of [`docs/runicnpc/PLAN.md`](https://gitea.whitlocktech.com/RunicGateway/docs/src/branch/main/runicnpc/PLAN.md) §9: the repository RunicNPC will be built in. **Done when:** an empty plugin releases through CI and loads on both rigs. This PR is the first half. The `edge`→`main` cutover after it cuts v0.1.0. - **`plugin/RunicNPC.cs`** contains only: - `// Requires: Kits` (D217); - `[Info("RunicNPC", "Runic Gateway", "0.0.0")]`, with a placeholder version the release replaces; - `RunicNpc_ApiVersion()` returning API 1; - `rnpc.status`, which reports the version, the API version and which hooks have fired. It spawns nothing. - **`plugin.toml`** declares: - `api = 1`; - the framework versions it was actually loaded on (Oxide **2.0.7726**, Carbon **2.0.259**); - `requires_plugins = ["Kits"]`. - **`scripts/checkPlugin.js`** is adapted from Rust-Plugins' checker. It enforces: - every hook is listed in `ExpectedHooks`, and returns nothing unless it's in `ANSWERS_DELIBERATELY` with a reason; - chat commands have the signature the frameworks bind; - no `RunicNpc_*` call is public without `[HookMethod]`, because `Call` can't reach it. That's the HumanNPC trap (§1.2); - `ApiVersion`, `// Requires:` and the single `[Info]` line agree with `plugin.toml`. 23 self-tests, including parsing the real plugin and reading a CRLF checkout. - **Workflows.** - PR Checks run on PRs into `main` and `edge`. - `release.yml` reuses Rust-Plugins' release steps unchanged; only the CI git username differs. - The new packaging step ships `runicnpc-<ver>.tar.gz` (`runicnpc/RunicNPC.cs` + `manifest.json`, which carries `api`, not `protocol`) and `SHA256SUMS`. - There is no installer bundle dispatch until stage 4. - **`tools/`** holds the rig panel scripts. The panel address and server IDs are now in a git-ignored `tools/rigs.json`, with `rigs.example.json` committed. - **Docs:** README, CONTRIBUTING (the `edge` flow, AI disclosure, borrow-not-copy), SECURITY (a scope row for RunicNPC), the code of conduct, and the issue and PR templates. **Decided with the org lead today:** - the repository was seeded with one `chore:` commit to `main`, then `edge`, and everything else goes by PR; - the layout is `plugin/` + `plugin.toml`. **One rename from the plan:** `tools/con.js` → `tools/console.js`. `CON` is a reserved device name on Windows, so git there cannot open the file. It failed `git add` on the dev machine. ## How it was tested - `node scripts/checkPlugin.js` → `plugin ok — API 1, 1 API call(s), 1 hook(s) declared, requires Kits`. - `node --test scripts/checkPlugin.test.js` → 23/23 pass. The CRLF case was confirmed to fail before the fix. - `release.yml`, `pr-checks.yml` and the issue config parse as YAML. The version-stamp `sed` and the `plugin.toml` reads were dry-run locally (`[Info("RunicNPC", "Runic Gateway", "0.1.0")]`, `api=1`, `["Kits"]`). - **Loaded from this branch on both rigs** through the panel: - **Oxide 2.0.7726:** listed by `oxide.plugins`. - **Carbon 2.0.259:** `Loaded plugin RunicNPC v0.0.0 by Runic Gateway [217ms]`. - On both, `rnpc.status` answers `RunicNPC 0.0.0 api=1 hooks=1 fired=1 silent=0`. - **Not yet proven:** the release itself. It runs on the cutover to `main`, and the released tarball then replaces these copies on both rigs. ## Checklist - [x] I have read [CONTRIBUTING.md](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. ## AI-assisted contributions (required) - [ ] No AI tools were used to produce this contribution. - [x] AI tools were used. Tool(s): `Claude Code (Claude Opus 5.5)`. I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with a `Co-Authored-By` / `Assisted-By` trailer. ## License By submitting this PR I agree 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 1 commit 2026-09-30 02:02:12 +00:00
feat: stage 0, an empty RunicNPC that releases through CI
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in -1m44s
249f2e513f
The repository RunicNPC is built in (docs/runicnpc/PLAN.md §9, stage 0):

- plugin/RunicNPC.cs: `// Requires: Kits` (D217), `[Info]` with the 0.0.0
  placeholder the release stamps, `RunicNpc_ApiVersion()` (API 1), and
  `rnpc.status`, which reports the version and which hooks have fired. It
  spawns nothing.
- plugin.toml: the API version, the framework floors it was loaded on
  (Oxide 2.0.7726, Carbon 2.0.259) and requires_plugins = ["Kits"].
- scripts/checkPlugin.js, adapted from Rust-Plugins': every hook listed and
  void unless written down; chat-command signatures; every RunicNpc_ call
  reachable by Call (the HumanNPC trap, PLAN.md §1.2); ApiVersion,
  `// Requires:` and [Info] agreeing with plugin.toml. 23 self-tests, including
  the real plugin and a CRLF checkout.
- PR Checks on PRs into main and edge; the release workflow on main, with
  Rust-Plugins' release engine unchanged and an adapter that ships
  runicnpc-<ver>.tar.gz (runicnpc/RunicNPC.cs + manifest.json) and SHA256SUMS.
  No bundle dispatch until stage 4.
- tools/: the rig panel scripts, with the panel and server ids moved into a
  git-ignored tools/rigs.json. `con.js` became `console.js`: CON is a reserved
  device name on Windows, and git there cannot open the file.
- README, CONTRIBUTING (edge-based flow, AI disclosure, borrow-not-copy),
  SECURITY, the code of conduct, issue and PR templates.

`feat:` so the cutover to main cuts the first release, 0.1.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit bb08158c50 into edge 2026-09-30 02:02:58 +00:00
whitlocktech deleted branch chore/stage-0-scaffold 2026-09-30 02:02:58 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RunicGateway/runicnpc-rust#1
No description provided.