/** * Zod input + output schemas for the operator-class blueprint tools. * Four tools, all `audience: 'ops'`, all served on `/control`: * * - `ggui_ops_generate_blueprint` — author a new blueprint by * dispatching through the registry's selected generator and * persisting the result. Optionally pins as the operator default * for its `(appId, contractHash)` group. * - `ggui_ops_list_blueprints` — enumerate blueprint metadata * (no code body) under the caller's app scope + optional filters. Sorted by * `createdAt desc`. * - `ggui_ops_update_blueprint` — toggle the operator-default flag * and/or patch variance tags. Immutable fields (contractHash, * appId, codeS3Url, codeHash, source, createdAt, createdBy) * never mutate; the tool MUST refuse them on input. * - `ggui_ops_delete_blueprint` — idempotent removal. Second delete * for the same id returns `{deleted: true}` — never throws. * * The schemas live in `@ggui-ai/protocol` (not the handler package) * for the same reason all wire-shape schemas do: the protocol package * is the source of truth for every MCP wire surface, and consumers * (a hosted deployment's handlers, console UI, fixture authors) can import from * one place. Handler package wraps these into `SharedHandler` * factories. */ import { z } from 'zod'; /** * `ggui_ops_generate_blueprint` input. Operator picks the contract + * optional generator override + variance tags. `setAsOperatorDefault` * pins the newly-minted blueprint as the default for its * `(appId, contractHash)` group (the store clears any prior default * in the same group, mirroring `BlueprintStore.setOperatorDefault`). * * `persona` is a top-level convenience field — handlers fold it into * the `variance.persona` slot after normalization (lowercase + trim * + Levenshtein near-dup warning). * * `appId` is optional on the input shape and defaults to the * caller's bound app identity; cross-app calls are subject to the * deployment's authorization policy. */ /** * Bound on `intent` (ggui#1046), in characters — one exported number the * door checks and readers may cap at; standalone (not tied to any other * text bound: they move independently). */ export declare const OPS_GENERATE_BLUEPRINT_INTENT_MAX_CHARS = 2000; export declare const opsGenerateBlueprintInputSchema: z.ZodObject<{ appId: z.ZodOptional; contract: z.ZodType>; generator: z.ZodOptional; persona: z.ZodOptional; aesthetic: z.ZodOptional; context: z.ZodOptional>>>; seedPrompt: z.ZodOptional; intent: z.ZodOptional; setAsOperatorDefault: z.ZodOptional; }, z.core.$strict>; /** * `ggui_ops_generate_blueprint` output. Metadata-only — the code body * lives in S3 (cloud) or the in-memory code map (OSS) and is fetched * via the existing render fast-path on cache hit. */ export declare const opsGenerateBlueprintOutputSchema: z.ZodObject<{ blueprintId: z.ZodString; codeHash: z.ZodOptional; validatorScore: z.ZodOptional; source: z.ZodType>; }, z.core.$strict>; /** * `ggui_ops_register_blueprint` input. Sibling of `*_generate_*` — no * LLM dispatch, no generator. The operator supplies the COMPONENT * CODE BYTES directly and the handler persists them under the same * `(appId, contractHash)` slot. Use cases: * * - Seeding pre-vetted blueprints at deploy time (fixture corpus, * migration imports). * - Round-tripping export+reimport — operator exports a blueprint * from one app (or one deployment) and re-registers it in another. * - Reapplying a fixed version of a blueprint after live edits * (manual recovery from a bad generate run). * * Same app-scoping + variance + default-pin semantics as * `*_generate_*`; the only difference is the LLM/generator dispatch * is replaced with a verbatim accept of the operator's * `componentCode` string. * * Provenance is STRUCTURAL on this path — the handler stamps * `source: {kind: 'user'}` on the persisted Blueprint (operator- * supplied bytes carry no engine claim, and fabricating one is * banned), so the input carries no provenance field at all. * `validatorScore` is never populated (no validator ran); operators * wanting validator metadata should round-trip through `*_generate_*` * instead. */ export declare const opsRegisterBlueprintInputSchema: z.ZodObject<{ appId: z.ZodOptional; contract: z.ZodType>; componentCode: z.ZodString; persona: z.ZodOptional; aesthetic: z.ZodOptional; context: z.ZodOptional>>>; seedPrompt: z.ZodOptional; setAsOperatorDefault: z.ZodOptional; }, z.core.$strict>; /** * `ggui_ops_register_blueprint` output. Same shape as * `*_generate_*` minus `validatorScore` (no validator runs on the * register path). */ export declare const opsRegisterBlueprintOutputSchema: z.ZodObject<{ blueprintId: z.ZodString; codeHash: z.ZodString; source: z.ZodType>; }, z.core.$strict>; /** * `ggui_ops_list_blueprints` input. `appId` is optional on the wire * and defaults to the caller's bound app identity; cross-app calls * are subject to the deployment's authorization policy. The filters * below are AND-composed against the matching `(appId, *)` view of * the store. * * Behavior split: * - When `contractHash` is the ONLY filter (no semantic keywords * or persona), handlers dispatch through * `BlueprintStore.list(appId, contractHash)` for the indexed * fast path. * - When `intentKeywords` or `persona` carry semantic intent, * handlers dispatch through `BlueprintSearch.search()` and * return the matching rows (sorted by score desc, then * `createdAt desc`). * - When no filter is supplied, handlers enumerate every blueprint * under `appId` via the search seam (which scopes by appId * internally), sorted `createdAt desc`. */ export declare const opsListBlueprintsInputSchema: z.ZodObject<{ appId: z.ZodOptional; contractHash: z.ZodOptional; generator: z.ZodOptional; persona: z.ZodOptional; intentKeywords: z.ZodOptional>; }, z.core.$strict>; export declare const opsListBlueprintsOutputSchema: z.ZodObject<{ blueprints: z.ZodArray>>; }, z.core.$strict>; /** * `ggui_ops_update_blueprint` input. Only mutable fields are present * here — `contractHash`, `codeS3Url`, `codeHash`, `source`, * `createdAt`, `createdBy` are immutable invariants and the schema * does NOT accept them. Operators who want to "replace" a row * delete + re-generate. The `appId` input below scopes the TARGET * app for authorization/routing purposes only — the blueprint's own * immutable `appId` field is never mutated by this call. */ export declare const opsUpdateBlueprintInputSchema: z.ZodObject<{ appId: z.ZodOptional; blueprintId: z.ZodString; isOperatorDefault: z.ZodOptional>; variance: z.ZodOptional>>; }, z.core.$strict>; export declare const opsUpdateBlueprintOutputSchema: z.ZodObject<{ blueprintId: z.ZodString; updatedAt: z.ZodString; }, z.core.$strict>; /** * `ggui_ops_delete_blueprint` input + output. Idempotent: the handler * returns `{deleted: true}` regardless of whether the row existed, * matching `BlueprintStore.delete`'s no-throw contract. */ export declare const opsDeleteBlueprintInputSchema: z.ZodObject<{ appId: z.ZodOptional; blueprintId: z.ZodString; }, z.core.$strict>; export declare const opsDeleteBlueprintOutputSchema: z.ZodObject<{ deleted: z.ZodLiteral; }, z.core.$strict>; /** * Inferred TS types — exposed so handler factories and tests share * one source of truth with the wire shape. Pre-launch posture: no * `@deprecated` aliases — these are the canonical names. */ export type OpsGenerateBlueprintInput = z.infer; export type OpsGenerateBlueprintOutput = z.infer; export type OpsRegisterBlueprintInput = z.infer; export type OpsRegisterBlueprintOutput = z.infer; export type OpsListBlueprintsInput = z.infer; export type OpsListBlueprintsOutput = z.infer; export type OpsUpdateBlueprintInput = z.infer; export type OpsUpdateBlueprintOutput = z.infer; export type OpsDeleteBlueprintInput = z.infer; export type OpsDeleteBlueprintOutput = z.infer; //# sourceMappingURL=ops-blueprint.d.ts.map