AI OpenAPI
This package publishes the V2 AI platform HTTP contract. Runtime structure is reconciled against an isolated service export; manually maintained explanations are retained.
Primary file:
openapi.yaml
Rules:
- AI platform server implementation must match this contract.
- Python and TypeScript SDKs must be generated or verified against this contract.
- Contract API may call AI platform only through SDK/OpenAPI clients.
The 2026-09-09 local synchronization contains 72 paths, 81 operations and 117 component schemas. Four operations documented in the previous publication are not registered in the inspected runtime; their definitions and referenced components remain under x-yuqei-legacy-contract, outside active paths. This appendix does not assert those endpoints are available.
x-yuqei-sync records the runtime evidence and approved preservation policy. Documentation from replaced fields remains under x-yuqei-unmatched-documentation. Historical nullable schema syntax has been normalized to OpenAPI 3.1 null unions. No generated SDK or consumer was replaced in this batch; changes to operationId are recorded for later client migration.
See synchronization rules and check commands and before/after evidence. Re-export from current source before claiming current-source consistency; do not reuse a historical runtime JSON as proof for newer source.
TP06.10 increment: adds read-only GET /api/v1/prompt-templates/scene-migration-routes and POST /api/v1/prompt-templates/{name}/scene-migration-preview. Migration creates only a preview payload; a separate draft save and explicit publication are required. Published Prompt names are platform-shared in the current AI repository, not tenant-scoped. Publication and rollback previews explain all registered scenes sharing a route and do not claim per-scene version rollout. Existing pinned jobs retain their captured Prompt. The historical synchronization counts above are not a count of this newer source.
TP06.11 increment: POST /api/v1/legal/contract-intake/jobs accepts an idempotency key, natural-language text, a template field snapshot and existing values. It creates a contract_intake model job; refresh, cancellation and retry reuse the model-job endpoints. The result contains sourced, editable field proposals and clarification questions; it does not update contracts or input forms. The built-in development Prompt is versioned separately from frozen contract-draft and review evaluations. This fragment can be checked without model calls or database access using yuqei-infra/scripts/tp06-11/sync-intake-ai-openapi.py --check with the local source paths on PYTHONPATH. This is a scoped contract check, not a claim that all older OpenAPI fragments have been reconciled.
TP06.24.1 runtime increment: POST /api/v1/legal/contract-draft-semantic-review/jobs
creates an idempotent contract_draft_semantic_review job for an already frozen
candidate. It requires trusted tenant and user context, captures a fixed Prompt
snapshot, and allows only an initial attempt plus one explicit retry through the
common model-job endpoint. Failed, cancelled, fallback, and invalid-receipt jobs
do not pass. Its receipt is neither cryptographically signed nor legal approval,
and this receipt does not itself authorize repair or adoption. TP06.24.2 adds a
server-built, evidence-bound repair context to contract_draft: one repair
generation and its post-repair semantic review each have a one-attempt ceiling.
The post-repair review must locate and report every original actionable finding;
it remains a model review rather than legal approval.
Run yuqei-infra/scripts/tp06-24-1/sync-semantic-review-ai-openapi.py --check
to verify the checked-in scoped fragment against an isolated _env_file=None,
memory-repository app. The synchronizer updates only this route, its recursive
DTOs, ContractDraftRequest, and the maintained operation enum; it makes no
model calls or external database writes.