mirror of
https://github.com/openai/codex.git
synced 2026-04-25 15:15:15 +00:00
Similar to what @sayan-oai did in openai/codex#8956 for `config.schema.json`, this PR updates the repo so that it includes the output of `codex app-server generate-json-schema` and `codex app-server generate-ts` and adds a test to verify it is in sync with the current code. Motivation: - This makes any schema changes introduced by a PR transparent during code review. - In particular, this should help us catch PRs that would introduce a non-backwards-compatible change to the app schema (eventually, this should also be enforced by tooling). - Once https://github.com/openai/codex/pull/10231 is in to formalize the notion of "experimental" fields, we can work on ensuring the non-experimental bits are backwards-compatible. `codex-rs/app-server-protocol/tests/schema_fixtures.rs` was added as the test and `just write-app-server-schema` can be use to generate the vendored schema files. Incidentally, when I run: ``` rg _ codex-rs/app-server-protocol/schema/typescript/v2 ``` I see a number of `snake_case` names that should be `camelCase`.
129 lines
3.1 KiB
JSON
129 lines
3.1 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"definitions": {
|
|
"ReviewDelivery": {
|
|
"enum": [
|
|
"inline",
|
|
"detached"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"ReviewTarget": {
|
|
"oneOf": [
|
|
{
|
|
"description": "Review the working tree: staged, unstaged, and untracked files.",
|
|
"properties": {
|
|
"type": {
|
|
"enum": [
|
|
"uncommittedChanges"
|
|
],
|
|
"title": "UncommittedChangesReviewTargetType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "UncommittedChangesReviewTarget",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Review changes between the current branch and the given base branch.",
|
|
"properties": {
|
|
"branch": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"baseBranch"
|
|
],
|
|
"title": "BaseBranchReviewTargetType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"branch",
|
|
"type"
|
|
],
|
|
"title": "BaseBranchReviewTarget",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Review the changes introduced by a specific commit.",
|
|
"properties": {
|
|
"sha": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"description": "Optional human-readable label (e.g., commit subject) for UIs.",
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"commit"
|
|
],
|
|
"title": "CommitReviewTargetType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"sha",
|
|
"type"
|
|
],
|
|
"title": "CommitReviewTarget",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Arbitrary instructions, equivalent to the old free-form prompt.",
|
|
"properties": {
|
|
"instructions": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"custom"
|
|
],
|
|
"title": "CustomReviewTargetType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"instructions",
|
|
"type"
|
|
],
|
|
"title": "CustomReviewTarget",
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"properties": {
|
|
"delivery": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/ReviewDelivery"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"description": "Where to run the review: inline (default) on the current thread or detached on a new thread (returned in `reviewThreadId`)."
|
|
},
|
|
"target": {
|
|
"$ref": "#/definitions/ReviewTarget"
|
|
},
|
|
"threadId": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"target",
|
|
"threadId"
|
|
],
|
|
"title": "ReviewStartParams",
|
|
"type": "object"
|
|
} |