@sentropic/h2a 0.98.7 → 0.98.8-rc.1

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.
Files changed (147) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/dist/cli.d.ts.map +1 -1
  4. package/dist/cli.js +56 -15
  5. package/dist/cli.js.map +1 -1
  6. package/dist/hosts/native-artifacts.d.ts +2 -0
  7. package/dist/hosts/native-artifacts.d.ts.map +1 -1
  8. package/dist/hosts/native-artifacts.js +19 -5
  9. package/dist/hosts/native-artifacts.js.map +1 -1
  10. package/dist/hosts/native-convergence.d.ts +1 -0
  11. package/dist/hosts/native-convergence.d.ts.map +1 -1
  12. package/dist/hosts/native-convergence.js +1 -1
  13. package/dist/hosts/native-convergence.js.map +1 -1
  14. package/dist/hosts/native-skills.d.ts +6 -0
  15. package/dist/hosts/native-skills.d.ts.map +1 -1
  16. package/dist/hosts/native-skills.js +9 -4
  17. package/dist/hosts/native-skills.js.map +1 -1
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +1 -1
  21. package/dist/index.js.map +1 -1
  22. package/dist/runtime/identity/live.d.ts.map +1 -1
  23. package/dist/runtime/identity/live.js +27 -4
  24. package/dist/runtime/identity/live.js.map +1 -1
  25. package/dist/runtime/identity/worker.js +21 -2
  26. package/dist/runtime/identity/worker.js.map +1 -1
  27. package/dist/runtime/local-files/identity-fence.d.ts +1 -0
  28. package/dist/runtime/local-files/identity-fence.d.ts.map +1 -1
  29. package/dist/runtime/local-files/identity-fence.js +14 -3
  30. package/dist/runtime/local-files/identity-fence.js.map +1 -1
  31. package/dist/runtime/local-files/locks.d.ts +16 -9
  32. package/dist/runtime/local-files/locks.d.ts.map +1 -1
  33. package/dist/runtime/local-files/locks.js +238 -42
  34. package/dist/runtime/local-files/locks.js.map +1 -1
  35. package/dist/runtime/local-files/succession-lock.d.ts.map +1 -1
  36. package/dist/runtime/local-files/succession-lock.js +7 -6
  37. package/dist/runtime/local-files/succession-lock.js.map +1 -1
  38. package/dist/runtime/mcp/identity-state.d.ts +2 -0
  39. package/dist/runtime/mcp/identity-state.d.ts.map +1 -1
  40. package/dist/runtime/mcp/identity-state.js +39 -1
  41. package/dist/runtime/mcp/identity-state.js.map +1 -1
  42. package/dist/runtime/mcp/index.d.ts +11 -1
  43. package/dist/runtime/mcp/index.d.ts.map +1 -1
  44. package/dist/runtime/mcp/index.js +10 -0
  45. package/dist/runtime/mcp/index.js.map +1 -1
  46. package/dist/runtime/mcp/server.d.ts +23 -1
  47. package/dist/runtime/mcp/server.d.ts.map +1 -1
  48. package/dist/runtime/mcp/server.js +18 -2
  49. package/dist/runtime/mcp/server.js.map +1 -1
  50. package/dist/runtime/mcp/stdio.d.ts.map +1 -1
  51. package/dist/runtime/mcp/stdio.js +60 -4
  52. package/dist/runtime/mcp/stdio.js.map +1 -1
  53. package/dist/runtime/mcp/tools.d.ts +22 -0
  54. package/dist/runtime/mcp/tools.d.ts.map +1 -1
  55. package/dist/runtime/mcp/tools.js.map +1 -1
  56. package/dist/runtime/mcp/ui-render/a2ui-common-types.d.ts +32 -0
  57. package/dist/runtime/mcp/ui-render/a2ui-common-types.d.ts.map +1 -0
  58. package/dist/runtime/mcp/ui-render/a2ui-common-types.js +374 -0
  59. package/dist/runtime/mcp/ui-render/a2ui-common-types.js.map +1 -0
  60. package/dist/runtime/mcp/ui-render/assets.d.ts +104 -0
  61. package/dist/runtime/mcp/ui-render/assets.d.ts.map +1 -0
  62. package/dist/runtime/mcp/ui-render/assets.js +217 -0
  63. package/dist/runtime/mcp/ui-render/assets.js.map +1 -0
  64. package/dist/runtime/mcp/ui-render/bpmn-port.d.ts +3 -0
  65. package/dist/runtime/mcp/ui-render/bpmn-port.d.ts.map +1 -0
  66. package/dist/runtime/mcp/ui-render/bpmn-port.js +621 -0
  67. package/dist/runtime/mcp/ui-render/bpmn-port.js.map +1 -0
  68. package/dist/runtime/mcp/ui-render/fallback.d.ts +35 -0
  69. package/dist/runtime/mcp/ui-render/fallback.d.ts.map +1 -0
  70. package/dist/runtime/mcp/ui-render/fallback.js +245 -0
  71. package/dist/runtime/mcp/ui-render/fallback.js.map +1 -0
  72. package/dist/runtime/mcp/ui-render/index.d.ts +51 -0
  73. package/dist/runtime/mcp/ui-render/index.d.ts.map +1 -0
  74. package/dist/runtime/mcp/ui-render/index.js +38 -0
  75. package/dist/runtime/mcp/ui-render/index.js.map +1 -0
  76. package/dist/runtime/mcp/ui-render/inline.d.ts +3 -0
  77. package/dist/runtime/mcp/ui-render/inline.d.ts.map +1 -0
  78. package/dist/runtime/mcp/ui-render/inline.js +21 -0
  79. package/dist/runtime/mcp/ui-render/inline.js.map +1 -0
  80. package/dist/runtime/mcp/ui-render/negotiation.d.ts +23 -0
  81. package/dist/runtime/mcp/ui-render/negotiation.d.ts.map +1 -0
  82. package/dist/runtime/mcp/ui-render/negotiation.js +45 -0
  83. package/dist/runtime/mcp/ui-render/negotiation.js.map +1 -0
  84. package/dist/runtime/mcp/ui-render/registry-entry.d.ts +74 -0
  85. package/dist/runtime/mcp/ui-render/registry-entry.d.ts.map +1 -0
  86. package/dist/runtime/mcp/ui-render/registry-entry.js +207 -0
  87. package/dist/runtime/mcp/ui-render/registry-entry.js.map +1 -0
  88. package/dist/runtime/mcp/ui-render/resources.d.ts +35 -0
  89. package/dist/runtime/mcp/ui-render/resources.d.ts.map +1 -0
  90. package/dist/runtime/mcp/ui-render/resources.js +342 -0
  91. package/dist/runtime/mcp/ui-render/resources.js.map +1 -0
  92. package/dist/runtime/mcp/ui-render/tools.d.ts +42 -0
  93. package/dist/runtime/mcp/ui-render/tools.d.ts.map +1 -0
  94. package/dist/runtime/mcp/ui-render/tools.js +367 -0
  95. package/dist/runtime/mcp/ui-render/tools.js.map +1 -0
  96. package/dist/runtime/mcp/ui-render/types.d.ts +96 -0
  97. package/dist/runtime/mcp/ui-render/types.d.ts.map +1 -0
  98. package/dist/runtime/mcp/ui-render/types.js +22 -0
  99. package/dist/runtime/mcp/ui-render/types.js.map +1 -0
  100. package/dist/runtime/mcp/ui-render/validation.d.ts +151 -0
  101. package/dist/runtime/mcp/ui-render/validation.d.ts.map +1 -0
  102. package/dist/runtime/mcp/ui-render/validation.js +460 -0
  103. package/dist/runtime/mcp/ui-render/validation.js.map +1 -0
  104. package/dist/runtime/mcp/ui-render/watermark.d.ts +38 -0
  105. package/dist/runtime/mcp/ui-render/watermark.d.ts.map +1 -0
  106. package/dist/runtime/mcp/ui-render/watermark.js +52 -0
  107. package/dist/runtime/mcp/ui-render/watermark.js.map +1 -0
  108. package/dist/runtime/mcp-central.d.ts.map +1 -1
  109. package/dist/runtime/mcp-central.js +55 -6
  110. package/dist/runtime/mcp-central.js.map +1 -1
  111. package/fixtures/ui-render-ac-l3/offline-measurement.v1.json +105 -0
  112. package/package.json +8 -5
  113. package/vendor/design-system-elements/catalog.json +1234 -0
  114. package/vendor/design-system-elements/dist/browser/assets/bpmn-CZlEAdL6.ttf +0 -0
  115. package/vendor/design-system-elements/dist/browser/assets/bpmn-DaGVGZ7K.woff +0 -0
  116. package/vendor/design-system-elements/dist/browser/assets/bpmn-DaJ2be00.woff2 +0 -0
  117. package/vendor/design-system-elements/dist/browser/chunks/BpmnRenderUtil-WMCgqGDs.js +1 -0
  118. package/vendor/design-system-elements/dist/browser/chunks/BpmnUpdater-C-UNbzXl.js +1 -0
  119. package/vendor/design-system-elements/dist/browser/chunks/LabelUtil-7QpE43Ed.js +1 -0
  120. package/vendor/design-system-elements/dist/browser/chunks/LayoutUtil-hAMJmJFU.js +1 -0
  121. package/vendor/design-system-elements/dist/browser/chunks/ModelUtil-CMh7LuN4.js +1 -0
  122. package/vendor/design-system-elements/dist/browser/chunks/Modeler-BfAmwsmK.js +389 -0
  123. package/vendor/design-system-elements/dist/browser/chunks/Viewer-eYLzc3fD.js +4 -0
  124. package/vendor/design-system-elements/dist/browser/chunks/bpmn-canvas-DeAWdJFy.js +2207 -0
  125. package/vendor/design-system-elements/dist/browser/chunks/colored-CSIQaGsQ.js +1 -0
  126. package/vendor/design-system-elements/dist/browser/chunks/dist-Co2MgHWm.js +1 -0
  127. package/vendor/design-system-elements/dist/browser/chunks/dist-O6_2ByYB.js +1 -0
  128. package/vendor/design-system-elements/dist/browser/chunks/dist-kvAYI1vo.js +1 -0
  129. package/vendor/design-system-elements/dist/browser/chunks/entropic-CM5BHERN.js +2173 -0
  130. package/vendor/design-system-elements/dist/browser/chunks/focus-renderer-C4z8aS9F.js +8 -0
  131. package/vendor/design-system-elements/dist/browser/chunks/forge-B8hrW4lA.js +2173 -0
  132. package/vendor/design-system-elements/dist/browser/chunks/layout-q0TR9-aY.js +1 -0
  133. package/vendor/design-system-elements/dist/browser/chunks/legend-CXdfCBh6.js +1 -0
  134. package/vendor/design-system-elements/dist/browser/chunks/textMetrics-BrMS6-sA.js +2 -0
  135. package/vendor/design-system-elements/dist/browser/chunks/tokens-DFPpCvf1.js +1 -0
  136. package/vendor/design-system-elements/dist/browser/elements.js +2221 -0
  137. package/vendor/design-system-elements/dist/browser/sri.json +166 -0
  138. package/vendor/design-system-elements/envelope.json +43 -0
  139. package/vendor/design-system-elements/manifest.json +101 -0
  140. package/vendor/design-system-elements/schemas/BarChart.v1.json +556 -0
  141. package/vendor/design-system-elements/schemas/BpmnCanvas.v1.json +139 -0
  142. package/vendor/design-system-elements/schemas/DecisionDossier.v1.json +635 -0
  143. package/vendor/ui-render-inline/BarChart.js +1 -0
  144. package/vendor/ui-render-inline/BpmnCanvas.js +1 -0
  145. package/vendor/ui-render-inline/DecisionDossier.js +1 -0
  146. package/vendor/ui-render-inline/manifest.json +80 -0
  147. package/vendor/ui-render-inline/render.js +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fallback.js","sourceRoot":"","sources":["../../../../src/runtime/mcp/ui-render/fallback.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAA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ope validator, the `ui://` resource
