import type { RoleGateRole } from "../types/contexts.js"; import type { Memory } from "../types/memory.js"; import type { IAgentRuntime } from "../types/runtime.js"; import type { State } from "../types/state.js"; /** * Explicit per-turn alias grants: redaction alias name → the identifier value * it may resolve to during tool execution. Absence of a name means the alias * stays redacted regardless of what the model emitted. */ export type EntityAliasCapabilityMap = Readonly>; /** * Mint the per-turn alias capability map at the planner-to-executor boundary. * Grants the canonical owner alias only when the composed state carries the * exact placeholder AND the resolved sender roles include OWNER; the value is * derived from canonical owner resolution and must be UUID-shaped. Failures * or missing preconditions yield an empty map — the placeholder then stays * redacted and validation rejects it, which is the safe outcome. */ export declare function buildTurnEntityAliases(runtime: IAgentRuntime, message: Memory, state: State | undefined, userRoles: readonly RoleGateRole[] | undefined): Promise; /** * Substitute granted alias placeholders in tool arguments. Only exact * full-string placeholder matches whose alias name is present in the * capability map resolve; embedded placeholders, ungranted names, and * credential-class placeholders pass through unchanged. Recurses through * nested plain objects and arrays with copy-on-write semantics — the input * structure is never mutated, and the same reference is returned when nothing * resolved. */ export declare function resolveEntityAliasRefs(aliases: EntityAliasCapabilityMap, args: Record): Record;