UNPKG

@adonis-agora/agent

Version:

Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.

37 lines • 1.94 kB
import type { ResolvedAgentTenancy } from './agora/tenancy.js'; import type { ActorDirectory } from './spi/actor-directory.js'; import type { AgentGovernanceQueries } from './spi/governance-queries.js'; import type { AgentPricingStore } from './spi/pricing-store.js'; /** Why the operator surface cannot answer: the read-model or store it needs is not configured. */ export declare class GovernanceUnavailableError extends Error { constructor(message: string); } /** * What the governance console reads and writes, as the provider resolved it at boot: the read-model * (`governanceQueries`), the pricing store, the actor directory and the tenancy. Bound in the * container (`app.container.make(AgentGovernanceConsole)`) so the `agent:*` ace commands work on the * very instances the `/agent/governance/*` routes and the MCP dev tools use. * * The routes scope each read to what the console's `authorize` granted the viewer; a command runs * with shell access to the app, so it reads every organization unless `--tenant` narrows it. */ export declare class AgentGovernanceConsole { private readonly options; constructor(options: { queries: AgentGovernanceQueries | undefined; pricing: AgentPricingStore | undefined; actorDirectory: ActorDirectory | null; tenancy: ResolvedAgentTenancy; }); get actorDirectory(): ActorDirectory | null; get tenancyEnabled(): boolean; /** * The read-model, narrowed to `tenant` when one is named. Throws {@link GovernanceUnavailableError} * with no read-model (`governanceQueries: false`), with a tenant while tenancy is off, or when the * read-model cannot be scoped by organization. */ queries(tenant?: string): AgentGovernanceQueries; /** The pricing store; throws {@link GovernanceUnavailableError} when none is bound. */ pricing(): AgentPricingStore; } //# sourceMappingURL=governance-console.d.ts.map