4
+ * handlers and the render tool surface so an MCP transport can compose them
5
+ * behind one seam. The load is synchronous on purpose — the transports
6
+ * compose the module inside their own synchronous boot (the stdio readiness
7
+ * ACK is on disk before `runMcpStdio` returns) and `resources/read` is a
8
+ * synchronous handler. A transport whose load fails (e.g. an
9
+ * `integrity_mismatch`) degrades to a server without the ui:// resource and
10
+ * tool surface rather than failing whole (§7.2).
11
+ */
12
+ import { type UiRenderAssets } from "./assets.js";
13
+ import { type UiRenderValidator } from "./validation.js";
14
+ import { type UiRenderResources } from "./resources.js";
15
+ import { type UiRenderIntentConsumer, type UiRenderTools } from "./tools.js";
16
+ /** Options of `createUiRenderModule`. */
17
+ export interface CreateUiRenderModuleOptions {
18
+ /**
19
+ * A pre-verified asset set; when omitted the module loads and verifies the
20
+ * vendored snapshot itself (`loadUiRenderAssetsSync`).
21
+ */
22
+ readonly assets?: UiRenderAssets;
23
+ /**
24
+ * The environment the resource builder reads (theme, locale, watermark
25
+ * gate); defaults to `process.env` (live reference).
26
+ */
27
+ readonly env?: Record<string, string | undefined>;
28
+ /**
29
+ * The server-configured intent consumer `submit_intent` forwards to (DS
30
+ * spec §8.2 & §11.2 criterion 4); the future decision-inject seam.
31
+ */
32
+ readonly onIntent?: UiRenderIntentConsumer;
33
+ /**
34
+ * The envelope-echo threshold of `render` (§5.2); defaults to the h2a
35
+ * frame ceiling minus 16 KiB until L3.5 fixes it from host measurement.
36
+ */
37
+ readonly inlineLimitBytes?: number;
38
+ }
39
+ /** The composed ui:// render module served behind the MCP transports. */
40
+ export interface UiRenderModule {
41
+ readonly assets: UiRenderAssets;
42
+ readonly validator: UiRenderValidator;
43
+ readonly resources: UiRenderResources;
44
+ readonly tools: UiRenderTools;
45
+ }
46
+ /**
47
+ * Loads and verifies the vendored DS elements build (unless `assets` is
48
+ * supplied) and binds the validator, resource handlers and tools to it.
49
+ */
50
+ export declare function createUiRenderModule(options?: CreateUiRenderModuleOptions): UiRenderModule;
51
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/runtime/mcp/ui-render/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAA0B,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAA2B,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EACnB,MAAM,YAAY,CAAC;AAEpB,yCAAyC;AACzC,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IAClD;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAC3C;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACpC;AAED,yEAAyE;AACzE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAC;IACtC,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,CAAC,EAAE,2BAA2B,GACpC,cAAc,CAkBhB"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * The ui:// render module composition root (h2a spec §4.2, §7.2): binds the
3
+ * verified asset set to the envelope validator, the `ui://` resource
4
+ * handlers and the render tool surface so an MCP transport can compose them
5
+ * behind one seam. The load is synchronous on purpose — the transports
6
+ * compose the module inside their own synchronous boot (the stdio readiness
7
+ * ACK is on disk before `runMcpStdio` returns) and `resources/read` is a
8
+ * synchronous handler. A transport whose load fails (e.g. an
9
+ * `integrity_mismatch`) degrades to a server without the ui:// resource and
10
+ * tool surface rather than failing whole (§7.2).
11
+ */
12
+ import { loadUiRenderAssetsSync } from "./assets.js";
13
+ import { createUiRenderValidator } from "./validation.js";
14
+ import { createUiRenderResources } from "./resources.js";
15
+ import { createUiRenderTools } from "./tools.js";
16
+ /**
17
+ * Loads and verifies the vendored DS elements build (unless `assets` is
18
+ * supplied) and binds the validator, resource handlers and tools to it.
19
+ */
20
+ export function createUiRenderModule(options) {
21
+ const assets = options?.assets ?? loadUiRenderAssetsSync();
22
+ const validator = createUiRenderValidator({ assets });
23
+ const resourceOptions = options?.env !== undefined ? { assets, env: options.env } : { assets };
24
+ return {
25
+ assets,
26
+ validator,
27
+ resources: createUiRenderResources(resourceOptions),
28
+ tools: createUiRenderTools({
29
+ assets,
30
+ validator,
31
+ ...(options?.onIntent !== undefined ? { onIntent: options.onIntent } : {}),
32
+ ...(options?.inlineLimitBytes !== undefined
33
+ ? { inlineLimitBytes: options.inlineLimitBytes }
34
+ : {})
35
+ })
36
+ };
37
+ }
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/runtime/mcp/ui-render/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,sBAAsB,EAAuB,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAA0B,MAAM,iBAAiB,CAAC;AAClF,OAAO,EACL,uBAAuB,EAGxB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,mBAAmB,EAGpB,MAAM,YAAY,CAAC;AAkCpB;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAAqC;IAErC,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,IAAI,sBAAsB,EAAE,CAAC;IAC3D,MAAM,SAAS,GAAG,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IACtD,MAAM,eAAe,GACnB,OAAO,EAAE,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;IACzE,OAAO;QACL,MAAM;QACN,SAAS;QACT,SAAS,EAAE,uBAAuB,CAAC,eAAe,CAAC;QACnD,KAAK,EAAE,mBAAmB,CAAC;YACzB,MAAM;YACN,SAAS;YACT,GAAG,CAAC,OAAO,EAAE,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC1E,GAAG,CAAC,OAAO,EAAE,gBAAgB,KAAK,SAAS;gBACzC,CAAC,CAAC,EAAE,gBAAgB,EAAE,OAAO,CAAC,gBAAgB,EAAE;gBAChD,CAAC,CAAC,EAAE,CAAC;SACR,CAAC;KACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { UiRenderAssets } from "./assets.js";
2
+ export declare function readInlineModule(assets: UiRenderAssets, component?: string): string;
3
+ //# sourceMappingURL=inline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline.d.ts","sourceRoot":"","sources":["../../../../src/runtime/mcp/ui-render/inline.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAKlD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,cAAc,EAAE,SAAS,SAAW,GAAG,MAAM,CAiBrF"}
@@ -0,0 +1,21 @@
1
+ /** Verified, reproducible single-module derivatives of DS cc29be88 (§8.3). */
2
+ import { createHash } from "node:crypto";
3
+ import { readFileSync } from "node:fs";
4
+ const INLINE_DIR = new URL("../../../../vendor/ui-render-inline/", import.meta.url);
5
+ const sha256 = (text) => createHash("sha256").update(text).digest("hex");
6
+ export function readInlineModule(assets, component = "render") {
7
+ if (!["render", "BarChart", "BpmnCanvas", "DecisionDossier"].includes(component)) {
8
+ throw new Error("integrity_mismatch: unknown inline entry");
9
+ }
10
+ const manifest = JSON.parse(readFileSync(new URL("manifest.json", INLINE_DIR), "utf8"));
11
+ if (manifest.sourceManifestSha256 !== sha256(JSON.stringify(assets.manifest))) {
12
+ throw new Error("integrity_mismatch: inline entry source manifest");
13
+ }
14
+ const file = `${component}.js`;
15
+ const text = readFileSync(new URL(file, INLINE_DIR), "utf8");
16
+ if (sha256(text) !== manifest.files[file]?.sha256) {
17
+ throw new Error(`integrity_mismatch: inline entry ${component}`);
18
+ }
19
+ return text;
20
+ }
21
+ //# sourceMappingURL=inline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline.js","sourceRoot":"","sources":["../../../../src/runtime/mcp/ui-render/inline.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,sCAAsC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACpF,MAAM,MAAM,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAEzF,MAAM,UAAU,gBAAgB,CAAC,MAAsB,EAAE,SAAS,GAAG,QAAQ;IAC3E,IAAI,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,iBAAiB,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QACjF,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;IACD,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,GAAG,CAAC,eAAe,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,CAGrF,CAAC;IACF,IAAI,QAAQ,CAAC,oBAAoB,KAAK,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;QAC9E,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IACtE,CAAC;IACD,MAAM,IAAI,GAAG,GAAG,SAAS,KAAK,CAAC;IAC/B,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,CAAC;IAC7D,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAClD,MAAM,IAAI,KAAK,CAAC,oCAAoC,SAAS,EAAE,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * SEP-1865 UI extension negotiation (h2a spec §2.1; DS spec §8.1): a client
3
+ * has negotiated `io.modelcontextprotocol/ui` if and only if its `initialize`
4
+ * params advertise a non-null `capabilities.extensions["io.modelcontextprotocol/ui"]`
5
+ * object whose `mimeTypes` array contains the MCP App resource mime type.
6
+ * The server ALWAYS advertises the extension back so hosts probing server
7
+ * support discover it, while recording `negotiated` per session so `render`
8
+ * emits the non-UI fallback alongside `structuredContent` when the client
9
+ * did not negotiate it.
10
+ */
11
+ import { type UiExtensionCapability } from "./types.js";
12
+ /** The capability every h2a MCP `initialize` response advertises (§2.1.3). */
13
+ export declare const serverUiExtensionCapability: Readonly<{
14
+ mimeTypes: readonly string[];
15
+ }>;
16
+ /**
17
+ * Negotiates the SEP-1865 UI capability from one connection's `initialize`
18
+ * params: `negotiated === true` only for a non-null ui extension object
19
+ * advertising `text/html;profile=mcp-app`; the served mime types stay the
20
+ * closed one-element list either way.
21
+ */
22
+ export declare function negotiateUiExtension(params: unknown): UiExtensionCapability;
23
+ //# sourceMappingURL=negotiation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"negotiation.d.ts","sourceRoot":"","sources":["../../../../src/runtime/mcp/ui-render/negotiation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAgB,KAAK,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEtE,8EAA8E;AAC9E,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC;IAAE,SAAS,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAElF,CAAC;AAYF;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,qBAAqB,CAU3E"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * SEP-1865 UI extension negotiation (h2a spec §2.1; DS spec §8.1): a client
3
+ * has negotiated `io.modelcontextprotocol/ui` if and only if its `initialize`
4
+ * params advertise a non-null `capabilities.extensions["io.modelcontextprotocol/ui"]`
5
+ * object whose `mimeTypes` array contains the MCP App resource mime type.
6
+ * The server ALWAYS advertises the extension back so hosts probing server
7
+ * support discover it, while recording `negotiated` per session so `render`
8
+ * emits the non-UI fallback alongside `structuredContent` when the client
9
+ * did not negotiate it.
10
+ */
11
+ import { UI_MIME_TYPE } from "./types.js";
12
+ /** The capability every h2a MCP `initialize` response advertises (§2.1.3). */
13
+ export const serverUiExtensionCapability = {
14
+ mimeTypes: [UI_MIME_TYPE]
15
+ };
16
+ /** Reads the client's advertised ui extension, if any, from initialize params. */
17
+ function clientUiExtension(params) {
18
+ if (params === null || typeof params !== "object")
19
+ return undefined;
20
+ const capabilities = params.capabilities;
21
+ if (capabilities === null || typeof capabilities !== "object")
22
+ return undefined;
23
+ const extensions = capabilities.extensions;
24
+ if (extensions === null || typeof extensions !== "object")
25
+ return undefined;
26
+ return extensions["io.modelcontextprotocol/ui"];
27
+ }
28
+ /**
29
+ * Negotiates the SEP-1865 UI capability from one connection's `initialize`
30
+ * params: `negotiated === true` only for a non-null ui extension object
31
+ * advertising `text/html;profile=mcp-app`; the served mime types stay the
32
+ * closed one-element list either way.
33
+ */
34
+ export function negotiateUiExtension(params) {
35
+ const extension = clientUiExtension(params);
36
+ if (extension === null || typeof extension !== "object") {
37
+ return { negotiated: false, mimeTypes: [] };
38
+ }
39
+ const mimeTypes = extension.mimeTypes;
40
+ if (!Array.isArray(mimeTypes) || !mimeTypes.includes(UI_MIME_TYPE)) {
41
+ return { negotiated: false, mimeTypes: [] };
42
+ }
43
+ return { negotiated: true, mimeTypes: [UI_MIME_TYPE] };
44
+ }
45
+ //# sourceMappingURL=negotiation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"negotiation.js","sourceRoot":"","sources":["../../../../src/runtime/mcp/ui-render/negotiation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,YAAY,EAA8B,MAAM,YAAY,CAAC;AAEtE,8EAA8E;AAC9E,MAAM,CAAC,MAAM,2BAA2B,GAA+C;IACrF,SAAS,EAAE,CAAC,YAAY,CAAC;CAC1B,CAAC;AAEF,kFAAkF;AAClF,SAAS,iBAAiB,CAAC,MAAe;IACxC,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IACpE,MAAM,YAAY,GAAI,MAAqC,CAAC,YAAY,CAAC;IACzE,IAAI,YAAY,KAAK,IAAI,IAAI,OAAO,YAAY,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAChF,MAAM,UAAU,GAAI,YAAyC,CAAC,UAAU,CAAC;IACzE,IAAI,UAAU,KAAK,IAAI,IAAI,OAAO,UAAU,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAC5E,OAAQ,UAAsC,CAAC,4BAA4B,CAAC,CAAC;AAC/E,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAe;IAClD,MAAM,SAAS,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAC5C,IAAI,SAAS,KAAK,IAAI,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;QACxD,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;IAC9C,CAAC;IACD,MAAM,SAAS,GAAI,SAAqC,CAAC,SAAS,CAAC;IACnE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;QACnE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;IAC9C,CAAC;IACD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC;AACzD,CAAC"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * The cluster-mesh registry seam (h2a spec §8.3): the normative
3
+ * `sentropic.ui-render` RegistryEntry descriptor and its
4
+ * AppMcpProviderManifest, exported from the ui-render module. The
5
+ * registry path the spec names — `@sentropic/cluster-mesh/mcp/registry`
6
+ * (`createMcpRegistry`) reached through `packages/h2a/src/registry/` —
7
+ * is not on main (cluster-mesh 0.16.0 has no mcp/registry export), so
8
+ * this module is the seam: PR #354 wires these values into
9
+ * `packages/h2a/registry/entries.v1.json` (entries[1]) and
10
+ * `sentropic-daemon.ts` verbatim, without re-deriving anything. The
11
+ * entry is 100% read-only (`readOnly: true`, `mutability:
12
+ * "read-only"`, `mutatesExternalSystem: false`), so it stays admissible
13
+ * in both the `shared-central` and `hosted-read-only` profiles.
14
+ */
15
+ /** The render mode of the pilot shell (§8.3.2 parameters enum). */
16
+ export type UiRenderMode = "pilot-inline" | "pilot-per-component" | "cdn-sri";
17
+ /** All render modes in declaration order (§8.3.2). */
18
+ export declare const UI_RENDER_MODES: readonly UiRenderMode[];
19
+ /** The provider id of the ui-render module in the cluster-mesh MCP registry. */
20
+ export declare const UI_RENDER_PROVIDER_ID = "sentropic.ui-render";
21
+ /** The connector id the ui-render provider is dispatched under (§8.3.2). */
22
+ export declare const UI_RENDER_CONNECTOR_ID = "h2a-ui-render";
23
+ /** The registry-relative path of the provider manifest asset (§8.3.2). */
24
+ export declare const UI_RENDER_MANIFEST_ASSET_PATH = "registry/manifest.ui-render.json";
25
+ /** A cluster-mesh CapabilityResource descriptor for one pinned URI. */
26
+ export interface UiRenderCapabilityResource {
27
+ readonly uri: string;
28
+ readonly name: string;
29
+ readonly description: string;
30
+ readonly mutability: "read-only";
31
+ readonly mutatesExternalSystem: false;
32
+ readonly idempotency: {
33
+ readonly required: false;
34
+ };
35
+ readonly _meta?: Readonly<Record<string, unknown>>;
36
+ }
37
+ /** A read-only CapabilityTool descriptor of the ui-render provider. */
38
+ export interface UiRenderCapabilityTool {
39
+ readonly name: string;
40
+ readonly readOnly: true;
41
+ }
42
+ /** The AppMcpProviderManifest of `sentropic.ui-render` (§8.3.3). */
43
+ export interface UiRenderProviderManifest {
44
+ readonly providerId: string;
45
+ readonly appId: string;
46
+ readonly connectorIds: readonly string[];
47
+ readonly resources: readonly UiRenderCapabilityResource[];
48
+ readonly tools: readonly UiRenderCapabilityTool[];
49
+ }
50
+ /**
51
+ * The tool set one mode exposes: the default profile
52
+ * (`list_components`, `get_schema`, `render`, `submit_intent`), plus the
53
+ * `render_<id>` tools when the mode is `pilot-per-component` (§8.3.3).
54
+ */
55
+ export declare function uiRenderToolNamesForMode(mode: UiRenderMode): readonly string[];
56
+ /**
57
+ * The AppMcpProviderManifest of `sentropic.ui-render` for one mode:
58
+ * read-only resources and tools, never mutating, never holding tenant
59
+ * secrets, and never requiring a signing key (§8.5).
60
+ */
61
+ export declare function uiRenderProviderManifest(mode?: UiRenderMode): UiRenderProviderManifest;
62
+ /**
63
+ * The canonical bytes of the manifest asset file: 2-space JSON plus a
64
+ * trailing newline. The registry sync script (PR #354) re-pins the
65
+ * sha256 of these bytes into `entries.v1.json` when it materializes
66
+ * `packages/h2a/registry/manifest.ui-render.json`; computing it here
67
+ * keeps the entry honest until that script lands on main.
68
+ */
69
+ export declare function uiRenderManifestAssetJson(mode?: UiRenderMode): string;
70
+ /** The sha256 of the canonical manifest asset bytes for one mode. */
71
+ export declare function uiRenderManifestAssetSha256(mode?: UiRenderMode): string;
72
+ /** The normative RegistryEntry descriptor (h2a spec §8.3.2, frozen). */
73
+ export declare const UI_RENDER_REGISTRY_ENTRY: Readonly<Record<string, unknown>>;
74
+ //# sourceMappingURL=registry-entry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry-entry.d.ts","sourceRoot":"","sources":["../../../../src/runtime/mcp/ui-render/registry-entry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH,mEAAmE;AACnE,MAAM,MAAM,YAAY,GAAG,cAAc,GAAG,qBAAqB,GAAG,SAAS,CAAC;AAE9E,sDAAsD;AACtD,eAAO,MAAM,eAAe,EAAE,SAAS,YAAY,EAIlD,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,wBAAwB,CAAC;AAE3D,4EAA4E;AAC5E,eAAO,MAAM,sBAAsB,kBAAkB,CAAC;AAEtD,0EAA0E;AAC1E,eAAO,MAAM,6BAA6B,qCAAqC,CAAC;AAchF,uEAAuE;AACvE,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC;IACjC,QAAQ,CAAC,qBAAqB,EAAE,KAAK,CAAC;IACtC,QAAQ,CAAC,WAAW,EAAE;QAAE,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAA;KAAE,CAAC;IACnD,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACpD;AAED,uEAAuE;AACvE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;CACzB;AAED,oEAAoE;AACpE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,SAAS,EAAE,SAAS,0BAA0B,EAAE,CAAC;IAC1D,QAAQ,CAAC,KAAK,EAAE,SAAS,sBAAsB,EAAE,CAAC;CACnD;AAsBD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,MAAM,EAAE,CAG9E;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,GAAE,YAA6B,GAAG,wBAAwB,CAqBtG;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,GAAE,YAA6B,GAAG,MAAM,CAErF;AAED,qEAAqE;AACrE,wBAAgB,2BAA2B,CAAC,IAAI,GAAE,YAA6B,GAAG,MAAM,CAEvF;AAED,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAoGrE,CAAC"}
@@ -0,0 +1,207 @@
1
+ /**
2
+ * The cluster-mesh registry seam (h2a spec §8.3): the normative
3
+ * `sentropic.ui-render` RegistryEntry descriptor and its
4
+ * AppMcpProviderManifest, exported from the ui-render module. The
5
+ * registry path the spec names — `@sentropic/cluster-mesh/mcp/registry`
6
+ * (`createMcpRegistry`) reached through `packages/h2a/src/registry/` —
7
+ * is not on main (cluster-mesh 0.16.0 has no mcp/registry export), so
8
+ * this module is the seam: PR #354 wires these values into
9
+ * `packages/h2a/registry/entries.v1.json` (entries[1]) and
10
+ * `sentropic-daemon.ts` verbatim, without re-deriving anything. The
11
+ * entry is 100% read-only (`readOnly: true`, `mutability:
12
+ * "read-only"`, `mutatesExternalSystem: false`), so it stays admissible
13
+ * in both the `shared-central` and `hosted-read-only` profiles.
14
+ */
15
+ import { createHash } from "node:crypto";
16
+ import { UI_RENDER_TOOL_NAMES } from "./tools.js";
17
+ import { PILOT_RESOURCE_DOMAIN } from "./types.js";
18
+ /** All render modes in declaration order (§8.3.2). */
19
+ export const UI_RENDER_MODES = [
20
+ "pilot-inline",
21
+ "pilot-per-component",
22
+ "cdn-sri"
23
+ ];
24
+ /** The provider id of the ui-render module in the cluster-mesh MCP registry. */
25
+ export const UI_RENDER_PROVIDER_ID = "sentropic.ui-render";
26
+ /** The connector id the ui-render provider is dispatched under (§8.3.2). */
27
+ export const UI_RENDER_CONNECTOR_ID = "h2a-ui-render";
28
+ /** The registry-relative path of the provider manifest asset (§8.3.2). */
29
+ export const UI_RENDER_MANIFEST_ASSET_PATH = "registry/manifest.ui-render.json";
30
+ /** The five pinned resource URIs, in list order (§3). */
31
+ const RESOURCE_URIS = [
32
+ "ui://sentropic/render/v1",
33
+ "a2ui://sentropic/catalog/v1",
34
+ "ui://sentropic/BarChart/v1",
35
+ "ui://sentropic/BpmnCanvas/v1",
36
+ "ui://sentropic/DecisionDossier/v1"
37
+ ];
38
+ /** The pilot CSP declaration the shell resource carries (DS §6.4 U-12). */
39
+ const PILOT_CSP = { resourceDomains: [PILOT_RESOURCE_DOMAIN], connectDomains: [] };
40
+ /** The pinned resource names (§3.1/§3.2 and the per-component shells). */
41
+ const RESOURCE_NAMES = {
42
+ "ui://sentropic/render/v1": "Sentropic Design-System JSON Renderer (v1)",
43
+ "a2ui://sentropic/catalog/v1": "Sentropic Design-System Elements Catalogue (v1)",
44
+ "ui://sentropic/BarChart/v1": "Sentropic BarChart Component Shell (v1)",
45
+ "ui://sentropic/BpmnCanvas/v1": "Sentropic BpmnCanvas Component Shell (v1)",
46
+ "ui://sentropic/DecisionDossier/v1": "Sentropic DecisionDossier Component Shell (v1)"
47
+ };
48
+ /** The pinned resource descriptions (§3). */
49
+ const RESOURCE_DESCRIPTIONS = {
50
+ "ui://sentropic/render/v1": "Sandboxed SEP-1865 MCP App shell hosting @sentropic/design-system-elements.",
51
+ "a2ui://sentropic/catalog/v1": "Machine-readable JSON Schema 2020-12 component catalogue of the design system.",
52
+ "ui://sentropic/BarChart/v1": "Per-component MCP App shell mounting <st-bar-chart>.",
53
+ "ui://sentropic/BpmnCanvas/v1": "Per-component MCP App shell mounting <st-bpmn-canvas>.",
54
+ "ui://sentropic/DecisionDossier/v1": "Per-component MCP App shell mounting <st-decision-dossier>."
55
+ };
56
+ /**
57
+ * The tool set one mode exposes: the default profile
58
+ * (`list_components`, `get_schema`, `render`, `submit_intent`), plus the
59
+ * `render_<id>` tools when the mode is `pilot-per-component` (§8.3.3).
60
+ */
61
+ export function uiRenderToolNamesForMode(mode) {
62
+ const base = ["list_components", "get_schema", "render", "submit_intent"];
63
+ return mode === "pilot-per-component" ? [...UI_RENDER_TOOL_NAMES].sort() : base;
64
+ }
65
+ /**
66
+ * The AppMcpProviderManifest of `sentropic.ui-render` for one mode:
67
+ * read-only resources and tools, never mutating, never holding tenant
68
+ * secrets, and never requiring a signing key (§8.5).
69
+ */
70
+ export function uiRenderProviderManifest(mode = "pilot-inline") {
71
+ const resources = RESOURCE_URIS.map((uri) => ({
72
+ uri,
73
+ name: RESOURCE_NAMES[uri],
74
+ description: RESOURCE_DESCRIPTIONS[uri],
75
+ mutability: "read-only",
76
+ mutatesExternalSystem: false,
77
+ idempotency: { required: false },
78
+ ...(uri === "ui://sentropic/render/v1" ? { _meta: { ui: { csp: PILOT_CSP } } } : {})
79
+ }));
80
+ const tools = uiRenderToolNamesForMode(mode).map((name) => ({
81
+ name,
82
+ readOnly: true
83
+ }));
84
+ return Object.freeze({
85
+ providerId: UI_RENDER_PROVIDER_ID,
86
+ appId: "@sentropic/h2a",
87
+ connectorIds: Object.freeze([UI_RENDER_CONNECTOR_ID]),
88
+ resources: Object.freeze(resources),
89
+ tools: Object.freeze(tools)
90
+ });
91
+ }
92
+ /**
93
+ * The canonical bytes of the manifest asset file: 2-space JSON plus a
94
+ * trailing newline. The registry sync script (PR #354) re-pins the
95
+ * sha256 of these bytes into `entries.v1.json` when it materializes
96
+ * `packages/h2a/registry/manifest.ui-render.json`; computing it here
97
+ * keeps the entry honest until that script lands on main.
98
+ */
99
+ export function uiRenderManifestAssetJson(mode = "pilot-inline") {
100
+ return `${JSON.stringify(uiRenderProviderManifest(mode), null, 2)}\n`;
101
+ }
102
+ /** The sha256 of the canonical manifest asset bytes for one mode. */
103
+ export function uiRenderManifestAssetSha256(mode = "pilot-inline") {
104
+ return createHash("sha256").update(uiRenderManifestAssetJson(mode), "utf8").digest("hex");
105
+ }
106
+ /** The normative RegistryEntry descriptor (h2a spec §8.3.2, frozen). */
107
+ export const UI_RENDER_REGISTRY_ENTRY = Object.freeze({
108
+ format: "sentropic.registry-entry/v1",
109
+ contractVersion: "1.1.4",
110
+ kind: "mcp",
111
+ id: UI_RENDER_PROVIDER_ID,
112
+ name: "ui-render",
113
+ description: "Design-system JSON_RENDER MCP module (ui://sentropic/render/v1): component catalogue, " +
114
+ "standalone JSON schemas, 9-step envelope validation, and sandboxed SEP-1865 MCP App rendering.",
115
+ entryVersion: "1.0.0",
116
+ publisher: Object.freeze({
117
+ packageName: "@sentropic/h2a",
118
+ packageVersion: "0.98.7"
119
+ }),
120
+ compatibility: Object.freeze({
121
+ entryContract: "1.1.4",
122
+ packages: Object.freeze([Object.freeze({ name: "@sentropic/focus", range: "0.5.0" })]),
123
+ schemaProfiles: Object.freeze(["sentropic.parameters/2020-12-bounded-v1"]),
124
+ requiredHostFeatures: Object.freeze(["stdio"]),
125
+ optionalHostFeatures: Object.freeze(["streamable-http", "mcp-app-ui"])
126
+ }),
127
+ parameters: Object.freeze({
128
+ schemaVersion: "1.0.0",
129
+ schema: Object.freeze({
130
+ $schema: "https://json-schema.org/draft/2020-12/schema",
131
+ $id: "urn:sentropic:registry:parameters:sentropic.ui-render:1.0.0",
132
+ type: "object",
133
+ additionalProperties: false,
134
+ required: Object.freeze(["mode"]),
135
+ properties: Object.freeze({
136
+ mode: Object.freeze({
137
+ enum: Object.freeze([...UI_RENDER_MODES])
138
+ })
139
+ })
140
+ }),
141
+ defaults: Object.freeze({ mode: "pilot-inline" })
142
+ }),
143
+ bindings: Object.freeze([]),
144
+ assets: Object.freeze([
145
+ Object.freeze({
146
+ role: "manifest",
147
+ path: UI_RENDER_MANIFEST_ASSET_PATH,
148
+ mediaType: "application/json",
149
+ sha256: uiRenderManifestAssetSha256("pilot-inline")
150
+ }),
151
+ Object.freeze({
152
+ role: "catalog-schema",
153
+ path: "vendor/design-system-elements/catalog.json",
154
+ mediaType: "application/schema+json",
155
+ sha256: "f2358a8f96cdf28949d1b17f7c29c287201efb53c6b8ba709b4a27165206a36c"
156
+ }),
157
+ Object.freeze({
158
+ role: "envelope-schema",
159
+ path: "vendor/design-system-elements/envelope.json",
160
+ mediaType: "application/schema+json",
161
+ sha256: "6bf3351ba45c90a0dd3b40a7e7eddf019e72379a4551acc07a89f4436fc6cf2e"
162
+ })
163
+ ]),
164
+ mcp: Object.freeze({
165
+ manifestAsset: UI_RENDER_MANIFEST_ASSET_PATH,
166
+ connectorIds: Object.freeze([UI_RENDER_CONNECTOR_ID]),
167
+ transportProfiles: Object.freeze([
168
+ Object.freeze({
169
+ id: "shared-central-stdio",
170
+ mode: "in-process",
171
+ protocolVersions: Object.freeze(["2025-06-18"]),
172
+ requiredHostFeatures: Object.freeze(["stdio"])
173
+ }),
174
+ Object.freeze({
175
+ id: "hosted-read-only-http",
176
+ mode: "streamable-http",
177
+ protocolVersions: Object.freeze(["2025-06-18"]),
178
+ requiredHostFeatures: Object.freeze(["streamable-http"])
179
+ })
180
+ ]),
181
+ protocolVersions: Object.freeze(["2025-06-18"]),
182
+ capabilityProfiles: Object.freeze([
183
+ Object.freeze({
184
+ id: "default",
185
+ tools: Object.freeze(uiRenderToolNamesForMode("pilot-inline")),
186
+ resources: Object.freeze([...RESOURCE_URIS]),
187
+ prompts: Object.freeze([]),
188
+ readOnly: true
189
+ }),
190
+ Object.freeze({
191
+ id: "per-component-fallback",
192
+ tools: Object.freeze(uiRenderToolNamesForMode("pilot-per-component")),
193
+ resources: Object.freeze([...RESOURCE_URIS]),
194
+ prompts: Object.freeze([]),
195
+ readOnly: true
196
+ })
197
+ ])
198
+ }),
199
+ extensions: Object.freeze({
200
+ "io.modelcontextprotocol/ui": Object.freeze({
201
+ resourceUri: "ui://sentropic/render/v1",
202
+ mimeTypes: Object.freeze(["text/html;profile=mcp-app"])
203
+ })
204
+ }),
205
+ requiredExtensions: Object.freeze([])
206
+ });
207
+ //# sourceMappingURL=registry-entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry-entry.js","sourceRoot":"","sources":["../../../../src/runtime/mcp/ui-render/registry-entry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAKnD,sDAAsD;AACtD,MAAM,CAAC,MAAM,eAAe,GAA4B;IACtD,cAAc;IACd,qBAAqB;IACrB,SAAS;CACV,CAAC;AAEF,gFAAgF;AAChF,MAAM,CAAC,MAAM,qBAAqB,GAAG,qBAAqB,CAAC;AAE3D,4EAA4E;AAC5E,MAAM,CAAC,MAAM,sBAAsB,GAAG,eAAe,CAAC;AAEtD,0EAA0E;AAC1E,MAAM,CAAC,MAAM,6BAA6B,GAAG,kCAAkC,CAAC;AAEhF,yDAAyD;AACzD,MAAM,aAAa,GAAG;IACpB,0BAA0B;IAC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AC,CAAC,YAAY,CAAC,CAAC;QAC/C,kBAAkB,EAAE,MAAM,CAAC,MAAM,CAAC;YAChC,MAAM,CAAC,MAAM,CAAC;gBACZ,EAAE,EAAE,SAAS;gBACb,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;gBAC9D,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC;gBAC5C,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC1B,QAAQ,EAAE,IAAI;aACf,CAAC;YACF,MAAM,CAAC,MAAM,CAAC;gBACZ,EAAE,EAAE,wBAAwB;gBAC5B,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,wBAAwB,CAAC,qBAAqB,CAAC,CAAC;gBACrE,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC;gBAC5C,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC1B,QAAQ,EAAE,IAAI;aACf,CAAC;SACH,CAAC;KACH,CAAC;IACF,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC;QACxB,4BAA4B,EAAE,MAAM,CAAC,MAAM,CAAC;YAC1C,WAAW,EAAE,0BAA0B;YACvC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,2BAA2B,CAAC,CAAC;SACxD,CAAC;KACH,CAAC;IACF,kBAAkB,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;CACtC,CAAC,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * The ui:// resource surface (h2a spec §3): the five pinned resource
3
+ * descriptors (`resources/list`) and the exact-URI `resources/read`
4
+ * handler. The pilot MCP App shell is assembled server-side from the
5
+ * vendored build — the core runtime (and, for per-component resources, the
6
+ * requested component's transitive engine/theme closure) is inlined together
7
+ * with `#st-host-config`, and the SEP-1865 postMessage bridge script
8
+ * (h2a spec §3.3) implements `ui/initialize`, `ui/notifications/tool-input`
9
+ * / `tool-result` / `host-context-changed`, the §4.4 contract check, the
10
+ * `st-intent` whitelist and the `submit_intent` bridge.
11
+ */
12
+ import type { UiRenderAssets } from "./assets.js";
13
+ import { type McpReadResourceResult, type McpResourceDescriptor, type UiRenderCallContext } from "./types.js";
14
+ /** The primary MCP App renderer resource (h2a spec §3.1). */
15
+ export declare const UI_RENDER_RESOURCE_URI = "ui://sentropic/render/v1";
16
+ /** The A2UI / JSON Schema catalogue resource (h2a spec §3.2). */
17
+ export declare const A2UI_CATALOG_RESOURCE_URI = "a2ui://sentropic/catalog/v1";
18
+ /** Options of the resource handlers. */
19
+ export interface CreateUiRenderResourcesOptions {
20
+ /** The verified asset set (`loadUiRenderAssets`). */
21
+ readonly assets: UiRenderAssets;
22
+ /** The environment the watermark gate reads; defaults to `process.env` (live). */
23
+ readonly env?: Record<string, string | undefined>;
24
+ }
25
+ /** The `resources/list` + `resources/read` handlers for one asset set. */
26
+ export interface UiRenderResources {
27
+ listResources(context?: UiRenderCallContext): {
28
+ resources: McpResourceDescriptor[];
29
+ };
30
+ readResource(uri: string, context?: UiRenderCallContext): McpReadResourceResult;
31
+ }
32
+ /** Assembles the pilot MCP App shell HTML for the full or per-component resource. */
33
+ export declare function buildShellHtml(assets: UiRenderAssets, hostConfigScript: string, component?: string): string;
34
+ export declare function createUiRenderResources(options: CreateUiRenderResourcesOptions): UiRenderResources;
35
+ //# sourceMappingURL=resources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../../src/runtime/mcp/ui-render/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAwB,MAAM,aAAa,CAAC;AAExE,OAAO,EAKL,KAAK,qBAAqB,EAE1B,KAAK,qBAAqB,EAE1B,KAAK,mBAAmB,EACzB,MAAM,YAAY,CAAC;AAEpB,6DAA6D;AAC7D,eAAO,MAAM,sBAAsB,6BAA6B,CAAC;AAEjE,iEAAiE;AACjE,eAAO,MAAM,yBAAyB,gCAAgC,CAAC;AAKvE,wCAAwC;AACxC,MAAM,WAAW,8BAA8B;IAC7C,qDAAqD;IACrD,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,kFAAkF;IAClF,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CACnD;AAED,0EAA0E;AAC1E,MAAM,WAAW,iBAAiB;IAChC,aAAa,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG;QAAE,SAAS,EAAE,qBAAqB,EAAE,CAAA;KAAE,CAAC;IACrF,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,qBAAqB,CAAC;CACjF;AAsOD,qFAAqF;AACrF,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CA4B3G;AAeD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,8BAA8B,GAAG,iBAAiB,CAkElG"}