@plasius/asset-contracts 0.4.5 → 0.5.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 +40 -0
- package/README.md +96 -1
- package/dist/index.cjs +1130 -954
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -1
- package/dist/index.d.ts +38 -1
- package/dist/index.js +1108 -935
- package/dist/index.js.map +1 -1
- package/docs/adrs/adr-0008-package-owned-issue-tracking.md +62 -0
- package/docs/adrs/adr-0009-model-resource-manifest-qualification.md +74 -0
- package/docs/adrs/index.md +2 -0
- package/docs/tdrs/index.md +1 -0
- package/docs/tdrs/tdr-0004-model-resource-manifest-qualification.md +70 -0
- package/package.json +4 -3
- package/src/index.ts +1 -0
- package/src/model-resource-manifest.ts +198 -0
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,44 @@
|
|
|
14
14
|
- **Security**
|
|
15
15
|
- (placeholder)
|
|
16
16
|
|
|
17
|
+
## [0.5.0] - 2026-10-24
|
|
18
|
+
|
|
19
|
+
- **Added**
|
|
20
|
+
- Opt-in canonical model resource manifest qualification with deterministic
|
|
21
|
+
file order, complete inventory/entrypoint checks, exact byte/hash/MIME
|
|
22
|
+
binding, bounded snapshots and cancellation/deadline handling. Existing
|
|
23
|
+
manifest factories remain compatible.
|
|
24
|
+
- (placeholder)
|
|
25
|
+
|
|
26
|
+
- **Changed**
|
|
27
|
+
- Add exact published `@plasius/gpu-model-core@0.7.0` for canonical public
|
|
28
|
+
inventory types; no runtime model parser import or other dependency update.
|
|
29
|
+
- (placeholder)
|
|
30
|
+
|
|
31
|
+
- **Fixed**
|
|
32
|
+
- (placeholder)
|
|
33
|
+
|
|
34
|
+
- **Security**
|
|
35
|
+
- Update development-only fast-uri from 3.1.8 to fixed 3.1.9 after the full
|
|
36
|
+
qualification audit reported URI-normalization advisories; retain major 3.
|
|
37
|
+
- (placeholder)
|
|
38
|
+
|
|
39
|
+
## [0.4.6] - 2026-10-23
|
|
40
|
+
|
|
41
|
+
- **Added**
|
|
42
|
+
- (placeholder)
|
|
43
|
+
|
|
44
|
+
- **Changed**
|
|
45
|
+
- (placeholder)
|
|
46
|
+
|
|
47
|
+
- **Fixed**
|
|
48
|
+
- Route npm support links and README guidance to the enabled package issue
|
|
49
|
+
tracker, with a Feature-linked model resource contract task map.
|
|
50
|
+
- (placeholder)
|
|
51
|
+
|
|
52
|
+
- **Security**
|
|
53
|
+
- (placeholder)
|
|
54
|
+
|
|
17
55
|
## [0.4.5] - 2026-10-18
|
|
18
56
|
|
|
19
57
|
- Refresh npm dependency lockfile to current supported stable versions (weekly maintenance, 2026-10-18). Refresh published Plasius package baselines after upstream releases.
|
|
@@ -290,3 +328,5 @@
|
|
|
290
328
|
[0.4.3]: https://github.com/Plasius-LTD/asset-contracts/releases/tag/v0.4.3
|
|
291
329
|
[0.4.4]: https://github.com/Plasius-LTD/asset-contracts/releases/tag/v0.4.4
|
|
292
330
|
[0.4.5]: https://github.com/Plasius-LTD/asset-contracts/releases/tag/v0.4.5
|
|
331
|
+
[0.4.6]: https://github.com/Plasius-LTD/asset-contracts/releases/tag/v0.4.6
|
|
332
|
+
[0.5.0]: https://github.com/Plasius-LTD/asset-contracts/releases/tag/v0.5.0
|
package/README.md
CHANGED
|
@@ -27,6 +27,7 @@ The exported surface covers:
|
|
|
27
27
|
helpers
|
|
28
28
|
- asset job metadata contracts
|
|
29
29
|
- manifest and file descriptor contracts
|
|
30
|
+
- opt-in canonical model package inventory and exact-byte qualification
|
|
30
31
|
- screenshot plan definitions
|
|
31
32
|
- review findings and review report contracts
|
|
32
33
|
- immutable promotion record contracts
|
|
@@ -45,6 +46,64 @@ The exported surface covers:
|
|
|
45
46
|
- generic manifest inference plus byte-verified typed promotion that preserves
|
|
46
47
|
specialized manifest fields
|
|
47
48
|
|
|
49
|
+
## Canonical Model Resource Qualification
|
|
50
|
+
|
|
51
|
+
`qualifyModelResourceManifest` binds an existing `AssetManifest` to a published
|
|
52
|
+
`@plasius/gpu-model-core` `ResourcePackageManifest` and the complete exported
|
|
53
|
+
file bytes. Existing factories retain their staged-construction behavior.
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
import { qualifyModelResourceManifest } from "@plasius/asset-contracts";
|
|
57
|
+
|
|
58
|
+
// Obtain manifest, packageManifest and exportedFiles from your trusted pipeline.
|
|
59
|
+
const qualified = await qualifyModelResourceManifest({
|
|
60
|
+
manifest,
|
|
61
|
+
packageManifest,
|
|
62
|
+
files: exportedFiles, // [{ path, bytes: Uint8Array, contentType }]
|
|
63
|
+
signal: abortController.signal,
|
|
64
|
+
timeoutMs: 10_000,
|
|
65
|
+
});
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Every manifest path, canonical inventory path and payload path must correspond
|
|
69
|
+
exactly, including the entrypoint. The qualifier checks actual byte lengths and
|
|
70
|
+
SHA-256 digests, agreement of canonical MIME declarations, portable relative
|
|
71
|
+
POSIX paths, case-insensitive collisions and file/directory conflicts. Optional
|
|
72
|
+
inventory MIME declarations may be omitted; the descriptor and payload MIME
|
|
73
|
+
declarations are required. It preserves roles, sourceAdapter, source/derived
|
|
74
|
+
paths and specialized model metadata, returning frozen descriptors sorted by
|
|
75
|
+
locale-independent code-unit order. Typed model inputs are also revalidated by
|
|
76
|
+
`createModelAssetManifest`.
|
|
77
|
+
|
|
78
|
+
Pass ordinary `Uint8Array` values backed by `ArrayBuffer`; use
|
|
79
|
+
`new Uint8Array(nodeBuffer)` for Node buffers. Shared buffers, getters in
|
|
80
|
+
metadata, exotic records and sparse arrays are rejected. Metadata and bytes
|
|
81
|
+
are copied before the first hash. `MODEL_RESOURCE_MANIFEST_LIMITS` caps files
|
|
82
|
+
at 16,384, each file at 64 MiB, total bytes at 128 MiB, metadata depth at 16 and
|
|
83
|
+
metadata values at 262,144. Metadata strings are capped at 2,048 characters,
|
|
84
|
+
keys at 128, paths at 1,024 and MIME declarations at 128. The default deadline
|
|
85
|
+
is 10 seconds; callers may choose 1–60,000 ms. Cancellation and deadline checks
|
|
86
|
+
surround each bounded digest; Web Crypto cannot cancel an in-flight digest.
|
|
87
|
+
Failures use value-free `ModelResourceManifestError.code` values.
|
|
88
|
+
|
|
89
|
+
Embedded resources remain inside their owning entrypoint; list only actual
|
|
90
|
+
exported files. This helper checks bytes and declarations, not internal format
|
|
91
|
+
references, MIME sniffing, malware, rendering, storage or promotion authority.
|
|
92
|
+
Keep source provenance in the canonical document and do not substitute derived
|
|
93
|
+
hashes for original source hashes. Detailed role mapping, animation/source
|
|
94
|
+
relationships and promotion closure remain separately tracked work. The result
|
|
95
|
+
is qualification at call time; callers must preserve the exact bytes in their
|
|
96
|
+
own immutable storage boundary.
|
|
97
|
+
|
|
98
|
+
The backend remote evaluator owns `gpu.model.conversion.enabled`. Call this
|
|
99
|
+
helper on the enabled adoption path; disabled and rollback paths retain the
|
|
100
|
+
existing factory path. The package performs no flag lookup or live mutation,
|
|
101
|
+
and adds no UI capability. The model-core dependency is exact published
|
|
102
|
+
`0.7.0` for public type compatibility; its import here is type-only, with no
|
|
103
|
+
runtime parser or renderer loading. Downstream adoption must use a released
|
|
104
|
+
package. See [ADR 0009](./docs/adrs/adr-0009-model-resource-manifest-qualification.md)
|
|
105
|
+
and [TDR 0004](./docs/tdrs/tdr-0004-model-resource-manifest-qualification.md).
|
|
106
|
+
|
|
48
107
|
## Private Artifact Prevention
|
|
49
108
|
|
|
50
109
|
Signed contributor agreements and contributor acceptance records are retained
|
|
@@ -526,7 +585,43 @@ npm run pack:check
|
|
|
526
585
|
|
|
527
586
|
## Support
|
|
528
587
|
|
|
529
|
-
|
|
588
|
+
File package bugs, support requests, and implementation Tasks in
|
|
589
|
+
[`Plasius-LTD/asset-contracts` Issues](https://github.com/Plasius-LTD/asset-contracts/issues),
|
|
590
|
+
which are enabled. Report vulnerabilities privately through
|
|
591
|
+
[SECURITY.md](./SECURITY.md).
|
|
592
|
+
|
|
593
|
+
The organisation [Plasius-LTD-site Project](https://github.com/orgs/Plasius-LTD/projects/1)
|
|
594
|
+
remains the source of truth for acceptance criteria, ownership, and status.
|
|
595
|
+
Epics, Features, and Stories remain in the site repository; package Tasks belong
|
|
596
|
+
here and link to their parent Feature. Existing site issues retain their history
|
|
597
|
+
and links; they do not need to be moved or duplicated.
|
|
598
|
+
|
|
599
|
+
### Model resource contract follow-ups
|
|
600
|
+
|
|
601
|
+
[Feature 1153](https://github.com/Plasius-LTD/plasius-ltd-site/issues/1153) owns the
|
|
602
|
+
following package Tasks created by
|
|
603
|
+
[tracker coordination 1169](https://github.com/Plasius-LTD/plasius-ltd-site/issues/1169):
|
|
604
|
+
|
|
605
|
+
| Contract concern | Package Task |
|
|
606
|
+
| --- | --- |
|
|
607
|
+
| Model resource descriptors | [#48](https://github.com/Plasius-LTD/asset-contracts/issues/48) |
|
|
608
|
+
| Conversion diagnostics | [#49](https://github.com/Plasius-LTD/asset-contracts/issues/49) |
|
|
609
|
+
| Texture and resource roles | [#50](https://github.com/Plasius-LTD/asset-contracts/issues/50) |
|
|
610
|
+
| Promotion manifest resource closure | [#51](https://github.com/Plasius-LTD/asset-contracts/issues/51) |
|
|
611
|
+
|
|
612
|
+
These are follow-up qualification and implementation scopes, not new API promises
|
|
613
|
+
or completed functionality. Reuse the existing file descriptors, manifests,
|
|
614
|
+
roles, promotion records, GPU contracts, and model-resolution contracts; identify
|
|
615
|
+
remaining gaps before changing exports. Separate animation and shader ABI work
|
|
616
|
+
remains in its existing Tasks. Claim and start an active Project Task before any
|
|
617
|
+
implementation.
|
|
618
|
+
|
|
619
|
+
The Tasks inherit `gpu.model.conversion.enabled`, the backend remote rollout
|
|
620
|
+
control for canonical model adapter adoption. This tracker correction does not
|
|
621
|
+
change its evaluator or state. Future runtime adoption must test disabled,
|
|
622
|
+
enabled, and rollback paths under that Feature.
|
|
623
|
+
See [ADR 0008](./docs/adrs/adr-0008-package-owned-issue-tracking.md) for the tracker
|
|
624
|
+
decision and release implications.
|
|
530
625
|
|
|
531
626
|
## License
|
|
532
627
|
|