@veil-runtime/ui 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/LICENSE +201 -0
- package/NOTICE +6 -0
- package/README.md +96 -2
- package/SECURITY.md +11 -0
- package/dist/application.d.ts +56 -0
- package/dist/application.js +9 -0
- package/dist/build-manifest.json +82 -0
- package/dist/capability-view-derivation.d.ts +40 -0
- package/dist/capability-view-derivation.js +185 -0
- package/dist/capability-view.d.ts +170 -0
- package/dist/capability-view.js +1 -0
- package/dist/composed-surface.d.ts +67 -0
- package/dist/composed-surface.js +1 -0
- package/dist/composition-inspection.d.ts +51 -0
- package/dist/composition-inspection.js +102 -0
- package/dist/derive-input-fields.d.ts +4 -0
- package/dist/derive-input-fields.js +63 -0
- package/dist/derive-output-view.d.ts +26 -0
- package/dist/derive-output-view.js +97 -0
- package/dist/execution-request.d.ts +13 -0
- package/dist/execution-request.js +58 -0
- package/dist/experience-orchestration.d.ts +13 -0
- package/dist/experience-orchestration.js +31 -0
- package/dist/format-semantic-value.d.ts +4 -0
- package/dist/format-semantic-value.js +15 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +18 -0
- package/dist/input-schema.d.ts +23 -0
- package/dist/input-schema.js +131 -0
- package/dist/interaction-resolution.d.ts +27 -0
- package/dist/interaction-resolution.js +179 -0
- package/dist/output-presentation-suggestion-schema.d.ts +12 -0
- package/dist/output-presentation-suggestion-schema.js +8 -0
- package/dist/output-schema.d.ts +26 -0
- package/dist/output-schema.js +213 -0
- package/dist/presentation-composition.d.ts +29 -0
- package/dist/presentation-composition.js +23 -0
- package/dist/presentation-context.d.ts +6 -0
- package/dist/presentation-context.js +1 -0
- package/dist/presentation-suggestion-schema.d.ts +15 -0
- package/dist/presentation-suggestion-schema.js +10 -0
- package/dist/registry.d.ts +21 -0
- package/dist/registry.js +71 -0
- package/dist/relationship-interpretation.d.ts +9 -0
- package/dist/relationship-interpretation.js +16 -0
- package/dist/validate-application.d.ts +24 -0
- package/dist/validate-application.js +253 -0
- package/dist/validation-safety.d.ts +6 -0
- package/dist/validation-safety.js +90 -0
- package/dist/workflow.d.ts +18 -0
- package/dist/workflow.js +3 -0
- package/docs/API.md +17 -0
- package/docs/DECISIONS.md +16 -0
- package/docs/THIRD_PARTY.md +16 -0
- package/docs/third-party/ZOD-LICENSE.txt +21 -0
- package/examples/standalone/index.mjs +78 -0
- package/examples/standalone/package.json +8 -0
- package/package.json +69 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Proposed v0.1.0 release notes — release candidate
|
|
2
|
+
|
|
3
|
+
Veil UI — Deterministic Composition Engine (Developer Preview).
|
|
4
|
+
|
|
5
|
+
- Framework-neutral graphs, recursive input fields, six output surface descriptions, relationship/interaction helpers, and composition inspection from governed capabilities.
|
|
6
|
+
- Works deterministically without models, Emergence, React, or a host-server framework.
|
|
7
|
+
- Supports published Core 0.4.x, qualified with 0.4.0; ESM, Node 24+, TypeScript 6.0.2 baseline.
|
|
8
|
+
- Rejects undeclared output fields recursively, reserved/inherited input keys, unsafe data shapes, oversized values, and impossible calendar dates/UTC instants.
|
|
9
|
+
- Snapshots authoritative registry definitions and isolates optional provider requests from the deterministic baseline.
|
|
10
|
+
- Uses fixed Zod versions, verifies builds and tarballs, and includes a model-free standalone host-policy example.
|
|
11
|
+
- Apache-2.0 LICENSE and NOTICE included, with separately licensed external dependencies.
|
|
12
|
+
|
|
13
|
+
Behavior changes from the private lab extraction: older Core peer ranges are removed; unknown outputs are errors rather than accepted extras; registry updates require a new registry; presentation callbacks cannot execute the supplied capability; bounded JSON-like data and real calendars are enforced. Callers must adapt service results to public DTOs. Optional presentation APIs remain experimental.
|
|
14
|
+
|
|
15
|
+
This package supplies descriptions, not a React renderer, execution host, authentication service, workflow engine, or resumable-operation protocol. Historical lab UI/Emergence limitations remain outside the supported preview. Publication requires explicit maintainer approval of the exact qualified tarball and release action; these are proposed notes, not an announcement of availability.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
Veil UI — Deterministic Composition Engine (Developer Preview)
|
|
2
|
+
Copyright 2026 Veil UI contributors
|
|
3
|
+
|
|
4
|
+
This product is licensed under the Apache License, Version 2.0.
|
|
5
|
+
Third-party dependencies retain their own copyrights and license grants.
|
|
6
|
+
See docs/THIRD_PARTY.md for the dependency and distribution inventory.
|
package/README.md
CHANGED
|
@@ -1,3 +1,97 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Veil UI — Deterministic Composition Engine (Developer Preview)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@veil-runtime/ui@0.1.0` derives and validates interface descriptions from governed capability contracts. It is framework-neutral: the package returns graphs, fields, surfaces, and interaction descriptors. Your host renders those descriptions and executes authorized operations through Core.
|
|
4
|
+
|
|
5
|
+
**Developer Preview: publication requires explicit maintainer approval of the exact qualified tarball and release action.**
|
|
6
|
+
|
|
7
|
+
## Install and run the candidate
|
|
8
|
+
|
|
9
|
+
Requires Node.js 24 or newer and npm. The supported TypeScript baseline is 6.0.2, ESM with NodeNext resolution. Strict consumer checks use `ES2022` and `DOM` libraries plus Node types because public Core/MCP declarations reference web transport types. UI itself makes no DOM or Core runtime calls. Direct CommonJS `require()` is unsupported; use ESM imports or dynamic `import()` from a CommonJS host.
|
|
10
|
+
|
|
11
|
+
From this repository:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm ci
|
|
15
|
+
npm run qualify:ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Qualification prints the candidate artifact and evidence directory. It builds and tests a source-only snapshot, installs the tarball into a new consumer with **published Core 0.4.0**, runs the standalone example, checks declarations and browser bundling, compares repeated tarballs, audits production dependencies, and inspects legal files. It never publishes.
|
|
19
|
+
|
|
20
|
+
In a separate application, use the printed absolute tarball path:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
npm init -y
|
|
24
|
+
npm install /absolute/path/veil-runtime-ui-0.1.0.tgz @veil-runtime/core@0.4.0
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Then copy [examples/standalone/index.mjs](examples/standalone/index.mjs) into that application and run:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
node index.mjs
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The example prints derived input controls, rejects invalid input, demonstrates a policy-denied execution without calling the service, and displays an approved result. It uses a tiny host-owned terminal renderer, a local identity fixture, an existing-service-style operation, and authoritative Core authorization. No model, Emergence, React, or Sandbox is involved. The included example `package.json` intentionally omits the unpublished UI dependency: install the candidate tarball explicitly using the command above.
|
|
34
|
+
|
|
35
|
+
## Minimal derivation
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
import { createCapability } from '@veil-runtime/core';
|
|
39
|
+
import {
|
|
40
|
+
createUIRegistry, deriveDeterministicCapabilityView,
|
|
41
|
+
validateRichCapabilityInput, type RichCapabilityInputSchema,
|
|
42
|
+
} from '@veil-runtime/ui';
|
|
43
|
+
|
|
44
|
+
const inputSchema: RichCapabilityInputSchema = {
|
|
45
|
+
name: { type: 'string', required: true, description: 'Name', minLength: 1 },
|
|
46
|
+
};
|
|
47
|
+
const hello = createCapability<{ name: string }, { greeting: string }>({
|
|
48
|
+
name: 'hello', version: '1.0.0', description: 'Greet someone', risk: 'read', inputSchema,
|
|
49
|
+
async execute({ input }) { return { greeting: `Hello ${input.name}` }; },
|
|
50
|
+
});
|
|
51
|
+
const outputSchema = { greeting: { type: 'string' as const, description: 'Greeting' } };
|
|
52
|
+
const registry = createUIRegistry({
|
|
53
|
+
capabilities: [hello],
|
|
54
|
+
applications: [{ id: 'greetings', title: 'Greetings', entryCapability: 'hello', capabilities: ['hello'] }],
|
|
55
|
+
outputSchemas: { hello: outputSchema },
|
|
56
|
+
});
|
|
57
|
+
const graph = registry.deriveApplication('greetings')!;
|
|
58
|
+
if (!registry.validateApplication(graph).valid) throw new Error('Invalid application');
|
|
59
|
+
const view = deriveDeterministicCapabilityView({ capability: hello, outputSchema });
|
|
60
|
+
validateRichCapabilityInput(inputSchema, { name: 'Amina' });
|
|
61
|
+
// Render view.fields in your host; execute through your authenticated Core policy.
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Public contract
|
|
65
|
+
|
|
66
|
+
Supported exports are the root `@veil-runtime/ui` and `@veil-runtime/ui/inspection`. Internal dist subpaths are not API. See [API.md](docs/API.md) for the inventory and [DECISIONS.md](docs/DECISIONS.md) for compatibility decisions.
|
|
67
|
+
|
|
68
|
+
The deterministic preview supports injected registry/graph validation; recursive inputs; form, table, detail, aggregate, time-series, and category-series descriptions; relationship bindings/conditions; interaction and human-input payload resolution; descriptive workflow/success-transition metadata; semantic value formatting; and composition inspection. It does not mount controls or enforce domain transitions.
|
|
69
|
+
|
|
70
|
+
`createUIRegistry()` snapshots definitions. Returned metadata can be edited without changing subsequent derivations. To change descriptions or capability versions, create a new registry and refresh the host's view/context lifecycle explicitly. There is no subscription or live-update protocol.
|
|
71
|
+
|
|
72
|
+
Optional presentation-provider and composition-plan APIs remain exported for compatibility but are **experimental**, are not necessary for deterministic derivation, and introduce no model dependency. Suggestions may only alter constrained labels/grouping; they cannot grant permission. A provider receives isolated metadata and an inert capability executor. Provider callbacks are trusted host code, not a sandbox. Failure or malformed/oversized suggestions fall back to a private deterministic baseline.
|
|
73
|
+
|
|
74
|
+
## Authority and privacy
|
|
75
|
+
|
|
76
|
+
UI owns descriptive derivation and validation. The host owns authentication, discovery filtering, rendering/escaping, authorization configuration, request/context binding, transport, persistence, retries, timeouts, and reconciliation after incomplete operations. Core authoritatively enforces the execution policy; capabilities/services enforce business rules. Displaying an action or a confirmation dialog never authorizes it.
|
|
77
|
+
|
|
78
|
+
Validate inputs on the server independently of the form. Output validation now **rejects undeclared fields recursively**, including array elements, rather than stripping fields or returning a sanitized copy. Validate before transport, storage as trusted context, or rendering; discard the whole result on failure. Explicitly select the public DTO from service records. Declaring a secret in the schema still declares it public; validation cannot decide which business data is sensitive.
|
|
79
|
+
|
|
80
|
+
Input/output/schema validation and presentation-plan parsing reject cycles, accessors, nonplain records, reserved `__proto__`/`prototype`/`constructor` keys, and oversized data. Limits per validation boundary: depth 32, 10,000 nodes, 256 properties per object, 1,000 array items, 65,536 UTF-16 code units per string, and a conservative 1 MiB estimated UTF-8 budget. These are maximum supported preview contracts, not tunable security exceptions. Hosts must additionally bound raw request/provider response bytes **before JSON decoding**, and constrain response time and concurrent work. Supported dates are real Gregorian `YYYY-MM-DD`; instants must be valid UTC strings with seconds and optional exactly three millisecond digits. Leap seconds and offsets are unsupported.
|
|
81
|
+
|
|
82
|
+
Validation errors throw `Error`; their messages are diagnostic, not stable error codes or safe user-facing text. Host APIs should map them to bounded public errors. The package has no resumable execution or retry guarantee.
|
|
83
|
+
|
|
84
|
+
## Development and limitations
|
|
85
|
+
|
|
86
|
+
```sh
|
|
87
|
+
npm --workspace @veil-runtime/ui run check
|
|
88
|
+
npm test
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The build targets ES2022, emits ESM/declarations without dangling source maps, and fingerprints inputs and emitted files. `verify:dist` rejects missing, stale, altered, or extra files; `npm pack` rebuilds and verifies first. A failing `prepublishOnly` hook blocks publication from a source directory. Only the exact qualified tarball may be published after maintainer approval of its SHA-256 and the release action. npm tarball publication does not run directory lifecycle hooks; no script bypass is needed. Publication defaults to public access on `https://registry.npmjs.org/` under the `preview` tag. Qualification verifies source-directory refusal and an exact-tarball publication dry-run; it never publishes. Neither qualification nor CI authorizes a release.
|
|
92
|
+
|
|
93
|
+
The laboratory React UI and Emergence remain historical experiments outside this release contract. The capability lab is at `/lab`; `/` opens the separate Emergence experiment. Known lab-only issues include mobile overflow, decimal input stepping, fixed/permissive demo identity/policy, process-local stores, constructor/singleton integration friction, and unavailable Core Emergence imports in its broad client/server build. These do not become supported package features through this preview. See the release qualification report for separate laboratory dependency findings.
|
|
94
|
+
|
|
95
|
+
## License
|
|
96
|
+
|
|
97
|
+
Apache License 2.0, approved by the maintainer for this package. [LICENSE](LICENSE) and [NOTICE](NOTICE) are included in the candidate tarball. External dependencies retain their own licenses; see [THIRD_PARTY.md](docs/THIRD_PARTY.md). Root laboratory metadata remains separate.
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Security boundary for the developer preview
|
|
2
|
+
|
|
3
|
+
Render descriptions do not confer authority. Authenticate and authorize in the host and Core; validate human inputs again at that boundary. Re-resolve contextual bindings from host-owned state. Treat discovery metadata as potentially sensitive and filter it before sending to clients.
|
|
4
|
+
|
|
5
|
+
Output validation rejects undeclared keys recursively but does not redact declared fields or sanitize strings for HTML. Only transmit validated public DTOs. Use escaping appropriate to your renderer. Never render metadata as raw HTML or treat a condition/confirmation as an execution policy.
|
|
6
|
+
|
|
7
|
+
Validation limits and supported calendar formats are in README. Limit raw request/model-response bytes before decoding JSON, bound concurrent work and provider timeouts, and avoid retrying uncertain effects without domain idempotency. In-process provider callbacks are trusted extension code; isolated DTOs protect the deterministic baseline, not the process from malicious JavaScript.
|
|
8
|
+
|
|
9
|
+
The library includes no network server, auth principal, execution-context store, artifact download route, or storage default. Historical laboratory endpoints use prototype security and are not production templates. Optional model/presentation adapters are outside the deterministic support promise.
|
|
10
|
+
|
|
11
|
+
Report suspected vulnerabilities privately to the maintainer through the repository's GitHub security reporting channel where available; otherwise request a private contact without posting secrets or exploit details publicly. No hosted security service or response SLA is promised for this preview.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { RichCapabilityInputSchema } from "./input-schema.js";
|
|
2
|
+
import type { CapabilityOutputSchema } from "./output-schema.js";
|
|
3
|
+
import type { ApplicationWorkflowDefinition } from "./workflow.js";
|
|
4
|
+
export type CapabilityCondition = {
|
|
5
|
+
field: string;
|
|
6
|
+
operator: "equals";
|
|
7
|
+
value: string | number | boolean;
|
|
8
|
+
} | {
|
|
9
|
+
field: string;
|
|
10
|
+
operator: "exists";
|
|
11
|
+
};
|
|
12
|
+
export interface CapabilityRelationship {
|
|
13
|
+
sourceCapability: string;
|
|
14
|
+
targetCapability: string;
|
|
15
|
+
label: string;
|
|
16
|
+
bindings: Record<string, string>;
|
|
17
|
+
conditions?: CapabilityCondition[];
|
|
18
|
+
role?: "action" | "navigate" | "related";
|
|
19
|
+
}
|
|
20
|
+
export interface CapabilityTransition {
|
|
21
|
+
capability: string;
|
|
22
|
+
onSuccess?: {
|
|
23
|
+
capability: string;
|
|
24
|
+
refresh?: boolean;
|
|
25
|
+
resultBindings?: Record<string, string>;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface DerivedApplicationCapability {
|
|
29
|
+
name: string;
|
|
30
|
+
version: string;
|
|
31
|
+
description: string;
|
|
32
|
+
risk: "read" | "write" | "destructive";
|
|
33
|
+
inputSchema: RichCapabilityInputSchema;
|
|
34
|
+
outputSchema?: CapabilityOutputSchema;
|
|
35
|
+
relationships: CapabilityRelationship[];
|
|
36
|
+
transition?: CapabilityTransition;
|
|
37
|
+
}
|
|
38
|
+
export interface DerivedApplication {
|
|
39
|
+
id: string;
|
|
40
|
+
title: string;
|
|
41
|
+
description?: string;
|
|
42
|
+
entryCapability: string;
|
|
43
|
+
capabilities: DerivedApplicationCapability[];
|
|
44
|
+
workflow?: ApplicationWorkflowDefinition;
|
|
45
|
+
}
|
|
46
|
+
export interface ApplicationManifest {
|
|
47
|
+
id: string;
|
|
48
|
+
title: string;
|
|
49
|
+
description?: string;
|
|
50
|
+
entryCapability: string;
|
|
51
|
+
capabilities: string[];
|
|
52
|
+
workflow?: ApplicationWorkflowDefinition;
|
|
53
|
+
}
|
|
54
|
+
export declare function defineApplication<T extends ApplicationManifest>(application: T): T;
|
|
55
|
+
export declare function defineRelationships<T extends readonly CapabilityRelationship[]>(relationships: T): T;
|
|
56
|
+
export declare function defineTransitions<T extends readonly CapabilityTransition[]>(transitions: T): T;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"inputs": {
|
|
3
|
+
"package.json": "c157a9da53acaef17d77f2c26c31b66c0709ff389eb660ac83889de64f4a39bb",
|
|
4
|
+
"scripts/artifact.mjs": "92d2ffd8836d0e14742528da9ddc96e0834ef873ffa81097a3ebae58d825aace",
|
|
5
|
+
"scripts/build.mjs": "e0a8a0dd359c09a76b70d93865247f8d4404064442e76ff4b8d4d3e3390cb9aa",
|
|
6
|
+
"scripts/check-boundary.mjs": "f5c0efe0b0f720b6e78dfa6bb5d22a1ab784e173e4d4db97adcb08d3ce889e8b",
|
|
7
|
+
"scripts/publication-hold.mjs": "2c7a00f8f23ac34d888813e76c4ab8f5bb112526002fd6be15993825dff118ca",
|
|
8
|
+
"scripts/verify-dist.mjs": "668d5b105b7762cc2fd812091dba24f6985597da4519f72d572d5b7e63b880c0",
|
|
9
|
+
"src/application.ts": "18cee45849d0ef9858d673b35aa42b77c4469b637669a0ab8a1ffc1f2c980d5d",
|
|
10
|
+
"src/capability-view-derivation.ts": "07367b08e115c4022c873d2d01888d0d2c26ab58ac7518500fd95331301bbaa4",
|
|
11
|
+
"src/capability-view.ts": "fda1db85ffcb26b45b60890b3a20b875ee4aff76bd3c35ce5d41018b22a64de7",
|
|
12
|
+
"src/composed-surface.ts": "b2c2fc4cfbc8c5a07048f5482f9a2807ff936f62a99cd93c5a794133d6a31175",
|
|
13
|
+
"src/composition-inspection.ts": "a9265c68bab785ba9e38ea83899997daec9322de10b98fdafaa44bc523ca0c3a",
|
|
14
|
+
"src/derive-input-fields.ts": "cf8c7ee9f98ed0838dbf299fb4653814c3e70004fc121d8c99752aa137331efd",
|
|
15
|
+
"src/derive-output-view.ts": "81d622d5430f7b9333a41c33794d8d22e3e539e861e04830ce089d83a6790a8e",
|
|
16
|
+
"src/execution-request.ts": "775c3beba47aae482acbc2a48461ab8f947ca7b773c71a69077af387557ae344",
|
|
17
|
+
"src/experience-orchestration.ts": "f156497d99828d15da2b42f3155e4ec0b77fc72ad6e6d846bb9bbea4d6791fa4",
|
|
18
|
+
"src/format-semantic-value.ts": "2192cd723c5a9d64164287ddae99c0aa105024e1d0778a597d0b71a2ea8ab9dd",
|
|
19
|
+
"src/index.ts": "44b876d7a7f0aaf333a6a03c72bcc48911f6d15e8717fad6fb6b77ea0f47db21",
|
|
20
|
+
"src/input-schema.ts": "8c03637abeb80958881475ab049494a8905d19deb76df61c23c76d9b19eb692f",
|
|
21
|
+
"src/interaction-resolution.ts": "e9a75d501ded82fe773f03d2dcb1e2fa8b396a98d9c2902888a3f6b3cbf8f55e",
|
|
22
|
+
"src/output-presentation-suggestion-schema.ts": "2421d9f152cb4ce5e4d560f8ebe1d4029147dcab01a187c67008f36a3dfd6bf4",
|
|
23
|
+
"src/output-schema.ts": "68f7f49fed5badafb5ca509365802dec6526a56c23d2bf2837b350852823688b",
|
|
24
|
+
"src/presentation-composition.ts": "b591c0b041f3518fc0287934a063e75c217355987e9da9c4ed604d10e3acc940",
|
|
25
|
+
"src/presentation-context.ts": "34c2796cb23c6086e6ee9474b756a03fb69d713aca28c0cdb7d6b0bd60f5c248",
|
|
26
|
+
"src/presentation-suggestion-schema.ts": "f618db5e8caf439e0ae758a74a38edf8db57485662f1ddad29614e68425b1d41",
|
|
27
|
+
"src/registry.ts": "de906003b8098202c905532cfd497ab0e2f9092226be2d9f469c5cf883891a8c",
|
|
28
|
+
"src/relationship-interpretation.ts": "63be6a417586603d2b6e3075be9bd5bb812fa06437410fc9efa0c0411375f149",
|
|
29
|
+
"src/validate-application.ts": "f76874d49955d7ade1d0f8c5f995b63a6026102173b3e50b710517ccbc1442f4",
|
|
30
|
+
"src/validation-safety.ts": "e0bcc379269e3f51a0021dd4797c422f813b41141274125705b425d2b1b1eb2b",
|
|
31
|
+
"src/workflow.ts": "6c5b31242474c0a37b1a9f85717eebf3b1d4b373c17c8d47861804e28d3302e5",
|
|
32
|
+
"tsconfig.json": "eb3e08c27d8ac0302b339a13814c0f4416372f7b5f10fbafe3f4f16751978e9e"
|
|
33
|
+
},
|
|
34
|
+
"outputs": {
|
|
35
|
+
"application.d.ts": "2c3091787abcd5a8005bfe951dc012056219b5ba6d70e5d8ad275281cf481d86",
|
|
36
|
+
"application.js": "8f92c6971e91b265ebe62aee2acc3b98433d220f8b31788f8214e01fd017135b",
|
|
37
|
+
"capability-view-derivation.d.ts": "204f0b80547c979a531d1b8370cf0d78dd2f60ad1d58c06851912518f0f3266e",
|
|
38
|
+
"capability-view-derivation.js": "c972e78f124a4f8009f7497898185ab6c8ca5cfa60ee4fd952bda449c2793eb7",
|
|
39
|
+
"capability-view.d.ts": "020f8a03321f8a561d9ed13e64c4fa98f6b46d4991f1347aa79cc43f0d139373",
|
|
40
|
+
"capability-view.js": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
41
|
+
"composed-surface.d.ts": "18b657b71cdfbc34c08c3d0e63a6b381b7135be36dd8f75d227b1f995c399c57",
|
|
42
|
+
"composed-surface.js": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
43
|
+
"composition-inspection.d.ts": "dca099a4a9776626a3b0fffe16f65aeecf4de100eab84287906c03f94c059941",
|
|
44
|
+
"composition-inspection.js": "29527de641d75b0ea6710aa5407f9d0362ef5c61595694ced3745dd2ace92b72",
|
|
45
|
+
"derive-input-fields.d.ts": "417aa8a884416e1a679a69d938592908488611fb453cb4e84b3666d351ca1045",
|
|
46
|
+
"derive-input-fields.js": "de940148e3c029b786fec95a520a3d8a8d1eef1d361436fa607b2990b63f2adc",
|
|
47
|
+
"derive-output-view.d.ts": "9ca3c32ac65215bb85ae74b75121c55c2ac82d04d7754d38ebc0de94d3fa898a",
|
|
48
|
+
"derive-output-view.js": "e54de4b2ece567a518d346cfd8d96fe2179f5a1fcf76cc6306c5222184e19b73",
|
|
49
|
+
"execution-request.d.ts": "f8b68cf456bfbeb63a968378e5ccaef5f55a908022e323901668ca99ebe75a3a",
|
|
50
|
+
"execution-request.js": "f32bd2e9de70dd9f243d08d0fce4898e847fa3d34d77d3376a1b3c5839edb611",
|
|
51
|
+
"experience-orchestration.d.ts": "45fa9770a37acccaeb6e0f267e0a566c6d6cda6133d6e1077589859478effd77",
|
|
52
|
+
"experience-orchestration.js": "3ffccbcdc94bb2083f8e2227755651825d279f93b48f0c71d32d595c297b3fc2",
|
|
53
|
+
"format-semantic-value.d.ts": "8ecb9dff99d819af71251a909e307e11e07f5c76bec1e8796a8cefcd0692a921",
|
|
54
|
+
"format-semantic-value.js": "dd36b084312a57949a0a6e104e1c84a92ba334488e5e4dc7555f5d16a7eea7aa",
|
|
55
|
+
"index.d.ts": "44b876d7a7f0aaf333a6a03c72bcc48911f6d15e8717fad6fb6b77ea0f47db21",
|
|
56
|
+
"index.js": "44b876d7a7f0aaf333a6a03c72bcc48911f6d15e8717fad6fb6b77ea0f47db21",
|
|
57
|
+
"input-schema.d.ts": "9f93c761ca0936ca18dd6a9df250fb16ba43f0da48a74897918765851edfacc2",
|
|
58
|
+
"input-schema.js": "f5747d9b6acdced514c1c8c80d7a8a36e972d703fc234e1ac266f02dfd19c045",
|
|
59
|
+
"interaction-resolution.d.ts": "fc3af3c0405e78e85bacf67262d7566f1b9f9ea6263bc4c200d0318795b805cf",
|
|
60
|
+
"interaction-resolution.js": "498ea435bbb9ba0c814728664652491ba6c4be5c3407233984df4cf4f16103d7",
|
|
61
|
+
"output-presentation-suggestion-schema.d.ts": "88072dc37afeaab8ac05182b5d49fdf52099bbb18518ce2485feea476ea85895",
|
|
62
|
+
"output-presentation-suggestion-schema.js": "708d2f821132978ba44a2e01812e41e3eec70266e5dbeb7053f55f88142ad634",
|
|
63
|
+
"output-schema.d.ts": "8dbf090a79ab489e068e4a290dccd57e222c377f111d38e990308db8a3debca8",
|
|
64
|
+
"output-schema.js": "29345dd93ccc27fafbdc29c66fbd35e38ab9d382392ca40fcdf643dbedefc662",
|
|
65
|
+
"presentation-composition.d.ts": "42dcb9fd0a7478907e30bac5288f4a6508b24ffc78dbacb0eaa51f0ac99f5378",
|
|
66
|
+
"presentation-composition.js": "35a310e39a660ba2f2ba322272db369dfdb27bc6d8608f77a75651f2ff0baad6",
|
|
67
|
+
"presentation-context.d.ts": "f3565bd1666882a0ddd6041cb379270fd3fcb2c172a8e011b9c07ff189a404a9",
|
|
68
|
+
"presentation-context.js": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
69
|
+
"presentation-suggestion-schema.d.ts": "9fdd12079f822a608c9a3f2f3330b953fc247c65c5b6181a595ddc0b4440f37c",
|
|
70
|
+
"presentation-suggestion-schema.js": "2069575a56297c3f87492f778c17fcbbacf71b09c196e9255ae0e26570463bf8",
|
|
71
|
+
"registry.d.ts": "6211d9e058d1d6cbbbae4f169d33d3cf99a7eadbeba3ae9c3453569707a957b6",
|
|
72
|
+
"registry.js": "41fbda01be2ec5522daca7045b93db0b9769816eaaba479a971594da2ade8c13",
|
|
73
|
+
"relationship-interpretation.d.ts": "e52961747b1f9b0d6d37d3928f6cc5dda11a52e2139abc91f1c6e8a19172469f",
|
|
74
|
+
"relationship-interpretation.js": "36ad983eb699cc8c7f18ab0f3a1be15a246faf60fbb8ea535797997e0b82c434",
|
|
75
|
+
"validate-application.d.ts": "9a3116542adeca8b0b31cb7583528964b363a105322383f7c86d96f410c675d2",
|
|
76
|
+
"validate-application.js": "ddb309d298076d03ed6b9c7aa1464b0d3cad8073d559e5a434b89015e094d7cd",
|
|
77
|
+
"validation-safety.d.ts": "b6804e34ee3d14011c8b40dd261394bda9fa533da19b6e96fd1f3b961655d2dc",
|
|
78
|
+
"validation-safety.js": "c48df14e22c66c56741e79a7c43a9ebfc881c24b598746185dcd069d81141402",
|
|
79
|
+
"workflow.d.ts": "de603bd1785ea75cb5f762a989c0c391498f5841aea4c279231495ba479dfc86",
|
|
80
|
+
"workflow.js": "a79aad136d24613772dfff40373510b0f185a003956bd6de6c59f58d018fcf9e"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Capability } from "@veil-runtime/core";
|
|
2
|
+
import type { CapabilityRelationship, CapabilityTransition } from "./application.js";
|
|
3
|
+
import type { CapabilityView } from "./capability-view.js";
|
|
4
|
+
import type { CapabilityOutputSchema } from "./output-schema.js";
|
|
5
|
+
import type { ViewContext } from "./presentation-context.js";
|
|
6
|
+
export interface CapabilityPresentationSuggestion {
|
|
7
|
+
title?: string;
|
|
8
|
+
submitLabel?: string;
|
|
9
|
+
fields?: Array<{
|
|
10
|
+
name: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
export interface CapabilityPresentationRequest {
|
|
15
|
+
capability: Capability;
|
|
16
|
+
deterministicView: CapabilityView;
|
|
17
|
+
context?: ViewContext;
|
|
18
|
+
}
|
|
19
|
+
export interface CapabilityPresentationProvider {
|
|
20
|
+
readonly name: string;
|
|
21
|
+
readonly model?: string;
|
|
22
|
+
suggestCapabilityPresentation(request: CapabilityPresentationRequest): Promise<CapabilityPresentationSuggestion>;
|
|
23
|
+
}
|
|
24
|
+
export interface DeriveCapabilityViewOptions {
|
|
25
|
+
capability: Capability;
|
|
26
|
+
outputSchema?: CapabilityOutputSchema;
|
|
27
|
+
relationships?: readonly CapabilityRelationship[];
|
|
28
|
+
transition?: CapabilityTransition;
|
|
29
|
+
context?: ViewContext;
|
|
30
|
+
strategy?: "deterministic" | "generative";
|
|
31
|
+
provider?: CapabilityPresentationProvider;
|
|
32
|
+
}
|
|
33
|
+
export declare function deriveDeterministicCapabilityView(options: Omit<DeriveCapabilityViewOptions, "strategy" | "provider">): CapabilityView;
|
|
34
|
+
export declare function deriveCapabilityView(options: DeriveCapabilityViewOptions): Promise<CapabilityView>;
|
|
35
|
+
export interface PresentationSuggestionCache<Key = string, Value = unknown> {
|
|
36
|
+
get(key: Key): Value | undefined;
|
|
37
|
+
set(key: Key, value: Value): void;
|
|
38
|
+
delete?(key: Key): void;
|
|
39
|
+
clear?(): void;
|
|
40
|
+
}
|