Skip to content

Commit db920e4

Browse files
committed
chore(protocol): migrate ts-json-schema-generator to v2 (no legacy fallback); regenerate schema + types\n\n- Pin npx to ts-json-schema-generator@^2; use boolean --additional-properties\n- Run end-to-end gen: cargo helper → schema postprocess → datamodel-codegen\n- Update CHANGELOG entry for v2 requirement\n\nNotes:\n- Keep generated files in tree; Codex review action should ignore diffs for generated content.
1 parent cd2ca4f commit db920e4

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The format is based on Keep a Changelog and this project adheres to Semantic Ver
99
- Unify protocol generation to TS → JSON Schema → Pydantic v2 using a native helper binary (`codex-protocol-schema`).
1010
- Generate readable union variants (e.g., `EventMsgError`, `ClientRequestNewConversation`) via schema post‑processing.
1111
- Allow extra fields on generated models via a shared `BaseModelWithExtras`.
12+
- Require `ts-json-schema-generator` v2.x (no legacy fallback) and use boolean `--additional-properties` flag accordingly.
1213

1314
### Removed
1415
- Old TS→Python converter script (`scripts/generate_protocol_py.py`) and legacy Makefile flow.

codex/protocol/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# generated by datamodel-codegen:
22
# ruff: noqa: F821
33
# filename: protocol.schema.json
4-
# timestamp: 2025-09-14T16:47:21+00:00
4+
# timestamp: 2025-09-14T17:06:06+00:00
55

66
from __future__ import annotations
77

crates/codex_native/src/bin/protocol_schema.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,10 @@ fn run_typescript_json_schema(tsconfig_path: &Path, schema_path: &Path) -> Resul
129129
));
130130
}
131131

132+
// Require ts-json-schema-generator v2.x (no legacy fallback).
132133
let status = Command::new(npx)
133134
.arg("--yes")
134-
.arg("ts-json-schema-generator@1.5.1")
135+
.arg("ts-json-schema-generator@^2")
135136
.arg("--path")
136137
.arg(&entry)
137138
.arg("--tsconfig")

0 commit comments

Comments
 (0)