@sentropic/h2a 0.98.7 → 0.98.8

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 +7 -4
  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,151 @@
1
+ /**
2
+ * The 9-step envelope validation pipeline (DS spec §4.3–§4.5), mirrored from
3
+ * sent-tech-design-system cc29be886b543ffa29592afbc6b4482c104b1fb4
4
+ * `packages/elements/src/validate/{envelope,structure,diagnostics}.ts`,
5
+ * `packages/elements/src/structure/ajv.ts` and
6
+ * `packages/elements/src/ports/{types,focus}.ts`. The DS validator cannot be
7
+ * delegated to until DS L7a publishes `@sentropic/design-system-elements`
8
+ * (h2a spec §7.2), so h2a mirrors the committed behavior exactly: the same
9
+ * check order, the same closed §4.5 diagnostic shape, the same ajv 2020-12
10
+ * registration set (vendored A2UI common types, the empty-function-set
11
+ * catalogue stub, the catalogue itself), and the same focus port.
12
+ * TODO(DS L7a, h2a spec §7.3): replace this mirror with the published
13
+ * createEnvelopeValidator; retain the contract tests when removing it.
14
+ *
15
+ * Check order (every step that refuses returns immediately):
16
+ * 1. JSON-serializable, then the 1 MiB UTF-8 budget (§4.3 item 3);
17
+ * 2. envelope structure (§4.2);
18
+ * 3. the optional `catalogId`, when present, must name this catalogue;
19
+ * 4. `mode`: `preview` is reserved (§10.3);
20
+ * 5. `root.component` must be catalogued;
21
+ * 6. a placeholder entry refuses (`component-unavailable`);
22
+ * 7. the §4.4 contract rule: older is accepted, never newer, never
23
+ * another major;
24
+ * 8. the root's structure against the targeted catalogue entry;
25
+ * 9. semantics — only when the structure is clean — through the injected
26
+ * port of the entry's `lazy:` engine. `core` engines have no port.
27
+ */
28
+ import type { UiRenderCatalogDocument, UiRenderAssets } from "./assets.js";
29
+ import type { SemanticPort, UiRenderDiagnostic } from "./types.js";
30
+ /** The §4.3 item 3 budget: 1 MiB of UTF-8 (the limit itself is accepted). */
31
+ export declare const ENVELOPE_LIMIT_BYTES = 1048576;
32
+ /**
33
+ * The JSON-form contract (review 1, B1): the envelope IS a JSON value
34
+ * (§4.3) and the property channel feeds plain JS objects that may carry
35
+ * `undefined` values TypeScript callers routinely produce. `JSON.stringify`
36
+ * drops such keys, so the raw JS object and its serialized form disagree.
37
+ * The single JSON round-trip below defines the canonical form ONCE for both
38
+ * seams: size measurement and both validators judge exactly the bytes the
39
+ * host transmits.
40
+ */
41
+ export type NormalizedEnvelopeInput = {
42
+ readonly ok: true;
43
+ readonly value: unknown;
44
+ readonly text: string;
45
+ } | {
46
+ readonly ok: false;
47
+ readonly kind: "not-json-value" | "not-serializable";
48
+ readonly message: string;
49
+ };
50
+ export declare function normalizeEnvelopeInput(input: unknown): NormalizedEnvelopeInput;
51
+ /**
52
+ * UTF-8 byte length without TextEncoder (the pure half stays free of
53
+ * host-global identifiers; surrogates pair to 4 bytes like the encoder's).
54
+ */
55
+ export declare function utf8ByteLength(text: string): number;
56
+ /**
57
+ * One structure failure. `pointer` is an RFC 6901 JSON Pointer RELATIVE TO
58
+ * THE VALIDATED VALUE (the envelope, or the root component object), so the
59
+ * envelope validator can anchor it into the envelope.
60
+ */
61
+ export interface StructureIssue {
62
+ readonly pointer: string;
63
+ readonly message: string;
64
+ /** The failing keyword, e.g. `type`, `required`, `unevaluatedProperties`. */
65
+ readonly keyword: string;
66
+ /** For `required`: the missing property name. */
67
+ readonly missingProperty?: string;
68
+ /** For `unevaluatedProperties`/`additionalProperties`: the stray name. */
69
+ readonly additionalProperty?: string;
70
+ }
71
+ /** Structure validation of both layers (§4.3: envelope, then component). */
72
+ export interface StructureValidator {
73
+ validateEnvelope(value: unknown): readonly StructureIssue[];
74
+ validateComponent(component: string, root: unknown): readonly StructureIssue[];
75
+ }
76
+ /**
77
+ * The default structure seam (§4.3): ajv 8 (dist/2020) validating the
78
+ * envelope and each catalogue entry against JSON Schema 2020-12.
79
+ *
80
+ * Registration set (all under their `$id`s, so every reference resolves
81
+ * without network or file access): the vendored A2UI common types under the
82
+ * v0.9.1 URI the entries reference `ComponentCommon` by; the built sibling
83
+ * `catalog.json` stub under its URI — common_types' reachable graph ends at
84
+ * its `anyFunction` definition, the empty function set `{ "not": {} }`
85
+ * (§5.2 `functions: {}`), so every A2UI `FunctionCall` refuses; and the
86
+ * catalogue itself, so each entry compiles through
87
+ * `<catalogId>#/components/<Name>`.
88
+ */
89
+ export interface AjvStructureOptions {
90
+ readonly catalog: UiRenderCatalogDocument;
91
+ readonly envelopeSchema: Record<string, unknown>;
92
+ /** The vendored A2UI common types (mirrored in src/runtime/mcp/ui-render). */
93
+ readonly commonTypes: Record<string, unknown>;
94
+ }
95
+ /**
96
+ * Builds the 2020-12 structure validator for one catalogue. `strict: false`
97
+ * trades nothing away: the committed documents carry vendor keywords
98
+ * (`components`, `functions`, `catalogId`, `x-sentropic`) outside ajv's
99
+ * known set, and their freshness is guarded by the vendored digests.
100
+ */
101
+ export declare function createAjvStructure(options: AjvStructureOptions): StructureValidator;
102
+ /** One focus validation issue: `path` is focus's JSON-path style (`$.a[0].b`). */
103
+ export interface FocusValidationIssue {
104
+ /** JSON-path-style location, e.g. `$.sections[3].id`. */
105
+ readonly path: string;
106
+ /** Focus's stable machine code, e.g. `duplicate_id`. */
107
+ readonly code: string;
108
+ readonly message: string;
109
+ }
110
+ /** The shape of `validateDecisionDossierDocument` (matched structurally). */
111
+ export type FocusValidationResult = {
112
+ readonly ok: true;
113
+ readonly value: unknown;
114
+ } | {
115
+ readonly ok: false;
116
+ readonly issues: readonly FocusValidationIssue[];
117
+ };
118
+ /** Any function shaped like `@sentropic/focus/validate`'s default validator. */
119
+ export type FocusValidate = (value: unknown) => FocusValidationResult;
120
+ /**
121
+ * Converts focus's JSON-path pointer (`$.sections[3].id`) to an RFC 6901
122
+ * pointer relative to the payload (`/sections/3/id`).
123
+ */
124
+ export declare function focusPathToPointer(path: string): string;
125
+ /**
126
+ * Wraps a focus validator as the injected `focus` semantic port
127
+ * (h2a spec §4.2.3: `createFocusPort({ validate })`).
128
+ */
129
+ export declare function createFocusPort(options: {
130
+ readonly validate: FocusValidate;
131
+ }): SemanticPort;
132
+ /** Options of the h2a validator factory. */
133
+ export interface CreateUiRenderValidatorOptions {
134
+ /** The verified asset set (`loadUiRenderAssets`). */
135
+ readonly assets: UiRenderAssets;
136
+ /** Injected semantic ports, by engine chunk name (§4.3 item 2). */
137
+ readonly ports?: Readonly<Partial<Record<string, SemanticPort>>>;
138
+ }
139
+ /** A validator bound to one catalogue; `validate` is pure and reusable. */
140
+ export interface UiRenderValidator {
141
+ validate(input: unknown): readonly UiRenderDiagnostic[];
142
+ }
143
+ /**
144
+ * Creates the ui:// render validator for the verified asset set: the ajv
145
+ * 2020-12 structure bridge over the vendored catalogue, envelope schema and
146
+ * mirrored A2UI common types. The focus port and the pure BPMN F1 port
147
+ * extracted from the pinned DS chunk are wired by default. Explicit ports
148
+ * replace that set so missing-capability behavior remains testable.
149
+ */
150
+ export declare function createUiRenderValidator(options: CreateUiRenderValidatorOptions): UiRenderValidator;
151
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../src/runtime/mcp/ui-render/validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAQH,OAAO,KAAK,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,KAAK,EAAmB,YAAY,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEpF,6EAA6E;AAC7E,eAAO,MAAM,oBAAoB,UAAU,CAAC;AAmB5C;;;;;;;;GAQG;AACH,MAAM,MAAM,uBAAuB,GAC/B;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACrE;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,GAAG,kBAAkB,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3G,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,uBAAuB,CAoB9E;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAYnD;AAoDD;;;;GAIG;AACH,MAAM,WAAW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AE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,oBAAoB,EAAE,CAAA;CAAE,CAAC;AAE7E,gFAAgF;AAChF,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK,qBAAqB,CAAC;AAEtE;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQvD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAA;CAAE,GAAG,YAAY,CAc3F;AAED,4CAA4C;AAC5C,MAAM,WAAW,8BAA8B;IAC7C,qDAAqD;IACrD,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,mEAAmE;IACnE,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;CAClE;AAED,2EAA2E;AAC3E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,kBAAkB,EAAE,CAAC;CACzD;AA+MD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,8BAA8B,GAAG,iBAAiB,CAuBlG"}
@@ -0,0 +1,460 @@
1
+ /**
2
+ * The 9-step envelope validation pipeline (DS spec §4.3–§4.5), mirrored from
3
+ * sent-tech-design-system cc29be886b543ffa29592afbc6b4482c104b1fb4
4
+ * `packages/elements/src/validate/{envelope,structure,diagnostics}.ts`,
5
+ * `packages/elements/src/structure/ajv.ts` and
6
+ * `packages/elements/src/ports/{types,focus}.ts`. The DS validator cannot be
7
+ * delegated to until DS L7a publishes `@sentropic/design-system-elements`
8
+ * (h2a spec §7.2), so h2a mirrors the committed behavior exactly: the same
9
+ * check order, the same closed §4.5 diagnostic shape, the same ajv 2020-12
10
+ * registration set (vendored A2UI common types, the empty-function-set
11
+ * catalogue stub, the catalogue itself), and the same focus port.
12
+ * TODO(DS L7a, h2a spec §7.3): replace this mirror with the published
13
+ * createEnvelopeValidator; retain the contract tests when removing it.
14
+ *
15
+ * Check order (every step that refuses returns immediately):
16
+ * 1. JSON-serializable, then the 1 MiB UTF-8 budget (§4.3 item 3);
17
+ * 2. envelope structure (§4.2);
18
+ * 3. the optional `catalogId`, when present, must name this catalogue;
19
+ * 4. `mode`: `preview` is reserved (§10.3);
20
+ * 5. `root.component` must be catalogued;
21
+ * 6. a placeholder entry refuses (`component-unavailable`);
22
+ * 7. the §4.4 contract rule: older is accepted, never newer, never
23
+ * another major;
24
+ * 8. the root's structure against the targeted catalogue entry;
25
+ * 9. semantics — only when the structure is clean — through the injected
26
+ * port of the entry's `lazy:` engine. `core` engines have no port.
27
+ */
28
+ import { createRequire } from "node:module";
29
+ import { fileURLToPath } from "node:url";
30
+ import { a2uiCommonTypes, a2uiSdkCatalogSchema } from "./a2ui-common-types.js";
31
+ import { port as bpmnCanvasPort } from "./bpmn-port.js";
32
+ /** The §4.3 item 3 budget: 1 MiB of UTF-8 (the limit itself is accepted). */
33
+ export const ENVELOPE_LIMIT_BYTES = 1048576;
34
+ /**
35
+ * The prop every semantic engine validates. Fixed for the two semantic
36
+ * components (DecisionDossier, BpmnCanvas): §5.1 names `document` the
37
+ * semantic payload.
38
+ */
39
+ const SEMANTIC_PAYLOAD_PROP = "document";
40
+ /** Escape one RFC 6901 token (`~` first, then `/`). */
41
+ function escapePointerToken(token) {
42
+ return token.replace(/~/g, "~0").replace(/\//g, "~1");
43
+ }
44
+ /** Appends one property token to an RFC 6901 pointer. */
45
+ function appendPointerToken(pointer, token) {
46
+ return `${pointer}/${escapePointerToken(token)}`;
47
+ }
48
+ export function normalizeEnvelopeInput(input) {
49
+ let text;
50
+ try {
51
+ const serialized = JSON.stringify(input);
52
+ if (typeof serialized !== "string") {
53
+ return {
54
+ ok: false,
55
+ kind: "not-json-value",
56
+ message: "the envelope is not a JSON value (§4.3)",
57
+ };
58
+ }
59
+ text = serialized;
60
+ }
61
+ catch (error) {
62
+ return {
63
+ ok: false,
64
+ kind: "not-serializable",
65
+ message: `the envelope is not JSON-serializable (§4.3): ${error instanceof Error ? error.message : String(error)}`,
66
+ };
67
+ }
68
+ return { ok: true, value: JSON.parse(text), text };
69
+ }
70
+ /**
71
+ * UTF-8 byte length without TextEncoder (the pure half stays free of
72
+ * host-global identifiers; surrogates pair to 4 bytes like the encoder's).
73
+ */
74
+ export function utf8ByteLength(text) {
75
+ let total = 0;
76
+ for (let index = 0; index < text.length; index += 1) {
77
+ const code = text.charCodeAt(index);
78
+ if (code <= 0x7f)
79
+ total += 1;
80
+ else if (code <= 0x7ff)
81
+ total += 2;
82
+ else if (code >= 0xd800 && code <= 0xdbff) {
83
+ total += 4;
84
+ index += 1;
85
+ }
86
+ else
87
+ total += 3;
88
+ }
89
+ return total;
90
+ }
91
+ function parseContract(value) {
92
+ const match = /^([0-9]+)\.([0-9]+)$/.exec(value);
93
+ if (match === undefined || match === null)
94
+ return undefined;
95
+ return { major: Number(match[1]), minor: Number(match[2]) };
96
+ }
97
+ /**
98
+ * A lazy engine chunk failed to load (§4.5 `engine-load-failed`): produced
99
+ * when an injected port throws instead of returning findings.
100
+ */
101
+ function engineLoadFailed(chunk, cause) {
102
+ return {
103
+ code: "engine-load-failed",
104
+ path: "",
105
+ message: `the ${chunk} engine failed to load: ${cause}`,
106
+ severity: "error",
107
+ source: "host",
108
+ detail: { chunk, cause },
109
+ };
110
+ }
111
+ /** Structure issues become §4.5 `schema-violation` diagnostics. */
112
+ function structureDiagnostics(issues, prefix) {
113
+ return issues.map((issue) => {
114
+ let path = `${prefix}${issue.pointer}`;
115
+ if (issue.keyword === "required" && issue.missingProperty !== undefined) {
116
+ path = appendPointerToken(path, issue.missingProperty);
117
+ }
118
+ else if ((issue.keyword === "unevaluatedProperties" || issue.keyword === "additionalProperties") &&
119
+ issue.additionalProperty !== undefined) {
120
+ path = appendPointerToken(path, issue.additionalProperty);
121
+ }
122
+ return {
123
+ code: "schema-violation",
124
+ path,
125
+ message: issue.message,
126
+ severity: "error",
127
+ source: "catalog",
128
+ detail: { keyword: issue.keyword },
129
+ };
130
+ });
131
+ }
132
+ /** ajv errors become StructureIssues; the suffix params become token hints. */
133
+ function toIssues(compiled) {
134
+ const issues = [];
135
+ for (const error of (compiled.errors ?? [])) {
136
+ const params = error.params ?? {};
137
+ issues.push({
138
+ pointer: error.instancePath,
139
+ message: error.message ?? "the value does not satisfy the schema",
140
+ keyword: error.keyword,
141
+ ...(typeof params.missingProperty === "string" ? { missingProperty: params.missingProperty } : {}),
142
+ ...(typeof params.additionalProperty === "string" ? { additionalProperty: params.additionalProperty } : {}),
143
+ ...(typeof params.unevaluatedProperty === "string" ? { additionalProperty: params.unevaluatedProperty } : {}),
144
+ });
145
+ }
146
+ return issues;
147
+ }
148
+ /**
149
+ * Builds the 2020-12 structure validator for one catalogue. `strict: false`
150
+ * trades nothing away: the committed documents carry vendor keywords
151
+ * (`components`, `functions`, `catalogId`, `x-sentropic`) outside ajv's
152
+ * known set, and their freshness is guarded by the vendored digests.
153
+ */
154
+ export function createAjvStructure(options) {
155
+ const catalogId = options.catalog["$id"];
156
+ if (typeof catalogId !== "string" || catalogId.length === 0) {
157
+ throw new Error("the catalogue document must carry its $id (§5.2: $id = catalogId)");
158
+ }
159
+ if (catalogId !== options.catalog.catalogId) {
160
+ throw new Error("the catalogue document's $id and catalogId disagree (§5.2)");
161
+ }
162
+ // Resolve UI-only dependencies inside module creation, where the transports
163
+ // can catch load failures and retain their core CLI/MCP surface.
164
+ const { Ajv2020 } = createRequire(import.meta.url)("ajv/dist/2020.js");
165
+ const ajv = new Ajv2020({ allErrors: true, strict: false });
166
+ ajv.addSchema(options.commonTypes);
167
+ ajv.addSchema(a2uiSdkCatalogSchema);
168
+ ajv.addSchema(options.catalog);
169
+ const envelopeValidate = ajv.compile(options.envelopeSchema);
170
+ const entries = new Map();
171
+ /** Compiles (and caches) one entry; the error names what failed to compile. */
172
+ function entryOf(component) {
173
+ const cached = entries.get(component);
174
+ if (cached !== undefined)
175
+ return { compiled: cached };
176
+ try {
177
+ const compiled = ajv.compile({ $ref: `${catalogId}#/components/${component}` });
178
+ entries.set(component, compiled);
179
+ return { compiled };
180
+ }
181
+ catch (error) {
182
+ return { error: error instanceof Error ? error.message : String(error) };
183
+ }
184
+ }
185
+ return {
186
+ validateEnvelope(value) {
187
+ return envelopeValidate(value) ? [] : toIssues(envelopeValidate);
188
+ },
189
+ validateComponent(component, root) {
190
+ const entry = entryOf(component);
191
+ if ("error" in entry) {
192
+ return [
193
+ {
194
+ pointer: "/component",
195
+ message: `the catalogued schema for ${component} could not be compiled: ${entry.error}`,
196
+ keyword: "$compile",
197
+ },
198
+ ];
199
+ }
200
+ return entry.compiled(root) ? [] : toIssues(entry.compiled);
201
+ },
202
+ };
203
+ }
204
+ /**
205
+ * Converts focus's JSON-path pointer (`$.sections[3].id`) to an RFC 6901
206
+ * pointer relative to the payload (`/sections/3/id`).
207
+ */
208
+ export function focusPathToPointer(path) {
209
+ const withoutRoot = path.startsWith("$") ? path.slice(1) : path;
210
+ const tokens = [];
211
+ for (const match of withoutRoot.matchAll(/([^.[\]]+)|\[(\d+)\]/g)) {
212
+ const token = match[1] ?? match[2];
213
+ if (token !== undefined)
214
+ tokens.push(escapePointerToken(token));
215
+ }
216
+ return tokens.length === 0 ? "" : `/${tokens.join("/")}`;
217
+ }
218
+ /**
219
+ * Wraps a focus validator as the injected `focus` semantic port
220
+ * (h2a spec §4.2.3: `createFocusPort({ validate })`).
221
+ */
222
+ export function createFocusPort(options) {
223
+ return {
224
+ source: "focus",
225
+ validate(payload) {
226
+ const result = options.validate(payload);
227
+ if (result.ok)
228
+ return [];
229
+ return result.issues.map((issue) => ({
230
+ code: issue.code,
231
+ message: issue.message,
232
+ pointer: focusPathToPointer(issue.path),
233
+ severity: "error",
234
+ }));
235
+ },
236
+ };
237
+ }
238
+ /** The core factory: mirrors `createEnvelopeValidatorCore` (DS §4.3–§4.5). */
239
+ function createEnvelopeValidatorCore(options) {
240
+ const { catalog, structure, ports } = { catalog: options.assets.catalog, structure: options.structure, ports: options.ports };
241
+ return {
242
+ validate(input) {
243
+ // 1. The JSON round-trip (B1): the canonical form for size AND
244
+ // validation. `undefined` keys vanish here, exactly as the wire sees
245
+ // them, so both structure seams judge the same value.
246
+ const normalized = normalizeEnvelopeInput(input);
247
+ if (!normalized.ok) {
248
+ return [
249
+ {
250
+ code: "schema-violation",
251
+ path: "",
252
+ message: normalized.message,
253
+ severity: "error",
254
+ source: "catalog",
255
+ },
256
+ ];
257
+ }
258
+ const text = normalized.text;
259
+ const bytes = utf8ByteLength(text);
260
+ if (bytes > ENVELOPE_LIMIT_BYTES) {
261
+ return [
262
+ {
263
+ code: "payload-too-large",
264
+ path: "",
265
+ message: `the envelope is ${bytes} UTF-8 bytes, over the ${ENVELOPE_LIMIT_BYTES}-byte budget (§4.3 item 3)`,
266
+ severity: "error",
267
+ source: "catalog",
268
+ detail: { limitBytes: ENVELOPE_LIMIT_BYTES, actualBytes: bytes },
269
+ },
270
+ ];
271
+ }
272
+ // 2. Envelope structure (§4.2), on the NORMALIZED value.
273
+ const envelopeIssues = structure.validateEnvelope(normalized.value);
274
+ if (envelopeIssues.length > 0)
275
+ return structureDiagnostics(envelopeIssues, "");
276
+ const envelope = normalized.value;
277
+ // 3. `catalogId` is optional (§4.2: default = the renderer's catalogue):
278
+ // absent names THIS catalogue; present, it must name THIS catalogue.
279
+ // A non-string value that survived step 2 still refuses here.
280
+ const envelopeCatalogId = envelope.catalogId;
281
+ if (envelopeCatalogId !== undefined && envelopeCatalogId !== catalog.catalogId) {
282
+ return [
283
+ {
284
+ code: "schema-violation",
285
+ path: "/catalogId",
286
+ message: `the envelope must name its catalogue (${String(catalog.catalogId)})`,
287
+ severity: "error",
288
+ source: "catalog",
289
+ detail: { expected: catalog.catalogId, found: envelopeCatalogId },
290
+ },
291
+ ];
292
+ }
293
+ // 4. `preview` is reserved (§10.3).
294
+ if (envelope.mode === "preview") {
295
+ return [
296
+ {
297
+ code: "unsupported-mode",
298
+ path: "/mode",
299
+ message: 'mode "preview" is reserved and not rendered by this catalogue (§10.3)',
300
+ severity: "error",
301
+ source: "catalog",
302
+ detail: { mode: "preview" },
303
+ },
304
+ ];
305
+ }
306
+ // 5. The targeted component must be catalogued.
307
+ const root = envelope.root;
308
+ const component = root.component;
309
+ if (typeof component !== "string" || !(component in catalog.components)) {
310
+ return [
311
+ {
312
+ code: "unknown-component",
313
+ path: "/root/component",
314
+ message: `no catalogued component is named ${String(component)}`,
315
+ severity: "error",
316
+ source: "catalog",
317
+ detail: { component },
318
+ },
319
+ ];
320
+ }
321
+ // 6. A placeholder entry refuses (§5.2 x-sentropic.status).
322
+ const entry = catalog.components[component];
323
+ if (entry === undefined) {
324
+ return [
325
+ {
326
+ code: "unknown-component",
327
+ path: "/root/component",
328
+ message: `no catalogued component is named ${component}`,
329
+ severity: "error",
330
+ source: "catalog",
331
+ detail: { component },
332
+ },
333
+ ];
334
+ }
335
+ const sentropic = entry["x-sentropic"];
336
+ if (sentropic?.status === "unknown") {
337
+ return [
338
+ {
339
+ code: "component-unavailable",
340
+ path: "/root/component",
341
+ message: `${component} is catalogued as a placeholder (x-sentropic.status "unknown") and cannot render`,
342
+ severity: "error",
343
+ source: "catalog",
344
+ detail: { component },
345
+ },
346
+ ];
347
+ }
348
+ // 7. The §4.4 contract rule: never newer, never another major.
349
+ const envelopeContract = envelope.contract;
350
+ const entryContract = sentropic?.contract;
351
+ if (typeof entryContract !== "string") {
352
+ return [
353
+ {
354
+ code: "schema-violation",
355
+ path: "/root/component",
356
+ message: `the catalogued entry for ${component} declares no x-sentropic contract`,
357
+ severity: "error",
358
+ source: "catalog",
359
+ },
360
+ ];
361
+ }
362
+ const parsedEntry = parseContract(entryContract);
363
+ const parsedEnvelope = typeof envelopeContract === "string" ? parseContract(envelopeContract) : undefined;
364
+ if (parsedEntry === undefined || parsedEnvelope === undefined) {
365
+ return [
366
+ {
367
+ code: "schema-violation",
368
+ path: "/contract",
369
+ message: `contract versions are "major.minor" strings (§4.4): envelope ${String(envelopeContract)}, entry ${entryContract}`,
370
+ severity: "error",
371
+ source: "catalog",
372
+ },
373
+ ];
374
+ }
375
+ if (parsedEnvelope.major !== parsedEntry.major || parsedEnvelope.minor > parsedEntry.minor) {
376
+ return [
377
+ {
378
+ code: "unsupported-contract",
379
+ path: "/contract",
380
+ message: `the envelope targets contract ${String(envelopeContract)} but ${component} is at ${entryContract} (§4.4: an envelope may be older, never newer)`,
381
+ severity: "error",
382
+ source: "catalog",
383
+ detail: { expected: entryContract, found: envelopeContract },
384
+ },
385
+ ];
386
+ }
387
+ // 8. The root's structure against the catalogue entry.
388
+ const componentIssues = structure.validateComponent(component, root);
389
+ if (componentIssues.length > 0)
390
+ return structureDiagnostics(componentIssues, "/root");
391
+ // 9. Semantics, only when the structure is clean (§4.3 item 2).
392
+ const engine = sentropic?.engine;
393
+ if (typeof engine !== "string" || !engine.startsWith("lazy:"))
394
+ return [];
395
+ const chunk = engine.slice("lazy:".length);
396
+ const port = ports?.[chunk];
397
+ const payloadPath = `/root/${SEMANTIC_PAYLOAD_PROP}`;
398
+ if (port === undefined) {
399
+ return [
400
+ {
401
+ code: "host-capability-missing",
402
+ path: payloadPath,
403
+ message: `the host did not inject the ${chunk} semantic port (engine ${engine}); the owning runtime validates this payload (§4.3 item 2)`,
404
+ severity: "error",
405
+ source: "host",
406
+ detail: { chunk, engine },
407
+ },
408
+ ];
409
+ }
410
+ let findings;
411
+ try {
412
+ findings = port.validate(root[SEMANTIC_PAYLOAD_PROP]);
413
+ }
414
+ catch (error) {
415
+ const cause = error instanceof Error ? error.message : String(error);
416
+ return [{ ...engineLoadFailed(chunk, cause), path: payloadPath }];
417
+ }
418
+ return findings.map((finding) => ({
419
+ // Engine warnings surface under the engine's own code (the one §4.5
420
+ // names is `watermark-refused`); refusals are always `semantic-invalid`.
421
+ code: finding.severity === "warning" ? finding.code : "semantic-invalid",
422
+ path: `${payloadPath}${finding.pointer ?? ""}`,
423
+ message: finding.message,
424
+ severity: finding.severity,
425
+ source: port.source,
426
+ detail: { code: finding.code },
427
+ }));
428
+ },
429
+ };
430
+ }
431
+ /**
432
+ * Creates the ui:// render validator for the verified asset set: the ajv
433
+ * 2020-12 structure bridge over the vendored catalogue, envelope schema and
434
+ * mirrored A2UI common types. The focus port and the pure BPMN F1 port
435
+ * extracted from the pinned DS chunk are wired by default. Explicit ports
436
+ * replace that set so missing-capability behavior remains testable.
437
+ */
438
+ export function createUiRenderValidator(options) {
439
+ const structure = createAjvStructure({
440
+ catalog: options.assets.catalog,
441
+ envelopeSchema: options.assets.envelopeSchema,
442
+ commonTypes: a2uiCommonTypes,
443
+ });
444
+ let ports = options.ports;
445
+ if (ports === undefined) {
446
+ // Focus publishes an import-only export. Resolve that public ESM export
447
+ // before loading it synchronously; never depend on its private dist path.
448
+ const { validateDecisionDossierDocument } = createRequire(import.meta.url)(fileURLToPath(import.meta.resolve("@sentropic/focus/validate")));
449
+ ports = {
450
+ focus: createFocusPort({ validate: validateDecisionDossierDocument }),
451
+ "bpmn-canvas": bpmnCanvasPort
452
+ };
453
+ }
454
+ return createEnvelopeValidatorCore({
455
+ assets: options.assets,
456
+ ports,
457
+ structure,
458
+ });
459
+ }
460
+ //# sourceMappingURL=validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../../src/runtime/mcp/ui-render/validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EAAE,IAAI,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAI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