# `@ai-matrx/agents/generated` — the server's client contract

Every file here is GENERATED from the aidream server source. Never edit one by hand.

- `uv run python scripts/generate_types.py` (from the aidream root) writes the stream events,
  LLM enums/params, source attribution, workflow events and canvas chat files.
- `uv run python scripts/generate_types.py api --direct` writes `openapi.json`
  through `../scripts/typegen/write-api-types.mjs`: contract pin, then the drop guard over every
  client checkout beside aidream, then normalization. A refusal writes
  nothing (DD-128). `scripts/generate_types.py --check` runs
  `../scripts/typegen/check-api-types-fresh.mjs`: a hand-edited `openapi.json`
  fails it (release health `frontend-type-snapshots`).
- `scripts/mandates_generate.py` writes `provision-offers.ts`.
- `hr-contracts.api-types.ts`: `node apps/shared/matrx-agents/scripts/typegen/gen-hr-contracts.mjs`.

The TypeScript view of the contract is `@ai-matrx/api/types` (`components`, `paths`), generated by the api package from `api-contract/`.

Clients import `@ai-matrx/agents/generated/<name>` and keep NO copy (chat package
independence P15, 2026-10-02). A server change and its types land in the same aidream commit;
the publish train ships them.
