import { I as Issuer, K as Krikos, A as Agent } from '../types-iaO2gHBL.cjs'; /** * Framework and sibling integrations for Krikos. * * Two kinds of integration live here, both purely structural: Krikos imports nothing from any * framework or sibling package, it matches the minimal shape it needs and the host supplies a * real object. * * 1. Framework registration. Register an agent built on Hermes Agent, Mastra, the Vercel AI SDK, * LangChain, or anything else, as an identity in the registry, mapping its tools to declared * capabilities so the same fleet inventory spans every framework. * 2. Sibling bridges. Forward Krikos lifecycle events to the rest of the @takk stack: revoke an * agent's API keys in @takk/keymesh on revocation, record its lifecycle as bi-temporal facts * in @takk/gaptime, or surface lifecycle signals to @takk/behavioralai, @takk/modelchain, * @takk/noeticos, and @takk/racs. * * @packageDocumentation */ /** Minimal structural shape of a framework agent that can be registered. */ interface FrameworkAgentLike { /** The agent's name. */ readonly name: string; /** Optional tool names the agent exposes, each mapped to a capability action. */ readonly tools?: readonly string[]; /** Optional metadata. */ readonly metadata?: Readonly>; } /** Options for registering a framework agent. */ interface RegisterOptions { /** The issuing principal. */ readonly issuer: Issuer; /** The capability name under which the agent's tools are granted. Defaults to the framework. */ readonly capability?: string; /** Whether to issue the agent directly active. Defaults to false (provisioned). */ readonly activate?: boolean; /** Optional expiration instant (epoch ms) or null. */ readonly expiresAt?: number | null; } /** * Registers a framework agent as a Krikos identity, deriving one capability whose actions are the * agent's tool names. The single primitive behind the Hermes, Mastra, and LangChain helpers. * * @param krikos - The registry to issue into. * @param framework - The framework tag, for example `hermes`. * @param agent - The structural framework agent. * @param options - Issuer and registration options. * @returns The issued {@link Agent}. */ declare function registerFrameworkAgent(krikos: Krikos, framework: string, agent: FrameworkAgentLike, options: RegisterOptions): Agent; /** * Registers a Hermes Agent instance as a Krikos identity. Hermes Agent is single-tenant by * design, so an enterprise running many Hermes instances uses Krikos as the control plane that * inventories and governs them. */ declare function registerHermesAgent(krikos: Krikos, agent: FrameworkAgentLike, options: RegisterOptions): Agent; /** Registers a Mastra agent as a Krikos identity. */ declare function registerMastraAgent(krikos: Krikos, agent: FrameworkAgentLike, options: RegisterOptions): Agent; /** Registers a LangChain agent as a Krikos identity. */ declare function registerLangChainAgent(krikos: Krikos, agent: FrameworkAgentLike, options: RegisterOptions): Agent; /** Structural shape of a credential manager such as @takk/keymesh. */ interface KeymeshLike { /** Revokes all credentials associated with the agent. */ revoke(agentId: string): unknown; } /** * Bridges revocation: when an agent is revoked or expired in Krikos, revoke its credentials in a * keymesh-like manager, so a retired identity cannot keep using live API keys. Returns an * unsubscribe function. * * @param krikos - The registry to observe. * @param keymesh - The structural credential manager. * @returns An unsubscribe function. */ declare function keymeshBridge(krikos: Krikos, keymesh: KeymeshLike): () => void; /** Structural shape of a bi-temporal memory such as @takk/gaptime. */ interface GaptimeLike { /** Asserts one fact; the shape is intentionally loose to match the sibling without importing it. */ assert(input: { subject: { type: string; name: string; }; predicate: string; object: string; objectKind?: 'literal'; provenance: { source: string; actor?: string; }; }): unknown; } /** * Bridges lifecycle to memory: record each Krikos lifecycle event as a bi-temporal fact in a * gaptime-like store, so "what could this agent do, and when" becomes a time-travellable record. * Returns an unsubscribe function. * * @param krikos - The registry to observe. * @param gaptime - The structural bi-temporal store. * @returns An unsubscribe function. */ declare function gaptimeBridge(krikos: Krikos, gaptime: GaptimeLike): () => void; /** Structural shape of a behavioral observer such as @takk/behavioralai. */ interface BehavioralLike { /** Observes one event; the shape is loose to match the sibling without importing it. */ observe(event: { kind: string; subject?: string; at: number; }): unknown; } /** * Bridges lifecycle to behavioral observation: forward each Krikos event to a behavioralai-like * observer, so identity churn becomes a behavioral signal. Returns an unsubscribe function. * * @param krikos - The registry to observe. * @param behavioral - The structural behavioral observer. * @returns An unsubscribe function. */ declare function behavioralaiBridge(krikos: Krikos, behavioral: BehavioralLike): () => void; export { type BehavioralLike, type FrameworkAgentLike, type GaptimeLike, type KeymeshLike, type RegisterOptions, behavioralaiBridge, gaptimeBridge, keymeshBridge, registerFrameworkAgent, registerHermesAgent, registerLangChainAgent, registerMastraAgent };