Compatibility: Pactmark 0.1.x. Exact public signatures are generated from committed API Extractor reports in the repository. This page documents the surface you will actually use.

Authoring

defineAgent(input)

string
required
Stable agent identifier.
string
required
Contract version.
string
required
DefinedSchema<I>
required
DefinedSchema<O>
required
InstructionBundle
required
CompiledModelDefinition
required
DefinedPolicy
required
readonly string[]
required
Verifier ids that must pass.
Record<string, DefinedTool>
Optional.
readonly string[]
Capabilities the runtime must provide, or the run fails with KAF_RUNTIME_CAPABILITY_MISSING.
Type helpers: InferAgentInput<A> and InferAgentOutput<A>.

defineTool(input)

string
required
Matches namespace.name@version.
string
required
string
required
DefinedSchema
required
Omit<ToolSecurity, 'schemaVersion'>
required
{ kind: 'read'; execute(input, context) }
required
Returns a DefinedTool carrying registration: ToolRegistrationContract — including toolRegistrationDigest.

definePolicy(input)

"deny"
required
The literal "deny". No other value is accepted.
{ riskClass, decision }[]
required
decision is "deny", "allow_with_grant" or "require_approval".

defineSchema · defineInstructions · model profiles

Runtime

createLocalRuntime(input)

Deterministic memory-backed defaults for development and tests. LocalRuntimeFacade adds wait(authority, runId) to the standard facade.

createRuntime(input)

Extends RuntimeKernelConfig and additionally requires contextStore, inputSubmissionStore and egressBroker, with optional evidenceReader and requiredRuntimeCapabilities. Every port is explicit — there are no ambient defaults.

RuntimeFacade

Every method takes authority first. There is no ambient current user.

Authority

createLocalAuthorityIssuer(options?)

createLocalAuthorityIssuer is for development, tests and clearly-marked preview profiles. In production, authority comes from your authenticated host mapping — never from a locally minted issuer reachable by request input.

Commands

Replaying a command with the same id and the same content returns the same semantic result. Different content raises KAF_HTTP_IDEMPOTENCY_CONFLICT; an elapsed horizon raises KAF_COMMAND_IDEMPOTENCY_EXPIRED.

Readiness

Profiles are local, preview and production. Production readiness rejects missing durability, atomicity, registered effect strategies, bounded model resources, credential enforcement or host capability.

Run events

Every event type and its payload.

Configuration

The ports createRuntime expects.