@ggui-ai/mcp-server-handlers 0.16.0 → 0.17.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/ops-apps/set-app-theme.d.ts +123 -0
- package/dist/ops-apps/set-app-theme.d.ts.map +1 -1
- package/dist/ops-apps/set-app-theme.js +1 -1
- package/dist/ops-blueprint/generate.d.ts +1 -0
- package/dist/ops-blueprint/generate.d.ts.map +1 -1
- package/dist/ops-blueprint/generate.js +30 -3
- package/dist/ops-blueprint/register.d.ts.map +1 -1
- package/dist/ops-blueprint/register.js +16 -6
- package/dist/renders/runtime-pull.d.ts +9 -0
- package/dist/renders/runtime-pull.d.ts.map +1 -1
- package/dist/renders/runtime-pull.js +37 -4
- package/dist/renders/slice-meta-derivation.d.ts +9 -1
- package/dist/renders/slice-meta-derivation.d.ts.map +1 -1
- package/dist/renders/slice-meta-derivation.js +32 -9
- package/package.json +8 -8
|
@@ -65,6 +65,39 @@ declare const outputSchema: {
|
|
|
65
65
|
dark: z.ZodOptional<z.ZodString>;
|
|
66
66
|
}, z.core.$strict>>;
|
|
67
67
|
frameless: z.ZodOptional<z.ZodBoolean>;
|
|
68
|
+
fonts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
69
|
+
family: z.ZodString;
|
|
70
|
+
src: z.ZodString;
|
|
71
|
+
weight: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
72
|
+
style: z.ZodOptional<z.ZodString>;
|
|
73
|
+
display: z.ZodOptional<z.ZodString>;
|
|
74
|
+
}, z.core.$strict>>>;
|
|
75
|
+
imagery: z.ZodOptional<z.ZodObject<{
|
|
76
|
+
mark: z.ZodOptional<z.ZodObject<{
|
|
77
|
+
src: z.ZodString;
|
|
78
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
79
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
80
|
+
light: "light";
|
|
81
|
+
dark: "dark";
|
|
82
|
+
}>>;
|
|
83
|
+
}, z.core.$strict>>;
|
|
84
|
+
hero: z.ZodOptional<z.ZodObject<{
|
|
85
|
+
src: z.ZodString;
|
|
86
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
87
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
88
|
+
light: "light";
|
|
89
|
+
dark: "dark";
|
|
90
|
+
}>>;
|
|
91
|
+
}, z.core.$strict>>;
|
|
92
|
+
pattern: z.ZodOptional<z.ZodObject<{
|
|
93
|
+
src: z.ZodString;
|
|
94
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
95
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
96
|
+
light: "light";
|
|
97
|
+
dark: "dark";
|
|
98
|
+
}>>;
|
|
99
|
+
}, z.core.$strict>>;
|
|
100
|
+
}, z.core.$strict>>;
|
|
68
101
|
}, z.core.$strict>>;
|
|
69
102
|
readonly updatedAt: z.ZodOptional<z.ZodString>;
|
|
70
103
|
/** Present on a refusal: the one refusal class this door emits. */
|
|
@@ -132,6 +165,39 @@ export declare function createSetAppThemeHandler(deps: SetAppThemeDeps): import(
|
|
|
132
165
|
dark: z.ZodOptional<z.ZodString>;
|
|
133
166
|
}, z.core.$strict>>;
|
|
134
167
|
frameless: z.ZodOptional<z.ZodBoolean>;
|
|
168
|
+
fonts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
169
|
+
family: z.ZodString;
|
|
170
|
+
src: z.ZodString;
|
|
171
|
+
weight: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
172
|
+
style: z.ZodOptional<z.ZodString>;
|
|
173
|
+
display: z.ZodOptional<z.ZodString>;
|
|
174
|
+
}, z.core.$strict>>>;
|
|
175
|
+
imagery: z.ZodOptional<z.ZodObject<{
|
|
176
|
+
mark: z.ZodOptional<z.ZodObject<{
|
|
177
|
+
src: z.ZodString;
|
|
178
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
179
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
180
|
+
light: "light";
|
|
181
|
+
dark: "dark";
|
|
182
|
+
}>>;
|
|
183
|
+
}, z.core.$strict>>;
|
|
184
|
+
hero: z.ZodOptional<z.ZodObject<{
|
|
185
|
+
src: z.ZodString;
|
|
186
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
187
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
188
|
+
light: "light";
|
|
189
|
+
dark: "dark";
|
|
190
|
+
}>>;
|
|
191
|
+
}, z.core.$strict>>;
|
|
192
|
+
pattern: z.ZodOptional<z.ZodObject<{
|
|
193
|
+
src: z.ZodString;
|
|
194
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
195
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
196
|
+
light: "light";
|
|
197
|
+
dark: "dark";
|
|
198
|
+
}>>;
|
|
199
|
+
}, z.core.$strict>>;
|
|
200
|
+
}, z.core.$strict>>;
|
|
135
201
|
}, z.core.$strict>;
|
|
136
202
|
}, {
|
|
137
203
|
readonly ok: z.ZodBoolean;
|
|
@@ -153,6 +219,39 @@ export declare function createSetAppThemeHandler(deps: SetAppThemeDeps): import(
|
|
|
153
219
|
dark: z.ZodOptional<z.ZodString>;
|
|
154
220
|
}, z.core.$strict>>;
|
|
155
221
|
frameless: z.ZodOptional<z.ZodBoolean>;
|
|
222
|
+
fonts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
223
|
+
family: z.ZodString;
|
|
224
|
+
src: z.ZodString;
|
|
225
|
+
weight: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
226
|
+
style: z.ZodOptional<z.ZodString>;
|
|
227
|
+
display: z.ZodOptional<z.ZodString>;
|
|
228
|
+
}, z.core.$strict>>>;
|
|
229
|
+
imagery: z.ZodOptional<z.ZodObject<{
|
|
230
|
+
mark: z.ZodOptional<z.ZodObject<{
|
|
231
|
+
src: z.ZodString;
|
|
232
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
233
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
234
|
+
light: "light";
|
|
235
|
+
dark: "dark";
|
|
236
|
+
}>>;
|
|
237
|
+
}, z.core.$strict>>;
|
|
238
|
+
hero: z.ZodOptional<z.ZodObject<{
|
|
239
|
+
src: z.ZodString;
|
|
240
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
241
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
242
|
+
light: "light";
|
|
243
|
+
dark: "dark";
|
|
244
|
+
}>>;
|
|
245
|
+
}, z.core.$strict>>;
|
|
246
|
+
pattern: z.ZodOptional<z.ZodObject<{
|
|
247
|
+
src: z.ZodString;
|
|
248
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
249
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
250
|
+
light: "light";
|
|
251
|
+
dark: "dark";
|
|
252
|
+
}>>;
|
|
253
|
+
}, z.core.$strict>>;
|
|
254
|
+
}, z.core.$strict>>;
|
|
156
255
|
}, z.core.$strict>>;
|
|
157
256
|
readonly updatedAt: z.ZodOptional<z.ZodString>;
|
|
158
257
|
/** Present on a refusal: the one refusal class this door emits. */
|
|
@@ -192,6 +291,30 @@ export declare function createSetAppThemeHandler(deps: SetAppThemeDeps): import(
|
|
|
192
291
|
dark?: string | undefined;
|
|
193
292
|
} | undefined;
|
|
194
293
|
frameless?: boolean | undefined;
|
|
294
|
+
fonts?: {
|
|
295
|
+
family: string;
|
|
296
|
+
src: string;
|
|
297
|
+
weight?: string | number | undefined;
|
|
298
|
+
style?: string | undefined;
|
|
299
|
+
display?: string | undefined;
|
|
300
|
+
}[] | undefined;
|
|
301
|
+
imagery?: {
|
|
302
|
+
mark?: {
|
|
303
|
+
src: string;
|
|
304
|
+
alt?: string | undefined;
|
|
305
|
+
tone?: "light" | "dark" | undefined;
|
|
306
|
+
} | undefined;
|
|
307
|
+
hero?: {
|
|
308
|
+
src: string;
|
|
309
|
+
alt?: string | undefined;
|
|
310
|
+
tone?: "light" | "dark" | undefined;
|
|
311
|
+
} | undefined;
|
|
312
|
+
pattern?: {
|
|
313
|
+
src: string;
|
|
314
|
+
alt?: string | undefined;
|
|
315
|
+
tone?: "light" | "dark" | undefined;
|
|
316
|
+
} | undefined;
|
|
317
|
+
} | undefined;
|
|
195
318
|
} | undefined;
|
|
196
319
|
updatedAt?: string | undefined;
|
|
197
320
|
code?: "invalid_app_config" | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set-app-theme.d.ts","sourceRoot":"","sources":["../../src/ops-apps/set-app-theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAIL,KAAK,QAAQ,EACb,KAAK,mBAAmB,EACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,aAAa,CAAC;AAGrB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAAK;IACpF,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC,CAAC;AAcF,QAAA,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"set-app-theme.d.ts","sourceRoot":"","sources":["../../src/ops-apps/set-app-theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAIL,KAAK,QAAQ,EACb,KAAK,mBAAmB,EACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE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CAAE,CAAC;AAY/D;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,OAAO,EACZ,eAAe,EAAE,wBAAwB,GACxC,OAAO,CAAC,iBAAiB,CAAC,CAsB5B;AAWD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA3E5D,mEAAmE;;IAEnE,sGAAsG;;;;;;;;;;;;;;;;IAEtG,yFAAyF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4G1F"}
|
|
@@ -41,7 +41,7 @@ const inputSchema = {
|
|
|
41
41
|
.string()
|
|
42
42
|
.min(1)
|
|
43
43
|
.describe('Target `GguiApp.appId` — must be one the calling user owns. Discover via `ggui_ops_list_apps`.'),
|
|
44
|
-
theme: appThemeSchema.describe('The app theme: `overlays.light` / `overlays.dark` are the derived `--ggui-*` sets (every consumed token, minus the floor the renderer owns), `overlayHash` = canonicalOverlayHash({ overlays, cssVariables, keyframes }); optional `mode` (the default when no host announces one), `name` (a label), `cssVariables` (mode-agnostic overrides), `keyframes` (per mode), `frameless`. Refused with `invalid_app_config` when a mode leaves a token uncovered, names a token outside the manifest, the attestation mismatches, or the body is the retired one-palette shape.'),
|
|
44
|
+
theme: appThemeSchema.describe('The app theme: `overlays.light` / `overlays.dark` are the derived `--ggui-*` sets (every consumed token, minus the floor the renderer owns), `overlayHash` = canonicalOverlayHash({ overlays, cssVariables, keyframes }); optional `mode` (the default when no host announces one), `name` (a label), `cssVariables` (mode-agnostic overrides), `keyframes` (per mode), `frameless`. Refused with `invalid_app_config` when a mode leaves a token uncovered, names a token outside the manifest, the attestation mismatches, or the body is the retired one-palette shape. Optional declared assets (ggui#1093): `fonts` — 1..16 faces, https-only `src`, the host admits their origins and the shell inlines them — and `imagery` — `mark` / `hero` / `pattern`, each `{ src, alt?, tone? }`, https-only; both outside the attestation.'),
|
|
45
45
|
};
|
|
46
46
|
const outputSchema = {
|
|
47
47
|
ok: z.boolean(),
|
|
@@ -172,6 +172,7 @@ export declare function createGguiOpsGenerateBlueprintHandler(deps: GguiOpsGener
|
|
|
172
172
|
aesthetic: z.ZodOptional<z.ZodString>;
|
|
173
173
|
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("@ggui-ai/protocol").JsonValue, unknown, z.core.$ZodTypeInternals<import("@ggui-ai/protocol").JsonValue, unknown>>>>;
|
|
174
174
|
seedPrompt: z.ZodOptional<z.ZodString>;
|
|
175
|
+
intent: z.ZodOptional<z.ZodString>;
|
|
175
176
|
setAsOperatorDefault: z.ZodOptional<z.ZodBoolean>;
|
|
176
177
|
}, {
|
|
177
178
|
blueprintId: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/ops-blueprint/generate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,aAAa,EAGd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,YAAY,EAIlB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAyB,KAAK,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAsBxF;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,CAAC,QAAQ,EAAE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;IAC/B;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,qBAAqB,CAAC;IAC/C;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,aAAa,CAAC;IACnC;;;OAGG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,MAAM,CAAC;IACxC;;;;;;;OAOG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,yBAAyB,CAAC;CACzD;AA2CD,wBAAgB,qCAAqC,CACnD,IAAI,EAAE,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;GA+RnC"}
|
|
@@ -103,6 +103,13 @@ function resolveGenerator(registry, slug) {
|
|
|
103
103
|
}
|
|
104
104
|
return found;
|
|
105
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* The generation prompt when a call carries neither `intent` nor
|
|
108
|
+
* `seedPrompt`. Kept for one release with the observable
|
|
109
|
+
* `blueprint.generate_prompt_placeholder` event; the following release
|
|
110
|
+
* refuses such a call (`prompt_required`) instead.
|
|
111
|
+
*/
|
|
112
|
+
const GENERATION_PROMPT_PLACEHOLDER = "Operator-authored blueprint variant";
|
|
106
113
|
export function createGguiOpsGenerateBlueprintHandler(deps) {
|
|
107
114
|
const now = deps.now ?? (() => new Date().toISOString());
|
|
108
115
|
const mintBlueprintId = deps.mintBlueprintId ?? (() => `bp_${randomUUID()}`);
|
|
@@ -194,11 +201,30 @@ export function createGguiOpsGenerateBlueprintHandler(deps) {
|
|
|
194
201
|
if (creds === null) {
|
|
195
202
|
throw new MissingCredentialsError();
|
|
196
203
|
}
|
|
197
|
-
// 5. Dispatch through the generator.
|
|
204
|
+
// 5. Dispatch through the generator. The generation prompt is the
|
|
205
|
+
// request's own sentence: `intent` (prompt-only, never persisted —
|
|
206
|
+
// not a variance member, so the cache identity is unchanged), else
|
|
207
|
+
// the variance's `seedPrompt`. Neither present: the placeholder,
|
|
208
|
+
// made observable — the classifier reads the render axis from THIS
|
|
209
|
+
// prompt, and a placeholder reads every board as a list.
|
|
210
|
+
const generationPrompt = parsed.intent ?? parsed.seedPrompt;
|
|
211
|
+
if (generationPrompt === undefined) {
|
|
212
|
+
try {
|
|
213
|
+
deps.telemetry?.emit({
|
|
214
|
+
name: "blueprint.generate_prompt_placeholder",
|
|
215
|
+
at: Date.now(),
|
|
216
|
+
attributes: { appId, requestId: ctx.requestId, reason: "no-intent-no-seedPrompt" },
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
catch {
|
|
220
|
+
// Swallow telemetry-side throws — they MUST NOT affect
|
|
221
|
+
// handler correctness.
|
|
222
|
+
}
|
|
223
|
+
}
|
|
198
224
|
const generateInput = {
|
|
199
225
|
request: {
|
|
200
226
|
sessionId: `ops_gen_${randomUUID()}`,
|
|
201
|
-
prompt:
|
|
227
|
+
prompt: generationPrompt ?? GENERATION_PROMPT_PLACEHOLDER,
|
|
202
228
|
},
|
|
203
229
|
blueprints: deps.blueprints,
|
|
204
230
|
contract,
|
|
@@ -271,7 +297,8 @@ export function createGguiOpsGenerateBlueprintHandler(deps) {
|
|
|
271
297
|
// ops call since the primary store.put already succeeded.
|
|
272
298
|
if (deps.cacheRegistry) {
|
|
273
299
|
try {
|
|
274
|
-
const intentForCache = parsed.
|
|
300
|
+
const intentForCache = parsed.intent ??
|
|
301
|
+
parsed.seedPrompt ??
|
|
275
302
|
normalizedPersona ??
|
|
276
303
|
`operator-authored blueprint (${blueprintId})`;
|
|
277
304
|
await registerBlueprint(deps.cacheRegistry, appId, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/ops-blueprint/register.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,aAAa,EAC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C"}
|
|
@@ -131,6 +131,18 @@ export function createGguiOpsRegisterBlueprintHandler(deps) {
|
|
|
131
131
|
const componentCode = parsed.componentCode;
|
|
132
132
|
const codeHash = createHash("sha256").update(componentCode).digest("hex");
|
|
133
133
|
const blueprintId = mintBlueprintId();
|
|
134
|
+
// ONE variance for BOTH stores. The cache row's exact key is
|
|
135
|
+
// `variantKey(variance)`; omitting it on the cache call filed every
|
|
136
|
+
// variant under the default-variant key, where an earlier registration
|
|
137
|
+
// of the same contract already sat — the mirror then returned THAT row
|
|
138
|
+
// and the new variant was never bound (the durable row said one thing,
|
|
139
|
+
// the served index another). Same rule as ops_generate.
|
|
140
|
+
const variance = {
|
|
141
|
+
...(normalizedPersona !== undefined ? { persona: normalizedPersona } : {}),
|
|
142
|
+
...(parsed.aesthetic !== undefined ? { aesthetic: parsed.aesthetic } : {}),
|
|
143
|
+
...(parsed.context !== undefined ? { context: parsed.context } : {}),
|
|
144
|
+
...(parsed.seedPrompt !== undefined ? { seedPrompt: parsed.seedPrompt } : {}),
|
|
145
|
+
};
|
|
134
146
|
const blueprint = {
|
|
135
147
|
blueprintId,
|
|
136
148
|
contractHash,
|
|
@@ -140,12 +152,7 @@ export function createGguiOpsRegisterBlueprintHandler(deps) {
|
|
|
140
152
|
// user arm on BOTH stores this handler writes (MVB row here,
|
|
141
153
|
// cache mirror below). No engine claim exists to record.
|
|
142
154
|
source: USER_SOURCE,
|
|
143
|
-
variance
|
|
144
|
-
...(normalizedPersona !== undefined ? { persona: normalizedPersona } : {}),
|
|
145
|
-
...(parsed.aesthetic !== undefined ? { aesthetic: parsed.aesthetic } : {}),
|
|
146
|
-
...(parsed.context !== undefined ? { context: parsed.context } : {}),
|
|
147
|
-
...(parsed.seedPrompt !== undefined ? { seedPrompt: parsed.seedPrompt } : {}),
|
|
148
|
-
},
|
|
155
|
+
variance,
|
|
149
156
|
createdAt: now(),
|
|
150
157
|
createdBy: "operator",
|
|
151
158
|
contract,
|
|
@@ -172,6 +179,9 @@ export function createGguiOpsRegisterBlueprintHandler(deps) {
|
|
|
172
179
|
// Same user-arm provenance as the MVB row above — one
|
|
173
180
|
// handler call, one provenance claim across both stores.
|
|
174
181
|
source: USER_SOURCE,
|
|
182
|
+
// The cache row MUST carry the same variance as the MVB row —
|
|
183
|
+
// its exact key is `variantKey(variance)`.
|
|
184
|
+
variance,
|
|
175
185
|
// An operator invoked this tool. Without it the durable
|
|
176
186
|
// record would claim the standard agent flow minted a row
|
|
177
187
|
// that is retained permanently.
|
|
@@ -48,6 +48,15 @@
|
|
|
48
48
|
* retention window). Client recovery: re-mount from a fresh
|
|
49
49
|
* snapshot and reset the cursor to `currentSequence`.
|
|
50
50
|
*
|
|
51
|
+
* **The puller's obligation (ggui#1030).** `wait` MUST NOT exceed the
|
|
52
|
+
* `tools/call` timeout of the host relaying the call, minus a margin; a
|
|
53
|
+
* host that relays a pull MUST clamp the forwarded `wait` to its own
|
|
54
|
+
* timeout − 1 s. A host timeout below the hold is a CALLER-side failure:
|
|
55
|
+
* the server's `success` after the socket closed is not a server fault,
|
|
56
|
+
* and the rung MUST demote to sparse un-held pulls on such failures as it
|
|
57
|
+
* does on consecutive empties — otherwise a hot `wait` under a short host
|
|
58
|
+
* timeout is a polling storm that never demotes.
|
|
59
|
+
*
|
|
51
60
|
* **Failure modes:**
|
|
52
61
|
* - Unknown sessionId, cross-app sessionId, and a render deleted
|
|
53
62
|
* mid-read all surface uniformly as
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-pull.d.ts","sourceRoot":"","sources":["../../src/renders/runtime-pull.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"runtime-pull.d.ts","sourceRoot":"","sources":["../../src/renders/runtime-pull.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAiCjE,MAAM,WAAW,0BAA0B;IACzC;;;;OAIG;IACH,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAC;IACvC;;;;;;;;OAQG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CACvC;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,0BAA0B;;;;;;IArC3E,4EAA4E;;;;;;;IAE5E,6FAA6F;;IAE7F,sFAAsF;;IAEtF,qGAAqG;;IAErG,kFAAkF;;;;;;;;;;;;;GAwJnF"}
|
|
@@ -48,6 +48,15 @@
|
|
|
48
48
|
* retention window). Client recovery: re-mount from a fresh
|
|
49
49
|
* snapshot and reset the cursor to `currentSequence`.
|
|
50
50
|
*
|
|
51
|
+
* **The puller's obligation (ggui#1030).** `wait` MUST NOT exceed the
|
|
52
|
+
* `tools/call` timeout of the host relaying the call, minus a margin; a
|
|
53
|
+
* host that relays a pull MUST clamp the forwarded `wait` to its own
|
|
54
|
+
* timeout − 1 s. A host timeout below the hold is a CALLER-side failure:
|
|
55
|
+
* the server's `success` after the socket closed is not a server fault,
|
|
56
|
+
* and the rung MUST demote to sparse un-held pulls on such failures as it
|
|
57
|
+
* does on consecutive empties — otherwise a hot `wait` under a short host
|
|
58
|
+
* timeout is a polling storm that never demotes.
|
|
59
|
+
*
|
|
51
60
|
* **Failure modes:**
|
|
52
61
|
* - Unknown sessionId, cross-app sessionId, and a render deleted
|
|
53
62
|
* mid-read all surface uniformly as
|
|
@@ -137,8 +146,14 @@ export function createGguiRuntimePullHandler(deps) {
|
|
|
137
146
|
}
|
|
138
147
|
const deadline = Date.now() + waitMs;
|
|
139
148
|
// Hold loop: one immediate read, then — empty page + time left —
|
|
140
|
-
// probe the store at `probeIntervalMs` until an event lands
|
|
141
|
-
//
|
|
149
|
+
// probe the store at `probeIntervalMs` until an event lands, the
|
|
150
|
+
// hold elapses, or the CALLER GOES AWAY (`ctx.signal`: the MCP
|
|
151
|
+
// cancel notification or the transport closing — ggui#1026: a
|
|
152
|
+
// relay that times out its own call at 5 s used to leave this
|
|
153
|
+
// loop probing the store into a closed socket for the full hold).
|
|
154
|
+
// An aborted hold resolves the empty page — never a throw — so
|
|
155
|
+
// the caller-side contract is the same as a hold that elapsed.
|
|
156
|
+
// The probe is a STORE read on purpose: the
|
|
142
157
|
// event that ends this hold may be committed by another replica, and
|
|
143
158
|
// the store is the only cross-replica truth available here. Horizon
|
|
144
159
|
// results and non-empty pages return immediately regardless of
|
|
@@ -164,7 +179,9 @@ export function createGguiRuntimePullHandler(deps) {
|
|
|
164
179
|
currentSequence: result.lastSequence,
|
|
165
180
|
};
|
|
166
181
|
}
|
|
167
|
-
if (result.events.length > 0 ||
|
|
182
|
+
if (result.events.length > 0 ||
|
|
183
|
+
Date.now() >= deadline ||
|
|
184
|
+
ctx.signal?.aborted === true) {
|
|
168
185
|
// Events to deliver, or the hold elapsed — an empty page
|
|
169
186
|
// after a full hold is a NORMAL result (the client stays
|
|
170
187
|
// subscribed by immediately re-pulling).
|
|
@@ -175,8 +192,24 @@ export function createGguiRuntimePullHandler(deps) {
|
|
|
175
192
|
hasMore: result.hasMore,
|
|
176
193
|
};
|
|
177
194
|
}
|
|
195
|
+
// Sleep one probe interval, or less: the caller aborting ends
|
|
196
|
+
// the wait immediately (the loop then returns the empty page).
|
|
178
197
|
await new Promise((resolve) => {
|
|
179
|
-
|
|
198
|
+
const signal = ctx.signal;
|
|
199
|
+
const onAbort = () => {
|
|
200
|
+
clearTimeout(timer);
|
|
201
|
+
resolve();
|
|
202
|
+
};
|
|
203
|
+
const timer = setTimeout(() => {
|
|
204
|
+
signal?.removeEventListener('abort', onAbort);
|
|
205
|
+
resolve();
|
|
206
|
+
}, probeIntervalMs);
|
|
207
|
+
if (signal !== undefined) {
|
|
208
|
+
if (signal.aborted)
|
|
209
|
+
onAbort();
|
|
210
|
+
else
|
|
211
|
+
signal.addEventListener('abort', onAbort, { once: true });
|
|
212
|
+
}
|
|
180
213
|
});
|
|
181
214
|
}
|
|
182
215
|
},
|
|
@@ -288,7 +288,15 @@ export declare function deriveBundleOrigins(item: GguiSession): {
|
|
|
288
288
|
* doesn't need to know about CSP directive serialization details;
|
|
289
289
|
* this is the one place that maps the buckets to header syntax.
|
|
290
290
|
*/
|
|
291
|
-
export declare function composeContentSecurityPolicy(origins: ReturnType<typeof deriveBundleOrigins
|
|
291
|
+
export declare function composeContentSecurityPolicy(origins: ReturnType<typeof deriveBundleOrigins>,
|
|
292
|
+
/**
|
|
293
|
+
* The render's stored theme (ggui#1093): a declared face's origin is
|
|
294
|
+
* admitted under `font-src`, an imagery slot's under `img-src`. The
|
|
295
|
+
* schema already guarantees `https:` + a well-formed host, so the
|
|
296
|
+
* origin is read, never re-validated. Absent, or a theme declaring
|
|
297
|
+
* neither, leaves the CSP byte-identical to the gadget-only form.
|
|
298
|
+
*/
|
|
299
|
+
theme?: Pick<AppTheme, 'fonts' | 'imagery'>): string | undefined;
|
|
292
300
|
/**
|
|
293
301
|
* JSON-stringify the active render's `props` field. Returns
|
|
294
302
|
* `undefined` when no props are present or when serialization fails
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slice-meta-derivation.d.ts","sourceRoot":"","sources":["../../src/renders/slice-meta-derivation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,OAAO,EAKL,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAGL,KAAK,sBAAsB,EAC5B,MAAM,yCAAyC,CAAC;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAMhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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I,CAC/B,mBAAmB,EACnB,SAAS,GAAG,WAAW,GAAG,eAAe,CAC1C,CAAC;AAEF,oFAAoF;AACpF,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,EAAE,SAAS,GAAG,WAAW,CAAC,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,cAAc,EACpB,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,gBAAgB,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,GAC7C,UAAU,CAqBZ;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,mBAAmB,EACzB,IAAI,EAAE;IACJ,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,kEAAkE;IAClE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5C;;;;;;OAMG;IACH,QAAQ,CAAC,gBAAgB,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;CACzD,GACA,eAAe,CA4CjB"}
|
|
@@ -499,24 +499,45 @@ export function deriveBundleOrigins(item) {
|
|
|
499
499
|
* doesn't need to know about CSP directive serialization details;
|
|
500
500
|
* this is the one place that maps the buckets to header syntax.
|
|
501
501
|
*/
|
|
502
|
-
export function composeContentSecurityPolicy(origins
|
|
503
|
-
|
|
504
|
-
|
|
502
|
+
export function composeContentSecurityPolicy(origins,
|
|
503
|
+
/**
|
|
504
|
+
* The render's stored theme (ggui#1093): a declared face's origin is
|
|
505
|
+
* admitted under `font-src`, an imagery slot's under `img-src`. The
|
|
506
|
+
* schema already guarantees `https:` + a well-formed host, so the
|
|
507
|
+
* origin is read, never re-validated. Absent, or a theme declaring
|
|
508
|
+
* neither, leaves the CSP byte-identical to the gadget-only form.
|
|
509
|
+
*/
|
|
510
|
+
theme) {
|
|
505
511
|
const directives = [];
|
|
506
|
-
if (origins.script.length > 0) {
|
|
512
|
+
if (origins !== undefined && origins.script.length > 0) {
|
|
507
513
|
directives.push(`script-src 'self' 'unsafe-inline' ${origins.script.join(' ')}`);
|
|
508
514
|
}
|
|
509
|
-
if (origins.style.length > 0) {
|
|
515
|
+
if (origins !== undefined && origins.style.length > 0) {
|
|
510
516
|
directives.push(`style-src 'self' 'unsafe-inline' ${origins.style.join(' ')}`);
|
|
511
517
|
}
|
|
512
|
-
if (origins.connect.length > 0) {
|
|
518
|
+
if (origins !== undefined && origins.connect.length > 0) {
|
|
513
519
|
directives.push(`connect-src 'self' ${origins.connect.join(' ')}`);
|
|
514
|
-
|
|
520
|
+
}
|
|
521
|
+
// `img-src` is the union of the connect origins (a gadget's tiles)
|
|
522
|
+
// and the theme's imagery origins — deduped, declaration order.
|
|
523
|
+
const imageOrigins = dedupe([
|
|
524
|
+
...(origins?.connect ?? []),
|
|
525
|
+
...Object.values(theme?.imagery ?? {}).flatMap((slot) => slot !== undefined ? [new URL(slot.src).origin] : []),
|
|
526
|
+
]);
|
|
527
|
+
if (imageOrigins.length > 0) {
|
|
528
|
+
directives.push(`img-src 'self' data: ${imageOrigins.join(' ')}`);
|
|
529
|
+
}
|
|
530
|
+
const fontOrigins = dedupe((theme?.fonts ?? []).map((face) => new URL(face.src).origin));
|
|
531
|
+
if (fontOrigins.length > 0) {
|
|
532
|
+
directives.push(`font-src 'self' data: ${fontOrigins.join(' ')}`);
|
|
515
533
|
}
|
|
516
534
|
if (directives.length === 0)
|
|
517
535
|
return undefined;
|
|
518
536
|
return directives.join('; ');
|
|
519
537
|
}
|
|
538
|
+
function dedupe(values) {
|
|
539
|
+
return [...new Set(values)];
|
|
540
|
+
}
|
|
520
541
|
/**
|
|
521
542
|
* JSON-stringify the active render's `props` field. Returns
|
|
522
543
|
* `undefined` when no props are present or when serialization fails
|
|
@@ -784,12 +805,14 @@ export function deriveRenderMeta(item) {
|
|
|
784
805
|
// Component variant.
|
|
785
806
|
const slots = deriveContextSlots(item);
|
|
786
807
|
const permissionsPolicy = derivePermissionsPolicy(item);
|
|
787
|
-
const contentSecurityPolicy = composeContentSecurityPolicy(deriveBundleOrigins(item));
|
|
788
|
-
const gadgets = deriveGadgetRegistrations(item);
|
|
789
808
|
// Per-app theme overlay (sidecar). Component-only for this stage —
|
|
790
809
|
// system cards theme via the SystemCardHost→ThemeProvider path, not
|
|
791
810
|
// this slice, so `SystemGguiSession` never carries a `theme` sidecar.
|
|
811
|
+
// Derived before the CSP: the theme's faces and imagery are inputs to
|
|
812
|
+
// it (ggui#1093).
|
|
792
813
|
const theme = deriveTheme(item);
|
|
814
|
+
const contentSecurityPolicy = composeContentSecurityPolicy(deriveBundleOrigins(item), theme);
|
|
815
|
+
const gadgets = deriveGadgetRegistrations(item);
|
|
793
816
|
const codeB64 = deriveCodeB64(item);
|
|
794
817
|
return {
|
|
795
818
|
// History head epoch (#483) — the mount reads this as its OWN
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ggui-ai/mcp-server-handlers",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "MCP tool handler logic for the ggui protocol. Pure over @ggui-ai/mcp-server-core seams and consumed by @ggui-ai/mcp-server. Never imports AWS, HTTP transports, or CLI concerns.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ggui",
|
|
@@ -70,18 +70,18 @@
|
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"canonicalize": "^2.0.0",
|
|
72
72
|
"zod": "^4.3.6",
|
|
73
|
-
"@ggui-ai/mcp-server-core": "0.
|
|
74
|
-
"@ggui-ai/negotiator": "0.
|
|
75
|
-
"@ggui-ai/protocol": "0.
|
|
76
|
-
"@ggui-ai/ui-gen": "0.
|
|
77
|
-
"@ggui-ai/ui-registry": "0.
|
|
73
|
+
"@ggui-ai/mcp-server-core": "0.17.0",
|
|
74
|
+
"@ggui-ai/negotiator": "0.17.0",
|
|
75
|
+
"@ggui-ai/protocol": "0.17.0",
|
|
76
|
+
"@ggui-ai/ui-gen": "0.17.0",
|
|
77
|
+
"@ggui-ai/ui-registry": "0.17.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@types/node": "^22.0.0",
|
|
81
81
|
"typescript": "^5.0.0",
|
|
82
82
|
"vitest": "^3.2.6",
|
|
83
|
-
"@ggui-ai/embedding-local": "0.
|
|
84
|
-
"@ggui-ai/protocol-conformance": "0.
|
|
83
|
+
"@ggui-ai/embedding-local": "0.17.0",
|
|
84
|
+
"@ggui-ai/protocol-conformance": "0.17.0"
|
|
85
85
|
},
|
|
86
86
|
"repository": {
|
|
87
87
|
"type": "git",
|