@karmanflow/agent-dockAgentDock
Shell-level context + ask surfaceMounts in the app shell. Reads the current route, selected entity IDs, active filters, and recent receipt IDs from AgentContextProvider, then resolves them into a ContextPack via the backend. Three tabs: Context (what the agent sees), Ask (SSE stream to /api/agent/ask), and Tools (context-advertised read tools). Raw model output never dispatches commands from the dock.
Key exportsAgentDock, AgentContextProvider, useAgentContext
@karmanflow/action-railActionRail
Module-level proposal railOne rail per module page. Reads from the shared AgentContextProvider installed by the dock. Renders ProgressiveActionCards from incoming agent recommendations. Policy filters proposals before they reach the rail; operators only see cards at or below their current risk-class ceiling.
Key exportsActionRail
@karmanflow/progressive-action-cardProgressiveActionCard
Propose → preview → approve → execute lifecycleThe transactional primitive. Walks propose, preview, approve, execute with explicit decline and cancel off-ramps. Local state machine stays in sync with the backend progressive_actions.status via caller-supplied handlers. ModuleProgressiveRail wraps the boilerplate: 1 import + 1 JSX line + 1 agentSurface export is the full module wiring.
Key exportsProgressiveActionCard, ModuleProgressiveRail, createProgressiveActionHandlers
@karmanflow/evidence-drawerEvidenceDrawer
Audit trail for every recommendationAttached to any ProgressiveActionCard. Shows source records, freshness and stream cursor, recent command receipts, recent domain events, relevant policy decisions, model and profile used, prompt template version, and context pack hash. Makes every recommendation reproducible and defensible.
Key exportsEvidenceDrawer
@karmanflow/context-pack-builderContextPackBuilder
UI state → bounded agent contextTurns the current UI state (route, entity IDs, filters, metric cards, active receipts) into a signed ContextPack the agent runtime can consume. Runs server-side; the pack is never user-constructable. Freshness is bounded by the stream cursor in the pack.
Key exportsbuildContextPack, ContextPack
@karmanflow/capability-resolverCapabilityResolver
UI state → available actionsGiven the current actor, module, and entity selection, resolves which commands are available at what risk class. The ActionRail and ProgressiveActionCard use this to filter proposals before rendering; the AgentDock uses it to populate the Tools tab. Registry-backed; every FeatureModule contributes its capability slots.
Key exportsresolveCapabilities, CapabilitySlot