registry.tsassess.tspolicy.tsorchestrator.tsevidence.ts
// mcp://korasafe.ai, namespace: registry
export interface RegistryEntry {
system_ref: string; // sys_hiring_v4
owner: string; // user or team id
data_class: DataClass[]; // pii, credit, biometric, minors
model_refs: string[]; // claude-3-7-sonnet, gpt-4o, internal
tool_scope: ToolScope[]; // mcp, rest, ci, chrome
autonomy_tier: "T1" | "T2" | "T3" | "T4";
status: "draft" | "live" | "retired";
}
export interface RegistryListQuery {
tenant: string;
tier?: "T1" | "T2" | "T3" | "T4";
framework?: Framework;
cursor?: string; // opaque, stable across inserts
limit?: number; // 1..500, default 50
}
// mcp://korasafe.ai, namespace: assess
export interface AssessCreateInput {
system_ref: string; // registry id (e.g. sys_hiring_v4)
frameworks: ("eu-ai-act" | "nist-ai-rmf" | "iso-42001" | "sr-11-7")[];
inputs: InputClass[]; // pii, credit_score, biometric, minors
overlays?: SectorOverlay[]; // financial, healthcare, public-sector
autonomy_tier: "T1" | "T2" | "T3" | "T4";
evidence?: boolean; // signed, hash-chain pack on success
}
export interface AssessResult {
req_id: string;
tier: "minimal" | "limited" | "high-risk" | "prohibited";
findings: Finding[]; // typed, with obligation node_ids
evidence_pack_id: string | null;
audit_checkpoint: string; // merkle root, verifiable offline
}
// mcp://korasafe.ai, namespace: policy
export interface PolicyPack {
pack_ref: string; // finance.hiring.v3
version: string; // semver, immutable when tagged
rules: RegoRule[]; // compiled and pinned per version
frameworks: Framework[]; // eu-ai-act, nist-ai-rmf, iso-42001
overlays?: SectorOverlay[];
}
export interface PolicySimulateInput {
pack_ref: string;
system_ref: string;
sample_count: number; // 1..10000, audit default 1000
fixtures?: InputClass[];
}
export interface PolicySimulateResult {
pass_rate: number; // 0..1
violations: RuleHit[]; // rule_id, count, severity
hot_reload_ms: number; // under 2000 on live rollouts
}
// mcp://korasafe.ai, namespace: orchestrator
export interface OrchestratorPlan {
plan_id: string;
steps: PlanStep[]; // agents, tools, guardians per step
review_required: boolean; // true for T3 and T4
budget_ms: number; // soft cap, per step and per plan
reviewers: string[]; // resolved from escalation rules
}
export interface OrchestratorRun {
plan_id: string;
review_outcome: "approved" | "rejected" | "conditional";
run_id: string;
audit_checkpoint: string; // merkle root per run, append-only
}
// mcp://korasafe.ai, namespace: evidence
export interface EvidencePack {
pack_id: string; // ep_9f3ac2...
system_ref: string;
frameworks: Framework[];
merkle_root: string; // SHA-256, verifiable offline
sealed_at: string; // RFC 3339
retention: "7y" | "custom"; // hash-chain, seven year default
}
export interface EvidenceVerifyInput {
pack_id: string;
proof: MerkleProof; // siblings + indices
public_key?: string; // tenant signing key, JWKS-resolved
}
export interface EvidenceVerifyResult {
ok: boolean;
signed_at: string;
policy_hash: string; // pack version pinned at decision time
}
registry.*
list, get, upsert, retire. The single source every other call reads from. 8k rps, p50 38ms.
assess.*
create, status, export. EU AI Act Annex III, NIST AI RMF 2.0, sector overlays. 500ms timeout.
policy.*
list, apply, simulate, violation. Rego policies hot-reloaded in under two seconds.
agents.*
list, dispatch, status. Direct path when bypassing the orchestrator for low-latency flows.
orchestrator.*
plan, review, run, record. Default for multi-agent work. Your team sees the plan before any agent runs.
evidence.*
pack, verify, list. SHA-256 Merkle chained. Seven-year default retention.