UNPKG

@adonis-agora/agent

Version:

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

23 lines • 1.46 kB
import { type ScopeResolver } from '../skills.js'; import type { RolesPolicy } from '../spi/roles-policy.js'; /** The role a delegated scope becomes. Namespaced, so a scope can never pose as an app role. */ export declare const SCOPE_ROLE_PREFIX = "scope:"; export declare function scopeRole(scope: string): string; /** * Wrap a {@link RolesPolicy} so personal agents reach only what was written for them. * * An A2A actor carries {@link PERSONAL_AGENT_ROLE}, plus one {@link scopeRole} per delegated scope. * For it, a tool must DECLARE one of those roles, and the wrapped policy must agree too. A tool with * no `roles` is unreachable: under the default policy "no roles" means "anyone", and an app's * existing tools were never written with an outside caller in mind. Every other actor is decided by * the wrapped policy alone, unchanged. */ export declare function personalAgentGate(inner: RolesPolicy): RolesPolicy; /** * Wrap the {@link ScopeResolver} of memory or skills so a personal agent resolves NO scope. Under * delegation its actor id is the account's — without this it would read the account's memories * (and its tenant's) and could write new ones, a standing instruction to the user's own assistant. * Built-ins like `remember` come from config, not the registry, so the tool gate never sees them. */ export declare function personalAgentScopes(inner: ScopeResolver | undefined): ScopeResolver; //# sourceMappingURL=gate.d.ts.map