@ggui-ai/mcp-server-handlers 0.18.0 → 0.20.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.
@@ -256,6 +256,18 @@ export interface RegisterBlueprintOptions {
256
256
  */
257
257
  readonly mintId?: () => string;
258
258
  }
259
+ /**
260
+ * What {@link registerBlueprint} hands back: the row, plus whether this call
261
+ * MINTED it or found it already bound (ggui#1131 (d)). The registry is
262
+ * first-write-wins — a dedup hit returns the existing row verbatim — so a
263
+ * caller that generated fresh code and receives an id it did not mint is
264
+ * serving one thing and naming another. `deduped` is how it says so instead
265
+ * of inferring it: `false` = this call minted the row; `true` = the row
266
+ * already existed and nothing was written.
267
+ */
268
+ export type RegisteredBlueprint = Blueprint & {
269
+ readonly deduped: boolean;
270
+ };
259
271
  /**
260
272
  * Register a blueprint into the scope.
261
273
  *
@@ -285,7 +297,7 @@ export interface RegisterBlueprintOptions {
285
297
  * wires a non-enumerable backend skips eviction and must bound the
286
298
  * bucket's growth itself.
287
299
  */
288
- export declare function registerBlueprint(deps: BlueprintRegistryDeps, scope: string, input: RegisterBlueprintInput, options?: RegisterBlueprintOptions): Promise<Blueprint>;
300
+ export declare function registerBlueprint(deps: BlueprintRegistryDeps, scope: string, input: RegisterBlueprintInput, options?: RegisterBlueprintOptions): Promise<RegisteredBlueprint>;
289
301
  /**
290
302
  * Tier 1 exact lookup — resolve the blueprint bound to `(kind,
291
303
  * contractKey, variantKey)` via the {@link BlueprintIndex}, or `null` if
@@ -1 +1 @@
1
- {"version":3,"file":"blueprint-registry.d.ts","sourceRoot":"","sources":["../../src/renders/blueprint-registry.ts"],"names":[],"mappings":"AAyCA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EAKrB,WAAW,EACZ,MAAM,0BAA0B,CAAC;AAKlC,YAAY,EAAE,cAAc,EAAE,MAAM,0BAA0B,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OAAO,CAAC,IAAI,CAAC,CA8Bf;AAoBD;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE;IAAE,WAAW,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,cAAc,CAAA;CAAE,EACzD,KAAK,EAAE,MAAM,EACb,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,IAAI,CAAC,CAaf"}
@@ -337,7 +337,7 @@ export async function registerBlueprint(deps, scope, input, options = {}) {
337
337
  if (existingId) {
338
338
  const existing = await findBlueprintByUuid(deps.vectorStore, scope, existingId);
339
339
  if (existing)
340
- return existing;
340
+ return { ...existing, deduped: true };
341
341
  // Dangling binding (id present, row gone) — self-heal: drop the stale
342
342
  // binding and fall through to mint a fresh row.
343
343
  await deps.index.deleteId(scope, exactKey);
@@ -393,7 +393,7 @@ export async function registerBlueprint(deps, scope, input, options = {}) {
393
393
  // `scope` is the appId at every call site — the registry's scoping
394
394
  // unit and the durable record's are the same thing.
395
395
  await writeBlueprintDurably(deps.durability, scope, blueprint, input.createdBy ?? 'agent');
396
- return blueprint;
396
+ return { ...blueprint, deduped: false };
397
397
  }
398
398
  /**
399
399
  * If a fresh registration into (scope, kind) would push the bucket past
@@ -84,6 +84,12 @@ export interface BlueprintPool {
84
84
  * that differs between deployments lives behind this interface; the
85
85
  * decision spine in {@link decideHandshake} is deployment-agnostic.
86
86
  */
87
+ /** The keys a find-similar probe reads the index at — see {@link HandshakeDecisionAdapter.onBlueprintMatch}. */
88
+ export interface BlueprintLookupKeys {
89
+ readonly contractKey: string;
90
+ readonly variantKey: string;
91
+ readonly exactKey: string;
92
+ }
87
93
  export interface HandshakeDecisionAdapter {
88
94
  /**
89
95
  * Resolve the LLM for this request — the find-similar judge AND the
@@ -144,6 +150,15 @@ export interface HandshakeDecisionAdapter {
144
150
  readonly pool: string;
145
151
  readonly scope: string;
146
152
  readonly result: BlueprintMatchResult;
153
+ /**
154
+ * WHAT the probe looked up, beside WHETHER it hit: the contract key,
155
+ * the variant key and the composed exact key the index was read at —
156
+ * the same three the matcher keys on (`blueprintKey(contract)`,
157
+ * `variantKey(variance)`, `<kind>:<contractKey>:<variantKey>`). Hashes,
158
+ * never content. Present on a miss as on a hit, so a contract miss and
159
+ * a variant miss stop reading alike to whoever consumes the outcome.
160
+ */
161
+ readonly lookup: BlueprintLookupKeys;
147
162
  }): void;
