diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md index 8c1616a52..08d5c8310 100644 --- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md +++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md @@ -1102,6 +1102,14 @@ the same lock-against-remediation flag that the action broker enforces downstream — no possible drift between "what Patrol proposes" and "what the broker accepts." +The same router wiring owns the alert-bridge patrol-trigger callback. It now +receives the full alert payload as a struct and consults the operator's +per-rule trigger policy before queuing a scoped patrol: an `alert_fired` event +that fails `AIConfig.AlertTriggersInvestigation` (below the minimum-severity +floor or outside the alert-type allowlist) is logged and dropped without +entering the trigger manager, so alert-driven investigation lifecycle stays +bounded to the alerts the operator opted into. + `/api/agent/events` is the SSE stream agents subscribe to for real-time notifications: `finding.created` when a new finding is raised, `approval.pending` when a remediation request enters diff --git a/docs/release-control/v6/internal/subsystems/ai-runtime.md b/docs/release-control/v6/internal/subsystems/ai-runtime.md index c83d42cd5..b68208246 100644 --- a/docs/release-control/v6/internal/subsystems/ai-runtime.md +++ b/docs/release-control/v6/internal/subsystems/ai-runtime.md @@ -698,6 +698,21 @@ default estate surface. The user-facing Machines label is an app-shell presentation label for the existing `standalone` route/id and must not create a separate AI handoff or prompt namespace. +Alert-triggered scoped patrols now investigate the specific breach rather than +running a broad health check. The alert bridge (`internal/ai/unified/bridge.go`, +`internal/ai/unified/setup.go`) carries the firing alert's real payload — type, +level, value, threshold, resource identifier, and message — into +`PatrolScope.AlertContext`, and `internal/ai/patrol_ai.go` / +`internal/ai/patrol_triggers.go` frame the `alert_fired` run around that breach +instead of suppressing threshold context. Whether an alert triggers a patrol at +all is the operator's per-rule policy: `AIConfig.AlertTriggersInvestigation` +(`internal/config/ai.go`) enforces the master enable, a minimum-severity floor +(`patrol_alert_trigger_min_severity`, default critical-only), and an optional +alert-type allowlist (`patrol_alert_trigger_types`, empty = all types). The +router-side bridge wiring consults that policy and skips queuing the scoped +patrol when the alert does not qualify; an unknown alert level is treated as +critical so it is never silently dropped. + The route-backed Proxmox platform tab is app-shell navigation only. Adding the tab through `frontend-modern/src/App.tsx` and `frontend-modern/src/AppLayout.tsx` must not fork Assistant or Patrol shell diff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.md index ba809c742..f8e4fc3f0 100644 --- a/docs/release-control/v6/internal/subsystems/api-contracts.md +++ b/docs/release-control/v6/internal/subsystems/api-contracts.md @@ -1645,6 +1645,14 @@ Proxmox host rows with workload I/O columns. These fields are a read-model extension over existing resource telemetry; they must remain optional until the backend transport contract explicitly guarantees them for every node source, and consumers must tolerate absence without inventing a second API shape. +The AI settings contract (`internal/api/ai_handlers.go`) now carries the +per-rule alert-trigger policy for scoped patrols. The response always projects +`patrol_alert_trigger_min_severity` (`warning` | `critical`, normalized from the +critical-only default) and a non-nil `patrol_alert_trigger_types` allowlist +(empty = all types). The update request accepts both as optional pointer fields; +the handler rejects any `patrol_alert_trigger_min_severity` other than `warning` +or `critical` with `400`, and lowercases, trims, drops blanks, and de-duplicates +the types allowlist before persistence so the stored shape is canonical. The shared metrics-history API also treats `metric=temperature` as a canonical agent/node chart metric for Proxmox node drawers. `resourceType=agent` may serve the current host-agent CPU package temperature as a live fallback when persisted diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md index bf5d0f2eb..0634b4799 100644 --- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md +++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md @@ -1447,6 +1447,12 @@ provider-specific controls from `aiSettingsModel.ts` `extraFields`, including Ollama `keep_alive`, so Assistant and Patrol keep one settings shape across labeling, help affordances, helper copy, and persistence binding. +The Patrol alert-trigger severity selector under +`frontend-modern/src/features/patrol/` is built on the shared `FormSelect` +primitive (label-for/id wiring, `selectBaseClass` styling hook) rather than a +hand-rolled `