Skip to main content
Version: v0.12.11

Runtime Governance Profile

The Runtime Governance profile (org.peacprotocol/runtime-governance) provides observer-scope signed records for runtime governance events: policy evaluation decisions, safety check results, compliance gate outcomes, and operating mode transitions. Compatible with Microsoft AGT (Agent Governance Toolkit) and AAIF (Agent AI Interoperability Framework).

Package: @peac/adapter-runtime-governance


Observer scope

Runtime governance records describe what governance systems reported. PEAC does not evaluate policies, run safety checks, or enforce compliance rules. Your runtime governance infrastructure (policy engine, safety classifier, compliance service) owns those decisions. PEAC provides portable, offline-verifiable signed evidence of what those systems reported.


Install

Terminal
pnpm add @peac/adapter-runtime-governance @peac/protocol

Type URIs

6 type URIs are registered under the org.peacprotocol/runtime-governance extension group (Section 27, RTGOV-001..007):

Type URIDescription
org.peacprotocol/runtime-governance-policy-evaluationPolicy was evaluated against an agent action or request
org.peacprotocol/runtime-governance-safety-checkSafety classification was performed
org.peacprotocol/runtime-governance-compliance-gateCompliance gate was evaluated (pass/fail/pending)
org.peacprotocol/runtime-governance-mode-transitionAgent operating mode or boundary was changed
org.peacprotocol/runtime-governance-override-decisionA governance override was issued by an authorized party
org.peacprotocol/runtime-governance-audit-triggerAudit event was triggered by the governance system

Quick start

runtime-governance.ts
import {
buildPolicyEvaluationRecord,
buildSafetyCheckRecord,
buildComplianceGateRecord,
buildModeTransitionRecord,
} from '@peac/adapter-runtime-governance';
import { issue } from '@peac/protocol';

// Record a policy evaluation result
const policyExt = buildPolicyEvaluationRecord({
policy_ref: 'ref:policy/content-safety-v2',
evaluation_result: 'allowed',
subject_ref: 'ref:agent-action/generate-report-001',
evaluated_at: new Date().toISOString(),
});

const jws = await issue({
sub: 'ref:agent-action/generate-report-001',
iss: 'https://governance.example.com',
type: 'org.peacprotocol/runtime-governance-policy-evaluation',
extensions: policyExt,
}, signingKey);
safety-check.ts
// Record a safety check result
const safetyExt = buildSafetyCheckRecord({
check_ref: 'ref:safety-check/output-filter-001',
check_result: 'safe',
classifier_ref: 'ref:classifier/content-shield-v3',
checked_at: new Date().toISOString(),
});

const jws = await issue({
sub: 'ref:output/response-001',
iss: 'https://safety.example.com',
type: 'org.peacprotocol/runtime-governance-safety-check',
extensions: safetyExt,
}, signingKey);

Core fields

Policy Evaluation

FieldRequiredDescription
policy_refYesOpaque reference to the evaluated policy
evaluation_resultYesResult: allowed, denied, escalated, pending
subject_refNoReference to what was evaluated
evaluated_atYesISO 8601 timestamp

Safety Check

FieldRequiredDescription
check_refYesOpaque reference to the safety check run
check_resultYesResult: safe, unsafe, uncertain
classifier_refNoReference to the classifier used
checked_atYesISO 8601 timestamp

Compliance Gate

FieldRequiredDescription
gate_refYesOpaque reference to the compliance gate
gate_resultYesResult: pass, fail, pending, exempt
rule_refsNoArray of opaque references to evaluated rules
evaluated_atYesISO 8601 timestamp

Mode Transition

FieldRequiredDescription
from_modeYesMode being exited
to_modeYesMode being entered
transition_refNoReference to the authorization for this transition
transitioned_atYesISO 8601 timestamp

AGT and AAIF compatibility

Runtime governance records are designed to complement Microsoft AGT-governed agent deployments. When your AGT infrastructure produces governance decisions, issue a PEAC runtime governance record at each decision boundary. The signed record can be verified offline by auditors or downstream systems using only the issuer's public key.

agt-governance-boundary.ts
import { buildPolicyEvaluationRecord } from '@peac/adapter-runtime-governance';
import { issue } from '@peac/protocol';
import { attachA2aCarrier } from '@peac/mappings-a2a';

// AGT evaluated a policy -- record it
const ext = buildPolicyEvaluationRecord({
policy_ref: 'ref:agt-policy/allowed-actions-v1',
evaluation_result: 'allowed',
subject_ref: 'ref:agent-request/tool-call-001',
evaluated_at: new Date().toISOString(),
});

const jws = await issue({
sub: 'ref:agent-request/tool-call-001',
iss: 'https://agt.corp.example.com',
type: 'org.peacprotocol/runtime-governance-policy-evaluation',
extensions: ext,
}, signingKey);

// Optionally attach to the outgoing A2A artifact
const artifact = attachA2aCarrier(a2aArtifact, {
receipt_ref: computeReceiptRef(jws),
receipt_jws: jws,
});

Upstream artifact preservation

Where your governance system produces a native artifact (an AGT decision record, a policy evaluation report, a compliance certificate), preserve a reference to it using an opaque ref rather than embedding the artifact content:

// Correct: reference to upstream artifact
upstream_artifact_ref: 'ref:agt-decision/eval-2026-001'
upstream_artifact_ref: 'sha256:abc123...' // content hash

// Incorrect: embedding the artifact inline
upstream_artifact: { policy: '...', decision: '...' } // not recommended

Non-goals

Runtime governance records do not:

  • Evaluate policies themselves
  • Classify content for safety
  • Enforce compliance rules
  • Replace AGT, OPA, or other policy engines
  • Provide real-time monitoring or alerting
  • Replace OpenTelemetry spans for observability