/** * Pure derivation helpers for the agent capability catalog. * * @experimental This API is unstable and may change without notice. */ import type { AgentDescriptor } from "../agents/types.js"; import { type ExtensionType } from "../extensions/common.js"; import { type Agent, type AgentExtensionCapability, type AxmSupport, type CanonicalHookEventId, type CanonicalHookToolId, type HookBlockOutcome, type HookDecisionCapability, type HookMechanismFamily, type HookModifyOperation, type StandardsCompliance, type LeafExtensionType, type PerAgentType } from "./schema.js"; /** @experimental This API is unstable and may change without notice. */ export interface CapabilityListing { readonly type: LeafExtensionType; readonly capability: AgentExtensionCapability; } /** @experimental This API is unstable and may change without notice. */ export type NativeAgentCapabilities = { readonly [Type in PerAgentType]: Agent["capabilities"][Type]["native"]; }; /** @experimental This API is unstable and may change without notice. */ export type NativeAgent = Omit & { readonly capabilities: NativeAgentCapabilities; readonly instructions: Agent["instructions"]["native"]; readonly permissions: Agent["permissions"]["native"]; }; /** @experimental This API is unstable and may change without notice. */ export type ExtensionCompatibilityInput = { readonly type: LeafExtensionType; } | { readonly type: "pack"; readonly memberTypes: ReadonlyArray; }; /** @experimental This API is unstable and may change without notice. */ export declare const isLeafExtensionType: (value: ExtensionType) => value is LeafExtensionType; /** @experimental This API is unstable and may change without notice. */ export type AgentCapabilityStatus = "native" | "native-deprecated" | "plugin" | "plugin-deprecated" | "none"; /** @experimental This API is unstable and may change without notice. */ export type AxmIntegrationStatus = AxmSupport | "writer"; /** @experimental This API is unstable and may change without notice. */ export declare const agentCapabilityStatus: (capability: AgentExtensionCapability) => AgentCapabilityStatus; /** @experimental This API is unstable and may change without notice. */ export declare const axmIntegrationStatus: (capability: AgentExtensionCapability) => AxmIntegrationStatus; /** @experimental This API is unstable and may change without notice. */ export declare const isCapabilitySupported: (capability: AgentExtensionCapability) => boolean; /** @experimental This API is unstable and may change without notice. */ export declare const deriveSkillConvention: (directory: string) => "universal" | "vendor"; /** @experimental This API is unstable and may change without notice. */ export declare const deriveAgentDescriptor: (agent: Agent) => AgentDescriptor; /** @experimental This API is unstable and may change without notice. */ export declare const listCapabilities: (agent: Agent) => ReadonlyArray; /** @experimental This API is unstable and may change without notice. */ export declare const agentSupportsType: (agent: Agent, type: PerAgentType) => boolean; /** @experimental This API is unstable and may change without notice. */ export declare const getSupportedExtensionTypesForAgent: (agent: Agent) => ReadonlyArray; /** * Agents an extension of the given types can be installed for. * * @experimental This API is unstable and may change without notice. */ export declare const getSupportedAgentsForExtensionTypes: (types: ReadonlyArray, catalog?: ReadonlyArray) => ReadonlyArray; /** @experimental This API is unstable and may change without notice. */ export declare const getSupportedAgentsForExtensionType: (type: LeafExtensionType, catalog?: ReadonlyArray) => ReadonlyArray; /** @experimental This API is unstable and may change without notice. */ export declare const getSupportedAgentsForExtension: (extension: ExtensionCompatibilityInput, catalog?: ReadonlyArray) => ReadonlyArray; /** @experimental This API is unstable and may change without notice. */ export type HookDecisionKind = HookDecisionCapability["kind"]; /** @experimental This API is unstable and may change without notice. */ export type HookDecisionRequirement = { readonly kind: "observe"; } | { readonly kind: "block"; readonly outcomes?: ReadonlyArray | undefined; } | { readonly kind: "modify"; readonly operations?: ReadonlyArray | undefined; }; /** @experimental This API is unstable and may change without notice. */ export interface HookInstallBinding { readonly on: CanonicalHookEventId; readonly match?: { readonly tools?: ReadonlyArray | undefined; } | undefined; readonly matcherRaw?: string | undefined; readonly targets?: Readonly> | undefined; readonly requires?: { readonly decision: HookDecisionRequirement; } | undefined; } /** @experimental This API is unstable and may change without notice. */ export interface HookInstallabilityVerdict { readonly installable: boolean; readonly reason: string; } /** @experimental This API is unstable and may change without notice. */ export interface HookPortabilityRequirement { readonly events: ReadonlyArray; readonly mechanisms: ReadonlyArray; readonly decisions: ReadonlyArray; } /** @experimental This API is unstable and may change without notice. */ export interface HookPortabilityVerdict { readonly standardsCompliance: StandardsCompliance; readonly reason: string; } /** @experimental This API is unstable and may change without notice. */ export declare const canonicalCoverage: (agent: Agent) => { events: readonly ("session.start" | "prompt.submit" | "turn.end" | "tool.pre" | "tool.post" | "subagent.stop" | "compaction.pre")[]; tools: readonly ("file.read" | "file.write" | "file.edit" | "shell.exec" | "web.fetch" | "mcp.call")[]; mechanism: readonly ("command-stdin" | "raw")[]; matcherKinds: readonly ("regex" | "literal-list" | "glob" | "tool-category" | "exact-substring" | "none-imperative")[]; decision: ({ readonly kind: "observe"; } | { readonly kind: "block"; readonly outcomes: readonly ["allow" | "deny" | "ask", ...("allow" | "deny" | "ask")[]]; } | { readonly kind: "modify"; readonly operations: readonly ["modify-input" | "inject-context" | "modify-output" | "synthesize" | "redact", ...("modify-input" | "inject-context" | "modify-output" | "synthesize" | "redact")[]]; })[]; }; /** @experimental This API is unstable and may change without notice. */ export declare const installable: (agent: Agent, binding: HookInstallBinding) => HookInstallabilityVerdict; /** @experimental This API is unstable and may change without notice. */ export declare const deriveHookPortability: (agent: Agent, requirement: HookPortabilityRequirement) => HookPortabilityVerdict; /** @experimental This API is unstable and may change without notice. */ export declare const toNativeAgent: (agent: Agent) => NativeAgent; //# sourceMappingURL=derive.d.ts.map