Compare commits

..
3 Commits
Author SHA1 Message Date
Codex ab5cc4fbfe Support string Codex request IDs 2026-05-25 06:04:31 +00:00
Codex b46c4beb86 Handle legacy Codex approval requests 2026-05-25 05:43:43 +00:00
Codex 9dbf7727c5 Support Codex app-server 0.133 2026-05-25 05:38:32 +00:00
52 changed files with 4898 additions and 2245 deletions
+95 -20
View File
@@ -7,6 +7,7 @@ import (
"fmt" "fmt"
"net" "net"
"net/http" "net/http"
"strconv"
"strings" "strings"
"sync" "sync"
"sync/atomic" "sync/atomic"
@@ -22,19 +23,77 @@ type Client struct {
mu sync.Mutex mu sync.Mutex
conn *websocket.Conn conn *websocket.Conn
pending map[int64]chan rpcResult pending map[string]chan rpcResult
events chan Event events chan Event
connected bool connected bool
} }
type Event struct { type Event struct {
ID *int64 ID *RequestID
Method string Method string
Params json.RawMessage Params json.RawMessage
ServerRequest bool ServerRequest bool
Err error Err error
} }
type RequestID struct {
value any
key string
}
func IntRequestID(id int64) RequestID {
return RequestID{value: id, key: "i:" + strconv.FormatInt(id, 10)}
}
func ParseRequestIDKey(key string) (RequestID, error) {
key = strings.TrimSpace(key)
if strings.HasPrefix(key, "i:") {
id, err := strconv.ParseInt(strings.TrimPrefix(key, "i:"), 10, 64)
if err != nil {
return RequestID{}, err
}
return IntRequestID(id), nil
}
if strings.HasPrefix(key, "s:") {
value := strings.TrimPrefix(key, "s:")
return RequestID{value: value, key: "s:" + value}, nil
}
if id, err := strconv.ParseInt(key, 10, 64); err == nil {
return IntRequestID(id), nil
}
if key == "" {
return RequestID{}, errors.New("request id is empty")
}
return RequestID{value: key, key: "s:" + key}, nil
}
func ParseRequestID(raw json.RawMessage) (RequestID, bool, error) {
trimmed := strings.TrimSpace(string(raw))
if trimmed == "" || trimmed == "null" {
return RequestID{}, false, nil
}
if strings.HasPrefix(trimmed, "\"") {
var value string
if err := json.Unmarshal(raw, &value); err != nil {
return RequestID{}, false, err
}
return RequestID{value: value, key: "s:" + value}, true, nil
}
var value int64
if err := json.Unmarshal(raw, &value); err != nil {
return RequestID{}, false, err
}
return IntRequestID(value), true, nil
}
func (id RequestID) Key() string {
return id.key
}
func (id RequestID) Value() any {
return id.value
}
type RPCError struct { type RPCError struct {
Code int `json:"code"` Code int `json:"code"`
Message string `json:"message"` Message string `json:"message"`
@@ -87,7 +146,7 @@ func New(socketPath, version string) *Client {
return &Client{ return &Client{
socketPath: socketPath, socketPath: socketPath,
version: version, version: version,
pending: make(map[int64]chan rpcResult), pending: make(map[string]chan rpcResult),
events: make(chan Event, 128), events: make(chan Event, 128),
} }
} }
@@ -315,13 +374,24 @@ func (c *Client) ListModels(ctx context.Context) ([]Model, error) {
return result.Data, nil return result.Data, nil
} }
func (c *Client) RespondServerRequest(ctx context.Context, requestID int64, result any) error { func (c *Client) RespondServerRequest(ctx context.Context, requestID RequestID, result any) error {
return c.respondServerRequest(ctx, responseEnvelope{ID: requestID.Value(), Result: result})
}
func (c *Client) RespondServerRequestError(ctx context.Context, requestID RequestID, code int, message string) error {
return c.respondServerRequest(ctx, responseEnvelope{
ID: requestID.Value(),
Error: RPCError{Code: code, Message: message},
})
}
func (c *Client) respondServerRequest(ctx context.Context, response responseEnvelope) error {
if err := c.EnsureConnected(ctx); err != nil { if err := c.EnsureConnected(ctx); err != nil {
return err return err
} }
done := make(chan error, 1) done := make(chan error, 1)
go func() { go func() {
done <- c.write(responseEnvelope{ID: requestID, Result: result}) done <- c.write(response)
}() }()
select { select {
case <-ctx.Done(): case <-ctx.Done():
@@ -340,12 +410,12 @@ func (c *Client) call(ctx context.Context, method string, params any, result any
c.mu.Unlock() c.mu.Unlock()
return errors.New("codex app-server is not connected") return errors.New("codex app-server is not connected")
} }
c.pending[id] = ch c.pending[IntRequestID(id).Key()] = ch
c.mu.Unlock() c.mu.Unlock()
if err := c.write(requestEnvelope{ID: id, Method: method, Params: params}); err != nil { if err := c.write(requestEnvelope{ID: id, Method: method, Params: params}); err != nil {
c.mu.Lock() c.mu.Lock()
delete(c.pending, id) delete(c.pending, IntRequestID(id).Key())
c.mu.Unlock() c.mu.Unlock()
return err return err
} }
@@ -353,7 +423,7 @@ func (c *Client) call(ctx context.Context, method string, params any, result any
select { select {
case <-ctx.Done(): case <-ctx.Done():
c.mu.Lock() c.mu.Lock()
delete(c.pending, id) delete(c.pending, IntRequestID(id).Key())
c.mu.Unlock() c.mu.Unlock()
return ctx.Err() return ctx.Err()
case rpc := <-ch: case rpc := <-ch:
@@ -387,17 +457,22 @@ func (c *Client) readLoop(conn *websocket.Conn) {
c.failConnection(conn, err) c.failConnection(conn, err)
return return
} }
if env.Method != "" && env.ID != nil { id, hasID, err := ParseRequestID(env.ID)
if err != nil {
c.failConnection(conn, fmt.Errorf("decode request id: %w", err))
return
}
if env.Method != "" && hasID {
c.events <- Event{ c.events <- Event{
ID: env.ID, ID: &id,
Method: env.Method, Method: env.Method,
Params: env.Params, Params: env.Params,
ServerRequest: true, ServerRequest: true,
} }
continue continue
} }
if env.ID != nil { if hasID {
c.completeCall(*env.ID, env.Result, env.Error) c.completeCall(id, env.Result, env.Error)
continue continue
} }
if env.Method != "" { if env.Method != "" {
@@ -409,10 +484,10 @@ func (c *Client) readLoop(conn *websocket.Conn) {
} }
} }
func (c *Client) completeCall(id int64, result json.RawMessage, rpcErr *RPCError) { func (c *Client) completeCall(id RequestID, result json.RawMessage, rpcErr *RPCError) {
c.mu.Lock() c.mu.Lock()
ch := c.pending[id] ch := c.pending[id.Key()]
delete(c.pending, id) delete(c.pending, id.Key())
c.mu.Unlock() c.mu.Unlock()
if ch == nil { if ch == nil {
return return
@@ -431,7 +506,7 @@ func (c *Client) failConnection(conn *websocket.Conn, err error) {
c.connected = false c.connected = false
} }
pending := c.pending pending := c.pending
c.pending = make(map[int64]chan rpcResult) c.pending = make(map[string]chan rpcResult)
c.mu.Unlock() c.mu.Unlock()
for _, ch := range pending { for _, ch := range pending {
@@ -501,13 +576,13 @@ type notificationEnvelope struct {
} }
type responseEnvelope struct { type responseEnvelope struct {
ID int64 `json:"id"` ID any `json:"id"`
Result any `json:"result,omitempty"` Result any `json:"result,omitempty"`
Error any `json:"error,omitempty"` Error any `json:"error,omitempty"`
} }
type incomingEnvelope struct { type incomingEnvelope struct {
ID *int64 `json:"id,omitempty"` ID json.RawMessage `json:"id,omitempty"`
Method string `json:"method,omitempty"` Method string `json:"method,omitempty"`
Params json.RawMessage `json:"params,omitempty"` Params json.RawMessage `json:"params,omitempty"`
Result json.RawMessage `json:"result,omitempty"` Result json.RawMessage `json:"result,omitempty"`
+6 -4
View File
@@ -60,7 +60,7 @@ func TestClientWebSocketUnixJSONRPC(t *testing.T) {
} }
if err := conn.WriteJSON(map[string]any{ if err := conn.WriteJSON(map[string]any{
"id": 99, "id": "approval-99",
"method": "item/commandExecution/requestApproval", "method": "item/commandExecution/requestApproval",
"params": map[string]any{"threadId": "thr_1"}, "params": map[string]any{"threadId": "thr_1"},
}); err != nil { }); err != nil {
@@ -138,7 +138,7 @@ func TestClientWebSocketUnixJSONRPC(t *testing.T) {
serverDone <- err serverDone <- err
return return
} }
if response["id"].(float64) != 99 || response["result"] != "accept" { if response["id"] != "approval-99" || response["result"] != "accept" {
payload, _ := json.Marshal(response) payload, _ := json.Marshal(response)
serverDone <- unexpectedMessage("approval response", string(payload)) serverDone <- unexpectedMessage("approval response", string(payload))
return return
@@ -156,11 +156,13 @@ func TestClientWebSocketUnixJSONRPC(t *testing.T) {
} }
defer client.Close() defer client.Close()
var approvalRequestID RequestID
select { select {
case event := <-client.Events(): case event := <-client.Events():
if !event.ServerRequest || event.ID == nil || *event.ID != 99 { if !event.ServerRequest || event.ID == nil || event.ID.Key() != "s:approval-99" {
t.Fatalf("unexpected event: %+v", event) t.Fatalf("unexpected event: %+v", event)
} }
approvalRequestID = *event.ID
case <-ctx.Done(): case <-ctx.Done():
t.Fatal(ctx.Err()) t.Fatal(ctx.Err())
} }
@@ -182,7 +184,7 @@ func TestClientWebSocketUnixJSONRPC(t *testing.T) {
if err := client.SetThreadName(ctx, "thr_1", "Short title"); err != nil { if err := client.SetThreadName(ctx, "thr_1", "Short title"); err != nil {
t.Fatal(err) t.Fatal(err)
} }
if err := client.RespondServerRequest(ctx, 99, "accept"); err != nil { if err := client.RespondServerRequest(ctx, approvalRequestID, "accept"); err != nil {
t.Fatal(err) t.Fatal(err)
} }
+103 -18
View File
@@ -1134,7 +1134,7 @@ func (b *Bot) handleApprovalCallback(ctx context.Context, callback *CallbackQuer
if approval.Status != "pending" { if approval.Status != "pending" {
return b.tg.AnswerCallbackQuery(ctx, callback.ID, "Already resolved.") return b.tg.AnswerCallbackQuery(ctx, callback.ID, "Already resolved.")
} }
requestID, err := strconv.ParseInt(approval.CodexRequestID, 10, 64) requestID, err := codexapp.ParseRequestIDKey(approval.CodexRequestID)
if err != nil { if err != nil {
return b.tg.AnswerCallbackQuery(ctx, callback.ID, "Invalid request id.") return b.tg.AnswerCallbackQuery(ctx, callback.ID, "Invalid request id.")
} }
@@ -1169,6 +1169,9 @@ func (b *Bot) handleCodexEvents(ctx context.Context) {
if event.ServerRequest { if event.ServerRequest {
if err := b.handleCodexServerRequest(ctx, event); err != nil { if err := b.handleCodexServerRequest(ctx, event); err != nil {
b.logger.Printf("server request %s: %v", event.Method, err) b.logger.Printf("server request %s: %v", event.Method, err)
if event.ID != nil {
_ = b.codex.RespondServerRequestError(ctx, *event.ID, -32603, err.Error())
}
} }
continue continue
} }
@@ -1657,6 +1660,19 @@ func (b *Bot) handleCodexNotification(ctx context.Context, event codexapp.Event)
} }
return b.store.SyncThreadTitleByCodexID(ctx, params.ThreadID, title) return b.store.SyncThreadTitleByCodexID(ctx, params.ThreadID, title)
} }
case "thread/settings/updated":
var params struct {
ThreadID string `json:"threadId"`
ThreadSettings struct {
CWD string `json:"cwd"`
} `json:"threadSettings"`
}
if err := json.Unmarshal(event.Params, &params); err != nil {
return err
}
if params.ThreadID != "" {
return b.syncThreadWorkspaceFromCWD(ctx, params.ThreadID, params.ThreadSettings.CWD)
}
case "serverRequest/resolved": case "serverRequest/resolved":
var params struct { var params struct {
ThreadID string `json:"threadId"` ThreadID string `json:"threadId"`
@@ -1667,29 +1683,62 @@ func (b *Bot) handleCodexNotification(ctx context.Context, event codexapp.Event)
return nil return nil
} }
func (b *Bot) syncThreadWorkspaceFromCWD(ctx context.Context, codexThreadID, cwd string) error {
thread, err := b.store.GetThreadByCodexID(ctx, codexThreadID)
if err != nil {
if errors.Is(err, sql.ErrNoRows) {
return nil
}
return err
}
workspace, ok, err := b.workspaceForCodexCWD(ctx, cwd)
if err != nil || !ok {
return err
}
if workspace.ID == thread.WorkspaceID {
return nil
}
if err := b.store.SyncThreadWorkspace(ctx, thread.TelegramUserID, thread.ID, workspace.ID); err != nil {
return err
}
session, err := b.store.GetSession(ctx, thread.TelegramUserID)
if err != nil {
return err
}
if session.ActiveThreadID == thread.ID {
return b.store.SetSessionWorkspace(ctx, thread.TelegramUserID, workspace.ID)
}
return nil
}
func (b *Bot) handleCodexServerRequest(ctx context.Context, event codexapp.Event) error { func (b *Bot) handleCodexServerRequest(ctx context.Context, event codexapp.Event) error {
if event.ID == nil { if event.ID == nil {
return nil return errors.New("server request missing id")
} }
switch event.Method { switch event.Method {
case "item/commandExecution/requestApproval", "item/fileChange/requestApproval", "item/permissions/requestApproval": case "item/commandExecution/requestApproval", "item/fileChange/requestApproval", "item/permissions/requestApproval":
case "execCommandApproval", "applyPatchApproval":
default: default:
b.logger.Printf("unhandled server request: %s", event.Method) return fmt.Errorf("unsupported Codex server request: %s", event.Method)
return nil
} }
var params struct { var params struct {
ThreadID string `json:"threadId"` ThreadID string `json:"threadId"`
TurnID string `json:"turnId"` ConversationID string `json:"conversationId"`
ItemID string `json:"itemId"` TurnID string `json:"turnId"`
Reason string `json:"reason"` ItemID string `json:"itemId"`
CallID string `json:"callId"`
ApprovalID string `json:"approvalId"`
Reason string `json:"reason"`
} }
if err := json.Unmarshal(event.Params, &params); err != nil { if err := json.Unmarshal(event.Params, &params); err != nil {
return err return err
} }
if params.ThreadID == "" { threadID := firstNonEmpty(params.ThreadID, params.ConversationID)
if threadID == "" {
return errors.New("approval request missing threadId") return errors.New("approval request missing threadId")
} }
thread, err := b.store.GetThreadByCodexID(ctx, params.ThreadID) itemID := firstNonEmpty(params.ItemID, params.ApprovalID, params.CallID)
thread, err := b.store.GetThreadByCodexID(ctx, threadID)
if err != nil { if err != nil {
return err return err
} }
@@ -1700,10 +1749,10 @@ func (b *Bot) handleCodexServerRequest(ctx context.Context, event codexapp.Event
kind := event.Method kind := event.Method
approval, err := b.store.UpsertPendingApproval(ctx, store.PendingApproval{ approval, err := b.store.UpsertPendingApproval(ctx, store.PendingApproval{
TelegramUserID: thread.TelegramUserID, TelegramUserID: thread.TelegramUserID,
CodexRequestID: strconv.FormatInt(*event.ID, 10), CodexRequestID: event.ID.Key(),
CodexThreadID: params.ThreadID, CodexThreadID: threadID,
TurnID: params.TurnID, TurnID: params.TurnID,
ItemID: params.ItemID, ItemID: itemID,
Kind: kind, Kind: kind,
PayloadJSON: string(pretty), PayloadJSON: string(pretty),
}) })
@@ -1715,7 +1764,7 @@ func (b *Bot) handleCodexServerRequest(ctx context.Context, event codexapp.Event
} }
text := renderApprovalHTML(kind, event.Params, "") text := renderApprovalHTML(kind, event.Params, "")
markup := approvalMarkup(approval.ID) markup := approvalMarkup(approval.ID)
if msg, ok, err := b.attachApprovalToToolMessage(ctx, params.ThreadID, params.ItemID, text, markup); err != nil { if msg, ok, err := b.attachApprovalToToolMessage(ctx, threadID, itemID, text, markup); err != nil {
return err return err
} else if ok { } else if ok {
return b.store.UpdatePendingApprovalMessage(ctx, approval.ID, msg.Chat.ID, msg.MessageID) return b.store.UpdatePendingApprovalMessage(ctx, approval.ID, msg.Chat.ID, msg.MessageID)
@@ -1731,6 +1780,15 @@ func (b *Bot) handleCodexServerRequest(ctx context.Context, event codexapp.Event
return b.store.UpdatePendingApprovalMessage(ctx, approval.ID, msg.Chat.ID, msg.MessageID) return b.store.UpdatePendingApprovalMessage(ctx, approval.ID, msg.Chat.ID, msg.MessageID)
} }
func firstNonEmpty(values ...string) string {
for _, value := range values {
if trimmed := strings.TrimSpace(value); trimmed != "" {
return trimmed
}
}
return ""
}
func (b *Bot) newOutputState(chatID int64) *outputState { func (b *Bot) newOutputState(chatID int64) *outputState {
return &outputState{ return &outputState{
chatID: chatID, chatID: chatID,
@@ -2681,6 +2739,9 @@ func approvalMarkup(id int64) *InlineKeyboardMarkup {
} }
func approvalResponse(approval store.PendingApproval, decision string) any { func approvalResponse(approval store.PendingApproval, decision string) any {
if isLegacyApprovalKind(approval.Kind) {
return map[string]any{"decision": legacyApprovalDecision(decision)}
}
if approval.Kind != "item/permissions/requestApproval" { if approval.Kind != "item/permissions/requestApproval" {
return map[string]any{"decision": decision} return map[string]any{"decision": decision}
} }
@@ -2705,12 +2766,36 @@ func approvalResponse(approval store.PendingApproval, decision string) any {
} }
} }
func isLegacyApprovalKind(kind string) bool {
switch kind {
case "execCommandApproval", "applyPatchApproval":
return true
default:
return false
}
}
func legacyApprovalDecision(decision string) string {
switch decision {
case "accept":
return "approved"
case "acceptForSession":
return "approved_for_session"
case "decline":
return "denied"
case "cancel":
return "abort"
default:
return decision
}
}
func renderApprovalHTML(kind string, raw json.RawMessage, status string) string { func renderApprovalHTML(kind string, raw json.RawMessage, status string) string {
title := "Codex approval requested" title := "Codex approval requested"
if strings.Contains(kind, "commandExecution") { if strings.Contains(kind, "commandExecution") || kind == "execCommandApproval" {
title = "Codex requests command approval" title = "Codex requests command approval"
} }
if strings.Contains(kind, "fileChange") { if strings.Contains(kind, "fileChange") || kind == "applyPatchApproval" {
title = "Codex requests file change approval" title = "Codex requests file change approval"
} }
if strings.Contains(kind, "permissions") { if strings.Contains(kind, "permissions") {
@@ -2723,7 +2808,7 @@ func renderApprovalHTML(kind string, raw json.RawMessage, status string) string
if reason, _ := params["reason"].(string); reason != "" { if reason, _ := params["reason"].(string); reason != "" {
lines = append(lines, "", reason) lines = append(lines, "", reason)
} }
for _, key := range []string{"command", "cwd", "grantRoot", "permissions"} { for _, key := range []string{"command", "cwd", "grantRoot", "permissions", "fileChanges"} {
if value, ok := params[key]; ok { if value, ok := params[key]; ok {
lines = append(lines, fmt.Sprintf("%s: %s", argumentLabel(key), conciseValue(value))) lines = append(lines, fmt.Sprintf("%s: %s", argumentLabel(key), conciseValue(value)))
} }
@@ -2765,7 +2850,7 @@ func renderApprovalDetailsHTML(kind string, raw json.RawMessage) string {
} }
parts = append(parts, FieldHTML(label, text)) parts = append(parts, FieldHTML(label, text))
} }
for _, key := range []string{"command", "cwd", "grantRoot", "permissions", "reason"} { for _, key := range []string{"command", "cwd", "grantRoot", "permissions", "fileChanges", "parsedCmd", "reason"} {
if value, ok := params[key]; ok { if value, ok := params[key]; ok {
appendValue(argumentLabel(key), value) appendValue(argumentLabel(key), value)
} }
+28
View File
@@ -84,6 +84,34 @@ func TestApprovalResponseForPermissions(t *testing.T) {
} }
} }
func TestApprovalResponseForLegacyApproval(t *testing.T) {
approval := store.PendingApproval{Kind: "execCommandApproval"}
response, ok := approvalResponse(approval, "accept").(map[string]any)
if !ok {
t.Fatal("legacy response should be a map")
}
if response["decision"] != "approved" {
t.Fatalf("legacy accept = %v, want approved", response["decision"])
}
response, ok = approvalResponse(approval, "decline").(map[string]any)
if !ok {
t.Fatal("legacy decline response should be a map")
}
if response["decision"] != "denied" {
t.Fatalf("legacy decline = %v, want denied", response["decision"])
}
}
func TestRenderLegacyApprovalDetails(t *testing.T) {
raw := json.RawMessage(`{"conversationId":"thr_1","callId":"call_1","command":["git","remote","-v"],"cwd":"/workspace/project","reason":"Need remote details"}`)
text := renderApprovalHTML("execCommandApproval", raw, "")
for _, want := range []string{"Codex requests command approval", "Need remote details", "language-bash", "git", "CWD"} {
if !strings.Contains(text, want) {
t.Fatalf("legacy approval render missing %q in %q", want, text)
}
}
}
func TestEditReplyMarkupClearsInlineKeyboard(t *testing.T) { func TestEditReplyMarkupClearsInlineKeyboard(t *testing.T) {
markup := editReplyMarkup(nil) markup := editReplyMarkup(nil)
if markup == nil { if markup == nil {
+459 -278
View File
@@ -172,6 +172,78 @@
}, },
"title": "Thread/name/setRequest" "title": "Thread/name/setRequest"
}, },
{
"type": "object",
"required": [
"id",
"method",
"params"
],
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"type": "string",
"enum": [
"thread/goal/set"
],
"title": "Thread/goal/setRequestMethod"
},
"params": {
"$ref": "#/definitions/ThreadGoalSetParams"
}
},
"title": "Thread/goal/setRequest"
},
{
"type": "object",
"required": [
"id",
"method",
"params"
],
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"type": "string",
"enum": [
"thread/goal/get"
],
"title": "Thread/goal/getRequestMethod"
},
"params": {
"$ref": "#/definitions/ThreadGoalGetParams"
}
},
"title": "Thread/goal/getRequest"
},
{
"type": "object",
"required": [
"id",
"method",
"params"
],
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"type": "string",
"enum": [
"thread/goal/clear"
],
"title": "Thread/goal/clearRequestMethod"
},
"params": {
"$ref": "#/definitions/ThreadGoalClearParams"
}
},
"title": "Thread/goal/clearRequest"
},
{ {
"type": "object", "type": "object",
"required": [ "required": [
@@ -1229,6 +1301,30 @@
}, },
"title": "ExperimentalFeature/listRequest" "title": "ExperimentalFeature/listRequest"
}, },
{
"type": "object",
"required": [
"id",
"method",
"params"
],
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"type": "string",
"enum": [
"permissionProfile/list"
],
"title": "PermissionProfile/listRequestMethod"
},
"params": {
"$ref": "#/definitions/PermissionProfileListParams"
}
},
"title": "PermissionProfile/listRequest"
},
{ {
"type": "object", "type": "object",
"required": [ "required": [
@@ -1858,26 +1954,6 @@
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", "description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string" "type": "string"
}, },
"ActivePermissionProfile": {
"type": "object",
"required": [
"id"
],
"properties": {
"extends": {
"description": "Parent profile identifier once permissions profiles support inheritance. This is currently always `null`.",
"default": null,
"type": [
"string",
"null"
]
},
"id": {
"description": "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.<id>]` profile.",
"type": "string"
}
}
},
"AddCreditsNudgeCreditType": { "AddCreditsNudgeCreditType": {
"type": "string", "type": "string",
"enum": [ "enum": [
@@ -2885,6 +2961,26 @@
} }
}, },
"title": "InputImageFunctionCallOutputContentItem" "title": "InputImageFunctionCallOutputContentItem"
},
{
"type": "object",
"required": [
"encrypted_content",
"type"
],
"properties": {
"encrypted_content": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"encrypted_content"
],
"title": "EncryptedContentFunctionCallOutputContentItemType"
}
},
"title": "EncryptedContentFunctionCallOutputContentItem"
} }
] ]
}, },
@@ -3150,11 +3246,11 @@
"outputSchema": { "outputSchema": {
"description": "Optional JSON Schema used to constrain the final assistant message for this turn." "description": "Optional JSON Schema used to constrain the final assistant message for this turn."
}, },
"summary": { "sandboxPolicy": {
"description": "Override the reasoning summary for this turn and subsequent turns.", "description": "Override the sandbox policy for this turn and subsequent turns.",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/definitions/ReasoningSummary" "$ref": "#/definitions/SandboxPolicy"
}, },
{ {
"type": "null" "type": "null"
@@ -3172,11 +3268,11 @@
} }
] ]
}, },
"sandboxPolicy": { "summary": {
"description": "Override the sandbox policy for this turn and subsequent turns.", "description": "Override the reasoning summary for this turn and subsequent turns.",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/definitions/SandboxPolicy" "$ref": "#/definitions/ReasoningSummary"
}, },
{ {
"type": "null" "type": "null"
@@ -3740,6 +3836,34 @@
"enabled" "enabled"
] ]
}, },
"PermissionProfileListParams": {
"type": "object",
"properties": {
"cursor": {
"description": "Opaque pagination cursor returned by a previous call.",
"type": [
"string",
"null"
]
},
"cwd": {
"description": "Optional working directory to resolve project config layers.",
"type": [
"string",
"null"
]
},
"limit": {
"description": "Optional page size; defaults to the full result set.",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
}
}
},
"Personality": { "Personality": {
"type": "string", "type": "string",
"enum": [ "enum": [
@@ -3804,6 +3928,7 @@
"type": "string", "type": "string",
"enum": [ "enum": [
"local", "local",
"vertical",
"workspace-directory", "workspace-directory",
"shared-with-me" "shared-with-me"
] ]
@@ -5247,7 +5372,7 @@
} }
}, },
"ThreadResumeParams": { "ThreadResumeParams": {
"description": "There are three ways to resume a thread: 1. By thread_id: load the thread from disk by thread_id and resume it. 2. By history: instantiate the thread from memory and resume it. 3. By path: load the thread from disk by path and resume it.\n\nThe precedence is: history > path > thread_id. If using history or path, the thread_id param will be ignored.\n\nPrefer using thread_id whenever possible.", "description": "There are three ways to resume a thread: 1. By thread_id: load the thread from disk by thread_id and resume it. 2. By history: instantiate the thread from memory and resume it. 3. By path: load the thread from disk by path and resume it.\n\nFor non-running threads, the precedence is: history > non-empty path > thread_id. If using history or a non-empty path for a non-running thread, the thread_id param will be ignored.\n\nIf thread_id identifies a running thread, app-server rejoins that thread and treats a non-empty path as a consistency check against the active rollout path. Empty string path values are treated as absent.\n\nPrefer using thread_id whenever possible.",
"type": "object", "type": "object",
"required": [ "required": [
"threadId" "threadId"
@@ -5299,6 +5424,16 @@
"null" "null"
] ]
}, },
"personality": {
"anyOf": [
{
"$ref": "#/definitions/Personality"
},
{
"type": "null"
}
]
},
"sandbox": { "sandbox": {
"anyOf": [ "anyOf": [
{ {
@@ -5309,12 +5444,6 @@
} }
] ]
}, },
"serviceTier": {
"type": [
"string",
"null"
]
},
"model": { "model": {
"description": "Configuration overrides for the resumed thread, if any.", "description": "Configuration overrides for the resumed thread, if any.",
"type": [ "type": [
@@ -5328,14 +5457,10 @@
"null" "null"
] ]
}, },
"personality": { "serviceTier": {
"anyOf": [ "type": [
{ "string",
"$ref": "#/definitions/Personality" "null"
},
{
"type": "null"
}
] ]
}, },
"threadId": { "threadId": {
@@ -5354,50 +5479,26 @@
} }
} }
}, },
"ThreadRealtimeStartTransport": { "ThreadRollbackParams": {
"description": "EXPERIMENTAL - transport used by thread realtime.", "type": "object",
"oneOf": [ "required": [
{ "numTurns",
"type": "object", "threadId"
"required": [ ],
"type" "properties": {
], "numTurns": {
"properties": { "description": "The number of turns to drop from the end of the thread. Must be >= 1.\n\nThis only modifies the thread's history and does not revert local file changes that have been made by the agent. Clients are responsible for reverting these changes.",
"type": { "type": "integer",
"type": "string", "format": "uint32",
"enum": [ "minimum": 0.0
"websocket"
],
"title": "WebsocketThreadRealtimeStartTransportType"
}
},
"title": "WebsocketThreadRealtimeStartTransport"
}, },
{ "threadId": {
"type": "object", "type": "string"
"required": [
"sdp",
"type"
],
"properties": {
"sdp": {
"description": "SDP offer generated by a WebRTC RTCPeerConnection after configuring audio and the realtime events data channel.",
"type": "string"
},
"type": {
"type": "string",
"enum": [
"webrtc"
],
"title": "WebrtcThreadRealtimeStartTransportType"
}
},
"title": "WebrtcThreadRealtimeStartTransport"
} }
] }
}, },
"ThreadForkParams": { "ThreadForkParams": {
"description": "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using path, the thread_id param will be ignored.\n\nPrefer using thread_id whenever possible.", "description": "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using a non-empty path, the thread_id param will be ignored. Empty string path values are treated as absent.\n\nPrefer using thread_id whenever possible.",
"type": "object", "type": "object",
"required": [ "required": [
"threadId" "threadId"
@@ -5452,11 +5553,10 @@
"ephemeral": { "ephemeral": {
"type": "boolean" "type": "boolean"
}, },
"threadSource": { "sandbox": {
"description": "Optional client-supplied analytics source classification for this forked thread.",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/definitions/ThreadSource" "$ref": "#/definitions/SandboxMode"
}, },
{ {
"type": "null" "type": "null"
@@ -5476,10 +5576,66 @@
"null" "null"
] ]
}, },
"sandbox": { "serviceTier": {
"type": [
"string",
"null"
]
},
"threadId": {
"type": "string"
},
"threadSource": {
"description": "Optional client-supplied analytics source classification for this forked thread.",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/definitions/SandboxMode" "$ref": "#/definitions/ThreadSource"
},
{
"type": "null"
}
]
}
}
},
"ThreadGoalClearParams": {
"type": "object",
"required": [
"threadId"
],
"properties": {
"threadId": {
"type": "string"
}
}
},
"ThreadGoalGetParams": {
"type": "object",
"required": [
"threadId"
],
"properties": {
"threadId": {
"type": "string"
}
}
},
"ThreadGoalSetParams": {
"type": "object",
"required": [
"threadId"
],
"properties": {
"objective": {
"type": [
"string",
"null"
]
},
"status": {
"anyOf": [
{
"$ref": "#/definitions/ThreadGoalStatus"
}, },
{ {
"type": "null" "type": "null"
@@ -5489,158 +5645,15 @@
"threadId": { "threadId": {
"type": "string" "type": "string"
}, },
"serviceTier": { "tokenBudget": {
"type": [ "type": [
"string", "integer",
"null"
]
}
}
},
"ThreadStartSource": {
"type": "string",
"enum": [
"startup",
"clear"
]
},
"ThreadStartParams": {
"type": "object",
"properties": {
"approvalPolicy": {
"anyOf": [
{
"$ref": "#/definitions/AskForApproval"
},
{
"type": "null"
}
]
},
"approvalsReviewer": {
"description": "Override where approval requests are routed for review on this thread and subsequent turns.",
"anyOf": [
{
"$ref": "#/definitions/ApprovalsReviewer"
},
{
"type": "null"
}
]
},
"baseInstructions": {
"type": [
"string",
"null"
]
},
"config": {
"type": [
"object",
"null" "null"
], ],
"additionalProperties": true "format": "int64"
},
"cwd": {
"type": [
"string",
"null"
]
},
"developerInstructions": {
"type": [
"string",
"null"
]
},
"sandbox": {
"anyOf": [
{
"$ref": "#/definitions/SandboxMode"
},
{
"type": "null"
}
]
},
"sessionStartSource": {
"anyOf": [
{
"$ref": "#/definitions/ThreadStartSource"
},
{
"type": "null"
}
]
},
"ephemeral": {
"type": [
"boolean",
"null"
]
},
"threadSource": {
"description": "Optional client-supplied analytics source classification for this thread.",
"anyOf": [
{
"$ref": "#/definitions/ThreadSource"
},
{
"type": "null"
}
]
},
"personality": {
"anyOf": [
{
"$ref": "#/definitions/Personality"
},
{
"type": "null"
}
]
},
"model": {
"type": [
"string",
"null"
]
},
"modelProvider": {
"type": [
"string",
"null"
]
},
"serviceName": {
"type": [
"string",
"null"
]
},
"serviceTier": {
"type": [
"string",
"null"
]
} }
} }
}, },
"ThreadSourceKind": {
"type": "string",
"enum": [
"cli",
"vscode",
"exec",
"appServer",
"subAgent",
"subAgentReview",
"subAgentCompact",
"subAgentThreadSpawn",
"subAgentOther",
"unknown"
]
},
"ThreadGoalStatus": { "ThreadGoalStatus": {
"type": "string", "type": "string",
"enum": [ "enum": [
@@ -5652,12 +5665,11 @@
"complete" "complete"
] ]
}, },
"ThreadSource": { "ThreadStartSource": {
"type": "string", "type": "string",
"enum": [ "enum": [
"user", "startup",
"subagent", "clear"
"memory_consolidation"
] ]
}, },
"ThreadInjectItemsParams": { "ThreadInjectItemsParams": {
@@ -5810,12 +5822,127 @@
"disabled" "disabled"
] ]
}, },
"ThreadSortKey": { "ThreadStartParams": {
"type": "string", "type": "object",
"enum": [ "properties": {
"created_at", "approvalPolicy": {
"updated_at" "anyOf": [
] {
"$ref": "#/definitions/AskForApproval"
},
{
"type": "null"
}
]
},
"approvalsReviewer": {
"description": "Override where approval requests are routed for review on this thread and subsequent turns.",
"anyOf": [
{
"$ref": "#/definitions/ApprovalsReviewer"
},
{
"type": "null"
}
]
},
"baseInstructions": {
"type": [
"string",
"null"
]
},
"config": {
"type": [
"object",
"null"
],
"additionalProperties": true
},
"cwd": {
"type": [
"string",
"null"
]
},
"developerInstructions": {
"type": [
"string",
"null"
]
},
"sandbox": {
"anyOf": [
{
"$ref": "#/definitions/SandboxMode"
},
{
"type": "null"
}
]
},
"threadSource": {
"description": "Optional client-supplied analytics source classification for this thread.",
"anyOf": [
{
"$ref": "#/definitions/ThreadSource"
},
{
"type": "null"
}
]
},
"ephemeral": {
"type": [
"boolean",
"null"
]
},
"serviceTier": {
"type": [
"string",
"null"
]
},
"personality": {
"anyOf": [
{
"$ref": "#/definitions/Personality"
},
{
"type": "null"
}
]
},
"model": {
"type": [
"string",
"null"
]
},
"modelProvider": {
"type": [
"string",
"null"
]
},
"sessionStartSource": {
"anyOf": [
{
"$ref": "#/definitions/ThreadStartSource"
},
{
"type": "null"
}
]
},
"serviceName": {
"type": [
"string",
"null"
]
}
}
}, },
"ThreadMetadataGitInfoUpdateParams": { "ThreadMetadataGitInfoUpdateParams": {
"type": "object", "type": "object",
@@ -5881,36 +6008,28 @@
} }
} }
}, },
"ThreadShellCommandParams": { "ThreadSourceKind": {
"type": "object", "type": "string",
"required": [ "enum": [
"command", "cli",
"threadId" "vscode",
], "exec",
"properties": { "appServer",
"command": { "subAgent",
"description": "Shell command string evaluated by the thread's configured shell. Unlike `command/exec`, this intentionally preserves shell syntax such as pipes, redirects, and quoting. This runs unsandboxed with full access rather than inheriting the thread sandbox policy.", "subAgentReview",
"type": "string" "subAgentCompact",
}, "subAgentThreadSpawn",
"threadId": { "subAgentOther",
"type": "string" "unknown"
} ]
}
}, },
"ThreadSetNameParams": { "ThreadSource": {
"type": "object", "type": "string",
"required": [ "enum": [
"name", "user",
"threadId" "subagent",
], "memory_consolidation"
"properties": { ]
"name": {
"type": "string"
},
"threadId": {
"type": "string"
}
}
}, },
"ThreadRealtimeAudioChunk": { "ThreadRealtimeAudioChunk": {
"description": "EXPERIMENTAL - thread realtime audio chunk.", "description": "EXPERIMENTAL - thread realtime audio chunk.",
@@ -5950,18 +6069,80 @@
} }
} }
}, },
"ThreadRollbackParams": { "ThreadSortKey": {
"type": "string",
"enum": [
"created_at",
"updated_at"
]
},
"ThreadShellCommandParams": {
"type": "object", "type": "object",
"required": [ "required": [
"numTurns", "command",
"threadId" "threadId"
], ],
"properties": { "properties": {
"numTurns": { "command": {
"description": "The number of turns to drop from the end of the thread. Must be >= 1.\n\nThis only modifies the thread's history and does not revert local file changes that have been made by the agent. Clients are responsible for reverting these changes.", "description": "Shell command string evaluated by the thread's configured shell. Unlike `command/exec`, this intentionally preserves shell syntax such as pipes, redirects, and quoting. This runs unsandboxed with full access rather than inheriting the thread sandbox policy.",
"type": "integer", "type": "string"
"format": "uint32", },
"minimum": 0.0 "threadId": {
"type": "string"
}
}
},
"ThreadRealtimeStartTransport": {
"description": "EXPERIMENTAL - transport used by thread realtime.",
"oneOf": [
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"websocket"
],
"title": "WebsocketThreadRealtimeStartTransportType"
}
},
"title": "WebsocketThreadRealtimeStartTransport"
},
{
"type": "object",
"required": [
"sdp",
"type"
],
"properties": {
"sdp": {
"description": "SDP offer generated by a WebRTC RTCPeerConnection after configuring audio and the realtime events data channel.",
"type": "string"
},
"type": {
"type": "string",
"enum": [
"webrtc"
],
"title": "WebrtcThreadRealtimeStartTransportType"
}
},
"title": "WebrtcThreadRealtimeStartTransport"
}
]
},
"ThreadSetNameParams": {
"type": "object",
"required": [
"name",
"threadId"
],
"properties": {
"name": {
"type": "string"
}, },
"threadId": { "threadId": {
"type": "string" "type": "string"
@@ -375,7 +375,7 @@
"enum": [ "enum": [
"read", "read",
"write", "write",
"none" "deny"
] ]
}, },
"FileSystemPath": { "FileSystemPath": {
@@ -101,7 +101,7 @@
"enum": [ "enum": [
"read", "read",
"write", "write",
"none" "deny"
] ]
}, },
"FileSystemPath": { "FileSystemPath": {
@@ -88,7 +88,7 @@
"enum": [ "enum": [
"read", "read",
"write", "write",
"none" "deny"
] ]
}, },
"FileSystemPath": { "FileSystemPath": {
+390 -1
View File
@@ -204,6 +204,26 @@
}, },
"title": "Thread/goal/clearedNotification" "title": "Thread/goal/clearedNotification"
}, },
{
"type": "object",
"required": [
"method",
"params"
],
"properties": {
"method": {
"type": "string",
"enum": [
"thread/settings/updated"
],
"title": "Thread/settings/updatedNotificationMethod"
},
"params": {
"$ref": "#/definitions/ThreadSettingsUpdatedNotification"
}
},
"title": "Thread/settings/updatedNotification"
},
{ {
"type": "object", "type": "object",
"required": [ "required": [
@@ -1336,6 +1356,26 @@
} }
} }
}, },
"ActivePermissionProfile": {
"type": "object",
"required": [
"id"
],
"properties": {
"extends": {
"description": "Parent profile identifier from the selected permissions profile's `extends` setting, when present.",
"default": null,
"type": [
"string",
"null"
]
},
"id": {
"description": "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.<id>]` profile.",
"type": "string"
}
}
},
"AdditionalFileSystemPermissions": { "AdditionalFileSystemPermissions": {
"type": "object", "type": "object",
"properties": { "properties": {
@@ -1687,6 +1727,65 @@
} }
} }
}, },
"ApprovalsReviewer": {
"description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
"type": "string",
"enum": [
"user",
"auto_review",
"guardian_subagent"
]
},
"AskForApproval": {
"oneOf": [
{
"type": "string",
"enum": [
"untrusted",
"on-failure",
"on-request",
"never"
]
},
{
"type": "object",
"required": [
"granular"
],
"properties": {
"granular": {
"type": "object",
"required": [
"mcp_elicitations",
"rules",
"sandbox_approval"
],
"properties": {
"mcp_elicitations": {
"type": "boolean"
},
"request_permissions": {
"default": false,
"type": "boolean"
},
"rules": {
"type": "boolean"
},
"sandbox_approval": {
"type": "boolean"
},
"skill_approval": {
"default": false,
"type": "boolean"
}
}
}
},
"additionalProperties": false,
"title": "GranularAskForApproval"
}
]
},
"AuthMode": { "AuthMode": {
"description": "Authentication mode for OpenAI-backed providers.", "description": "Authentication mode for OpenAI-backed providers.",
"oneOf": [ "oneOf": [
@@ -1930,6 +2029,22 @@
"failed" "failed"
] ]
}, },
"CollaborationMode": {
"description": "Collaboration mode for a Codex session.",
"type": "object",
"required": [
"mode",
"settings"
],
"properties": {
"mode": {
"$ref": "#/definitions/ModeKind"
},
"settings": {
"$ref": "#/definitions/Settings"
}
}
},
"CommandAction": { "CommandAction": {
"oneOf": [ "oneOf": [
{ {
@@ -2358,7 +2473,7 @@
"enum": [ "enum": [
"read", "read",
"write", "write",
"none" "deny"
] ]
}, },
"FileSystemPath": { "FileSystemPath": {
@@ -3013,6 +3128,8 @@
"postCompact", "postCompact",
"sessionStart", "sessionStart",
"userPromptSubmit", "userPromptSubmit",
"subagentStart",
"subagentStop",
"stop" "stop"
] ]
}, },
@@ -3529,6 +3646,14 @@
} }
] ]
}, },
"ModeKind": {
"description": "Initial collaboration mode to use when the TUI starts.",
"type": "string",
"enum": [
"plan",
"default"
]
},
"ModelRerouteReason": { "ModelRerouteReason": {
"type": "string", "type": "string",
"enum": [ "enum": [
@@ -3590,6 +3715,13 @@
} }
} }
}, },
"NetworkAccess": {
"type": "string",
"enum": [
"restricted",
"enabled"
]
},
"NetworkApprovalProtocol": { "NetworkApprovalProtocol": {
"type": "string", "type": "string",
"enum": [ "enum": [
@@ -3673,6 +3805,14 @@
} }
] ]
}, },
"Personality": {
"type": "string",
"enum": [
"none",
"friendly",
"pragmatic"
]
},
"PlanDeltaNotification": { "PlanDeltaNotification": {
"description": "EXPERIMENTAL - proposed plan streaming deltas for plan items. Clients should not assume concatenated deltas match the completed plan item content.", "description": "EXPERIMENTAL - proposed plan streaming deltas for plan items. Clients should not assume concatenated deltas match the completed plan item content.",
"type": "object", "type": "object",
@@ -3926,6 +4066,26 @@
"xhigh" "xhigh"
] ]
}, },
"ReasoningSummary": {
"description": "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries",
"oneOf": [
{
"type": "string",
"enum": [
"auto",
"concise",
"detailed"
]
},
{
"description": "Option to disable reasoning summaries.",
"type": "string",
"enum": [
"none"
]
}
]
},
"ReasoningSummaryPartAddedNotification": { "ReasoningSummaryPartAddedNotification": {
"type": "object", "type": "object",
"required": [ "required": [
@@ -4078,6 +4238,105 @@
}, },
"additionalProperties": false "additionalProperties": false
}, },
"SandboxPolicy": {
"oneOf": [
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"dangerFullAccess"
],
"title": "DangerFullAccessSandboxPolicyType"
}
},
"title": "DangerFullAccessSandboxPolicy"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"networkAccess": {
"default": false,
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"readOnly"
],
"title": "ReadOnlySandboxPolicyType"
}
},
"title": "ReadOnlySandboxPolicy"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"networkAccess": {
"default": "restricted",
"allOf": [
{
"$ref": "#/definitions/NetworkAccess"
}
]
},
"type": {
"type": "string",
"enum": [
"externalSandbox"
],
"title": "ExternalSandboxSandboxPolicyType"
}
},
"title": "ExternalSandboxSandboxPolicy"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"excludeSlashTmp": {
"default": false,
"type": "boolean"
},
"excludeTmpdirEnvVar": {
"default": false,
"type": "boolean"
},
"networkAccess": {
"default": false,
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"workspaceWrite"
],
"title": "WorkspaceWriteSandboxPolicyType"
},
"writableRoots": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
}
}
},
"title": "WorkspaceWriteSandboxPolicy"
}
]
},
"ServerRequestResolvedNotification": { "ServerRequestResolvedNotification": {
"type": "object", "type": "object",
"required": [ "required": [
@@ -4133,6 +4392,34 @@
} }
] ]
}, },
"Settings": {
"description": "Settings for a collaboration mode.",
"type": "object",
"required": [
"model"
],
"properties": {
"developer_instructions": {
"type": [
"string",
"null"
]
},
"model": {
"type": "string"
},
"reasoning_effort": {
"anyOf": [
{
"$ref": "#/definitions/ReasoningEffort"
},
{
"type": "null"
}
]
}
}
},
"SkillsChangedNotification": { "SkillsChangedNotification": {
"description": "Notification emitted when watched local skill files change.\n\nTreat this as an invalidation signal and re-run `skills/list` with the client's current parameters when refreshed skill metadata is needed.", "description": "Notification emitted when watched local skill files change.\n\nTreat this as an invalidation signal and re-run `skills/list` with the client's current parameters when refreshed skill metadata is needed.",
"type": "object" "type": "object"
@@ -4875,6 +5162,12 @@
"null" "null"
] ]
}, },
"pluginId": {
"type": [
"string",
"null"
]
},
"result": { "result": {
"anyOf": [ "anyOf": [
{ {
@@ -5419,6 +5712,102 @@
} }
} }
}, },
"ThreadSettings": {
"type": "object",
"required": [
"approvalPolicy",
"approvalsReviewer",
"collaborationMode",
"cwd",
"model",
"modelProvider",
"sandboxPolicy"
],
"properties": {
"activePermissionProfile": {
"anyOf": [
{
"$ref": "#/definitions/ActivePermissionProfile"
},
{
"type": "null"
}
]
},
"approvalPolicy": {
"$ref": "#/definitions/AskForApproval"
},
"approvalsReviewer": {
"$ref": "#/definitions/ApprovalsReviewer"
},
"collaborationMode": {
"$ref": "#/definitions/CollaborationMode"
},
"cwd": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"effort": {
"anyOf": [
{
"$ref": "#/definitions/ReasoningEffort"
},
{
"type": "null"
}
]
},
"model": {
"type": "string"
},
"modelProvider": {
"type": "string"
},
"personality": {
"anyOf": [
{
"$ref": "#/definitions/Personality"
},
{
"type": "null"
}
]
},
"sandboxPolicy": {
"$ref": "#/definitions/SandboxPolicy"
},
"serviceTier": {
"type": [
"string",
"null"
]
},
"summary": {
"anyOf": [
{
"$ref": "#/definitions/ReasoningSummary"
},
{
"type": "null"
}
]
}
}
},
"ThreadSettingsUpdatedNotification": {
"type": "object",
"required": [
"threadId",
"threadSettings"
],
"properties": {
"threadId": {
"type": "string"
},
"threadSettings": {
"$ref": "#/definitions/ThreadSettings"
}
}
},
"ThreadSource": { "ThreadSource": {
"type": "string", "type": "string",
"enum": [ "enum": [
+1 -1
View File
@@ -885,7 +885,7 @@
"enum": [ "enum": [
"read", "read",
"write", "write",
"none" "deny"
] ]
}, },
"FileSystemPath": { "FileSystemPath": {
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-20
View File
@@ -106,26 +106,6 @@
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", "description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string" "type": "string"
}, },
"ActivePermissionProfile": {
"type": "object",
"required": [
"id"
],
"properties": {
"extends": {
"description": "Parent profile identifier once permissions profiles support inheritance. This is currently always `null`.",
"default": null,
"type": [
"string",
"null"
]
},
"id": {
"description": "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.<id>]` profile.",
"type": "string"
}
}
},
"CommandExecTerminalSize": { "CommandExecTerminalSize": {
"description": "PTY size in character cells for `command/exec` PTY sessions.", "description": "PTY size in character cells for `command/exec` PTY sessions.",
"type": "object", "type": "object",
+29
View File
@@ -214,6 +214,25 @@
} }
] ]
}, },
"AutoCompactTokenLimitScope": {
"description": "Selects which part of the active context is charged against `model_auto_compact_token_limit`.",
"oneOf": [
{
"description": "Count the full active context against the limit.",
"type": "string",
"enum": [
"total"
]
},
{
"description": "Count sampled output and later growth after the carried window prefix.",
"type": "string",
"enum": [
"body_after_prefix"
]
}
]
},
"Config": { "Config": {
"type": "object", "type": "object",
"properties": { "properties": {
@@ -316,6 +335,16 @@
], ],
"format": "int64" "format": "int64"
}, },
"model_auto_compact_token_limit_scope": {
"anyOf": [
{
"$ref": "#/definitions/AutoCompactTokenLimitScope"
},
{
"type": "null"
}
]
},
"model_context_window": { "model_context_window": {
"type": [ "type": [
"integer", "integer",
@@ -75,6 +75,17 @@
} }
] ]
}, },
"ComputerUseRequirements": {
"type": "object",
"properties": {
"allowLockedComputerUse": {
"type": [
"boolean",
"null"
]
}
}
},
"ConfigRequirements": { "ConfigRequirements": {
"type": "object", "type": "object",
"properties": { "properties": {
@@ -102,6 +113,15 @@
"type": "boolean" "type": "boolean"
} }
}, },
"allowedPermissions": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"allowedSandboxModes": { "allowedSandboxModes": {
"type": [ "type": [
"array", "array",
@@ -120,6 +140,16 @@
"$ref": "#/definitions/WebSearchMode" "$ref": "#/definitions/WebSearchMode"
} }
}, },
"computerUse": {
"anyOf": [
{
"$ref": "#/definitions/ComputerUseRequirements"
},
{
"type": "null"
}
]
},
"enforceResidency": { "enforceResidency": {
"anyOf": [ "anyOf": [
{ {
@@ -242,6 +272,8 @@
"PreToolUse", "PreToolUse",
"SessionStart", "SessionStart",
"Stop", "Stop",
"SubagentStart",
"SubagentStop",
"UserPromptSubmit" "UserPromptSubmit"
], ],
"properties": { "properties": {
@@ -287,6 +319,18 @@
"$ref": "#/definitions/ConfiguredHookMatcherGroup" "$ref": "#/definitions/ConfiguredHookMatcherGroup"
} }
}, },
"SubagentStart": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
}
},
"SubagentStop": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
}
},
"UserPromptSubmit": { "UserPromptSubmit": {
"type": "array", "type": "array",
"items": { "items": {
@@ -35,6 +35,8 @@
"postCompact", "postCompact",
"sessionStart", "sessionStart",
"userPromptSubmit", "userPromptSubmit",
"subagentStart",
"subagentStop",
"stop" "stop"
] ]
}, },
+2
View File
@@ -35,6 +35,8 @@
"postCompact", "postCompact",
"sessionStart", "sessionStart",
"userPromptSubmit", "userPromptSubmit",
"subagentStart",
"subagentStop",
"stop" "stop"
] ]
}, },
+2
View File
@@ -43,6 +43,8 @@
"postCompact", "postCompact",
"sessionStart", "sessionStart",
"userPromptSubmit", "userPromptSubmit",
"subagentStart",
"subagentStop",
"stop" "stop"
] ]
}, },
@@ -833,6 +833,12 @@
"null" "null"
] ]
}, },
"pluginId": {
"type": [
"string",
"null"
]
},
"result": { "result": {
"anyOf": [ "anyOf": [
{ {
@@ -121,7 +121,7 @@
"enum": [ "enum": [
"read", "read",
"write", "write",
"none" "deny"
] ]
}, },
"FileSystemPath": { "FileSystemPath": {
@@ -104,7 +104,7 @@
"enum": [ "enum": [
"read", "read",
"write", "write",
"none" "deny"
] ]
}, },
"FileSystemPath": { "FileSystemPath": {
+6
View File
@@ -833,6 +833,12 @@
"null" "null"
] ]
}, },
"pluginId": {
"type": [
"string",
"null"
]
},
"result": { "result": {
"anyOf": [ "anyOf": [
{ {
+8
View File
@@ -74,6 +74,14 @@
"defaultReasoningEffort": { "defaultReasoningEffort": {
"$ref": "#/definitions/ReasoningEffort" "$ref": "#/definitions/ReasoningEffort"
}, },
"defaultServiceTier": {
"description": "Catalog default service tier id for this model, when one is configured.",
"default": null,
"type": [
"string",
"null"
]
},
"description": { "description": {
"type": "string" "type": "string"
}, },
@@ -0,0 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "PermissionProfileListParams",
"type": "object",
"properties": {
"cursor": {
"description": "Opaque pagination cursor returned by a previous call.",
"type": [
"string",
"null"
]
},
"cwd": {
"description": "Optional working directory to resolve project config layers.",
"type": [
"string",
"null"
]
},
"limit": {
"description": "Optional page size; defaults to the full result set.",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
}
}
}
@@ -0,0 +1,44 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "PermissionProfileListResponse",
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/PermissionProfileSummary"
}
},
"nextCursor": {
"description": "Opaque cursor to pass to the next call to continue after the last item. If None, there are no more items to return.",
"type": [
"string",
"null"
]
}
},
"definitions": {
"PermissionProfileSummary": {
"type": "object",
"required": [
"id"
],
"properties": {
"description": {
"description": "Optional user-facing description for display in clients.",
"type": [
"string",
"null"
]
},
"id": {
"description": "Available permission profile identifier.",
"type": "string"
}
}
}
}
}
+1
View File
@@ -33,6 +33,7 @@
"type": "string", "type": "string",
"enum": [ "enum": [
"local", "local",
"vertical",
"workspace-directory", "workspace-directory",
"shared-with-me" "shared-with-me"
] ]
+2
View File
@@ -57,6 +57,8 @@
"postCompact", "postCompact",
"sessionStart", "sessionStart",
"userPromptSubmit", "userPromptSubmit",
"subagentStart",
"subagentStop",
"stop" "stop"
] ]
}, },
@@ -158,6 +158,26 @@
} }
}, },
"title": "InputImageFunctionCallOutputContentItem" "title": "InputImageFunctionCallOutputContentItem"
},
{
"type": "object",
"required": [
"encrypted_content",
"type"
],
"properties": {
"encrypted_content": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"encrypted_content"
],
"title": "EncryptedContentFunctionCallOutputContentItemType"
}
},
"title": "EncryptedContentFunctionCallOutputContentItem"
} }
] ]
}, },
+6
View File
@@ -968,6 +968,12 @@
"null" "null"
] ]
}, },
"pluginId": {
"type": [
"string",
"null"
]
},
"result": { "result": {
"anyOf": [ "anyOf": [
{ {
+16 -16
View File
@@ -1,7 +1,7 @@
{ {
"$schema": "http://json-schema.org/draft-07/schema#", "$schema": "http://json-schema.org/draft-07/schema#",
"title": "ThreadForkParams", "title": "ThreadForkParams",
"description": "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using path, the thread_id param will be ignored.\n\nPrefer using thread_id whenever possible.", "description": "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using a non-empty path, the thread_id param will be ignored. Empty string path values are treated as absent.\n\nPrefer using thread_id whenever possible.",
"type": "object", "type": "object",
"required": [ "required": [
"threadId" "threadId"
@@ -56,11 +56,10 @@
"ephemeral": { "ephemeral": {
"type": "boolean" "type": "boolean"
}, },
"threadSource": { "sandbox": {
"description": "Optional client-supplied analytics source classification for this forked thread.",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/definitions/ThreadSource" "$ref": "#/definitions/SandboxMode"
}, },
{ {
"type": "null" "type": "null"
@@ -80,23 +79,24 @@
"null" "null"
] ]
}, },
"sandbox": { "serviceTier": {
"anyOf": [ "type": [
{ "string",
"$ref": "#/definitions/SandboxMode" "null"
},
{
"type": "null"
}
] ]
}, },
"threadId": { "threadId": {
"type": "string" "type": "string"
}, },
"serviceTier": { "threadSource": {
"type": [ "description": "Optional client-supplied analytics source classification for this forked thread.",
"string", "anyOf": [
"null" {
"$ref": "#/definitions/ThreadSource"
},
{
"type": "null"
}
] ]
} }
}, },
+14 -8
View File
@@ -12,11 +12,8 @@
"thread" "thread"
], ],
"properties": { "properties": {
"serviceTier": { "thread": {
"type": [ "$ref": "#/definitions/Thread"
"string",
"null"
]
}, },
"approvalPolicy": { "approvalPolicy": {
"$ref": "#/definitions/AskForApproval" "$ref": "#/definitions/AskForApproval"
@@ -56,8 +53,11 @@
} }
] ]
}, },
"thread": { "serviceTier": {
"$ref": "#/definitions/Thread" "type": [
"string",
"null"
]
}, },
"sandbox": { "sandbox": {
"description": "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.", "description": "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.",
@@ -80,7 +80,7 @@
], ],
"properties": { "properties": {
"extends": { "extends": {
"description": "Parent profile identifier once permissions profiles support inheritance. This is currently always `null`.", "description": "Parent profile identifier from the selected permissions profile's `extends` setting, when present.",
"default": null, "default": null,
"type": [ "type": [
"string", "string",
@@ -1498,6 +1498,12 @@
"null" "null"
] ]
}, },
"pluginId": {
"type": [
"string",
"null"
]
},
"result": { "result": {
"anyOf": [ "anyOf": [
{ {
+13
View File
@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ThreadGoalClearParams",
"type": "object",
"required": [
"threadId"
],
"properties": {
"threadId": {
"type": "string"
}
}
}
+13
View File
@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ThreadGoalClearResponse",
"type": "object",
"required": [
"cleared"
],
"properties": {
"cleared": {
"type": "boolean"
}
}
}
+13
View File
@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ThreadGoalGetParams",
"type": "object",
"required": [
"threadId"
],
"properties": {
"threadId": {
"type": "string"
}
}
}
+76
View File
@@ -0,0 +1,76 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ThreadGoalGetResponse",
"type": "object",
"properties": {
"goal": {
"anyOf": [
{
"$ref": "#/definitions/ThreadGoal"
},
{
"type": "null"
}
]
}
},
"definitions": {
"ThreadGoal": {
"type": "object",
"required": [
"createdAt",
"objective",
"status",
"threadId",
"timeUsedSeconds",
"tokensUsed",
"updatedAt"
],
"properties": {
"createdAt": {
"type": "integer",
"format": "int64"
},
"objective": {
"type": "string"
},
"status": {
"$ref": "#/definitions/ThreadGoalStatus"
},
"threadId": {
"type": "string"
},
"timeUsedSeconds": {
"type": "integer",
"format": "int64"
},
"tokenBudget": {
"type": [
"integer",
"null"
],
"format": "int64"
},
"tokensUsed": {
"type": "integer",
"format": "int64"
},
"updatedAt": {
"type": "integer",
"format": "int64"
}
}
},
"ThreadGoalStatus": {
"type": "string",
"enum": [
"active",
"paused",
"blocked",
"usageLimited",
"budgetLimited",
"complete"
]
}
}
}
+49
View File
@@ -0,0 +1,49 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ThreadGoalSetParams",
"type": "object",
"required": [
"threadId"
],
"properties": {
"objective": {
"type": [
"string",
"null"
]
},
"status": {
"anyOf": [
{
"$ref": "#/definitions/ThreadGoalStatus"
},
{
"type": "null"
}
]
},
"threadId": {
"type": "string"
},
"tokenBudget": {
"type": [
"integer",
"null"
],
"format": "int64"
}
},
"definitions": {
"ThreadGoalStatus": {
"type": "string",
"enum": [
"active",
"paused",
"blocked",
"usageLimited",
"budgetLimited",
"complete"
]
}
}
}
+72
View File
@@ -0,0 +1,72 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ThreadGoalSetResponse",
"type": "object",
"required": [
"goal"
],
"properties": {
"goal": {
"$ref": "#/definitions/ThreadGoal"
}
},
"definitions": {
"ThreadGoal": {
"type": "object",
"required": [
"createdAt",
"objective",
"status",
"threadId",
"timeUsedSeconds",
"tokensUsed",
"updatedAt"
],
"properties": {
"createdAt": {
"type": "integer",
"format": "int64"
},
"objective": {
"type": "string"
},
"status": {
"$ref": "#/definitions/ThreadGoalStatus"
},
"threadId": {
"type": "string"
},
"timeUsedSeconds": {
"type": "integer",
"format": "int64"
},
"tokenBudget": {
"type": [
"integer",
"null"
],
"format": "int64"
},
"tokensUsed": {
"type": "integer",
"format": "int64"
},
"updatedAt": {
"type": "integer",
"format": "int64"
}
}
},
"ThreadGoalStatus": {
"type": "string",
"enum": [
"active",
"paused",
"blocked",
"usageLimited",
"budgetLimited",
"complete"
]
}
}
}
+6
View File
@@ -1272,6 +1272,12 @@
"null" "null"
] ]
}, },
"pluginId": {
"type": [
"string",
"null"
]
},
"result": { "result": {
"anyOf": [ "anyOf": [
{ {
@@ -1255,6 +1255,12 @@
"null" "null"
] ]
}, },
"pluginId": {
"type": [
"string",
"null"
]
},
"result": { "result": {
"anyOf": [ "anyOf": [
{ {
+6
View File
@@ -1255,6 +1255,12 @@
"null" "null"
] ]
}, },
"pluginId": {
"type": [
"string",
"null"
]
},
"result": { "result": {
"anyOf": [ "anyOf": [
{ {
+35 -15
View File
@@ -1,7 +1,7 @@
{ {
"$schema": "http://json-schema.org/draft-07/schema#", "$schema": "http://json-schema.org/draft-07/schema#",
"title": "ThreadResumeParams", "title": "ThreadResumeParams",
"description": "There are three ways to resume a thread: 1. By thread_id: load the thread from disk by thread_id and resume it. 2. By history: instantiate the thread from memory and resume it. 3. By path: load the thread from disk by path and resume it.\n\nThe precedence is: history > path > thread_id. If using history or path, the thread_id param will be ignored.\n\nPrefer using thread_id whenever possible.", "description": "There are three ways to resume a thread: 1. By thread_id: load the thread from disk by thread_id and resume it. 2. By history: instantiate the thread from memory and resume it. 3. By path: load the thread from disk by path and resume it.\n\nFor non-running threads, the precedence is: history > non-empty path > thread_id. If using history or a non-empty path for a non-running thread, the thread_id param will be ignored.\n\nIf thread_id identifies a running thread, app-server rejoins that thread and treats a non-empty path as a consistency check against the active rollout path. Empty string path values are treated as absent.\n\nPrefer using thread_id whenever possible.",
"type": "object", "type": "object",
"required": [ "required": [
"threadId" "threadId"
@@ -53,6 +53,16 @@
"null" "null"
] ]
}, },
"personality": {
"anyOf": [
{
"$ref": "#/definitions/Personality"
},
{
"type": "null"
}
]
},
"sandbox": { "sandbox": {
"anyOf": [ "anyOf": [
{ {
@@ -63,12 +73,6 @@
} }
] ]
}, },
"serviceTier": {
"type": [
"string",
"null"
]
},
"model": { "model": {
"description": "Configuration overrides for the resumed thread, if any.", "description": "Configuration overrides for the resumed thread, if any.",
"type": [ "type": [
@@ -82,14 +86,10 @@
"null" "null"
] ]
}, },
"personality": { "serviceTier": {
"anyOf": [ "type": [
{ "string",
"$ref": "#/definitions/Personality" "null"
},
{
"type": "null"
}
] ]
}, },
"threadId": { "threadId": {
@@ -295,6 +295,26 @@
} }
}, },
"title": "InputImageFunctionCallOutputContentItem" "title": "InputImageFunctionCallOutputContentItem"
},
{
"type": "object",
"required": [
"encrypted_content",
"type"
],
"properties": {
"encrypted_content": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"encrypted_content"
],
"title": "EncryptedContentFunctionCallOutputContentItemType"
}
},
"title": "EncryptedContentFunctionCallOutputContentItem"
} }
] ]
}, },
+14 -8
View File
@@ -12,8 +12,11 @@
"thread" "thread"
], ],
"properties": { "properties": {
"thread": { "serviceTier": {
"$ref": "#/definitions/Thread" "type": [
"string",
"null"
]
}, },
"approvalPolicy": { "approvalPolicy": {
"$ref": "#/definitions/AskForApproval" "$ref": "#/definitions/AskForApproval"
@@ -53,11 +56,8 @@
} }
] ]
}, },
"serviceTier": { "thread": {
"type": [ "$ref": "#/definitions/Thread"
"string",
"null"
]
}, },
"sandbox": { "sandbox": {
"description": "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.", "description": "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.",
@@ -80,7 +80,7 @@
], ],
"properties": { "properties": {
"extends": { "extends": {
"description": "Parent profile identifier once permissions profiles support inheritance. This is currently always `null`.", "description": "Parent profile identifier from the selected permissions profile's `extends` setting, when present.",
"default": null, "default": null,
"type": [ "type": [
"string", "string",
@@ -1498,6 +1498,12 @@
"null" "null"
] ]
}, },
"pluginId": {
"type": [
"string",
"null"
]
},
"result": { "result": {
"anyOf": [ "anyOf": [
{ {
+6
View File
@@ -1260,6 +1260,12 @@
"null" "null"
] ]
}, },
"pluginId": {
"type": [
"string",
"null"
]
},
"result": { "result": {
"anyOf": [ "anyOf": [
{ {
@@ -0,0 +1,381 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ThreadSettingsUpdatedNotification",
"type": "object",
"required": [
"threadId",
"threadSettings"
],
"properties": {
"threadId": {
"type": "string"
},
"threadSettings": {
"$ref": "#/definitions/ThreadSettings"
}
},
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
},
"ActivePermissionProfile": {
"type": "object",
"required": [
"id"
],
"properties": {
"extends": {
"description": "Parent profile identifier from the selected permissions profile's `extends` setting, when present.",
"default": null,
"type": [
"string",
"null"
]
},
"id": {
"description": "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.<id>]` profile.",
"type": "string"
}
}
},
"ApprovalsReviewer": {
"description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
"type": "string",
"enum": [
"user",
"auto_review",
"guardian_subagent"
]
},
"AskForApproval": {
"oneOf": [
{
"type": "string",
"enum": [
"untrusted",
"on-failure",
"on-request",
"never"
]
},
{
"type": "object",
"required": [
"granular"
],
"properties": {
"granular": {
"type": "object",
"required": [
"mcp_elicitations",
"rules",
"sandbox_approval"
],
"properties": {
"mcp_elicitations": {
"type": "boolean"
},
"request_permissions": {
"default": false,
"type": "boolean"
},
"rules": {
"type": "boolean"
},
"sandbox_approval": {
"type": "boolean"
},
"skill_approval": {
"default": false,
"type": "boolean"
}
}
}
},
"additionalProperties": false,
"title": "GranularAskForApproval"
}
]
},
"CollaborationMode": {
"description": "Collaboration mode for a Codex session.",
"type": "object",
"required": [
"mode",
"settings"
],
"properties": {
"mode": {
"$ref": "#/definitions/ModeKind"
},
"settings": {
"$ref": "#/definitions/Settings"
}
}
},
"ModeKind": {
"description": "Initial collaboration mode to use when the TUI starts.",
"type": "string",
"enum": [
"plan",
"default"
]
},
"NetworkAccess": {
"type": "string",
"enum": [
"restricted",
"enabled"
]
},
"Personality": {
"type": "string",
"enum": [
"none",
"friendly",
"pragmatic"
]
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
]
},
"ReasoningSummary": {
"description": "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries",
"oneOf": [
{
"type": "string",
"enum": [
"auto",
"concise",
"detailed"
]
},
{
"description": "Option to disable reasoning summaries.",
"type": "string",
"enum": [
"none"
]
}
]
},
"SandboxPolicy": {
"oneOf": [
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"dangerFullAccess"
],
"title": "DangerFullAccessSandboxPolicyType"
}
},
"title": "DangerFullAccessSandboxPolicy"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"networkAccess": {
"default": false,
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"readOnly"
],
"title": "ReadOnlySandboxPolicyType"
}
},
"title": "ReadOnlySandboxPolicy"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"networkAccess": {
"default": "restricted",
"allOf": [
{
"$ref": "#/definitions/NetworkAccess"
}
]
},
"type": {
"type": "string",
"enum": [
"externalSandbox"
],
"title": "ExternalSandboxSandboxPolicyType"
}
},
"title": "ExternalSandboxSandboxPolicy"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"excludeSlashTmp": {
"default": false,
"type": "boolean"
},
"excludeTmpdirEnvVar": {
"default": false,
"type": "boolean"
},
"networkAccess": {
"default": false,
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"workspaceWrite"
],
"title": "WorkspaceWriteSandboxPolicyType"
},
"writableRoots": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
}
}
},
"title": "WorkspaceWriteSandboxPolicy"
}
]
},
"Settings": {
"description": "Settings for a collaboration mode.",
"type": "object",
"required": [
"model"
],
"properties": {
"developer_instructions": {
"type": [
"string",
"null"
]
},
"model": {
"type": "string"
},
"reasoning_effort": {
"anyOf": [
{
"$ref": "#/definitions/ReasoningEffort"
},
{
"type": "null"
}
]
}
}
},
"ThreadSettings": {
"type": "object",
"required": [
"approvalPolicy",
"approvalsReviewer",
"collaborationMode",
"cwd",
"model",
"modelProvider",
"sandboxPolicy"
],
"properties": {
"activePermissionProfile": {
"anyOf": [
{
"$ref": "#/definitions/ActivePermissionProfile"
},
{
"type": "null"
}
]
},
"approvalPolicy": {
"$ref": "#/definitions/AskForApproval"
},
"approvalsReviewer": {
"$ref": "#/definitions/ApprovalsReviewer"
},
"collaborationMode": {
"$ref": "#/definitions/CollaborationMode"
},
"cwd": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"effort": {
"anyOf": [
{
"$ref": "#/definitions/ReasoningEffort"
},
{
"type": "null"
}
]
},
"model": {
"type": "string"
},
"modelProvider": {
"type": "string"
},
"personality": {
"anyOf": [
{
"$ref": "#/definitions/Personality"
},
{
"type": "null"
}
]
},
"sandboxPolicy": {
"$ref": "#/definitions/SandboxPolicy"
},
"serviceTier": {
"type": [
"string",
"null"
]
},
"summary": {
"anyOf": [
{
"$ref": "#/definitions/ReasoningSummary"
},
{
"type": "null"
}
]
}
}
}
}
}
+16 -16
View File
@@ -59,10 +59,11 @@
} }
] ]
}, },
"sessionStartSource": { "threadSource": {
"description": "Optional client-supplied analytics source classification for this thread.",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/definitions/ThreadStartSource" "$ref": "#/definitions/ThreadSource"
}, },
{ {
"type": "null" "type": "null"
@@ -75,15 +76,10 @@
"null" "null"
] ]
}, },
"threadSource": { "serviceTier": {
"description": "Optional client-supplied analytics source classification for this thread.", "type": [
"anyOf": [ "string",
{ "null"
"$ref": "#/definitions/ThreadSource"
},
{
"type": "null"
}
] ]
}, },
"personality": { "personality": {
@@ -108,13 +104,17 @@
"null" "null"
] ]
}, },
"serviceName": { "sessionStartSource": {
"type": [ "anyOf": [
"string", {
"null" "$ref": "#/definitions/ThreadStartSource"
},
{
"type": "null"
}
] ]
}, },
"serviceTier": { "serviceName": {
"type": [ "type": [
"string", "string",
"null" "null"
+14 -8
View File
@@ -12,8 +12,11 @@
"thread" "thread"
], ],
"properties": { "properties": {
"thread": { "serviceTier": {
"$ref": "#/definitions/Thread" "type": [
"string",
"null"
]
}, },
"approvalPolicy": { "approvalPolicy": {
"$ref": "#/definitions/AskForApproval" "$ref": "#/definitions/AskForApproval"
@@ -53,11 +56,8 @@
} }
] ]
}, },
"serviceTier": { "thread": {
"type": [ "$ref": "#/definitions/Thread"
"string",
"null"
]
}, },
"sandbox": { "sandbox": {
"description": "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.", "description": "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.",
@@ -80,7 +80,7 @@
], ],
"properties": { "properties": {
"extends": { "extends": {
"description": "Parent profile identifier once permissions profiles support inheritance. This is currently always `null`.", "description": "Parent profile identifier from the selected permissions profile's `extends` setting, when present.",
"default": null, "default": null,
"type": [ "type": [
"string", "string",
@@ -1498,6 +1498,12 @@
"null" "null"
] ]
}, },
"pluginId": {
"type": [
"string",
"null"
]
},
"result": { "result": {
"anyOf": [ "anyOf": [
{ {
@@ -1255,6 +1255,12 @@
"null" "null"
] ]
}, },
"pluginId": {
"type": [
"string",
"null"
]
},
"result": { "result": {
"anyOf": [ "anyOf": [
{ {
+6
View File
@@ -1255,6 +1255,12 @@
"null" "null"
] ]
}, },
"pluginId": {
"type": [
"string",
"null"
]
},
"result": { "result": {
"anyOf": [ "anyOf": [
{ {
@@ -967,6 +967,12 @@
"null" "null"
] ]
}, },
"pluginId": {
"type": [
"string",
"null"
]
},
"result": { "result": {
"anyOf": [ "anyOf": [
{ {
+6 -6
View File
@@ -73,11 +73,11 @@
"outputSchema": { "outputSchema": {
"description": "Optional JSON Schema used to constrain the final assistant message for this turn." "description": "Optional JSON Schema used to constrain the final assistant message for this turn."
}, },
"summary": { "sandboxPolicy": {
"description": "Override the reasoning summary for this turn and subsequent turns.", "description": "Override the sandbox policy for this turn and subsequent turns.",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/definitions/ReasoningSummary" "$ref": "#/definitions/SandboxPolicy"
}, },
{ {
"type": "null" "type": "null"
@@ -95,11 +95,11 @@
} }
] ]
}, },
"sandboxPolicy": { "summary": {
"description": "Override the sandbox policy for this turn and subsequent turns.", "description": "Override the reasoning summary for this turn and subsequent turns.",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/definitions/SandboxPolicy" "$ref": "#/definitions/ReasoningSummary"
}, },
{ {
"type": "null" "type": "null"
+6
View File
@@ -963,6 +963,12 @@
"null" "null"
] ]
}, },
"pluginId": {
"type": [
"string",
"null"
]
},
"result": { "result": {
"anyOf": [ "anyOf": [
{ {
+6
View File
@@ -967,6 +967,12 @@
"null" "null"
] ]
}, },
"pluginId": {
"type": [
"string",
"null"
]
},
"result": { "result": {
"anyOf": [ "anyOf": [
{ {