/** * `vendo_apps_sql` — the app's ONE reach into its own database, over the same * `requireOwned` gate every other door reads, with the single exception an app * that has no row yet forces (see `runAppSql`). * * The person is the LIVE caller: `subject` comes off the run context and never * off the tool args, so generated SQL has no field in which to name somebody * else — and no address either, which is the guard's half (app-sql-guard.ts). * That half is what the exception cannot touch: it holds whoever gets here. */ import { type RunContext, type SqlDialect, type ToolCall, type ToolDescriptor, type ToolOutcome } from "@vendoai/core"; import type { AppSqlAccess } from "../persistence/app-sql.js"; import type { AppDocument } from "../../contract/index.js"; import type { AppId } from "@vendoai/core"; export declare const VENDO_APPS_SQL_TOOL = "vendo_apps_sql"; /** The description carries the LIVE dialect, because SQL is written for one. */ export declare const appSqlDescriptor: (dialect: SqlDialect) => ToolDescriptor; export interface AppSqlDependencies { sql?: AppSqlAccess; requireOwned(appId: AppId, ctx: RunContext): Promise; /** Whether THIS caller's build is the one running for this id right now * (`doors/placement-surface.ts`). Filled by the runtime that constructs the * registry; see the ordering note in {@link runAppSql}. */ buildingFor(appId: AppId, ctx: RunContext): boolean; } export declare const runAppSql: (dependencies: AppSqlDependencies, call: ToolCall, ctx: RunContext) => Promise; //# sourceMappingURL=sql-tool.d.ts.map