148
163
  /** Optional per-app tool-identity catalog (bare tool → canonical serverInfo).
149
164
  * Present ⇒ run the canonicalization step before keying (Tier 1); absent ⇒
@@ -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;AAClD,OAAO,EAGL,KAAK,oBAAoB,EAE1B,MAAM,wBAAwB,CAAC;AAGhC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAEtF,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,iCAAiC,CAAC;AAEzC;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,aAAa;IAC5B,4DAA4D;IAC5D,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC;IACzC;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,2BAA2B,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AAE,MAAM;AACd;;;;;GAKG;AACH,WAAW,EAAE,MAAM,GAClB,yBAAyB,CAyC3B;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,OAAO,EACtB,MAAM,EAAE,MAAM,EACd,eAAe,CAAC,EAAE,iBAAiB,GAClC,yBAAyB,CAkC3B;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,wBAAwB,EACjC,KAAK,EAAE,oBAAoB,GAC1B,OAAO,CAAC,yBAAyB,CAAC,CA+SpC"}
@@ -46,6 +46,7 @@ import { blueprintKey, variantKey } from '@ggui-ai/protocol/blueprint-key';
46
46
  import { ensureConformingContract, normalizeDraft, } from '@ggui-ai/negotiator';
47
47
  import { matchBlueprint, } from './blueprint-matcher.js';
48
48
  import { isFulfillable } from './blueprint-fulfillability.js';
49
+ import { composeExactKey } from './blueprint-registry.js';
49
50
  import { buildDeclined, buildSalvagedOrDeclined } from './handshake-fallbacks.js';
50
51
  import { emitAgentCaps } from './agentcaps-measurement.js';
51
52
  import { canonicalizeToolIdentity, } from './canonicalize-tool-identity.js';
@@ -377,6 +378,17 @@ export async function decideHandshake(adapter, input) {
377
378
  // satisfiable (see {@link isFulfillable}).
378
379
  const agentCaps = parsedDraft.data.agentCapabilities?.tools;
379
380
  const semanticHits = [];
381
+ // The keys every pool probe below reads the index at — computed ONCE from the
382
+ // same arguments `matchBlueprint` receives (its `expectedKey` is this
383
+ // `blueprintKey(contract)`; it composes the exact key with the default kind),
384
+ // and handed to the observer so the outcome names its subject.
385
+ const lookupContractKey = blueprintKey(parsedDraft.data);
386
+ const lookupVariantKey = variantKey(variance);
387
+ const lookup = {
388
+ contractKey: lookupContractKey,
389
+ variantKey: lookupVariantKey,
390
+ exactKey: composeExactKey('template', lookupContractKey, lookupVariantKey),
391
+ };
380
392
  for (const pool of adapter.pools) {
381
393
  const scope = pool.scope ?? ctx.appId;
382
394
  try {
@@ -407,6 +419,7 @@ export async function decideHandshake(adapter, input) {
407
419
  pool: pool.label ?? scope,
408
420
  scope,
409
421
  result: matchResult,
422
+ lookup,
410
423
  });
411
424
  }
412
425
  catch (err) {
@@ -323,6 +323,21 @@ export interface GguiSessionPostSuccessArgs {
323
323
  * with `ggui_update`, so the two emitting tools cannot drift on the
324
324
  * slice deps.
325
325
  */
