@plasius/schema 1.3.1 → 1.4.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.
Files changed (2) hide show
  1. package/README.md +51 -4
  2. package/package.json +19 -5
package/README.md CHANGED
@@ -45,6 +45,46 @@ uses `dist-cjs/*.js` with `type: module`, it must generate
45
45
  `dist-cjs/package.json` with `{ "type": "commonjs" }` and validate this in
46
46
  `pack:check` before publish.
47
47
 
48
+ ### Private-artifact policy
49
+
50
+ Signed contributor agreements and contributor acceptance records belong only
51
+ in the approved access-controlled system outside source control. The
52
+ zero-dependency repository gate inspects path metadata without opening,
53
+ hashing, copying, or logging suspected private artifacts:
54
+
55
+ ```bash
56
+ npm run privacy:check
57
+ npm run test:privacy
58
+ npm run build
59
+ npm run pack:check
60
+ ```
61
+
62
+ `privacy:check` checks both filesystem metadata and the proposed Git index. It
63
+ rejects CSV files, contributor/CLA registry variants, contributor acceptance,
64
+ signature, and submission record categories, signed CLA/contributor agreement
65
+ storage, and paths that combine privacy and registry markers. Explicit public
66
+ process, template, schema, validator, and policy files remain allowed only as
67
+ terminal path components; matching private-record categories used as
68
+ directories fail closed regardless of their descendants.
69
+ Unicode compatibility normalization occurs before separator folding so
70
+ hierarchical, case-variant, and compatibility-separated protected paths cannot
71
+ evade the same path-only classification. An unstaged deletion remains a
72
+ failure until the deletion is staged. Invalid Git worktree metadata, symbolic
73
+ links, and non-regular entries fail closed, and failures report only rule IDs
74
+ and counts.
75
+
76
+ `pack:check` requires the exact `dist`, `THIRD_PARTY_NOTICES.md`, and `unicode`
77
+ `package.json.files` entries, then retains prefix-stripped raw member identities
78
+ and cardinality while comparing the canonical `npm pack --dry-run` manifest
79
+ with the package's exact public allowlist. Duplicate members, raw aliases, and
80
+ many-to-one normalization collisions fail without logging member values. The
81
+ same zero-dependency inventory policy runs over the digest-verified sealed
82
+ tarball immediately before publication. The isolated npm cache is removed
83
+ whether the check passes or fails. CI runs the repository gate before
84
+ dependency installation; release preparation and publication repeat the gate.
85
+ These path controls are defense in depth and do not replace secret scanning,
86
+ access controls, or incident response.
87
+
48
88
  ---
49
89
 
50
90
  ## Player-system event contracts
@@ -152,6 +192,12 @@ build-time dependency `@unicode/unicode-15.1.0@1.6.17`; run
152
192
  [ADR-0007](./docs/adrs/adr-0007-pinned-unicode-feedback-profile.md) and
153
193
  [third-party notices](./THIRD_PARTY_NOTICES.md).
154
194
 
195
+ The three typed feedback subpaths publish both modern `exports.types` entries
196
+ and exact `typesVersions` fallbacks. This keeps their declarations resolvable
197
+ for consumers that still compile CommonJS with classic TypeScript
198
+ `moduleResolution: "node"`, without opening a wildcard route for unknown
199
+ subpaths.
200
+
155
201
  Validated reusable fragments retain exact `type` and `version` metadata when
156
202
  embedded in parent contracts. This makes the output of the encrypted-envelope,
157
203
  derived-analysis, and game-diagnostics schemas directly composable into their
@@ -485,8 +531,9 @@ prerelease identity, artifact digests, or npm registry integrity differ.
485
531
  The read-only validation job installs dependencies, validates the package,
486
532
  builds an SBOM, and seals an immutable tarball. The `production` job runs no
487
533
  package lifecycle or dependency code; it verifies the exact artifact hand-off
488
- and publishes that tarball through npm OIDC with provenance. No npm write token
489
- or fallback is configured. The trusted publisher must be bound to
490
- `Plasius-LTD/schema`, `cd.yml`, `production`, and `npm publish`. Rollback is to
491
- disable `cd.yml`; never restore token-based publication.
534
+ and rechecks the collision-free exact raw-member inventory before publishing
535
+ that tarball through npm OIDC with provenance. No npm write token or fallback
536
+ is configured. The trusted publisher must be bound to `Plasius-LTD/schema`,
537
+ `cd.yml`, `production`, and `npm publish`. Rollback is to disable `cd.yml`;
538
+ never restore token-based publication.
492
539
  <!-- END PLASIUS RELEASE INTEGRITY -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasius/schema",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "description": "Entity schema definition & validation helpers for Plasius ecosystem",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -36,10 +36,24 @@
36
36
  "./unicode/feedback-unicode-15.1.0-unassigned.json": "./unicode/feedback-unicode-15.1.0-unassigned.json",
37
37
  "./package.json": "./package.json"
38
38
  },
39
+ "typesVersions": {
40
+ "*": {
41
+ "feedback-diagnostics": [
42
+ "dist/feedback-diagnostics.d.ts"
43
+ ],
44
+ "feedback-diagnostics-vocabulary": [
45
+ "dist/feedback-diagnostics-vocabulary.d.ts"
46
+ ],
47
+ "feedback-unicode-profile": [
48
+ "dist/feedback-unicode-profile.d.ts"
49
+ ]
50
+ }
51
+ },
39
52
  "scripts": {
40
53
  "build": "npm run unicode:check && tsup",
41
- "test": "npm run unicode:check && vitest run",
54
+ "test": "npm run unicode:check && vitest run && npm run test:privacy",
42
55
  "test:watch": "vitest",
56
+ "test:privacy": "node --experimental-test-coverage --test-coverage-include=scripts/private-artifact-policy.cjs --test-coverage-lines=80 --test-coverage-functions=80 --test-coverage-branches=60 --test tests/private-artifact-policy.test.cjs",
43
57
  "typecheck": "tsc --noEmit",
44
58
  "audit:eslint": "eslint . --max-warnings=0",
45
59
  "audit:deps": "npm ls --all --omit=optional --omit=peer > /dev/null 2>&1 || true",
@@ -49,8 +63,8 @@
49
63
  "prepare": "npm run build",
50
64
  "clean": "rimraf dist",
51
65
  "test:coverage": "vitest run --coverage",
52
- "pack:check": "node scripts/verify-public-package.cjs",
53
- "privacy:check": "node scripts/verify-public-artifacts.cjs --package-dir .",
66
+ "pack:check": "npm run privacy:check && node scripts/verify-public-package.cjs",
67
+ "privacy:check": "node scripts/verify-private-artifacts.cjs",
54
68
  "unicode:check": "node scripts/generate-feedback-unicode-profile.cjs --check",
55
69
  "unicode:generate": "node scripts/generate-feedback-unicode-profile.cjs",
56
70
  "prepublishOnly": "npm run build && npm run pack:check"
@@ -116,7 +130,7 @@
116
130
  }
117
131
  ],
118
132
  "overrides": {
119
- "brace-expansion": "^5.0.8",
133
+ "brace-expansion": "^5.0.9",
120
134
  "esbuild": "^0.28.1",
121
135
  "minimatch": "^10.2.1"
122
136
  },