Files
Heimdall/skills/signalr-documentation/SKILL.md
T
arnaud.dartois cd8536ac65
Heimdall Gitea / Detect CI scope (push) Successful in 5s
Heimdall Gitea / Build and tests (push) Skipped
Heimdall Gitea / Build and scan server image (push) Skipped
Heimdall Gitea / Build and scan agent image (push) Skipped
Heimdall Gitea / Build and scan NVIDIA Agent image (push) Skipped
Heimdall Gitea / Publish versioned installer release (push) Skipped
Heimdall Gitea / CI policy (push) Successful in 1s
docs: align master spec with shipped live view (#364)
Co-authored-by: Arnaud Dartois <admin@tordais.cc>
2026-11-13 10:19:14 +01:00

3.3 KiB

name, description
name description
signalr-documentation Keep the Heimdall SignalR guide aligned with mapped routes, Hub RPC methods, broadcast events, authentication and resource authorization.

Heimdall SignalR documentation workflow

Use this skill when changing a hub, SignalR authentication, subscription handling, broadcast contract or docs/signalr-usage.md.

Source of truth

  • Routes are mapped in src/Heimdall.Web/Program.cs beside the MapHub<T> calls.
  • Client-invokable Hub methods belong inside the concrete Hub subclass. Nearby *BroadcastService methods are server-side application services and must not be documented as client RPC methods.
  • Server-to-client event names and payload arguments are the SendAsync calls in the corresponding broadcast service.
  • Authentication schemes and token extraction come from each Hub's [Authorize] attribute, ConfigureJwtBearerAuthentication in Program.cs, and ApiKeyAuthenticationHandler.ResolveApiKeyFromRequest.
  • Resource-level subscriptions and reauthorization are implemented by the Hub methods, ResourceAccess, and LiveSubscriptions.AuthorizedAsync.
  • Actual clients are src/Heimdall.Agent/Services/ConfigReceiverService.cs and src/Heimdall.Web/Services/NotificationsHubClient.cs.
  • Hub authorization/isolation tests are under tests/Heimdall.Web.Tests/Hubs/.

Update procedure

  1. Read the route map and inspect the full Hub subclass before listing its public methods.
  2. Record separately: auth scheme, caller join/leave methods, site/camera/Agent checks, group/channel key, broadcast messages, and payload shape.
  3. Follow every broadcast message to the actual SendAsync call; omit planned or legacy messages that are not sent by current code.
  4. Check whether recipients are filtered at subscribe time, reauthorized at send time, or both. Never describe a global group as unrestricted when a current access check exists.
  5. Inspect the real clients for token providers, initial API loads, retries/reconnect behavior and fallback. Do not expose token values or imply browser cookie auth where the Hub requires JWT.
  6. Confirm every documented route appears in Program.cs; explicitly label absent routes as planned/unmapped rather than available.
  7. Link the focused tests and distinguish unit/CI evidence from proxy, network or deployment validation.
  8. Review docs/signalr-usage.md for unsupported event names, copied pseudocode, stale security claims, and missing limits on delivery/replay.

When the SignalR or live-view summary in docs/MASTER_SPECIFICATION.md changes, treat that file's dated architecture sections as historical unless verified against the mapped routes and current media path. Keep the mapped hub list exact, do not describe a planned hub or peer-to-peer media path as shipped, and link readers to docs/signalr-usage.md and docs/docker-compose.md for current contracts and deployment guidance. If retaining superseded material, put a historical-status note immediately before each affected diagram, roadmap phase, UI mockup, or target-results block; a header-only disclaimer is insufficient for those detailed examples.

Do not add runtime behavior in a documentation-only change. If the audit reveals a behavior defect, create a separate Gitea issue before implementation and keep the documentation explicit about the current state.