Files
Pulse/docs/ASSISTANT_SAFETY.md
rcourtman 28172a907b Retire the Assistant chat window; alert Investigate runs Patrol
Pulse Assistant was a chat drawer beside the monitoring UI. Operators who
want to talk to their infrastructure already use Claude Code, Codex, or
another MCP client, and Pulse MCP gives those agents the same governed
tools. Keeping a second, weaker chat in the web app cost a 66 kB chunk,
a launcher on every page, hand-off buttons on alerts, findings, approvals
and drawers, and thousands of lines of OpenCode-parity drawer code, for a
feature the maintainer judged ineffective.

This removes the browser chat and everything that only fed it:

- The drawer, its launcher (desktop and phone), the command-palette
  Assistant commands, the Escape and blocking-dialog shell plumbing, and
  the chat store, client, dev stream fixture and generated SSE types.
- Every "Open in Assistant", "Explain with Assistant", "Discuss" and
  "Ask Assistant" hand-off on alerts, incident timelines, Patrol findings,
  approvals, run history, the attention workbench and resource drawers,
  with their context models and the chat-only helpers they used.
- The Assistant settings page and its session maintenance section. The
  page becomes "External agents" at /settings/pulse-intelligence/agents;
  the old /assistant path, ?tab=assistant and system-ai-assistant redirect
  there with the hash kept.

Alert Investigate now starts a targeted Patrol run (resource, alert ID and
type) and says where the findings land, and it ignores repeat clicks while
the request is in flight. The run route needs an admin with ai:execute, so
security status gains settingsCapabilities.patrolRun, derived from the same
snapshot as the other admin capabilities but following the route for
org-scoped admins, organization-bound tokens and a cookie beside a token,
and Investigate is offered only where it is true. The Patrol
tool transcript block moves to components/patrol. A small aiAvailability
store holds the session assistantEnabled fact that gates Patrol entry
points and Investigate; it now clears and refreshes on organization switch,
refreshes when organization loading settles on another org and after
provider removal, and ignores answers that arrive after a newer one.

The backend chat service stays: Patrol investigations run on it and
Pulse Mobile chat uses it until 31 March 2027, so /api/ai/chat, the
session endpoints and the stream contract are unchanged. A new contract
snapshot pins the steer_applied event that only the deleted TypeScript
projection used to cover.

highlight.js, used only by the chat's code highlighter, leaves the
dependencies, as does the DOMPurify carve-out that kept its fence hints.

Contracts, registry and readiness proofs drop the retired surfaces; the
ai-runtime contract loses about 1,600 lines of drawer rules while keeping
every backend session, stream and provider rule. The production build
ships about 100 kB less gzipped JavaScript.
2026-10-23 00:15:04 +01:00

3.3 KiB

Pulse Assistant safety architecture

Status: the in-app Assistant chat window has been retired. This runtime still runs Patrol investigations, and Pulse Mobile's chat until the app retires on 31 March 2027. External agents reach the same governed tools through pulse-mcp.

Pulse enforces authority at the shared tool and action boundaries. The model owns interpretation, investigation and action judgment within those boundaries. A sequence of tool calls cannot establish that a diagnosis is correct.

Tool kinds

Every tool call uses the shared agentcapabilities classification.

Kind Meaning
resolve Discovery and query tools that find resources
read Read-only tools such as logs, metrics, status and config
write Tools that change Pulse state or infrastructure through governed operations
user_input Interactive tools that ask you something

ClassifyToolCall delegates to the shared classifier. A write classification is not proof that infrastructure executed or that an action succeeded. Canonical planning itself can persist Pulse state without changing a resource.

Enforced authority

Execution profiles and tool permissions limit the capabilities available to a run. The canonical action lifecycle validates the target, capability, parameters, actor and current policy. It persists the action plan and requires the applicable approval before execution. The model cannot grant itself permission by describing a change as safe or by performing an unrelated read first.

Turn, evidence and cost budgets remain explicit bounds. Scheduling, tenant and actor identity, idempotency and execution verification belong to their owning services. They do not infer the quality or completeness of a diagnosis.

Evidence and outcomes

A plan is an intended change. An approval is an authorization decision. An execution receipt reports what the executor did. Independent verification establishes the recorded postcondition through a separate observer at a named time. These facts remain distinct even when one action record links them.

Assistant can read the canonical action record with pulse_query action=action and its exact action_id. The result retains plan context, recorded decisions and ActionResultV2 provenance. Missing records or missing access remain unknown. A cached resource status or absent timeline entry cannot negate an execution receipt. A successful execution alone does not prove that the original problem was resolved.

Model responsibility and limits

The model chooses when to read, ask, plan or conclude within the available capabilities and explicit budgets. Assistant does not require an unrelated read after every write, infer verification from a call sequence, or rewrite saved answers because they contain lifecycle words. Model conclusions can still be wrong. Regression tests, real-model qualification and independent observations are needed to assess useful diagnosis and verified customer outcomes.

The wider Patrol and Assistant redesign remains under qualification. Local fixture results do not establish reliability across customer environments.