Skip to content

Home > intention-kernel > CapabilityExecutionContext

CapabilityExecutionContext interface ​

Runtime services available to a capability implementation.

Signature:

typescript
export interface CapabilityExecutionContext

Properties ​

Property

Modifiers

Type

Description

events

readonly

CapabilityEventPublisher

Observable progress channel for domain adapters and nested workflows.

execution

readonly

Readonly<{ readonly threadId: ThreadId; readonly turnId: TurnId; readonly stepId: StepId; readonly capabilityId: CapabilityId; readonly trigger: "user" | "progression" | "dependency" | "resume"; }>

Kernel-owned technical identity for correlating host-side work.

facts

readonly

readonly FactRecord[]

Confirmed facts available before this capability executes.

intention

readonly

IntentionRequest

Complete model interpretation validated by the planner for this execution step.

ports

readonly

Readonly<Record<string, unknown>>

Instance-scoped infrastructure adapters injected by the host.

runEffect

readonly

<T>(idempotencyKey: string, operation: (authority: EffectAuthority) => Promise<T>) => Promise<EffectExecution<T>>

Coordinate one external write through the durability effect ledger.

signal

readonly

AbortSignal

Signal aborted by the caller or the configured turn timeout.

turn

readonly

CapabilityTurnContext

Conversation and interaction information for this turn.