326
+ /** ggui#1131 (d) — how ONE render resolved its blueprint. See {@link GguiRenderHandlerDeps.onBlueprintResolution}. */
327
+ export interface BlueprintResolutionEvent {
328
+ readonly scope: 'render';
329
+ /** `proposed` = the handshake's proposal accepted; `override-reaim` = contract and/or variance re-aimed (one index read); `force-create` = the agent opted out of reuse. */
330
+ readonly strategy: 'proposed' | 'override-reaim' | 'force-create';
331
+ readonly contractKey: string;
332
+ readonly variantKey: string;
333
+ /** `hit` / `miss` = the index was read at (contractKey, variantKey); `skipped` = no read was taken (force-create, or a proposal with nothing to point-read). */
334
+ readonly indexRead: 'hit' | 'miss' | 'skipped';
335
+ /** `stored` = a stored component served; `fresh` = this render generated the code it served. */
336
+ readonly served: 'stored' | 'fresh';
337
+ readonly blueprintId?: string;
338
+ /** `existing` = an already-bound row's id; `minted` = this render's registration created the row; `unregistered` = the best-effort registration failed and no id was minted. */
339
+ readonly identity: 'existing' | 'minted' | 'unregistered';
340
+ }
326
341
  export interface GguiRenderHandlerDeps extends RenderSliceMetaDeps {
327
342
  /**
328
343
  * Built-in theme preset ids for the themeId DOOR (ggui#598 slice 3):
@@ -680,6 +695,24 @@ export interface GguiRenderHandlerDeps extends RenderSliceMetaDeps {
680
695
  * with a registered refusal code.
681
696
  */
682
697
  readonly preValidationGate?: (ctx: HandlerContext, rawInput: unknown) => Promise<PreGenerationRefusal | undefined> | PreGenerationRefusal | undefined;
698
+ /**
699
+ * ggui#1131 (d) — the render NAMES how it resolved its blueprint, once
700
+ * per render, the moment the resolution is final. Every lookup reaches
701
+ * the index as the same read with no attribution, and a `forceCreate`
702
+ * render takes no read at all, so a render that cold-gens past a bound
703
+ * card is invisible anywhere but here. Mirrors `onBlueprintMatch` on the
704
+ * handshake: an OBSERVER — absent ⇒ no-op, wrapped, a throwing observer
705
+ * is reported via `console.warn` and never breaks the render. This
706
+ * package ships no default; a host wires it to its own sink.
707
+ *
708
+ * `identity` derives from the registry's `deduped` flag — never inferred.
709
+ * `served: 'fresh'` with `identity: 'existing'` is the false-identity
710
+ * case (a forced regeneration at an occupied key: fresh code served, the
711
+ * old row's id reported) named as itself, never laundered as a reuse.
712
+ * Not emitted in placeholder mode (no blueprint resolution occurs) nor
713
+ * when generation fails (nothing was served).
714
+ */
715
+ readonly onBlueprintResolution?: (event: BlueprintResolutionEvent) => void;
683
716
  /**
684
717
  * Post-success hook. Fires AFTER the render commit for this call
685
718
  * and AFTER the response object is assembled, but BEFORE the handler
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/renders/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAEL,KAAK,iBAAiB,EAEtB,KAAK,YAAY,EAGjB,KAAK,WAAW,EAQjB,MAAM,mBAAmB,CAAC;AAM3B,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EAEd,aAAa,EAEb,WAAW,EACZ,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,aAAa,CAAC;AAOrB,OAAO,EAIL,KAAK,sBAAsB,EAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,uBAAuB,CAAC;AAY/B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAs0D5B"}
@@ -319,7 +319,12 @@ export function createGguiRenderHandler(deps) {
319
319
  // variance verbatim. Reuses the proposed blueprint identity.
320
320
  // - `override.contract` — re-draft the contract (STRICT —
321
321
  // `validateContract` runs below as the commit gate; the server
322
- // does NOT repair it). Cold-gens against the new contract.
322
+ // does NOT repair it). RE-RESOLVES at the effective
323
+ // `(blueprintKey(newContract), variantKey)` exactly as a
324
+ // variance override does — reuse if a row exists there, else
325
+ // cold-gen registered under that key (ggui#1131). An override
326
+ // is a RE-AIM, not a request for a fresh generation;
327
+ // `forceCreate` is the only lever that forces one.
323
328
  // - `override.variance` — re-aim the variant axis while keeping
324
329
  // the agreed contract. Re-resolves the EFFECTIVE
325
330
  // `(contractKey, variantKey)` — reuse if a blueprint exists
@@ -870,9 +875,18 @@ export function createGguiRenderHandler(deps) {
870
875
  // `(blueprintKey(effectiveContract), effectiveVariantKey)`
871
876
  // via the index — reuse if a row exists there, else cold-gen
872
877
  // registered under the new variantKey.
873
- // - `override.contract` — a fresh contract; skip the
874
- // point-read entirely and cold-gen against it (the STRICT
875
- // `validateContract` commit gate already ran above).
878
+ // - `override.contract` — the contract changed (the STRICT
879
+ // `validateContract` commit gate already ran above). The
880
+ // proposed `matchedBlueprint` names a card for the OLD
881
+ // contract, so RE-RESOLVE at the effective
882
+ // `(blueprintKey(effectiveContract), effectiveVariantKey)` —
883
+ // the same index read as a variance override — reuse if a
884
+ // row exists there, else cold-gen registered under that key.
885
+ // ggui#1131: the row's identity table showed sixteen
886
+ // generations paid at one key for a card the index held,
887
+ // each serving unjudged code under the OLD row's id (the
888
+ // registry is first-write-wins). Skipping the index here was
889
+ // the mechanism.
876
890
  //
877
891
  // `blueprintId` equality across two renders therefore genuinely
878
892
  // means the same component was reused (no second, divergent
@@ -883,6 +897,14 @@ export function createGguiRenderHandler(deps) {
883
897
  // resolves to `null` → `blueprintHit` stays null → we fall
884
898
  // through to cold-gen. Never throws. `forceCreate` (agent opted
885
899
  // out after a declined handshake) skips reuse entirely.
900
+ // ggui#1131 (d) — what the resolution observer will be told, decided as the path runs.
901
+ let indexReadAttempted = false;
902
+ let registrationIdentity = 'unregistered';
903
+ const resolutionStrategy = forceCreate
904
+ ? 'force-create'
905
+ : override !== undefined
906
+ ? 'override-reaim'
907
+ : 'proposed';
886
908
  let blueprintHit = null;
887
909
  // Cross-deployment reuse fan-out. The handshake matcher fans out
888
910
  // across pools (decide-handshake.ts), so it can propose reusing a
@@ -960,6 +982,7 @@ export function createGguiRenderHandler(deps) {
960
982
  !forceCreate) {
961
983
  // ACCEPT — effective == proposed; point-read the stored row
962
984
  // (per-app first, then seed pools — see fan-out comment above).
985
+ indexReadAttempted = true;
963
986
  const bp = await readByIdAcrossPools(matched.id);
964
987
  if (bp) {
965
988
  blueprintHit = {
@@ -981,15 +1004,19 @@ export function createGguiRenderHandler(deps) {
981
1004
  };
982
1005
  }
983
1006
  }
984
- else if (override?.variance !== undefined &&
985
- override.contract === undefined &&
1007
+ else if (override !== undefined &&
986
1008
  deps.generation.cache?.index &&
987
1009
  !forceCreate) {
988
- // OVERRIDE.variance — the contract is unchanged but the variant
989
- // axis moved. Re-resolve at the EFFECTIVE
990
- // `(contractKey, effectiveVariantKey)` and reuse a stored
991
- // component for that exact variant if one exists (per-app first,
992
- // then seed pools — see fan-out comment above).
1010
+ // OVERRIDE — the contract and/or the variant axis moved, so the
1011
+ // proposed blueprint no longer names the right component.
1012
+ // Re-resolve at the EFFECTIVE
1013
+ // `(blueprintKey(effectiveContract), effectiveVariantKey)` —
1014
+ // `effectiveContract` already folds in `override.contract` and
1015
+ // `effectiveVariantKey` folds in `override.variance` — and reuse
1016
+ // a stored component at that exact pair if one exists (per-app
1017
+ // first, then seed pools — see fan-out comment above). Both
1018
+ // overrides take this ONE read (ggui#1131).
1019
+ indexReadAttempted = true;
993
1020
  const bp = await findExactAcrossPools(effectiveContractKey, effectiveVariantKey);
994
1021
  if (bp) {
995
1022
  blueprintHit = {
@@ -1014,6 +1041,16 @@ export function createGguiRenderHandler(deps) {
1014
1041
  // at that commit already carries the id (no backfill needed
1015
1042
  // on this path).
1016
1043
  resolvedBlueprintId = blueprintHit.id;
1044
+ emitBlueprintResolution(deps, {
1045
+ scope: 'render',
1046
+ strategy: resolutionStrategy,
1047
+ contractKey: effectiveContractKey,
1048
+ variantKey: effectiveVariantKey,
1049
+ indexRead: 'hit',
1050
+ served: 'stored',
1051
+ blueprintId: blueprintHit.id,
1052
+ identity: 'existing',
1053
+ });
1017
1054
  // Authored source — resolve the body
1018
1055
  // from CodeStore by the row's stored hash, if any. Best-
1019
1056
  // effort: a miss or a read failure commits the reuse render
@@ -1132,43 +1169,50 @@ export function createGguiRenderHandler(deps) {
1132
1169
  // the async closure keeps the narrowing.
1133
1170
  ...(generationCache
1134
1171
  ? {
1135
- resolveBlueprintId: async (produced) => safelyRegisterBlueprint({
1136
- embedding: generationCache.embedding,
1137
- vectorStore: generationCache.vectorStore,
1138
- index: generationCache.index,
1139
- // Forwarded so a fresh mint is written
1140
- // through to durable storage. Undefined on
1141
- // deployments that bound none, which
1142
- // `registerBlueprint` treats as a no-op.
1143
- ...(generationCache.durability !== undefined
1144
- ? { durability: generationCache.durability }
1145
- : {}),
1146
- }, ctx.appId, {
1147
- kind: 'template',
1148
- contract: story.contract,
1149
- intent,
1150
- componentCode: produced.componentCode,
1151
- // Engine provenance from the generator's own
1152
- // metadata stamp — a fresh generation mints
1153
- // an `llm`-sourced row.
1154
- source: produced.source,
1155
- // Authored source — threaded to the registry
1156
- // so cache-reuse renders of this blueprint
1157
- // can serve it too.
1158
- ...(produced.sourceCode !== undefined
1159
- ? { sourceCode: produced.sourceCode }
1160
- : {}),
1161
- // Register under the EFFECTIVE variance
1162
- // (proposed on accept, re-aimed on
1163
- // `override.variance`) so the row's
1164
- // `variantKey` equals `effectiveVariantKey`
1165
- // — the same `(contractKey, variantKey)`
1166
- // identity the §6 re-resolution and the wire
1167
- // output key on.
1168
- ...(effectiveVariance !== undefined
1169
- ? { variance: effectiveVariance }
1170
- : {}),
1171
- }),
1172
+ resolveBlueprintId: async (produced) => {
1173
+ const reg = await safelyRegisterBlueprint({
1174
+ embedding: generationCache.embedding,
1175
+ vectorStore: generationCache.vectorStore,
1176
+ index: generationCache.index,
1177
+ // Forwarded so a fresh mint is written
1178
+ // through to durable storage. Undefined on
1179
+ // deployments that bound none, which
1180
+ // `registerBlueprint` treats as a no-op.
1181
+ ...(generationCache.durability !== undefined
1182
+ ? { durability: generationCache.durability }
1183
+ : {}),
1184
+ }, ctx.appId, {
1185
+ kind: 'template',
1186
+ contract: story.contract,
1187
+ intent,
1188
+ componentCode: produced.componentCode,
1189
+ // Engine provenance from the generator's own
1190
+ // metadata stamp — a fresh generation mints
1191
+ // an `llm`-sourced row.
1192
+ source: produced.source,
1193
+ // Authored source — threaded to the registry
1194
+ // so cache-reuse renders of this blueprint
1195
+ // can serve it too.
1196
+ ...(produced.sourceCode !== undefined
1197
+ ? { sourceCode: produced.sourceCode }
1198
+ : {}),
1199
+ // Register under the EFFECTIVE variance
1200
+ // (proposed on accept, re-aimed on
1201
+ // `override.variance`) so the row's
1202
+ // `variantKey` equals `effectiveVariantKey`
1203
+ // — the same `(contractKey, variantKey)`
1204
+ // identity the §6 re-resolution and the wire
1205
+ // output key on.
1206
+ ...(effectiveVariance !== undefined
1207
+ ? { variance: effectiveVariance }
1208
+ : {}),
1209
+ });
1210
+ // ggui#1131 (d) — the identity is what the registry SAID, never inferred:
1211
+ // a dedup hit means fresh code is about to be served under an id this
1212
+ // render did not mint, and the observer names that as itself.
1213
+ registrationIdentity = reg === undefined ? 'unregistered' : reg.deduped ? 'existing' : 'minted';
1214
+ return reg?.id;
1215
+ },
1172
1216
  }
1173
1217
  : {}),
1174
1218
  ...(runtimeProps !== undefined
@@ -1213,6 +1257,16 @@ export function createGguiRenderHandler(deps) {
1213
1257
  // identity record was written with. No backfill exists.
1214
1258
  if (outcome.ok) {
1215
1259
  resolvedBlueprintId = outcome.blueprintId;
1260
+ emitBlueprintResolution(deps, {
1261
+ scope: 'render',
1262
+ strategy: resolutionStrategy,
1263
+ contractKey: effectiveContractKey,
1264
+ variantKey: effectiveVariantKey,
1265
+ indexRead: indexReadAttempted ? 'miss' : 'skipped',
1266
+ served: 'fresh',
1267
+ ...(outcome.blueprintId !== undefined ? { blueprintId: outcome.blueprintId } : {}),
1268
+ identity: registrationIdentity,
1269
+ });
1216
1270
  }
1217
1271
  }
1218
1272
  }
@@ -2432,6 +2486,18 @@ renderTtlMs, args) {
2432
2486
  await safelyFinalizePreview(previewDeps, args.sessionId, 'handoff');
2433
2487
  return true;
2434
2488
  }
2489
+ /** ggui#1131 (d) — fire the resolution observer without letting it into the render. */
2490
+ function emitBlueprintResolution(deps, event) {
2491
+ if (!deps.onBlueprintResolution)
2492
+ return;
2493
+ try {
2494
+ deps.onBlueprintResolution(event);
2495
+ }
2496
+ catch (err) {
2497
+ // eslint-disable-next-line no-console
2498
+ console.warn(`[ggui_render] onBlueprintResolution observer threw; ignoring: ${err instanceof Error ? err.message : String(err)}`);
2499
+ }
2500
+ }
2435
2501
  /**
2436
2502
  * Wrap {@link registerBlueprint} so a write-side rejection (sqlite
2437
2503
  * disk-full, vector-dim mismatch on a misconfigured index, etc.)
@@ -2440,8 +2506,10 @@ renderTtlMs, args) {
2440
2506
  * committed; the registry write is a performance optimization, not a
2441
2507
  * correctness dependency.
2442
2508
  *
2443
- * Returns the registered blueprint's opaque `bp_<uuid>` id so the
2444
- * cold-gen path can surface it as the render's `blueprintId`. Returns
2509
+ * Returns the registered blueprint's opaque `bp_<uuid>` id — and whether the
2510
+ * registry DEDUPED (the row already existed; ggui#1131 (d)) — so the
2511
+ * cold-gen path can surface the id as the render's `blueprintId` and name
2512
+ * its identity honestly. Returns
2445
2513
  * `undefined` when the best-effort write threw (the render still
2446
2514
  * succeeds; only the future cache-hit optimization + the surfaced id
2447
2515
  * are lost — the wire then carries the empty-id default).
@@ -2449,7 +2517,7 @@ renderTtlMs, args) {
2449
2517
  async function safelyRegisterBlueprint(deps, scope, input) {
2450
2518
  try {
2451
2519
  const registered = await registerBlueprint(deps, scope, input);
2452
- return registered.id;
2520
+ return { id: registered.id, deduped: registered.deduped };
2453
2521
  }
2454
2522
  catch (err) {
2455
2523
  // Best-effort registration — the live render already produced
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ggui-ai/mcp-server-handlers",
3
- "version": "0.18.0",
3
+ "version": "0.20.0",
4
4
  "description": "MCP tool handler logic for the ggui protocol. Pure over @ggui-ai/mcp-server-core seams and consumed by @ggui-ai/mcp-server. Never imports AWS, HTTP transports, or CLI concerns.",
5
5
  "keywords": [
6
6
  "ggui",
@@ -70,18 +70,18 @@
70
70
  "dependencies": {
71
71
  "canonicalize": "^2.0.0",
72
72
  "zod": "^4.3.6",
73
- "@ggui-ai/mcp-server-core": "0.18.0",
74
- "@ggui-ai/negotiator": "0.18.0",
75
- "@ggui-ai/ui-gen": "0.18.0",
76
- "@ggui-ai/protocol": "0.18.0",
77
- "@ggui-ai/ui-registry": "0.18.0"
73
+ "@ggui-ai/negotiator": "0.20.0",
74
+ "@ggui-ai/mcp-server-core": "0.20.0",
75
+ "@ggui-ai/ui-gen": "0.20.0",
76
+ "@ggui-ai/protocol": "0.20.0",
77
+ "@ggui-ai/ui-registry": "0.20.0"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@types/node": "^22.0.0",
81
81
  "typescript": "^5.0.0",
82
82
  "vitest": "^3.2.6",
83
- "@ggui-ai/embedding-local": "0.18.0",
84
- "@ggui-ai/protocol-conformance": "0.18.0"
83
+ "@ggui-ai/embedding-local": "0.20.0",
84
+ "@ggui-ai/protocol-conformance": "0.20.0"
85
85
  },
86
86
  "repository": {
87
87
  "type": "git",