import { z } from "zod"; import type { AutomationId } from "./automation.js"; import { type AppId, type ApprovalId, type GrantId, type IsoDateTime, type TurnId } from "./ids.js"; import { type KnowledgeKind, type KnowledgeVisibility } from "./knowledge.js"; import { type RiskLabel, type ToolDescriptor } from "./tools.js"; import type { ToolCall } from "./tools.js"; import { type UIPayload } from "./genui/tree-node.js"; import { type TriggerSource } from "./triggers.js"; /** 01-core §16 */ export interface VendoViewPart { type: "data-vendo-view"; appId: AppId; payload: UIPayload; /** The turn that painted this view, so a screen on someone's page joins back * to the exchange that made it and to that exchange's audit rows. Absent on a * paint outside a turn (a reopen, a tour replay). */ turnId?: TurnId; } /** 01-core §16 */ export declare const vendoViewPartSchema: z.ZodObject<{ type: z.ZodLiteral<"data-vendo-view">; appId: z.ZodString; payload: z.ZodObject<{ formatVersion: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">>; turnId: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ type: z.ZodLiteral<"data-vendo-view">; appId: z.ZodString; payload: z.ZodObject<{ formatVersion: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">>; turnId: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ type: z.ZodLiteral<"data-vendo-view">; appId: z.ZodString; payload: z.ZodObject<{ formatVersion: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">>; turnId: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; /** The ai-SDK envelope the wire and persisted UIMessages ACTUALLY carry. The * flat §16 interfaces above are the logical parts; on the wire the data-chunk * schema * requires the payload nested under `data`, with an optional reconciliation * `id`. Producers convert with {@link toVendoWirePart}; consumers parse with * {@link vendoViewWirePartSchema}. */ export interface VendoWirePart { type: Part["type"]; data: Omit; /** Stable ai-SDK data-part id so successive writes reconcile in place. */ id?: string; } export type VendoViewWirePart = VendoWirePart; /** Nest a flat §16 part into its wire envelope ({ type, ...rest } → { type, data: rest }). */ export declare function toVendoWirePart(part: Part, id?: string): VendoWirePart; /** * Additive internal bridge seam: one tool execution can publish client parts * mid-flight, on the stream ids it names. * * It exists because `vendo_make`'s model-facing output is a {@link MakeReceipt} — * four fields of words. Anything the CLIENT needs and the model must not be handed * travels here instead, published explicitly by the producer rather than * duck-typed out of a tool's return value at the bridge (01-core §16's * anti-smuggling rule, which duck-typing was the exception to). */ export declare const VENDO_VIEW_STREAM: unique symbol; /** What a tool execution may publish: the screen, the automation card an armed * automation raises, and the limit card a refused generation raises. */ export type VendoStreamedPart = VendoViewPart | VendoAutomationPart | VendoLimitPart; export interface VendoViewStreamUpdate { id: string; part: VendoStreamedPart; } export type VendoViewStreamingToolCall = ToolCall & { [VENDO_VIEW_STREAM]?: (update: VendoViewStreamUpdate) => void; }; /** Stable ai-SDK data-part id so partial and final views reconcile in place. */ export declare const vendoViewStreamId: (appId: AppId) => string; /** * THE producer of a `data-vendo-view` part — one builder, one validator. * * Four writers hand-wrote this object literal (the render seam, the create * door, the harness tool bridge, the authoring assembler) and only two of them * validated it, so a part that could never render was emitted by two paths and * silently dropped by a third. Building it here makes {@link * vendoViewPartSchema} unavoidable and derives the stream id from the app id, * which is the only correct source for it. * * A part that does not parse is NOT a view: this returns `undefined` and the * caller emits nothing, which is the law the render seam already lived by for * content that does not compile. * * `streaming` stays the CALLER's business — it rides inside `payload`, because * only the mid-build emitter knows whether this is the last paint. */ export declare const vendoViewPart: (input: { appId: AppId; payload: UIPayload; turnId?: TurnId; }) => { streamId: string; part: VendoViewPart; } | undefined; /** 01-core §16 — the inline connect-card part: emitted beside the native tool * part when a connector call ends `connect-required` (04-actions §3), keyed by * `toolCallId` exactly like the approval part. */ export interface VendoConnectPart { type: "data-vendo-connect"; toolCallId: string; connector: string; toolkit: string; message: string; } /** 01-core §16 */ export declare const vendoConnectPartSchema: z.ZodObject<{ type: z.ZodLiteral<"data-vendo-connect">; toolCallId: z.ZodString; connector: z.ZodString; toolkit: z.ZodString; message: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ type: z.ZodLiteral<"data-vendo-connect">; toolCallId: z.ZodString; connector: z.ZodString; toolkit: z.ZodString; message: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ type: z.ZodLiteral<"data-vendo-connect">; toolCallId: z.ZodString; connector: z.ZodString; toolkit: z.ZodString; message: z.ZodString; }, z.ZodTypeAny, "passthrough">>; /** 01-core §16 */ export interface VendoApprovalPart { type: "data-vendo-approval"; toolCallId: string; risk: RiskLabel; approvalId?: ApprovalId; invalidatedGrant?: { id: GrantId; grantedAt: IsoDateTime; }; /** The ask's OWN descriptor, present when the tool parked an ask about * something other than the call the model made (the built-app door asks about * a BUILD, from inside `vendo_make`). The client's shared §16 builder reads * its title and schema (`buildApprovalRequest`), so the card derives the same * words the server authored instead of humanizing the calling tool's slug. */ descriptor?: ToolDescriptor; } /** 01-core §16 */ export declare const vendoApprovalPartSchema: z.ZodObject<{ type: z.ZodLiteral<"data-vendo-approval">; toolCallId: z.ZodString; risk: z.ZodEnum<["read", "write", "destructive", "ungraded"]>; approvalId: z.ZodOptional; invalidatedGrant: z.ZodOptional, z.objectInputType<{ id: z.ZodString; grantedAt: z.ZodString; }, z.ZodTypeAny, "passthrough">>>; descriptor: z.ZodOptional; outputSchema: z.ZodOptional>; risk: z.ZodEnum<["read", "write", "destructive", "ungraded"]>; confirmEach: z.ZodOptional; title: z.ZodOptional; toolkit: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ name: z.ZodString; description: z.ZodString; inputSchema: z.ZodRecord; outputSchema: z.ZodOptional>; risk: z.ZodEnum<["read", "write", "destructive", "ungraded"]>; confirmEach: z.ZodOptional; title: z.ZodOptional; toolkit: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ name: z.ZodString; description: z.ZodString; inputSchema: z.ZodRecord; outputSchema: z.ZodOptional>; risk: z.ZodEnum<["read", "write", "destructive", "ungraded"]>; confirmEach: z.ZodOptional; title: z.ZodOptional; toolkit: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ type: z.ZodLiteral<"data-vendo-approval">; toolCallId: z.ZodString; risk: z.ZodEnum<["read", "write", "destructive", "ungraded"]>; approvalId: z.ZodOptional; invalidatedGrant: z.ZodOptional, z.objectInputType<{ id: z.ZodString; grantedAt: z.ZodString; }, z.ZodTypeAny, "passthrough">>>; descriptor: z.ZodOptional; outputSchema: z.ZodOptional>; risk: z.ZodEnum<["read", "write", "destructive", "ungraded"]>; confirmEach: z.ZodOptional; title: z.ZodOptional; toolkit: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ name: z.ZodString; description: z.ZodString; inputSchema: z.ZodRecord; outputSchema: z.ZodOptional>; risk: z.ZodEnum<["read", "write", "destructive", "ungraded"]>; confirmEach: z.ZodOptional; title: z.ZodOptional; toolkit: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ name: z.ZodString; description: z.ZodString; inputSchema: z.ZodRecord; outputSchema: z.ZodOptional>; risk: z.ZodEnum<["read", "write", "destructive", "ungraded"]>; confirmEach: z.ZodOptional; title: z.ZodOptional; toolkit: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ type: z.ZodLiteral<"data-vendo-approval">; toolCallId: z.ZodString; risk: z.ZodEnum<["read", "write", "destructive", "ungraded"]>; approvalId: z.ZodOptional; invalidatedGrant: z.ZodOptional, z.objectInputType<{ id: z.ZodString; grantedAt: z.ZodString; }, z.ZodTypeAny, "passthrough">>>; descriptor: z.ZodOptional; outputSchema: z.ZodOptional>; risk: z.ZodEnum<["read", "write", "destructive", "ungraded"]>; confirmEach: z.ZodOptional; title: z.ZodOptional; toolkit: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ name: z.ZodString; description: z.ZodString; inputSchema: z.ZodRecord; outputSchema: z.ZodOptional>; risk: z.ZodEnum<["read", "write", "destructive", "ungraded"]>; confirmEach: z.ZodOptional; title: z.ZodOptional; toolkit: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ name: z.ZodString; description: z.ZodString; inputSchema: z.ZodRecord; outputSchema: z.ZodOptional>; risk: z.ZodEnum<["read", "write", "destructive", "ungraded"]>; confirmEach: z.ZodOptional; title: z.ZodOptional; toolkit: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; }, z.ZodTypeAny, "passthrough">>; /** Streamed when the agent loop stops because it exhausted its step cap, so * the exhaustion is visible to the client instead of the turn just ending * mid-plan. Consumers * that don't recognize it ignore it (§15 forward-compat). */ export interface VendoStepLimitPart { type: "data-vendo-step-limit"; /** The step cap the run exhausted. */ limit: number; /** A renderable, provider-safe explanation. */ message: string; } export declare const vendoStepLimitPartSchema: z.ZodObject<{ type: z.ZodLiteral<"data-vendo-step-limit">; limit: z.ZodNumber; message: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ type: z.ZodLiteral<"data-vendo-step-limit">; limit: z.ZodNumber; message: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ type: z.ZodLiteral<"data-vendo-step-limit">; limit: z.ZodNumber; message: z.ZodString; }, z.ZodTypeAny, "passthrough">>; /** Streamed when a turn's stream errors, so the failure is part of the * ASSISTANT MESSAGE rather than only ephemeral client state. The * ai-SDK `error` chunk sets `useChat`'s transient `error` and is gone on the * next mount, so a reloaded (or refetched) thread showed the user's question * answered by a blank reply — the keyless install's whole first experience. * `message` is the gated wire string (agent wireErrorMessage): Vendo's own * crafted text or the fixed generic line, never provider internals. * Consumers that don't recognize it ignore it (§15 forward-compat). */ export interface VendoTurnErrorPart { type: "data-vendo-turn-error"; /** A renderable, provider-safe explanation of why the turn ended. */ message: string; } export declare const vendoTurnErrorPartSchema: z.ZodObject<{ type: z.ZodLiteral<"data-vendo-turn-error">; message: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ type: z.ZodLiteral<"data-vendo-turn-error">; message: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ type: z.ZodLiteral<"data-vendo-turn-error">; message: z.ZodString; }, z.ZodTypeAny, "passthrough">>; /** Streamed beside the native tool part when an app BUILD terminally fails in a * chat turn, so the thread shows the classified reason instead of ending (or * retrying for minutes) with no visible trace. * `reason` is the runtime's canned, non-leaky failure line (06-apps * buildFailureReason) — never a raw provider message. Consumers that don't * recognize it ignore it (§15 forward-compat). */ export interface VendoBuildFailedPart { type: "data-vendo-build-failed"; /** The failed `vendo_make` call, for placement beside its beat. */ toolCallId: string; /** The renderable, provider-safe failure reason. */ reason: string; } export declare const vendoBuildFailedPartSchema: z.ZodObject<{ type: z.ZodLiteral<"data-vendo-build-failed">; toolCallId: z.ZodString; reason: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ type: z.ZodLiteral<"data-vendo-build-failed">; toolCallId: z.ZodString; reason: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ type: z.ZodLiteral<"data-vendo-build-failed">; toolCallId: z.ZodString; reason: z.ZodString; }, z.ZodTypeAny, "passthrough">>; /** Streamed when the host's limits policy DENIES a request — a message turned * away before the turn starts, or an app generation refused mid-turn — so the * thread says the cap was reached instead of answering with silence. * `message` is the host policy's own sentence when it returned one: the host * set the cap, so only the host can say what it is or when it lifts, and a * policy that says nothing gets the chrome's own line instead. Consumers that * don't recognize it ignore it (§15 forward-compat). */ export interface VendoLimitPart { type: "data-vendo-limit"; /** The host policy's own explanation, when it gave one. */ message?: string; /** Set when the limit could not be CHECKED — the meter read failed — rather * than reached. The request still did not run (a limits policy that fails * open stops limiting), but nothing was counted against this person, so the * surface must not name a cap they hit. */ retryable?: true; } export declare const vendoLimitPartSchema: z.ZodObject<{ type: z.ZodLiteral<"data-vendo-limit">; message: z.ZodOptional; retryable: z.ZodOptional>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ type: z.ZodLiteral<"data-vendo-limit">; message: z.ZodOptional; retryable: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ type: z.ZodLiteral<"data-vendo-limit">; message: z.ZodOptional; retryable: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">>; /** Streamed when a turn creates or arms an automation, so the thread can * render the automation AS an automation — name, trigger → * action flow, enabled state — instead of describing it in prose. The chrome * renders it with the same card vocabulary as the workspace Automations * panel. Consumers that don't recognize it ignore it (§15 forward-compat). */ export interface VendoAutomationPart { type: "data-vendo-automation"; /** The RECORD this card is about — an automation carries no app reference. */ automationId: AutomationId; /** The record's display name: one line saying what was armed. */ name: string; /** Whether the automations engine reports it armed. */ enabled: boolean; /** The record's normalized trigger, for the rule sentence's WHEN half. */ when?: TriggerSource; /** The rule sentence's ACTION half, already humanized by the producer — the * card has no task to read and must not invent one. */ action?: string; /** The automation's terms in its author's own sentences. DISPLAY ONLY: * nothing here gates a run, so a reader can trust the words came from * whoever authored it rather than from a renderer. */ rules?: string[]; /** The record's one-line description, when it has one. */ description?: string; /** Standing-grant asks still undecided: the card reads * "Enabled · waiting on N permissions" until the set is granted. */ pendingGrants?: number; } export declare const vendoAutomationPartSchema: z.ZodObject<{ type: z.ZodLiteral<"data-vendo-automation">; automationId: z.ZodString; name: z.ZodString; enabled: z.ZodBoolean; when: z.ZodOptional; cron: z.ZodOptional; every: z.ZodOptional; at: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ kind: z.ZodLiteral<"schedule">; cron: z.ZodOptional; every: z.ZodOptional; at: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ kind: z.ZodLiteral<"schedule">; cron: z.ZodOptional; every: z.ZodOptional; at: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ kind: z.ZodLiteral<"host-event">; event: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ kind: z.ZodLiteral<"host-event">; event: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ kind: z.ZodLiteral<"host-event">; event: z.ZodString; }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ kind: z.ZodLiteral<"external">; connector: z.ZodString; event: z.ZodOptional; config: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ kind: z.ZodLiteral<"external">; connector: z.ZodString; event: z.ZodOptional; config: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ kind: z.ZodLiteral<"external">; connector: z.ZodString; event: z.ZodOptional; config: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>]>, z.objectOutputType<{ kind: z.ZodLiteral<"schedule">; cron: z.ZodOptional; every: z.ZodOptional; at: z.ZodOptional; }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{ kind: z.ZodLiteral<"host-event">; event: z.ZodString; }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{ kind: z.ZodLiteral<"external">; connector: z.ZodString; event: z.ZodOptional; config: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ kind: z.ZodLiteral<"schedule">; cron: z.ZodOptional; every: z.ZodOptional; at: z.ZodOptional; }, z.ZodTypeAny, "passthrough"> | z.objectInputType<{ kind: z.ZodLiteral<"host-event">; event: z.ZodString; }, z.ZodTypeAny, "passthrough"> | z.objectInputType<{ kind: z.ZodLiteral<"external">; connector: z.ZodString; event: z.ZodOptional; config: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; action: z.ZodOptional; rules: z.ZodOptional>; description: z.ZodOptional; pendingGrants: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ type: z.ZodLiteral<"data-vendo-automation">; automationId: z.ZodString; name: z.ZodString; enabled: z.ZodBoolean; when: z.ZodOptional; cron: z.ZodOptional; every: z.ZodOptional; at: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ kind: z.ZodLiteral<"schedule">; cron: z.ZodOptional; every: z.ZodOptional; at: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ kind: z.ZodLiteral<"schedule">; cron: z.ZodOptional; every: z.ZodOptional; at: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ kind: z.ZodLiteral<"host-event">; event: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ kind: z.ZodLiteral<"host-event">; event: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ kind: z.ZodLiteral<"host-event">; event: z.ZodString; }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ kind: z.ZodLiteral<"external">; connector: z.ZodString; event: z.ZodOptional; config: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ kind: z.ZodLiteral<"external">; connector: z.ZodString; event: z.ZodOptional; config: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ kind: z.ZodLiteral<"external">; connector: z.ZodString; event: z.ZodOptional; config: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>]>, z.objectOutputType<{ kind: z.ZodLiteral<"schedule">; cron: z.ZodOptional; every: z.ZodOptional; at: z.ZodOptional; }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{ kind: z.ZodLiteral<"host-event">; event: z.ZodString; }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{ kind: z.ZodLiteral<"external">; connector: z.ZodString; event: z.ZodOptional; config: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ kind: z.ZodLiteral<"schedule">; cron: z.ZodOptional; every: z.ZodOptional; at: z.ZodOptional; }, z.ZodTypeAny, "passthrough"> | z.objectInputType<{ kind: z.ZodLiteral<"host-event">; event: z.ZodString; }, z.ZodTypeAny, "passthrough"> | z.objectInputType<{ kind: z.ZodLiteral<"external">; connector: z.ZodString; event: z.ZodOptional; config: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; action: z.ZodOptional; rules: z.ZodOptional>; description: z.ZodOptional; pendingGrants: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ type: z.ZodLiteral<"data-vendo-automation">; automationId: z.ZodString; name: z.ZodString; enabled: z.ZodBoolean; when: z.ZodOptional; cron: z.ZodOptional; every: z.ZodOptional; at: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ kind: z.ZodLiteral<"schedule">; cron: z.ZodOptional; every: z.ZodOptional; at: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ kind: z.ZodLiteral<"schedule">; cron: z.ZodOptional; every: z.ZodOptional; at: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ kind: z.ZodLiteral<"host-event">; event: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ kind: z.ZodLiteral<"host-event">; event: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ kind: z.ZodLiteral<"host-event">; event: z.ZodString; }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{ kind: z.ZodLiteral<"external">; connector: z.ZodString; event: z.ZodOptional; config: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ kind: z.ZodLiteral<"external">; connector: z.ZodString; event: z.ZodOptional; config: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ kind: z.ZodLiteral<"external">; connector: z.ZodString; event: z.ZodOptional; config: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>]>, z.objectOutputType<{ kind: z.ZodLiteral<"schedule">; cron: z.ZodOptional; every: z.ZodOptional; at: z.ZodOptional; }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{ kind: z.ZodLiteral<"host-event">; event: z.ZodString; }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{ kind: z.ZodLiteral<"external">; connector: z.ZodString; event: z.ZodOptional; config: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ kind: z.ZodLiteral<"schedule">; cron: z.ZodOptional; every: z.ZodOptional; at: z.ZodOptional; }, z.ZodTypeAny, "passthrough"> | z.objectInputType<{ kind: z.ZodLiteral<"host-event">; event: z.ZodString; }, z.ZodTypeAny, "passthrough"> | z.objectInputType<{ kind: z.ZodLiteral<"external">; connector: z.ZodString; event: z.ZodOptional; config: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; action: z.ZodOptional; rules: z.ZodOptional>; description: z.ZodOptional; pendingGrants: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; /** Streamed when arming an automation minted a grant SET — multiple * standing-grant asks that one consent moment decides together. The chrome * renders ONE card enumerating every permission with a single Approve/Deny; * `toolCallId` keys it to the parked native call the * decision settles, exactly like the approval part. Consumers that don't * recognize it ignore it (§15 forward-compat). */ export interface VendoGrantSetPart { type: "data-vendo-grant-set"; /** The parked native call this card settles, for placement beside its beat. */ toolCallId: string; /** The set every permission below belongs to — one decision settles all * (mirrors the automations engine's enable() grantSetId). */ grantSetId: string; /** The automation's display name. */ name: string; /** Every requested permission: its pending guard approval, the tool, the * descriptor's one-line description, and its risk. */ permissions: Array<{ approvalId: ApprovalId; tool: string; description?: string; risk: RiskLabel; }>; } export declare const vendoGrantSetPartSchema: z.ZodObject<{ type: z.ZodLiteral<"data-vendo-grant-set">; toolCallId: z.ZodString; grantSetId: z.ZodString; name: z.ZodString; permissions: z.ZodArray; risk: z.ZodEnum<["read", "write", "destructive", "ungraded"]>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ approvalId: z.ZodString; tool: z.ZodString; description: z.ZodOptional; risk: z.ZodEnum<["read", "write", "destructive", "ungraded"]>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ approvalId: z.ZodString; tool: z.ZodString; description: z.ZodOptional; risk: z.ZodEnum<["read", "write", "destructive", "ungraded"]>; }, z.ZodTypeAny, "passthrough">>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ type: z.ZodLiteral<"data-vendo-grant-set">; toolCallId: z.ZodString; grantSetId: z.ZodString; name: z.ZodString; permissions: z.ZodArray; risk: z.ZodEnum<["read", "write", "destructive", "ungraded"]>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ approvalId: z.ZodString; tool: z.ZodString; description: z.ZodOptional; risk: z.ZodEnum<["read", "write", "destructive", "ungraded"]>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ approvalId: z.ZodString; tool: z.ZodString; description: z.ZodOptional; risk: z.ZodEnum<["read", "write", "destructive", "ungraded"]>; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ type: z.ZodLiteral<"data-vendo-grant-set">; toolCallId: z.ZodString; grantSetId: z.ZodString; name: z.ZodString; permissions: z.ZodArray; risk: z.ZodEnum<["read", "write", "destructive", "ungraded"]>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ approvalId: z.ZodString; tool: z.ZodString; description: z.ZodOptional; risk: z.ZodEnum<["read", "write", "destructive", "ungraded"]>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ approvalId: z.ZodString; tool: z.ZodString; description: z.ZodOptional; risk: z.ZodEnum<["read", "write", "destructive", "ungraded"]>; }, z.ZodTypeAny, "passthrough">>, "many">; }, z.ZodTypeAny, "passthrough">>; /** The envelope tag `vendo_knowledge_search` carries on its ok-output. The agent * tool-bridge keys on it to lift the FULL citation data onto the citations part * below BEFORE the tool-output cap can truncate * anything; named once here so producer (@vendoai/vendo/knowledge) and consumer * (@vendoai/vendo) never string-match each other. */ export declare const VENDO_KNOWLEDGE_RESULT_KIND: "vendo/knowledge-result@1"; /** One citation as the UI receives it. `title` is required on this surface * (chips render titles); the bridge falls back to the docId when an engine's * hit carries none. `visibility` rides from KnowledgeHit.visibility so the * popover origin line can state it instead of guessing. */ export interface VendoKnowledgeCitation { docId: string; chunkId?: string; title: string; source?: string; kind: KnowledgeKind; visibility: KnowledgeVisibility; snippet: string; } export declare const vendoKnowledgeCitationSchema: z.ZodObject<{ docId: z.ZodString; chunkId: z.ZodOptional; title: z.ZodString; source: z.ZodOptional; kind: z.ZodEnum<["docs", "glossary", "api"]>; visibility: z.ZodEnum<["public", "internal"]>; snippet: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ docId: z.ZodString; chunkId: z.ZodOptional; title: z.ZodString; source: z.ZodOptional; kind: z.ZodEnum<["docs", "glossary", "api"]>; visibility: z.ZodEnum<["public", "internal"]>; snippet: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ docId: z.ZodString; chunkId: z.ZodOptional; title: z.ZodString; source: z.ZodOptional; kind: z.ZodEnum<["docs", "glossary", "api"]>; visibility: z.ZodEnum<["public", "internal"]>; snippet: z.ZodString; }, z.ZodTypeAny, "passthrough">>; /** Streamed beside the native tool part when a knowledge search resolves, so * the thread renders * citation chips (answered), the structured refusal line * (insufficient-evidence), or the knowledge-unavailable flag (unavailable) * from data — never from free text. Consumers that don't recognize it * ignore it (§15 forward-compat). */ export interface VendoCitationsPart { type: "data-vendo-citations"; /** The `vendo_knowledge_search` call, for placement beside its beat. */ toolCallId: string; citations: VendoKnowledgeCitation[]; outcome: "answered" | "insufficient-evidence" | "unavailable"; } export declare const vendoCitationsPartSchema: z.ZodObject<{ type: z.ZodLiteral<"data-vendo-citations">; toolCallId: z.ZodString; citations: z.ZodArray; title: z.ZodString; source: z.ZodOptional; kind: z.ZodEnum<["docs", "glossary", "api"]>; visibility: z.ZodEnum<["public", "internal"]>; snippet: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ docId: z.ZodString; chunkId: z.ZodOptional; title: z.ZodString; source: z.ZodOptional; kind: z.ZodEnum<["docs", "glossary", "api"]>; visibility: z.ZodEnum<["public", "internal"]>; snippet: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ docId: z.ZodString; chunkId: z.ZodOptional; title: z.ZodString; source: z.ZodOptional; kind: z.ZodEnum<["docs", "glossary", "api"]>; visibility: z.ZodEnum<["public", "internal"]>; snippet: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">; outcome: z.ZodEnum<["answered", "insufficient-evidence", "unavailable"]>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ type: z.ZodLiteral<"data-vendo-citations">; toolCallId: z.ZodString; citations: z.ZodArray; title: z.ZodString; source: z.ZodOptional; kind: z.ZodEnum<["docs", "glossary", "api"]>; visibility: z.ZodEnum<["public", "internal"]>; snippet: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ docId: z.ZodString; chunkId: z.ZodOptional; title: z.ZodString; source: z.ZodOptional; kind: z.ZodEnum<["docs", "glossary", "api"]>; visibility: z.ZodEnum<["public", "internal"]>; snippet: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ docId: z.ZodString; chunkId: z.ZodOptional; title: z.ZodString; source: z.ZodOptional; kind: z.ZodEnum<["docs", "glossary", "api"]>; visibility: z.ZodEnum<["public", "internal"]>; snippet: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">; outcome: z.ZodEnum<["answered", "insufficient-evidence", "unavailable"]>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ type: z.ZodLiteral<"data-vendo-citations">; toolCallId: z.ZodString; citations: z.ZodArray; title: z.ZodString; source: z.ZodOptional; kind: z.ZodEnum<["docs", "glossary", "api"]>; visibility: z.ZodEnum<["public", "internal"]>; snippet: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ docId: z.ZodString; chunkId: z.ZodOptional; title: z.ZodString; source: z.ZodOptional; kind: z.ZodEnum<["docs", "glossary", "api"]>; visibility: z.ZodEnum<["public", "internal"]>; snippet: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ docId: z.ZodString; chunkId: z.ZodOptional; title: z.ZodString; source: z.ZodOptional; kind: z.ZodEnum<["docs", "glossary", "api"]>; visibility: z.ZodEnum<["public", "internal"]>; snippet: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">; outcome: z.ZodEnum<["answered", "insufficient-evidence", "unavailable"]>; }, z.ZodTypeAny, "passthrough">>; /** The nested wire envelope of {@link vendoViewPartSchema}. */ export declare const vendoViewWirePartSchema: z.ZodObject<{ type: z.ZodLiteral<"data-vendo-view">; data: z.ZodObject; appId: z.ZodString; payload: z.ZodObject<{ formatVersion: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">>; turnId: z.ZodOptional; }, "type">, "passthrough", z.ZodTypeAny, z.objectOutputType; appId: z.ZodString; payload: z.ZodObject<{ formatVersion: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">>; turnId: z.ZodOptional; }, "type">, z.ZodTypeAny, "passthrough">, z.objectInputType; appId: z.ZodString; payload: z.ZodObject<{ formatVersion: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">>; turnId: z.ZodOptional; }, "type">, z.ZodTypeAny, "passthrough">>; id: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ type: z.ZodLiteral<"data-vendo-view">; data: z.ZodObject; appId: z.ZodString; payload: z.ZodObject<{ formatVersion: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">>; turnId: z.ZodOptional; }, "type">, "passthrough", z.ZodTypeAny, z.objectOutputType; appId: z.ZodString; payload: z.ZodObject<{ formatVersion: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">>; turnId: z.ZodOptional; }, "type">, z.ZodTypeAny, "passthrough">, z.objectInputType; appId: z.ZodString; payload: z.ZodObject<{ formatVersion: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">>; turnId: z.ZodOptional; }, "type">, z.ZodTypeAny, "passthrough">>; id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ type: z.ZodLiteral<"data-vendo-view">; data: z.ZodObject; appId: z.ZodString; payload: z.ZodObject<{ formatVersion: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">>; turnId: z.ZodOptional; }, "type">, "passthrough", z.ZodTypeAny, z.objectOutputType; appId: z.ZodString; payload: z.ZodObject<{ formatVersion: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">>; turnId: z.ZodOptional; }, "type">, z.ZodTypeAny, "passthrough">, z.objectInputType; appId: z.ZodString; payload: z.ZodObject<{ formatVersion: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ formatVersion: z.ZodString; }, z.ZodTypeAny, "passthrough">>; turnId: z.ZodOptional; }, "type">, z.ZodTypeAny, "passthrough">>; id: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>;