diff --git a/AGENTS.md b/AGENTS.md index 11e1b4a18..d6226f8dc 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -31,8 +31,8 @@ operator/ controller-runtime operator internal/controller/ reconcilers + envtest suites cmd/main.go entrypoint; config/{crd,rbac}/ GENERATED api/ REST + WebSocket gateway (chi); cmd/main.go: `serve`, `gateway`, `bootstrap-admin`, `rotate-panel-key` - internal/{handlers,auth,db,kube,notify,rbac,ws}/ -agent/ in-pod sidecar; internal/{auth,console,files,heartbeat,logs,players,rcon,quiesce}/ + internal/{audit,auth,controlplane,db,gateway,gatewayprotocol,handlers,httperr,kube,kubeconfig,messages,notify,rbac,registry,scope,steam,telemetry,ws}/ +agent/ in-pod sidecar; internal/{a2s,actions,auth,caps,console,files,heartbeat,httpjson,lifecycle,logs,metrics,mods,players,quiesce,rcon,status,target,usage}/ audit-syslog-bridge/ SUBMODULE GameplanePanel/audit-syslog-bridge (RFC 5424 HTTP→syslog forwarder; own go.mod, not in go.work; image still built here) telemetry-receiver/ usage telemetry ingest sentinel/ wake-on-connect proxy for sleeping pods @@ -40,7 +40,7 @@ capture-sidecar/ SUBMODULE GameplanePanel/capture-sidecar (AF_PACKET BPF cap mcp-server/ SUBMODULE GameplanePanel/mcp (read-only MCP server; own go.mod, not in go.work; image still built here) sftp/ SUBMODULE GameplanePanel/sftp (SFTP endpoint for game server files, spec 040; own go.mod, not in go.work; image still built here) tunnel/ SUBMODULE GameplanePanel/tunnel (relay client supervisor: frp, Tailscale, playit; own go.mod, not in go.work; image still built here) -web/ React 19 + strict TS + Vite dashboard; src/{routes,components,lib,router,styles,test}/ +web/ React 19 + strict TS + Vite dashboard; src/{__tests__,api,components,lib,pages,router,routes,styles,test}/ (plus main.tsx and types.ts) modules/ SUBMODULE GameplanePanel/module (OCI game templates) website/ SUBMODULE GameplanePanel/website (Astro docs/marketing; has its own CLAUDE.md and AGENTS.md) charts/gameplane/ Helm chart (crd-manifests/, hooks) diff --git a/FEATURES.md b/FEATURES.md index b7f25f3e1..e12a7409c 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -96,7 +96,7 @@ See [docs/roadmap.md](docs/roadmap.md) for what is planned and in progress. | Browse the official catalog and merged module states | beta | on | The official OCI catalog holds 29 game modules and the chart enables 16 by default, and the Modules page shows available, installed, verified, failed and update states across all configured sources. | [module-authoring](docs/module-authoring.md#installing-a-module) | | Pin or verify module bundles with digests and signatures | beta | off | Sets a Module digest so only that exact bundle installs, and checks bundle signatures against a cosign public key or a keyless Sigstore identity before installing. | [module-authoring](docs/module-authoring.md#verifying-and-pinning-bundles) | | Use a Git repository, HTTP archive or local directory as a module source | beta | off | Reads module directories from a Git repository at a pinned ref, from a tar.gz or zip archive served over HTTP or HTTPS, or from a path mounted into the operator pod. | [module-authoring](docs/module-authoring.md#module-sources) | -| Complete specs.md for all 29 game modules | planned | n/a | Each game module carries a specs.md documenting its template configuration; 26 of 29 have one today. | [roadmap](docs/roadmap.md#game-module-template-specifications-planned) | +| Complete specs.md for all 29 game modules | planned | n/a | Each game module carries a specs.md documenting its template configuration; 27 of 29 have one today. | [roadmap](docs/roadmap.md#game-module-template-specifications-planned) | | Nuclear Option join through a load-balancer IP pool override | in progress | n/a | Lets Nuclear Option clients join through a load-balancer IP pool override; blocked until the server binding on UDP 7777 is documented. | [roadmap](docs/roadmap.md#in-progress) | ## Module authoring diff --git a/README.md b/README.md index 45699adeb..74218dd5b 100644 --- a/README.md +++ b/README.md @@ -302,7 +302,7 @@ The `make dev-up` target: `kind-registry:5000`), 2. loads every locally-built image (operator, api, web, agent, and every optional component's image), -3. pushes every directory under `modules/` (29 games at last count — see +3. pushes every directory under `modules/` (30 module directories at last count, 29 games plus the Minecraft Proxy module — see `modules/` for the current list) to the local registry as an OCI module bundle, 4. installs the Helm chart from `charts/gameplane/` with a default diff --git a/api/specs.md b/api/specs.md index dd78a1bae..af6da9769 100644 --- a/api/specs.md +++ b/api/specs.md @@ -469,7 +469,7 @@ A submitted stylesheet is rejected with 400 and a message naming the offending r **Audit implementation pattern** (api/internal/audit/audit.go and api/internal/handlers/capture.go): - **Synchronous writes:** All capture handlers call `Auditor.WriteSync(ctx, method, path, target, reason, status)` directly before writing the HTTP response body to the client -- **Signature:** `WriteSync(ctx context.Context, method, path, target, reason string, status int) error` (api/internal/audit/audit.go:711) +- **Signature:** `WriteSync(ctx context.Context, method, path, target, reason string, status int) error` (api/internal/audit/audit.go:755) - **Timing:** The audit row is inserted into the database **before WriteHeader is called**, so if the audit write fails, the handler returns HTTP 500 (internal error) without sending the response body — **a failed audit write fails the entire capture operation (FR-006)** - **Error handling:** WriteSync returns an error if the database write fails; the handler must check the return value and bail if it's non-nil. This is enforced by a helper method `auditWriteOrFail` in capture.go, which returns false on write failure (the handler then returns 500 without proceeding) - **One row per request:** after a successful WriteSync, `auditWriteOrFail` calls `audit.MarkRecorded(ctx)`, which makes the global `audit.Middleware` skip its generic row for that request, so each capture mutation is audited once (the explicit row also carries `reason` and the composite `target`). If WriteSync fails the flag stays unset and the middleware row is written as a fallback @@ -479,7 +479,7 @@ A submitted stylesheet is rejected with 400 and a message naming the offending r - **Column:** `audit_events.reason` (nullable TEXT, added by migration 007_audit_reason.sql, api/internal/db/migrations/) - **Purpose:** Structured, machine-readable reason codes for operations that need fault reporting beyond HTTP status — e.g., capture start may fail with reasons "server_not_found", "capture_not_enabled", "invalid_filter", "invalid_duration", "invalid_size", "capture_in_progress", "ttl_exceeded", "create_failed", or "" on success - **Hash chain compatibility** (api/internal/audit/audit.go:309-331): - - The `reason` field **participates in the hash chain ONLY when non-empty** (api/internal/audit/audit.go computeHash function, lines 329-332) + - The `reason` field **participates in the hash chain ONLY when non-empty** (api/internal/audit/audit.go computeHash function, starting at line 365) - Pre-migration rows (written before 007_audit_reason.sql shipped) have NULL/empty reason and were hashed without a reason field; their stored hash remains valid and is verified bit-for-bit - Post-migration rows with non-empty reason include it in their content hash; two rows differing only in reason hash differently - The Verify function (api/internal/audit/audit.go:455+) correctly reconstructs this at each row: pre-migration rows are hashed without reason (as originally computed), post-migration rows with non-empty reason include it @@ -491,16 +491,16 @@ A submitted stylesheet is rejected with 400 and a message naming the offending r **Captures:manage permission model** (api/internal/rbac/ and api/internal/db/migrations/): -- **Permission key:** `captures:manage` (defined in api/internal/rbac/catalog.go:71, namespaced) +- **Permission key:** `captures:manage` (defined in api/internal/rbac/catalog.go:72, namespaced) - **Label:** "Enable, start, stop, download, and delete packet captures" - **Seeding:** Only the **admin role** has this permission, via the wildcard admin permission `*` (admin holds `perm: "*"` in 003_roles.sql:48, which covers all permissions including captures:manage) - **Migration 008 (008_captures_rbac.sql):** This migration deliberately does NOT explicitly INSERT captures:manage into role_permissions for the admin role, because admin's permission set must remain exactly `['*']` as verified by the test TestRoles_ListIncludesBuiltins - **Grantability:** captures:manage is a normal catalog permission that *could technically* be granted to custom roles via the roles API (it has no structural restriction like the `*` wildcard does). However, the default seeding keeps it admin-only; future phases may decide to allow operator or custom-role grantability (T012 in research.md left that as an open decision) -- **Ownership fallback limitation:** The owner/collaborator fallback in rbac.go (lines 111-127) is explicitly restricted to `servers:read`, `servers:write`, and `servers:console` permissions. Even a GameServer owner without the `captures:manage` permission will get HTTP 403 Forbidden on all capture endpoints +- **Ownership fallback limitation:** The owner/collaborator fallback in rbac.go (around lines 147-170) is explicitly restricted to `servers:read`, `servers:write`, and `servers:console` permissions. Even a GameServer owner without the `captures:manage` permission will get HTTP 403 Forbidden on all capture endpoints **RBAC rule-table ordering (critical security constraint)**: -- **Constraint:** All ten capture permission rows in `api/internal/rbac/rbac.go` (lines 239-248, including `:capture-node-enable` and `:capture-node-disable`) MUST precede the `servers:write` catch-all rule (line 253) +- **Constraint:** All ten capture permission rows in `api/internal/rbac/rbac.go` (lines 329-338, including `:capture-node-enable` and `:capture-node-disable`) MUST precede the `servers:read` rule (line 342) and the `servers:write` catch-all rule (line 343) - **Why it matters:** Path matching is done on the first segment, stripped of any verb suffix ("servers"). So `/servers/{name}:capture-start` matches segment "servers" just like `/servers/{name}` (ordinary CRUD). An unordered insertion of capture rules after the `servers:write` catch-all (which the operator role holds via 003_roles.sql:48) would silently grant all 10 capture endpoints to the operator role, **breaking the security requirement that only admin has capture permissions (FR-005/SC-005) with no test failure, no log line, no observable error — just silent escalation** - **What breaks if reordered:** - Any HTTP verb on any path matching `/servers/{name}:capture-*` would resolve to `servers:write` permission instead of `captures:manage` @@ -515,7 +515,7 @@ A submitted stylesheet is rejected with 400 and a message naming the offending r **Security & invariants:** - **Asymmetry clarity:** Enable is live and restart-free. Disable is similarly live but not truly "off" — the container remains in the pod until recreation. Spec.md documents this precisely; dashboa will surface it to users (e.g., "Capture disabled but sidecar remains until pod restart"). -- **RBAC ordering (critical):** All 10 capture permission rows in `api/internal/rbac/rbac.go` (lines 239-248) MUST precede the `servers:write` catch-all. Path matching is done on segment "servers" (via chi's `{name}` segment stripping), so a /servers/{name}:verb verb routes as "servers" segment. An unordered insertion after servers:write would silently grant capture access to the operator role (which holds servers:write), breaking the security requirement that only admin has capture permissions (FR-005/SC-005). CI does not currently detect this regression; future edits must preserve order or add a structural test. +- **RBAC ordering (critical):** All 10 capture permission rows in `api/internal/rbac/rbac.go` (lines 329-338) MUST precede the `servers:read` rule and the `servers:write` catch-all. Path matching is done on segment "servers" (via chi's `{name}` segment stripping), so a /servers/{name}:verb verb routes as "servers" segment. An unordered insertion after servers:write would silently grant capture access to the operator role (which holds servers:write), breaking the security requirement that only admin has capture permissions (FR-005/SC-005). CI does not currently detect this regression; future edits must preserve order or add a structural test. - **Concurrent capture limit (API + operator):** API enforces at creation time (rejects 409); operator enforces again at reconciliation time. Two independent gates prevent race conditions and eventual-consistency lag. - **Sidecar authentication:** mTLS only; both client cert+key and server CA are passed from cmd/main.go to MountCapture and built into an http.Client. No sidecar auth tokens in URLs (SSRF risk), no secrets echoed in logs. @@ -548,7 +548,7 @@ audit:read, config:read, config:manage (cluster-scoped) - Required for all 7 implemented capture endpoints (`:capture-enable`, `:capture-disable`, `:capture-start`, `:capture-stop`, `:captures`, `:capture`, `:capture-file`) - Future Phase 2 task: DELETE `:capture` endpoint for explicit capture deletion (8th rule, also gated by captures:manage) - Seeded to **admin role only** (migration 008 and admin's `*` wildcard; no explicit custom-role or operator-role grant) - - RBAC rule table ordering: All 10 capture rules MUST precede the `servers:write` catch-all to prevent silent operator-role escalation (see invariant 12) + - RBAC rule table ordering: All 10 capture rules MUST precede the `servers:read` rule and the `servers:write` catch-all to prevent silent operator-role escalation (see invariant 12) **Binding dimensions:** - Per-user + per-role (many-to-many) @@ -585,16 +585,16 @@ audit:read, config:read, config:manage (cluster-scoped) 2. **Every mutating request audited:** audit middleware logs actor, method, path, target, status, IP to database + external sinks 3. **Three-role baseline RBAC:** admin/operator/viewer roles reproduce historical permission matrix exactly 4. **Multi-dimensional RBAC:** namespace + cluster + owner/collaborator dimensions; cluster gating prevents cross-cluster privilege escalation -5. **Append-only migrations:** database schema mutations are irreversible (migrations 001-021); no down-migrations -6. **Login rate limiting:** `/auth/login` is per-IP (burst 10, 5/min, `LoginLimiter`) plus a per-username throttle layered on top (burst 6, 3/min, `LoginUserLimiter` in `auth/local.go`), which a browser carrying a valid `gameplane_login_device` cookie for that username (set on a successful login, HMAC using a process-local SQLite key or a shared PostgreSQL key with a signed expiry) skips; the OIDC callback routes (`/auth/oidc/{provider}/callback`, legacy `/auth/oidc/callback`) are per-IP only (burst 10, 10/min via `OIDCCallbackLimiter`), no per-user dimension +5. **Append-only migrations:** database schema mutations are irreversible (migrations 001-027); no down-migrations +6. **Login rate limiting:** `/auth/login` is per-IP (burst 10, 5/min, `LoginLimiter`) plus a per-username throttle layered on top (burst 6, 3/min, `LoginUserLimiter` in `auth/ratelimit.go`, applied from `auth/local.go`), which a browser carrying a valid `gameplane_login_device` cookie for that username (set on a successful login, HMAC using a process-local SQLite key or a shared PostgreSQL key with a signed expiry) skips; the OIDC callback routes (`/auth/oidc/{provider}/callback`, legacy `/auth/oidc/callback`) are per-IP only (burst 10, 10/min via `OIDCCallbackLimiter`), no per-user dimension 7. **Audit hash-chain:** each audit_events row includes hash of previous row (prev_hash) + its own content hash (hash); detects DB-level UPDATE/DELETE tampering -8. **Audit pagination is bounded:** The `Auditor.Page(ctx, limit)` method clamps the untrusted `limit` parameter to a maximum of 500 entries (`MaxAuditPageSize`). Clamping occurs at both the API handler layer (api/internal/handlers/audit.go line 25) and the store layer (api/internal/audit/audit.go lines 820–822) so untrusted input is bounded at the earliest opportunity and again at use time. The allocated slice is always created with capacity within the bound (`make([]Event, 0, limit)` after clamping), guaranteeing that no untrusted client input can cause unbounded memory allocation regardless of how the limit value flows through the system. +8. **Audit pagination is bounded:** The `Auditor.Page(ctx, limit)` method clamps the untrusted `limit` parameter to a maximum of 500 entries (`MaxAuditPageSize`). Clamping occurs at both the API handler layer (api/internal/handlers/audit.go line 25) and the store layer (api/internal/audit/audit.go line 910) so untrusted input is bounded at the earliest opportunity and again at use time. The allocated slice is always created with capacity within the bound (`make([]Event, 0, limit)` after clamping), guaranteeing that no untrusted client input can cause unbounded memory allocation regardless of how the limit value flows through the system. 9. **Session CSRF protection:** CSRF token paired with session token; validated on state-changing requests. The CSRF cookie is deliberately **not** `HttpOnly` — the SPA reads it via JS and echoes it back as the `X-Gameplane-CSRF` header (double-submit pattern); making it `HttpOnly` would break the protection it's providing. The session cookie itself stays `HttpOnly`. Cookie *clearing* (logout) always sends `HttpOnly` regardless of the original cookie, since a delete carries no value for a script to read and the browser matches the clear on Name/Domain/Path alone. This is why the `.golangci.yml` gosec G124 exclusion is scoped narrowly to `api/internal/auth/sessions.go`. 10. **Cluster-watch logging is privacy-preserving:** The `kube.Watch` goroutine logs cluster synchronization events using only the cluster name and error details, never secret material. While cluster credentials are held in memory and used to construct clients, logging never includes kubeconfig bytes, API tokens, or other sensitive data. The taint-source variable naming (`kubeconfigField` for field names like "kubeconfig") is distinct from the actual credential bytes flowing through the client, preserving clarity for future readers and static analysis. 11. **Secure error handling:** internal errors (DB failures, K8s API errors) logged in full; safe generic messages sent to clients 12. **Cluster dispatch validation:** `?cluster=` matched against registered Cluster CRDs via registry; unknown cluster is a 400 13. **WebSocket/HTTP proxy path validation:** `api/internal/ws/dialer.go` takes the namespace and pod name from the request path before building the agent's upstream URL. Both are validated as DNS-1123 labels (`isDNS1123Label`) and rejected with a 400 before any URL is constructed — gosec's taint analysis doesn't model a custom validator as a sanitizer, hence the scoped G704 exclusion on that file. -14. **Capture rule-table ordering:** All 10 capture permission rows (POST `:capture-enable`, `:capture-node-enable`, `:capture-node-disable`, `:capture-disable`, `:capture-start`, `:capture-stop`; GET `:captures`, `:capture`, `:capture-file`; DELETE `:capture`) **MUST precede** the `servers:write` catch-all rule in `api/internal/rbac/rbac.go` (lines 239-248; catch-all at line 253). Because all `/servers/{name}:verb` paths match the segment "servers" (chi's `{name}` segment strips the verb suffix), an unordered insertion after `servers:write` (which the operator role holds) would **silently grant all 10 capture endpoints to the operator role**, breaking the security requirement that only admin has capture permissions (FR-005/SC-005). This regression is a structural bug CI does not currently catch — moving the capture rules after servers:write is a one-line security break. Any future RBAC edits must preserve this order; consider a structural test to prevent silent reordering. +14. **Capture rule-table ordering:** All 10 capture permission rows (POST `:capture-enable`, `:capture-node-enable`, `:capture-node-disable`, `:capture-disable`, `:capture-start`, `:capture-stop`; GET `:captures`, `:capture`, `:capture-file`; DELETE `:capture`) **MUST precede** the `servers:read` rule and the `servers:write` catch-all rule in `api/internal/rbac/rbac.go` (lines 329-338; `servers:read` at line 342, catch-all at line 343). Because all `/servers/{name}:verb` paths match the segment "servers" (chi's `{name}` segment strips the verb suffix), an unordered insertion after `servers:write` (which the operator role holds) would **silently grant all 10 capture endpoints to the operator role**, breaking the security requirement that only admin has capture permissions (FR-005/SC-005). This regression is a structural bug CI does not currently catch — moving the capture rules after servers:write is a one-line security break. Any future RBAC edits must preserve this order; consider a structural test to prevent silent reordering. 15. **Helm-seeded OIDC role mappings:** The "helm" provider is synthesized from CLI flags and the optional helmOverride overlay. No database migration carries the Helm seed; it lives only in flags. The helmOverride.roleMappings lives on the existing "auth" config row, per-role independently optional (key presence = overridden, absence = use Helm seed). Re-evaluated at login time so changes take effect without restart. Demotion guard prevents removing the last user able to manage users. 16. **Home-cluster-only routes:** Handlers built on the API's home-cluster client, and routes that reach agent or sidecar Services, serve the home cluster only and answer 501 not implemented (no cross-cluster agent yet) for a `?cluster=` naming any other registered cluster, so a permission granted on one cluster is never applied to another. The route list and its tests are under Authorization → Home-cluster-only routes. 17. **GameServer config passwords never leave the API in clear:** password-type `spec.config` values are replaced by a fixed marker in every response that carries a GameServer, through the single helper in `api/internal/handlers/config_redact.go`; a PUT that echoes the marker keeps the stored value. See Security considerations → GameServer config password redaction. @@ -617,7 +617,7 @@ audit:read, config:read, config:manage (cluster-scoped) - `golang.org/x/crypto` v0.59.0 — argon2id password hashing - `golang.org/x/oauth2` v0.38.0 — OAuth2 token exchange (OIDC flow) - `k8s.io/api` v0.37.2, `k8s.io/apimachinery` v0.37.2, `k8s.io/client-go` v0.37.2 — Kubernetes API -- `sigs.k8s.io/controller-runtime` v0.25.2 — K8s client (dynamic unstructured access) +- `sigs.k8s.io/controller-runtime` v0.25.3 — K8s client (dynamic unstructured access) Verify from `/api/go.mod`. @@ -635,7 +635,7 @@ Verify from `/api/go.mod`. - Runtime SQL is written once with `?` placeholders; the Postgres connector rewrites them to `$n` (`db.Rebind`). Timestamps that used SQLite's `datetime('now')` are generated in Go (`db.NowTimestamp()`, same `YYYY-MM-DD HH:MM:SS` UTC text) and bound as parameters; inserted ids come from `RETURNING id` (pgx has no `LastInsertId`) - Postgres legacy migrations declare the text columns the API sorts or range-compares (`roles.name`, role-binding scope columns, `audit_events.ts`, `sessions.expires_at`, `share_links.created_at`/`expires_at`) `COLLATE "C"` so ordering matches SQLite's byte-wise collation -### Schema (migrations 001-014 detailed here; 015-021 in `migrations/common/`) +### Schema (migrations 001-014 detailed here; 015-027 in `migrations/common/`) **001_init.sql:** - `users` — username (unique), email, display_name, pw_hash (argon2id), role (legacy, now via role_bindings), created_at, updated_at diff --git a/docs/comparison-sources.md b/docs/comparison-sources.md index 500a295d0..9cdf7a173 100644 --- a/docs/comparison-sources.md +++ b/docs/comparison-sources.md @@ -31,25 +31,25 @@ verified. ### Row (b): Scaling & auto-sleep **Source ID**: G-b -**Evidence**: operator/api/v1alpha1/gameserver_types.go:152, 173–219 (`IdleSpec`); CLAUDE.md § Repository Map (`gameproto/`, `sentinel/`) +**Evidence**: operator/api/v1alpha1/gameserver_types.go:223, 402–448 (`IdleSpec`); CLAUDE.md § Repository Map (`gameproto/`, `sentinel/`) **Checked on**: 2026-09-26 (re-verified) -**What was verified**: GameServer CRD specifies `spec.idle` (line 152, `IdleSpec` at lines 173–219) with configurable wake windows, manual wake, and the WakeOnConnect boolean flag (line 218) for sentinel-based wake on join. Minecraft/Terraria protocol support documented in sentinel and gameproto modules. +**What was verified**: GameServer CRD specifies `spec.idle` (line 223, `IdleSpec` at lines 402–448) with configurable wake windows, manual wake, and the WakeOnConnect boolean flag (line 447) for sentinel-based wake on join. Minecraft/Terraria protocol support documented in sentinel and gameproto modules. **Last-known URL**: https://github.com/GameplanePanel/Gameplane/tree/master/operator/api/v1alpha1 ### Row (c): Inbound connectivity (NAT traversal, relay) **Source ID**: G-c -**Evidence**: CLAUDE.md § Repository Map (`tunnel/`); operator/api/v1alpha1/gameserver_types.go:359–406 +**Evidence**: CLAUDE.md § Repository Map (`tunnel/`); operator/api/v1alpha1/gameserver_types.go:619, 643–670 **Checked on**: 2026-09-26 (re-verified) -**What was verified**: Tunnel is documented in CLAUDE.md repo map as "Relay client supervisor (frp, Tailscale, playit)". Relay is configured per-GameServer via `spec.networking.tunnel.enabled` (GameServerTunnel), not a Helm value; the chart only carries `operator.tunnelImages` (charts/gameplane/values.yaml:88). +**What was verified**: Tunnel is documented in CLAUDE.md repo map as "Relay client supervisor (frp, Tailscale, playit)". Relay is configured per-GameServer via `spec.networking.tunnel.enabled` (GameServerTunnel), not a Helm value; the chart only carries `operator.tunnelImages` (charts/gameplane/values.yaml:195). **Last-known URL**: https://github.com/GameplanePanel/Gameplane/tree/master/tunnel ### Row (d): Backup and restore **Source ID**: G-d -**Evidence**: operator/api/v1alpha1/backup_types.go:22; CLAUDE.md architecture section +**Evidence**: operator/api/v1alpha1/backup_types.go:262; CLAUDE.md architecture section **Checked on**: 2026-09-02 **What was verified**: Backup CRD type defined with support for Restic snapshots to S3-compatible storage; BackupSchedule CRD supports cron-scheduled backups; one-click restore via Restore CRD. **Last-known URL**: https://github.com/GameplanePanel/Gameplane/tree/master/operator/api/v1alpha1 @@ -67,9 +67,9 @@ verified. ### Row (f): Game template distribution **Source ID**: G-f -**Evidence**: docs/module-authoring.md § Verifying and pinning bundles (lines 340–414); CLAUDE.md § Repository Map (`modules/`) +**Evidence**: docs/module-authoring.md § Verifying and pinning bundles (lines 433–515); CLAUDE.md § Repository Map (`modules/`) **Checked on**: 2026-09-26 (re-verified) -**What was verified**: OCI bundles via ModuleSource CRD supporting git/http/oci/local/upload sources; cosign signature verification documented at lines 340–414; 29 ready-to-use templates in gameplane-module repository. +**What was verified**: OCI bundles via ModuleSource CRD supporting git/http/oci/local/upload sources; cosign signature verification documented at lines 433–515; 30 ready-to-use templates in gameplane-module repository. **Last-known URL**: https://github.com/GameplanePanel/Gameplane/tree/master/modules diff --git a/docs/contributing.md b/docs/contributing.md index b35038919..f3be465fb 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -27,7 +27,7 @@ change, the one compile check to run, and how long CI takes. | API route | `api/` (handlers in `api/internal/handlers/`) | `go build ./...` in `api/` | same as any Go change | | Game module | `modules//`: PR in `GameplanePanel/module`, then a pointer bump here | `make module-validate MODULE=` | 2.7 min in `GameplanePanel/module` (run 79, 2026-10-20); the bump PR here runs the docs gates | | Website | `website/`: PR in `GameplanePanel/website`, then a pointer bump here | `npm run build` in `website/` | 0.6 min in `GameplanePanel/website` (PR 25, 2026-10-22); the bump PR here runs the docs gates | -| Split component | `mcp-server/`, `audit-syslog-bridge/`, `tunnel/`, `capture-sidecar/`: PR in its own repo (`GameplanePanel/mcp`, `GameplanePanel/audit-syslog-bridge`, `GameplanePanel/tunnel`, `GameplanePanel/capture-sidecar`), then a pointer bump here | follow that repo's docs | the bump PR here runs the build and optional-components e2e | +| Split component | `mcp-server/`, `audit-syslog-bridge/`, `tunnel/`, `capture-sidecar/`, `sftp/`: PR in its own repo (`GameplanePanel/mcp`, `GameplanePanel/audit-syslog-bridge`, `GameplanePanel/tunnel`, `GameplanePanel/capture-sidecar`, `GameplanePanel/sftp`), then a pointer bump here | follow that repo's docs | the bump PR here runs the build and optional-components e2e | Times are GitHub Actions wall clock for one PR run, measured 2026-10-20: runs 2507, 2525 and 2524, and 11 Go PR runs for the median. Change-based test @@ -43,7 +43,7 @@ Gates a first PR trips on: [Design first for UI changes](#design-first-for-ui-changes). Never hand-edit `.fig` files. - Submodule work in the wrong repo: `modules/`, `website/` and the component submodules - (`mcp-server/`, `audit-syslog-bridge/`, `tunnel/`, `capture-sidecar/`) changes go to + (`mcp-server/`, `audit-syslog-bridge/`, `tunnel/`, `capture-sidecar/`, `sftp/`) changes go to their own repos first, then a pointer bump PR here. ## Dev loop @@ -104,7 +104,7 @@ Reopen the container with one of the named profiles (or `full`) and run the targ relevant screen, regenerate the export with `hack/design/fig-export.ts` (see `assets/design-export/MANIFEST.md`; it renders only the screens that changed, and the `design export` workflow commits it on pull requests from branches of this repository), review with the maintainers, *then* -translate to React. This keeps the 84 designed screens (`assets/design-export/MANIFEST.md`, re-measured 2026-09-12) the source of truth and +translate to React. This keeps the 251 designed screens (`assets/design-export/screens.json`) the source of truth and prevents the dashboard from drifting into code-led redesigns. Backend/operator/API changes do not need a design pass. @@ -234,7 +234,7 @@ cd gp-module && go test ./... cd web && npm test ``` -The component submodules (`mcp-server/`, `audit-syslog-bridge/`, `tunnel/`, `capture-sidecar/`) run their tests and lint in their own repos' CI (shared `.github/workflows/go-component.yaml`). To compile one here use `cd && GOWORK=off go build ./...`. +The component submodules (`mcp-server/`, `audit-syslog-bridge/`, `tunnel/`, `capture-sidecar/`, `sftp/`) run their tests and lint in their own repos' CI (shared `.github/workflows/go-component.yaml`). To compile one here use `cd && GOWORK=off go build ./...`. ## E2E testing @@ -343,7 +343,7 @@ flowchart TD Game-module changes (`modules/`) belong in the separate **`GameplanePanel/module`** repo, which this repo vendors as a submodule. Open the module PR there; once it merges, bump the submodule pointer here (`git add modules`) in a follow-up PR. -Component submodule changes (`mcp-server/`, `audit-syslog-bridge/`, `tunnel/`, `capture-sidecar/`) belong in their own repos the same way (`git add `). +Component submodule changes (`mcp-server/`, `audit-syslog-bridge/`, `tunnel/`, `capture-sidecar/`, `sftp/`) belong in their own repos the same way (`git add `). `.gitmodules` points all submodules (`modules/`, `website/` and the component submodules) at the upstream GitHub URLs, so a fork of this repo clones them without forking them too. To diff --git a/docs/dependencies.md b/docs/dependencies.md index dbaaf46df..6db95f8d7 100644 --- a/docs/dependencies.md +++ b/docs/dependencies.md @@ -5,7 +5,7 @@ dependencies and why each one is there. It covers all 12 Go modules that share `go.work` (`netguard`, `gameaction`, `gameproto`, `telemetryschema`, `i18n`, `operator`, `api`, `agent`, `telemetry-receiver` [optional], `sentinel` [optional], `gp-module`, `test/e2e`), the split component submodules `mcp-server` [optional], -`audit-syslog-bridge` [optional], `tunnel` [optional] and `capture-sidecar` [optional] +`audit-syslog-bridge` [optional], `tunnel` [optional], `capture-sidecar` [optional] and `sftp` [optional] (each the `GameplanePanel/` submodule, which keeps its own `go.mod` outside `go.work`), the `web/` npm package, and the build/CI toolchain that isn't a code dependency but is invoked by `make`/GitHub Actions. @@ -50,8 +50,8 @@ were added and verified on **2026-09-26**. | `tunnel/` (submodule) | Go | 1 (`tailscale.com`) | Relay client supervisor for frp/Tailscale/playit | | `gp-module/` | Go | 2 | Module authoring CLI: scaffold, offline validate, dry-run preview, OCI package | | `mcp-server/` (submodule) | Go | 5 | Standalone, strictly read-only MCP server for AI-assisted cluster diagnostics | -| `test/e2e/` | Go | 6 | kind + Helm + real-component end-to-end suite | -| `web/` | TypeScript/React | 24 runtime + 36 dev | Dashboard: routing, data fetching, UI primitives, console/file editors, tests | +| `test/e2e/` | Go | 10 | kind + Helm + real-component end-to-end suite | +| `web/` | TypeScript/React | 26 runtime + 36 dev | Dashboard: routing, data fetching, UI primitives, console/file editors, tests | ## Shared Go modules @@ -153,7 +153,7 @@ BackupSchedule, Restore, Module, and ModuleSource. Direct deps from | Dependency | Version | Why | Status | |---|---|---|---| -| `sigs.k8s.io/controller-runtime` | v0.25.2 | Core reconciler framework — every controller in `internal/controller/*` embeds `client.Client`; `cmd/main.go` builds the manager via `ctrl.NewManager` | direct-runtime | +| `sigs.k8s.io/controller-runtime` | v0.25.3 | Core reconciler framework — every controller in `internal/controller/*` embeds `client.Client`; `cmd/main.go` builds the manager via `ctrl.NewManager` | direct-runtime | | `k8s.io/api` | v0.37.2 | Core/apps/batch typed API objects used across `api/v1alpha1/*_types.go` and controllers to build Pod/PVC/Job/Service/RBAC objects | direct-runtime | | `k8s.io/apimachinery` | v0.37.2 | `metav1.ObjectMeta`, `runtime.Scheme`, `types.NamespacedName`, etc. — pervasive across CRD types and controllers | direct-runtime | | `k8s.io/client-go` | v0.37.2 | `internal/controller/cluster_controller.go`, `gameserver_stop_attach.go` (pod exec/attach via `kubernetes.Clientset`), `cmd/main.go` scheme/clientset setup | direct-runtime | @@ -196,7 +196,7 @@ chi-based REST + WebSocket gateway. Direct deps from `api/go.mod` | `golang.org/x/oauth2` | v0.38.0 | `internal/auth/oidc.go` — `oauth2.Config` drives the OIDC authorization-code exchange | direct-runtime | | `golang.org/x/crypto` | v0.59.0 | `internal/auth/password.go` — `argon2.IDKey` hashes/verifies local-login passwords (argon2id), plus a constant-time dummy-verify path to avoid a user-enumeration timing leak | direct-runtime | | `k8s.io/api`, `k8s.io/apimachinery`, `k8s.io/client-go` | v0.37.2 | `internal/kube/*.go` (client wrapper, kubeconfig loading, watches, exec streaming), `internal/handlers/*.go`, `internal/notify/sinks.go`, `internal/rbac/rbac.go` — reading/writing CRDs and core objects | direct-runtime | -| `sigs.k8s.io/controller-runtime` | v0.25.2 | `cmd/main.go` — only `ctrl.GetConfig()` is used, to load the kubeconfig/in-cluster `*rest.Config` at startup; not the manager/reconciler machinery (that's the operator's job — see rule "the operator is authoritative"). `envtest.Environment` in `internal/handlers/suite_envtest_test.go` is test-only | direct-runtime (minimal) | +| `sigs.k8s.io/controller-runtime` | v0.25.3 | `cmd/main.go` — only `ctrl.GetConfig()` is used, to load the kubeconfig/in-cluster `*rest.Config` at startup; not the manager/reconciler machinery (that's the operator's job — see rule "the operator is authoritative"). `envtest.Environment` in `internal/handlers/suite_envtest_test.go` is test-only | direct-runtime (minimal) | | `sigs.k8s.io/yaml` | v1.6.0 | `internal/handlers/module_upload.go` — parses `module.yaml` metadata and `template.yaml` from uploaded module bundles | direct-runtime | | `github.com/minio/minio-go/v7` | v7.4.1 | `internal/audit/s3.go` — S3-compatible client (`minio.New`, `PutObject`) backing the S3 audit-log sink | direct-runtime | | `github.com/prometheus/client_golang` | v1.25.0 | `cmd/metrics.go` (`promhttp` handler at `/metrics` on the separate metrics listener); `promauto` counters in `internal/notify/notify.go`, `internal/audit/s3.go`, `internal/audit/audit.go` | direct-runtime | @@ -279,7 +279,7 @@ diagnostics. Direct deps from `mcp-server/go.mod`: | `k8s.io/client-go` | v0.37.2 | `internal/kube/client.go` — `kubernetes.NewForConfig`/`dynamic.NewForConfig` build the typed and dynamic clientsets, kept as unexported fields on `Client` so no exported method can reach a mutating verb | | `k8s.io/api` | v0.37.2 | `internal/kube/client.go` — `corev1` types for the typed Pod/Event reads (`ListPods`, `GetPod`, `ListEvents`, `PodLogs`) | | `k8s.io/apimachinery` | v0.37.2 | `internal/kube/client.go` — `unstructured.Unstructured(List)`, `runtime.Scheme`, `schema.GroupVersionResource` back the dynamic-client reads of 7 of Gameplane's 9 CRDs (not Cluster or NetworkCapture) (redeclared GVK/GVR locally rather than importing the operator module's generated types, to stay standalone) | -| `sigs.k8s.io/controller-runtime` | v0.25.2 | `main.go` — only `ctrl.GetConfig()`, to load the kubeconfig (in-cluster, falling back to `KUBECONFIG`/`~/.kube/config`) that builds the `kube.Client` above | +| `sigs.k8s.io/controller-runtime` | v0.25.3 | `main.go` — only `ctrl.GetConfig()`, to load the kubeconfig (in-cluster, falling back to `KUBECONFIG`/`~/.kube/config`) that builds the `kube.Client` above | The read-only guarantee has two layers: the handler boundary (only List/Get-shaped methods are exported from `internal/kube`, and @@ -360,15 +360,15 @@ React 19 + TypeScript strict + Vite dashboard (`web/package.json` version **Routing / data fetching** - `@tanstack/react-router` `^1.170.46` — file-based route tree; `createRouter`/`RouterProvider` in `src/main.tsx`, tree built in `src/router/tree.tsx`, `Link`/`useNavigate` used across `src/routes/*.tsx`. -- `@tanstack/react-query` `^5.107.1` — server-state cache; `QueryClient`/`QueryClientProvider` in `src/main.tsx`, `useQuery`/`useMutation` used pervasively across routes and `src/lib/` — the dominant data-fetching layer. +- `@tanstack/react-query` `^5.108.1` — server-state cache; `QueryClient`/`QueryClientProvider` in `src/main.tsx`, `useQuery`/`useMutation` used pervasively across routes and `src/lib/` — the dominant data-fetching layer. - `@tanstack/react-virtual` `^3.14.26` — `useVirtualizer` in `src/routes/tabs/Logs.tsx`, virtualizes the log-line list. - `@tanstack/router-devtools` (dev) — **no import found anywhere in `src/`**. Installed but apparently unused; flag as a candidate for removal or an intentionally-deferred addition. **UI primitives (HeroUI v3)** - `@heroui/react` `3.2.7` — foundational component library (Button, Input, Select, Modal, Table, etc.); composed and themed in `src/components/ui/` (Gameplane's composition layer over HeroUI). - `@heroui/styles` `3.2.7` — companion style package with semantic token infrastructure for light/dark modes and brand customization; `@heroui/styles` is imported in `src/styles/globals.css` for global theme setup. -- `clsx` `^2.1.1` + `tailwind-merge` `^3.7.0` — combined into the `cn()` helper in `src/lib/utils.ts`, used app-wide for conditional/merged Tailwind classes and with HeroUI's theme tokens. -- `lucide-react` `^1.73.0` — icon set, imported in roughly 83 files (`AppLayout`, `Dashboard`, `Login`, dialogs, etc.). +- `clsx` `^2.1.1` + `tailwind-merge` `^3.7.1` — combined into the `cn()` helper in `src/lib/utils.ts`, used app-wide for conditional/merged Tailwind classes and with HeroUI's theme tokens. +- `lucide-react` `^1.76.0` — icon set, imported in roughly 83 files (`AppLayout`, `Dashboard`, `Login`, dialogs, etc.). - `react-aria` — peer dependency of HeroUI, providing accessibility primitives (via `react-aria-components`) used by HeroUI atoms. **Editors / terminals** @@ -376,25 +376,25 @@ React 19 + TypeScript strict + Vite dashboard (`web/package.json` version - `@xterm/xterm` `^6.0.0` + `@xterm/addon-fit` `^0.11.0` — `Terminal`/`FitAddon` in `src/routes/tabs/useConsoleTerminal.ts`, driving the live server console (`Console.tsx`); also chunked separately in `vite.config.ts`. **Styling / build** -- `tailwindcss` `^4.3.3`, `autoprefixer` `^10.6.2`, `postcss` `^8.5.32` (dev) — `postcss.config.js` wires Tailwind + autoprefixer; there is no `tailwind.config.ts`; design tokens live in `src/styles/globals.css`, which imports `@heroui/styles`. +- `tailwindcss` `^4.3.3`, `autoprefixer` `^10.7.0`, `postcss` `^8.5.33` (dev) — `postcss.config.js` wires Tailwind + autoprefixer; there is no `tailwind.config.ts`; design tokens live in `src/styles/globals.css`, which imports `@heroui/styles`. - `vite` `^8.3.8`, `@vitejs/plugin-react` `^6.3.0` (dev) — `vite.config.ts` drives the dev server (with the API/WS proxy to the in-cluster API used by `make web-dev`), production build, and is the engine behind `vitest.config.ts`. - `typescript` `^7.0.2` (dev) provides the native `tsc` used for the dashboard build and Playwright type checks. The i18n migration script reads TSX syntax with Babel. - Opening a JavaScript or TypeScript file starts Microsoft's TypeScript language server in a WebAssembly worker. The browser package is pinned to `7.1.0-dev.20261030.1`, the version Microsoft tested in Playground v2. The worker checks the open file against TypeScript's standard library in browser memory. [Microsoft's Playground implementation](https://github.com/microsoft/TypeScript-Website/pull/3653) - On plain HTTP, the editor sends changes to the worker with ordinary browser messages. Autocomplete and type checking require WebAssembly JavaScript Promise Integration (Chrome and Edge 137+, Firefox 153+, or Safari 27+). A secure, cross-origin-isolated page can also use shared memory, including on older browsers. With neither capability, users can still edit, highlight, and save files. [Browser support](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Suspending#browser_compatibility) **Lint** (dev, all wired directly in `eslint.config.js`) -- `eslint` `^10.14.0` and `@eslint/js` `^10.0.1` check JavaScript. Babel parses TypeScript and JSX for `eslint-plugin-react-hooks` and `eslint-plugin-formatjs`. +- `eslint` `^10.15.0` and `@eslint/js` `^10.0.1` check JavaScript. Babel parses TypeScript and JSX for `eslint-plugin-react-hooks` and `eslint-plugin-formatjs`. - `oxlint` and `oxlint-tsgolint` check React and TypeScript code, including unhandled promises. Run both linters with `npm run lint` in `web/`. [Oxlint configuration](../web/.oxlintrc.json) **Testing — unit tier (Vitest)** -- `vitest` `^5.0.0`, `@vitest/coverage-v8` `^5.1.0` (dev) — `vitest.config.ts` (jsdom environment, coverage thresholds), run via `npm test`/`test:cover`. -- `jsdom` `^31.0.0` (dev) — the test environment itself. -- `@testing-library/react` `^16.3.3`, `@testing-library/user-event` `^14.6.10`, `@testing-library/jest-dom` `^7.0.1`, `@testing-library/dom` `^10.4.2` (dev) — `render`/`screen`, interaction simulation, and DOM matchers used across the co-located `*.test.tsx` files. -- `msw` `^3.0.5` — dual role: unit-test request mocking (`src/test/server.ts`/`handlers.ts`, used via `setupServer` in most `*.test.tsx` files) **and** browser-mode mocking for Playwright's mock tier (`src/test/browser-msw.ts` uses `msw/browser`'s `setupWorker`, loaded by `main.tsx` when `VITE_E2E_MOCK` is set). +- `vitest` `^5.0.0`, `@vitest/coverage-v8` `^5.1.1` (dev) — `vitest.config.ts` (jsdom environment, coverage thresholds), run via `npm test`/`test:cover`. +- `jsdom` `^31.0.1` (dev) — the test environment itself. +- `@testing-library/react` `^16.3.3`, `@testing-library/user-event` `^14.6.13`, `@testing-library/jest-dom` `^8.0.0`, `@testing-library/dom` `^10.4.2` (dev) — `render`/`screen`, interaction simulation, and DOM matchers used across the co-located `*.test.tsx` files. +- `msw` `^3.0.7` — dual role: unit-test request mocking (`src/test/server.ts`/`handlers.ts`, used via `setupServer` in most `*.test.tsx` files) **and** browser-mode mocking for Playwright's mock tier (`src/test/browser-msw.ts` uses `msw/browser`'s `setupWorker`, loaded by `main.tsx` when `VITE_E2E_MOCK` is set). - `vitest-websocket-mock` `^0.8.0` (dev) — `src/test/ws.ts`, mocks the WebSocket used by `src/lib/ws.ts`/console streaming in unit tests. **Testing — e2e tier (Playwright)** -- `@playwright/test` `^1.65.0` (dev) — `playwright.config.ts` defines mock vs. live run modes (`GAMEPLANE_E2E_TARGET`), driven by `make test-web-e2e-mock`/`test-web-e2e-live`. Live mode hits a real kind cluster via a `kubectl port-forward` globalSetup; mock mode reuses the same `msw` handlers as the unit tier. +- `@playwright/test` `^1.65.1` (dev) — `playwright.config.ts` defines mock vs. live run modes (`GAMEPLANE_E2E_TARGET`), driven by `make test-web-e2e-mock`/`test-web-e2e-live`. Live mode hits a real kind cluster via a `kubectl port-forward` globalSetup; mock mode reuses the same `msw` handlers as the unit tier. **Types** - `@types/react` `^19.3.0`, `@types/react-dom` `^19.3.0`, `@types/node` `^26.6.6` (dev) — type definitions consumed implicitly by TypeScript, no direct import. @@ -430,7 +430,7 @@ These aren't code dependencies of any component; they're invoked by - **`github.com/wadey/gocovmerge@v0.0.0-20160331181800-b5bfa59ec0ad`** — pinned in `Makefile`'s `GOCOVMERGE_PKG`, merges each module's `unit.out` + `envtest.out` coverage profiles before the threshold gate. - **`sigs.k8s.io/controller-runtime/tools/setup-envtest@release-0.24`** — installed by `make envtest-bin`; downloads the K8s 1.36.2 envtest binaries (`kube-apiserver`, `etcd`) that back `operator`'s and `api`'s `-tags=envtest` integration tests. - **`golangci-lint` v2.14.0** — pinned in `.github/workflows/ci.yaml`, `.devcontainer/versions.toml` (`golangci_lint`, installed by `.devcontainer/setup.sh`), and the exact-version guard in `test/e2e/lint-gate-verify.sh`. Its `golang.org/x/tools v0.50.0` importer supports the export-data version 5 emitted by Go 1.27.3; v2.13.2's importer does not. CI uses the published binary and the devcontainer builds the same release from source. The CI `lint` matrix gates every selected workspace module with `.golangci.yml`, using `envtest` tags for operator/API and `e2e` tags for test/e2e. Update the verifier's valid fixtures with the pin; unsupported or unpinned versions must still fail. Tests and general lint run only in CI under repository policy. -- **`oras` CLI ≥ 1.2.0** (pinned `1.2.0` in `.devcontainer/versions.toml`; `oras-project/setup-oras@v2.0.3` action in `release.yaml`) — `modules/build.sh` pushes each `modules//` directory as an OCI module bundle (`make modules-push`); this is a *different* thing from `operator`'s `oras.land/oras-go/v2` **library** dependency, which is the operator's own pull-side client, not the CLI. +- **`oras` CLI ≥ 1.2.0** (pinned `1.2.0` in `.devcontainer/versions.toml`; `oras-project/setup-oras@v2.0.4` action in `release.yaml`) — `modules/build.sh` pushes each `modules//` directory as an OCI module bundle (`make modules-push`); this is a *different* thing from `operator`'s `oras.land/oras-go/v2` **library** dependency, which is the operator's own pull-side client, not the CLI. - **`cosign` CLI v3.1.2** (`sigstore/cosign-installer@v4.1.3`) — used in `publish-edge.yaml`/`release.yaml` to sign published container images, the Helm chart, and module bundles against `COSIGN_PRIVATE_KEY`, recording each signature in the public Rekor transparency log, and to round-trip-verify against the derived public key before publishing. Signatures use the classic format (`--new-bundle-format=false --use-signing-config=false`), which is what keeps them readable by the operator's `sigstore/cosign/v3` library; cosign's newer Rekor v2 flow additionally requires an RFC3161 timestamp authority that keyed signing cannot satisfy. `modules/build.sh` gates the same behaviour behind its own `--tlog-upload` flag so local and air-gapped authoring stays offline. Distinct from `operator`'s `sigstore/cosign/v3` **library** dependency, which only ever *verifies* (never signs) at reconcile time. - **`kind`** v0.32.0 (pinned in `.devcontainer/versions.toml`) / `helm/kind-action@v1.15.2` (`install_only: true` in CI) — spins up the ephemeral clusters for `make dev-up`, `make test-e2e`, and every `e2e-*` CI job. - **`helm`** (`azure/setup-helm@v5.1.0` in CI; `helm` 4.3.1 pinned in `.devcontainer/versions.toml` and installed by the full dev container profile) — chart lint (`helm lint`), chart render sanity-check, `helm template`, and `helm upgrade --install` in `deploy/kind/*.sh`/`Makefile`'s `dev-install`. diff --git a/docs/install.md b/docs/install.md index 723a505a9..98de85b2e 100644 --- a/docs/install.md +++ b/docs/install.md @@ -31,9 +31,9 @@ The chart's `appVersion` pins matching component images under `ghcr.io/gameplanepanel/gameplane/:`, so no image overrides are needed for a released version. A default install pulls four of them: `operator`, `api`, `web`, and `agent` (the last is pulled per-GameServer, on -demand). The remaining eight — `audit-syslog-bridge`, `telemetry-receiver`, +demand). The remaining nine — `audit-syslog-bridge`, `telemetry-receiver`, `sentinel`, `tunnel-frp`, `tunnel-tailscale`, `tunnel-playit`, `mcp-server`, -and `capture-sidecar` — are only pulled when the optional component they +`capture-sidecar`, and `sftp` — are only pulled when the optional component they belong to is enabled (and, for `sentinel` and `capture-sidecar`, only for GameServers that opt in). See each component's values block for its enable flag. @@ -307,10 +307,11 @@ Top-level knobs (see `values.yaml` for the full list): a dashboard override survives future `helm upgrade`s that change the Helm value. Per-role precedence: dashboard override (if present) > Helm seed. No admin account or `bootstrap-admin` run needed for OIDC-only installs. - - `defaultRole` — Helm-only (no dashboard override in v1). Default role when a + - `defaultRole` — Seeded from Helm; an admin can also override it from the dashboard. Default role when a user's IdP groups don't match any `roleMappings` entry (default `""`). - Accepted values: `""` (treat as `"viewer"`), `"viewer"`, `"operator"`, - `"admin"`, or `"deny"` (reject login). Meaningful only when role mappings + Accepted values: `""` (treat as `"viewer"`), `"deny"` (reject login), or the + name of any role, built-in or custom (checked at sign-in; a missing role + refuses the login). Meaningful only when role mappings are configured. Example: `--set api.oidc.defaultRole=viewer` **Backward compatibility**: Group-based mapping is active whenever at least one `roleMappings` list is non-empty or an admin has set a mapping override @@ -1065,7 +1066,7 @@ and roll out the new agent before relying on per-server readings. ### What upgrades are tested -CI runs an end-to-end upgrade on every PR (`e2e upgrade`, on both amd64 and +CI runs an end-to-end upgrade on PRs whose changes select the upgrade suite (`e2e upgrade`, on both amd64 and arm64): it installs the **previous release's published chart and published GHCR images** into a fresh cluster, seeds a running GameServer with data on its PVC and an admin user in the database, then upgrades to the chart under diff --git a/docs/layout.md b/docs/layout.md index b49acd8d6..76d07abed 100644 --- a/docs/layout.md +++ b/docs/layout.md @@ -92,13 +92,13 @@ makes. | Module | Kind | Target | Gap today | | --- | --- | --- | --- | | `agent` | Service | `cmd/main.go` + `internal//` | matches | -| `api` | Service | `cmd/main.go` + `internal//` | `cmd/` holds 9 non-test files (bootstrap, gateway, health, main, management, memlimit, metrics, panel_key, workers) → keep wiring in `cmd/`, move behavior to `internal//`; second binary `cmd/messages-export/` matches; `internal/handlers/` is one flat package of 163 `.go` files, 52 of them non-test (spec 028 splits it) | +| `api` | Service | `cmd/main.go` + `internal//` | `cmd/` holds 9 non-test files (bootstrap, gateway, health, main, management, memlimit, metrics, panel_key, workers) → keep wiring in `cmd/`, move behavior to `internal//`; second binary `cmd/messages-export/` matches; `internal/handlers/` is one flat package of 216 `.go` files, 64 of them non-test (spec 028 splits it) | | `audit-syslog-bridge` | Service | `cmd/main.go` + `internal//` | 3 files in root `package main` (`main.go` 460 lines) → `cmd/main.go` + `internal//`. Lives in the `GameplanePanel/audit-syslog-bridge` submodule. | | `capture-sidecar` | Service | `cmd/main.go` + `internal//` | matches. Lives in the `GameplanePanel/capture-sidecar` submodule. | | `mcp-server` | Service | `cmd/main.go` + `internal//` | root `package main` (`main.go`, `tools.go`, `fixadvice.go`) → `cmd/main.go` + `internal//`; `internal/kube/` matches. Lives in the `GameplanePanel/mcp` submodule; the layout is tracked there. | -| `operator` | Service | `cmd/main.go` + `internal//` | matches; `internal/controller/` is one flat package of 227 `.go` files, 66 of them non-test (spec 028 splits it); `api/v1alpha1/` see §3 | +| `operator` | Service | `cmd/main.go` + `internal//` | matches; `internal/controller/` is one flat package of 258 `.go` files, 73 of them non-test (spec 028 splits it); `api/v1alpha1/` see §3 | | `sentinel` | Service | `cmd/main.go` + `internal//` | `main.go` 1,068 lines at root → `cmd/main.go` + `internal//` | -| `telemetry-receiver` | Service | `cmd/main.go` + `internal//` | 12 source files in root `package main` → `cmd/main.go` + `internal//`; `web/` and `design-export/` assets stay | +| `telemetry-receiver` | Service | `cmd/main.go` + `internal//` | 14 source files in root `package main` → `cmd/main.go` + `internal//`; `web/` and `design-export/` assets stay | | `tunnel` | Service | `cmd/main.go` + `internal//` | `main.go` 619 and `playit_reporter.go` 525 lines at root → `cmd/main.go` + `internal//`; `frpc/` (separate build module, not in `go.work`) stays. Lives in the `GameplanePanel/tunnel` submodule. | | `gp-module` | CLI tool | `cmd/gp-module/` + `internal//` | matches; `pkg/` holds the 5 packages `api` and `test/e2e` import | | `i18n` | Library + CLI | flat root package + `cmd/i18n-check/` | matches (see §3) | diff --git a/docs/standalone-panel.md b/docs/standalone-panel.md index fc87beac0..1e410cc8e 100644 --- a/docs/standalone-panel.md +++ b/docs/standalone-panel.md @@ -269,8 +269,8 @@ helm --kubeconfig remote-admin.yaml upgrade --install gameplane charts/gameplane --set image.registry= --set image.tag= ``` -The remote install keeps `operator.enabled=true`, so Helm installs the bundled -CRDs through its native installation phase. The operator creates agents alongside +The remote install keeps `operator.enabled=true`, so the chart's `crds.autoApply` +pre-install hook Job applies the Gameplane CRDs. The operator creates agents alongside game servers. Enable the optional [private gateway](gateway-install.md) for agent operations such as console, files, and player management. Without a gateway, Kubernetes resource operations diff --git a/docs/telemetry-provider.md b/docs/telemetry-provider.md index ac29e7bdd..a08e0504c 100644 --- a/docs/telemetry-provider.md +++ b/docs/telemetry-provider.md @@ -17,7 +17,7 @@ project's data-handling statement is at | Listener | Variable (default) | Serves | Exposure | |---|---|---|---| -| Public | `LISTEN_ADDR` (`:8080`) | `POST /ingest`, `GET /v1/summary` (only when `PUBLIC_SUMMARY=true`), `GET /v1/challenge` (only when `INGEST_POW=true`), `GET /healthz` | Public internet, behind TLS | +| Public | `LISTEN_ADDR` (`:8080`) | `POST /ingest`, `GET /v1/summary` (only when `PUBLIC_SUMMARY=true`), `GET /v1/challenge` (when `INGEST_POW=true`, or while a new-install claim is pending for the source), `GET /healthz` | Public internet, behind TLS | | Dashboard | `DASHBOARD_LISTEN_ADDR` (`:8081`) | login page, dashboard, `/api/v1/views`, `/metrics`, static assets | Private network only | The dashboard listener starts only when `DASHBOARD_TOKEN` is set. The @@ -654,7 +654,7 @@ a Bearer token. Existing series keep their names; new ones: `summary`, `challenge`), `gameplane_telemetry_extended_reports_total`, `gameplane_telemetry_refused_total{reason}` (`bad_signature`, `stale`, -`id_claimed`, `replay`, `pow_required`, `pow_invalid`, `pow_busy`), +`id_claimed`, `replay`, `pow_required`, `pow_invalid`, `pow_busy`, `pow_claim`), `gameplane_telemetry_pow_challenges_total` and the gauge `gameplane_telemetry_pow_bits`. The two proof-of-work series are always exported; `pow_bits` is `0` while `INGEST_POW` is off. diff --git a/docs/tunnels.md b/docs/tunnels.md index 719cf4ac7..2bfc6d186 100644 --- a/docs/tunnels.md +++ b/docs/tunnels.md @@ -289,6 +289,7 @@ spec: provider: playit credentialsSecretRef: name: minecraft-playit-tunnel-auth + playit: {} ``` The `credentialsSecretRef.name` is the name that the dashboard or API write after you provide the credential. @@ -468,8 +469,10 @@ If you want to avoid reconnects on wake, consider: provider-specific relay ports: - **frp:** the frp server's `ServerAddr:ServerPort` (default TCP 7000). - **tailscale:** the control plane on TCP 443 and DERP relays on UDP 41641. - - **playit:** an unrestricted egress rule (all ports, all protocols, any - destination), in addition to the DNS/advertised-ports rule every + - **playit:** an egress rule for all ports and protocols, limited to public + addresses (private and link-local ranges stay closed through + `networkPolicies.tunnelEgress.exceptCIDRs`), in addition to the + DNS/advertised-ports rule every provider gets. playit does not publish a fixed set of relay endpoints or ports, so a per-port allow list can't be expressed the way it can for frp and tailscale. diff --git a/gp-module/specs.md b/gp-module/specs.md index 21a1b555f..ef3d675e4 100644 --- a/gp-module/specs.md +++ b/gp-module/specs.md @@ -74,6 +74,7 @@ gp-module/ │ ├── preview/ │ │ ├── preview.go # Manifest simulator and env merger │ │ ├── memory.go # autoFromMemoryLimit calculator +│ │ ├── security.go # Security preview: resolved defaults, ownership policy, risky settings │ │ └── preview_test.go # Preview unit tests │ └── packager/ │ ├── packager.go # OCI bundle packager, size checker and locale layers diff --git a/operator/specs.md b/operator/specs.md index 5c6a32814..007c7ce8c 100644 --- a/operator/specs.md +++ b/operator/specs.md @@ -882,7 +882,7 @@ Forgetting codegen leaves the YAML out of sync with types — CI's `make manifes | k8s.io/api | v0.37.2 | Kubernetes core types (Pod, StatefulSet, Service, Job, etc.). | | k8s.io/apimachinery | v0.37.2 | Kubernetes API machinery (metav1, runtime.Scheme, etc.). | | k8s.io/client-go | v0.37.2 | Kubernetes client (for exec, logs, discovery). | -| sigs.k8s.io/controller-runtime | v0.25.2 | Reconciler framework (Manager, Builder, Reconciler interface). | +| sigs.k8s.io/controller-runtime | v0.25.3 | Reconciler framework (Manager, Builder, Reconciler interface). | | github.com/GameplanePanel/gameplane/netguard | local | SSRF dial guard (permissive policy for module fetches from private registries). | | github.com/go-git/go-git/v5 | v5.19.3 | Git operations (clone, fetch) for ModuleSources. | | github.com/go-git/go-billy/v5 | v5.9.2 | VCS filesystem abstraction for go-git. | diff --git a/telemetry-receiver/README.md b/telemetry-receiver/README.md index 4f9ebcf2d..975d096a2 100644 --- a/telemetry-receiver/README.md +++ b/telemetry-receiver/README.md @@ -29,7 +29,7 @@ project's default receiver, which the maintainers operate. | Listener | Variable (default) | Serves | |---|---|---| -| Public | `LISTEN_ADDR` (`:8080`) | `POST /ingest`, `GET /v1/summary` (only when `PUBLIC_SUMMARY=true`), `GET /v1/challenge` (only when `INGEST_POW=true`), `GET /healthz` | +| Public | `LISTEN_ADDR` (`:8080`) | `POST /ingest`, `GET /v1/summary` (only when `PUBLIC_SUMMARY=true`), `GET /v1/challenge` (when `INGEST_POW=true`, or while a new-install claim is pending for the source), `GET /healthz` | | Dashboard | `DASHBOARD_LISTEN_ADDR` (`:8081`) | login page, dashboard, `/api/v1/views`, `/metrics`, static assets | The dashboard listener starts only when `DASHBOARD_TOKEN` is set. Keep it @@ -40,9 +40,9 @@ everything else. | Route | Method | Response | |---|---|---| -| `/ingest` | POST | `204` accepted (also a same-day duplicate) · `400` malformed or invalid · `401` bad or missing token (when `AUTH_TOKEN` is set) · `403` `bad_signature`, `stale` or `replay` · `409` `id_claimed` · `413` body over 16 KiB · `428` `pow_required` or `pow_invalid` · `429` per-source daily limit · `503` `pow_busy` | +| `/ingest` | POST | `204` accepted (also a same-day duplicate) · `400` malformed or invalid · `401` bad or missing token (when `AUTH_TOKEN` is set) · `403` `bad_signature`, `stale` or `replay` · `409` `id_claimed` · `413` body over 16 KiB · `428` `pow_required`, `pow_invalid` or `pow_claim` · `429` per-source daily limit · `503` `pow_busy` | | `/v1/summary` | GET | `200` five headline counts · `404` unless `PUBLIC_SUMMARY=true` · `429` rate limit | -| `/v1/challenge` | GET | `200` a proof-of-work challenge · `404` unless `INGEST_POW=true` · `429` rate limit | +| `/v1/challenge` | GET | `200` a proof-of-work challenge · `404` unless `INGEST_POW=true` or a new-install claim is pending for the source · `429` rate limit | | `/healthz` | GET | `200 ok` | Extended reports must carry a valid `Gameplane-Telemetry-Signature`. The @@ -100,7 +100,7 @@ gameplane_telemetry_templates # histogram of GameTemplate gameplane_telemetry_duplicates_total # same-day repeat extended reports gameplane_telemetry_extended_reports_total # extended reports counted gameplane_telemetry_rate_limited_total{route} # ingest, login, summary, challenge -gameplane_telemetry_refused_total{reason} # bad_signature, stale, id_claimed, replay, pow_required, pow_invalid, pow_busy +gameplane_telemetry_refused_total{reason} # bad_signature, stale, id_claimed, replay, pow_required, pow_invalid, pow_busy, pow_claim gameplane_telemetry_pow_challenges_total # proof-of-work challenges issued gameplane_telemetry_pow_bits # difficulty a challenge issued now would carry ``` diff --git a/telemetry-receiver/specs.md b/telemetry-receiver/specs.md index 54c1790d1..5fc4c914d 100644 --- a/telemetry-receiver/specs.md +++ b/telemetry-receiver/specs.md @@ -39,11 +39,14 @@ telemetry-receiver/ ├── main.go # config (loadConfig, validate), server wiring, both listeners, graceful shutdown ├── ingest.go # POST /ingest: auth, proof-of-work gate, body read, basic reports ├── ingest_ext.go # extended reports: signature, window, claim, replay, activity records +├── claim.go # new-install proof-of-work claims (pow_claim) and their source marks ├── pow.go # proof-of-work: challenges, difficulty, verification, GET /v1/challenge ├── store.go # SQLite schema, meta, write transactions, retention and lifecycle job ├── ratelimit.go # per-source limiters, source-address derivation ├── summary.go # GET /v1/summary and its snapshot cache ├── dashboard.go # dashboard listener: login, sessions, views JSON, metrics, static files +├── versionlabel.go # version label budget (at most 128 labels, bounded pending set) +├── versionorder.go # semver ordering of version changes between reports ├── views.go # dashboard view model (BuildViews) ├── charts.go, charts_ext.go # inline SVG chart rendering ├── web/ # embedded HTML templates and static CSS/icon @@ -66,7 +69,7 @@ The full contract is `specs/done_022-default-telemetry-dashboard/contracts/recei |-------|--------|------------------|----------| | `/ingest` | POST | `204 No Content` (also for a same-day duplicate extended report, which only counts in `duplicates`) | `400` structural error; `401` missing/wrong Authorization (when `AUTH_TOKEN` set); `403` `bad_signature`, `stale` or `replay`; `409` `id_claimed`; `413` body >16 KiB; `428` `pow_required`, `pow_invalid` or `pow_claim`; `429` per-source request budget or daily limit; `503` `pow_busy` with `Retry-After: 60` | | `/v1/summary` | GET | `200` JSON with exactly `asOf`, `reportsLatestDay`, `reports30d`, `reportsTotal`, `activeInstalls30d` | `404` unless `PUBLIC_SUMMARY=true`; `429` per-source rate limit | -| `/v1/challenge` | GET | `200` JSON `{challenge, bits, expiresAt}`, `Cache-Control: no-store` | `404` unless `INGEST_POW=true`; `429` (10 per minute, burst 5 per source) | +| `/v1/challenge` | GET | `200` JSON `{challenge, bits, expiresAt}`, `Cache-Control: no-store` | `404` unless `INGEST_POW=true` or a new-install claim is pending for the source; `429` (10 per minute, burst 5 per source) | | `/healthz` | GET | `200 OK`, body `"ok"` | Never errors | `/ingest` runs its checks in this order: per-source request budget (`429` with `Retry-After: 60`), `AUTH_TOKEN`, proof-of-work, body read, decode, extended identity checks, new-install proof-of-work (`pow_claim`), per-source daily limit, store. A refused report changes no stored data. Every other path, including `/metrics`, answers `404`. @@ -127,7 +130,7 @@ gameplane_telemetry_templates_bucket{le="…"} # histogram (same buck gameplane_telemetry_duplicates_total # same-day repeat extended reports gameplane_telemetry_extended_reports_total # extended reports counted in the aggregates gameplane_telemetry_rate_limited_total{route} # route: ingest, login, summary, challenge -gameplane_telemetry_refused_total{reason} # bad_signature, stale, id_claimed, replay, pow_required, pow_invalid, pow_busy +gameplane_telemetry_refused_total{reason} # bad_signature, stale, id_claimed, replay, pow_required, pow_invalid, pow_busy, pow_claim gameplane_telemetry_pow_challenges_total # challenges issued gameplane_telemetry_pow_bits # gauge: difficulty a challenge issued now would carry (0 when proof-of-work is off) ``` diff --git a/web/specs.md b/web/specs.md index d377525b5..2fa3d8211 100644 --- a/web/specs.md +++ b/web/specs.md @@ -422,11 +422,11 @@ CloneServerDialog, TransferServerDialog and WipeServerDialog do not route throug ### Modpacks tab (spec 035, planned) -Status: the API and CRD side has landed; the web work (specs/035-curseforge-modpacks tasks, not yet implemented) has not. Contracts: `specs/035-curseforge-modpacks/contracts/ui-modpacks-tab.md` and `api-modpack.md`; designs are in `design.pen`. +Status: the API and CRD side has landed, and the first web surfaces exist: `web/src/components/modpack-active-card.tsx`, `modpack-confirm-dialog.tsx`, `modpack-missing-files.tsx` and `modpack-version-picker.tsx`, all used by `web/src/routes/tabs/Modpacks.tsx`. Contracts: `specs/035-curseforge-modpacks/contracts/ui-modpacks-tab.md` and `api-modpack.md`; designs are in `design.fig`. - **Types and client (planned):** `web/src/types.ts` gains `ModpackDecl` fields `versionEnv`, `apiKeyEnv`, `needsKeyImageTags`, `missingFilesPath`, `adoptVersionFile`, the provider fields `modpacksOnly` and `ftb`, and the `GET /servers/{name}/modpack` view (`active`, `phase`, `message`, `backupName`, `keyShared`, `missingFiles`, `missingFilesUnknown`, `downloadsPath`, `backupAvailable`). `Servers.installModpack` moves from `{ ref }` to `{ provider, project, version, title, versionName, backupFirst }`; new `Servers.modpack`, `Servers.removeModpack(name, backupFirst)` and an admin `Registries.curseforgeShare` get/put. The install call returns 202; the tab polls the GET view until `phase` is `Applied`. - **Surfaces (planned):** registry switch (Modrinth, CurseForge, FTB; CurseForge hidden when `modpacksBlockedReason` is set); version picker for the server's Minecraft version and loader with newest preselected and release/beta badges; confirmation dialog with "Back up first" and a downgrade warning; Active modpack card (title, registry, version or "Not pinned", phase, Change version, Remove, "Retry remove" after a failed removal backup); missing-files notice with links and the `downloads/` upload instructions, or a start-the-server note when `missingFilesUnknown`; admin Mod registries "Share the CurseForge key with game servers" switch, disabled with a reason when only the startup flag supplies the key. -- Mods tab hides providers with `modsBrowse=false`. Until these land, the existing Modpacks tab (`Modpacks.tsx`) is unchanged. +- Mods tab hides providers with `modsBrowse=false`. The Modpacks tab (`Modpacks.tsx`) already uses the active card, version picker, confirmation dialog and missing-files notice. ### Settings Sub-Sections (T101–T111) @@ -1032,13 +1032,13 @@ Visible tab set depends on server template + active version: 1. **Overview** — GameServer status, phase, uptime, restart count; live metrics from RCON (if available); recent pod events 2. **Events** — Kubernetes events: image pulls, scheduling, crash-loop, agent startup 3. **Console** — Interactive RCON/WebSocket terminal (hidden if template has no console, or consoleMode=none) -4. **Logs** — Live pod stdout OR configured game log file (agent-provided via mTLS; see gameplane.local/logPath annotation) +4. **Logs** — Live pod stdout OR configured game log file (agent-provided via mTLS; the path comes from the GameTemplate `spec.logPath` field) 5. **Files** — Browser and editor for server data files (config, save games, logs) 6. **Mods** — List/install/remove mods; browse by registry provider (Modrinth, CurseForge, etc.) if template declares one 7. **Modpacks** — Install modpacks (only if template + active version supports loader with modpack capability) 8. **Players** — Online player snapshot, configured operator identities, ban list, whitelist, kick/ban/unban actions 9. **Backups** — Per-server backup list, schedule management, restore trigger; reads backup repository URL from Secret `key: "repo"` -10. **Capture** — a `CaptureWidget` component driving start/stop of packet captures and a table of past captures for this server, gated on the `captures:manage` permission. Sits between the Backups and Settings tabs per `assets/design-export/json` node `O08uaD`/`b4eaUf` (start-capture modal) and `m5kOm4` (capture list). `CaptureWidget.tsx` with `Captures` client namespace (`web/src/lib/api.ts:207-261`) and router/tab wiring (`web/src/routes/ServerDetail.tsx:387`) are implemented in `web/src`. +10. **Capture** — a `CaptureWidget` component driving start/stop of packet captures and a table of past captures for this server, gated on the `captures:manage` permission. Sits between the Backups and Settings tabs per `assets/design-export/json` node `O08uaD`/`b4eaUf` (start-capture modal) and `m5kOm4` (capture list). `CaptureWidget.tsx` with `Captures` client namespace (`web/src/lib/api.ts:207-261`) and router/tab wiring (`web/src/routes/ServerDetail.tsx:392`) are implemented in `web/src`. 11. **Settings** — Grouped form with sub-sections (below); changes are draft-until-save; conflict detection on reload On narrow screens, server actions wrap and the detail tab strip scrolls inside its navigation container. Selecting a tab keeps that tab visible without horizontally scrolling the page or moving the panel controls off-screen. @@ -1278,12 +1278,12 @@ openEventStream(opts: EventStreamOptions) - `react@19.3.1` — React library - `react-dom@19.3.1` — DOM renderer - `@tanstack/react-router@1.170.46` — file-based routing (via tree.tsx) -- `@tanstack/react-query@5.107.1` — data fetching, caching, invalidation +- `@tanstack/react-query@5.108.1` — data fetching, caching, invalidation - `@tanstack/react-virtual@3.14.26` — virtualized lists for large tables - `@heroui/react@3.2.7` — component library (Button, Card, Modal, Table, Tabs, etc.); underlies every atom in `web/src/components/ui/` - `@heroui/styles` — HeroUI's semantic token / theme layer, mapped to Gameplane brand tokens (see `specs/done_014-heroui-web-rebuild/contracts/theme-tokens.md`) - `clsx@2.1.1` — conditional classNames -- `tailwind-merge@3.7.0` — Tailwind class conflict resolution +- `tailwind-merge@3.7.1` — Tailwind class conflict resolution - `tailwindcss@^4.3.3` — utility-first CSS framework - `lucide-react@^1.73.0` — SVG icon library - `@monaco-editor/react@^4.7.0` — code editor (lazy-loaded, file/config edit tabs) @@ -1295,10 +1295,10 @@ openEventStream(opts: EventStreamOptions) - `vite@^8.3.8` — build + dev server - `@vitejs/plugin-react@^6.3.0` — React JSX transform + fast refresh - `vitest@^5.0.0` — unit test runner (Jest-like API, Vite-integrated) -- `@vitest/coverage-v8@5.1.0` — V8 coverage reporter +- `@vitest/coverage-v8@5.1.1` — V8 coverage reporter - `@testing-library/react@16.3.3` — component test utilities -- `@testing-library/jest-dom@7.0.1` — DOM matchers -- `@testing-library/user-event@14.6.10` — user interaction simulation +- `@testing-library/jest-dom@8.0.0` — DOM matchers +- `@testing-library/user-event@14.6.13` — user interaction simulation - `msw@^3.0.5` — Mock Service Worker for request interception (e2e mock mode) - `vitest-websocket-mock@0.8.0` — WebSocket mock for unit tests - `@playwright/test@^1.65.0` — browser e2e testing (mock + live modes) @@ -1307,7 +1307,7 @@ openEventStream(opts: EventStreamOptions) - `eslint-plugin-react-hooks@7.1.1` — React Hooks and compiler diagnostics - `oxlint` and `oxlint-tsgolint` — React rules and type-aware TypeScript linting - `tailwindcss@^4.3.3` + `postcss@^8.5.32` + `autoprefixer@^10.6.2` — CSS processing -- `@tanstack/router-devtools@1.167.3` — TanStack Router dev tools (optional, for debugging) +- `@tanstack/router-devtools@1.167.4` — TanStack Router dev tools (optional, for debugging) ## Security considerations