import { z } from "zod"; import type { PermissionGrant } from "./grants.js"; import type { Principal } from "./principal.js"; import type { RunContext } from "./run-context.js"; import { type ToolCall, type ToolOutcome, type ToolRegistry } from "./tools.js"; /** 01-core §13 */ export type ActAs = (principal: Principal, grant: PermissionGrant) => Promise; /** 01-core §13 */ export interface AuthMaterial { headers: Record; } /** 01-core §13 */ export declare const authMaterialSchema: z.ZodObject<{ headers: z.ZodRecord; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ headers: z.ZodRecord; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ headers: z.ZodRecord; }, z.ZodTypeAny, "passthrough">>; /** 01-core §13 */ export interface SecretsProvider { get(name: string): Promise; } /** 01-core §13 */ export type AgentRunner = (task: { prompt: string; tools: ToolRegistry; budget?: { maxToolCalls?: number; }; /** Best-effort in-process cancellation; runners that do not support it may ignore it. */ abortSignal?: AbortSignal; }, ctx: RunContext) => Promise; /** * Agents stay CODE and are never stored — an automation record names one by * NAME. Registration happens at boot; lookup happens at fire time. * * INVARIANTS: a duplicate name THROWS at registration, so a collision is a * startup failure rather than a 2am surprise; a fire-time miss writes a FAILED * run row naming the missing name and stops. There is never a fallback brain. */ export interface AgentRunners { register(name: string, runner: AgentRunner): void; get(name: string): AgentRunner | undefined; } /** The name the composed agent registers under, and what a record with no * `agent` resolves to. */ export declare const DEFAULT_RUNNER_NAME = "agent"; /** 01-core §13 */ export interface AgentRunReport { status: "ok" | "error" | "stopped"; summary: string; toolCalls: Array<{ call: ToolCall; outcome: ToolOutcome["status"]; }>; } /** 01-core §13 */ export declare const agentRunReportSchema: z.ZodObject<{ status: z.ZodEnum<["ok", "error", "stopped"]>; summary: z.ZodString; toolCalls: z.ZodArray; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, z.ZodTypeAny, "passthrough">>; outcome: z.ZodEnum<["ok", "error", "pending-approval", "blocked"]>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ call: z.ZodObject<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, z.ZodTypeAny, "passthrough">>; outcome: z.ZodEnum<["ok", "error", "pending-approval", "blocked"]>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ call: z.ZodObject<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, z.ZodTypeAny, "passthrough">>; outcome: z.ZodEnum<["ok", "error", "pending-approval", "blocked"]>; }, z.ZodTypeAny, "passthrough">>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ status: z.ZodEnum<["ok", "error", "stopped"]>; summary: z.ZodString; toolCalls: z.ZodArray; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, z.ZodTypeAny, "passthrough">>; outcome: z.ZodEnum<["ok", "error", "pending-approval", "blocked"]>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ call: z.ZodObject<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, z.ZodTypeAny, "passthrough">>; outcome: z.ZodEnum<["ok", "error", "pending-approval", "blocked"]>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ call: z.ZodObject<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, z.ZodTypeAny, "passthrough">>; outcome: z.ZodEnum<["ok", "error", "pending-approval", "blocked"]>; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ status: z.ZodEnum<["ok", "error", "stopped"]>; summary: z.ZodString; toolCalls: z.ZodArray; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, z.ZodTypeAny, "passthrough">>; outcome: z.ZodEnum<["ok", "error", "pending-approval", "blocked"]>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ call: z.ZodObject<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, z.ZodTypeAny, "passthrough">>; outcome: z.ZodEnum<["ok", "error", "pending-approval", "blocked"]>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ call: z.ZodObject<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ id: z.ZodString; tool: z.ZodString; args: z.ZodType<{}, z.ZodTypeDef, {}>; }, z.ZodTypeAny, "passthrough">>; outcome: z.ZodEnum<["ok", "error", "pending-approval", "blocked"]>; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">>;