Skip to content

Home > intention-kernel > CapabilityResult

CapabilityResult type ​

Result returned by a capability.

Signature:

typescript
export type CapabilityResult<TOutput> = {
    readonly status: "completed";
    readonly output: TOutput;
    readonly facts: readonly FactCandidate[];
    readonly evidence: readonly EvidenceRecord[];
    readonly artifacts: readonly Artifact[];
    readonly canonicalResponse?: CanonicalResponse;
    readonly interaction?: Interaction | null;
    readonly continuation?: unknown;
    readonly modelRedactions?: readonly string[];
} | {
    readonly status: "needs_input";
    readonly interaction: Interaction;
    readonly partialInput?: unknown;
    readonly invalidates?: readonly FactReference[];
    readonly modelRedactions?: readonly string[];
} | {
    readonly status: "needs_dependency";
    readonly requirement: FactRequirement;
    readonly provider: Readonly<{
        readonly capabilityId: CapabilityId;
        readonly input: unknown;
    }>;
    readonly continuation?: unknown;
    readonly modelRedactions?: readonly string[];
} | {
    readonly status: "needs_confirmation";
    readonly interaction: Interaction;
    readonly proposedInput: unknown;
    readonly continuation?: unknown;
    readonly modelRedactions?: readonly string[];
} | {
    readonly status: "failed";
    readonly issue: CapabilityIssue;
};

References: FactCandidate, EvidenceRecord, Artifact, CanonicalResponse, Interaction, FactReference, FactRequirement, CapabilityId, CapabilityIssue