Agent registry and governance
Register immutable agent versions, bound authority, budgets, and external identities.
@fabric-harness/agent-registry provides runtime-neutral governance contracts for agent catalogs.
It does not execute agents or replace Platform actions. It validates definitions, immutable versions,
tenant registrations, capability grants, autonomy ceilings, enrollment, external identities, and
privacy-safe evidence while keeping vertical-specific scope in the owning application.
pnpm add @fabric-harness/agent-registry zodimport {
agentCapabilityGrantBaseSchema,
agentDefinitionSchema,
clampRoute,
} from '@fabric-harness/agent-registry';
const definition = agentDefinitionSchema.parse({
agentDefinitionId: 'reviewer',
name: 'reviewer',
displayName: 'Governed reviewer',
description: 'Reviews a bounded subject and proposes governed actions.',
inputKinds: ['review.request'],
outputKinds: ['review.result'],
createdAt: new Date().toISOString(),
});
const grant = agentCapabilityGrantBaseSchema.parse({
grantId: 'reviewer-grant',
readTools: ['read-subject'],
proposalActions: ['propose-review'],
executionActions: [],
});
const route = clampRoute('approval-required', {
status: 'auto-executed',
actionInvocationId: 'candidate-invocation',
});The registry deliberately separates read, propose, and execute authority. A registration's autonomy is a ceiling: policy may narrow it but cannot widen it. Persist only validated, hash-pinned versions; mint short-lived execution principals per run; and route mutations through governed Fabric Platform actions. External channel identities remain untrusted candidates until an application resolves an active binding and validates the applicable grant.
Use zod .extend() in an application package to attach tenant or subject scope. Do not add vertical
domain fields to the shared registry. The runnable credential-free fixture is
examples/agent-registry in the restricted source repository.