Interface ActiveExtensionDescriptor<TPayload>

Active descriptor paired with resolved priority and original stack index.

interface ActiveExtensionDescriptor<TPayload> {
    id: string;
    kind: string;
    priority?: number;
    enableByDefault?: boolean;
    metadata?: Record<string, unknown>;
    payload: TPayload;
    source?: ExtensionSourceMetadata;
    onActivate?: ((context) => void | Promise<void>);
    onDeactivate?: ((context) => void | Promise<void>);
    requiredSecrets?: ExtensionSecretRequirement[];
    resolvedPriority: number;
    stackIndex: number;
}

Type Parameters

  • TPayload = unknown

Hierarchy (view full)

Properties

id: string

Unique identifier for the descriptor within its kind. Subsequent descriptors with the same id stack on top of previous entries.

kind: string

High-level category of the descriptor (tool, guardrail, etc.).

priority?: number

Optional priority used during manifest loading. Higher numbers load later, allowing them to supersede earlier descriptors with the same id.

enableByDefault?: boolean

Flag indicating whether the descriptor should be enabled by default when discovered. Manifests or overrides can still disable it explicitly.

metadata?: Record<string, unknown>

Arbitrary metadata for tooling or pack-specific usage.

payload: TPayload

The payload consumed by the runtime (e.g., tool factory function).

Provenance information for the descriptor.

onActivate?: ((context) => void | Promise<void>)

Optional lifecycle hook invoked when the descriptor becomes the active entry for its id.

Type declaration

onDeactivate?: ((context) => void | Promise<void>)

Optional lifecycle hook invoked when the descriptor is superseded or removed.

Type declaration

requiredSecrets?: ExtensionSecretRequirement[]

Declares the secrets (API keys, credentials) the descriptor needs in order to function.

resolvedPriority: number

Resolved numeric priority used to order descriptors inside a stack.

stackIndex: number

0-based insertion position within the stack (lower is older).