Depute Logo

Policy Banner

Sandbox / production / staging environment policy indicator.

Install

npx ax-depute@latest add policy-banner
pnpm dlx ax-depute@latest add policy-banner
yarn dlx ax-depute@latest add policy-banner
bunx ax-depute@latest add policy-banner

Overview

Policy Banner is a persistent boundary indicator. It visually anchors the agent's current operating policy, ensuring the human operator strictly understands whether they are supervising a simulation, navigating staging environments, or engaging in a live fire production exercise.

Dry Run ModeAgent actions will be simulated and logged, but no external APIs will be mutated.
NetworkMocked Responses
DatabaseRead-only connection
Current operating policy: Dry Run Mode. Severity: info. Constraints: Network: Mocked Responses, Database: Read-only connection.
Interactive StorybookView all states, toggle props, and test edge cases.

Basic Usage

<PolicyBanner
  mode="simulation"
  policyName="Dry Run Mode"
  description="Agent actions will be simulated and logged, but no external APIs will be mutated."
  constraints={[
    { label: 'Network', value: 'Mocked Responses' },
    { label: 'Database', value: 'Read-only connection', isViolated: false },
  ]}
/>

Solution Patterns

Render PolicyBanner at the top of the supervision viewport. Using mode="production" automatically activates a heavy-duty, pulsing visual treatment designed to cut through "banner blindness" when navigating live, high-risk systems.

Props

PropTypeDefaultDescription
modePolicyModeE.g., 'sandbox', 'production', 'simulation'
labelstringOptional override for mode name
descriptionstringShort policy description
severity'info' | 'warning' | 'critical'autoVisual treatment level
constraintsPolicyConstraint[]Active policy constraints
showLiveIndicatorbooleanfalseShow pulsing dot for live modes
collapsiblebooleanfalseAllow banner to collapse

Design rationale

Why a persistent banner? Agent oversight interfaces look identical whether running on test data or production servers. A persistent banner prevents operator error by anchoring the environment context at the top of the supervision viewport.

On this page