@plasius/gpu-shader 0.1.2 → 0.1.3
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/README.md +36 -0
- package/dist/cli.cjs +360 -147
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +360 -147
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +543 -146
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +543 -146
- package/dist/index.js.map +1 -1
- package/dist/node.cjs +235 -84
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +235 -84
- package/dist/node.js.map +1 -1
- package/dist/testing.cjs +366 -124
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.js +366 -124
- package/dist/testing.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -52,6 +52,29 @@ strict manifest parsers and versioned contracts. The build APIs
|
|
|
52
52
|
`reflectGpuInterface`, `validateAssembledGpuInterface`, and
|
|
53
53
|
`generateGpuInterfaceArtifacts` are exposed only from the Node subpath.
|
|
54
54
|
|
|
55
|
+
### Bounded contract snapshot boundary
|
|
56
|
+
|
|
57
|
+
Every browser-safe manifest, compatibility, matrix, inventory, qualification,
|
|
58
|
+
evidence, and runtime-reference parser snapshots contract data before reading
|
|
59
|
+
schema fields. The snapshot accepts only JSON primitives, local-realm plain
|
|
60
|
+
objects, and dense ordinary arrays whose fields are own enumerable data
|
|
61
|
+
properties. Accessors, symbols, hidden fields, behavioral prototypes, sparse
|
|
62
|
+
or custom arrays, cycles, invalid Unicode, and over-limit graphs fail closed.
|
|
63
|
+
|
|
64
|
+
The snapshot never invokes a property getter or Proxy `get` trap. JavaScript
|
|
65
|
+
cannot portably detect a transparent Proxy, so its `getPrototypeOf`, `ownKeys`,
|
|
66
|
+
and `getOwnPropertyDescriptor` reflection traps may run. Any reflection failure
|
|
67
|
+
is replaced by a fixed bounded diagnostic; the thrown provider value is not
|
|
68
|
+
interpolated or retained as `error.cause`. Cross-realm or behavioral values
|
|
69
|
+
must first be JSON-decoded or structured-cloned into the current realm.
|
|
70
|
+
|
|
71
|
+
Runtime/model contracts and complete qualification products use separate
|
|
72
|
+
finite policies. The exact depth, node, property, element, per-string,
|
|
73
|
+
aggregate-string, aggregate-data, and encoded-input ceilings are recorded in
|
|
74
|
+
[TDR 0003](docs/tdrs/tdr-0003-bounded-contract-snapshot-policies.md). Valid
|
|
75
|
+
plain JSON retains byte-identical canonical JSON and ABI hashes. Changing a
|
|
76
|
+
policy requires affected shader requalification.
|
|
77
|
+
|
|
55
78
|
## Installation
|
|
56
79
|
|
|
57
80
|
After an approved GitHub CD release publishes the package:
|
|
@@ -211,6 +234,19 @@ The codec is little-endian, bounds checked, strict about unknown or missing
|
|
|
211
234
|
members, and writes deterministic zero padding. Unsupported or non-finite
|
|
212
235
|
values fail before upload.
|
|
213
236
|
|
|
237
|
+
For network/storage input, prefer `parseJsonBytes` followed by the strict
|
|
238
|
+
manifest parser. Both encoded bytes and the resulting data graph are bounded;
|
|
239
|
+
syntax, UTF-8, snapshot, and schema failures do not retain parser/provider
|
|
240
|
+
causes.
|
|
241
|
+
|
|
242
|
+
Byte input is brand-checked and copied with captured TypedArray intrinsics, so
|
|
243
|
+
`Buffer`, Uint8Array subclasses, and cross-realm Uint8Arrays remain supported
|
|
244
|
+
without reading caller `byteLength`, `constructor`, iterator, or index
|
|
245
|
+
properties. Proxy-wrapped typed arrays fail the intrinsic brand check. Runtime
|
|
246
|
+
style-load request fields and catalog asset-result fields must likewise be
|
|
247
|
+
enumerable own data properties; catalog and attestation callback failures are
|
|
248
|
+
reported with fixed cause-free diagnostics.
|
|
249
|
+
|
|
214
250
|
## Validate a model and shader
|
|
215
251
|
|
|
216
252
|
```ts
|