mirror of
https://github.com/openai/codex.git
synced 2026-05-03 12:52:11 +03:00
Align app-server create-api-key flow
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -139,6 +139,8 @@ Example with notification opt-out:
|
||||
- `thread/loaded/list` — list the thread ids currently loaded in memory.
|
||||
- `thread/read` — read a stored thread by id without resuming it; optionally include turns via `includeTurns`. The returned `thread` includes `status` (`ThreadStatus`), defaulting to `notLoaded` when the thread is not currently loaded.
|
||||
- `thread/metadata/update` — patch stored thread metadata in sqlite; currently supports updating persisted `gitInfo` fields and returns the refreshed `thread`.
|
||||
- `thread/dependencyEnv/set` — merge session-scoped environment variables into a loaded thread so future spawned commands can inherit them; returns `{}` on success.
|
||||
- `thread/dependencyEnv/contains` — check whether a loaded thread has a session-scoped environment variable override for a given key; returns `{ "contains": true | false }`.
|
||||
- `thread/status/changed` — notification emitted when a loaded thread’s status changes (`threadId` + new `status`).
|
||||
- `thread/archive` — move a thread’s rollout file into the archived directory; returns `{}` on success and emits `thread/archived`.
|
||||
- `thread/unsubscribe` — unsubscribe this connection from thread turn/item events. If this was the last subscriber, the server shuts down and unloads the thread, then emits `thread/closed`.
|
||||
@@ -391,6 +393,24 @@ Use `thread/metadata/update` to patch sqlite-backed metadata for a thread withou
|
||||
} }
|
||||
```
|
||||
|
||||
### Example: Set thread dependency environment
|
||||
|
||||
Use `thread/dependencyEnv/set` to merge session-scoped environment variables into a loaded thread. These values are inherited by future spawned commands for that thread. Use `thread/dependencyEnv/contains` to check whether a key is already present in the thread's dependency environment.
|
||||
|
||||
```json
|
||||
{ "method": "thread/dependencyEnv/set", "id": 26, "params": {
|
||||
"threadId": "thr_123",
|
||||
"values": { "OPENAI_API_KEY": "sk-..." }
|
||||
} }
|
||||
{ "id": 26, "result": {} }
|
||||
|
||||
{ "method": "thread/dependencyEnv/contains", "id": 27, "params": {
|
||||
"threadId": "thr_123",
|
||||
"key": "OPENAI_API_KEY"
|
||||
} }
|
||||
{ "id": 27, "result": { "contains": true } }
|
||||
```
|
||||
|
||||
### Example: Archive a thread
|
||||
|
||||
Use `thread/archive` to move the persisted rollout (stored as a JSONL file on disk) into the archived sessions directory.
|
||||
|
||||
Reference in New Issue
Block a user