@ggui-ai/mcp-server-handlers 0.8.0 → 0.9.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/renders/amend.d.ts +57 -0
- package/dist/renders/amend.d.ts.map +1 -0
- package/dist/renders/amend.js +64 -0
- package/dist/renders/apply-ggui-session-patch.d.ts +4 -0
- package/dist/renders/apply-ggui-session-patch.d.ts.map +1 -1
- package/dist/renders/apply-ggui-session-patch.js +1 -1
- package/dist/renders/assert-props-contract.d.ts +5 -4
- package/dist/renders/assert-props-contract.d.ts.map +1 -1
- package/dist/renders/assert-props-contract.js +6 -5
- package/dist/renders/consume.js +1 -1
- package/dist/renders/decide-handshake.d.ts +15 -0
- package/dist/renders/decide-handshake.d.ts.map +1 -1
- package/dist/renders/decide-handshake.js +18 -0
- package/dist/renders/declare-tool-catalog.js +1 -1
- package/dist/renders/handshake.d.ts.map +1 -1
- package/dist/renders/handshake.js +58 -12
- package/dist/renders/index.d.ts +5 -1
- package/dist/renders/index.d.ts.map +1 -1
- package/dist/renders/index.js +5 -1
- package/dist/renders/props-mutation-core.d.ts +60 -0
- package/dist/renders/props-mutation-core.d.ts.map +1 -0
- package/dist/renders/props-mutation-core.js +339 -0
- package/dist/renders/render.d.ts +2 -0
- package/dist/renders/render.d.ts.map +1 -1
- package/dist/renders/render.js +35 -30
- package/dist/renders/runtime-pull.d.ts +122 -0
- package/dist/renders/runtime-pull.d.ts.map +1 -0
- package/dist/renders/runtime-pull.js +178 -0
- package/dist/renders/runtime-telemetry.d.ts +60 -0
- package/dist/renders/runtime-telemetry.d.ts.map +1 -0
- package/dist/renders/runtime-telemetry.js +76 -0
- package/dist/renders/slice-meta-derivation.d.ts +57 -0
- package/dist/renders/slice-meta-derivation.d.ts.map +1 -1
- package/dist/renders/slice-meta-derivation.js +72 -1
- package/dist/renders/submit-action.d.ts +9 -0
- package/dist/renders/submit-action.d.ts.map +1 -1
- package/dist/renders/submit-action.js +70 -1
- package/dist/renders/update.d.ts +33 -42
- package/dist/renders/update.d.ts.map +1 -1
- package/dist/renders/update.js +98 -233
- package/package.json +7 -7
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ggui_amend` — in-place props mutation on the ALREADY-MOUNTED card
|
|
3
|
+
* (#483 tool split). Same wire grammar as `ggui_update`
|
|
4
|
+
* (replace/merge via the shared {@link runPropsMutation} core), the
|
|
5
|
+
* opposite mount identity:
|
|
6
|
+
*
|
|
7
|
+
* - NO history record: the head epoch is untouched by construction
|
|
8
|
+
* (the core advances it only for `ggui_update`).
|
|
9
|
+
* - NO `_meta.ui` on the tool DECLARATION and NO `resultMeta` — this
|
|
10
|
+
* is a plain data tool. Hosts never reserve a per-result view for
|
|
11
|
+
* it (hosts mint views from `_meta` on UI-bound success results —
|
|
12
|
+
* live-proven 2026-08-12), so nothing new appears in the
|
|
13
|
+
* conversation. The mounted card receives the new props over the
|
|
14
|
+
* live-channel ladder (WS / SSE / polling / bridge-pull); the
|
|
15
|
+
* spec tool-result forwarding path is deliberately not part of
|
|
16
|
+
* this tool's contract.
|
|
17
|
+
*
|
|
18
|
+
* Git reading: `ggui_update` = commit (new history entry);
|
|
19
|
+
* `ggui_amend` = commit --amend (fix up the current one).
|
|
20
|
+
*/
|
|
21
|
+
import { z } from 'zod';
|
|
22
|
+
import type { SharedHandler } from '../types.js';
|
|
23
|
+
import { mutationInputSchema } from './props-mutation-core.js';
|
|
24
|
+
import type { GguiUpdateHandlerDeps } from './update.js';
|
|
25
|
+
/**
|
|
26
|
+
* Same seam set as `ggui_update` on purpose — the two tools share ONE
|
|
27
|
+
* mutation core, so composers wire ONE deps object for both. The
|
|
28
|
+
* slice-meta options (`mintWsToken` / `runtimeUrl` / theme plumbing)
|
|
29
|
+
* are simply never read on the amend path (no result meta exists to
|
|
30
|
+
* emit them into).
|
|
31
|
+
*/
|
|
32
|
+
export type GguiAmendHandlerDeps = GguiUpdateHandlerDeps;
|
|
33
|
+
declare const outputSchema: {
|
|
34
|
+
readonly sessionId: z.ZodString;
|
|
35
|
+
readonly updated: z.ZodBoolean;
|
|
36
|
+
/**
|
|
37
|
+
* The BARE live-head URI — amend targets the mounted card and never
|
|
38
|
+
* mints a record, so there is no pinned URI to return and no epoch
|
|
39
|
+
* field (the history number is untouched by construction).
|
|
40
|
+
*/
|
|
41
|
+
readonly resourceUri: z.ZodString;
|
|
42
|
+
/** No-op feedback channel — same semantics as ggui_update's. */
|
|
43
|
+
readonly warning: z.ZodOptional<z.ZodString>;
|
|
44
|
+
};
|
|
45
|
+
interface AmendOutput {
|
|
46
|
+
sessionId: string;
|
|
47
|
+
updated: boolean;
|
|
48
|
+
resourceUri: string;
|
|
49
|
+
warning?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Build the OSS `ggui_amend` handler. Additive, like `update:` — server
|
|
53
|
+
* composers opt in via the dedicated `amend:` slot.
|
|
54
|
+
*/
|
|
55
|
+
export declare function createGguiAmendHandler(deps: GguiAmendHandlerDeps): SharedHandler<typeof mutationInputSchema, typeof outputSchema, AmendOutput>;
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=amend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amend.d.ts","sourceRoot":"","sources":["../../src/renders/amend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzD;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,qBAAqB,CAAC;AAEzD,QAAA,MAAM,YAAY;;;IAGhB;;;;OAIG;;IAEH,gEAAgE;;CAExD,CAAC;AAEX,UAAU,WAAW;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,oBAAoB,GACzB,aAAa,CAAC,OAAO,mBAAmB,EAAE,OAAO,YAAY,EAAE,WAAW,CAAC,CA0B7E"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ggui_amend` — in-place props mutation on the ALREADY-MOUNTED card
|
|
3
|
+
* (#483 tool split). Same wire grammar as `ggui_update`
|
|
4
|
+
* (replace/merge via the shared {@link runPropsMutation} core), the
|
|
5
|
+
* opposite mount identity:
|
|
6
|
+
*
|
|
7
|
+
* - NO history record: the head epoch is untouched by construction
|
|
8
|
+
* (the core advances it only for `ggui_update`).
|
|
9
|
+
* - NO `_meta.ui` on the tool DECLARATION and NO `resultMeta` — this
|
|
10
|
+
* is a plain data tool. Hosts never reserve a per-result view for
|
|
11
|
+
* it (hosts mint views from `_meta` on UI-bound success results —
|
|
12
|
+
* live-proven 2026-08-12), so nothing new appears in the
|
|
13
|
+
* conversation. The mounted card receives the new props over the
|
|
14
|
+
* live-channel ladder (WS / SSE / polling / bridge-pull); the
|
|
15
|
+
* spec tool-result forwarding path is deliberately not part of
|
|
16
|
+
* this tool's contract.
|
|
17
|
+
*
|
|
18
|
+
* Git reading: `ggui_update` = commit (new history entry);
|
|
19
|
+
* `ggui_amend` = commit --amend (fix up the current one).
|
|
20
|
+
*/
|
|
21
|
+
import { z } from 'zod';
|
|
22
|
+
import { mutationInputSchema, runPropsMutation, } from './props-mutation-core.js';
|
|
23
|
+
const outputSchema = {
|
|
24
|
+
sessionId: z.string(),
|
|
25
|
+
updated: z.boolean(),
|
|
26
|
+
/**
|
|
27
|
+
* The BARE live-head URI — amend targets the mounted card and never
|
|
28
|
+
* mints a record, so there is no pinned URI to return and no epoch
|
|
29
|
+
* field (the history number is untouched by construction).
|
|
30
|
+
*/
|
|
31
|
+
resourceUri: z.string(),
|
|
32
|
+
/** No-op feedback channel — same semantics as ggui_update's. */
|
|
33
|
+
warning: z.string().optional(),
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Build the OSS `ggui_amend` handler. Additive, like `update:` — server
|
|
37
|
+
* composers opt in via the dedicated `amend:` slot.
|
|
38
|
+
*/
|
|
39
|
+
export function createGguiAmendHandler(deps) {
|
|
40
|
+
return {
|
|
41
|
+
name: 'ggui_amend',
|
|
42
|
+
title: 'Amend',
|
|
43
|
+
// Deliberately NO `_meta` — see the module docstring. Declaring
|
|
44
|
+
// the UI binding here would make hosts treat amend results as
|
|
45
|
+
// renderable views, which is exactly what this tool exists to
|
|
46
|
+
// avoid.
|
|
47
|
+
audience: ['agent'],
|
|
48
|
+
description: deps.description ??
|
|
49
|
+
"Update the rendered UI's props IN PLACE — repaint the currently mounted card without adding a new card to the conversation; the history number does not advance. This is the DEFAULT mutation of the render/update family for reacting to user gestures (see ggui_update for the new-card variant). USE THIS AFTER ANY DOMAIN-TOOL CALL THAT CHANGED DATA THE UI SHOWS — e.g. you handled a `todo_toggle`/`cart_add`/`note_save` event from `ggui_consume`, mutated backend state, and the user is staring at stale props. Skipping this leaves the card frozen on the old state and is the #1 wire bug. Pattern: `consume → domain-tool → ggui_amend → loop`. The card repaints WITHOUT losing scroll position, focus, or uncommitted input. Two mutation modes: (1) `{sessionId, kind:'replace', props}` — full props replacement. (2) `{sessionId, kind:'merge', patch}` — RFC 7396 JSON Merge Patch; send ONLY the delta (null deletes a key; arrays fully replace). Prefer `merge` after a single domain-tool mutation. Both modes validate the FINAL props against the GguiSession's `propsSpec` (when declared) and reject on violation. For a state MILESTONE that deserves its own new card in the conversation — or when the original card is no longer visible or usable — use ggui_update instead (it renders the state as a new card and advances the history number).",
|
|
50
|
+
inputSchema: mutationInputSchema,
|
|
51
|
+
outputSchema,
|
|
52
|
+
async handler(input, ctx) {
|
|
53
|
+
const r = await runPropsMutation(deps, 'ggui_amend', input, ctx);
|
|
54
|
+
return {
|
|
55
|
+
sessionId: r.sessionId,
|
|
56
|
+
updated: r.updated,
|
|
57
|
+
resourceUri: r.mountResourceUri,
|
|
58
|
+
...(r.warning !== undefined ? { warning: r.warning } : {}),
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
// NO resultMeta — a `_meta`-carrying success result would make
|
|
62
|
+
// hosts mint a per-result view (live-proven), defeating the tool.
|
|
63
|
+
};
|
|
64
|
+
}
|
|
@@ -45,10 +45,14 @@ export type ApplyGguiSessionPatchInput<T extends GguiSessionTarget> = {
|
|
|
45
45
|
readonly render: T;
|
|
46
46
|
readonly mode: 'replace';
|
|
47
47
|
readonly props: JsonObject;
|
|
48
|
+
/** Error attribution for propsSpec violations (#483). Default `'ggui_update'`. */
|
|
49
|
+
readonly tool?: 'ggui_update' | 'ggui_amend';
|
|
48
50
|
} | {
|
|
49
51
|
readonly render: T;
|
|
50
52
|
readonly mode: 'merge';
|
|
51
53
|
readonly patch: JsonObject;
|
|
54
|
+
/** Error attribution for propsSpec violations (#483). Default `'ggui_update'`. */
|
|
55
|
+
readonly tool?: 'ggui_amend' | 'ggui_update';
|
|
52
56
|
};
|
|
53
57
|
export interface ApplyGguiSessionPatchResult<T extends GguiSessionTarget> {
|
|
54
58
|
/** The updated render (post-patch). Safe to persist. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-ggui-session-patch.d.ts","sourceRoot":"","sources":["../../src/renders/apply-ggui-session-patch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,KAAK,EAAE,UAAU,EAAa,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG1E;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC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AiB;IACtE,wDAAwD;IACxD,QAAQ,CAAC,cAAc,EAAE,CAAC,CAAC;IAC3B,mEAAmE;IACnE,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,UAAU,GAChB,UAAU,CAwBZ;AAED,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,iBAAiB,EAC/D,KAAK,EAAE,0BAA0B,CAAC,CAAC,CAAC,GACnC,2BAA2B,CAAC,CAAC,CAAC,CAyBhC"}
|
|
@@ -49,7 +49,7 @@ export function applyGguiSessionPatch(input) {
|
|
|
49
49
|
// unknown-key strictness. For merge mode, this catches the case
|
|
50
50
|
// where the patch's null-delete would orphan a required field, or
|
|
51
51
|
// a recursive merge would introduce an undeclared key.
|
|
52
|
-
assertPropsContract(existing.propsSpec, finalProps);
|
|
52
|
+
assertPropsContract(existing.propsSpec, finalProps, input.tool ?? 'ggui_update');
|
|
53
53
|
// Spread preserves T's other fields; the `props` override lands on
|
|
54
54
|
// top. The spread infers `T & { props: JsonObject }`, which is
|
|
55
55
|
// assignable to `T` — no cast needed.
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
* Contract:
|
|
6
6
|
* - `spec === undefined` → no-op (matches legacy ggui_update: missing
|
|
7
7
|
* propsSpec is permissive, no validation runs).
|
|
8
|
-
* - Otherwise validate; on failure throw `ContractViolationError`
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* - Otherwise validate; on failure throw `ContractViolationError`
|
|
9
|
+
* attributed to the calling tool (`ggui_update` by default —
|
|
10
|
+
* `ggui_amend` threads its own name, #483) so the error envelope
|
|
11
|
+
* names the tool the agent actually called.
|
|
11
12
|
*
|
|
12
13
|
* This helper is the centralized enforcement point for props contracts —
|
|
13
14
|
* every mutation path that applies new props to a render SHOULD go
|
|
@@ -15,5 +16,5 @@
|
|
|
15
16
|
* bypass validation entirely.
|
|
16
17
|
*/
|
|
17
18
|
import { type PropsSpec } from '@ggui-ai/protocol';
|
|
18
|
-
export declare function assertPropsContract(spec: PropsSpec | undefined, patch: Record<string, unknown
|
|
19
|
+
export declare function assertPropsContract(spec: PropsSpec | undefined, patch: Record<string, unknown>, tool?: 'ggui_update' | 'ggui_amend'): void;
|
|
19
20
|
//# sourceMappingURL=assert-props-contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert-props-contract.d.ts","sourceRoot":"","sources":["../../src/renders/assert-props-contract.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"assert-props-contract.d.ts","sourceRoot":"","sources":["../../src/renders/assert-props-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAGL,KAAK,SAAS,EACf,MAAM,mBAAmB,CAAC;AAE3B,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,SAAS,GAAG,SAAS,EAC3B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,IAAI,GAAE,aAAa,GAAG,YAA4B,GACjD,IAAI,CASN"}
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
* Contract:
|
|
6
6
|
* - `spec === undefined` → no-op (matches legacy ggui_update: missing
|
|
7
7
|
* propsSpec is permissive, no validation runs).
|
|
8
|
-
* - Otherwise validate; on failure throw `ContractViolationError`
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* - Otherwise validate; on failure throw `ContractViolationError`
|
|
9
|
+
* attributed to the calling tool (`ggui_update` by default —
|
|
10
|
+
* `ggui_amend` threads its own name, #483) so the error envelope
|
|
11
|
+
* names the tool the agent actually called.
|
|
11
12
|
*
|
|
12
13
|
* This helper is the centralized enforcement point for props contracts —
|
|
13
14
|
* every mutation path that applies new props to a render SHOULD go
|
|
@@ -15,13 +16,13 @@
|
|
|
15
16
|
* bypass validation entirely.
|
|
16
17
|
*/
|
|
17
18
|
import { ContractViolationError, validatePropsData, } from '@ggui-ai/protocol';
|
|
18
|
-
export function assertPropsContract(spec, patch) {
|
|
19
|
+
export function assertPropsContract(spec, patch, tool = 'ggui_update') {
|
|
19
20
|
if (!spec)
|
|
20
21
|
return;
|
|
21
22
|
const result = validatePropsData(patch, spec);
|
|
22
23
|
if (!result.valid) {
|
|
23
24
|
throw new ContractViolationError({
|
|
24
|
-
tool
|
|
25
|
+
tool,
|
|
25
26
|
violations: result.violations,
|
|
26
27
|
});
|
|
27
28
|
}
|
package/dist/renders/consume.js
CHANGED
|
@@ -75,7 +75,7 @@ export function createGguiConsumeHandler(deps) {
|
|
|
75
75
|
name: 'ggui_consume',
|
|
76
76
|
title: 'Consume',
|
|
77
77
|
audience: ['agent'],
|
|
78
|
-
description: 'Long-poll for buffered events on a GguiSession. CALL THIS RIGHT AFTER EVERY `ggui_render` THAT RETURNS `nextStep.tool === "ggui_consume"` — that hint is your cue to start listening for the user\'s gesture. Keyed by sessionId (global UUID); tenancy-checked via ctx.appId. Inline long-poll: `timeout` is an integer in [0, 25] seconds (values outside reject INVALID_PARAMS — host MCP clients abort longer tool calls; pick 5-15s typical, 25 max). Returns `{events, status}` — each event carries `{intent, actionData, uiContext, actionId, firedAt}`: `actionData` is WHAT the user did, `uiContext` is the iframe-local snapshot of the contract\'s contextSpec slots AT THE MOMENT they did it. Both inform your reaction without a second round trip. Returns immediately when an action event arrives OR the render completes OR the timeout elapses. On timeout with no event, re-call ggui_consume to keep waiting. THE LOOP: when `events` is non-empty, REACT, then re-call `ggui_consume` to wait for the next event. Exit only when status:"expired". IMPORTANT — the iframe state is independent of your backend state: after you mutate via domain tools (todo_toggle, cart_add, etc.), the UI still shows the OLD props until you call `
|
|
78
|
+
description: 'Long-poll for buffered events on a GguiSession. CALL THIS RIGHT AFTER EVERY `ggui_render` THAT RETURNS `nextStep.tool === "ggui_consume"` — that hint is your cue to start listening for the user\'s gesture. Keyed by sessionId (global UUID); tenancy-checked via ctx.appId. Inline long-poll: `timeout` is an integer in [0, 25] seconds (values outside reject INVALID_PARAMS — host MCP clients abort longer tool calls; pick 5-15s typical, 25 max). Returns `{events, status}` — each event carries `{intent, actionData, uiContext, actionId, firedAt}`: `actionData` is WHAT the user did, `uiContext` is the iframe-local snapshot of the contract\'s contextSpec slots AT THE MOMENT they did it. Both inform your reaction without a second round trip. Returns immediately when an action event arrives OR the render completes OR the timeout elapses. On timeout with no event, re-call ggui_consume to keep waiting. THE LOOP: when `events` is non-empty, REACT, then re-call `ggui_consume` to wait for the next event. Exit only when status:"expired". IMPORTANT — the iframe state is independent of your backend state: after you mutate via domain tools (todo_toggle, cart_add, etc.), the UI still shows the OLD props until you call `ggui_amend`. If the events caused observable state changes the user is looking at, your reaction MUST include `ggui_amend` somewhere before re-consuming; otherwise the user sees stale props (the #1 wire compliance bug). Pure-info events that don\'t change displayed state can skip it. `ggui_amend` repaints the SAME card in place (the default move in this loop); `ggui_update` instead renders the state as a NEW card and advances the history number — reserve it for milestones worth a card in the transcript. HOSTS WITH PROGRESSIVE TOOL DISCOVERY (claude.ai-style connectors): if a call here errors with "tool not loaded yet" or "wrong parameter names," call `tool_search({query:"ggui_consume"})` once to warm the tool, then retry with the same args. DO NOT skip the consume — silent gesture drops are the worst protocol failure.',
|
|
79
79
|
inputSchema,
|
|
80
80
|
outputSchema,
|
|
81
81
|
async handler(rawInput, ctx) {
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
import { type BlueprintSource, type BlueprintVariance, type DataContract } from '@ggui-ai/protocol';
|
|
44
44
|
import { type LLMCaller } from '@ggui-ai/negotiator';
|
|
45
45
|
import type { HandlerContext } from '../types.js';
|
|
46
|
+
import { type BlueprintMatchResult } from './blueprint-matcher.js';
|
|
46
47
|
import type { BlueprintRegistryDeps } from './blueprint-registry.js';
|
|
47
48
|
import type { HandshakeNegotiator, HandshakeNegotiatorResult } from './handshake.js';
|
|
48
49
|
import type { InstalledBlueprintsProvider } from './installed-blueprints-provider.js';
|
|
@@ -116,6 +117,20 @@ export interface HandshakeDecisionAdapter {
|
|
|
116
117
|
* passes its structured logger. Absent ⇒ silent.
|
|
117
118
|
*/
|
|
118
119
|
warn?(message: string): void;
|
|
120
|
+
/**
|
|
121
|
+
* Optional observer for every blueprint-match OUTCOME (hit or miss),
|
|
122
|
+
* called once per pool probed in the Tier-1 find-similar loop.
|
|
123
|
+
* Non-error, non-blocking — purely for cache-hit-ratio observability.
|
|
124
|
+
* Absent ⇒ no-op. OSS ships no default observer; a host MAY wire
|
|
125
|
+
* this to its own structured logger. Enforced non-blocking: a
|
|
126
|
+
* throwing observer is caught, reported via `warn` if present, and
|
|
127
|
+
* never breaks the handshake.
|
|
128
|
+
*/
|
|
129
|
+
onBlueprintMatch?(input: {
|
|
130
|
+
readonly pool: string;
|
|
131
|
+
readonly scope: string;
|
|
132
|
+
readonly result: BlueprintMatchResult;
|
|
133
|
+
}): void;
|
|
119
134
|
/** Optional per-app tool-identity catalog (bare tool → canonical serverInfo).
|
|
120
135
|
* Present ⇒ run the canonicalization step before keying (Tier 1); absent ⇒
|
|
121
136
|
* no-op (Tier 2). Resolved by ctx.appId. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decide-handshake.d.ts","sourceRoot":"","sources":["../../src/renders/decide-handshake.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAGH,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAGlB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAGL,KAAK,SAAS,EACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"decide-handshake.d.ts","sourceRoot":"","sources":["../../src/renders/decide-handshake.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CAAC,EAAE,iBAAiB,GAClC,yBAAyB,CAiC3B;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,wBAAwB,EACjC,KAAK,EAAE,oBAAoB,GAC1B,OAAO,CAAC,yBAAyB,CAAC,CA4QpC"}
|
|
@@ -377,6 +377,24 @@ export async function decideHandshake(adapter, input) {
|
|
|
377
377
|
contract: parsedDraft.data,
|
|
378
378
|
...(variance !== undefined ? { variance } : {}),
|
|
379
379
|
});
|
|
380
|
+
// Isolated in its OWN try/catch, separate from the outer
|
|
381
|
+
// pool-probe catch below: onBlueprintMatch's contract promises
|
|
382
|
+
// non-blocking observation, so a throwing observer must never
|
|
383
|
+
// lose an otherwise-successful matchResult (falling into the
|
|
384
|
+
// outer catch would either rethrow a non-operational error or
|
|
385
|
+
// misreport "matchBlueprint probe failed" for a probe that
|
|
386
|
+
// actually succeeded). Observer failures are surfaced via warn
|
|
387
|
+
// and the request proceeds — never rethrown.
|
|
388
|
+
try {
|
|
389
|
+
adapter.onBlueprintMatch?.({
|
|
390
|
+
pool: pool.label ?? scope,
|
|
391
|
+
scope,
|
|
392
|
+
result: matchResult,
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
catch (err) {
|
|
396
|
+
adapter.warn?.(`[decideHandshake] onBlueprintMatch observer threw for pool ${pool.label ?? scope}; ignoring: ${errMessage(err)}`);
|
|
397
|
+
}
|
|
380
398
|
// exact-key is a perfect canonical match — it wins immediately over
|
|
381
399
|
// any semantic hit from any pool, but ONLY when the requesting agent
|
|
382
400
|
// can fulfill it: its declared tools must superset the blueprint's
|
|
@@ -57,7 +57,7 @@ const declareOutputSchema = declareToolCatalogOutputSchema.shape;
|
|
|
57
57
|
export function createGguiDeclareToolCatalogHandler(deps) {
|
|
58
58
|
return {
|
|
59
59
|
name: "ggui_runtime_declare_tool_catalog",
|
|
60
|
-
title: "Declare
|
|
60
|
+
title: "[runtime] Declare Tool Catalog",
|
|
61
61
|
audience: ["runtime"],
|
|
62
62
|
// `_meta.ui.visibility: ['app']` keeps this tool off the LLM's
|
|
63
63
|
// `tools/list` (spec-compliant hosts filter `app`-visible tools out
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handshake.d.ts","sourceRoot":"","sources":["../../src/renders/handshake.ts"],"names":[],"mappings":"AAsCA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAQL,KAAK,SAAS,EACd,KAAK,cAAc,EAEnB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EAExB,KAAK,kBAAkB,EAExB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D;;;;;;GAMG;AACH;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;IAC/C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,oBAAoB;IACnC,8EAA8E;IAC9E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,4EAA4E;IAC5E,QAAQ,CAAC,cAAc,EAAE,UAAU,CAAC;IACpC;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;CAChC;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;GAcG;AACH,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,WAAW,EAAE,MAAM;CAMhD;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB,sBAAsB,CAAC;AAE3D;;;;;;;GAOG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;IACxE,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;IAC7C,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,UAAU,CAAC,EAAE,mBAAmB,CAAC;IAC1C,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,MAAM,GAAG,SAAS,GACzB,MAAM,GAAG,SAAS,CAOpB"}
|
|
@@ -278,7 +278,7 @@ export function createGguiHandshakeHandler(deps) {
|
|
|
278
278
|
});
|
|
279
279
|
const nextStep = buildNextStepHint({
|
|
280
280
|
handshakeId,
|
|
281
|
-
|
|
281
|
+
contract: negotiated.effectiveContract,
|
|
282
282
|
});
|
|
283
283
|
const serverCapabilities = deps.serverCapabilities?.();
|
|
284
284
|
// Truncate `reason` to the wire-output cap (280 chars).
|
|
@@ -405,10 +405,15 @@ function isJsonObject(v) {
|
|
|
405
405
|
* `nextStep.example` verbatim into its next `ggui_render` call.
|
|
406
406
|
*/
|
|
407
407
|
function buildNextStepHint(input) {
|
|
408
|
-
const { handshakeId,
|
|
409
|
-
// `props` is REQUIRED on the
|
|
410
|
-
//
|
|
411
|
-
|
|
408
|
+
const { handshakeId, contract } = input;
|
|
409
|
+
// `props` is REQUIRED on the renderInputSchema, and the proposed
|
|
410
|
+
// contract's REQUIRED prop entries must appear in it — a bare `{}`
|
|
411
|
+
// example against such a contract fails validation when followed
|
|
412
|
+
// verbatim (a live agent flagged exactly that, 2026-08-12). Derive
|
|
413
|
+
// the example from the effective contract: required entries keyed
|
|
414
|
+
// with their declared `example`/`default` when present, else a
|
|
415
|
+
// type-shaped placeholder. No required props → `{}` stays honest.
|
|
416
|
+
const propsExample = buildPropsExample(contract) ?? '{}';
|
|
412
417
|
// ACCEPT shape: omit `override` entirely — the agent reuses the
|
|
413
418
|
// proposed contract. (Re-aim via `override:{variance}` / `override:
|
|
414
419
|
// {contract}` is taught in the description, not the default hint.)
|
|
@@ -419,14 +424,55 @@ function buildNextStepHint(input) {
|
|
|
419
424
|
};
|
|
420
425
|
}
|
|
421
426
|
/**
|
|
422
|
-
*
|
|
423
|
-
*
|
|
424
|
-
*
|
|
425
|
-
*
|
|
426
|
-
*
|
|
427
|
+
* JSON example for the REQUIRED entries of the contract's propsSpec.
|
|
428
|
+
* Prefers each entry's declared `example`, then `default`, then a
|
|
429
|
+
* type-shaped placeholder from its JSON Schema (first enum member,
|
|
430
|
+
* else '' / 0 / false / [] / {}). Returns undefined when the contract
|
|
431
|
+
* has no required props — the caller's `{}` fallback is then valid
|
|
432
|
+
* verbatim.
|
|
427
433
|
*/
|
|
428
|
-
function buildPropsExample(
|
|
429
|
-
|
|
434
|
+
function buildPropsExample(contract) {
|
|
435
|
+
const properties = contract.propsSpec?.properties;
|
|
436
|
+
if (properties === undefined)
|
|
437
|
+
return undefined;
|
|
438
|
+
const out = {};
|
|
439
|
+
for (const [name, entry] of Object.entries(properties)) {
|
|
440
|
+
if (entry.required !== true)
|
|
441
|
+
continue;
|
|
442
|
+
out[name] =
|
|
443
|
+
entry.example ?? entry.default ?? placeholderForSchema(entry.schema);
|
|
444
|
+
}
|
|
445
|
+
if (Object.keys(out).length === 0)
|
|
446
|
+
return undefined;
|
|
447
|
+
try {
|
|
448
|
+
return JSON.stringify(out);
|
|
449
|
+
}
|
|
450
|
+
catch {
|
|
451
|
+
return undefined;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
/** Minimal type-shaped placeholder for a JSON Schema. */
|
|
455
|
+
function placeholderForSchema(schema) {
|
|
456
|
+
if (schema === null || typeof schema !== 'object' || Array.isArray(schema)) {
|
|
457
|
+
return '';
|
|
458
|
+
}
|
|
459
|
+
const s = schema;
|
|
460
|
+
if (Array.isArray(s.enum) && s.enum.length > 0) {
|
|
461
|
+
return s.enum[0];
|
|
462
|
+
}
|
|
463
|
+
switch (s.type) {
|
|
464
|
+
case 'number':
|
|
465
|
+
case 'integer':
|
|
466
|
+
return 0;
|
|
467
|
+
case 'boolean':
|
|
468
|
+
return false;
|
|
469
|
+
case 'array':
|
|
470
|
+
return [];
|
|
471
|
+
case 'object':
|
|
472
|
+
return {};
|
|
473
|
+
default:
|
|
474
|
+
return '';
|
|
475
|
+
}
|
|
430
476
|
}
|
|
431
477
|
/**
|
|
432
478
|
* Typed error thrown by `ggui_render` when the supplied handshakeId
|
package/dist/renders/index.d.ts
CHANGED
|
@@ -59,8 +59,12 @@ export { createGguiRenderHandler, type ChannelNotifier, type GenerationCredentia
|
|
|
59
59
|
export { applyRecordOp, DEFAULT_REPLAY_MAX_PER_SESSION, DEFAULT_REPLAY_MAX_RETRIES, EMPTY_BUFFER_STATE, normalizeBufferState, ReplayConflictError, replayFromBufferOp, ReplayMaxRetriesExceededError, ReplayGguiSessionNotFoundError, runSequencedRecord, type ApplyRecordResult, type BufferedReplayEnvelope, type BufferState, type FetchedReplayState, type ReplayResult, type ReplaySequencerDeps, type RunSequencedRecordOptions, type StreamReplayInput, } from "./stream-replay-ops.js";
|
|
60
60
|
export { createGguiEmitHandler, type GguiEmitHandlerDeps, type StreamObserverNotifier, } from "./stream.js";
|
|
61
61
|
export { createGguiSubmitActionHandler } from "./submit-action.js";
|
|
62
|
+
export { createGguiRuntimePullHandler, type GguiRuntimePullHandlerDeps, } from "./runtime-pull.js";
|
|
63
|
+
export { createGguiRuntimeTelemetryHandler, type GguiRuntimeTelemetryHandlerDeps, type RuntimeTelemetryLogger, } from "./runtime-telemetry.js";
|
|
62
64
|
export { createGguiSyncContextHandler, type CreateGguiSyncContextHandlerDeps, } from "./sync-context.js";
|
|
63
65
|
export { createGguiUpdateHandler, type BillingGate, type GguiUpdateHandlerDeps, type PropsUpdateNotifier, } from "./update.js";
|
|
66
|
+
export { createGguiAmendHandler, type GguiAmendHandlerDeps, } from "./amend.js";
|
|
67
|
+
export { mutationInputSchema, runPropsMutation, type PropsMutationResult, } from "./props-mutation-core.js";
|
|
64
68
|
export { matchBlueprint, type BlueprintMatchHit, type BlueprintMatchMiss, type BlueprintMatchResult, type MatchBlueprintDeps, type MatchBlueprintOptions, } from "./blueprint-matcher.js";
|
|
65
69
|
export { BlueprintRejectedError, composeEmbeddingInput, composeExactKey, deleteBlueprint, findBlueprintExact, findBlueprintsByEmbedding, listBlueprints, recordBlueprintHit, registerBlueprint, type Blueprint, type BlueprintCandidate, type BlueprintIndex, type BlueprintKind, type BlueprintRegistryDeps, type ContractValidator, type RegisterBlueprintInput, type RegisterBlueprintOptions, } from "./blueprint-registry.js";
|
|
66
70
|
export { consumeHandshakeRecord, createGguiHandshakeHandler, DEFAULT_GENERATOR_SLUG, HANDSHAKE_RECORD_TTL_SEC, HandshakeNotFoundError, handshakeRecordKey, peekHandshakeRecord, type GguiHandshakeHandlerDeps, type HandshakeNegotiator, type HandshakeNegotiatorResult, type HandshakeRecord, type HandshakeStoredInput, type HandshakeStoredTarget, } from "./handshake.js";
|
|
@@ -68,7 +72,7 @@ export { buildCacheReuseResult, buildCreateFallback, decideHandshake, type Bluep
|
|
|
68
72
|
export { installToCache, type InstallToCacheInput } from "./install-to-cache.js";
|
|
69
73
|
export { createInstalledBlueprintsProvider, type CreateInstalledBlueprintsProviderOptions, type InstalledBlueprintCacheIssue, type CompileResult as InstalledBlueprintCompileResult, type InstalledBlueprintEntry, type InstalledBlueprintsProvider, } from "./installed-blueprints-provider.js";
|
|
70
74
|
export { createInMemoryProvisionalPreviewRegistry, evaluateProvisionalPreviewGate, finalizeProvisionalPreview, kickoffProvisionalPreview, PreviewAbortError, PROVISIONAL_PREVIEW_CHANNEL, runProvisionalPreview, type ProvisionalPreviewConfig, type ProvisionalPreviewContext, type ProvisionalPreviewDeps, type ProvisionalPreviewEmit, type ProvisionalPreviewEmitter, type ProvisionalPreviewGate, type ProvisionalPreviewGateInput, type ProvisionalPreviewHandle, type ProvisionalPreviewOutcome, type ProvisionalPreviewRegistry, type ProvisionalPreviewRunContext, type ProvisionalPreviewSkipReason, } from "./provisional-preview.js";
|
|
71
|
-
export { assembleRenderSliceBase, deriveBundleOrigins, deriveContextSlots, deriveContractBundle, derivePropsJson, derivePublicEnvProjection, deriveRenderMeta, rewritePrivateBundleUrls, PRIVATE_BUNDLE_PREFIX, resolveGadgetUrls, type RenderMetaView, type RenderSliceBase, type RenderSliceMetaDeps, } from "./slice-meta-derivation.js";
|
|
75
|
+
export { assembleRenderSliceBase, deriveBundleOrigins, deriveContextSlots, deriveContractBundle, derivePropsJson, derivePublicEnvProjection, deriveRenderMeta, spreadRenderMetaViewOntoSlice, rewritePrivateBundleUrls, wsOriginToHttpOrigin, PRIVATE_BUNDLE_PREFIX, resolveGadgetUrls, type RenderMetaView, type RenderSliceBase, type RenderSliceMetaDeps, } from "./slice-meta-derivation.js";
|
|
72
76
|
export type { SeedPoolSource } from "./seed-pool-source.js";
|
|
73
77
|
export { buildSeedPool, type BuildSeedPoolOptions } from "./build-seed-pool.js";
|
|
74
78
|
export { listRegistryBlueprintsForExport, type ExportableBlueprint } from './export-registry.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/renders/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;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C9B,KAAK,0BAA0B,EAC/B,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,GAClC,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,yBAAyB,EACzB,gBAAgB,EAChB,6BAA6B,EAC7B,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,mBAAmB,GACzB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,+BAA+B,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAKjG,OAAO,EACL,sBAAsB,EACtB,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,GACpC,MAAM,sBAAsB,CAAC"}
|
package/dist/renders/index.js
CHANGED
|
@@ -65,8 +65,12 @@ export { createGguiRenderHandler, } from "./render.js";
|
|
|
65
65
|
export { applyRecordOp, DEFAULT_REPLAY_MAX_PER_SESSION, DEFAULT_REPLAY_MAX_RETRIES, EMPTY_BUFFER_STATE, normalizeBufferState, ReplayConflictError, replayFromBufferOp, ReplayMaxRetriesExceededError, ReplayGguiSessionNotFoundError, runSequencedRecord, } from "./stream-replay-ops.js";
|
|
66
66
|
export { createGguiEmitHandler, } from "./stream.js";
|
|
67
67
|
export { createGguiSubmitActionHandler } from "./submit-action.js";
|
|
68
|
+
export { createGguiRuntimePullHandler, } from "./runtime-pull.js";
|
|
69
|
+
export { createGguiRuntimeTelemetryHandler, } from "./runtime-telemetry.js";
|
|
68
70
|
export { createGguiSyncContextHandler, } from "./sync-context.js";
|
|
69
71
|
export { createGguiUpdateHandler, } from "./update.js";
|
|
72
|
+
export { createGguiAmendHandler, } from "./amend.js";
|
|
73
|
+
export { mutationInputSchema, runPropsMutation, } from "./props-mutation-core.js";
|
|
70
74
|
// The handshake handler owns suggestion orchestration directly, via
|
|
71
75
|
// `HandshakeNegotiator.decide` returning a `HandshakeSuggestion`.
|
|
72
76
|
// The LLM-backed negotiator in `@ggui-ai/mcp-server` is the
|
|
@@ -83,7 +87,7 @@ export { createInMemoryProvisionalPreviewRegistry, evaluateProvisionalPreviewGat
|
|
|
83
87
|
// Exported so any server can run the same projections off the
|
|
84
88
|
// resolved render without duplicating the actionSpec / contextSpec
|
|
85
89
|
// walks.
|
|
86
|
-
export { assembleRenderSliceBase, deriveBundleOrigins, deriveContextSlots, deriveContractBundle, derivePropsJson, derivePublicEnvProjection, deriveRenderMeta, rewritePrivateBundleUrls, PRIVATE_BUNDLE_PREFIX, resolveGadgetUrls, } from "./slice-meta-derivation.js";
|
|
90
|
+
export { assembleRenderSliceBase, deriveBundleOrigins, deriveContextSlots, deriveContractBundle, derivePropsJson, derivePublicEnvProjection, deriveRenderMeta, spreadRenderMetaViewOntoSlice, rewritePrivateBundleUrls, wsOriginToHttpOrigin, PRIVATE_BUNDLE_PREFIX, resolveGadgetUrls, } from "./slice-meta-derivation.js";
|
|
87
91
|
export { buildSeedPool } from "./build-seed-pool.js";
|
|
88
92
|
export { listRegistryBlueprintsForExport } from './export-registry.js';
|
|
89
93
|
// The render-identity event registry. Exported because storage backends
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PROPS-MUTATION CORE — the single flow behind BOTH mutation tools
|
|
3
|
+
* (#483 tool split): `ggui_update` (advances the history epoch,
|
|
4
|
+
* mints a new record) and `ggui_amend` (in-place, epoch untouched).
|
|
5
|
+
* Extracted verbatim from the pre-split ggui_update handler; the
|
|
6
|
+
* per-tool deltas are parameterized on `tool`, everything else is
|
|
7
|
+
* byte-identical behavior.
|
|
8
|
+
*/
|
|
9
|
+
import { z } from 'zod';
|
|
10
|
+
import type { HandlerContext } from '../types.js';
|
|
11
|
+
import type { GguiUpdateHandlerDeps } from './update.js';
|
|
12
|
+
/**
|
|
13
|
+
* Input raw-shape shared by BOTH mutation tools — discriminated on
|
|
14
|
+
* `kind` (`'replace'` + `props` | `'merge'` + `patch`); identical wire
|
|
15
|
+
* grammar for `ggui_update` and `ggui_amend` (#483). Both validate the
|
|
16
|
+
* FINAL props (post-merge for `merge`) against the render's
|
|
17
|
+
* `propsSpec`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const mutationInputSchema: {
|
|
20
|
+
/**
|
|
21
|
+
* Globally-unique render id. Optional on the wire so an in-process
|
|
22
|
+
* dispatcher (live-channel dispatch / threaded mount) can populate it
|
|
23
|
+
* via `HandlerContext.sessionId` instead. Required at the core
|
|
24
|
+
* level — see the resolve step inside `runPropsMutation`.
|
|
25
|
+
*/
|
|
26
|
+
readonly sessionId: z.ZodOptional<z.ZodString>;
|
|
27
|
+
/**
|
|
28
|
+
* Mode discriminator. `'replace'` requires `props`; `'merge'`
|
|
29
|
+
* requires `patch`. The narrowing step inside the core enforces
|
|
30
|
+
* both presence + mutual exclusion.
|
|
31
|
+
*/
|
|
32
|
+
readonly kind: z.ZodEnum<{
|
|
33
|
+
replace: "replace";
|
|
34
|
+
merge: "merge";
|
|
35
|
+
}>;
|
|
36
|
+
/**
|
|
37
|
+
* Full new props map. Required when `kind === 'replace'`; rejected
|
|
38
|
+
* otherwise. Validated against the GguiSession's `propsSpec` after
|
|
39
|
+
* applying.
|
|
40
|
+
*/
|
|
41
|
+
readonly props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
42
|
+
/**
|
|
43
|
+
* RFC 7396 JSON Merge Patch. Required when `kind === 'merge'`;
|
|
44
|
+
* rejected otherwise. The core applies the patch to the existing
|
|
45
|
+
* props, then validates the merged result against `propsSpec`.
|
|
46
|
+
* `null` values in the patch DELETE the corresponding key.
|
|
47
|
+
*/
|
|
48
|
+
readonly patch: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
49
|
+
};
|
|
50
|
+
export interface PropsMutationResult {
|
|
51
|
+
readonly sessionId: string;
|
|
52
|
+
readonly updated: boolean;
|
|
53
|
+
/** Bare mount URI (no epoch pin) — callers compose pinned forms. */
|
|
54
|
+
readonly mountResourceUri: string;
|
|
55
|
+
/** Head epoch AFTER the call (row-authoritative; 0 when absent). */
|
|
56
|
+
readonly epoch: number;
|
|
57
|
+
readonly warning?: string;
|
|
58
|
+
}
|
|
59
|
+
export declare function runPropsMutation(deps: GguiUpdateHandlerDeps, tool: 'ggui_update' | 'ggui_amend', input: unknown, ctx: HandlerContext): Promise<PropsMutationResult>;
|
|
60
|
+
//# sourceMappingURL=props-mutation-core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props-mutation-core.d.ts","sourceRoot":"","sources":["../../src/renders/props-mutation-core.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAUlD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzD;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;IAC9B;;;;;OAKG;;IAEH;;;;OAIG;;;;;IAEH;;;;OAIG;;IAEH;;;;;OAKG;;CAEK,CAAC;AAwBX,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,oEAAoE;IACpE,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,oEAAoE;IACpE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,qBAAqB,EAC3B,IAAI,EAAE,aAAa,GAAG,YAAY,EAClC,KAAK,EAAE,OAAO,EACd,GAAG,EAAE,cAAc,GAClB,OAAO,CAAC,mBAAmB,CAAC,CAsS9B"}
|