Skip to content

Commit 521db22

Browse files
committed
refactor(codex): deduplicate generated protocol schemas
1 parent b6b440d commit 521db22

13 files changed

Lines changed: 3264 additions & 9344 deletions

‎extensions/codex/src/app-server/protocol-generated/json/v2/CodexAppServerProtocolDefinitions.json‎

Lines changed: 2840 additions & 0 deletions
Large diffs are not rendered by default.

‎extensions/codex/src/app-server/protocol-generated/json/v2/ErrorNotification.json‎

Lines changed: 1 addition & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -1,183 +1,8 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"definitions": {
4-
"CodexErrorInfo": {
5-
"description": "This translation layer make sure that we expose codex error code in camel case.\n\nWhen an upstream HTTP status is available (for example, from the Responses API or a provider), it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant.",
6-
"oneOf": [
7-
{
8-
"additionalProperties": false,
9-
"properties": {
10-
"httpConnectionFailed": {
11-
"properties": {
12-
"httpStatusCode": {
13-
"format": "uint16",
14-
"minimum": 0,
15-
"type": [
16-
"integer",
17-
"null"
18-
]
19-
}
20-
},
21-
"type": "object"
22-
}
23-
},
24-
"required": [
25-
"httpConnectionFailed"
26-
],
27-
"title": "HttpConnectionFailedCodexErrorInfo",
28-
"type": "object"
29-
},
30-
{
31-
"additionalProperties": false,
32-
"description": "Failed to connect to the response SSE stream.",
33-
"properties": {
34-
"responseStreamConnectionFailed": {
35-
"properties": {
36-
"httpStatusCode": {
37-
"format": "uint16",
38-
"minimum": 0,
39-
"type": [
40-
"integer",
41-
"null"
42-
]
43-
}
44-
},
45-
"type": "object"
46-
}
47-
},
48-
"required": [
49-
"responseStreamConnectionFailed"
50-
],
51-
"title": "ResponseStreamConnectionFailedCodexErrorInfo",
52-
"type": "object"
53-
},
54-
{
55-
"additionalProperties": false,
56-
"description": "The response SSE stream disconnected in the middle of a turn before completion.",
57-
"properties": {
58-
"responseStreamDisconnected": {
59-
"properties": {
60-
"httpStatusCode": {
61-
"format": "uint16",
62-
"minimum": 0,
63-
"type": [
64-
"integer",
65-
"null"
66-
]
67-
}
68-
},
69-
"type": "object"
70-
}
71-
},
72-
"required": [
73-
"responseStreamDisconnected"
74-
],
75-
"title": "ResponseStreamDisconnectedCodexErrorInfo",
76-
"type": "object"
77-
},
78-
{
79-
"additionalProperties": false,
80-
"description": "Reached the retry limit for responses.",
81-
"properties": {
82-
"responseTooManyFailedAttempts": {
83-
"properties": {
84-
"httpStatusCode": {
85-
"format": "uint16",
86-
"minimum": 0,
87-
"type": [
88-
"integer",
89-
"null"
90-
]
91-
}
92-
},
93-
"type": "object"
94-
}
95-
},
96-
"required": [
97-
"responseTooManyFailedAttempts"
98-
],
99-
"title": "ResponseTooManyFailedAttemptsCodexErrorInfo",
100-
"type": "object"
101-
},
102-
{
103-
"additionalProperties": false,
104-
"description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`.",
105-
"properties": {
106-
"activeTurnNotSteerable": {
107-
"properties": {
108-
"turnKind": {
109-
"$ref": "#/definitions/NonSteerableTurnKind"
110-
}
111-
},
112-
"required": [
113-
"turnKind"
114-
],
115-
"type": "object"
116-
}
117-
},
118-
"required": [
119-
"activeTurnNotSteerable"
120-
],
121-
"title": "ActiveTurnNotSteerableCodexErrorInfo",
122-
"type": "object"
123-
},
124-
{
125-
"enum": [
126-
"contextWindowExceeded",
127-
"sessionBudgetExceeded",
128-
"usageLimitExceeded",
129-
"serverOverloaded",
130-
"cyberPolicy",
131-
"internalServerError",
132-
"unauthorized",
133-
"badRequest",
134-
"threadRollbackFailed",
135-
"sandboxError",
136-
"other"
137-
],
138-
"type": "string"
139-
}
140-
]
141-
},
142-
"NonSteerableTurnKind": {
143-
"enum": [
144-
"review",
145-
"compact"
146-
],
147-
"type": "string"
148-
},
149-
"TurnError": {
150-
"properties": {
151-
"additionalDetails": {
152-
"default": null,
153-
"type": [
154-
"string",
155-
"null"
156-
]
157-
},
158-
"codexErrorInfo": {
159-
"anyOf": [
160-
{
161-
"$ref": "#/definitions/CodexErrorInfo"
162-
},
163-
{
164-
"type": "null"
165-
}
166-
]
167-
},
168-
"message": {
169-
"type": "string"
170-
}
171-
},
172-
"required": [
173-
"message"
174-
],
175-
"type": "object"
176-
}
177-
},
1783
"properties": {
1794
"error": {
180-
"$ref": "#/definitions/TurnError"
5+
"$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/TurnError"
1816
},
1827
"threadId": {
1838
"type": "string"

‎extensions/codex/src/app-server/protocol-generated/json/v2/GetAccountResponse.json‎

Lines changed: 1 addition & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,10 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"definitions": {
4-
"Account": {
5-
"oneOf": [
6-
{
7-
"properties": {
8-
"type": {
9-
"enum": [
10-
"apiKey"
11-
],
12-
"title": "ApiKeyAccountType",
13-
"type": "string"
14-
}
15-
},
16-
"required": [
17-
"type"
18-
],
19-
"title": "ApiKeyAccount",
20-
"type": "object"
21-
},
22-
{
23-
"properties": {
24-
"email": {
25-
"type": [
26-
"string",
27-
"null"
28-
]
29-
},
30-
"planType": {
31-
"$ref": "#/definitions/PlanType"
32-
},
33-
"type": {
34-
"enum": [
35-
"chatgpt"
36-
],
37-
"title": "ChatgptAccountType",
38-
"type": "string"
39-
}
40-
},
41-
"required": [
42-
"email",
43-
"planType",
44-
"type"
45-
],
46-
"title": "ChatgptAccount",
47-
"type": "object"
48-
},
49-
{
50-
"properties": {
51-
"type": {
52-
"enum": [
53-
"amazonBedrock"
54-
],
55-
"title": "AmazonBedrockAccountType",
56-
"type": "string"
57-
},
58-
"usesCodexManagedCredentials": {
59-
"default": false,
60-
"type": "boolean"
61-
}
62-
},
63-
"required": [
64-
"type"
65-
],
66-
"title": "AmazonBedrockAccount",
67-
"type": "object"
68-
}
69-
]
70-
},
71-
"PlanType": {
72-
"enum": [
73-
"free",
74-
"go",
75-
"plus",
76-
"pro",
77-
"prolite",
78-
"team",
79-
"self_serve_business_usage_based",
80-
"business",
81-
"ent26",
82-
"enterprise_cbp_usage_based",
83-
"enterprise",
84-
"edu",
85-
"unknown"
86-
],
87-
"type": "string"
88-
}
89-
},
903
"properties": {
914
"account": {
925
"anyOf": [
936
{
94-
"$ref": "#/definitions/Account"
7+
"$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/Account"
958
},
969
{
9710
"type": "null"

0 commit comments

Comments
 (0)