KB Record Event
kb_record_eventRecord a durable audit entry when an enforcement gate is bypassed or degraded, preserving client-reported details for compliance and later review.
Instructions
Append a durable, non-destructive audit entry for a client-reported enforcement event. Requires write capability (not a read-only tool).
event_type is gate_bypass (agent proceeded despite a gate block) or gate_degraded (kb_gate_check was unavailable; last-known state used). workspace, agent_identity, source_session are required; reason is optional but recommended for gate_bypass entries.
Use this when an enforce hook bypassed or degraded the gate and the fallback must be recorded. To check gate status use kb_gate_check; to consult use kb_consult; to read back events use kb_audit or kb_compliance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Short reason for the proposed change. | |
| workspace | Yes | Project or workspace key in the KB. | |
| event_type | Yes | Client-reported event type: gate_bypass or gate_degraded. | |
| agent_identity | Yes | Human-readable agent identity for audit events. | |
| source_session | Yes | Stable id of the agent session making the call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||