feat(rust): the kit weekend, linked rewards, reward messages and the kit warning (protocol 14)
All checks were successful
PR Checks / client-build (pull_request) Successful in 3m46s
PR Checks / frozen-manifest (pull_request) Successful in 6m12s
PR Checks / server-tests (pull_request) Successful in 7m30s

PLAN_REDESIGNS §2, the Rust half (D164, D192, D332, D333):
- rust.template.kit_weekend (core registerEventTemplates, MODULE_API 1.13.0):
  inputs kit/minutes/message/delivery; one phase advance after the weekend,
  core.lease rust.group.permission default/<kit permission> + rust.kit.entitle
  linked. Steps only where the kit can use them; validated by the real core.
- rust.kit.entitle: recipients 'linked' (every linked player who has played
  on the server, no tally, refused past the bound), optional message ({kit})
  and delivery, stored per row (rust_perm_run_grants.notice*).
- perm.sync notices: the untold set to the picked account, keyed
  run:step:user, in the digest; the report's noticesTold marks them told.
- rust.options.grouppermissions notes a kit's permission rows via kits.uses
  (cached a minute per server; a failure is no note).
- duration: 'minutes' on rust.zone.open and rust.participation.open; the
  group-permission lease's value example is true.
- protocol 13 -> 14, coreApi ^1.13.0; ci/core-ref.json pinned to website#212's
  head while it is open; engagement-triggers.json regenerated (coreApi line).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
This commit is contained in:
2026-10-12 02:25:06 -05:00
parent be8c09e6b3
commit d21a9e2c0d
17 changed files with 743 additions and 29 deletions

View File

@@ -458,6 +458,11 @@ async function applyReport(server, { desired, hash, retire, styleRetired = [], r
const revocations = await db.listRevocations(server.id)
await db.deleteRevocations(revocations.map((row) => row.id))
// Protocol 14 (D333). The reward messages the plugin has said; they leave the
// next sync's set, which is what lets the plugin forget them.
const noticesTold = Array.isArray(report.noticesTold) ? report.noticesTold : []
const marked = noticesTold.length ? await db.markNoticesTold(server.id, noticesTold) : 0
// What waits for a person: the reconcile's (D161's `adopt`, and an event's
// grant removed in the game), and a style field somebody changed by hand (D138).
await db.replaceDrift(server.id, [
@@ -505,6 +510,7 @@ async function applyReport(server, { desired, hash, retire, styleRetired = [], r
...(report.creditsApplied !== undefined
? { creditsApplied: report.creditsApplied, creditsWithdrawn: report.creditsWithdrawn }
: {}),
...(marked ? { noticesTold: marked } : {}),
})
}