Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,14 @@ jobs:
node-version: '22'

- name: Install codegen dependency
run: npm install --no-save --no-package-lock json-schema-to-typescript@^15
# Pin BOTH json-schema-to-typescript and prettier to exact versions.
# jstt formats its output with prettier (dep range "^3.2.5"), so an
# unpinned install silently adopts new prettier releases and reformats
# the generated types — drift with no schema change. prettier 3.9.0
# (2026-06-27) collapsed short union types onto one line and broke this
# gate on main. The committed tests/types/eep-schemas.d.ts is generated
# against exactly these versions; bump them here and regenerate together.
run: npm install --no-save --no-package-lock json-schema-to-typescript@15.0.4 prettier@3.9.0

- name: Check generated schema types are up to date
# The script's --check mode generates the output to memory and
Expand Down
10 changes: 8 additions & 2 deletions scripts/codegen-schema-types.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@
* node scripts/codegen-schema-types.mjs # generate
* node scripts/codegen-schema-types.mjs --check # generate to a temp dir and compare
*
* Dependencies (devDependencies of the repo root):
* - json-schema-to-typescript
* Dependencies (pin these EXACTLY — json-schema-to-typescript formats its
* output with prettier, so an unpinned prettier silently reformats the
* generated types and breaks the drift gate with no schema change):
* - json-schema-to-typescript@15.0.4
* - prettier@3.9.0
* - datamodel-code-generator (Python, run via pipx in CI)
*
* Install locally before regenerating:
* npm install --no-save --no-package-lock json-schema-to-typescript@15.0.4 prettier@3.9.0
*
* This script is intentionally modest: it does not aim to replace the
* hand-maintained TypeScript surfaces in @eep-dev/* packages. Its job
* is to be a *drift sentinel*: if a schema changes, the generated file
Expand Down
18 changes: 2 additions & 16 deletions tests/types/eep-schemas.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,7 @@ export interface AuditEntry {
* For gate events: the type of gate requirement (credential, payment, agreement, data_request, identity, combined).
*/
gate_type?:
| 'credential'
| 'payment'
| 'agreement'
| 'data_request'
| 'identity'
| 'allowlist'
| 'reciprocal'
| 'combined';
'credential' | 'payment' | 'agreement' | 'data_request' | 'identity' | 'allowlist' | 'reciprocal' | 'combined';
/**
* Short machine-readable reason code for failures. Not surfaced to requesting agents (logged internally only per EEP §10.8).
*/
Expand Down Expand Up @@ -2122,14 +2115,7 @@ export interface RegistryEntry {
* Gate requirement types supported by this publisher. Agents filter by gate type when selecting interaction partners (e.g., ?gate=payment).
*/
gate_types?: (
| 'credential'
| 'identity'
| 'agreement'
| 'data_request'
| 'payment'
| 'combined'
| 'proof_of_intent'
| 'public'
'credential' | 'identity' | 'agreement' | 'data_request' | 'payment' | 'combined' | 'proof_of_intent' | 'public'
)[];
/**
* Protocol layers supported. Agents filter by layer capability (e.g., ?supports=sse).
Expand Down