Watch
1
0
Fork
You've already forked RedFlag
0
RedFlag/server
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Fimeg 76ef5ae0e3 feat: auto-heartbeat at dispatch, event narratives, policy table (migration 038)
Three structural pieces that only make sense as a unit: the dispatch
chokepoint queries the policy table, and the event renderer is consumed by
the same handlers the policy gates guard.

B. Auto-heartbeat at the dispatch chokepoint (agents.go, models/command.go)
  - models.RequiresRapidPolling(commandType): central classification (no
    per-handler opt-in for rapid-polling commands).
  - signAndCreateCommand auto-queues enable_heartbeat (Source=system)
    ahead of any rapid-polling command, unless the agent is already in an
    active heartbeat window.
  - TimeoutService.reconcileAgentUpdates: effectiveUpdateTimeout() reads
    operational.update_stuck_minutes live (no restart needed).

C. Event renderer (services/event_renderer.go NEW)
  - RenderSystemEvent / RenderUpdateLog: single source of operator-facing
    verbiage.
  - Narrative field on SystemEvent / UpdateLog / UnifiedHistoryItem
    (JSON-only, not persisted). Populated in agent_events.go GetAgentEvents
    and updates.go GetAllLogs.
  - ChatTimeline.tsx consults narrative only at the prior fallback line —
    real stdout / package extraction branches untouched.

D. Policy table (migration 038 + security_settings_service helpers)
  - policy.allow_dry_runs (default true): updates.go::InstallUpdate
    returns 403 when false.
  - policy.require_nonce (default true): agent_updates.go::UpdateAgent
    skips nonce validation when false (logged at INFO).
  - policy.auto_heartbeat_enabled (default true): agents.go gates the
    auto-heartbeat side-effect.
  - operational.update_stuck_minutes (default 5): TimeoutService reads
    live for reconcile threshold.
  - GetPolicyBool / GetOperationalInt on SecuritySettingsService.

Forward-only (no policy.allow_downgrade) is ETHOS §2 doctrine, not a knob.
2026-05-25 14:12:23 -04:00
..
cmd/server feat: auto-heartbeat at dispatch, event narratives, policy table (migration 038) 2026-05-25 14:12:23 -04:00
internal feat: auto-heartbeat at dispatch, event narratives, policy table (migration 038) 2026-05-25 14:12:23 -04:00
.env.example refactor: rename aggregator-agent to agent for public release 2026-05-21 13:19:18 -04:00
docker-entrypoint.sh refactor: rename aggregator-agent to agent for public release 2026-05-21 13:19:18 -04:00
Dockerfile fix: bump agent-builder stage to golang:1.25-alpine 2026-05-24 20:11:41 -04:00
go.mod fix(VULN-001): bump x/crypto to v0.52.0, x/net; npm audit fix; golang 1.25 2026-05-24 20:07:53 -04:00
go.sum fix(VULN-001): bump x/crypto to v0.52.0, x/net; npm audit fix; golang 1.25 2026-05-24 20:07:53 -04:00