@ggui-ai/protocol 0.16.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gadgets/stdlib-gadgets.d.ts +1 -1
- package/dist/gadgets/stdlib-gadgets.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -2
- package/dist/integrations/mcp-apps.d.ts +91 -8
- package/dist/integrations/mcp-apps.d.ts.map +1 -1
- package/dist/integrations/mcp-apps.js +62 -12
- package/dist/integrations/overlay-hash.d.ts +1 -1
- package/dist/integrations/overlay-hash.d.ts.map +1 -1
- package/dist/schemas/app-generation-profile.d.ts +200 -0
- package/dist/schemas/app-generation-profile.d.ts.map +1 -0
- package/dist/schemas/app-generation-profile.js +168 -0
- package/dist/schemas/app-theme.d.ts +274 -0
- package/dist/schemas/app-theme.d.ts.map +1 -1
- package/dist/schemas/app-theme.js +219 -0
- package/dist/schemas/data-contract.d.ts +46 -0
- package/dist/schemas/data-contract.d.ts.map +1 -1
- package/dist/schemas/data-contract.js +162 -0
- package/dist/schemas/mcp.d.ts +14 -5
- package/dist/schemas/mcp.d.ts.map +1 -1
- package/dist/schemas/mcp.js +15 -6
- package/dist/schemas/ops-blueprint.d.ts +7 -0
- package/dist/schemas/ops-blueprint.d.ts.map +1 -1
- package/dist/schemas/ops-blueprint.js +12 -0
- package/dist/schemas/rendering-context.d.ts +48 -0
- package/dist/schemas/rendering-context.d.ts.map +1 -0
- package/dist/schemas/rendering-context.js +39 -0
- package/dist/types/data-contract.d.ts +15 -1
- package/dist/types/data-contract.d.ts.map +1 -1
- package/dist/types/render.d.ts +3 -2
- package/dist/types/render.d.ts.map +1 -1
- package/dist/version.d.ts +101 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +101 -1
- package/package.json +1 -1
|
@@ -102,6 +102,64 @@ const keyframesText = z
|
|
|
102
102
|
.string()
|
|
103
103
|
.max(8192)
|
|
104
104
|
.refine(isKeyframesText, 'keyframes must be `@keyframes <name> { … }` blocks and nothing else');
|
|
105
|
+
/**
|
|
106
|
+
* https-only asset URL with a well-formed host — the theme document's rule
|
|
107
|
+
* for a declared face (ggui#987 §5), now the wire's rule for every asset an
|
|
108
|
+
* AppTheme names. Grammar only: nothing here is fetched.
|
|
109
|
+
*/
|
|
110
|
+
function isHttpsAssetUrl(src) {
|
|
111
|
+
let url;
|
|
112
|
+
try {
|
|
113
|
+
url = new URL(src);
|
|
114
|
+
}
|
|
115
|
+
catch {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
return url.protocol === 'https:' && /^[a-z0-9.-]+$/i.test(url.hostname) && url.hostname.includes('.');
|
|
119
|
+
}
|
|
120
|
+
const httpsAssetUrl = z.string().min(1).refine(isHttpsAssetUrl, 'src must be an https: URL with a well-formed host');
|
|
121
|
+
/**
|
|
122
|
+
* One declared font face (ggui#987 §5; lifted here for ggui#1093 / #990 so the
|
|
123
|
+
* theme DOCUMENT's `typography.faces` and the AppTheme WIRE's `fonts` share
|
|
124
|
+
* ONE grammar — `@ggui-ai/project-config` imports this schema for the
|
|
125
|
+
* document door). `src` MUST be `https:` with a well-formed host; the face is
|
|
126
|
+
* DECLARED, never fetched by any door: the render host unions the origin into
|
|
127
|
+
* its `font-src`, the shell renders the `@font-face` rule, and a face that
|
|
128
|
+
* fails to load in the browser falls back down the family's stack.
|
|
129
|
+
*/
|
|
130
|
+
export const fontFaceDeclarationSchema = z.strictObject({
|
|
131
|
+
family: z.string().min(1).refine((f) => !/[\r\n]/.test(f), 'family must be one line'),
|
|
132
|
+
src: httpsAssetUrl,
|
|
133
|
+
weight: z.union([z.string().min(1), z.number().int().min(1).max(1000)]).optional(),
|
|
134
|
+
style: z.string().min(1).optional(),
|
|
135
|
+
display: z.string().min(1).optional(),
|
|
136
|
+
});
|
|
137
|
+
/** The most faces one theme may declare on the wire — a CSP and a `<style>` block stay bounded. */
|
|
138
|
+
export const APP_THEME_FONTS_MAX = 16;
|
|
139
|
+
/** The imagery slots a theme may fill (ggui#1093): a brand mark, a hero image, a repeating pattern. */
|
|
140
|
+
export const APP_THEME_IMAGERY_KINDS = ['mark', 'hero', 'pattern'];
|
|
141
|
+
/**
|
|
142
|
+
* One image asset: https-only `src` (never fetched by a door), an optional
|
|
143
|
+
* `alt` (≤ 200) and an optional `tone` — the image's own tonality (`light` /
|
|
144
|
+
* `dark`), so a composer can place ink over it without sampling pixels.
|
|
145
|
+
*/
|
|
146
|
+
export const appThemeImageAssetSchema = z.strictObject({
|
|
147
|
+
src: httpsAssetUrl,
|
|
148
|
+
alt: z.string().max(200).optional(),
|
|
149
|
+
tone: z.enum(['light', 'dark']).optional(),
|
|
150
|
+
});
|
|
151
|
+
/**
|
|
152
|
+
* The host's imagery, by slot (ggui#1093, #1075 Track C (a)). Parties: a
|
|
153
|
+
* WRITER (an operator's design tooling, or a harvest of the host page) declares; the WRITE door
|
|
154
|
+
* validates this grammar and nothing more; the render host unions every
|
|
155
|
+
* `src` origin into its `img-src`; the composer reads the slots through
|
|
156
|
+
* the design primitives. Absent ⇒ no imagery, today's card.
|
|
157
|
+
*/
|
|
158
|
+
export const appThemeImagerySchema = z.strictObject({
|
|
159
|
+
mark: appThemeImageAssetSchema.optional(),
|
|
160
|
+
hero: appThemeImageAssetSchema.optional(),
|
|
161
|
+
pattern: appThemeImageAssetSchema.optional(),
|
|
162
|
+
});
|
|
105
163
|
export const appThemeSchema = z
|
|
106
164
|
.object({
|
|
107
165
|
/**
|
|
@@ -140,17 +198,178 @@ export const appThemeSchema = z
|
|
|
140
198
|
* root-children border-suppression rule.
|
|
141
199
|
*/
|
|
142
200
|
frameless: z.boolean().optional(),
|
|
201
|
+
/**
|
|
202
|
+
* Declared font faces (ggui#1093 / #990 — the hosted carrier for the
|
|
203
|
+
* document's `typography.faces`): 1..{@link APP_THEME_FONTS_MAX} faces,
|
|
204
|
+
* each {@link fontFaceDeclarationSchema}. OUTSIDE the attestation:
|
|
205
|
+
* `overlayHash` covers `{ overlays, cssVariables, keyframes }` only
|
|
206
|
+
* (`integrations/overlay-hash.ts`, `OverlayHashInput`) — a face is a
|
|
207
|
+
* declared asset, not a derived projection. A reader on a release that
|
|
208
|
+
* does not name this member strips it at its read door and paints the
|
|
209
|
+
* colours without the faces (`appThemeReadSchema`, VERSION-POLICY §3.6).
|
|
210
|
+
*/
|
|
211
|
+
fonts: z.array(fontFaceDeclarationSchema).min(1).max(APP_THEME_FONTS_MAX).optional(),
|
|
212
|
+
/** The host's imagery by slot — {@link appThemeImagerySchema}; outside the attestation, same as `fonts`. */
|
|
213
|
+
imagery: appThemeImagerySchema.optional(),
|
|
143
214
|
})
|
|
144
215
|
.strict();
|
|
216
|
+
/**
|
|
217
|
+
* The READ-door posture (ggui#1093 belt, 2026-09-15; VERSION-POLICY §3.6).
|
|
218
|
+
*
|
|
219
|
+
* `appThemeSchema` is the WRITE door: strict, an unknown top-level member is
|
|
220
|
+
* refused (`invalid_app_config`). A READ door — a stored row turned into
|
|
221
|
+
* paint, a carried `_meta["ai.ggui/render"].theme` slice — parses with THIS
|
|
222
|
+
* schema instead: an unknown TOP-LEVEL member is stripped, the overlays are
|
|
223
|
+
* kept, and the caller reports what it stripped (one line per read, keys
|
|
224
|
+
* only, never theme content). Everything below the top level is unchanged —
|
|
225
|
+
* nested objects stay strict, token grammar and value safety still refuse,
|
|
226
|
+
* the v1 shape still refuses — and the attestation is untouched because
|
|
227
|
+
* `overlayHash` covers `{ overlays, cssVariables, keyframes }` only.
|
|
228
|
+
*
|
|
229
|
+
* Why: a reader on release N−1 meeting a member release N added would
|
|
230
|
+
* otherwise drop the WHOLE theme — colours and all — until it rolled
|
|
231
|
+
* (guuey#1266's class). Parties: every read door of an `AppTheme` MUST use
|
|
232
|
+
* this variant (or {@link parseAppThemeAtReadDoor}); every write door MUST
|
|
233
|
+
* stay on `appThemeSchema`. Observable violation: a read door dropping a
|
|
234
|
+
* theme whose overlays are valid because of an unknown top-level member —
|
|
235
|
+
* the kit's `n1-compat` forward case grades it.
|
|
236
|
+
*/
|
|
237
|
+
export const appThemeReadSchema = z.object(appThemeSchema.shape);
|
|
238
|
+
/**
|
|
239
|
+
* Parse a stored or carried theme at a READ door: `ok` with the theme and
|
|
240
|
+
* the top-level members that were stripped (payload order, `[]` when none),
|
|
241
|
+
* or the issues in `path: message` form when the theme is refused for a
|
|
242
|
+
* reason the write door would also refuse.
|
|
243
|
+
*
|
|
244
|
+
* TWO READ PATHS, OPPOSITE OBLIGATIONS — they sit next to each other and
|
|
245
|
+
* they are NOT the same door (ggui#1124; do not "tidy" them into one):
|
|
246
|
+
*
|
|
247
|
+
* **a read whose purpose is to INTERPRET state strips unknown members
|
|
248
|
+
* and names what it stripped; a read whose purpose is to REPRODUCE
|
|
249
|
+
* state must not strip at all.**
|
|
250
|
+
*
|
|
251
|
+
* This function is the INTERPRET side — a server painting a theme, an
|
|
252
|
+
* operator surface rendering one — and a reader must not be handed data it
|
|
253
|
+
* cannot validate.
|
|
254
|
+
* The REPRODUCE side is a writer's CARRY path, which receives the stored
|
|
255
|
+
* document VERBATIM, including members this release does not name: its job
|
|
256
|
+
* is fidelity, not interpretation. Applying THIS strip to a carry path is
|
|
257
|
+
* the ggui#1124 defect exactly — the writer carries a stripped document,
|
|
258
|
+
* writes it back, and destroys the members the belt exists to protect.
|
|
259
|
+
*/
|
|
260
|
+
export function parseAppThemeAtReadDoor(input) {
|
|
261
|
+
const r = appThemeReadSchema.safeParse(input);
|
|
262
|
+
if (!r.success) {
|
|
263
|
+
return { ok: false, issues: r.error.issues.map((i) => `${i.path.join('.')}: ${i.message}`) };
|
|
264
|
+
}
|
|
265
|
+
const known = new Set(Object.keys(appThemeSchema.shape));
|
|
266
|
+
const stripped = typeof input === 'object' && input !== null && !Array.isArray(input)
|
|
267
|
+
? Object.keys(input).filter((k) => !known.has(k))
|
|
268
|
+
: [];
|
|
269
|
+
return { ok: true, theme: r.data, stripped };
|
|
270
|
+
}
|
|
145
271
|
/**
|
|
146
272
|
* The ONE refusal body every write door returns for an overlay it will not
|
|
147
273
|
* store (ggui#987 §3.4): REST 422 `invalid_app_config`, the AppSync
|
|
148
274
|
* `errorInfo`, the MCP ops door's `{ ok: false }` structured content. A
|
|
149
275
|
* discriminated union by key — exactly one of the four.
|
|
150
276
|
*/
|
|
277
|
+
/**
|
|
278
|
+
* The top-level members the STORED theme holds that an incoming write does
|
|
279
|
+
* not carry — i.e. exactly what the write would destroy (ggui#1124).
|
|
280
|
+
*
|
|
281
|
+
* `putAppTheme` REPLACES the whole `theme` attribute (the shared writer's
|
|
282
|
+
* `SET theme = :theme`), so a writer that composes fewer members than the
|
|
283
|
+
* stored document silently deletes the rest. On 2026-09-10, 26 rows lost
|
|
284
|
+
* their theme outright and ~20 more lost members nobody can now name,
|
|
285
|
+
* because a writer believed the door merged. **The rule lives here because
|
|
286
|
+
* what makes a write destructive is a fact about the wire shape, not about
|
|
287
|
+
* a storage engine** — the shared writer enforces it at the choke point, so
|
|
288
|
+
* safety does not depend on each door remembering.
|
|
289
|
+
*
|
|
290
|
+
* Deliberately total and deliberately dumb: it compares TOP-LEVEL keys and
|
|
291
|
+
* nothing else. A changed VALUE is not a drop. An explicit `undefined` IS a
|
|
292
|
+
* drop, because absent and undefined are the same wire fact. A member this
|
|
293
|
+
* release does not name still counts — that is the whole point, since a
|
|
294
|
+
* strict schema cannot see the member a later release wrote, and a
|
|
295
|
+
* whole-column write is exactly what destroys it. Given anything that is not
|
|
296
|
+
* a plain object on either side it reports nothing rather than inventing a
|
|
297
|
+
* drop: a guard that guesses is worse than one that abstains.
|
|
298
|
+
*
|
|
299
|
+
* Parties: the SHARED WRITER calls this before writing and refuses a
|
|
300
|
+
* non-empty result with {@link appThemeRefusalBodySchema}'s `wouldDrop` arm,
|
|
301
|
+
* naming the members; the WRITER retries carrying them (read the stored
|
|
302
|
+
* document, carry what it does not own by REST OMISSION — never by
|
|
303
|
+
* enumerating what it knows — and hash after the carry). Observable
|
|
304
|
+
* violation: a stored member absent after a write that did not name it.
|
|
305
|
+
*/
|
|
306
|
+
export function appThemeDroppedMembers(stored, incoming) {
|
|
307
|
+
if (!isPlainObject(stored) || !isPlainObject(incoming))
|
|
308
|
+
return [];
|
|
309
|
+
return Object.keys(stored).filter((key) => incoming[key] === undefined);
|
|
310
|
+
}
|
|
311
|
+
function isPlainObject(value) {
|
|
312
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* The ONE wording for a `wouldDrop` refusal (ggui#1124, founder's ruling
|
|
316
|
+
* 2026-09-16: *"the refusal names the clear-then-set path"*). Exported so
|
|
317
|
+
* every door that refuses a destructive theme write carries the SAME words
|
|
318
|
+
* rather than paraphrasing them — a writer meeting two different
|
|
319
|
+
* explanations of one rule learns neither.
|
|
320
|
+
*
|
|
321
|
+
* Why the wording is part of the contract and not decoration: **a refusal
|
|
322
|
+
* with no compliance path converts "we protected your data" into "we broke
|
|
323
|
+
* your write", and the writer cannot tell which happened to them.** Naming
|
|
324
|
+
* the path collapses that ambiguity — it turns the refusal from a VERDICT
|
|
325
|
+
* into an INSTRUCTION. So the text MUST do three things, and the tests pin
|
|
326
|
+
* each: name the members that would have been dropped (so a writer can see
|
|
327
|
+
* whether they meant it), give the carry path for a writer who did not, and
|
|
328
|
+
* give the clear-then-set path for a writer who did — stating plainly that
|
|
329
|
+
* the app has no theme between those two writes, because that is the kind
|
|
330
|
+
* of fact a caller must not discover in production.
|
|
331
|
+
*
|
|
332
|
+
* The CLEAR half names an OUTCOME, not a mechanism, and that is deliberate
|
|
333
|
+
* (ggui#1124, from cloud's per-door measurement): `theme: null` clears on
|
|
334
|
+
* exactly ONE of the four doors that write a theme — the provisioning theme
|
|
335
|
+
* door. On the other three a writer following a universal `theme: null`
|
|
336
|
+
* instruction gets a SECOND refusal, which is the verdict-without-a-path
|
|
337
|
+
* this ruling exists to prevent, reintroduced by the text meant to prevent
|
|
338
|
+
* it. The CARRY half needs no such hedge: it is implementable on every
|
|
339
|
+
* door, which is why it is stated first and unconditionally.
|
|
340
|
+
*
|
|
341
|
+
* The better end state is uniform — `theme: null` clearing at the shared
|
|
342
|
+
* writer so all four doors honour one mechanism — but that is a change to
|
|
343
|
+
* three doors' semantics and belongs to its own decision with cloud, not to
|
|
344
|
+
* a wording fix.
|
|
345
|
+
*
|
|
346
|
+
* Throws on an empty list: a refusal that names nothing is not an
|
|
347
|
+
* instruction.
|
|
348
|
+
*/
|
|
349
|
+
export function appThemeWouldDropRefusalText(wouldDrop) {
|
|
350
|
+
if (wouldDrop.length === 0) {
|
|
351
|
+
throw new Error('appThemeWouldDropRefusalText: a refusal must name at least one dropped member');
|
|
352
|
+
}
|
|
353
|
+
const members = wouldDrop.join(', ');
|
|
354
|
+
return (`this write would drop stored theme members it does not carry — [${members}]. ` +
|
|
355
|
+
`If you did not mean to drop them: read the stored theme and carry every member this write does not own, ` +
|
|
356
|
+
`then recompute the attestation over the result. ` +
|
|
357
|
+
`If you DID mean to drop them: CLEAR the stored theme first, then write the theme you want — ` +
|
|
358
|
+
`the app has NO theme between those two writes. How you clear DEPENDS ON THE DOOR: the provisioning ` +
|
|
359
|
+
`theme door clears on \`theme: null\`; other doors differ, so use the clear operation of the door you ` +
|
|
360
|
+
`are calling rather than assuming this one.`);
|
|
361
|
+
}
|
|
151
362
|
export const appThemeRefusalBodySchema = z.union([
|
|
152
363
|
z.object({ uncovered: z.object({ light: z.array(z.string()), dark: z.array(z.string()) }).strict() }).strict(),
|
|
153
364
|
z.object({ unknown: z.object({ light: z.array(z.string()), dark: z.array(z.string()) }).strict() }).strict(),
|
|
154
365
|
z.object({ overlayHash: z.literal('mismatch') }).strict(),
|
|
155
366
|
z.object({ refused: z.literal('v1 shape') }).strict(),
|
|
367
|
+
/**
|
|
368
|
+
* The write would have DESTROYED stored members it did not carry
|
|
369
|
+
* (ggui#1124) — the refusal names them so the writer can carry them on
|
|
370
|
+
* the retry. A refusal that named nothing would be an error message
|
|
371
|
+
* instead of a teaching one, which is why the list may not be empty:
|
|
372
|
+
* naming the members is how the console got fixed.
|
|
373
|
+
*/
|
|
374
|
+
z.object({ wouldDrop: z.array(z.string().min(1)).min(1) }).strict(),
|
|
156
375
|
]);
|
|
@@ -107,6 +107,7 @@ export declare const actionEntrySchema: z.ZodObject<{
|
|
|
107
107
|
example: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
108
108
|
icon: z.ZodOptional<z.ZodString>;
|
|
109
109
|
confirm: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
+
oneShot: z.ZodOptional<z.ZodBoolean>;
|
|
110
111
|
nextStep: z.ZodOptional<z.ZodString>;
|
|
111
112
|
}, z.core.$strict>;
|
|
112
113
|
/** {@link ActionSpec} — flat `Record<name, ActionEntry>`. */
|
|
@@ -117,6 +118,7 @@ export declare const actionSpecSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
117
118
|
example: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
118
119
|
icon: z.ZodOptional<z.ZodString>;
|
|
119
120
|
confirm: z.ZodOptional<z.ZodBoolean>;
|
|
121
|
+
oneShot: z.ZodOptional<z.ZodBoolean>;
|
|
120
122
|
nextStep: z.ZodOptional<z.ZodString>;
|
|
121
123
|
}, z.core.$strict>>;
|
|
122
124
|
/** {@link StreamChannelEntry} — per-channel metadata in a {@link StreamSpec}. */
|
|
@@ -789,5 +791,49 @@ export declare const DATA_CONTRACT_MINIMAL_EXAMPLE: {
|
|
|
789
791
|
};
|
|
790
792
|
};
|
|
791
793
|
};
|
|
794
|
+
/**
|
|
795
|
+
* The contract READ-door result (ggui#1115): the contract as this release
|
|
796
|
+
* can read it, plus the entry members it had to strip to get there.
|
|
797
|
+
*/
|
|
798
|
+
export type DataContractReadDoorResult = {
|
|
799
|
+
readonly ok: true;
|
|
800
|
+
readonly contract: DataContract;
|
|
801
|
+
readonly stripped: readonly string[];
|
|
802
|
+
} | {
|
|
803
|
+
readonly ok: false;
|
|
804
|
+
readonly issues: readonly string[];
|
|
805
|
+
};
|
|
806
|
+
/**
|
|
807
|
+
* Parse a STORED contract at a READ door (ggui#1115).
|
|
808
|
+
*
|
|
809
|
+
* `dataContractSchema`'s outer object is `.passthrough()`, so a whole new
|
|
810
|
+
* top-level spec was never the hazard — but its ENTRY schemas are
|
|
811
|
+
* `.strict()`, and contracts are STORED (blueprint rows, artifact
|
|
812
|
+
* manifests). So a release that adds a member to an action / prop / stream /
|
|
813
|
+
* context / tool ENTRY makes every older reader fail the parse, and a reader
|
|
814
|
+
* that turns a failed parse into "no candidate" drops the row from the match
|
|
815
|
+
* set: the generator runs again, a different card is produced, and nothing
|
|
816
|
+
* anywhere says a stored blueprint was skipped. A silent cache miss, not a
|
|
817
|
+
* failure — which is why this door exists and why it NAMES what it stripped.
|
|
818
|
+
*
|
|
819
|
+
* WRITE doors keep entry strictness and MUST: it is what catches a typo in a
|
|
820
|
+
* generated contract before it is stored, and relaxing it globally would
|
|
821
|
+
* trade a silent cache miss for silently stored garbage. The asymmetry is by
|
|
822
|
+
* DOOR, exactly as for `AppTheme` (`schemas/app-theme.ts`, VERSION-POLICY
|
|
823
|
+
* §3.6): this is the INTERPRET side, so it strips and reports; a read whose
|
|
824
|
+
* purpose is to REPRODUCE state (a writer's carry path) must not strip at
|
|
825
|
+
* all.
|
|
826
|
+
*
|
|
827
|
+
* Everything the write door refuses is still refused — a missing required
|
|
828
|
+
* field, a wrong type, a malformed spec. Only members this release does not
|
|
829
|
+
* NAME are stripped, never members it finds INVALID.
|
|
830
|
+
*
|
|
831
|
+
* NOT COVERED, deliberately and named rather than discovered: the gadget
|
|
832
|
+
* family under `clientCapabilities`. Its descriptors are validated per row
|
|
833
|
+
* with their own salvage posture (`strictGadgetDescriptorSchema`), evolve on
|
|
834
|
+
* their own surface, and folding them in here would put two different
|
|
835
|
+
* evolution stories behind one door.
|
|
836
|
+
*/
|
|
837
|
+
export declare function parseDataContractAtReadDoor(input: unknown): DataContractReadDoorResult;
|
|
792
838
|
export declare const dataContractSchema: z.ZodType<DataContract>;
|
|
793
839
|
//# sourceMappingURL=data-contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-contract.d.ts","sourceRoot":"","sources":["../../src/schemas/data-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,UAAU,EACV,UAAU,EACX,MAAM,wBAAwB,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAYhD,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,gBAAgB,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAyC,CAAC;AAmB7F,eAAO,MAAM,gBAAgB,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CA2BlD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;;;;;;kBASjB,CAAC;AAEZ,sFAAsF;AACtF,eAAO,MAAM,eAAe;;;;;;;;;;kBAKjB,CAAC;AAEZ;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"data-contract.d.ts","sourceRoot":"","sources":["../../src/schemas/data-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,UAAU,EACV,UAAU,EACX,MAAM,wBAAwB,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM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;;;;;;;;;;;GA4BG;AACH;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,QAQa,CAAC;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAehC,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAClC;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAC5F;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC;AA2C/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,0BAA0B,CAmEtF;AAED,eAAO,MAAM,kBAAkB,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAiCZ,CAAC"}
|
|
@@ -158,7 +158,69 @@ export const actionEntrySchema = z
|
|
|
158
158
|
schema: jsonSchemaSchema.optional(),
|
|
159
159
|
example: jsonValueSchema.optional(),
|
|
160
160
|
icon: z.string().optional(),
|
|
161
|
+
/**
|
|
162
|
+
* The author marks this action GRAVE (ggui#1112).
|
|
163
|
+
*
|
|
164
|
+
* ADVISORY, and honoured by exactly one party: `@ggui-ai/ui-gen`'s
|
|
165
|
+
* contract context renders it to the composing model as INFORMATION —
|
|
166
|
+
* *"the author marked this action grave enough to confirm before it
|
|
167
|
+
* fires"* — alongside `label`, `description`, `example` and `nextStep`.
|
|
168
|
+
* The model decides what to do with it. That is the same standing
|
|
169
|
+
* `nextStep` has: a declared field with a named consumer and no
|
|
170
|
+
* mechanical enforcer, which is legitimate as long as it says so.
|
|
171
|
+
*
|
|
172
|
+
* DO NOT promote it to a rule without re-measuring. Citing `confirm` in
|
|
173
|
+
* the generator's terminal-actions section MEASURED ZERO — two wordings,
|
|
174
|
+
* n = 4 each, a `save` action carrying `confirm: true` came back armed
|
|
175
|
+
* 0/4 and 0/4 (rnd, ggui#1108 narrowing). The finding that explains it:
|
|
176
|
+
* the field says GRAVITY, not at-most-once, and the model reads it that
|
|
177
|
+
* way. `confirm` asks BEFORE firing; {@link ActionEntry.oneShot} bounds
|
|
178
|
+
* HOW OFTEN it may fire. Siblings in intent, different questions, and an
|
|
179
|
+
* action may declare either, both or neither.
|
|
180
|
+
*
|
|
181
|
+
* Emitted today by the shipped system blueprints on destructive ops
|
|
182
|
+
* (`ggui_ops_revoke_connector_key`), so it is a live author signal and
|
|
183
|
+
* not a vestigial field.
|
|
184
|
+
*
|
|
185
|
+
* Observable violation: a contract declaring `confirm: true` whose
|
|
186
|
+
* rendered contract context omits the flag — pinned in ui-gen's
|
|
187
|
+
* `design-mode.pin.test.ts`.
|
|
188
|
+
*/
|
|
161
189
|
confirm: z.boolean().optional(),
|
|
190
|
+
/**
|
|
191
|
+
* This action may fire AT MOST ONCE per render (ggui#1108).
|
|
192
|
+
*
|
|
193
|
+
* DECLARED, never inferred — that is the whole design. The runtime
|
|
194
|
+
* cannot infer terminality; the server cannot tell a double-fire from a
|
|
195
|
+
* legitimate second "add item"; and the component cannot GUARANTEE it,
|
|
196
|
+
* because whether a generated control disables itself is decided afresh
|
|
197
|
+
* by a model on every generation. Only the contract's author knows, so
|
|
198
|
+
* the contract is where it is said.
|
|
199
|
+
*
|
|
200
|
+
* Obligations: the RUNTIME suppresses a second dispatch of a declared
|
|
201
|
+
* one-shot action for the render's lifetime; the RELAY never collapses
|
|
202
|
+
* distinct `actionId`s — two gestures are two facts and the relay stays
|
|
203
|
+
* honest about them; the AGENT treats `actionId` as an idempotency key
|
|
204
|
+
* for EVERY action, which buys at-most-once per DISPATCH (a replay, a
|
|
205
|
+
* re-delivered buffer) and explicitly NOT per intent, since a second
|
|
206
|
+
* gesture mints a new `actionId`.
|
|
207
|
+
*
|
|
208
|
+
* THE WINDOW, stated because "the render's lifetime" is ambiguous
|
|
209
|
+
* otherwise: a fresh `ggui_render` RE-ARMS the action; a `ggui_update`
|
|
210
|
+
* or props amend of the SAME render does NOT. So an agent re-sending
|
|
211
|
+
* props after a submit ("confirmed, here is your receipt") cannot
|
|
212
|
+
* silently re-arm a terminal action. A flow that legitimately
|
|
213
|
+
* re-submits either does not declare the action one-shot, or renders a
|
|
214
|
+
* new card — the declarer's choice, which is the point of declaring.
|
|
215
|
+
*
|
|
216
|
+
* Sibling, not a pair: `confirm` asks BEFORE firing; `oneShot` bounds
|
|
217
|
+
* how often it may fire. An action may be either, both or neither.
|
|
218
|
+
*
|
|
219
|
+
* Failure mode: a duplicated side effect — a confirm card that writes
|
|
220
|
+
* twice. Observable violation: two consume entries with distinct
|
|
221
|
+
* `actionId`s for the same declared one-shot action inside one render.
|
|
222
|
+
*/
|
|
223
|
+
oneShot: z.boolean().optional(),
|
|
162
224
|
nextStep: z.string().min(1).optional(),
|
|
163
225
|
})
|
|
164
226
|
.strict();
|
|
@@ -687,6 +749,106 @@ export const DATA_CONTRACT_MINIMAL_EXAMPLE = {
|
|
|
687
749
|
filter: { schema: { type: 'string' }, default: 'all' },
|
|
688
750
|
},
|
|
689
751
|
};
|
|
752
|
+
function isEntryObject(value) {
|
|
753
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Strip the keys of one ENTRY that this release does not name, recording the
|
|
757
|
+
* path of each. Returns the entry unchanged when there is nothing to strip,
|
|
758
|
+
* so an untouched contract keeps object identity where it can.
|
|
759
|
+
*/
|
|
760
|
+
function stripEntry(entry, known, path, stripped) {
|
|
761
|
+
if (!isEntryObject(entry))
|
|
762
|
+
return entry;
|
|
763
|
+
const extra = Object.keys(entry).filter((k) => !known.has(k));
|
|
764
|
+
if (extra.length === 0)
|
|
765
|
+
return entry;
|
|
766
|
+
const out = {};
|
|
767
|
+
for (const [k, v] of Object.entries(entry)) {
|
|
768
|
+
if (known.has(k))
|
|
769
|
+
out[k] = v;
|
|
770
|
+
else
|
|
771
|
+
stripped.push(`${path}.${k}`);
|
|
772
|
+
}
|
|
773
|
+
return out;
|
|
774
|
+
}
|
|
775
|
+
/** Strip every entry of a `Record<name, Entry>` map. */
|
|
776
|
+
function stripEntryMap(map, known, path, stripped) {
|
|
777
|
+
if (!isEntryObject(map))
|
|
778
|
+
return map;
|
|
779
|
+
const out = {};
|
|
780
|
+
for (const [name, entry] of Object.entries(map)) {
|
|
781
|
+
out[name] = stripEntry(entry, known, `${path}.${name}`, stripped);
|
|
782
|
+
}
|
|
783
|
+
return out;
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* Parse a STORED contract at a READ door (ggui#1115).
|
|
787
|
+
*
|
|
788
|
+
* `dataContractSchema`'s outer object is `.passthrough()`, so a whole new
|
|
789
|
+
* top-level spec was never the hazard — but its ENTRY schemas are
|
|
790
|
+
* `.strict()`, and contracts are STORED (blueprint rows, artifact
|
|
791
|
+
* manifests). So a release that adds a member to an action / prop / stream /
|
|
792
|
+
* context / tool ENTRY makes every older reader fail the parse, and a reader
|
|
793
|
+
* that turns a failed parse into "no candidate" drops the row from the match
|
|
794
|
+
* set: the generator runs again, a different card is produced, and nothing
|
|
795
|
+
* anywhere says a stored blueprint was skipped. A silent cache miss, not a
|
|
796
|
+
* failure — which is why this door exists and why it NAMES what it stripped.
|
|
797
|
+
*
|
|
798
|
+
* WRITE doors keep entry strictness and MUST: it is what catches a typo in a
|
|
799
|
+
* generated contract before it is stored, and relaxing it globally would
|
|
800
|
+
* trade a silent cache miss for silently stored garbage. The asymmetry is by
|
|
801
|
+
* DOOR, exactly as for `AppTheme` (`schemas/app-theme.ts`, VERSION-POLICY
|
|
802
|
+
* §3.6): this is the INTERPRET side, so it strips and reports; a read whose
|
|
803
|
+
* purpose is to REPRODUCE state (a writer's carry path) must not strip at
|
|
804
|
+
* all.
|
|
805
|
+
*
|
|
806
|
+
* Everything the write door refuses is still refused — a missing required
|
|
807
|
+
* field, a wrong type, a malformed spec. Only members this release does not
|
|
808
|
+
* NAME are stripped, never members it finds INVALID.
|
|
809
|
+
*
|
|
810
|
+
* NOT COVERED, deliberately and named rather than discovered: the gadget
|
|
811
|
+
* family under `clientCapabilities`. Its descriptors are validated per row
|
|
812
|
+
* with their own salvage posture (`strictGadgetDescriptorSchema`), evolve on
|
|
813
|
+
* their own surface, and folding them in here would put two different
|
|
814
|
+
* evolution stories behind one door.
|
|
815
|
+
*/
|
|
816
|
+
export function parseDataContractAtReadDoor(input) {
|
|
817
|
+
const issuesOf = (error) => error.issues.map((i) => `${i.path.join('.')}: ${i.message}`);
|
|
818
|
+
if (!isEntryObject(input)) {
|
|
819
|
+
const direct = dataContractSchema.safeParse(input);
|
|
820
|
+
return direct.success
|
|
821
|
+
? { ok: true, contract: direct.data, stripped: [] }
|
|
822
|
+
: { ok: false, issues: issuesOf(direct.error) };
|
|
823
|
+
}
|
|
824
|
+
const stripped = [];
|
|
825
|
+
const cleaned = { ...input };
|
|
826
|
+
const propsSpec = cleaned['propsSpec'];
|
|
827
|
+
if (isEntryObject(propsSpec)) {
|
|
828
|
+
cleaned['propsSpec'] = {
|
|
829
|
+
...propsSpec,
|
|
830
|
+
properties: stripEntryMap(propsSpec['properties'], new Set(Object.keys(propEntrySchema.shape)), 'propsSpec.properties', stripped),
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
cleaned['actionSpec'] = stripEntryMap(cleaned['actionSpec'], new Set(Object.keys(actionEntrySchema.shape)), 'actionSpec', stripped);
|
|
834
|
+
cleaned['streamSpec'] = stripEntryMap(cleaned['streamSpec'], new Set(Object.keys(streamChannelEntrySchema.shape)), 'streamSpec', stripped);
|
|
835
|
+
cleaned['contextSpec'] = stripEntryMap(cleaned['contextSpec'], new Set(Object.keys(contextEntrySchema.shape)), 'contextSpec', stripped);
|
|
836
|
+
const agentCapabilities = cleaned['agentCapabilities'];
|
|
837
|
+
if (isEntryObject(agentCapabilities)) {
|
|
838
|
+
cleaned['agentCapabilities'] = {
|
|
839
|
+
...agentCapabilities,
|
|
840
|
+
tools: stripEntryMap(agentCapabilities['tools'], new Set(Object.keys(agentToolEntrySchema.shape)), 'agentCapabilities.tools', stripped),
|
|
841
|
+
};
|
|
842
|
+
}
|
|
843
|
+
for (const key of ['actionSpec', 'streamSpec', 'contextSpec']) {
|
|
844
|
+
if (cleaned[key] === undefined)
|
|
845
|
+
delete cleaned[key];
|
|
846
|
+
}
|
|
847
|
+
const parsed = dataContractSchema.safeParse(cleaned);
|
|
848
|
+
return parsed.success
|
|
849
|
+
? { ok: true, contract: parsed.data, stripped }
|
|
850
|
+
: { ok: false, issues: issuesOf(parsed.error) };
|
|
851
|
+
}
|
|
690
852
|
export const dataContractSchema = z
|
|
691
853
|
.object({
|
|
692
854
|
propsSpec: propsSpecSchema
|
package/dist/schemas/mcp.d.ts
CHANGED
|
@@ -846,11 +846,20 @@ export declare const declareToolCatalogOutputSchema: z.ZodObject<{
|
|
|
846
846
|
*/
|
|
847
847
|
export declare const RUNTIME_PULL_MAX_LIMIT = 100;
|
|
848
848
|
/**
|
|
849
|
-
* Server-side ceiling on `ggui_runtime_pull`'s `wait` hold, in seconds
|
|
850
|
-
*
|
|
851
|
-
*
|
|
852
|
-
*
|
|
853
|
-
*
|
|
849
|
+
* Server-side ceiling on `ggui_runtime_pull`'s `wait` hold, in seconds —
|
|
850
|
+
* the LONGEST hold the server will honour, never a promise that every
|
|
851
|
+
* host tolerates it (ggui#1030).
|
|
852
|
+
*
|
|
853
|
+
* The contract has two sides. SERVER: honour `wait` up to this ceiling,
|
|
854
|
+
* return the empty page as a normal result when the hold elapses, and
|
|
855
|
+
* end the hold when the caller's transport closes. CALLER (the pulling
|
|
856
|
+
* runtime): choose a `wait` that does not exceed the `tools/call`
|
|
857
|
+
* timeout of the host relaying the call, minus a margin; a host that
|
|
858
|
+
* relays a pull clamps the forwarded `wait` to its own timeout minus one
|
|
859
|
+
* second. A host timeout below the hold is a caller-side failure — the
|
|
860
|
+
* server's `success` after the socket closed is not a server fault, and
|
|
861
|
+
* a caller that keeps pulling through such failures must demote to
|
|
862
|
+
* sparse un-held pulls exactly as it does after consecutive empties.
|
|
854
863
|
*/
|
|
855
864
|
export declare const RUNTIME_PULL_MAX_WAIT_SECONDS = 20;
|
|
856
865
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/schemas/mcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyBxB;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;CAgBpB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;iBAA8B,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC;AAEX,eAAO,MAAM,eAAe;;;;;iBAA2B,CAAC;AAExD,eAAO,MAAM,oBAAoB;;CAKvB,CAAC;AAEX,eAAO,MAAM,qBAAqB;;iBAAiC,CAAC;AAEpE;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB;;CAK5B,CAAC;AAEX,eAAO,MAAM,0BAA0B;;iBAAsC,CAAC;AAE9E;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,IAAc,CAAC;AAE5D,eAAO,MAAM,iCAAiC,gCAE7C,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;CAwB7B,CAAC;AAEX,eAAO,MAAM,2BAA2B;;;;;iBAAuC,CAAC;AAEhF,eAAO,MAAM,yBAAyB;;CAO5B,CAAC;AAEX,eAAO,MAAM,0BAA0B;;iBAAsC,CAAC;AAE9E,eAAO,MAAM,kBAAkB,IAAc,CAAC;AAE9C,eAAO,MAAM,mBAAmB,gCAA+B,CAAC;AAahE;;;;;;;;;;;;;;;;;;;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PULL_MAX_LIMIT = 100;
|
|
1096
1096
|
/**
|
|
1097
|
-
* Server-side ceiling on `ggui_runtime_pull`'s `wait` hold, in seconds
|
|
1098
|
-
*
|
|
1099
|
-
*
|
|
1100
|
-
*
|
|
1101
|
-
*
|
|
1097
|
+
* Server-side ceiling on `ggui_runtime_pull`'s `wait` hold, in seconds —
|
|
1098
|
+
* the LONGEST hold the server will honour, never a promise that every
|
|
1099
|
+
* host tolerates it (ggui#1030).
|
|
1100
|
+
*
|
|
1101
|
+
* The contract has two sides. SERVER: honour `wait` up to this ceiling,
|
|
1102
|
+
* return the empty page as a normal result when the hold elapses, and
|
|
1103
|
+
* end the hold when the caller's transport closes. CALLER (the pulling
|
|
1104
|
+
* runtime): choose a `wait` that does not exceed the `tools/call`
|
|
1105
|
+
* timeout of the host relaying the call, minus a margin; a host that
|
|
1106
|
+
* relays a pull clamps the forwarded `wait` to its own timeout minus one
|
|
1107
|
+
* second. A host timeout below the hold is a caller-side failure — the
|
|
1108
|
+
* server's `success` after the socket closed is not a server fault, and
|
|
1109
|
+
* a caller that keeps pulling through such failures must demote to
|
|
1110
|
+
* sparse un-held pulls exactly as it does after consecutive empties.
|
|
1102
1111
|
*/
|
|
1103
1112
|
export const RUNTIME_PULL_MAX_WAIT_SECONDS = 20;
|
|
1104
1113
|
/**
|
|
@@ -1173,7 +1182,7 @@ export const runtimePullInputShape = {
|
|
|
1173
1182
|
.number()
|
|
1174
1183
|
.min(0)
|
|
1175
1184
|
.optional()
|
|
1176
|
-
.describe(`Subscription-mode hold, in seconds. When set and the cursor page is empty, the server holds this call until an event lands or the hold elapses (values above ${RUNTIME_PULL_MAX_WAIT_SECONDS} are clamped to ${RUNTIME_PULL_MAX_WAIT_SECONDS}). An empty page after a full hold is a NORMAL result — immediately re-pull to stay subscribed, or back off to sparse un-held pulls after a few consecutive empties. Omit (= 0) for an immediate return.`),
|
|
1185
|
+
.describe(`Subscription-mode hold, in seconds. When set and the cursor page is empty, the server holds this call until an event lands or the hold elapses (values above ${RUNTIME_PULL_MAX_WAIT_SECONDS} are clamped to ${RUNTIME_PULL_MAX_WAIT_SECONDS}). CALLER OBLIGATION: your \`wait\` MUST NOT exceed the tools/call timeout of the host relaying this call, minus a margin — a host that relays a pull MUST clamp the forwarded \`wait\` to its own timeout minus one second; a host timeout below the hold is a caller-side failure (the server's success after the socket closed is not a server fault), and a caller seeing such failures MUST demote to sparse un-held pulls as it would after consecutive empties. An empty page after a full hold is a NORMAL result — immediately re-pull to stay subscribed, or back off to sparse un-held pulls after a few consecutive empties. Omit (= 0) for an immediate return.`),
|
|
1177
1186
|
};
|
|
1178
1187
|
export const runtimePullInputSchema = z.object(runtimePullInputShape);
|
|
1179
1188
|
/**
|
|
@@ -39,6 +39,12 @@ import { z } from 'zod';
|
|
|
39
39
|
* caller's bound app identity; cross-app calls are subject to the
|
|
40
40
|
* deployment's authorization policy.
|
|
41
41
|
*/
|
|
42
|
+
/**
|
|
43
|
+
* Bound on `intent` (ggui#1046), in characters — one exported number the
|
|
44
|
+
* door checks and readers may cap at; standalone (not tied to any other
|
|
45
|
+
* text bound: they move independently).
|
|
46
|
+
*/
|
|
47
|
+
export declare const OPS_GENERATE_BLUEPRINT_INTENT_MAX_CHARS = 2000;
|
|
42
48
|
export declare const opsGenerateBlueprintInputSchema: z.ZodObject<{
|
|
43
49
|
appId: z.ZodOptional<z.ZodString>;
|
|
44
50
|
contract: z.ZodType<import("../index.js").DataContract, unknown, z.core.$ZodTypeInternals<import("../index.js").DataContract, unknown>>;
|
|
@@ -47,6 +53,7 @@ export declare const opsGenerateBlueprintInputSchema: z.ZodObject<{
|
|
|
47
53
|
aesthetic: z.ZodOptional<z.ZodString>;
|
|
48
54
|
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../index.js").JsonValue, unknown, z.core.$ZodTypeInternals<import("../index.js").JsonValue, unknown>>>>;
|
|
49
55
|
seedPrompt: z.ZodOptional<z.ZodString>;
|
|
56
|
+
intent: z.ZodOptional<z.ZodString>;
|
|
50
57
|
setAsOperatorDefault: z.ZodOptional<z.ZodBoolean>;
|
|
51
58
|
}, z.core.$strict>;
|
|
52
59
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ops-blueprint.d.ts","sourceRoot":"","sources":["../../src/schemas/ops-blueprint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,+BAA+B
|
|
1
|
+
{"version":3,"file":"ops-blueprint.d.ts","sourceRoot":"","sources":["../../src/schemas/ops-blueprint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB;;;;;;;;;;;;;;GAcG;AACH;;;;GAIG;AACH,eAAO,MAAM,uCAAuC,OAAO,CAAC;AAE5D,eAAO,MAAM,+BAA+B;;;;;;;;;;kBA0DjC,CAAC;AAEZ;;;;GAIG;AACH,eAAO,MAAM,gCAAgC;;;;;kBAqBlC,CAAC;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;kBA+CjC,CAAC;AAEZ;;;;GAIG;AACH,eAAO,MAAM,gCAAgC;;;;kBAalC,CAAC;AAEZ;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,4BAA4B;;;;;;kBAsC9B,CAAC;AAEZ,eAAO,MAAM,6BAA6B;;kBAI/B,CAAC;AAEZ;;;;;;;;GAQG;AACH,eAAO,MAAM,6BAA6B;;;;;kBAsB/B,CAAC;AAEZ,eAAO,MAAM,8BAA8B;;;kBAKhC,CAAC;AAEZ;;;;GAIG;AACH,eAAO,MAAM,6BAA6B;;;kBAW/B,CAAC;AAEZ,eAAO,MAAM,8BAA8B;;kBAIhC,CAAC;AAEZ;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC;AACF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AACF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,8BAA8B,CACtC,CAAC;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AACF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,8BAA8B,CACtC,CAAC"}
|
|
@@ -42,6 +42,12 @@ import { blueprintSchema, blueprintVarianceSchema, llmBlueprintSourceSchema, use
|
|
|
42
42
|
* caller's bound app identity; cross-app calls are subject to the
|
|
43
43
|
* deployment's authorization policy.
|
|
44
44
|
*/
|
|
45
|
+
/**
|
|
46
|
+
* Bound on `intent` (ggui#1046), in characters — one exported number the
|
|
47
|
+
* door checks and readers may cap at; standalone (not tied to any other
|
|
48
|
+
* text bound: they move independently).
|
|
49
|
+
*/
|
|
50
|
+
export const OPS_GENERATE_BLUEPRINT_INTENT_MAX_CHARS = 2000;
|
|
45
51
|
export const opsGenerateBlueprintInputSchema = z
|
|
46
52
|
.object({
|
|
47
53
|
appId: z
|
|
@@ -73,6 +79,12 @@ export const opsGenerateBlueprintInputSchema = z
|
|
|
73
79
|
.string()
|
|
74
80
|
.optional()
|
|
75
81
|
.describe("The raw operator prompt that produced this variant. Round-trip input for the variant-selector + audit trail."),
|
|
82
|
+
intent: z
|
|
83
|
+
.string()
|
|
84
|
+
.trim()
|
|
85
|
+
.max(OPS_GENERATE_BLUEPRINT_INTENT_MAX_CHARS)
|
|
86
|
+
.optional()
|
|
87
|
+
.describe(`What the operator wants generated for this contract, in plain words — the prompt the generator composes from (at most ${OPS_GENERATE_BLUEPRINT_INTENT_MAX_CHARS} characters). Not part of the cache identity: two calls that differ only in \`intent\` share a variant key. When omitted, the generator falls back to \`seedPrompt\`; omitting both is a caller gap that a future release refuses.`),
|
|
76
88
|
setAsOperatorDefault: z
|
|
77
89
|
.boolean()
|
|
78
90
|
.optional()
|