@ggui-ai/mcp-server 0.12.0 → 0.14.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/build-mcp.d.ts +3 -1
- package/dist/build-mcp.d.ts.map +1 -1
- package/dist/build-mcp.js +67 -3
- package/dist/console-chat-routes.d.ts.map +1 -1
- package/dist/console-chat-routes.js +42 -0
- package/dist/console-session-routes.d.ts +7 -0
- package/dist/console-session-routes.d.ts.map +1 -1
- package/dist/console-session-routes.js +2 -2
- package/dist/control-service.d.ts +4 -4
- package/dist/control-service.d.ts.map +1 -1
- package/dist/instructions-presets.js +4 -4
- package/dist/mcp-apps-outbound.d.ts +61 -2
- package/dist/mcp-apps-outbound.d.ts.map +1 -1
- package/dist/mcp-apps-outbound.js +71 -13
- package/dist/server.d.ts +56 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +24 -1
- package/package.json +15 -15
package/dist/build-mcp.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
|
12
12
|
import { type ZodRawShape } from 'zod';
|
|
13
13
|
import { type HandlerContext, type SharedHandler } from '@ggui-ai/mcp-server-handlers';
|
|
14
14
|
import type { Logger } from './logger.js';
|
|
15
|
-
import { type GguiRenderResourceTemplateOptions } from './mcp-apps-outbound.js';
|
|
15
|
+
import { type LoadingIndicatorOption, type GguiRenderResourceTemplateOptions } from './mcp-apps-outbound.js';
|
|
16
16
|
export interface ServerInfo {
|
|
17
17
|
readonly name: string;
|
|
18
18
|
readonly version: string;
|
|
@@ -37,6 +37,8 @@ export interface BuildMcpServerOptions {
|
|
|
37
37
|
* or the real thin-shell HTML.
|
|
38
38
|
*/
|
|
39
39
|
readonly shellHtml?: string;
|
|
40
|
+
/** #667 working-state knob — see `LoadingIndicatorOption`. */
|
|
41
|
+
readonly loadingIndicator?: LoadingIndicatorOption;
|
|
40
42
|
/**
|
|
41
43
|
* Per-render self-contained shell options. When supplied,
|
|
42
44
|
* `installMcpAppsOutbound` ALSO registers
|
package/dist/build-mcp.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-mcp.d.ts","sourceRoot":"","sources":["../src/build-mcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,OAAO,EAAK,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,
|
|
1
|
+
{"version":3,"file":"build-mcp.d.ts","sourceRoot":"","sources":["../src/build-mcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,OAAO,EAAK,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EACL,KAAK,sBAAsB,EAE3B,KAAK,iCAAiC,EACvC,MAAM,wBAAwB,CAAC;AAEhC,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,8DAA8D;IAC9D,QAAQ,CAAC,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;IACnD;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,iCAAiC,CAAC;IAC3D;;;;;;;;;OASG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC;;;;;;;;OAQG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC;IAC5D;;;;;;;;;;;;;;;;;;OAkBG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;IAElE;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAE/B;;;;;;;;;;;;;;;;;;OAkBG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,aAAa,CAAC,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,CAAC,CAAC;IAErE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoCG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CACvC;AAgGD,wBAAgB,cAAc,CAC5B,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,aAAa,CAAC,aAAa,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,EAChE,UAAU,EAAE,MAAM,cAAc,EAChC,MAAM,EAAE,MAAM,EACd,IAAI,GAAE,qBAA0B,GAC/B,SAAS,CA4PX"}
|
package/dist/build-mcp.js
CHANGED
|
@@ -39,6 +39,66 @@ function identityPointerMeta(validated) {
|
|
|
39
39
|
return undefined;
|
|
40
40
|
return { ui: { resourceUri: uri }, 'ui/resourceUri': uri };
|
|
41
41
|
}
|
|
42
|
+
/** Whether a failure payload declares itself a pre-generation refusal. */
|
|
43
|
+
function declaresRefusedOutcome(payload) {
|
|
44
|
+
return isRecord(payload) && payload['outcome'] === 'refused';
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Validate an outbound tool payload — success or failure — before it
|
|
48
|
+
* reaches the wire.
|
|
49
|
+
*
|
|
50
|
+
* A tool's `outputSchema` is a raw FIELD RECORD, because that is what
|
|
51
|
+
* the MCP SDK registers. Rebuilding it here with `z.object(shape)`
|
|
52
|
+
* therefore drops every cross-field refinement the tool's composed
|
|
53
|
+
* protocol schema carries — which would leave rules like ggui#786's
|
|
54
|
+
* "a refused result carries `refusal` and NOTHING else" and
|
|
55
|
+
* "present-iff-committed on the rendered / failed arms" unenforced at
|
|
56
|
+
* the very seam that is supposed to enforce them.
|
|
57
|
+
*
|
|
58
|
+
* So a handler that declares {@link SharedHandler.outputEnvelopeSchema}
|
|
59
|
+
* gets validated against THAT (same object, same unknown-key
|
|
60
|
+
* stripping, plus its refinements); every other handler keeps today's
|
|
61
|
+
* rebuilt-shape validation verbatim. Either way a non-conformant
|
|
62
|
+
* payload throws — loudly at the transport, never silently on the
|
|
63
|
+
* wire.
|
|
64
|
+
*/
|
|
65
|
+
function validateOutputPayload(handler, payload) {
|
|
66
|
+
const envelope = handler.outputEnvelopeSchema;
|
|
67
|
+
const validated = envelope !== undefined
|
|
68
|
+
? envelope.parse(payload)
|
|
69
|
+
: z.object(handler.outputSchema).parse(payload);
|
|
70
|
+
// `ZodType.parse` widens to `unknown`, and the MCP result's
|
|
71
|
+
// `structuredContent` is a JSON OBJECT by spec. Both branches above
|
|
72
|
+
// are object schemas, so this narrowing never fires in practice — but
|
|
73
|
+
// it is a real check rather than an assertion, and a handler that
|
|
74
|
+
// ever declares a non-object envelope fails here by name.
|
|
75
|
+
if (!isRecord(validated)) {
|
|
76
|
+
throw new Error(`${handler.name}: validated tool output is not a JSON object — structuredContent cannot carry it`);
|
|
77
|
+
}
|
|
78
|
+
return validated;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The `tool_invoked` fields that classify a failure result (ggui#786,
|
|
82
|
+
* ruling item 7). A refusal is a WIRE STATE, so it reports its own
|
|
83
|
+
* `outcome` and the registry `code` that produced it — without those
|
|
84
|
+
* two fields a refusal is indistinguishable from a generation failure
|
|
85
|
+
* in the logs. Any other failure keeps the generic `tool_error`.
|
|
86
|
+
*
|
|
87
|
+
* The thrown path is untouched (`outcome: 'error'` + `errorClass`),
|
|
88
|
+
* which is what makes "a gate that throws instead of returning a
|
|
89
|
+
* refusal is a conformance failure" observable in ops.
|
|
90
|
+
*/
|
|
91
|
+
function classifyFailurePayload(payload) {
|
|
92
|
+
if (!declaresRefusedOutcome(payload) || !isRecord(payload)) {
|
|
93
|
+
return { outcome: 'tool_error' };
|
|
94
|
+
}
|
|
95
|
+
const refusal = payload['refusal'];
|
|
96
|
+
const code = isRecord(refusal) ? refusal['code'] : undefined;
|
|
97
|
+
return {
|
|
98
|
+
outcome: 'refused',
|
|
99
|
+
...(typeof code === 'string' ? { code } : {}),
|
|
100
|
+
};
|
|
101
|
+
}
|
|
42
102
|
export function buildMcpServer(info, handlers, getContext, logger, opts = {}) {
|
|
43
103
|
const server = new McpServer({
|
|
44
104
|
name: info.name,
|
|
@@ -54,6 +114,10 @@ export function buildMcpServer(info, handlers, getContext, logger, opts = {}) {
|
|
|
54
114
|
if (opts.mcpAppsOutbound) {
|
|
55
115
|
({ shellResourceUri } = installMcpAppsOutbound(server, {
|
|
56
116
|
...(opts.shellHtml !== undefined ? { shellHtml: opts.shellHtml } : {}),
|
|
117
|
+
...(opts.loadingIndicator !== undefined
|
|
118
|
+
? { loadingIndicator: opts.loadingIndicator }
|
|
119
|
+
: {}),
|
|
120
|
+
getContext,
|
|
57
121
|
// Thread the same per-request context accessor + logger the tool
|
|
58
122
|
// path uses (`getContext`, param 3 of `buildMcpServer`) so the
|
|
59
123
|
// per-session resource handler's render-read gate sees the
|
|
@@ -129,11 +193,11 @@ export function buildMcpServer(info, handlers, getContext, logger, opts = {}) {
|
|
|
129
193
|
// not invoked, so no mount affordance / bootstrap slice is
|
|
130
194
|
// emitted for a failed call.
|
|
131
195
|
if (isHandlerFailure(data)) {
|
|
132
|
-
const validated =
|
|
196
|
+
const validated = validateOutputPayload(handler, data.data);
|
|
133
197
|
logger.warn('tool_invoked', {
|
|
134
198
|
tool: handler.name,
|
|
135
199
|
appId: ctx.appId,
|
|
136
|
-
|
|
200
|
+
...classifyFailurePayload(data.data),
|
|
137
201
|
elapsedMs: Date.now() - start,
|
|
138
202
|
});
|
|
139
203
|
return {
|
|
@@ -142,7 +206,7 @@ export function buildMcpServer(info, handlers, getContext, logger, opts = {}) {
|
|
|
142
206
|
content: [{ type: 'text', text: data.errorText }],
|
|
143
207
|
};
|
|
144
208
|
}
|
|
145
|
-
const validated =
|
|
209
|
+
const validated = validateOutputPayload(handler, data);
|
|
146
210
|
// Per-result `_meta` — NOT merged into structuredContent, so
|
|
147
211
|
// agents that typecheck against the tool signature never see
|
|
148
212
|
// it. This is where view-only bootstrap material lives. Under
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console-chat-routes.d.ts","sourceRoot":"","sources":["../src/console-chat-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"console-chat-routes.d.ts","sourceRoot":"","sources":["../src/console-chat-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAIvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,UAAU,YAAY;IACpB,iCAAiC;IACjC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACjE,+DAA+D;IAC/D,QAAQ,CAAC,gBAAgB,CAAC,EAAE,aAAa,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACpE;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE;QACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;KAC1B,CAAC;IACF,yBAAyB;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AA+BD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAqL/D"}
|
|
@@ -44,10 +44,38 @@
|
|
|
44
44
|
* generation/`) without a copy change.
|
|
45
45
|
*/
|
|
46
46
|
import { isHandlerFailure, } from "@ggui-ai/mcp-server-handlers";
|
|
47
|
+
import { isRenderedOutput, renderOutputSchema } from "@ggui-ai/protocol";
|
|
47
48
|
import { randomUUID } from "node:crypto";
|
|
48
49
|
import { DEFAULT_BUILDER_APP_ID } from "./auth.js";
|
|
49
50
|
import { mintDevtoolCookie } from "./console-auth.js";
|
|
50
51
|
import { applyDevtoolSecurityHeaders } from "./console-headers.js";
|
|
52
|
+
/**
|
|
53
|
+
* Narrow the render handler's result to its committed RENDERED shape.
|
|
54
|
+
*
|
|
55
|
+
* The handler is looked up BY NAME out of a heterogeneous handler
|
|
56
|
+
* array, so its declared output type is erased to `unknown` at this
|
|
57
|
+
* seam and a runtime probe is the only honest way back to a type. The
|
|
58
|
+
* shape is NOT restated here: the wire half is validated by the
|
|
59
|
+
* protocol's own `renderOutputSchema` and the arm is decided by the
|
|
60
|
+
* exported `isRenderedOutput` guard, so the three-outcome rules
|
|
61
|
+
* (ggui#786) are enforced rather than assumed. Only the two
|
|
62
|
+
* handler-internal seams the console reads — `shortCode` and
|
|
63
|
+
* `codeReady`, which `renderOutputSchema` deliberately strips before
|
|
64
|
+
* the wire — are probed directly, and the predicate returns the
|
|
65
|
+
* handler's own {@link RenderOutput} so a moved field breaks the build
|
|
66
|
+
* instead of silently reading `undefined`.
|
|
67
|
+
*/
|
|
68
|
+
function isRenderedConsoleResult(value) {
|
|
69
|
+
const parsed = renderOutputSchema.safeParse(value);
|
|
70
|
+
if (!parsed.success || !isRenderedOutput(parsed.data))
|
|
71
|
+
return false;
|
|
72
|
+
return (typeof value === "object" &&
|
|
73
|
+
value !== null &&
|
|
74
|
+
"shortCode" in value &&
|
|
75
|
+
typeof value.shortCode === "string" &&
|
|
76
|
+
"codeReady" in value &&
|
|
77
|
+
typeof value.codeReady === "boolean");
|
|
78
|
+
}
|
|
51
79
|
/**
|
|
52
80
|
* Mount `POST /ggui/console/chat/message` onto the express app.
|
|
53
81
|
* Returns nothing — the route self-registers.
|
|
@@ -123,6 +151,20 @@ export function mountConsoleChatRoutes(opts) {
|
|
|
123
151
|
});
|
|
124
152
|
return;
|
|
125
153
|
}
|
|
154
|
+
if (!isRenderedConsoleResult(raw)) {
|
|
155
|
+
// Unreachable by type: the render handler returns either a
|
|
156
|
+
// HandlerFailure (both the `failed` and `refused` arms, caught
|
|
157
|
+
// above) or a committed RENDERED result. Reaching here means
|
|
158
|
+
// the handler's output stopped matching the protocol schema,
|
|
159
|
+
// which is a bug to surface loudly rather than a wire state to
|
|
160
|
+
// paper over with optional reads.
|
|
161
|
+
logger.warn?.("console_chat_render_nonconformant", { threadId });
|
|
162
|
+
res.status(500).json({
|
|
163
|
+
error: "render_result_nonconformant",
|
|
164
|
+
message: "ggui_render returned a result that is neither a failure envelope nor a conformant rendered result.",
|
|
165
|
+
});
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
126
168
|
const result = raw;
|
|
127
169
|
ui = {
|
|
128
170
|
sessionId: result.sessionId,
|
|
@@ -57,6 +57,7 @@ import type { CodeStore, GguiSessionStore, ShortCodeIndex } from "@ggui-ai/mcp-s
|
|
|
57
57
|
import type { Express } from "express";
|
|
58
58
|
import type { GguiSessionChannelCookieAuth } from "./ggui-session-channel.js";
|
|
59
59
|
import type { Logger } from "./logger.js";
|
|
60
|
+
import { type LoadingIndicatorOption } from "./mcp-apps-outbound.js";
|
|
60
61
|
interface MountOptions {
|
|
61
62
|
/** Express app to mount onto. */
|
|
62
63
|
readonly app: Express;
|
|
@@ -84,6 +85,12 @@ interface MountOptions {
|
|
|
84
85
|
readonly publicBaseUrl?: string;
|
|
85
86
|
/** Parent logger; the mount derives its `console-cookie` child. */
|
|
86
87
|
readonly logger: Logger;
|
|
88
|
+
/**
|
|
89
|
+
* #667 working-state knob — static mark or per-app provider,
|
|
90
|
+
* resolved per request against the gate's verified appId (markup-
|
|
91
|
+
* only: the pinned inline-script CSP hash is unaffected).
|
|
92
|
+
*/
|
|
93
|
+
readonly loadingIndicator?: LoadingIndicatorOption;
|
|
87
94
|
}
|
|
88
95
|
/**
|
|
89
96
|
* Mount the console session routes onto the express app and return
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console-session-routes.d.ts","sourceRoot":"","sources":["../src/console-session-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAQ5F,OAAO,KAAK,EAAE,OAAO,EAAqB,MAAM,SAAS,CAAC;AAQ1D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"console-session-routes.d.ts","sourceRoot":"","sources":["../src/console-session-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AE,sBAAsB,CAAC;CACpD;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,YAAY,GAAG,4BAA4B,CAyW1F"}
|
|
@@ -57,7 +57,7 @@ import { deriveContractBundle } from "@ggui-ai/mcp-server-handlers/renders";
|
|
|
57
57
|
import { GGUI_RENDER_RESOURCE_MIME, GGUI_RENDER_RESOURCE_URI, MCP_APP_AI_GGUI_RENDER_META_KEY, } from "@ggui-ai/protocol/integrations/mcp-apps";
|
|
58
58
|
import { CONSOLE_COOKIE_NAME, mintDevtoolCookie, readDevtoolCookieFromHeaders, verifyDevtoolCookie, } from "./console-auth.js";
|
|
59
59
|
import { applyDevtoolSecurityHeaders } from "./console-headers.js";
|
|
60
|
-
import { GGUI_RENDER_SHELL_HTML } from "./mcp-apps-outbound.js";
|
|
60
|
+
import { GGUI_RENDER_SHELL_HTML, resolveLoadingIndicatorBody, } from "./mcp-apps-outbound.js";
|
|
61
61
|
import { singleParam } from "./route-param.js";
|
|
62
62
|
/**
|
|
63
63
|
* Mount the console session routes onto the express app and return
|
|
@@ -198,7 +198,7 @@ export function mountConsoleSessionRoutes(opts) {
|
|
|
198
198
|
{
|
|
199
199
|
uri: GGUI_RENDER_RESOURCE_URI,
|
|
200
200
|
mimeType: GGUI_RENDER_RESOURCE_MIME,
|
|
201
|
-
text: GGUI_RENDER_SHELL_HTML,
|
|
201
|
+
text: resolveLoadingIndicatorBody(GGUI_RENDER_SHELL_HTML, opts.loadingIndicator, verified.appId),
|
|
202
202
|
},
|
|
203
203
|
],
|
|
204
204
|
});
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
* unauthenticated caller gets an auth error rather than a confirmation
|
|
43
43
|
* preview that leaks which operations exist against which account.
|
|
44
44
|
*/
|
|
45
|
-
import { type SharedHandler } from "@ggui-ai/mcp-server-handlers";
|
|
45
|
+
import { type SharedHandler, type SharedHandlerOutputBound } from "@ggui-ai/mcp-server-handlers";
|
|
46
46
|
import { type ZodRawShape } from "zod";
|
|
47
47
|
import type { McpService } from "./mcp-mounts.js";
|
|
48
48
|
type AnyHandler = SharedHandler<ZodRawShape, ZodRawShape>;
|
|
@@ -106,7 +106,7 @@ export declare const SINGLE_CALL_OPS: ReadonlySet<string>;
|
|
|
106
106
|
* Return a copy of the handler with the `audience` tag removed.
|
|
107
107
|
* `validateMcpServices` rejects service handlers that carry one.
|
|
108
108
|
*/
|
|
109
|
-
export declare function stripAudience<I extends ZodRawShape, O extends ZodRawShape, D
|
|
109
|
+
export declare function stripAudience<I extends ZodRawShape, O extends ZodRawShape, D extends SharedHandlerOutputBound<O>>(h: SharedHandler<I, O, D>): SharedHandler<I, O, D>;
|
|
110
110
|
/**
|
|
111
111
|
* Require an authenticated caller.
|
|
112
112
|
*
|
|
@@ -129,7 +129,7 @@ export declare function stripAudience<I extends ZodRawShape, O extends ZodRawSha
|
|
|
129
129
|
* `isError` tool result, which is the contract for callers that
|
|
130
130
|
* authenticated but lack what the handler needs.
|
|
131
131
|
*/
|
|
132
|
-
export declare function withAuthGate<I extends ZodRawShape, O extends ZodRawShape, D
|
|
132
|
+
export declare function withAuthGate<I extends ZodRawShape, O extends ZodRawShape, D extends SharedHandlerOutputBound<O>>(h: SharedHandler<I, O, D>): SharedHandler<I, O, D>;
|
|
133
133
|
/**
|
|
134
134
|
* Wrap a state-changing handler in a stateless two-call confirmation
|
|
135
135
|
* gate. The first call (no `confirm: true`) returns a preview and runs
|
|
@@ -146,7 +146,7 @@ export declare function withAuthGate<I extends ZodRawShape, O extends ZodRawShap
|
|
|
146
146
|
* confirmation fields) and a real commit response (inner fields)
|
|
147
147
|
* validate against it.
|
|
148
148
|
*/
|
|
149
|
-
export declare function withConfirmGate<I extends ZodRawShape, O extends ZodRawShape, D
|
|
149
|
+
export declare function withConfirmGate<I extends ZodRawShape, O extends ZodRawShape, D extends SharedHandlerOutputBound<O>>(h: SharedHandler<I, O, D>): SharedHandler<ZodRawShape, ZodRawShape>;
|
|
150
150
|
export interface BuildControlServiceArgs {
|
|
151
151
|
/**
|
|
152
152
|
* The server's fully composed handler list. The control plane filters
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-service.d.ts","sourceRoot":"","sources":["../src/control-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,OAAO,EAGL,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"control-service.d.ts","sourceRoot":"","sources":["../src/control-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC9B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAK,KAAK,WAAW,EAAmB,MAAM,KAAK,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,KAAK,UAAU,GAAG,aAAa,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAE1D,gDAAgD;AAChD,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,KAAK,CAAC;AAEnE,6CAA6C;AAC7C,eAAO,MAAM,YAAY,aAAa,CAAC;AAEvC,+EAA+E;AAC/E,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAE9C,sDAAsD;AACtD,eAAO,MAAM,oBAAoB,EAAE,aAAa,CAAC,WAAW,CAAwB,CAAC;AAErF,0CAA0C;AAC1C,eAAO,MAAM,uBAAuB,EAAE,aAAa,CAAC,WAAW,CAAuB,CAAC;AAEvF;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,aAAa,CAAC,UAAU,CAAC,EAC9B,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,GAClC,aAAa,CAAC,UAAU,CAAC,CAK3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,e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CAAC;CAC5C"}
|
|
@@ -51,7 +51,7 @@ const ACTION_ROUTING_PARAGRAPH = "Action routing: every actionSpec entry is a GE
|
|
|
51
51
|
* `always` only — shows the literal handshake → render pattern an
|
|
52
52
|
* operator can copy.
|
|
53
53
|
*/
|
|
54
|
-
const WORKED_EXAMPLE_PARAGRAPH = "Example: ggui_handshake({ intent: 'a settings panel for notification preferences', blueprintDraft: { contract: {...}, variance: { persona: 'minimalist' } } }) returns { handshakeId: 'h_…', suggestion: { origin: 'cache' | 'agent' | 'synth', blueprintMeta: { blueprintId?, contractHash, codeHash?, source?, variance }, amendments?, validationFindings? }, contractHash: '<hex>' }. props is REQUIRED on every render (pass props: {} when the contract declares no propsSpec). ACCEPT PATH: ggui_render({ handshakeId: 'h_…', props: {} }) — OMIT override to reuse the proposed blueprintId verbatim
|
|
54
|
+
const WORKED_EXAMPLE_PARAGRAPH = "Example: ggui_handshake({ intent: 'a settings panel for notification preferences', blueprintDraft: { contract: {...}, variance: { persona: 'minimalist' } } }) returns { handshakeId: 'h_…', suggestion: { origin: 'cache' | 'agent' | 'synth', blueprintMeta: { blueprintId?, contractHash, codeHash?, source?, variance }, amendments?, validationFindings? }, contractHash: '<hex>' }. props is REQUIRED on every render (pass props: {} when the contract declares no propsSpec). ACCEPT PATH: ggui_render({ handshakeId: 'h_…', props: {} }) — OMIT override to reuse the proposed blueprintId verbatim. Read the response's `outcome` first: it is one of `rendered` | `failed` | `refused`. A `rendered` response carries the minted sessionId + the mount URI; a `failed` one carries the sessionId plus an `error` and CONSUMES the handshake; a `refused` one carries only `refusal` ({code, message, fix, retry}) — nothing was committed, the handshake is NOT consumed, and the same handshakeId works again once the fix lands. Only auto-retry a refusal when its registered `fixBy` is `caller`; otherwise surface the `fix` to the user, because retrying does not perform it. OVERRIDE PATH: ggui_render({ handshakeId: 'h_…', props: {}, override: { contract: { ...refined } } }) — STRICT fresh draft against override.contract (server does NOT repair). override: { variance: {...} } instead re-aims the variant (persona/aesthetic/context/seedPrompt) while keeping the agreed contract.";
|
|
55
55
|
/**
|
|
56
56
|
* The default-preset body, captured as a const so `aggressive` and
|
|
57
57
|
* `always` can layer additional paragraphs on top without diverging
|
|
@@ -68,7 +68,7 @@ const DEFAULT_PRESET_BODY = [
|
|
|
68
68
|
'',
|
|
69
69
|
' • actionSpec — client → agent (discrete events). User gestures (clicks, submits) that drive the agent\'s NEXT TURN. Each entry has a `label`, optional `schema` for the payload, and optional `nextStep: "<toolName>"`. When `nextStep` is present, it names the tool the agent SHOULD call next AND the same name MUST also appear in `agentCapabilities.tools` (cross-ref invariant; rejection code `cross_reference_unresolved`). Omit `nextStep` entirely when the agent should decide freely from broader context (open-ended form submits). e.g. a feedback form has `submit` on actionSpec with `nextStep:"record_feedback"` (and `record_feedback` listed under `agentCapabilities.tools`).',
|
|
70
70
|
'',
|
|
71
|
-
' • contextSpec — client → agent (observed state, not events). Continuous client state the agent observes — slider position, draft text, current selection. Use contextSpec when you need to KNOW the state but don\'t need to ACT on every change. On MCP Apps hosts the runtime auto-mirrors the snapshot into the host\'s widget-context surface (the agent sees it on the next turn without polling). On raw MCP clients there is no auto-mirror —
|
|
71
|
+
' • contextSpec — client → agent (observed state, not events). Continuous client state the agent observes — slider position, draft text, current selection. Use contextSpec when you need to KNOW the state but don\'t need to ACT on every change. On MCP Apps hosts the runtime auto-mirrors the snapshot into the host\'s widget-context surface (the agent sees it on the next turn without polling). On raw MCP clients there is no auto-mirror — ggui_get_session returns `contextSnapshot` (the last-known value of every contextSpec slot) when the render has one, and each ggui_consume event carries its own `uiContext` captured at gesture time. e.g. a calendar has `selectedDate` on contextSpec.',
|
|
72
72
|
'',
|
|
73
73
|
' • streamSpec — agent → client (live updates). Live outbound channels for streaming data to the UI mid-render — chat tokens, progress events, log lines, time-series data. Each entry has a `schema` for the frame shape; you push frames via ggui_emit. e.g. a chat surface has `assistantMessage` on streamSpec for token-by-token output.',
|
|
74
74
|
'',
|
|
@@ -85,7 +85,7 @@ const DEFAULT_PRESET_BODY = [
|
|
|
85
85
|
'',
|
|
86
86
|
' 1. ggui_handshake — FIRST CALL for any UI. Negotiate a contract for the next render. Post {intent, blueprintDraft: {contract, variance?, generator?}}. `variance` is optional and steers cache lookup + gen by axis: `persona` ("minimalist", "playful"), `aesthetic` ("dense", "spacious"), `seedPrompt` (deterministic seed). HANDSHAKE IS FORGIVING — it ALWAYS returns a handshakeId + a CONFORMING contract, even when your draft is malformed: the server cache-matches an existing blueprint OR repairs your draft until it passes validation. The suggestion carries origin: cache (an existing blueprint matched — delivered instantly) | agent (your draft was already clean) | synth (your draft had problems and the server repaired it; `suggestion.validationFindings` lists exactly what was wrong so you learn for next time). CRITICAL: a synth result is NOT an error and NOT a request to retry — the returned contract is READY. Accept it and call ggui_render. Do NOT re-call ggui_handshake hoping for a different origin — that is a loop that wastes turns and changes nothing.',
|
|
87
87
|
'',
|
|
88
|
-
' 2. ggui_render — deliver the UI. handshakeId is REQUIRED (from step 1); calling render without it fails with `handshake_not_found`. props is ALSO REQUIRED on every call — send {handshakeId, props} (pass props: {} when the contract declares no propsSpec). OMIT `override` to use the handshake suggestion verbatim — THE NORMAL PATH, since the contract is already conforming. To commit to a FRESH draft of your own, add {handshakeId, props, override:{contract:{...}}}. OVERRIDE IS STRICT: a forced override.contract MUST already conform — the server does NOT repair it (override means "use mine exactly"). Alternatively {handshakeId, props, override:{variance:{...}}} re-aims the variant (persona/aesthetic/context/seedPrompt) while keeping the agreed contract. Prefer omitting override; override only when the suggestion genuinely is not what you want AND your replacement is correct.
|
|
88
|
+
' 2. ggui_render — deliver the UI. handshakeId is REQUIRED (from step 1); calling render without it fails with `handshake_not_found`. props is ALSO REQUIRED on every call — send {handshakeId, props} (pass props: {} when the contract declares no propsSpec). OMIT `override` to use the handshake suggestion verbatim — THE NORMAL PATH, since the contract is already conforming. To commit to a FRESH draft of your own, add {handshakeId, props, override:{contract:{...}}}. OVERRIDE IS STRICT: a forced override.contract MUST already conform — the server does NOT repair it (override means "use mine exactly"). Alternatively {handshakeId, props, override:{variance:{...}}} re-aims the variant (persona/aesthetic/context/seedPrompt) while keeping the agreed contract. Prefer omitting override; override only when the suggestion genuinely is not what you want AND your replacement is correct. READ `outcome` FIRST — every render response carries it, and it is one of `rendered` | `failed` | `refused`. On `rendered` you get the minted `sessionId` — your handle for every follow-up call — plus the mount URI. On `failed` the sessionId is still there (the error session IS committed) alongside an `error` classification, and the handshake is consumed, so recovery starts at a fresh ggui_handshake. On `refused` the deployment declined BEFORE doing any work: the response carries only `refusal` ({code, message, fix, retry}) — no sessionId, no cache, no error — nothing was committed and the handshake is NOT consumed, so the SAME handshakeId still works once the fix lands. Only auto-retry a refusal when its registered `fixBy` is `caller`; when any other party owns the fix, surface `refusal.fix` to the user instead, because retrying does not perform it. Handshake records are SINGLE-USE and expire after 10 minutes. On error: `handshake_not_found` → call ggui_handshake again; `contract_violation` / `missing_props` (props don\'t match propsSpec) → fix props and retry with the SAME handshakeId; `override_contract_invalid` (your override.contract failed validation) → drop override entirely, re-run ggui_handshake with that draft (which WILL repair it), and render the suggestion — do NOT retry override with the same draft.',
|
|
89
89
|
'',
|
|
90
90
|
' 3. NEXT STEP — read the render response. If it carries a `nextStep` field, call that tool with the given args. Render only emits `nextStep` when the contract declared a non-empty actionSpec (i.e., the UI has interactive buttons/forms); in that case nextStep names ggui_consume and your job is to long-poll for the user\'s gesture. If the render response has NO nextStep, the UI is pure-display (props only, no actionSpec) — you can end your turn; the user reads the UI and types their next prompt when they\'re ready.',
|
|
91
91
|
'',
|
|
@@ -120,7 +120,7 @@ const DEFAULT_PRESET_BODY = [
|
|
|
120
120
|
'',
|
|
121
121
|
' • ggui_emit — push frames to a streamSpec channel on a delivered UI. Use when the contract declared streamSpec (chat tokens, progress bars, live data). Frames must match the channel\'s declared `schema`. The live channel of the wire carries these.',
|
|
122
122
|
'',
|
|
123
|
-
' • ggui_get_session / ggui_list_sessions — inspect current session state if you\'ve lost track of what\'s on screen. ggui_get_session returns the
|
|
123
|
+
' • ggui_get_session / ggui_list_sessions — inspect current session state if you\'ve lost track of what\'s on screen. ggui_get_session returns the wire projection — variant, id, appId, eventSequence, createdAt, lastActivityAt, expiresAt — plus `contextSnapshot` (the last-known contextSpec values) when the render has one: the read path for contextSpec values from a raw MCP client. ggui_list_sessions enumerates every session in the current host conversation (paired by `_meta["ai.ggui/host-session"]` on the inbound call).',
|
|
124
124
|
'',
|
|
125
125
|
'═══ HOST RENDERING ═══',
|
|
126
126
|
'',
|
|
@@ -37,7 +37,7 @@ import { type McpAppAiGguiRenderMeta } from "@ggui-ai/protocol/integrations/mcp-
|
|
|
37
37
|
import { type McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
38
38
|
import type { HandlerContext } from "@ggui-ai/mcp-server-handlers";
|
|
39
39
|
import type { Logger } from "./logger.js";
|
|
40
|
-
export declare const GGUI_RENDER_SHELL_HTML = "<!doctype html>\n<html lang=\"en\" style=\"height:100%;background-color:var(--ggui-shell-background, var(--ggui-color-surface, #1e293b))\"><head><meta charset=\"utf-8\"><title>ggui render</title></head>\n<body style=\"margin:0;height:100%;min-height:480px;background-color:var(--ggui-shell-background, var(--ggui-color-surface, #1e293b))\"><div id=\"ggui-root\" data-ggui-shell=\"thin\" style=\"height:100%;min-height:480px\"></div>\n<script>\n(function(){'use strict';\n// MCP Apps shell. Speaks the canonical postMessage protocol from\n// @modelcontextprotocol/ext-apps:\n// 1. iframe -> host: ui/initialize\n// 2. iframe -> host: ui/notifications/initialized\n// 3. host -> iframe: ui/notifications/tool-result (per CallToolResult)\n// On tool-result, read the slice envelope from _meta (spec-canonical\n// CallToolResult _meta at the top level), set window.__GGUI_META__ to\n// the envelope, fetch runtime as blob, inject as script.\n// Runtime auto-mounts inline. No nested iframe (claudemcpcontent.com\n// CSP frame-src forbids cross-origin frames). State machine matches\n// buildSelfContainedShell so the same runtime mounts both paths.\n//\n// R5 (2026-05-26): the historic /r/<shortCode> HTTP fallback was\n// removed along with the bearer-by-obscurity model -- hosts that strip\n// _meta no longer have a recovery path here. Spec-canonical hosts\n// deliver _meta inline and are unaffected.\n//\n// Phase B (2026-05-27): the historic two-slice envelope\n// (`ai.ggui/session` + `ai.ggui/stack-item`) collapsed to ONE flat\n// `ai.ggui/render` slice. runtimeUrl now lives directly on the\n// render slice; sessionId is the canonical identity.\nvar rpcId=1,pending={};\nvar rootEl=document.getElementById('ggui-root');\nrootEl.style.cssText='display:flex;flex-direction:column;height:100%;min-height:300px;margin:0';\nvar mounted=false;\nvar lastEnvelope=null;\n// Text color pairs with the shell surface: themed var when the runtime\n// injected theme CSS, else the light-on-dark fallback matching the\n// shell's static #1e293b pre-theme surface. The old hardcoded #666 was\n// illegible on that dark fallback (#481).\nvar SHELL_FG='var(--ggui-color-onSurface,#e2e8f0)';\nfunction setOverlay(text){\n if(mounted)return;\n rootEl.innerHTML='<div style=\"font:13px system-ui,sans-serif;padding:24px;color:'+SHELL_FG+';opacity:.55\">'+text+'</div>';\n}\nfunction escText(s){\n return String(s).replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/\"/g,'"');\n}\n// Terminal failure card (#481): plain-language summary, diagnostic\n// reachable but collapsed, Retry only when a retry can actually work.\n// Same visual vocabulary as the runtime's React error boundary so the\n// two error surfaces read as one system.\nfunction showFailure(summary,detail,retry){\n if(mounted)return;\n rootEl.innerHTML=''+\n '<div style=\"display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px 24px;min-height:160px;font-family:system-ui,sans-serif;color:'+SHELL_FG+';text-align:center\">'+\n '<div style=\"font-size:14px;font-weight:600\">'+escText(summary)+'</div>'+\n '<div style=\"font-size:12px;opacity:.65;max-width:320px;line-height:1.45\">The interface could not start. The conversation is unaffected \u2014 you can also just ask for the view again.</div>'+\n (retry?'<button id=\"ggui-shell-retry\" style=\"margin-top:2px;padding:7px 18px;border-radius:8px;border:1px solid currentColor;background:transparent;color:inherit;opacity:.75;font:500 13px system-ui,sans-serif;cursor:pointer\">Retry</button>':'')+\n '<details style=\"margin-top:6px;max-width:340px;width:100%;text-align:left;opacity:.75\">'+\n '<summary style=\"cursor:pointer;font-size:12px\">Details</summary>'+\n '<pre style=\"margin:6px 0 0;font:11px/1.5 ui-monospace,Menlo,monospace;white-space:pre-wrap;word-break:break-word\">'+escText(detail)+'</pre>'+\n '</details>'+\n '</div>';\n if(retry){\n var b=document.getElementById('ggui-shell-retry');\n if(b)b.onclick=retry;\n }\n}\nfunction postNotification(method,params){\n try{window.parent.postMessage({jsonrpc:'2.0',method:method,params:params||{}},'*');}catch(e){}\n}\nfunction postRpc(method,params){\n return new Promise(function(res,rej){\n var id=rpcId++;pending[id]={res:res,rej:rej};\n try{window.parent.postMessage({jsonrpc:'2.0',id:id,method:method,params:params||{}},'*');}\n catch(e){delete pending[id];rej(e);}\n });\n}\nfunction postBootstrapFailed(reason,message){\n // Surface every shell-layer bootstrap-failure path as a typed\n // RendererBootFailedMessage envelope so hosts pinning the C9\n // error pane (McpAppIframe onError, IframeErrorPane) see the\n // failure instead of staring at the inert overlay until the test\n // times out. Reason codes match BootstrapFailureReason.\n try{window.parent.postMessage({type:'ggui:bootstrap-failed',reason:reason,message:message},'*');}catch(e){}\n}\nasync function mountFromMeta(envelope){\n if(mounted)return;\n // Slice envelope shape (Phase B): { \"ai.ggui/render\": { sessionId,\n // appId, runtimeUrl, ... } }. runtimeUrl on the render slice is\n // the only load-bearing field at the shell layer \u2014 it tells us\n // which iframe-runtime bundle to fetch. Everything else is\n // optional; the runtime decides at boot time based on the meta\n // it reads from window.__GGUI_META__.\n var renderSlice=envelope&&envelope['ai.ggui/render'];\n var runtimeUrl=renderSlice&&renderSlice.runtimeUrl;\n if(!envelope||typeof runtimeUrl!=='string'){\n // No retry: without a valid envelope there is nothing to re-run.\n showFailure('This view could not start','MALFORMED_BOOTSTRAP: bootstrap payload malformed (no ai.ggui/render slice with a runtimeUrl).',null);\n postBootstrapFailed('MALFORMED_BOOTSTRAP','Bootstrap payload malformed.');\n return;\n }\n lastEnvelope=envelope;\n setOverlay('Loading UI\u2026');\n window.__GGUI_META__=envelope;\n // Load the runtime bundle via a direct cross-origin script tag\n // (governed by CSP script-src) instead of fetch + Blob (governed by\n // CSP connect-src). claude.ai's claudemcpcontent.com iframe CSP\n // forbids cross-origin connect-src so fetch throws TypeError\n // 'Failed to fetch', but allows cross-origin script-src when the\n // bundle responds with the right CORS headers (the iframe-runtime\n // mount sets them). The self-contained shell already uses this\n // pattern; legacy postMessage shell now matches it.\n try{\n var s=document.createElement('script');\n s.type='module';\n // crossorigin=anonymous opts into CORS-mode error reporting.\n // Without it, cross-origin script tags get a sanitized\n // \"script error\" with no details, masking the real cause\n // (CSP block, CORS reject, module-evaluation throw). With it,\n // the error event surfaces the actual message in the iframe\n // console -- the bundle ships ACAO=* so credentialed mode is\n // unnecessary.\n s.crossOrigin='anonymous';\n s.src=runtimeUrl;\n s.onload=function(){mounted=true;};\n s.onerror=function(e){\n var msg='Runtime bundle failed to load: '+(e&&e.message||'script error');\n showFailure('This view could not load','BUNDLE_FETCH_FAILED: '+msg,function(){mountFromMeta(lastEnvelope);});\n postBootstrapFailed('BUNDLE_FETCH_FAILED',msg);\n };\n rootEl.innerHTML='';\n document.body.appendChild(s);\n }catch(e){\n var msg='Runtime bundle failed to load: '+(e&&e.message||e);\n showFailure('This view could not load','BUNDLE_FETCH_FAILED: '+msg,function(){mountFromMeta(lastEnvelope);});\n postBootstrapFailed('BUNDLE_FETCH_FAILED',msg);\n }\n}\nfunction readMetaFromCallToolResult(params){\n // MCP Apps spec (specification/2026-01-26/apps.mdx:1145-1155):\n // ui/notifications/tool-result\n // params: CallToolResult // Standard MCP type\n // So params IS the CallToolResult and _meta lives at the top\n // level. Spec-compliant hosts (Claude Desktop, claude.ai\n // Connector, Claude Code) deliver slice-envelope material here.\n // Single slice-envelope key (Phase B: ai.ggui/render). Only the\n // render slice's runtimeUrl is load-bearing at the shell layer;\n // the runtime reads everything else off window.__GGUI_META__\n // after we set it.\n if(!params||typeof params!=='object')return null;\n var meta=params._meta;\n if(!meta||typeof meta!=='object')return null;\n var renderSlice=meta['ai.ggui/render'];\n if(!renderSlice||typeof renderSlice!=='object')return null;\n if(typeof renderSlice.runtimeUrl!=='string')return null;\n return meta;\n}\nwindow.addEventListener('message',function(ev){\n var m=ev&&ev.data;\n if(!m||m.jsonrpc!=='2.0')return;\n if(m.id!=null&&pending[m.id]){\n var p=pending[m.id];delete pending[m.id];\n if(m.error)p.rej(m.error);else p.res(m.result);\n return;\n }\n if(m.method==='ui/notifications/tool-result'){\n // Spec-compliant hosts: m.params IS the CallToolResult; _meta is\n // at the top level.\n var specMeta=readMetaFromCallToolResult(m.params);\n if(specMeta){mountFromMeta(specMeta);return;}\n // Read-plane door (ggui#537). A server running the read-plane-only\n // posture publishes only the view's IDENTITY on the result -- the\n // ui:// locator on structuredContent.resourceUri and the spec\n // pointer _meta.ui.resourceUri -- and no bootstrap material. The\n // per-render resource that locator names is the self-contained\n // shell, whose document inlines the very envelope this shell needs;\n // ask the HOST to read it (resources/read, proxied by the host's\n // own MCP client -- no fetch from this sandbox, so a host CSP with\n // no connect-src to the server is not in the way). R5 (2026-05-26)\n // removed the /r/<shortCode> HTTP fallback with the bearer-by-\n // obscurity model; this door is the spec-canonical replacement.\n var locator=readLocatorFromCallToolResult(m.params);\n if(locator){mountFromLocator(locator);return;}\n }\n});\nfunction readLocatorFromCallToolResult(params){\n if(!params||typeof params!=='object')return null;\n var sc=params.structuredContent, meta=params._meta, uri=null;\n if(sc&&typeof sc==='object'&&typeof sc.resourceUri==='string')uri=sc.resourceUri;\n else if(meta&&typeof meta==='object'&&meta.ui&&typeof meta.ui==='object'&&typeof meta.ui.resourceUri==='string')uri=meta.ui.resourceUri;\n if(!uri||uri.indexOf('ui://ggui/render/')!==0)return null;\n return uri;\n}\nfunction envelopeFromResourceDoc(text){\n // The per-render self-contained shell inlines its envelope on ONE\n // line inside its meta script tag: globalThis.__GGUI_META__ = {...};\n // (protocol gguiShellHtml). The JSON is angle-bracket-escaped by the\n // assembler, so the first ';' followed by the closing script tag\n // after the marker is the terminator.\n if(typeof text!=='string')return null;\n var marker='globalThis.__GGUI_META__ = ';\n var start=text.indexOf(marker);\n if(start<0)return null;\n start+=marker.length;\n var end=text.indexOf(';<'+'/script>',start);\n if(end<0)return null;\n try{var env=JSON.parse(text.slice(start,end));}catch(e){return null;}\n return (env&&typeof env==='object'&&env['ai.ggui/render']&&typeof env['ai.ggui/render'].runtimeUrl==='string')?env:null;\n}\nasync function mountFromLocator(uri){\n if(mounted)return;\n setOverlay('Resolving view\u2026');\n var res;\n try{res=await postRpc('resources/read',{uri:uri});}\n catch(e){\n var rmsg='READ_DOOR_FAILED: the host could not read '+uri+' -- '+(e&&e.message||JSON.stringify(e));\n showFailure('This view could not be resolved',rmsg,function(){mountFromLocator(uri);});\n postBootstrapFailed('MALFORMED_BOOTSTRAP',rmsg);\n return;\n }\n var c=res&&res.contents&&res.contents[0];\n var env=envelopeFromResourceDoc(c&&c.text);\n if(!env){\n var emsg='MALFORMED_BOOTSTRAP: resource '+uri+' carried no ai.ggui/render envelope with a runtimeUrl.';\n showFailure('This view could not start',emsg,function(){mountFromLocator(uri);});\n postBootstrapFailed('MALFORMED_BOOTSTRAP',emsg);\n return;\n }\n mountFromMeta(env);\n}\n// Named so the failure card's Retry can re-run the whole handshake \u2014\n// a host that missed or rejected the first ui/initialize may answer a\n// second (observed with hosts that attach their listener late).\nfunction startInit(){\n setOverlay('Initializing\u2026');\n var initTimer=setTimeout(function(){\n showFailure('This view did not hear back from its host','INIT_TIMEOUT: no response to ui/initialize within 3s.',startInit);\n },3000);\n postRpc('ui/initialize',{\n appCapabilities:{},\n appInfo:{name:'ggui-render',version:'0.12.0'},\n protocolVersion:'2026-01-26'\n }).then(function(){\n clearTimeout(initTimer);\n postNotification('ui/notifications/initialized',{});\n // Wait for the host to send ui/notifications/tool-result carrying\n // the slice envelope in _meta \u2014 the spec-canonical delivery channel.\n // The ui/initialize result itself carries no slice meta (the\n // McpUiInitializeResult schema defines no such field).\n setOverlay('Waiting for tool result\u2026');\n }).catch(function(e){\n clearTimeout(initTimer);\n showFailure('This view could not connect to its host','ui/initialize failed: '+(e&&e.message||JSON.stringify(e)),startInit);\n });\n}\nstartInit();\n})();\n</script></body></html>";
|
|
40
|
+
export declare const GGUI_RENDER_SHELL_HTML: string;
|
|
41
41
|
/**
|
|
42
42
|
* CSP `script-src` source expression that authorises the inline
|
|
43
43
|
* `<script>` block of {@link GGUI_RENDER_SHELL_HTML} when it executes
|
|
@@ -99,6 +99,42 @@ export declare const GGUI_RENDER_SHELL_SCRIPT_HASH: string;
|
|
|
99
99
|
* deliberately untouched.
|
|
100
100
|
*/
|
|
101
101
|
export declare function buildInlineRenderShellHtml(runtimeSource: string): string;
|
|
102
|
+
/**
|
|
103
|
+
* Swap the served shell's working-state mark for a court's own block
|
|
104
|
+
* (#667's per-deployment knob; guuey#559's blob is the first
|
|
105
|
+
* consumer). String surgery on the EXACT default block — the constant
|
|
106
|
+
* is interpolated verbatim into every default shell, so the swap
|
|
107
|
+
* touches nothing else (the inline-script CSP hash survives: the mark
|
|
108
|
+
* is markup, not script). `null` strips the mark entirely. A shell
|
|
109
|
+
* that never carried the default block (an operator's custom
|
|
110
|
+
* `shellHtml`) passes through untouched — that operator owns their
|
|
111
|
+
* whole document.
|
|
112
|
+
*/
|
|
113
|
+
export declare function withLoadingIndicator(shellHtml: string, indicator: string | null): string;
|
|
114
|
+
/** Caller context handed to a per-app loading-indicator provider. */
|
|
115
|
+
export interface LoadingIndicatorContext {
|
|
116
|
+
/** The reading connection's app identity, when the deployment knows it. */
|
|
117
|
+
readonly appId?: string;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* The #667 working-state knob, both arms:
|
|
121
|
+
* - `string` / `null` — one mark (or none) for the whole deployment.
|
|
122
|
+
* - provider — deployments that vary the pre-render mark per app
|
|
123
|
+
* resolve it at shell-serve time; return a markup block to swap it
|
|
124
|
+
* in, `null` to strip the mark, `undefined` for the default
|
|
125
|
+
* treatment. The provider MUST be total in spirit — a throw is
|
|
126
|
+
* caught and serves the default (a broken chrome hook must never
|
|
127
|
+
* break shell serving).
|
|
128
|
+
*/
|
|
129
|
+
export type LoadingIndicatorOption = string | null | ((ctx: LoadingIndicatorContext) => string | null | undefined);
|
|
130
|
+
/**
|
|
131
|
+
* Resolve the shell body for one read: apply the loading-indicator
|
|
132
|
+
* option (static or provider) to the base shell. The base shell keeps
|
|
133
|
+
* the deployment's identity — the versioned resource URI hashes the
|
|
134
|
+
* BASE bytes; the mark swap is per-read cosmetic chrome the runtime
|
|
135
|
+
* retires at first paint, deliberately outside the hash.
|
|
136
|
+
*/
|
|
137
|
+
export declare function resolveLoadingIndicatorBody(baseShellHtml: string, option: LoadingIndicatorOption | undefined, appId: string | undefined): string;
|
|
102
138
|
export declare function registerGguiRenderResource(server: McpServer, shellHtml?: string, publicBaseUrl?: string,
|
|
103
139
|
/**
|
|
104
140
|
* Absolute runtime-bundle URL used as the CSP-declaration fallback
|
|
@@ -127,7 +163,18 @@ runtimeUrl?: string,
|
|
|
127
163
|
* iframe — observed live on claude.ai (#471 round 11: frame booted
|
|
128
164
|
* with `connect-src assets.mcp.ggui.ai` only).
|
|
129
165
|
*/
|
|
130
|
-
extraConnectUrls?: readonly (string | undefined)[]
|
|
166
|
+
extraConnectUrls?: readonly (string | undefined)[],
|
|
167
|
+
/**
|
|
168
|
+
* #667 working-state knob (static or per-app provider) + the app
|
|
169
|
+
* identity accessor the provider resolves against. The BASE shell
|
|
170
|
+
* (before any mark swap) is what the content-addressed URI hashes —
|
|
171
|
+
* the mark is per-read cosmetic chrome the runtime retires at first
|
|
172
|
+
* paint, deliberately outside the cache identity.
|
|
173
|
+
*/
|
|
174
|
+
loading?: {
|
|
175
|
+
readonly indicator?: LoadingIndicatorOption;
|
|
176
|
+
readonly getAppId?: () => string | undefined;
|
|
177
|
+
}): string;
|
|
131
178
|
/**
|
|
132
179
|
* Advertise the `io.modelcontextprotocol/ui` extension capability on
|
|
133
180
|
* an `McpServer`'s underlying `Server`. Idempotent - calling twice on
|
|
@@ -719,6 +766,12 @@ export declare function registerGguiRenderResourceTemplate(server: McpServer, op
|
|
|
719
766
|
*/
|
|
720
767
|
export declare function installMcpAppsOutbound(server: McpServer, opts?: {
|
|
721
768
|
readonly shellHtml?: string;
|
|
769
|
+
/**
|
|
770
|
+
* #667 working-state knob — static mark, `null`, or a per-app
|
|
771
|
+
* provider resolved at shell-serve time against the reading
|
|
772
|
+
* connection's app identity. See {@link LoadingIndicatorOption}.
|
|
773
|
+
*/
|
|
774
|
+
readonly loadingIndicator?: LoadingIndicatorOption;
|
|
722
775
|
/**
|
|
723
776
|
* Per-render self-contained shell registration. When supplied,
|
|
724
777
|
* `ui://ggui/render/{sessionId}` becomes a readable resource
|
|
@@ -744,6 +797,12 @@ export declare function installMcpAppsOutbound(server: McpServer, opts?: {
|
|
|
744
797
|
* `connect-src` covers the SSE/polling session API and the WS.
|
|
745
798
|
*/
|
|
746
799
|
readonly extraConnectUrls?: readonly (string | undefined)[];
|
|
800
|
+
/**
|
|
801
|
+
* Late-binding caller-context accessor (same seam the render read
|
|
802
|
+
* path uses) — a per-app `loadingIndicator` provider resolves
|
|
803
|
+
* against the reading connection's `appId` from here.
|
|
804
|
+
*/
|
|
805
|
+
readonly getContext?: () => HandlerContext | undefined;
|
|
747
806
|
}): {
|
|
748
807
|
readonly shellResourceUri: string;
|
|
749
808
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-apps-outbound.d.ts","sourceRoot":"","sources":["../src/mcp-apps-outbound.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAEhB,WAAW,EACZ,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAML,KAAK,YAAY,EAOjB,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACpB,MAAM,sCAAsC,CAAC;A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;;;;;;;;;;GAyFG;AACH,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,iCAAiC,GACtC,IAAI,CA6hCN;AAiGD;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,SAAS,EACjB,IAAI,GAAE;IACJ,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;IACjD;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,iCAAiC,CAAC;IAC3D;;;;;;;;OAQG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC;;;;;;OAMG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC;IAC5D;;;;OAIG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,cAAc,GAAG,SAAS,CAAC;CACnD,GACL;IAAE,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;CAAE,CAyBvC"}
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
*/
|
|
34
34
|
import { deriveBundleOrigins, deriveContractBundle, derivePublicEnvProjection, deriveRenderMeta, withResolvedThemeBase, filterDescriptorsToContract, findBlueprintExact, resolveSliceTheme, spreadRenderMetaViewOntoSlice, wsOriginToHttpOrigin, } from "@ggui-ai/mcp-server-handlers/renders";
|
|
35
35
|
import { GGUI_WAVE_VERSION, RESOURCE_NOT_FOUND_MESSAGE, deriveContextDefault, isRecord, resolveAppGadgets, resourceReadErrorToJsonRpc, } from "@ggui-ai/protocol";
|
|
36
|
-
import { GGUI_RENDER_RESOURCE_MIME, GGUI_RENDER_RESOURCE_URI, GGUI_RENDER_SHELL_SURFACE, MCP_APPS_UI_CAPABILITY, MCP_APP_BOOTSTRAP_FAILED_TYPE, asGguiRenderBootstrap, composeSessionApiUrls, deriveContextName, escapeInlineScript, gguiShellHtml, parseEpochUri, toMcpAppEnvelope, } from "@ggui-ai/protocol/integrations/mcp-apps";
|
|
36
|
+
import { GGUI_RENDER_RESOURCE_MIME, GGUI_RENDER_RESOURCE_URI, GGUI_RENDER_SHELL_SCHEME_STYLE, GGUI_RENDER_SHELL_SURFACE, GGUI_SHELL_LOADING_INDICATOR_HTML, MCP_APPS_UI_CAPABILITY, MCP_APP_BOOTSTRAP_FAILED_TYPE, asGguiRenderBootstrap, composeSessionApiUrls, deriveContextName, escapeInlineScript, gguiShellHtml, parseEpochUri, toMcpAppEnvelope, } from "@ggui-ai/protocol/integrations/mcp-apps";
|
|
37
37
|
import { ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
38
38
|
import { registerAppResource } from "@modelcontextprotocol/ext-apps/server";
|
|
39
39
|
import { createHash } from "node:crypto";
|
|
@@ -152,10 +152,11 @@ rootEl.style.cssText='display:flex;flex-direction:column;height:100%;min-height:
|
|
|
152
152
|
var mounted=false;
|
|
153
153
|
var lastEnvelope=null;
|
|
154
154
|
// Text color pairs with the shell surface: themed var when the runtime
|
|
155
|
-
// injected theme CSS, else the
|
|
156
|
-
//
|
|
157
|
-
//
|
|
158
|
-
|
|
155
|
+
// injected theme CSS, else the scheme-scoped pre-theme ink the shell's
|
|
156
|
+
// own scheme <style> defines (#662) — legible on whichever neutral
|
|
157
|
+
// ground prefers-color-scheme picked. (#481 killed the illegible
|
|
158
|
+
// hardcoded #666; #662 killed the dark-only fallback.)
|
|
159
|
+
var SHELL_FG='var(--ggui-color-onSurface,var(--ggui-shell-scheme-on-surface,#374151))';
|
|
159
160
|
function setOverlay(text){
|
|
160
161
|
if(mounted)return;
|
|
161
162
|
rootEl.innerHTML='<div style="font:13px system-ui,sans-serif;padding:24px;color:'+SHELL_FG+';opacity:.55">'+text+'</div>';
|
|
@@ -379,7 +380,7 @@ startInit();
|
|
|
379
380
|
// `<head>` by the iframe-runtime at boot (react-renderer.ts ->
|
|
380
381
|
// `<style id="ggui-theme-vars">`), so the `var()` resolves to the
|
|
381
382
|
// active theme's exact per-mode surface color at runtime. The static
|
|
382
|
-
//
|
|
383
|
+
// scheme-scoped fallback (#662: neutral per prefers-color-scheme) covers the pre-resolve
|
|
383
384
|
// first paint + browsers that drop unresolved custom properties.
|
|
384
385
|
//
|
|
385
386
|
// # Why paint the document background here (Safari white-canvas fix)
|
|
@@ -424,8 +425,8 @@ startInit();
|
|
|
424
425
|
// The self-contained shell (`buildSelfContainedShell`) has no overlay
|
|
425
426
|
// script and therefore no anchor div at all.
|
|
426
427
|
export const GGUI_RENDER_SHELL_HTML = `<!doctype html>
|
|
427
|
-
<html lang="en" style="height:100%;background-color:${GGUI_RENDER_SHELL_SURFACE}"><head><meta charset="utf-8"><title>ggui render</title></head>
|
|
428
|
-
<body style="margin:0;height:100%;min-height:480px;background-color:${GGUI_RENDER_SHELL_SURFACE}"
|
|
428
|
+
<html lang="en" style="height:100%;background-color:${GGUI_RENDER_SHELL_SURFACE}"><head><meta charset="utf-8"><meta name="color-scheme" content="light dark">${GGUI_RENDER_SHELL_SCHEME_STYLE}<title>ggui render</title></head>
|
|
429
|
+
<body style="margin:0;height:100%;min-height:480px;background-color:${GGUI_RENDER_SHELL_SURFACE}">${GGUI_SHELL_LOADING_INDICATOR_HTML}<div id="ggui-root" data-ggui-shell="thin" style="height:100%;min-height:480px"></div>
|
|
429
430
|
<script>${GGUI_RENDER_SHELL_SCRIPT_BODY}</script></body></html>`;
|
|
430
431
|
/**
|
|
431
432
|
* CSP `script-src` source expression that authorises the inline
|
|
@@ -535,8 +536,8 @@ export function buildInlineRenderShellHtml(runtimeSource) {
|
|
|
535
536
|
// no-container posture as `gguiShellHtml`; the shell marker rides
|
|
536
537
|
// on `<body>`.
|
|
537
538
|
return `<!doctype html>
|
|
538
|
-
<html lang="en" style="background-color:${GGUI_RENDER_SHELL_SURFACE}"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="color-scheme" content="light dark"
|
|
539
|
-
<body style="margin:0;background-color:${GGUI_RENDER_SHELL_SURFACE}" data-ggui-shell="inline"
|
|
539
|
+
<html lang="en" style="background-color:${GGUI_RENDER_SHELL_SURFACE}"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="color-scheme" content="light dark">${GGUI_RENDER_SHELL_SCHEME_STYLE}<title>ggui render</title></head>
|
|
540
|
+
<body style="margin:0;background-color:${GGUI_RENDER_SHELL_SURFACE}" data-ggui-shell="inline">${GGUI_SHELL_LOADING_INDICATOR_HTML}
|
|
540
541
|
<script>${GGUI_INLINE_SHELL_BUFFER_SCRIPT_BODY}</script>
|
|
541
542
|
<script type="module" data-ggui-runtime="inline">${escapeInlineScript(runtimeSource)}</script></body></html>`;
|
|
542
543
|
}
|
|
@@ -636,6 +637,44 @@ extraConnectUrls) {
|
|
|
636
637
|
return undefined;
|
|
637
638
|
}
|
|
638
639
|
}
|
|
640
|
+
/**
|
|
641
|
+
* Swap the served shell's working-state mark for a court's own block
|
|
642
|
+
* (#667's per-deployment knob; guuey#559's blob is the first
|
|
643
|
+
* consumer). String surgery on the EXACT default block — the constant
|
|
644
|
+
* is interpolated verbatim into every default shell, so the swap
|
|
645
|
+
* touches nothing else (the inline-script CSP hash survives: the mark
|
|
646
|
+
* is markup, not script). `null` strips the mark entirely. A shell
|
|
647
|
+
* that never carried the default block (an operator's custom
|
|
648
|
+
* `shellHtml`) passes through untouched — that operator owns their
|
|
649
|
+
* whole document.
|
|
650
|
+
*/
|
|
651
|
+
export function withLoadingIndicator(shellHtml, indicator) {
|
|
652
|
+
return shellHtml.replace(GGUI_SHELL_LOADING_INDICATOR_HTML, indicator ?? "");
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
* Resolve the shell body for one read: apply the loading-indicator
|
|
656
|
+
* option (static or provider) to the base shell. The base shell keeps
|
|
657
|
+
* the deployment's identity — the versioned resource URI hashes the
|
|
658
|
+
* BASE bytes; the mark swap is per-read cosmetic chrome the runtime
|
|
659
|
+
* retires at first paint, deliberately outside the hash.
|
|
660
|
+
*/
|
|
661
|
+
export function resolveLoadingIndicatorBody(baseShellHtml, option, appId) {
|
|
662
|
+
if (option === undefined)
|
|
663
|
+
return baseShellHtml;
|
|
664
|
+
if (typeof option !== "function") {
|
|
665
|
+
return withLoadingIndicator(baseShellHtml, option);
|
|
666
|
+
}
|
|
667
|
+
let resolved;
|
|
668
|
+
try {
|
|
669
|
+
resolved = option({ ...(appId !== undefined ? { appId } : {}) });
|
|
670
|
+
}
|
|
671
|
+
catch {
|
|
672
|
+
return baseShellHtml;
|
|
673
|
+
}
|
|
674
|
+
if (resolved === undefined)
|
|
675
|
+
return baseShellHtml;
|
|
676
|
+
return withLoadingIndicator(baseShellHtml, resolved);
|
|
677
|
+
}
|
|
639
678
|
export function registerGguiRenderResource(server, shellHtml = GGUI_RENDER_SHELL_HTML, publicBaseUrl,
|
|
640
679
|
/**
|
|
641
680
|
* Absolute runtime-bundle URL used as the CSP-declaration fallback
|
|
@@ -664,7 +703,15 @@ runtimeUrl,
|
|
|
664
703
|
* iframe — observed live on claude.ai (#471 round 11: frame booted
|
|
665
704
|
* with `connect-src assets.mcp.ggui.ai` only).
|
|
666
705
|
*/
|
|
667
|
-
extraConnectUrls
|
|
706
|
+
extraConnectUrls,
|
|
707
|
+
/**
|
|
708
|
+
* #667 working-state knob (static or per-app provider) + the app
|
|
709
|
+
* identity accessor the provider resolves against. The BASE shell
|
|
710
|
+
* (before any mark swap) is what the content-addressed URI hashes —
|
|
711
|
+
* the mark is per-read cosmetic chrome the runtime retires at first
|
|
712
|
+
* paint, deliberately outside the cache identity.
|
|
713
|
+
*/
|
|
714
|
+
loading) {
|
|
668
715
|
const cspMeta = buildCspMeta(publicBaseUrl, runtimeUrl, extraConnectUrls);
|
|
669
716
|
// Content-addressed shell URI (2026-08-12, the stale-shell bust).
|
|
670
717
|
// Hosts cache the prefetched shell keyed on the RESOURCE URI —
|
|
@@ -700,7 +747,10 @@ extraConnectUrls) {
|
|
|
700
747
|
{
|
|
701
748
|
uri: uri.href,
|
|
702
749
|
mimeType: GGUI_RENDER_RESOURCE_MIME,
|
|
703
|
-
|
|
750
|
+
// #667: the working-state mark resolves per read (a per-app
|
|
751
|
+
// provider sees the reading connection's app identity); the
|
|
752
|
+
// versioned URI above hashes the BASE bytes on purpose.
|
|
753
|
+
text: resolveLoadingIndicatorBody(shellHtml, loading?.indicator, loading?.getAppId?.()),
|
|
704
754
|
...(cspMeta !== undefined ? { _meta: cspMeta } : {}),
|
|
705
755
|
},
|
|
706
756
|
],
|
|
@@ -2200,7 +2250,15 @@ export function installMcpAppsOutbound(server, opts = {}) {
|
|
|
2200
2250
|
// static registration's CSP-declaration fallback — deployments that
|
|
2201
2251
|
// set no `publicBaseUrl` (it also feeds Origin/Host enforcement +
|
|
2202
2252
|
// OAuth) still declare their origin to spec-compliant hosts.
|
|
2203
|
-
const shellResourceUri = registerGguiRenderResource(server, opts.shellHtml, opts.publicBaseUrl, opts.selfContained?.runtimeUrl, opts.extraConnectUrls
|
|
2253
|
+
const shellResourceUri = registerGguiRenderResource(server, opts.shellHtml, opts.publicBaseUrl, opts.selfContained?.runtimeUrl, opts.extraConnectUrls,
|
|
2254
|
+
// #667: per-app providers resolve against the reading connection's
|
|
2255
|
+
// identity — the same context accessor the render read-gate uses.
|
|
2256
|
+
{
|
|
2257
|
+
...(opts.loadingIndicator !== undefined
|
|
2258
|
+
? { indicator: opts.loadingIndicator }
|
|
2259
|
+
: {}),
|
|
2260
|
+
getAppId: () => opts.getContext?.()?.appId,
|
|
2261
|
+
});
|
|
2204
2262
|
if (opts.selfContained) {
|
|
2205
2263
|
registerGguiRenderResourceTemplate(server, opts.selfContained);
|
|
2206
2264
|
}
|
package/dist/server.d.ts
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
* once at boot so operators see the shape they're running.
|
|
39
39
|
*/
|
|
40
40
|
import type { ThemeStore, AppMetadataStore, AuditSink, AuthAdapter, AuthResult, BlueprintIndex, BlueprintProvider, BlueprintSearch, BlueprintSelector, BlueprintStore, CodeStore, EmbeddingProvider, GeneratorRegistry, KeyValueStore, PairingService, PendingEventConsumer, ProviderKeyStore, RateLimiter, RenderIdentityStore, GguiSessionStore, GguiSessionStreamBuffer, ShortCodeIndex, TelemetrySink, ThreadStore, VectorStore } from "@ggui-ai/mcp-server-core";
|
|
41
|
-
import type { AppThemeBase, HandlerContext, SharedHandler } from "@ggui-ai/mcp-server-handlers";
|
|
41
|
+
import type { AppThemeBase, GguiRenderHandlerDeps, HandlerContext, SharedHandler } from "@ggui-ai/mcp-server-handlers";
|
|
42
42
|
import { type ThemeCatalogEntry } from "@ggui-ai/mcp-server-handlers/app-discovery";
|
|
43
43
|
import { type SearchBlueprintsRegistrySource } from "@ggui-ai/mcp-server-handlers/blueprints";
|
|
44
44
|
import { type OpsBlueprintAppAuthorizer } from "@ggui-ai/mcp-server-handlers/ops-blueprint";
|
|
@@ -52,6 +52,7 @@ import { type Express, type Request } from "express";
|
|
|
52
52
|
import { Server as NodeHttpServer } from "node:http";
|
|
53
53
|
import type { ZodRawShape } from "zod";
|
|
54
54
|
import { type ThemeFileUploader, type ThemeWriter } from "./console-theme-routes.js";
|
|
55
|
+
import { type LoadingIndicatorOption } from "./mcp-apps-outbound.js";
|
|
55
56
|
import { type AppsSource, type UserDefaultAppSource } from "@ggui-ai/mcp-server-handlers/ops-apps";
|
|
56
57
|
import { type ThemeCoverageValidator } from "@ggui-ai/mcp-server-handlers/ops-themes";
|
|
57
58
|
import { type ConnectorKeysSource } from "@ggui-ai/mcp-server-handlers/ops-connector-keys";
|
|
@@ -317,6 +318,23 @@ export declare function defaultHandlers(deps: {
|
|
|
317
318
|
* handler's own `DEFAULT_RENDER_TTL_MS` (1h) fallback.
|
|
318
319
|
*/
|
|
319
320
|
readonly renderTtlMs?: number;
|
|
321
|
+
/**
|
|
322
|
+
* Pre-generation gate — forwarded as-is to `createGguiRenderHandler`'s
|
|
323
|
+
* `preValidationGate`: a deployment's own per-render policy, answered
|
|
324
|
+
* with a registered refusal code before the handler's own parse and
|
|
325
|
+
* before any store read (a refusal reads nothing and commits nothing;
|
|
326
|
+
* the transport's `inputSchema` validation has already run). Absent =
|
|
327
|
+
* no gate, every render proceeds. Bindable here so a deployment need
|
|
328
|
+
* not supply a custom `handlers` list to bind it.
|
|
329
|
+
*/
|
|
330
|
+
readonly preValidationGate?: GguiRenderHandlerDeps['preValidationGate'];
|
|
331
|
+
/**
|
|
332
|
+
* The gate's other end — forwarded as-is to `createGguiRenderHandler`'s
|
|
333
|
+
* `postFailureHook`: fires once on every failure of a render whose
|
|
334
|
+
* gate passed, so whatever the gate reserved can be released. Absent =
|
|
335
|
+
* no hook.
|
|
336
|
+
*/
|
|
337
|
+
readonly postFailureHook?: GguiRenderHandlerDeps['postFailureHook'];
|
|
320
338
|
/**
|
|
321
339
|
* Optional bootstrap-credential minter. When present, `ggui_render`
|
|
322
340
|
* (the renamed render-commit tool) results carry the
|
|
@@ -1040,7 +1058,7 @@ export interface CreateGguiServerOptions {
|
|
|
1040
1058
|
/**
|
|
1041
1059
|
* Runtime theme-registration resolver (ggui#598-C): `(appId,
|
|
1042
1060
|
* themeName)` → the registered ladder's delivery payload
|
|
1043
|
-
* (`{documentHash, light, dark}`) or `null` for names with no
|
|
1061
|
+
* (`{documentHash, light, dark, keyframes?, frameless?}`) or `null` for names with no
|
|
1044
1062
|
* registration. Threaded to every emitting door (render/update
|
|
1045
1063
|
* result-meta, the read-served shell, `/state`) so delivery cannot
|
|
1046
1064
|
* drift across transports. Bind it to a ThemeStore +
|
|
@@ -1253,6 +1271,28 @@ export interface CreateGguiServerOptions {
|
|
|
1253
1271
|
* falls back to independently.
|
|
1254
1272
|
*/
|
|
1255
1273
|
readonly renderTtlMs?: number;
|
|
1274
|
+
/**
|
|
1275
|
+
* Pre-generation gate for `ggui_render` — forwarded as-is to the
|
|
1276
|
+
* render handler's `preValidationGate`: this deployment's own
|
|
1277
|
+
* per-render policy, answered with a registered refusal code. It fires
|
|
1278
|
+
* before the render handler's own parse and before any store read —
|
|
1279
|
+
* the SDK's `inputSchema` validation has already run at this site, so
|
|
1280
|
+
* the gate sees a schema-valid call with declared fields only — and a
|
|
1281
|
+
* refusal reads nothing, commits nothing and consumes no handshake.
|
|
1282
|
+
* Absent = no gate, every render proceeds.
|
|
1283
|
+
*
|
|
1284
|
+
* Bindable here, beside `renderStore`, so a deployment does not have
|
|
1285
|
+
* to supply a full custom `handlers` list to gate renders.
|
|
1286
|
+
*/
|
|
1287
|
+
readonly renderPreValidationGate?: GguiRenderHandlerDeps['preValidationGate'];
|
|
1288
|
+
/**
|
|
1289
|
+
* The gate's other end — forwarded as-is to the render handler's
|
|
1290
|
+
* `postFailureHook`: fires exactly once on every failure of a render
|
|
1291
|
+
* whose gate passed (thrown, or the `outcome:'failed'` envelope), so
|
|
1292
|
+
* whatever the gate reserved can be released. Never on a refusal,
|
|
1293
|
+
* never after a delivered render. Absent = no hook.
|
|
1294
|
+
*/
|
|
1295
|
+
readonly renderPostFailureHook?: GguiRenderHandlerDeps['postFailureHook'];
|
|
1256
1296
|
/**
|
|
1257
1297
|
* #457 — total-lifetime bound on render-row RESURRECTION: the
|
|
1258
1298
|
* expired-read extension and the re-mint commit never advance
|
|
@@ -1489,6 +1529,20 @@ export interface CreateGguiServerOptions {
|
|
|
1489
1529
|
*/
|
|
1490
1530
|
readonly mcpApps?: boolean | {
|
|
1491
1531
|
readonly shellHtml?: string;
|
|
1532
|
+
/**
|
|
1533
|
+
* Per-deployment working-state mark for the pre-render window
|
|
1534
|
+
* (#667; the court knob — guuey#559's brand blob is the first
|
|
1535
|
+
* consumer). Markup embedded verbatim into every served shell
|
|
1536
|
+
* in place of the default ggui glyph treatment; `null` strips
|
|
1537
|
+
* the mark. Keep `data-ggui-shell-loading` on the block's
|
|
1538
|
+
* root so the runtime retires it at first paint / terminal
|
|
1539
|
+
* failure. Operator-trusted serve-time input — never populate
|
|
1540
|
+
* from wire data. Applies to the thin shell, the
|
|
1541
|
+
* inline-runtime shell, AND the console-session `/shell`
|
|
1542
|
+
* route; an explicit `shellHtml` is the operator's whole
|
|
1543
|
+
* document and is served untouched.
|
|
1544
|
+
*/
|
|
1545
|
+
readonly loadingIndicator?: LoadingIndicatorOption;
|
|
1492
1546
|
/**
|
|
1493
1547
|
* External WebSocket URL the iframe should open, visible to
|
|
1494
1548
|
* MCP Apps hosts. Defaults to `"ws://localhost:<port>/ws"`
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AASH,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,EACvB,cAAc,EACd,aAAa,EACb,WAAW,EACX,WAAW,EACZ,MAAM,0BAA0B,CAAC;AA8BlC,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAChG,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAUL,KAAK,8BAA8B,EACpC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAML,KAAK,yBAAyB,EAC/B,MAAM,4CAA4C,CAAC;AAKpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AACpF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Ac,GAAG,IAAI,CAAC;IAC/C;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,iBAAiB,EAAE,SAAS,0BAA0B,EAAE,CAAC;IAClE;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC9C;;;;OAIG;IACH,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC;;;;;OAKG;IACH,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAC9C;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;CAC3C;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,GAAE,uBAA4B,GAAG,UAAU,CA8iF/E"}
|
package/dist/server.js
CHANGED
|
@@ -60,7 +60,7 @@ import { BoundedLlmTraceSink, mountConsoleLlmTraceRoutes } from "./console-llm-t
|
|
|
60
60
|
import { BoundedPayloadTraceSink, mountConsolePayloadsRoutes } from "./console-payloads.js";
|
|
61
61
|
import { mountDevtoolThemeRoutes, } from "./console-theme-routes.js";
|
|
62
62
|
import { mountConsoleTimelineRoutes } from "./console-timeline.js";
|
|
63
|
-
import { buildInlineRenderShellHtml } from "./mcp-apps-outbound.js";
|
|
63
|
+
import { buildInlineRenderShellHtml, } from "./mcp-apps-outbound.js";
|
|
64
64
|
import { BoundedValidatorTraceSink, mountConsoleValidatorRoutes } from "./console-validator.js";
|
|
65
65
|
// Operator-class MCP handlers — twelve `ggui_ops_*` handlers across
|
|
66
66
|
// four domains (apps / orgs / connector-keys / coupon). Every factory
|
|
@@ -624,6 +624,12 @@ export function defaultHandlers(deps) {
|
|
|
624
624
|
...(deps.render.renderTtlMs !== undefined
|
|
625
625
|
? { renderTtlMs: deps.render.renderTtlMs }
|
|
626
626
|
: {}),
|
|
627
|
+
...(deps.render.preValidationGate
|
|
628
|
+
? { preValidationGate: deps.render.preValidationGate }
|
|
629
|
+
: {}),
|
|
630
|
+
...(deps.render.postFailureHook
|
|
631
|
+
? { postFailureHook: deps.render.postFailureHook }
|
|
632
|
+
: {}),
|
|
627
633
|
// Plugin slice Commit 3 — render reads App.gadgets to
|
|
628
634
|
// gate `clientCapabilities.gadgets[*].hook` references via
|
|
629
635
|
// `assertGadgetsRegistered`. Same instance the
|
|
@@ -1433,6 +1439,12 @@ export function createGguiServer(opts = {}) {
|
|
|
1433
1439
|
render: {
|
|
1434
1440
|
renderStore,
|
|
1435
1441
|
...(opts.renderTtlMs !== undefined ? { renderTtlMs: opts.renderTtlMs } : {}),
|
|
1442
|
+
...(opts.renderPreValidationGate
|
|
1443
|
+
? { preValidationGate: opts.renderPreValidationGate }
|
|
1444
|
+
: {}),
|
|
1445
|
+
...(opts.renderPostFailureHook
|
|
1446
|
+
? { postFailureHook: opts.renderPostFailureHook }
|
|
1447
|
+
: {}),
|
|
1436
1448
|
...(mintBootstrap ? { mintBootstrap } : {}),
|
|
1437
1449
|
// G14 (2026-05-23) refresh seam. Same `channelBootstrap`
|
|
1438
1450
|
// the WS upgrade path uses — sharing it means one HMAC
|
|
@@ -2032,6 +2044,12 @@ export function createGguiServer(opts = {}) {
|
|
|
2032
2044
|
: inlineShellHtml !== undefined
|
|
2033
2045
|
? { shellHtml: inlineShellHtml }
|
|
2034
2046
|
: {}),
|
|
2047
|
+
// #667 working-state knob — static or per-app provider; resolved
|
|
2048
|
+
// at shell-serve time inside the outbound registration (the base
|
|
2049
|
+
// shell keeps the content-address identity).
|
|
2050
|
+
...(mcpAppsConfig.loadingIndicator !== undefined
|
|
2051
|
+
? { loadingIndicator: mcpAppsConfig.loadingIndicator }
|
|
2052
|
+
: {}),
|
|
2035
2053
|
// Forward the operator-supplied public origin so the static
|
|
2036
2054
|
// `ui://ggui/render` resource declares `_meta.ui.csp` for
|
|
2037
2055
|
// spec-compliant hosts (Claude Desktop / claude.ai Connector /
|
|
@@ -2851,6 +2869,11 @@ export function createGguiServer(opts = {}) {
|
|
|
2851
2869
|
runtimeBootstrapUrl,
|
|
2852
2870
|
...(opts.codeStore ? { codeStore: opts.codeStore } : {}),
|
|
2853
2871
|
...(opts.publicBaseUrl !== undefined ? { publicBaseUrl: opts.publicBaseUrl } : {}),
|
|
2872
|
+
// #667 knob: the console /shell route resolves the same
|
|
2873
|
+
// working-state option per request (its gate knows the appId).
|
|
2874
|
+
...(mcpAppsConfig.loadingIndicator !== undefined
|
|
2875
|
+
? { loadingIndicator: mcpAppsConfig.loadingIndicator }
|
|
2876
|
+
: {}),
|
|
2854
2877
|
logger,
|
|
2855
2878
|
});
|
|
2856
2879
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ggui-ai/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Self-hosted MCP server for the ggui protocol. An HTTP/MCP binding layer over @ggui-ai/mcp-server-handlers and the reference adapters from @ggui-ai/mcp-server-core — run it via `ggui serve`.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ggui",
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
"resend": "^6.12.2",
|
|
33
33
|
"ws": "^8.20.1",
|
|
34
34
|
"zod": "^4.3.6",
|
|
35
|
-
"@ggui-ai/
|
|
36
|
-
"@ggui-ai/
|
|
37
|
-
"@ggui-ai/
|
|
38
|
-
"@ggui-ai/
|
|
39
|
-
"@ggui-ai/mcp-server-
|
|
40
|
-
"@ggui-ai/negotiator": "0.
|
|
41
|
-
"@ggui-ai/
|
|
42
|
-
"@ggui-ai/
|
|
43
|
-
"@ggui-ai/
|
|
44
|
-
"@ggui-ai/ui-
|
|
45
|
-
"@ggui-ai/
|
|
35
|
+
"@ggui-ai/console": "0.14.0",
|
|
36
|
+
"@ggui-ai/design": "0.14.0",
|
|
37
|
+
"@ggui-ai/iframe-runtime": "0.14.0",
|
|
38
|
+
"@ggui-ai/mcp-server-handlers": "0.14.0",
|
|
39
|
+
"@ggui-ai/mcp-server-core": "0.14.0",
|
|
40
|
+
"@ggui-ai/negotiator": "0.14.0",
|
|
41
|
+
"@ggui-ai/preview-a2ui": "0.14.0",
|
|
42
|
+
"@ggui-ai/project-config": "0.14.0",
|
|
43
|
+
"@ggui-ai/protocol": "0.14.0",
|
|
44
|
+
"@ggui-ai/ui-registry": "0.14.0",
|
|
45
|
+
"@ggui-ai/ui-gen": "0.14.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/express": "^5.0.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@types/ws": "^8.5.10",
|
|
52
52
|
"typescript": "^5.0.0",
|
|
53
53
|
"vitest": "^3.2.6",
|
|
54
|
-
"@ggui-ai/protocol-conformance": "0.
|
|
54
|
+
"@ggui-ai/protocol-conformance": "0.14.0"
|
|
55
55
|
},
|
|
56
56
|
"repository": {
|
|
57
57
|
"type": "git",
|
|
@@ -66,11 +66,11 @@
|
|
|
66
66
|
"access": "public"
|
|
67
67
|
},
|
|
68
68
|
"engines": {
|
|
69
|
-
"node": ">=
|
|
69
|
+
"node": ">=22.0.0"
|
|
70
70
|
},
|
|
71
71
|
"author": "ggui contributors <hello@ggui.ai>",
|
|
72
72
|
"scripts": {
|
|
73
|
-
"build": "rm -rf dist && tsc -p tsconfig.build.json && node ../scripts/fix-esm-imports.mjs dist",
|
|
73
|
+
"build": "rm -rf dist.staging-$$ && tsc -p tsconfig.build.json --outDir dist.staging-$$ && node ../scripts/fix-esm-imports.mjs dist.staging-$$ && node ../scripts/atomic-swap.mjs dist.staging-$$ dist",
|
|
74
74
|
"dev": "tsc --watch",
|
|
75
75
|
"typecheck": "tsc --noEmit",
|
|
76
76
|
"test": "vitest run",
|