Compare commits

..
2 Commits
Author SHA1 Message Date
Codex 85326d845d Refresh Codex protocol schemas 2026-06-23 11:20:03 +00:00
Codex 595e8aee0e Refine Telegram thread commands 2026-06-23 11:19:48 +00:00
84 changed files with 12419 additions and 3902 deletions
+3 -1
View File
@@ -38,7 +38,9 @@ Docker Compose runs only the Go Telegram bot. Codex runs on the host through `co
The bot accepts one-to-one chats from allowlisted Telegram user IDs only. It rejects group, supergroup, and channel updates in code.
Supported commands: `/start`, `/help`, `/new`, `/thread`, `/rename`, `/fork`, `/archive`, `/status`, `/cancel`, `/workspaces`, `/workspace`, `/model`, `/sandbox`, `/pic`, `/diff`. `/model` lists available Codex models as inline buttons, then shows reasoning-effort buttons for the selected model.
Supported commands: `/start`, `/new`, `/resume`, `/rename`, `/fork`, `/archive [ID]`, `/unarchive [ID]`, `/delete [ID]`, `/status`, `/cancel`, `/workspace`, `/model`, `/sandbox`, `/pic`. `/resume`, `/archive`, `/unarchive`, `/delete`, `/workspace`, `/model`, and `/sandbox` show inline pickers when no ID or option is provided. `/model` lists available Codex models as inline buttons, then shows reasoning-effort buttons for the selected model.
When changing `botCommands()`, rebuild and restart the bot so it republishes Telegram commands. The bot sets both the default command scope and the `all_private_chats` scope; private chats can keep showing stale commands if only the default scope is updated. Verify both scopes with `getMyCommands` after deployment.
Plain text continues the active Codex thread and creates one if needed. `/pic PROMPT` starts a dedicated Codex image-generation turn and sends generated images back as Telegram photos. Telegram images are staged under `HOST_UPLOAD_DIR` and sent as `localImage` inputs. Other uploaded documents are staged and passed to Codex as host-visible file paths.
+16
View File
@@ -319,6 +319,22 @@ func (c *Client) ArchiveThread(ctx context.Context, threadID string) error {
return c.call(ctx, "thread/archive", map[string]any{"threadId": threadID}, &ignored)
}
func (c *Client) UnarchiveThread(ctx context.Context, threadID string) error {
if err := c.EnsureConnected(ctx); err != nil {
return err
}
var ignored json.RawMessage
return c.call(ctx, "thread/unarchive", map[string]any{"threadId": threadID}, &ignored)
}
func (c *Client) DeleteThread(ctx context.Context, threadID string) error {
if err := c.EnsureConnected(ctx); err != nil {
return err
}
var ignored json.RawMessage
return c.call(ctx, "thread/delete", map[string]any{"threadId": threadID}, &ignored)
}
func (c *Client) SetThreadName(ctx context.Context, threadID, name string) error {
if err := c.EnsureConnected(ctx); err != nil {
return err
+69
View File
@@ -159,6 +159,66 @@ func TestClientWebSocketUnixJSONRPC(t *testing.T) {
return
}
var archiveThread map[string]any
if err := conn.ReadJSON(&archiveThread); err != nil {
serverDone <- err
return
}
if archiveThread["method"] != "thread/archive" {
serverDone <- unexpectedMessage("thread/archive", archiveThread["method"])
return
}
archiveParams := archiveThread["params"].(map[string]any)
if archiveParams["threadId"] != "thr_1" {
payload, _ := json.Marshal(archiveParams)
serverDone <- unexpectedMessage("thread/archive params", string(payload))
return
}
if err := conn.WriteJSON(map[string]any{"id": archiveThread["id"], "result": map[string]any{}}); err != nil {
serverDone <- err
return
}
var unarchiveThread map[string]any
if err := conn.ReadJSON(&unarchiveThread); err != nil {
serverDone <- err
return
}
if unarchiveThread["method"] != "thread/unarchive" {
serverDone <- unexpectedMessage("thread/unarchive", unarchiveThread["method"])
return
}
unarchiveParams := unarchiveThread["params"].(map[string]any)
if unarchiveParams["threadId"] != "thr_1" {
payload, _ := json.Marshal(unarchiveParams)
serverDone <- unexpectedMessage("thread/unarchive params", string(payload))
return
}
if err := conn.WriteJSON(map[string]any{"id": unarchiveThread["id"], "result": map[string]any{}}); err != nil {
serverDone <- err
return
}
var deleteThread map[string]any
if err := conn.ReadJSON(&deleteThread); err != nil {
serverDone <- err
return
}
if deleteThread["method"] != "thread/delete" {
serverDone <- unexpectedMessage("thread/delete", deleteThread["method"])
return
}
deleteParams := deleteThread["params"].(map[string]any)
if deleteParams["threadId"] != "thr_1" {
payload, _ := json.Marshal(deleteParams)
serverDone <- unexpectedMessage("thread/delete params", string(payload))
return
}
if err := conn.WriteJSON(map[string]any{"id": deleteThread["id"], "result": map[string]any{}}); err != nil {
serverDone <- err
return
}
var response map[string]any
if err := conn.ReadJSON(&response); err != nil {
serverDone <- err
@@ -218,6 +278,15 @@ func TestClientWebSocketUnixJSONRPC(t *testing.T) {
if err := client.SetThreadName(ctx, "thr_1", "Short title"); err != nil {
t.Fatal(err)
}
if err := client.ArchiveThread(ctx, "thr_1"); err != nil {
t.Fatal(err)
}
if err := client.UnarchiveThread(ctx, "thr_1"); err != nil {
t.Fatal(err)
}
if err := client.DeleteThread(ctx, "thr_1"); err != nil {
t.Fatal(err)
}
if err := client.RespondServerRequest(ctx, approvalRequestID, "accept"); err != nil {
t.Fatal(err)
}
+67 -2
View File
@@ -339,6 +339,13 @@ WHERE telegram_user_id = ?`, threadID, telegramUserID)
return err
}
func (s *Store) ClearActiveThread(ctx context.Context, telegramUserID, threadID int64) error {
_, err := s.db.ExecContext(ctx, `
UPDATE sessions SET active_thread_id = NULL, active_turn_id = '', updated_at = datetime('now')
WHERE telegram_user_id = ? AND active_thread_id = ?`, telegramUserID, threadID)
return err
}
func (s *Store) SetActiveTurn(ctx context.Context, telegramUserID int64, turnID string) error {
_, err := s.db.ExecContext(ctx, "UPDATE sessions SET active_turn_id = ?, updated_at = datetime('now') WHERE telegram_user_id = ?", turnID, telegramUserID)
return err
@@ -413,6 +420,18 @@ func (s *Store) ListThreads(ctx context.Context, telegramUserID int64, includeAr
}
func (s *Store) ListThreadsPage(ctx context.Context, telegramUserID int64, includeArchived bool, limit, offset int) ([]Thread, error) {
archivedFilter := ""
if !includeArchived {
archivedFilter = "archived = 0"
}
return s.listThreadsPage(ctx, telegramUserID, archivedFilter, limit, offset)
}
func (s *Store) ListArchivedThreadsPage(ctx context.Context, telegramUserID int64, limit, offset int) ([]Thread, error) {
return s.listThreadsPage(ctx, telegramUserID, "archived = 1", limit, offset)
}
func (s *Store) listThreadsPage(ctx context.Context, telegramUserID int64, archivedFilter string, limit, offset int) ([]Thread, error) {
if limit <= 0 {
limit = 20
}
@@ -423,8 +442,8 @@ func (s *Store) ListThreadsPage(ctx context.Context, telegramUserID int64, inclu
SELECT id, telegram_user_id, codex_thread_id, workspace_id, title, archived, created_at, updated_at
FROM threads WHERE telegram_user_id = ?`
args := []any{telegramUserID}
if !includeArchived {
query += " AND archived = 0"
if archivedFilter != "" {
query += " AND " + archivedFilter
}
query += " ORDER BY updated_at DESC, id DESC LIMIT ? OFFSET ?"
args = append(args, limit, offset)
@@ -453,6 +472,52 @@ WHERE telegram_user_id = ? AND id = ?`, telegramUserID, id)
return err
}
func (s *Store) UnarchiveThread(ctx context.Context, telegramUserID, id int64) error {
_, err := s.db.ExecContext(ctx, `
UPDATE threads SET archived = 0, updated_at = datetime('now')
WHERE telegram_user_id = ? AND id = ?`, telegramUserID, id)
return err
}
func (s *Store) DeleteThread(ctx context.Context, telegramUserID, id int64) error {
tx, err := s.db.BeginTx(ctx, nil)
if err != nil {
return err
}
if _, err := tx.ExecContext(ctx, `
UPDATE sessions SET active_thread_id = NULL, active_turn_id = '', updated_at = datetime('now')
WHERE telegram_user_id = ? AND active_thread_id = ?`, telegramUserID, id); err != nil {
_ = tx.Rollback()
return err
}
if _, err := tx.ExecContext(ctx, `
DELETE FROM threads
WHERE telegram_user_id = ? AND id = ?`, telegramUserID, id); err != nil {
_ = tx.Rollback()
return err
}
return tx.Commit()
}
func (s *Store) DeleteThreadByCodexID(ctx context.Context, codexThreadID string) error {
tx, err := s.db.BeginTx(ctx, nil)
if err != nil {
return err
}
if _, err := tx.ExecContext(ctx, `
UPDATE sessions
SET active_thread_id = NULL, active_turn_id = '', updated_at = datetime('now')
WHERE active_thread_id IN (SELECT id FROM threads WHERE codex_thread_id = ?)`, codexThreadID); err != nil {
_ = tx.Rollback()
return err
}
if _, err := tx.ExecContext(ctx, "DELETE FROM threads WHERE codex_thread_id = ?", codexThreadID); err != nil {
_ = tx.Rollback()
return err
}
return tx.Commit()
}
func (s *Store) TouchThread(ctx context.Context, codexThreadID string) error {
_, err := s.db.ExecContext(ctx, "UPDATE threads SET updated_at = datetime('now') WHERE codex_thread_id = ?", codexThreadID)
return err
+56
View File
@@ -109,6 +109,42 @@ func TestStoreUsersWorkspacesSessions(t *testing.T) {
if session.ActiveTurnID != "" {
t.Fatalf("active turn not cleared: %+v", session)
}
if err := st.SetActiveThread(ctx, 42, thread.ID); err != nil {
t.Fatal(err)
}
if err := st.SetActiveTurn(ctx, 42, "turn-delete"); err != nil {
t.Fatal(err)
}
if err := st.DeleteThread(ctx, 42, thread.ID); err != nil {
t.Fatal(err)
}
session, err = st.GetSession(ctx, 42)
if err != nil {
t.Fatal(err)
}
if session.ActiveThreadID != 0 || session.ActiveTurnID != "" {
t.Fatalf("delete should clear active thread and turn: %+v", session)
}
if _, err := st.GetThreadByID(ctx, 42, thread.ID); err == nil {
t.Fatal("deleted thread should not be found")
}
thread, err = st.CreateThread(ctx, 42, "codex-thread-delete-by-id", ws.ID, "delete by codex id")
if err != nil {
t.Fatal(err)
}
if err := st.SetActiveThread(ctx, 42, thread.ID); err != nil {
t.Fatal(err)
}
if err := st.DeleteThreadByCodexID(ctx, "codex-thread-delete-by-id"); err != nil {
t.Fatal(err)
}
session, err = st.GetSession(ctx, 42)
if err != nil {
t.Fatal(err)
}
if session.ActiveThreadID != 0 {
t.Fatalf("delete by codex id should clear active thread: %+v", session)
}
}
func TestListThreadsPage(t *testing.T) {
@@ -142,6 +178,26 @@ func TestListThreadsPage(t *testing.T) {
if len(threads) != 1 {
t.Fatalf("got %d threads on second page, want 1", len(threads))
}
if err := st.ArchiveThread(ctx, 42, threads[0].ID); err != nil {
t.Fatal(err)
}
archived, err := st.ListArchivedThreadsPage(ctx, 42, 10, 0)
if err != nil {
t.Fatal(err)
}
if len(archived) != 1 || !archived[0].Archived {
t.Fatalf("archived threads = %+v, want one archived thread", archived)
}
if err := st.UnarchiveThread(ctx, 42, archived[0].ID); err != nil {
t.Fatal(err)
}
archived, err = st.ListArchivedThreadsPage(ctx, 42, 10, 0)
if err != nil {
t.Fatal(err)
}
if len(archived) != 0 {
t.Fatalf("archived threads after unarchive = %+v, want none", archived)
}
}
func TestRenameThread(t *testing.T) {
+7 -1
View File
@@ -52,7 +52,13 @@ func (c *Client) redact(text string) string {
func (c *Client) SetMyCommands(ctx context.Context, commands []BotCommand) error {
var ok bool
return c.postJSON(ctx, "setMyCommands", map[string]any{"commands": commands}, &ok)
if err := c.postJSON(ctx, "setMyCommands", map[string]any{"commands": commands}, &ok); err != nil {
return err
}
return c.postJSON(ctx, "setMyCommands", map[string]any{
"commands": commands,
"scope": map[string]any{"type": "all_private_chats"},
}, &ok)
}
func (c *Client) GetUpdates(ctx context.Context, offset int, timeoutSeconds int) ([]Update, error) {
+304 -89
View File
@@ -33,6 +33,10 @@ const (
telegramDirectiveEnd = " -->"
telegramCaptionLimit = 1024
pictureMediaGroupLimit = 10
threadActionResume = "resume"
threadActionArchive = "archive"
threadActionUnarchive = "unarchive"
threadActionDelete = "delete"
)
type Bot struct {
@@ -50,7 +54,6 @@ type Bot struct {
mu sync.Mutex
outputs map[string]*outputState
diffs map[string]string
}
type assistantMessageSegment struct {
@@ -150,7 +153,6 @@ func NewBot(tg *Client, st *store.Store, codex *codexapp.Client, uploadDir, code
defaultSandbox: defaultSandbox,
pollTimeout: pollTimeout,
outputs: make(map[string]*outputState),
diffs: make(map[string]string),
}
}
@@ -227,19 +229,20 @@ func (b *Bot) clearStaleActiveTurn(ctx context.Context, userID int64, thread sto
func botCommands() []BotCommand {
return []BotCommand{
{Command: "start", Description: "Show help"},
{Command: "new", Description: "Start a new thread"},
{Command: "thread", Description: "List or switch threads"},
{Command: "resume", Description: "List or switch threads"},
{Command: "rename", Description: "Rename a thread"},
{Command: "fork", Description: "Fork the active thread"},
{Command: "archive", Description: "Archive a thread"},
{Command: "unarchive", Description: "Restore an archived thread"},
{Command: "delete", Description: "Delete a thread"},
{Command: "status", Description: "Show active settings"},
{Command: "cancel", Description: "Interrupt the active turn"},
{Command: "workspace", Description: "Select workspace"},
{Command: "model", Description: "Choose model"},
{Command: "sandbox", Description: "Choose sandbox"},
{Command: "pic", Description: "Generate images"},
{Command: "diff", Description: "Show latest diff"},
{Command: "help", Description: "Show help"},
}
}
@@ -297,27 +300,27 @@ func (b *Bot) handleCommand(ctx context.Context, message *Message, session store
chatID := message.Chat.ID
switch command {
case "start", "help":
return true, b.sendHelp(ctx, chatID)
case "start":
return true, b.sendStart(ctx, chatID)
case "new":
_, _, err := b.createNewThread(ctx, userID, chatID, session, true)
return true, err
case "thread":
return true, b.threadCommand(ctx, userID, chatID, args)
case "threads", "resume":
return true, b.legacyThreadCommand(ctx, userID, chatID, args)
case "resume":
return true, b.resumeCommand(ctx, userID, chatID, args)
case "rename":
return true, b.renameThread(ctx, userID, chatID, session, args)
case "fork":
return true, b.forkThread(ctx, userID, chatID, session)
case "archive":
return true, b.archiveThread(ctx, userID, chatID, session, args)
case "unarchive":
return true, b.unarchiveThread(ctx, userID, chatID, session, args)
case "delete":
return true, b.deleteThread(ctx, userID, chatID, session, args)
case "status":
return true, b.sendStatus(ctx, userID, chatID, session)
case "cancel":
return true, b.cancelTurn(ctx, userID, chatID, session)
case "workspaces":
return true, b.sendWorkspaces(ctx, userID, chatID)
case "workspace":
return true, b.handleWorkspaceCommand(ctx, userID, chatID, session, args)
case "model":
@@ -326,44 +329,42 @@ func (b *Bot) handleCommand(ctx context.Context, message *Message, session store
return true, b.handleSandboxCommand(ctx, userID, chatID, session, args)
case "pic":
return true, b.handlePictureCommand(ctx, userID, chatID, session, args)
case "diff":
return true, b.sendDiff(ctx, chatID, session)
default:
_, err := b.tg.SendMessage(ctx, chatID, "Unknown command. Use /help.", SendMessageOptions{})
_, err := b.tg.SendMessage(ctx, chatID, "Unknown command.", SendMessageOptions{})
return true, err
}
}
func (b *Bot) sendHelp(ctx context.Context, chatID int64) error {
func (b *Bot) sendStart(ctx context.Context, chatID int64) error {
text := strings.Join([]string{
"Codex Telegram Bot",
"",
"/new - start a new Codex thread",
"/thread - list recent threads",
"/thread ID - switch to a thread",
"/resume - list recent threads",
"/resume ID - switch to a thread",
"/rename TITLE or /rename ID TITLE - rename a thread",
"/fork - fork the active thread",
"/archive [ID] - archive a thread",
"/archive [ID] - choose or archive a thread",
"/unarchive [ID] - choose or restore an archived thread",
"/delete [ID] - choose or delete a thread",
"/status - show active settings",
"/cancel - interrupt the active turn",
"/workspaces - list workspaces",
"/workspace [ID] - select workspace",
"/model - choose model and reasoning effort",
"/sandbox - choose sandbox",
"/pic PROMPT - generate image(s) from a prompt",
"/diff - show the latest streamed diff",
"",
"Plain text continues the active thread. Images are staged as local Codex image inputs; other files are staged and sent as paths.",
}, "\n")
return b.sendLong(ctx, chatID, text)
}
func (b *Bot) threadCommand(ctx context.Context, userID, chatID int64, args []string) error {
func (b *Bot) resumeCommand(ctx context.Context, userID, chatID int64, args []string) error {
if len(args) == 0 {
return b.sendResumeChoices(ctx, userID, chatID, 0, 0)
}
if len(args) != 1 {
_, err := b.tg.SendMessage(ctx, chatID, "Use /thread to choose a thread, or /thread ID to switch directly.", SendMessageOptions{})
_, err := b.tg.SendMessage(ctx, chatID, "Use /resume to choose a thread, or /resume ID to switch directly.", SendMessageOptions{})
return err
}
id, err := strconv.ParseInt(args[0], 10, 64)
@@ -374,26 +375,29 @@ func (b *Bot) threadCommand(ctx context.Context, userID, chatID int64, args []st
return b.resumeThreadByID(ctx, userID, chatID, id, 0)
}
func (b *Bot) legacyThreadCommand(ctx context.Context, userID, chatID int64, args []string) error {
if len(args) == 0 {
return b.sendResumeChoices(ctx, userID, chatID, 0, 0)
}
return b.threadCommand(ctx, userID, chatID, args)
func (b *Bot) sendResumeChoices(ctx context.Context, userID, chatID int64, page int, messageID int) error {
return b.sendThreadActionChoices(ctx, userID, chatID, threadActionResume, page, messageID)
}
func (b *Bot) sendResumeChoices(ctx context.Context, userID, chatID int64, page int, messageID int) error {
func (b *Bot) sendThreadActionChoices(ctx context.Context, userID, chatID int64, action string, page int, messageID int) error {
if page < 0 {
page = 0
}
threads, err := b.store.ListThreadsPage(ctx, userID, false, resumeThreadPageSize+1, page*resumeThreadPageSize)
var threads []store.Thread
var err error
if action == threadActionUnarchive {
threads, err = b.store.ListArchivedThreadsPage(ctx, userID, resumeThreadPageSize+1, page*resumeThreadPageSize)
} else {
threads, err = b.store.ListThreadsPage(ctx, userID, false, resumeThreadPageSize+1, page*resumeThreadPageSize)
}
if err != nil {
return err
}
if len(threads) == 0 && page > 0 {
return b.sendResumeChoices(ctx, userID, chatID, page-1, messageID)
return b.sendThreadActionChoices(ctx, userID, chatID, action, page-1, messageID)
}
if len(threads) == 0 {
text := "No threads yet. Use /new."
text := noThreadActionChoicesText(action)
if messageID != 0 {
_, err := b.tg.EditMessageText(ctx, chatID, messageID, text, EditMessageTextOptions{})
return err
@@ -406,8 +410,8 @@ func (b *Bot) sendResumeChoices(ctx context.Context, userID, chatID int64, page
if hasNext {
threads = threads[:resumeThreadPageSize]
}
text := resumeThreadListText(threads, page)
markup := resumeThreadMarkup(threads, page, hasNext)
text := threadActionListText(threads, page, action)
markup := threadActionMarkup(threads, page, hasNext, action)
if messageID != 0 {
_, err := b.tg.EditMessageText(ctx, chatID, messageID, EscapeHTML(text), EditMessageTextOptions{ParseMode: "HTML", ReplyMarkup: editReplyMarkup(markup)})
return err
@@ -537,28 +541,149 @@ func (b *Bot) forkThread(ctx context.Context, userID, chatID int64, session stor
}
func (b *Bot) archiveThread(ctx context.Context, userID, chatID int64, session store.Session, args []string) error {
var thread store.Thread
var err error
if len(args) > 0 {
id, parseErr := strconv.ParseInt(args[0], 10, 64)
if parseErr != nil {
_, sendErr := b.tg.SendMessage(ctx, chatID, "Thread ID must be a number.", SendMessageOptions{})
return sendErr
}
thread, err = b.store.GetThreadByID(ctx, userID, id)
} else {
thread, err = b.activeThread(ctx, userID, session)
_ = session
if len(args) == 0 {
return b.sendThreadActionChoices(ctx, userID, chatID, threadActionArchive, 0, 0)
}
id, handled, err := b.threadIDFromArgs(ctx, chatID, args, "Use /archive to choose a thread, or /archive ID.")
if handled {
return err
}
return b.archiveThreadByID(ctx, userID, chatID, id, 0)
}
func (b *Bot) archiveThreadByID(ctx context.Context, userID, chatID int64, id int64, messageID int) error {
thread, err := b.store.GetThreadByID(ctx, userID, id)
if err != nil {
return b.sendNoActiveThread(ctx, chatID, err)
if !errors.Is(err, sql.ErrNoRows) {
return err
}
return b.sendThreadActionNotFound(ctx, chatID, messageID)
}
if err := b.codex.ArchiveThread(ctx, thread.CodexThreadID); err != nil {
return b.sendError(ctx, chatID, "Could not archive Codex thread", err)
if !isMissingCodexThreadError(err) {
return b.sendError(ctx, chatID, "Could not archive Codex thread", err)
}
b.logger.Printf("archive stale local thread #%d codex_thread_id=%s: %v", thread.ID, thread.CodexThreadID, err)
}
if err := b.store.ArchiveThread(ctx, userID, thread.ID); err != nil {
return err
}
_, err = b.tg.SendMessage(ctx, chatID, fmt.Sprintf("Archived thread #%d.", thread.ID), SendMessageOptions{})
text := fmt.Sprintf("Archived thread #%d.", thread.ID)
if messageID != 0 {
_, err = b.tg.EditMessageText(ctx, chatID, messageID, text, EditMessageTextOptions{ReplyMarkup: clearInlineKeyboardMarkup()})
return err
}
_, err = b.tg.SendMessage(ctx, chatID, text, SendMessageOptions{})
return err
}
func (b *Bot) unarchiveThread(ctx context.Context, userID, chatID int64, session store.Session, args []string) error {
_ = session
if len(args) == 0 {
return b.sendThreadActionChoices(ctx, userID, chatID, threadActionUnarchive, 0, 0)
}
id, handled, err := b.threadIDFromArgs(ctx, chatID, args, "Use /unarchive to choose a thread, or /unarchive ID.")
if handled {
return err
}
return b.unarchiveThreadByID(ctx, userID, chatID, id, 0)
}
func (b *Bot) unarchiveThreadByID(ctx context.Context, userID, chatID int64, id int64, messageID int) error {
thread, err := b.store.GetThreadByID(ctx, userID, id)
if err != nil {
if !errors.Is(err, sql.ErrNoRows) {
return err
}
return b.sendThreadActionNotFound(ctx, chatID, messageID)
}
if err := b.codex.UnarchiveThread(ctx, thread.CodexThreadID); err != nil {
return b.sendError(ctx, chatID, "Could not unarchive Codex thread", err)
}
if err := b.store.UnarchiveThread(ctx, userID, thread.ID); err != nil {
return err
}
text := fmt.Sprintf("Restored thread #%d.", thread.ID)
if messageID != 0 {
_, err = b.tg.EditMessageText(ctx, chatID, messageID, text, EditMessageTextOptions{ReplyMarkup: clearInlineKeyboardMarkup()})
return err
}
_, err = b.tg.SendMessage(ctx, chatID, text, SendMessageOptions{})
return err
}
func (b *Bot) deleteThread(ctx context.Context, userID, chatID int64, session store.Session, args []string) error {
_ = session
if len(args) == 0 {
return b.sendThreadActionChoices(ctx, userID, chatID, threadActionDelete, 0, 0)
}
id, handled, err := b.threadIDFromArgs(ctx, chatID, args, "Use /delete to choose a thread, or /delete ID.")
if handled {
return err
}
return b.deleteThreadByID(ctx, userID, chatID, id, 0)
}
func (b *Bot) deleteThreadByID(ctx context.Context, userID, chatID int64, id int64, messageID int) error {
thread, err := b.store.GetThreadByID(ctx, userID, id)
if err != nil {
if !errors.Is(err, sql.ErrNoRows) {
return err
}
return b.sendThreadActionNotFound(ctx, chatID, messageID)
}
if err := b.codex.DeleteThread(ctx, thread.CodexThreadID); err != nil {
if !isMissingCodexThreadError(err) {
return b.sendError(ctx, chatID, "Could not delete Codex thread", err)
}
b.logger.Printf("delete stale local thread #%d codex_thread_id=%s: %v", thread.ID, thread.CodexThreadID, err)
}
b.clearOutput(thread.CodexThreadID)
if err := b.store.DeleteThread(ctx, userID, thread.ID); err != nil {
return err
}
text := fmt.Sprintf("Deleted thread #%d.", thread.ID)
if messageID != 0 {
_, err = b.tg.EditMessageText(ctx, chatID, messageID, text, EditMessageTextOptions{ReplyMarkup: clearInlineKeyboardMarkup()})
return err
}
_, err = b.tg.SendMessage(ctx, chatID, text, SendMessageOptions{})
return err
}
func isMissingCodexThreadError(err error) bool {
var rpcErr codexapp.RPCError
if !errors.As(err, &rpcErr) {
return false
}
if rpcErr.Code != -32600 {
return false
}
message := strings.ToLower(rpcErr.Message)
return strings.Contains(message, "no rollout found") || strings.Contains(message, "thread not loaded")
}
func (b *Bot) threadIDFromArgs(ctx context.Context, chatID int64, args []string, usage string) (int64, bool, error) {
if len(args) != 1 {
_, err := b.tg.SendMessage(ctx, chatID, usage, SendMessageOptions{})
return 0, true, err
}
id, err := strconv.ParseInt(args[0], 10, 64)
if err != nil || id <= 0 {
_, sendErr := b.tg.SendMessage(ctx, chatID, "Thread ID must be a number.", SendMessageOptions{})
return 0, true, sendErr
}
return id, false, nil
}
func (b *Bot) sendThreadActionNotFound(ctx context.Context, chatID int64, messageID int) error {
text := "Thread not found."
if messageID != 0 {
_, err := b.tg.EditMessageText(ctx, chatID, messageID, text, EditMessageTextOptions{ReplyMarkup: clearInlineKeyboardMarkup()})
return err
}
_, err := b.tg.SendMessage(ctx, chatID, text, SendMessageOptions{})
return err
}
@@ -842,26 +967,6 @@ func isPicturePath(path string) bool {
}
}
func (b *Bot) sendDiff(ctx context.Context, chatID int64, session store.Session) error {
if session.ActiveThreadID == 0 {
_, err := b.tg.SendMessage(ctx, chatID, "No active thread.", SendMessageOptions{})
return err
}
thread, err := b.store.GetThreadByID(ctx, chatID, session.ActiveThreadID)
if err != nil {
_, sendErr := b.tg.SendMessage(ctx, chatID, "No active thread.", SendMessageOptions{})
return sendErr
}
b.mu.Lock()
diff := b.diffs[thread.CodexThreadID]
b.mu.Unlock()
if diff == "" {
_, err := b.tg.SendMessage(ctx, chatID, "No diff has been streamed for this thread.", SendMessageOptions{})
return err
}
return b.sendLong(ctx, chatID, diff)
}
func (b *Bot) continueThread(ctx context.Context, message *Message, session store.Session) error {
userID := message.From.ID
chatID := message.Chat.ID
@@ -1221,6 +1326,15 @@ func (b *Bot) handleCallback(ctx context.Context, callback *CallbackQuery) error
}
return b.sendResumeChoices(ctx, callback.From.ID, callback.Message.Chat.ID, resumePage, callback.Message.MessageID)
}
if action, threadID, ok := ParseThreadActionCallbackData(callback.Data); ok {
return b.handleThreadActionCallback(ctx, callback, action, threadID)
}
if action, page, ok := ParseThreadActionPageCallbackData(callback.Data); ok {
if err := b.tg.AnswerCallbackQuery(ctx, callback.ID, ""); err != nil {
return err
}
return b.sendThreadActionChoices(ctx, callback.From.ID, callback.Message.Chat.ID, action, page, callback.Message.MessageID)
}
if modelID, ok := ParseModelCallbackData(callback.Data); ok {
return b.handleModelCallback(ctx, callback, modelID)
}
@@ -1236,6 +1350,33 @@ func (b *Bot) handleCallback(ctx context.Context, callback *CallbackQuery) error
return b.tg.AnswerCallbackQuery(ctx, callback.ID, "Unknown action.")
}
func (b *Bot) handleThreadActionCallback(ctx context.Context, callback *CallbackQuery, action string, threadID int64) error {
switch action {
case threadActionResume:
if err := b.tg.AnswerCallbackQuery(ctx, callback.ID, "Thread selected."); err != nil {
return err
}
return b.resumeThreadByID(ctx, callback.From.ID, callback.Message.Chat.ID, threadID, callback.Message.MessageID)
case threadActionArchive:
if err := b.tg.AnswerCallbackQuery(ctx, callback.ID, "Archiving thread."); err != nil {
return err
}
return b.archiveThreadByID(ctx, callback.From.ID, callback.Message.Chat.ID, threadID, callback.Message.MessageID)
case threadActionUnarchive:
if err := b.tg.AnswerCallbackQuery(ctx, callback.ID, "Restoring thread."); err != nil {
return err
}
return b.unarchiveThreadByID(ctx, callback.From.ID, callback.Message.Chat.ID, threadID, callback.Message.MessageID)
case threadActionDelete:
if err := b.tg.AnswerCallbackQuery(ctx, callback.ID, "Deleting thread."); err != nil {
return err
}
return b.deleteThreadByID(ctx, callback.From.ID, callback.Message.Chat.ID, threadID, callback.Message.MessageID)
default:
return b.tg.AnswerCallbackQuery(ctx, callback.ID, "Unknown thread action.")
}
}
func (b *Bot) handleApprovalCallback(ctx context.Context, callback *CallbackQuery, approvalID int64, decision string) error {
approval, err := b.store.GetPendingApproval(ctx, callback.From.ID, approvalID)
if err != nil {
@@ -1550,6 +1691,8 @@ func argumentLabel(key string) string {
return "CWD"
case "cmd":
return "cmd"
case "environmentid":
return "Environment ID"
}
label := strings.ReplaceAll(key, "_", " ")
return strings.ToUpper(label[:1]) + label[1:]
@@ -1804,20 +1947,6 @@ func (b *Bot) handleCodexNotification(ctx context.Context, event codexapp.Event)
if params.ThreadID != "" && b.hasOutputThread(params.ThreadID) {
return b.sendOutputBlock(ctx, params.ThreadID, "Codex warning: "+params.Message)
}
case "turn/diff/updated":
var params struct {
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`
Diff string `json:"diff"`
}
if err := json.Unmarshal(event.Params, &params); err != nil {
return err
}
if params.ThreadID != "" && b.shouldHandleOutputEvent(params.ThreadID, params.TurnID) {
b.mu.Lock()
b.diffs[params.ThreadID] = params.Diff
b.mu.Unlock()
}
case "turn/completed":
var params struct {
ThreadID string `json:"threadId"`
@@ -1854,6 +1983,17 @@ func (b *Bot) handleCodexNotification(ctx context.Context, event codexapp.Event)
}
return b.store.SyncThreadTitleByCodexID(ctx, params.ThreadID, title)
}
case "thread/deleted":
var params struct {
ThreadID string `json:"threadId"`
}
if err := json.Unmarshal(event.Params, &params); err != nil {
return err
}
if params.ThreadID != "" {
b.clearOutput(params.ThreadID)
return b.store.DeleteThreadByCodexID(ctx, params.ThreadID)
}
case "thread/settings/updated":
var params struct {
ThreadID string `json:"threadId"`
@@ -3090,20 +3230,28 @@ func parseCommand(text string) (string, []string, bool) {
}
func resumeThreadListText(threads []store.Thread, page int) string {
lines := []string{fmt.Sprintf("Threads (page %d):", page+1), ""}
return threadActionListText(threads, page, threadActionResume)
}
func threadActionListText(threads []store.Thread, page int, action string) string {
lines := []string{fmt.Sprintf("%s (page %d):", threadActionListTitle(action), page+1), ""}
for _, thread := range threads {
lines = append(lines, fmt.Sprintf("Thread ID %d: %s", thread.ID, threadDisplayTitle(thread)))
}
lines = append(lines, "", "Choose a button below, or use /thread THREAD_ID directly.")
lines = append(lines, "", threadActionListFooter(action))
return strings.Join(lines, "\n")
}
func resumeThreadMarkup(threads []store.Thread, page int, hasNext bool) *InlineKeyboardMarkup {
return threadActionMarkup(threads, page, hasNext, threadActionResume)
}
func threadActionMarkup(threads []store.Thread, page int, hasNext bool, action string) *InlineKeyboardMarkup {
keyboard := make([][]InlineKeyboardButton, 0, 4)
for _, thread := range threads {
button := InlineKeyboardButton{
Text: fmt.Sprintf("ID %d", thread.ID),
CallbackData: ResumeThreadCallbackData(thread.ID),
Text: threadActionButtonLabel(action, thread.ID),
CallbackData: threadActionButtonCallback(action, thread.ID),
}
if len(keyboard) == 0 || len(keyboard[len(keyboard)-1]) >= 4 {
keyboard = append(keyboard, []InlineKeyboardButton{button})
@@ -3113,10 +3261,10 @@ func resumeThreadMarkup(threads []store.Thread, page int, hasNext bool) *InlineK
}
var nav []InlineKeyboardButton
if page > 0 {
nav = append(nav, InlineKeyboardButton{Text: "Prev", CallbackData: ResumePageCallbackData(page - 1)})
nav = append(nav, InlineKeyboardButton{Text: "Prev", CallbackData: threadActionPageCallback(action, page-1)})
}
if hasNext {
nav = append(nav, InlineKeyboardButton{Text: "Next", CallbackData: ResumePageCallbackData(page + 1)})
nav = append(nav, InlineKeyboardButton{Text: "Next", CallbackData: threadActionPageCallback(action, page+1)})
}
if len(nav) > 0 {
keyboard = append(keyboard, nav)
@@ -3124,6 +3272,72 @@ func resumeThreadMarkup(threads []store.Thread, page int, hasNext bool) *InlineK
return &InlineKeyboardMarkup{InlineKeyboard: keyboard}
}
func noThreadActionChoicesText(action string) string {
switch action {
case threadActionArchive:
return "No threads to archive."
case threadActionUnarchive:
return "No archived threads to restore."
case threadActionDelete:
return "No threads to delete."
default:
return "No threads yet. Use /new."
}
}
func threadActionListTitle(action string) string {
switch action {
case threadActionArchive:
return "Choose a thread to archive"
case threadActionUnarchive:
return "Choose an archived thread to restore"
case threadActionDelete:
return "Choose a thread to delete"
default:
return "Threads"
}
}
func threadActionListFooter(action string) string {
switch action {
case threadActionArchive:
return "Choose a button below, or use /archive THREAD_ID directly."
case threadActionUnarchive:
return "Choose a button below, or use /unarchive THREAD_ID directly."
case threadActionDelete:
return "Choose a button below, or use /delete THREAD_ID directly."
default:
return "Choose a button below, or use /resume THREAD_ID directly."
}
}
func threadActionButtonLabel(action string, id int64) string {
switch action {
case threadActionArchive:
return fmt.Sprintf("Archive %d", id)
case threadActionUnarchive:
return fmt.Sprintf("Restore %d", id)
case threadActionDelete:
return fmt.Sprintf("Delete %d", id)
default:
return fmt.Sprintf("ID %d", id)
}
}
func threadActionButtonCallback(action string, id int64) string {
if action == threadActionResume {
return ResumeThreadCallbackData(id)
}
return ThreadActionCallbackData(action, id)
}
func threadActionPageCallback(action string, page int) string {
if action == threadActionResume {
return ResumePageCallbackData(page)
}
return ThreadActionPageCallbackData(action, page)
}
func normalizeThreadTitle(title string) string {
title = strings.Join(strings.Fields(title), " ")
runes := []rune(title)
@@ -3610,6 +3824,7 @@ func renderApprovalPayloadDetailsHTML(raw json.RawMessage, params map[string]any
}
appendPart(renderApprovalFieldHTML("cwd", params["cwd"]))
appendPart(renderApprovalFieldHTML("environmentId", params["environmentId"]))
appendPart(renderApprovalFieldHTML("command", params["command"]))
appendPart(renderApprovalFieldHTML("parsedCmd", params["parsedCmd"]))
appendPart(renderApprovalFieldHTML("additionalPermissions", params["additionalPermissions"]))
+35
View File
@@ -496,6 +496,41 @@ func ParseResumePageCallbackData(data string) (int, bool) {
return page, err == nil && page >= 0
}
func ThreadActionCallbackData(action string, id int64) string {
return fmt.Sprintf("thread:%s:%d", action, id)
}
func ParseThreadActionCallbackData(data string) (string, int64, bool) {
parts := strings.Split(data, ":")
if len(parts) != 3 || parts[0] != "thread" || !isThreadAction(parts[1]) {
return "", 0, false
}
id, err := strconv.ParseInt(parts[2], 10, 64)
return parts[1], id, err == nil && id > 0
}
func ThreadActionPageCallbackData(action string, page int) string {
return fmt.Sprintf("threadpage:%s:%d", action, page)
}
func ParseThreadActionPageCallbackData(data string) (string, int, bool) {
parts := strings.Split(data, ":")
if len(parts) != 3 || parts[0] != "threadpage" || !isThreadAction(parts[1]) {
return "", 0, false
}
page, err := strconv.Atoi(parts[2])
return parts[1], page, err == nil && page >= 0
}
func isThreadAction(action string) bool {
switch action {
case threadActionResume, threadActionArchive, threadActionUnarchive, threadActionDelete:
return true
default:
return false
}
}
func ModelCallbackData(modelID string) (string, bool) {
encoded := base64.RawURLEncoding.EncodeToString([]byte(modelID))
data := "model:" + encoded
+71 -9
View File
@@ -7,6 +7,7 @@ import (
"strings"
"testing"
"codex-telegram-bot/internal/codexapp"
"codex-telegram-bot/internal/store"
)
@@ -197,16 +198,18 @@ func TestEditReplyMarkupClearsInlineKeyboard(t *testing.T) {
}
}
func TestBotCommandsUseSingleThreadCommand(t *testing.T) {
func TestBotCommandsExposeCurrentPromptList(t *testing.T) {
commands := botCommands()
seen := map[string]bool{}
for _, command := range commands {
seen[command.Command] = true
}
if !seen["thread"] {
t.Fatal("bot command list should include /thread")
for _, command := range []string{"start", "new", "resume", "rename", "fork", "archive", "unarchive", "delete", "status", "cancel", "workspace", "model", "sandbox", "pic"} {
if !seen[command] {
t.Fatalf("bot command list should include /%s", command)
}
}
for _, removed := range []string{"threads", "resume"} {
for _, removed := range []string{"help", "thread", "threads", "workspaces", "diff"} {
if seen[removed] {
t.Fatalf("bot command list should not include /%s", removed)
}
@@ -214,8 +217,8 @@ func TestBotCommandsUseSingleThreadCommand(t *testing.T) {
}
func TestParseCommand(t *testing.T) {
name, args, ok := parseCommand("/thread@my_bot 123")
if !ok || name != "thread" || len(args) != 1 || args[0] != "123" {
name, args, ok := parseCommand("/resume@my_bot 123")
if !ok || name != "resume" || len(args) != 1 || args[0] != "123" {
t.Fatalf("unexpected command parse: %q %#v %v", name, args, ok)
}
}
@@ -394,9 +397,9 @@ func TestRenderDynamicToolDetailsSelectsUsefulArguments(t *testing.T) {
}
func TestRenderApprovalDetailsAvoidsRawJSONDump(t *testing.T) {
raw := json.RawMessage(`{"command":"go test ./...","cwd":"/workspace/project","unused":{"nested":true}}`)
raw := json.RawMessage(`{"command":"go test ./...","cwd":"/workspace/project","environmentId":"env_123","unused":{"nested":true}}`)
text := renderApprovalHTML("item/commandExecution/requestApproval", raw, "")
for _, want := range []string{"Codex requests command approval", "language-bash", "go test ./...", "CWD"} {
for _, want := range []string{"Codex requests command approval", "language-bash", "go test ./...", "CWD", "Environment ID", "env_123"} {
if !strings.Contains(text, want) {
t.Fatalf("approval render missing %q in %q", want, text)
}
@@ -534,10 +537,39 @@ func TestResumeCallbackData(t *testing.T) {
}
}
func TestThreadActionCallbackData(t *testing.T) {
action, threadID, ok := ParseThreadActionCallbackData(ThreadActionCallbackData(threadActionDelete, 123))
if !ok || action != threadActionDelete || threadID != 123 {
t.Fatalf("unexpected thread action callback: action=%q id=%d ok=%v", action, threadID, ok)
}
action, page, ok := ParseThreadActionPageCallbackData(ThreadActionPageCallbackData(threadActionUnarchive, 2))
if !ok || action != threadActionUnarchive || page != 2 {
t.Fatalf("unexpected thread action page callback: action=%q page=%d ok=%v", action, page, ok)
}
if _, _, ok := ParseThreadActionCallbackData("thread:unknown:123"); ok {
t.Fatal("unknown thread action should not parse")
}
}
func TestIsMissingCodexThreadError(t *testing.T) {
for _, message := range []string{
"no rollout found for thread id 019ef2ea",
"thread not loaded: 019ef2ea",
} {
err := codexapp.RPCError{Code: -32600, Message: message}
if !isMissingCodexThreadError(err) {
t.Fatalf("expected stale thread error for %q", message)
}
}
if isMissingCodexThreadError(codexapp.RPCError{Code: -32600, Message: "permission denied"}) {
t.Fatal("unrelated -32600 error should not be treated as stale thread")
}
}
func TestResumeThreadListText(t *testing.T) {
threads := []store.Thread{{ID: 42, Title: "do xyz"}, {ID: 43, Title: "executed xxx command"}}
text := resumeThreadListText(threads, 0)
for _, want := range []string{"Thread ID 42: do xyz", "Thread ID 43: executed xxx command"} {
for _, want := range []string{"Thread ID 42: do xyz", "Thread ID 43: executed xxx command", "/resume THREAD_ID"} {
if !strings.Contains(text, want) {
t.Fatalf("resume list missing %q in %q", want, text)
}
@@ -554,6 +586,36 @@ func TestResumeThreadListText(t *testing.T) {
if !ok || secondID != 43 {
t.Fatalf("second resume button targets id=%d ok=%v", secondID, ok)
}
deleteText := threadActionListText(threads, 0, threadActionDelete)
if !strings.Contains(deleteText, "Choose a thread to delete") || !strings.Contains(deleteText, "/delete THREAD_ID") {
t.Fatalf("delete list text missing action copy: %q", deleteText)
}
deleteMarkup := threadActionMarkup(threads, 0, true, threadActionDelete)
if deleteMarkup.InlineKeyboard[0][0].Text != "Delete 42" {
t.Fatalf("unexpected delete button label: %#v", deleteMarkup.InlineKeyboard)
}
action, deleteID, ok := ParseThreadActionCallbackData(deleteMarkup.InlineKeyboard[0][0].CallbackData)
if !ok || action != threadActionDelete || deleteID != 42 {
t.Fatalf("delete button targets action=%q id=%d ok=%v", action, deleteID, ok)
}
action, page, ok := ParseThreadActionPageCallbackData(deleteMarkup.InlineKeyboard[1][0].CallbackData)
if !ok || action != threadActionDelete || page != 1 {
t.Fatalf("delete next button targets action=%q page=%d ok=%v", action, page, ok)
}
unarchiveText := threadActionListText(threads, 0, threadActionUnarchive)
if !strings.Contains(unarchiveText, "Choose an archived thread to restore") || !strings.Contains(unarchiveText, "/unarchive THREAD_ID") {
t.Fatalf("unarchive list text missing action copy: %q", unarchiveText)
}
unarchiveMarkup := threadActionMarkup(threads, 0, false, threadActionUnarchive)
if unarchiveMarkup.InlineKeyboard[0][0].Text != "Restore 42" {
t.Fatalf("unexpected unarchive button label: %#v", unarchiveMarkup.InlineKeyboard)
}
action, unarchiveID, ok := ParseThreadActionCallbackData(unarchiveMarkup.InlineKeyboard[0][0].CallbackData)
if !ok || action != threadActionUnarchive || unarchiveID != 42 {
t.Fatalf("unarchive button targets action=%q id=%d ok=%v", action, unarchiveID, ok)
}
}
func TestModelEffortAndSandboxCallbackData(t *testing.T) {
+1133 -439
View File
File diff suppressed because it is too large Load Diff
@@ -43,13 +43,21 @@
"description": "The command's working directory.",
"anyOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
},
{
"type": "null"
}
]
},
"environmentId": {
"description": "Environment in which the command will run.",
"default": null,
"type": [
"string",
"null"
]
},
"itemId": {
"type": "string"
},
@@ -129,7 +137,7 @@
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
},
"write": {
@@ -139,7 +147,7 @@
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
}
}
@@ -388,7 +396,7 @@
],
"properties": {
"path": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
},
"type": {
"type": "string",
@@ -566,6 +574,9 @@
}
]
},
"LegacyAppPathString": {
"type": "string"
},
"NetworkApprovalContext": {
"type": "object",
"required": [
@@ -26,6 +26,27 @@
}
}
},
{
"type": "object",
"required": [
"message",
"mode",
"requestedSchema"
],
"properties": {
"_meta": true,
"message": {
"type": "string"
},
"mode": {
"type": "string",
"enum": [
"openai/form"
]
},
"requestedSchema": true
}
},
{
"type": "object",
"required": [
+13 -3
View File
@@ -14,6 +14,13 @@
"cwd": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"environmentId": {
"default": null,
"type": [
"string",
"null"
]
},
"itemId": {
"type": "string"
},
@@ -70,7 +77,7 @@
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
},
"write": {
@@ -80,7 +87,7 @@
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
}
}
@@ -114,7 +121,7 @@
],
"properties": {
"path": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
},
"type": {
"type": "string",
@@ -292,6 +299,9 @@
}
]
},
"LegacyAppPathString": {
"type": "string"
},
"RequestPermissionProfile": {
"type": "object",
"properties": {
@@ -26,10 +26,6 @@
}
},
"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"
},
"AdditionalFileSystemPermissions": {
"type": "object",
"properties": {
@@ -57,7 +53,7 @@
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
},
"write": {
@@ -67,7 +63,7 @@
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
}
}
@@ -101,7 +97,7 @@
],
"properties": {
"path": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
},
"type": {
"type": "string",
@@ -304,6 +300,9 @@
}
}
},
"LegacyAppPathString": {
"type": "string"
},
"PermissionGrantScope": {
"type": "string",
"enum": [
+489 -30
View File
@@ -84,6 +84,26 @@
},
"title": "Thread/archivedNotification"
},
{
"type": "object",
"required": [
"method",
"params"
],
"properties": {
"method": {
"type": "string",
"enum": [
"thread/deleted"
],
"title": "Thread/deletedNotificationMethod"
},
"params": {
"$ref": "#/definitions/ThreadDeletedNotification"
}
},
"title": "Thread/deletedNotification"
},
{
"type": "object",
"required": [
@@ -789,6 +809,26 @@
},
"title": "RemoteControl/status/changedNotification"
},
{
"type": "object",
"required": [
"method",
"params"
],
"properties": {
"method": {
"type": "string",
"enum": [
"externalAgentConfig/import/progress"
],
"title": "ExternalAgentConfig/import/progressNotificationMethod"
},
"params": {
"$ref": "#/definitions/ExternalAgentConfigImportProgressNotification"
}
},
"title": "ExternalAgentConfig/import/progressNotification"
},
{
"type": "object",
"required": [
@@ -950,6 +990,46 @@
},
"title": "Model/verificationNotification"
},
{
"type": "object",
"required": [
"method",
"params"
],
"properties": {
"method": {
"type": "string",
"enum": [
"turn/moderationMetadata"
],
"title": "Turn/moderationMetadataNotificationMethod"
},
"params": {
"$ref": "#/definitions/TurnModerationMetadataNotification"
}
},
"title": "Turn/moderationMetadataNotification"
},
{
"type": "object",
"required": [
"method",
"params"
],
"properties": {
"method": {
"type": "string",
"enum": [
"model/safetyBuffering/updated"
],
"title": "Model/safetyBuffering/updatedNotificationMethod"
},
"params": {
"$ref": "#/definitions/ModelSafetyBufferingUpdatedNotification"
}
},
"title": "Model/safetyBuffering/updatedNotification"
},
{
"type": "object",
"required": [
@@ -1321,6 +1401,7 @@
}
},
"AccountRateLimitsUpdatedNotification": {
"description": "Sparse rolling rate-limit update.\n\nClients should merge available values into the most recent `account/rateLimits/read` response or refetch that snapshot. Nullable account metadata may be unavailable in a rolling update and does not clear a previously observed value.",
"type": "object",
"required": [
"rateLimits"
@@ -1403,7 +1484,7 @@
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
},
"write": {
@@ -1413,7 +1494,7 @@
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
}
}
@@ -1816,6 +1897,20 @@
"enum": [
"agentIdentity"
]
},
{
"description": "Programmatic Codex auth backed by a personal access token.",
"type": "string",
"enum": [
"personalAccessToken"
]
},
{
"description": "Amazon Bedrock bearer token managed by Codex.",
"type": "string",
"enum": [
"bedrockApiKey"
]
}
]
},
@@ -2416,7 +2511,145 @@
}
},
"ExternalAgentConfigImportCompletedNotification": {
"type": "object"
"type": "object",
"required": [
"importId",
"itemTypeResults"
],
"properties": {
"importId": {
"type": "string"
},
"itemTypeResults": {
"type": "array",
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportTypeResult"
}
}
}
},
"ExternalAgentConfigImportItemTypeFailure": {
"type": "object",
"required": [
"failureStage",
"itemType",
"message"
],
"properties": {
"cwd": {
"type": [
"string",
"null"
]
},
"errorType": {
"type": [
"string",
"null"
]
},
"failureStage": {
"type": "string"
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
},
"message": {
"type": "string"
},
"source": {
"type": [
"string",
"null"
]
}
}
},
"ExternalAgentConfigImportItemTypeSuccess": {
"type": "object",
"required": [
"itemType"
],
"properties": {
"cwd": {
"type": [
"string",
"null"
]
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
},
"source": {
"type": [
"string",
"null"
]
},
"target": {
"type": [
"string",
"null"
]
}
}
},
"ExternalAgentConfigImportProgressNotification": {
"type": "object",
"required": [
"importId",
"itemTypeResults"
],
"properties": {
"importId": {
"type": "string"
},
"itemTypeResults": {
"type": "array",
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportTypeResult"
}
}
}
},
"ExternalAgentConfigImportTypeResult": {
"type": "object",
"required": [
"failures",
"itemType",
"successes"
],
"properties": {
"failures": {
"type": "array",
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportItemTypeFailure"
}
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
},
"successes": {
"type": "array",
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportItemTypeSuccess"
}
}
}
},
"ExternalAgentConfigMigrationItemType": {
"type": "string",
"enum": [
"AGENTS_MD",
"CONFIG",
"SKILLS",
"PLUGINS",
"MCP_SERVER_CONFIG",
"SUBAGENTS",
"HOOKS",
"COMMANDS",
"SESSIONS"
]
},
"FileChangeOutputDeltaNotification": {
"description": "Deprecated legacy notification for `apply_patch` textual output.\n\nThe server no longer emits this notification.",
@@ -2486,7 +2719,7 @@
],
"properties": {
"path": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
},
"type": {
"type": "string",
@@ -3295,6 +3528,7 @@
"sessionFlags",
"plugin",
"cloudRequirements",
"cloudManagedConfig",
"legacyManagedConfigFile",
"legacyManagedConfigMdm",
"unknown"
@@ -3324,6 +3558,8 @@
"ImageDetail": {
"type": "string",
"enum": [
"auto",
"low",
"high",
"original"
]
@@ -3472,6 +3708,9 @@
}
}
},
"LegacyAppPathString": {
"type": "string"
},
"McpServerOauthLoginCompletedNotification": {
"type": "object",
"required": [
@@ -3520,6 +3759,35 @@
},
"status": {
"$ref": "#/definitions/McpServerStartupState"
},
"threadId": {
"type": [
"string",
"null"
]
}
}
},
"McpToolCallAppContext": {
"type": "object",
"required": [
"connectorId"
],
"properties": {
"connectorId": {
"type": "string"
},
"linkId": {
"type": [
"string",
"null"
]
},
"resourceUri": {
"type": [
"string",
"null"
]
}
}
},
@@ -3687,6 +3955,39 @@
}
}
},
"ModelSafetyBufferingUpdatedNotification": {
"type": "object",
"required": [
"model",
"reasons",
"threadId",
"turnId",
"useCases"
],
"properties": {
"model": {
"type": "string"
},
"reasons": {
"type": "array",
"items": {
"type": "string"
}
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
},
"useCases": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"ModelVerification": {
"type": "string",
"enum": [
@@ -3715,6 +4016,15 @@
}
}
},
"MultiAgentMode": {
"description": "Controls whether the model receives multi-agent delegation instructions and, when it does, whether it should only spawn sub-agents after an explicit user request or may delegate proactively when doing so would help. `none` leaves the multi-agent tools available without injecting delegation instructions.",
"type": "string",
"enum": [
"none",
"explicitRequestOnly",
"proactive"
]
},
"NetworkAccess": {
"type": "string",
"enum": [
@@ -3967,6 +4277,16 @@
}
]
},
"individualLimit": {
"anyOf": [
{
"$ref": "#/definitions/SpendControlLimitSnapshot"
},
{
"type": "null"
}
]
},
"limitId": {
"type": [
"string",
@@ -4055,16 +4375,9 @@
]
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"description": "A non-empty reasoning effort value advertised by the model.",
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
]
"minLength": 1
},
"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",
@@ -4424,6 +4737,39 @@
"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"
},
"SpendControlLimitSnapshot": {
"type": "object",
"required": [
"limit",
"remainingPercent",
"resetsAt",
"used"
],
"properties": {
"limit": {
"type": "string"
},
"remainingPercent": {
"type": "integer",
"format": "int32"
},
"resetsAt": {
"type": "integer",
"format": "int64"
},
"used": {
"type": "string"
}
}
},
"SubAgentActivityKind": {
"type": "string",
"enum": [
"started",
"interacted",
"interrupted"
]
},
"SubAgentSource": {
"oneOf": [
{
@@ -4670,6 +5016,13 @@
"null"
]
},
"parentThreadId": {
"description": "The ID of the parent thread. This will only be set if this thread is a subagent.",
"type": [
"string",
"null"
]
},
"path": {
"description": "[UNSTABLE] Path to the thread on disk.",
"type": [
@@ -4681,6 +5034,14 @@
"description": "Usually the first user message in the thread, if available.",
"type": "string"
},
"recencyAt": {
"description": "Unix timestamp (in seconds) used for thread recency ordering.",
"type": [
"integer",
"null"
],
"format": "int64"
},
"sessionId": {
"description": "Session id shared by threads that belong to the same session tree.",
"type": "string"
@@ -4755,6 +5116,17 @@
}
}
},
"ThreadDeletedNotification": {
"type": "object",
"required": [
"threadId"
],
"properties": {
"threadId": {
"type": "string"
}
}
},
"ThreadGoal": {
"type": "object",
"required": [
@@ -4857,6 +5229,12 @@
"type"
],
"properties": {
"clientId": {
"type": [
"string",
"null"
]
},
"content": {
"type": "array",
"items": {
@@ -5041,7 +5419,7 @@
"description": "The command's working directory.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
]
},
@@ -5134,6 +5512,16 @@
"type"
],
"properties": {
"appContext": {
"anyOf": [
{
"$ref": "#/definitions/McpToolCallAppContext"
},
{
"type": "null"
}
]
},
"arguments": true,
"durationMs": {
"description": "The duration of the MCP tool call in milliseconds.",
@@ -5157,6 +5545,7 @@
"type": "string"
},
"mcpAppResourceUri": {
"description": "Deprecated: use `appContext.resourceUri` instead.",
"type": [
"string",
"null"
@@ -5341,6 +5730,38 @@
},
"title": "CollabAgentToolCallThreadItem"
},
{
"type": "object",
"required": [
"agentPath",
"agentThreadId",
"id",
"kind",
"type"
],
"properties": {
"agentPath": {
"type": "string"
},
"agentThreadId": {
"type": "string"
},
"id": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/SubAgentActivityKind"
},
"type": {
"type": "string",
"enum": [
"subAgentActivity"
],
"title": "SubAgentActivityThreadItemType"
}
},
"title": "SubAgentActivityThreadItem"
},
{
"type": "object",
"required": [
@@ -5399,6 +5820,32 @@
},
"title": "ImageViewThreadItem"
},
{
"type": "object",
"required": [
"durationMs",
"id",
"type"
],
"properties": {
"durationMs": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"sleep"
],
"title": "SleepThreadItemType"
}
},
"title": "SleepThreadItem"
},
{
"type": "object",
"required": [
@@ -5762,6 +6209,16 @@
"modelProvider": {
"type": "string"
},
"summary": {
"anyOf": [
{
"$ref": "#/definitions/ReasoningSummary"
},
{
"type": "null"
}
]
},
"personality": {
"anyOf": [
{
@@ -5780,16 +6237,6 @@
"string",
"null"
]
},
"summary": {
"anyOf": [
{
"$ref": "#/definitions/ReasoningSummary"
},
{
"type": "null"
}
]
}
}
},
@@ -5809,12 +6256,7 @@
}
},
"ThreadSource": {
"type": "string",
"enum": [
"user",
"subagent",
"memory_consolidation"
]
"type": "string"
},
"ThreadStartedNotification": {
"type": "object",
@@ -6156,6 +6598,23 @@
}
]
},
"TurnModerationMetadataNotification": {
"type": "object",
"required": [
"metadata",
"threadId",
"turnId"
],
"properties": {
"metadata": true,
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
}
},
"TurnPlanStep": {
"type": "object",
"required": [
+89 -41
View File
@@ -285,7 +285,7 @@
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
},
"write": {
@@ -295,7 +295,7 @@
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
}
}
@@ -638,13 +638,21 @@
"description": "The command's working directory.",
"anyOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
},
{
"type": "null"
}
]
},
"environmentId": {
"description": "Environment in which the command will run.",
"default": null,
"type": [
"string",
"null"
]
},
"itemId": {
"type": "string"
},
@@ -693,6 +701,43 @@
}
}
},
"ToolRequestUserInputQuestion": {
"description": "EXPERIMENTAL. Represents one request_user_input question and its required options.",
"type": "object",
"required": [
"header",
"id",
"question"
],
"properties": {
"header": {
"type": "string"
},
"id": {
"type": "string"
},
"isOther": {
"default": false,
"type": "boolean"
},
"isSecret": {
"default": false,
"type": "boolean"
},
"options": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/ToolRequestUserInputOption"
}
},
"question": {
"type": "string"
}
}
},
"DynamicToolCallParams": {
"type": "object",
"required": [
@@ -898,7 +943,7 @@
],
"properties": {
"path": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
},
"type": {
"type": "string",
@@ -1076,6 +1121,9 @@
}
]
},
"LegacyAppPathString": {
"type": "string"
},
"McpElicitationArrayType": {
"type": "string",
"enum": [
@@ -1633,6 +1681,27 @@
}
}
},
{
"type": "object",
"required": [
"message",
"mode",
"requestedSchema"
],
"properties": {
"_meta": true,
"message": {
"type": "string"
},
"mode": {
"type": "string",
"enum": [
"openai/form"
]
},
"requestedSchema": true
}
},
{
"type": "object",
"required": [
@@ -1852,6 +1921,13 @@
"cwd": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"environmentId": {
"default": null,
"type": [
"string",
"null"
]
},
"itemId": {
"type": "string"
},
@@ -1943,6 +2019,15 @@
"turnId"
],
"properties": {
"autoResolutionMs": {
"default": null,
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"itemId": {
"type": "string"
},
@@ -1959,43 +2044,6 @@
"type": "string"
}
}
},
"ToolRequestUserInputQuestion": {
"description": "EXPERIMENTAL. Represents one request_user_input question and its required options.",
"type": "object",
"required": [
"header",
"id",
"question"
],
"properties": {
"header": {
"type": "string"
},
"id": {
"type": "string"
},
"isOther": {
"default": false,
"type": "boolean"
},
"isSecret": {
"default": false,
"type": "boolean"
},
"options": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/ToolRequestUserInputOption"
}
},
"question": {
"type": "string"
}
}
}
}
}
+9
View File
@@ -10,6 +10,15 @@
"turnId"
],
"properties": {
"autoResolutionMs": {
"default": null,
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"itemId": {
"type": "string"
},
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+4
View File
@@ -51,6 +51,10 @@
"default": false,
"type": "boolean"
},
"mcpServerOpenaiFormElicitation": {
"description": "Allow downstream MCP servers to request OpenAI extended form elicitations.",
"type": "boolean"
},
"optOutNotificationMethods": {
"description": "Exact notification method names that should be suppressed for this connection (for example `thread/started`).",
"type": [
@@ -1,6 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AccountRateLimitsUpdatedNotification",
"description": "Sparse rolling rate-limit update.\n\nClients should merge available values into the most recent `account/rateLimits/read` response or refetch that snapshot. Nullable account metadata may be unavailable in a rolling update and does not clear a previously observed value.",
"type": "object",
"required": [
"rateLimits"
@@ -72,6 +73,16 @@
}
]
},
"individualLimit": {
"anyOf": [
{
"$ref": "#/definitions/SpendControlLimitSnapshot"
},
{
"type": "null"
}
]
},
"limitId": {
"type": [
"string",
@@ -151,6 +162,31 @@
"format": "int64"
}
}
},
"SpendControlLimitSnapshot": {
"type": "object",
"required": [
"limit",
"remainingPercent",
"resetsAt",
"used"
],
"properties": {
"limit": {
"type": "string"
},
"remainingPercent": {
"type": "integer",
"format": "int32"
},
"resetsAt": {
"type": "integer",
"format": "int64"
},
"used": {
"type": "string"
}
}
}
}
}
@@ -55,6 +55,20 @@
"enum": [
"agentIdentity"
]
},
{
"description": "Programmatic Codex auth backed by a personal access token.",
"type": "string",
"enum": [
"personalAccessToken"
]
},
{
"description": "Amazon Bedrock bearer token managed by Codex.",
"type": "string",
"enum": [
"bedrockApiKey"
]
}
]
},
-1
View File
@@ -11,7 +11,6 @@
]
},
"includeLayers": {
"default": false,
"type": "boolean"
}
}
+60 -123
View File
@@ -46,6 +46,16 @@
"AppConfig": {
"type": "object",
"properties": {
"approvals_reviewer": {
"anyOf": [
{
"$ref": "#/definitions/ApprovalsReviewer"
},
{
"type": "null"
}
]
},
"default_tools_approval_mode": {
"anyOf": [
{
@@ -150,6 +160,26 @@
"AppsDefaultConfig": {
"type": "object",
"properties": {
"approvals_reviewer": {
"anyOf": [
{
"$ref": "#/definitions/ApprovalsReviewer"
},
{
"type": "null"
}
]
},
"default_tools_approval_mode": {
"anyOf": [
{
"$ref": "#/definitions/AppToolApproval"
},
{
"type": "null"
}
]
},
"destructive_enabled": {
"default": true,
"type": "boolean"
@@ -388,19 +418,6 @@
}
]
},
"profile": {
"type": [
"string",
"null"
]
},
"profiles": {
"default": {},
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/ProfileV2"
}
},
"review_model": {
"type": [
"string",
@@ -537,6 +554,33 @@
},
"title": "SystemConfigLayerSource"
},
{
"description": "Enterprise-managed config layer delivered by the cloud config bundle.",
"type": "object",
"required": [
"id",
"name",
"type"
],
"properties": {
"id": {
"description": "Stable identifier for the delivered layer.",
"type": "string"
},
"name": {
"description": "Admin-facing name for the delivered layer. This is surfaced in diagnostics so users know which cloud layer needs administrator attention.",
"type": "string"
},
"type": {
"type": "string",
"enum": [
"enterpriseManaged"
],
"title": "EnterpriseManagedConfigLayerSourceType"
}
},
"title": "EnterpriseManagedConfigLayerSource"
},
{
"description": "User config layer from $CODEX_HOME/config.toml. This layer is special in that it is expected to be: - writable by the user - generally outside the workspace directory",
"type": "object",
@@ -668,118 +712,10 @@
"api"
]
},
"ProfileV2": {
"type": "object",
"properties": {
"approval_policy": {
"anyOf": [
{
"$ref": "#/definitions/AskForApproval"
},
{
"type": "null"
}
]
},
"approvals_reviewer": {
"description": "[UNSTABLE] Optional profile-level override for where approval requests are routed for review. If omitted, the enclosing config default is used.",
"anyOf": [
{
"$ref": "#/definitions/ApprovalsReviewer"
},
{
"type": "null"
}
]
},
"chatgpt_base_url": {
"type": [
"string",
"null"
]
},
"model": {
"type": [
"string",
"null"
]
},
"model_provider": {
"type": [
"string",
"null"
]
},
"model_reasoning_effort": {
"anyOf": [
{
"$ref": "#/definitions/ReasoningEffort"
},
{
"type": "null"
}
]
},
"model_reasoning_summary": {
"anyOf": [
{
"$ref": "#/definitions/ReasoningSummary"
},
{
"type": "null"
}
]
},
"model_verbosity": {
"anyOf": [
{
"$ref": "#/definitions/Verbosity"
},
{
"type": "null"
}
]
},
"service_tier": {
"type": [
"string",
"null"
]
},
"tools": {
"anyOf": [
{
"$ref": "#/definitions/ToolsV2"
},
{
"type": "null"
}
]
},
"web_search": {
"anyOf": [
{
"$ref": "#/definitions/WebSearchMode"
},
{
"type": "null"
}
]
}
},
"additionalProperties": true
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"description": "A non-empty reasoning effort value advertised by the model.",
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
]
"minLength": 1
},
"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",
@@ -900,6 +836,7 @@
"enum": [
"disabled",
"cached",
"indexed",
"live"
]
},
+40 -5
View File
@@ -89,12 +89,24 @@
"ConfigRequirements": {
"type": "object",
"properties": {
"allowAppshots": {
"type": [
"boolean",
"null"
]
},
"allowManagedHooksOnly": {
"type": [
"boolean",
"null"
]
},
"allowRemoteControl": {
"type": [
"boolean",
"null"
]
},
"allowedApprovalPolicies": {
"type": [
"array",
@@ -113,13 +125,13 @@
"type": "boolean"
}
},
"allowedPermissions": {
"allowedPermissionProfiles": {
"type": [
"array",
"object",
"null"
],
"items": {
"type": "string"
"additionalProperties": {
"type": "boolean"
}
},
"allowedSandboxModes": {
@@ -140,6 +152,15 @@
"$ref": "#/definitions/WebSearchMode"
}
},
"allowedWindowsSandboxImplementations": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/WindowsSandboxSetupMode"
}
},
"computerUse": {
"anyOf": [
{
@@ -150,6 +171,12 @@
}
]
},
"defaultPermissions": {
"type": [
"string",
"null"
]
},
"enforceResidency": {
"anyOf": [
{
@@ -470,7 +497,7 @@
"type": "string",
"enum": [
"allow",
"none"
"deny"
]
},
"ResidencyRequirement": {
@@ -492,8 +519,16 @@
"enum": [
"disabled",
"cached",
"indexed",
"live"
]
},
"WindowsSandboxSetupMode": {
"type": "string",
"enum": [
"elevated",
"unelevated"
]
}
}
}
+27
View File
@@ -106,6 +106,33 @@
},
"title": "SystemConfigLayerSource"
},
{
"description": "Enterprise-managed config layer delivered by the cloud config bundle.",
"type": "object",
"required": [
"id",
"name",
"type"
],
"properties": {
"id": {
"description": "Stable identifier for the delivered layer.",
"type": "string"
},
"name": {
"description": "Admin-facing name for the delivered layer. This is surfaced in diagnostics so users know which cloud layer needs administrator attention.",
"type": "string"
},
"type": {
"type": "string",
"enum": [
"enterpriseManaged"
],
"title": "EnterpriseManagedConfigLayerSourceType"
}
},
"title": "EnterpriseManagedConfigLayerSource"
},
{
"description": "User config layer from $CODEX_HOME/config.toml. This layer is special in that it is expected to be: - writable by the user - generally outside the workspace directory",
"type": "object",
@@ -0,0 +1,14 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ConsumeAccountRateLimitResetCreditParams",
"type": "object",
"required": [
"idempotencyKey"
],
"properties": {
"idempotencyKey": {
"description": "Identifies one logical reset attempt. A UUID is recommended; reuse the same value when retrying that attempt.",
"type": "string"
}
}
}
@@ -0,0 +1,47 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ConsumeAccountRateLimitResetCreditResponse",
"type": "object",
"required": [
"outcome"
],
"properties": {
"outcome": {
"$ref": "#/definitions/ConsumeAccountRateLimitResetCreditOutcome"
}
},
"definitions": {
"ConsumeAccountRateLimitResetCreditOutcome": {
"oneOf": [
{
"description": "A reset credit was consumed and the eligible rate-limit windows were reset.",
"type": "string",
"enum": [
"reset"
]
},
{
"description": "No current rate-limit window is eligible for a reset.",
"type": "string",
"enum": [
"nothingToReset"
]
},
{
"description": "The account has no earned reset credits available.",
"type": "string",
"enum": [
"noCredit"
]
},
{
"description": "The same idempotency key already completed a reset successfully.",
"type": "string",
"enum": [
"alreadyRedeemed"
]
}
]
}
}
}
@@ -14,7 +14,7 @@
}
},
"includeHome": {
"description": "If true, include detection under the user's home (~/.claude, ~/.codex, etc.).",
"description": "If true, include detection under the user's home directory.",
"type": "boolean"
}
}
@@ -1,5 +1,127 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExternalAgentConfigImportCompletedNotification",
"type": "object"
"type": "object",
"required": [
"importId",
"itemTypeResults"
],
"properties": {
"importId": {
"type": "string"
},
"itemTypeResults": {
"type": "array",
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportTypeResult"
}
}
},
"definitions": {
"ExternalAgentConfigImportItemTypeFailure": {
"type": "object",
"required": [
"failureStage",
"itemType",
"message"
],
"properties": {
"cwd": {
"type": [
"string",
"null"
]
},
"errorType": {
"type": [
"string",
"null"
]
},
"failureStage": {
"type": "string"
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
},
"message": {
"type": "string"
},
"source": {
"type": [
"string",
"null"
]
}
}
},
"ExternalAgentConfigImportItemTypeSuccess": {
"type": "object",
"required": [
"itemType"
],
"properties": {
"cwd": {
"type": [
"string",
"null"
]
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
},
"source": {
"type": [
"string",
"null"
]
},
"target": {
"type": [
"string",
"null"
]
}
}
},
"ExternalAgentConfigImportTypeResult": {
"type": "object",
"required": [
"failures",
"itemType",
"successes"
],
"properties": {
"failures": {
"type": "array",
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportItemTypeFailure"
}
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
},
"successes": {
"type": "array",
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportItemTypeSuccess"
}
}
}
},
"ExternalAgentConfigMigrationItemType": {
"type": "string",
"enum": [
"AGENTS_MD",
"CONFIG",
"SKILLS",
"PLUGINS",
"MCP_SERVER_CONFIG",
"SUBAGENTS",
"HOOKS",
"COMMANDS",
"SESSIONS"
]
}
}
}
@@ -0,0 +1,128 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExternalAgentConfigImportHistoriesReadResponse",
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportHistory"
}
}
},
"definitions": {
"ExternalAgentConfigImportHistory": {
"type": "object",
"required": [
"completedAtMs",
"failures",
"importId",
"successes"
],
"properties": {
"completedAtMs": {
"type": "integer",
"format": "int64"
},
"failures": {
"type": "array",
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportItemTypeFailure"
}
},
"importId": {
"type": "string"
},
"successes": {
"type": "array",
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportItemTypeSuccess"
}
}
}
},
"ExternalAgentConfigImportItemTypeFailure": {
"type": "object",
"required": [
"failureStage",
"itemType",
"message"
],
"properties": {
"cwd": {
"type": [
"string",
"null"
]
},
"errorType": {
"type": [
"string",
"null"
]
},
"failureStage": {
"type": "string"
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
},
"message": {
"type": "string"
},
"source": {
"type": [
"string",
"null"
]
}
}
},
"ExternalAgentConfigImportItemTypeSuccess": {
"type": "object",
"required": [
"itemType"
],
"properties": {
"cwd": {
"type": [
"string",
"null"
]
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
},
"source": {
"type": [
"string",
"null"
]
},
"target": {
"type": [
"string",
"null"
]
}
}
},
"ExternalAgentConfigMigrationItemType": {
"type": "string",
"enum": [
"AGENTS_MD",
"CONFIG",
"SKILLS",
"PLUGINS",
"MCP_SERVER_CONFIG",
"SUBAGENTS",
"HOOKS",
"COMMANDS",
"SESSIONS"
]
}
}
}
@@ -11,6 +11,13 @@
"items": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItem"
}
},
"source": {
"description": "Source product that produced the migration items. Missing means unspecified.",
"type": [
"string",
"null"
]
}
},
"definitions": {
@@ -0,0 +1,127 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExternalAgentConfigImportProgressNotification",
"type": "object",
"required": [
"importId",
"itemTypeResults"
],
"properties": {
"importId": {
"type": "string"
},
"itemTypeResults": {
"type": "array",
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportTypeResult"
}
}
},
"definitions": {
"ExternalAgentConfigImportItemTypeFailure": {
"type": "object",
"required": [
"failureStage",
"itemType",
"message"
],
"properties": {
"cwd": {
"type": [
"string",
"null"
]
},
"errorType": {
"type": [
"string",
"null"
]
},
"failureStage": {
"type": "string"
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
},
"message": {
"type": "string"
},
"source": {
"type": [
"string",
"null"
]
}
}
},
"ExternalAgentConfigImportItemTypeSuccess": {
"type": "object",
"required": [
"itemType"
],
"properties": {
"cwd": {
"type": [
"string",
"null"
]
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
},
"source": {
"type": [
"string",
"null"
]
},
"target": {
"type": [
"string",
"null"
]
}
}
},
"ExternalAgentConfigImportTypeResult": {
"type": "object",
"required": [
"failures",
"itemType",
"successes"
],
"properties": {
"failures": {
"type": "array",
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportItemTypeFailure"
}
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
},
"successes": {
"type": "array",
"items": {
"$ref": "#/definitions/ExternalAgentConfigImportItemTypeSuccess"
}
}
}
},
"ExternalAgentConfigMigrationItemType": {
"type": "string",
"enum": [
"AGENTS_MD",
"CONFIG",
"SKILLS",
"PLUGINS",
"MCP_SERVER_CONFIG",
"SUBAGENTS",
"HOOKS",
"COMMANDS",
"SESSIONS"
]
}
}
}
@@ -1,5 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExternalAgentConfigImportResponse",
"type": "object"
"type": "object",
"required": [
"importId"
],
"properties": {
"importId": {
"type": "string"
}
}
}
+1 -2
View File
@@ -3,8 +3,7 @@
"title": "FeedbackUploadParams",
"type": "object",
"required": [
"classification",
"includeLogs"
"classification"
],
"properties": {
"classification": {
-1
View File
@@ -5,7 +5,6 @@
"properties": {
"refreshToken": {
"description": "When `true`, requests a proactive token refresh before returning.\n\nIn managed auth mode this triggers the normal refresh-token flow. In external auth mode this flag is ignored. Clients should refresh tokens themselves and call `account/login/start` with `chatgptAuthTokens`.",
"default": false,
"type": "boolean"
}
}
@@ -6,6 +6,16 @@
"rateLimits"
],
"properties": {
"rateLimitResetCredits": {
"anyOf": [
{
"$ref": "#/definitions/RateLimitResetCreditsSummary"
},
{
"type": "null"
}
]
},
"rateLimits": {
"description": "Backward-compatible single-bucket view; mirrors the historical payload.",
"allOf": [
@@ -74,6 +84,18 @@
"workspace_member_usage_limit_reached"
]
},
"RateLimitResetCreditsSummary": {
"type": "object",
"required": [
"availableCount"
],
"properties": {
"availableCount": {
"type": "integer",
"format": "int64"
}
}
},
"RateLimitSnapshot": {
"type": "object",
"properties": {
@@ -87,6 +109,16 @@
}
]
},
"individualLimit": {
"anyOf": [
{
"$ref": "#/definitions/SpendControlLimitSnapshot"
},
{
"type": "null"
}
]
},
"limitId": {
"type": [
"string",
@@ -166,6 +198,31 @@
"format": "int64"
}
}
},
"SpendControlLimitSnapshot": {
"type": "object",
"required": [
"limit",
"remainingPercent",
"resetsAt",
"used"
],
"properties": {
"limit": {
"type": "string"
},
"remainingPercent": {
"type": "integer",
"format": "int32"
},
"resetsAt": {
"type": "integer",
"format": "int64"
},
"used": {
"type": "string"
}
}
}
}
}
+19 -1
View File
@@ -48,7 +48,10 @@
],
"properties": {
"email": {
"type": "string"
"type": [
"string",
"null"
]
},
"planType": {
"$ref": "#/definitions/PlanType"
@@ -69,6 +72,14 @@
"type"
],
"properties": {
"credentialSource": {
"default": "awsManaged",
"allOf": [
{
"$ref": "#/definitions/AmazonBedrockCredentialSource"
}
]
},
"type": {
"type": "string",
"enum": [
@@ -81,6 +92,13 @@
}
]
},
"AmazonBedrockCredentialSource": {
"type": "string",
"enum": [
"codexManaged",
"awsManaged"
]
},
"PlanType": {
"type": "string",
"enum": [
@@ -0,0 +1,80 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "GetAccountTokenUsageResponse",
"type": "object",
"required": [
"summary"
],
"properties": {
"dailyUsageBuckets": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AccountTokenUsageDailyBucket"
}
},
"summary": {
"$ref": "#/definitions/AccountTokenUsageSummary"
}
},
"definitions": {
"AccountTokenUsageDailyBucket": {
"type": "object",
"required": [
"startDate",
"tokens"
],
"properties": {
"startDate": {
"type": "string"
},
"tokens": {
"type": "integer",
"format": "int64"
}
}
},
"AccountTokenUsageSummary": {
"type": "object",
"properties": {
"currentStreakDays": {
"type": [
"integer",
"null"
],
"format": "int64"
},
"lifetimeTokens": {
"type": [
"integer",
"null"
],
"format": "int64"
},
"longestRunningTurnSec": {
"type": [
"integer",
"null"
],
"format": "int64"
},
"longestStreakDays": {
"type": [
"integer",
"null"
],
"format": "int64"
},
"peakDailyTokens": {
"type": [
"integer",
"null"
],
"format": "int64"
}
}
}
}
}
@@ -0,0 +1,67 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "GetWorkspaceMessagesResponse",
"type": "object",
"required": [
"featureEnabled",
"messages"
],
"properties": {
"featureEnabled": {
"description": "Whether the workspace-message backend route is available for this client.",
"type": "boolean"
},
"messages": {
"description": "Active workspace messages returned by the backend.",
"type": "array",
"items": {
"$ref": "#/definitions/WorkspaceMessage"
}
}
},
"definitions": {
"WorkspaceMessage": {
"type": "object",
"required": [
"messageBody",
"messageId",
"messageType"
],
"properties": {
"archivedAt": {
"description": "Unix timestamp (in seconds) when the message was archived.",
"type": [
"integer",
"null"
],
"format": "int64"
},
"createdAt": {
"description": "Unix timestamp (in seconds) when the message was created.",
"type": [
"integer",
"null"
],
"format": "int64"
},
"messageBody": {
"type": "string"
},
"messageId": {
"type": "string"
},
"messageType": {
"$ref": "#/definitions/WorkspaceMessageType"
}
}
},
"WorkspaceMessageType": {
"type": "string",
"enum": [
"headline",
"announcement",
"unknown"
]
}
}
}
@@ -187,6 +187,7 @@
"sessionFlags",
"plugin",
"cloudRequirements",
"cloudManagedConfig",
"legacyManagedConfigFile",
"legacyManagedConfigMdm",
"unknown"
+1
View File
@@ -187,6 +187,7 @@
"sessionFlags",
"plugin",
"cloudRequirements",
"cloudManagedConfig",
"legacyManagedConfigFile",
"legacyManagedConfigMdm",
"unknown"
+1
View File
@@ -144,6 +144,7 @@
"sessionFlags",
"plugin",
"cloudRequirements",
"cloudManagedConfig",
"legacyManagedConfigFile",
"legacyManagedConfigMdm",
"unknown"
+112 -8
View File
@@ -312,10 +312,38 @@
"ImageDetail": {
"type": "string",
"enum": [
"auto",
"low",
"high",
"original"
]
},
"LegacyAppPathString": {
"type": "string"
},
"McpToolCallAppContext": {
"type": "object",
"required": [
"connectorId"
],
"properties": {
"connectorId": {
"type": "string"
},
"linkId": {
"type": [
"string",
"null"
]
},
"resourceUri": {
"type": [
"string",
"null"
]
}
}
},
"McpToolCallError": {
"type": "object",
"required": [
@@ -484,15 +512,16 @@
]
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"description": "A non-empty reasoning effort value advertised by the model.",
"type": "string",
"minLength": 1
},
"SubAgentActivityKind": {
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
"started",
"interacted",
"interrupted"
]
},
"TextElement": {
@@ -528,6 +557,12 @@
"type"
],
"properties": {
"clientId": {
"type": [
"string",
"null"
]
},
"content": {
"type": "array",
"items": {
@@ -712,7 +747,7 @@
"description": "The command's working directory.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
]
},
@@ -805,6 +840,16 @@
"type"
],
"properties": {
"appContext": {
"anyOf": [
{
"$ref": "#/definitions/McpToolCallAppContext"
},
{
"type": "null"
}
]
},
"arguments": true,
"durationMs": {
"description": "The duration of the MCP tool call in milliseconds.",
@@ -828,6 +873,7 @@
"type": "string"
},
"mcpAppResourceUri": {
"description": "Deprecated: use `appContext.resourceUri` instead.",
"type": [
"string",
"null"
@@ -1012,6 +1058,38 @@
},
"title": "CollabAgentToolCallThreadItem"
},
{
"type": "object",
"required": [
"agentPath",
"agentThreadId",
"id",
"kind",
"type"
],
"properties": {
"agentPath": {
"type": "string"
},
"agentThreadId": {
"type": "string"
},
"id": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/SubAgentActivityKind"
},
"type": {
"type": "string",
"enum": [
"subAgentActivity"
],
"title": "SubAgentActivityThreadItemType"
}
},
"title": "SubAgentActivityThreadItem"
},
{
"type": "object",
"required": [
@@ -1070,6 +1148,32 @@
},
"title": "ImageViewThreadItem"
},
{
"type": "object",
"required": [
"durationMs",
"id",
"type"
],
"properties": {
"durationMs": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"sleep"
],
"title": "SleepThreadItemType"
}
},
"title": "SleepThreadItem"
},
{
"type": "object",
"required": [
@@ -83,7 +83,7 @@
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
},
"write": {
@@ -93,7 +93,7 @@
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
}
}
@@ -134,7 +134,7 @@
],
"properties": {
"path": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
},
"type": {
"type": "string",
@@ -584,6 +584,9 @@
"high"
]
},
"LegacyAppPathString": {
"type": "string"
},
"NetworkApprovalProtocol": {
"type": "string",
"enum": [
@@ -73,7 +73,7 @@
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
},
"write": {
@@ -83,7 +83,7 @@
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
}
}
@@ -117,7 +117,7 @@
],
"properties": {
"path": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
},
"type": {
"type": "string",
@@ -567,6 +567,9 @@
"high"
]
},
"LegacyAppPathString": {
"type": "string"
},
"NetworkApprovalProtocol": {
"type": "string",
"enum": [
+112 -8
View File
@@ -312,10 +312,38 @@
"ImageDetail": {
"type": "string",
"enum": [
"auto",
"low",
"high",
"original"
]
},
"LegacyAppPathString": {
"type": "string"
},
"McpToolCallAppContext": {
"type": "object",
"required": [
"connectorId"
],
"properties": {
"connectorId": {
"type": "string"
},
"linkId": {
"type": [
"string",
"null"
]
},
"resourceUri": {
"type": [
"string",
"null"
]
}
}
},
"McpToolCallError": {
"type": "object",
"required": [
@@ -484,15 +512,16 @@
]
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"description": "A non-empty reasoning effort value advertised by the model.",
"type": "string",
"minLength": 1
},
"SubAgentActivityKind": {
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
"started",
"interacted",
"interrupted"
]
},
"TextElement": {
@@ -528,6 +557,12 @@
"type"
],
"properties": {
"clientId": {
"type": [
"string",
"null"
]
},
"content": {
"type": "array",
"items": {
@@ -712,7 +747,7 @@
"description": "The command's working directory.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
]
},
@@ -805,6 +840,16 @@
"type"
],
"properties": {
"appContext": {
"anyOf": [
{
"$ref": "#/definitions/McpToolCallAppContext"
},
{
"type": "null"
}
]
},
"arguments": true,
"durationMs": {
"description": "The duration of the MCP tool call in milliseconds.",
@@ -828,6 +873,7 @@
"type": "string"
},
"mcpAppResourceUri": {
"description": "Deprecated: use `appContext.resourceUri` instead.",
"type": [
"string",
"null"
@@ -1012,6 +1058,38 @@
},
"title": "CollabAgentToolCallThreadItem"
},
{
"type": "object",
"required": [
"agentPath",
"agentThreadId",
"id",
"kind",
"type"
],
"properties": {
"agentPath": {
"type": "string"
},
"agentThreadId": {
"type": "string"
},
"id": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/SubAgentActivityKind"
},
"type": {
"type": "string",
"enum": [
"subAgentActivity"
],
"title": "SubAgentActivityThreadItemType"
}
},
"title": "SubAgentActivityThreadItem"
},
{
"type": "object",
"required": [
@@ -1070,6 +1148,32 @@
},
"title": "ImageViewThreadItem"
},
{
"type": "object",
"required": [
"durationMs",
"id",
"type"
],
"properties": {
"durationMs": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"sleep"
],
"title": "SleepThreadItemType"
}
},
"title": "SleepThreadItem"
},
{
"type": "object",
"required": [
@@ -29,6 +29,12 @@
],
"format": "uint32",
"minimum": 0.0
},
"threadId": {
"type": [
"string",
"null"
]
}
},
"definitions": {
@@ -30,6 +30,47 @@
"oAuth"
]
},
"McpServerInfo": {
"description": "Presentation metadata advertised by an initialized MCP server.",
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"description": {
"type": [
"string",
"null"
]
},
"icons": {
"type": [
"array",
"null"
],
"items": true
},
"name": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
},
"version": {
"type": "string"
},
"websiteUrl": {
"type": [
"string",
"null"
]
}
}
},
"McpServerStatus": {
"type": "object",
"required": [
@@ -58,6 +99,16 @@
"$ref": "#/definitions/Resource"
}
},
"serverInfo": {
"anyOf": [
{
"$ref": "#/definitions/McpServerInfo"
},
{
"type": "null"
}
]
},
"tools": {
"type": "object",
"additionalProperties": {
@@ -18,6 +18,12 @@
},
"status": {
"$ref": "#/definitions/McpServerStartupState"
},
"threadId": {
"type": [
"string",
"null"
]
}
},
"definitions": {
+2 -9
View File
@@ -205,16 +205,9 @@
}
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"description": "A non-empty reasoning effort value advertised by the model.",
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
]
"minLength": 1
},
"ReasoningEffortOption": {
"type": "object",
@@ -0,0 +1,35 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ModelSafetyBufferingUpdatedNotification",
"type": "object",
"required": [
"model",
"reasons",
"threadId",
"turnId",
"useCases"
],
"properties": {
"model": {
"type": "string"
},
"reasons": {
"type": "array",
"items": {
"type": "string"
}
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
},
"useCases": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
@@ -24,9 +24,14 @@
"PermissionProfileSummary": {
"type": "object",
"required": [
"allowed",
"id"
],
"properties": {
"allowed": {
"description": "Whether the effective requirements allow selecting this profile.",
"type": "boolean"
},
"description": {
"description": "Optional user-facing description for display in clients.",
"type": [
+7 -5
View File
@@ -23,10 +23,15 @@
"type": "object",
"required": [
"id",
"name",
"needsAuth"
"name"
],
"properties": {
"category": {
"type": [
"string",
"null"
]
},
"description": {
"type": [
"string",
@@ -44,9 +49,6 @@
},
"name": {
"type": "string"
},
"needsAuth": {
"type": "boolean"
}
}
},
+2 -1
View File
@@ -35,7 +35,8 @@
"local",
"vertical",
"workspace-directory",
"shared-with-me"
"shared-with-me",
"created-by-me-remote"
]
}
}
+89 -5
View File
@@ -20,10 +20,15 @@
"type": "object",
"required": [
"id",
"name",
"needsAuth"
"name"
],
"properties": {
"category": {
"type": [
"string",
"null"
]
},
"description": {
"type": [
"string",
@@ -41,12 +46,78 @@
},
"name": {
"type": "string"
},
"needsAuth": {
"type": "boolean"
}
}
},
"AppTemplateSummary": {
"type": "object",
"required": [
"materializedAppIds",
"name",
"templateId"
],
"properties": {
"canonicalConnectorId": {
"type": [
"string",
"null"
]
},
"category": {
"type": [
"string",
"null"
]
},
"description": {
"type": [
"string",
"null"
]
},
"logoUrl": {
"type": [
"string",
"null"
]
},
"logoUrlDark": {
"type": [
"string",
"null"
]
},
"materializedAppIds": {
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": "string"
},
"reason": {
"anyOf": [
{
"$ref": "#/definitions/AppTemplateUnavailableReason"
},
{
"type": "null"
}
]
},
"templateId": {
"type": "string"
}
}
},
"AppTemplateUnavailableReason": {
"type": "string",
"enum": [
"NOT_CONFIGURED_FOR_WORKSPACE",
"NO_ACTIVE_WORKSPACE"
]
},
"HookEventName": {
"type": "string",
"enum": [
@@ -89,6 +160,7 @@
"PluginDetail": {
"type": "object",
"required": [
"appTemplates",
"apps",
"hooks",
"marketplaceName",
@@ -97,6 +169,12 @@
"summary"
],
"properties": {
"appTemplates": {
"type": "array",
"items": {
"$ref": "#/definitions/AppTemplateSummary"
}
},
"apps": {
"type": "array",
"items": {
@@ -134,6 +212,12 @@
"type": "string"
}
},
"shareUrl": {
"type": [
"string",
"null"
]
},
"skills": {
"type": "array",
"items": {
@@ -19,6 +19,50 @@
}
},
"definitions": {
"AgentMessageInputContent": {
"oneOf": [
{
"type": "object",
"required": [
"text",
"type"
],
"properties": {
"text": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"input_text"
],
"title": "InputTextAgentMessageInputContentType"
}
},
"title": "InputTextAgentMessageInputContent"
},
{
"type": "object",
"required": [
"encrypted_content",
"type"
],
"properties": {
"encrypted_content": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"encrypted_content"
],
"title": "EncryptedContentAgentMessageInputContentType"
}
},
"title": "EncryptedContentAgentMessageInputContent"
}
]
},
"ContentItem": {
"oneOf": [
{
@@ -184,10 +228,24 @@
"ImageDetail": {
"type": "string",
"enum": [
"auto",
"low",
"high",
"original"
]
},
"InternalChatMessageMetadataPassthrough": {
"description": "Internal Responses API passthrough metadata copied into underlying chat messages.\n\nResponses API strongly types this payload. Do not modify it without first getting API approval and making the corresponding Responses API change.",
"type": "object",
"properties": {
"turn_id": {
"type": [
"string",
"null"
]
}
}
},
"LocalShellAction": {
"oneOf": [
{
@@ -356,12 +414,21 @@
}
},
"id": {
"writeOnly": true,
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"phase": {
"anyOf": [
{
@@ -385,6 +452,53 @@
},
"title": "MessageResponseItem"
},
{
"type": "object",
"required": [
"author",
"content",
"recipient",
"type"
],
"properties": {
"author": {
"type": "string"
},
"content": {
"type": "array",
"items": {
"$ref": "#/definitions/AgentMessageInputContent"
}
},
"id": {
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"recipient": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"agent_message"
],
"title": "AgentMessageResponseItemType"
}
},
"title": "AgentMessageResponseItem"
},
{
"type": "object",
"required": [
@@ -408,6 +522,22 @@
"null"
]
},
"id": {
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"summary": {
"type": "array",
"items": {
@@ -444,12 +574,21 @@
},
"id": {
"description": "Legacy id field retained for compatibility with older payloads.",
"writeOnly": true,
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"status": {
"$ref": "#/definitions/LocalShellStatus"
},
@@ -479,12 +618,21 @@
"type": "string"
},
"id": {
"writeOnly": true,
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
@@ -523,12 +671,21 @@
"type": "string"
},
"id": {
"writeOnly": true,
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"status": {
"type": [
"string",
@@ -556,6 +713,22 @@
"call_id": {
"type": "string"
},
"id": {
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"output": {
"$ref": "#/definitions/FunctionCallOutputBody"
},
@@ -582,7 +755,6 @@
"type": "string"
},
"id": {
"writeOnly": true,
"type": [
"string",
"null"
@@ -591,6 +763,16 @@
"input": {
"type": "string"
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
@@ -621,6 +803,22 @@
"call_id": {
"type": "string"
},
"id": {
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"name": {
"type": [
"string",
@@ -658,6 +856,22 @@
"execution": {
"type": "string"
},
"id": {
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"status": {
"type": "string"
},
@@ -692,12 +906,21 @@
]
},
"id": {
"writeOnly": true,
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"status": {
"type": [
"string",
@@ -717,14 +940,26 @@
{
"type": "object",
"required": [
"id",
"result",
"status",
"type"
],
"properties": {
"id": {
"type": "string"
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"result": {
"type": "string"
@@ -758,6 +993,22 @@
"encrypted_content": {
"type": "string"
},
"id": {
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"enum": [
@@ -774,6 +1025,16 @@
"type"
],
"properties": {
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"enum": [
@@ -796,6 +1057,22 @@
"null"
]
},
"id": {
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"enum": [
+112 -8
View File
@@ -440,10 +440,38 @@
"ImageDetail": {
"type": "string",
"enum": [
"auto",
"low",
"high",
"original"
]
},
"LegacyAppPathString": {
"type": "string"
},
"McpToolCallAppContext": {
"type": "object",
"required": [
"connectorId"
],
"properties": {
"connectorId": {
"type": "string"
},
"linkId": {
"type": [
"string",
"null"
]
},
"resourceUri": {
"type": [
"string",
"null"
]
}
}
},
"McpToolCallError": {
"type": "object",
"required": [
@@ -619,15 +647,16 @@
]
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"description": "A non-empty reasoning effort value advertised by the model.",
"type": "string",
"minLength": 1
},
"SubAgentActivityKind": {
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
"started",
"interacted",
"interrupted"
]
},
"TextElement": {
@@ -663,6 +692,12 @@
"type"
],
"properties": {
"clientId": {
"type": [
"string",
"null"
]
},
"content": {
"type": "array",
"items": {
@@ -847,7 +882,7 @@
"description": "The command's working directory.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
]
},
@@ -940,6 +975,16 @@
"type"
],
"properties": {
"appContext": {
"anyOf": [
{
"$ref": "#/definitions/McpToolCallAppContext"
},
{
"type": "null"
}
]
},
"arguments": true,
"durationMs": {
"description": "The duration of the MCP tool call in milliseconds.",
@@ -963,6 +1008,7 @@
"type": "string"
},
"mcpAppResourceUri": {
"description": "Deprecated: use `appContext.resourceUri` instead.",
"type": [
"string",
"null"
@@ -1147,6 +1193,38 @@
},
"title": "CollabAgentToolCallThreadItem"
},
{
"type": "object",
"required": [
"agentPath",
"agentThreadId",
"id",
"kind",
"type"
],
"properties": {
"agentPath": {
"type": "string"
},
"agentThreadId": {
"type": "string"
},
"id": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/SubAgentActivityKind"
},
"type": {
"type": "string",
"enum": [
"subAgentActivity"
],
"title": "SubAgentActivityThreadItemType"
}
},
"title": "SubAgentActivityThreadItem"
},
{
"type": "object",
"required": [
@@ -1205,6 +1283,32 @@
},
"title": "ImageViewThreadItem"
},
{
"type": "object",
"required": [
"durationMs",
"id",
"type"
],
"properties": {
"durationMs": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"sleep"
],
"title": "SleepThreadItemType"
}
},
"title": "SleepThreadItem"
},
{
"type": "object",
"required": [
+22
View File
@@ -0,0 +1,22 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "SkillsExtraRootsSetParams",
"type": "object",
"required": [
"extraRoots"
],
"properties": {
"extraRoots": {
"type": "array",
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
}
}
},
"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"
}
}
}
@@ -0,0 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "SkillsExtraRootsSetResponse",
"type": "object"
}
+13
View File
@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ThreadDeleteParams",
"type": "object",
"required": [
"threadId"
],
"properties": {
"threadId": {
"type": "string"
}
}
}
+5
View File
@@ -0,0 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ThreadDeleteResponse",
"type": "object"
}
+13
View File
@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ThreadDeletedNotification",
"type": "object",
"required": [
"threadId"
],
"properties": {
"threadId": {
"type": "string"
}
}
}
+22 -23
View File
@@ -56,14 +56,10 @@
"ephemeral": {
"type": "boolean"
},
"sandbox": {
"anyOf": [
{
"$ref": "#/definitions/SandboxMode"
},
{
"type": "null"
}
"serviceTier": {
"type": [
"string",
"null"
]
},
"model": {
@@ -79,15 +75,6 @@
"null"
]
},
"serviceTier": {
"type": [
"string",
"null"
]
},
"threadId": {
"type": "string"
},
"threadSource": {
"description": "Optional client-supplied analytics source classification for this forked thread.",
"anyOf": [
@@ -98,9 +85,26 @@
"type": "null"
}
]
},
"sandbox": {
"anyOf": [
{
"$ref": "#/definitions/SandboxMode"
},
{
"type": "null"
}
]
},
"threadId": {
"type": "string"
}
},
"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"
},
"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",
@@ -169,12 +173,7 @@
]
},
"ThreadSource": {
"type": "string",
"enum": [
"user",
"subagent",
"memory_consolidation"
]
"type": "string"
}
}
}
+156 -33
View File
@@ -12,8 +12,11 @@
"thread"
],
"properties": {
"thread": {
"$ref": "#/definitions/Thread"
"serviceTier": {
"type": [
"string",
"null"
]
},
"approvalPolicy": {
"$ref": "#/definitions/AskForApproval"
@@ -30,11 +33,11 @@
"$ref": "#/definitions/AbsolutePathBuf"
},
"instructionSources": {
"description": "Instruction source files currently loaded for this thread.",
"description": "Environment-native paths to instruction source files currently loaded for this thread.",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
},
"model": {
@@ -43,6 +46,14 @@
"modelProvider": {
"type": "string"
},
"sandbox": {
"description": "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.",
"allOf": [
{
"$ref": "#/definitions/SandboxPolicy"
}
]
},
"reasoningEffort": {
"anyOf": [
{
@@ -53,19 +64,8 @@
}
]
},
"serviceTier": {
"type": [
"string",
"null"
]
},
"sandbox": {
"description": "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.",
"allOf": [
{
"$ref": "#/definitions/SandboxPolicy"
}
]
"thread": {
"$ref": "#/definitions/Thread"
}
},
"definitions": {
@@ -598,10 +598,38 @@
"ImageDetail": {
"type": "string",
"enum": [
"auto",
"low",
"high",
"original"
]
},
"LegacyAppPathString": {
"type": "string"
},
"McpToolCallAppContext": {
"type": "object",
"required": [
"connectorId"
],
"properties": {
"connectorId": {
"type": "string"
},
"linkId": {
"type": [
"string",
"null"
]
},
"resourceUri": {
"type": [
"string",
"null"
]
}
}
},
"McpToolCallError": {
"type": "object",
"required": [
@@ -702,6 +730,15 @@
}
]
},
"MultiAgentMode": {
"description": "Controls whether the model receives multi-agent delegation instructions and, when it does, whether it should only spawn sub-agents after an explicit user request or may delegate proactively when doing so would help. `none` leaves the multi-agent tools available without injecting delegation instructions.",
"type": "string",
"enum": [
"none",
"explicitRequestOnly",
"proactive"
]
},
"NetworkAccess": {
"type": "string",
"enum": [
@@ -784,16 +821,9 @@
]
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"description": "A non-empty reasoning effort value advertised by the model.",
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
]
"minLength": 1
},
"SandboxPolicy": {
"oneOf": [
@@ -934,6 +964,14 @@
}
]
},
"SubAgentActivityKind": {
"type": "string",
"enum": [
"started",
"interacted",
"interrupted"
]
},
"SubAgentSource": {
"oneOf": [
{
@@ -1117,6 +1155,13 @@
"null"
]
},
"parentThreadId": {
"description": "The ID of the parent thread. This will only be set if this thread is a subagent.",
"type": [
"string",
"null"
]
},
"path": {
"description": "[UNSTABLE] Path to the thread on disk.",
"type": [
@@ -1128,6 +1173,14 @@
"description": "Usually the first user message in the thread, if available.",
"type": "string"
},
"recencyAt": {
"description": "Unix timestamp (in seconds) used for thread recency ordering.",
"type": [
"integer",
"null"
],
"format": "int64"
},
"sessionId": {
"description": "Session id shared by threads that belong to the same session tree.",
"type": "string"
@@ -1193,6 +1246,12 @@
"type"
],
"properties": {
"clientId": {
"type": [
"string",
"null"
]
},
"content": {
"type": "array",
"items": {
@@ -1377,7 +1436,7 @@
"description": "The command's working directory.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
]
},
@@ -1470,6 +1529,16 @@
"type"
],
"properties": {
"appContext": {
"anyOf": [
{
"$ref": "#/definitions/McpToolCallAppContext"
},
{
"type": "null"
}
]
},
"arguments": true,
"durationMs": {
"description": "The duration of the MCP tool call in milliseconds.",
@@ -1493,6 +1562,7 @@
"type": "string"
},
"mcpAppResourceUri": {
"description": "Deprecated: use `appContext.resourceUri` instead.",
"type": [
"string",
"null"
@@ -1677,6 +1747,38 @@
},
"title": "CollabAgentToolCallThreadItem"
},
{
"type": "object",
"required": [
"agentPath",
"agentThreadId",
"id",
"kind",
"type"
],
"properties": {
"agentPath": {
"type": "string"
},
"agentThreadId": {
"type": "string"
},
"id": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/SubAgentActivityKind"
},
"type": {
"type": "string",
"enum": [
"subAgentActivity"
],
"title": "SubAgentActivityThreadItemType"
}
},
"title": "SubAgentActivityThreadItem"
},
{
"type": "object",
"required": [
@@ -1735,6 +1837,32 @@
},
"title": "ImageViewThreadItem"
},
{
"type": "object",
"required": [
"durationMs",
"id",
"type"
],
"properties": {
"durationMs": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"sleep"
],
"title": "SleepThreadItemType"
}
},
"title": "SleepThreadItem"
},
{
"type": "object",
"required": [
@@ -1850,12 +1978,7 @@
]
},
"ThreadSource": {
"type": "string",
"enum": [
"user",
"subagent",
"memory_consolidation"
]
"type": "string"
},
"ThreadStatus": {
"oneOf": [
+6 -5
View File
@@ -47,6 +47,10 @@
"type": "string"
}
},
"useStateDbOnly": {
"description": "If true, return from the state DB without scanning JSONL rollouts to repair thread metadata. Omitted or false preserves scan-and-repair behavior.",
"type": "boolean"
},
"searchTerm": {
"description": "Optional substring filter for the extracted thread title.",
"type": [
@@ -85,10 +89,6 @@
"items": {
"$ref": "#/definitions/ThreadSourceKind"
}
},
"useStateDbOnly": {
"description": "If true, return from the state DB without scanning JSONL rollouts to repair thread metadata. Omitted or false preserves scan-and-repair behavior.",
"type": "boolean"
}
},
"definitions": {
@@ -116,7 +116,8 @@
"type": "string",
"enum": [
"created_at",
"updated_at"
"updated_at",
"recency_at"
]
},
"ThreadSourceKind": {
+130 -16
View File
@@ -478,10 +478,38 @@
"ImageDetail": {
"type": "string",
"enum": [
"auto",
"low",
"high",
"original"
]
},
"LegacyAppPathString": {
"type": "string"
},
"McpToolCallAppContext": {
"type": "object",
"required": [
"connectorId"
],
"properties": {
"connectorId": {
"type": "string"
},
"linkId": {
"type": [
"string",
"null"
]
},
"resourceUri": {
"type": [
"string",
"null"
]
}
}
},
"McpToolCallError": {
"type": "object",
"required": [
@@ -657,16 +685,9 @@
]
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"description": "A non-empty reasoning effort value advertised by the model.",
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
]
"minLength": 1
},
"SessionSource": {
"oneOf": [
@@ -708,6 +729,14 @@
}
]
},
"SubAgentActivityKind": {
"type": "string",
"enum": [
"started",
"interacted",
"interrupted"
]
},
"SubAgentSource": {
"oneOf": [
{
@@ -891,6 +920,13 @@
"null"
]
},
"parentThreadId": {
"description": "The ID of the parent thread. This will only be set if this thread is a subagent.",
"type": [
"string",
"null"
]
},
"path": {
"description": "[UNSTABLE] Path to the thread on disk.",
"type": [
@@ -902,6 +938,14 @@
"description": "Usually the first user message in the thread, if available.",
"type": "string"
},
"recencyAt": {
"description": "Unix timestamp (in seconds) used for thread recency ordering.",
"type": [
"integer",
"null"
],
"format": "int64"
},
"sessionId": {
"description": "Session id shared by threads that belong to the same session tree.",
"type": "string"
@@ -967,6 +1011,12 @@
"type"
],
"properties": {
"clientId": {
"type": [
"string",
"null"
]
},
"content": {
"type": "array",
"items": {
@@ -1151,7 +1201,7 @@
"description": "The command's working directory.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
]
},
@@ -1244,6 +1294,16 @@
"type"
],
"properties": {
"appContext": {
"anyOf": [
{
"$ref": "#/definitions/McpToolCallAppContext"
},
{
"type": "null"
}
]
},
"arguments": true,
"durationMs": {
"description": "The duration of the MCP tool call in milliseconds.",
@@ -1267,6 +1327,7 @@
"type": "string"
},
"mcpAppResourceUri": {
"description": "Deprecated: use `appContext.resourceUri` instead.",
"type": [
"string",
"null"
@@ -1451,6 +1512,38 @@
},
"title": "CollabAgentToolCallThreadItem"
},
{
"type": "object",
"required": [
"agentPath",
"agentThreadId",
"id",
"kind",
"type"
],
"properties": {
"agentPath": {
"type": "string"
},
"agentThreadId": {
"type": "string"
},
"id": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/SubAgentActivityKind"
},
"type": {
"type": "string",
"enum": [
"subAgentActivity"
],
"title": "SubAgentActivityThreadItemType"
}
},
"title": "SubAgentActivityThreadItem"
},
{
"type": "object",
"required": [
@@ -1509,6 +1602,32 @@
},
"title": "ImageViewThreadItem"
},
{
"type": "object",
"required": [
"durationMs",
"id",
"type"
],
"properties": {
"durationMs": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"sleep"
],
"title": "SleepThreadItemType"
}
},
"title": "SleepThreadItem"
},
{
"type": "object",
"required": [
@@ -1624,12 +1743,7 @@
]
},
"ThreadSource": {
"type": "string",
"enum": [
"user",
"subagent",
"memory_consolidation"
]
"type": "string"
},
"ThreadStatus": {
"oneOf": [
+130 -16
View File
@@ -461,10 +461,38 @@
"ImageDetail": {
"type": "string",
"enum": [
"auto",
"low",
"high",
"original"
]
},
"LegacyAppPathString": {
"type": "string"
},
"McpToolCallAppContext": {
"type": "object",
"required": [
"connectorId"
],
"properties": {
"connectorId": {
"type": "string"
},
"linkId": {
"type": [
"string",
"null"
]
},
"resourceUri": {
"type": [
"string",
"null"
]
}
}
},
"McpToolCallError": {
"type": "object",
"required": [
@@ -640,16 +668,9 @@
]
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"description": "A non-empty reasoning effort value advertised by the model.",
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
]
"minLength": 1
},
"SessionSource": {
"oneOf": [
@@ -691,6 +712,14 @@
}
]
},
"SubAgentActivityKind": {
"type": "string",
"enum": [
"started",
"interacted",
"interrupted"
]
},
"SubAgentSource": {
"oneOf": [
{
@@ -874,6 +903,13 @@
"null"
]
},
"parentThreadId": {
"description": "The ID of the parent thread. This will only be set if this thread is a subagent.",
"type": [
"string",
"null"
]
},
"path": {
"description": "[UNSTABLE] Path to the thread on disk.",
"type": [
@@ -885,6 +921,14 @@
"description": "Usually the first user message in the thread, if available.",
"type": "string"
},
"recencyAt": {
"description": "Unix timestamp (in seconds) used for thread recency ordering.",
"type": [
"integer",
"null"
],
"format": "int64"
},
"sessionId": {
"description": "Session id shared by threads that belong to the same session tree.",
"type": "string"
@@ -950,6 +994,12 @@
"type"
],
"properties": {
"clientId": {
"type": [
"string",
"null"
]
},
"content": {
"type": "array",
"items": {
@@ -1134,7 +1184,7 @@
"description": "The command's working directory.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
]
},
@@ -1227,6 +1277,16 @@
"type"
],
"properties": {
"appContext": {
"anyOf": [
{
"$ref": "#/definitions/McpToolCallAppContext"
},
{
"type": "null"
}
]
},
"arguments": true,
"durationMs": {
"description": "The duration of the MCP tool call in milliseconds.",
@@ -1250,6 +1310,7 @@
"type": "string"
},
"mcpAppResourceUri": {
"description": "Deprecated: use `appContext.resourceUri` instead.",
"type": [
"string",
"null"
@@ -1434,6 +1495,38 @@
},
"title": "CollabAgentToolCallThreadItem"
},
{
"type": "object",
"required": [
"agentPath",
"agentThreadId",
"id",
"kind",
"type"
],
"properties": {
"agentPath": {
"type": "string"
},
"agentThreadId": {
"type": "string"
},
"id": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/SubAgentActivityKind"
},
"type": {
"type": "string",
"enum": [
"subAgentActivity"
],
"title": "SubAgentActivityThreadItemType"
}
},
"title": "SubAgentActivityThreadItem"
},
{
"type": "object",
"required": [
@@ -1492,6 +1585,32 @@
},
"title": "ImageViewThreadItem"
},
{
"type": "object",
"required": [
"durationMs",
"id",
"type"
],
"properties": {
"durationMs": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"sleep"
],
"title": "SleepThreadItemType"
}
},
"title": "SleepThreadItem"
},
{
"type": "object",
"required": [
@@ -1607,12 +1726,7 @@
]
},
"ThreadSource": {
"type": "string",
"enum": [
"user",
"subagent",
"memory_consolidation"
]
"type": "string"
},
"ThreadStatus": {
"oneOf": [
-1
View File
@@ -8,7 +8,6 @@
"properties": {
"includeTurns": {
"description": "When true, include turns and their items from rollout history.",
"default": false,
"type": "boolean"
},
"threadId": {
+130 -16
View File
@@ -461,10 +461,38 @@
"ImageDetail": {
"type": "string",
"enum": [
"auto",
"low",
"high",
"original"
]
},
"LegacyAppPathString": {
"type": "string"
},
"McpToolCallAppContext": {
"type": "object",
"required": [
"connectorId"
],
"properties": {
"connectorId": {
"type": "string"
},
"linkId": {
"type": [
"string",
"null"
]
},
"resourceUri": {
"type": [
"string",
"null"
]
}
}
},
"McpToolCallError": {
"type": "object",
"required": [
@@ -640,16 +668,9 @@
]
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"description": "A non-empty reasoning effort value advertised by the model.",
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
]
"minLength": 1
},
"SessionSource": {
"oneOf": [
@@ -691,6 +712,14 @@
}
]
},
"SubAgentActivityKind": {
"type": "string",
"enum": [
"started",
"interacted",
"interrupted"
]
},
"SubAgentSource": {
"oneOf": [
{
@@ -874,6 +903,13 @@
"null"
]
},
"parentThreadId": {
"description": "The ID of the parent thread. This will only be set if this thread is a subagent.",
"type": [
"string",
"null"
]
},
"path": {
"description": "[UNSTABLE] Path to the thread on disk.",
"type": [
@@ -885,6 +921,14 @@
"description": "Usually the first user message in the thread, if available.",
"type": "string"
},
"recencyAt": {
"description": "Unix timestamp (in seconds) used for thread recency ordering.",
"type": [
"integer",
"null"
],
"format": "int64"
},
"sessionId": {
"description": "Session id shared by threads that belong to the same session tree.",
"type": "string"
@@ -950,6 +994,12 @@
"type"
],
"properties": {
"clientId": {
"type": [
"string",
"null"
]
},
"content": {
"type": "array",
"items": {
@@ -1134,7 +1184,7 @@
"description": "The command's working directory.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
]
},
@@ -1227,6 +1277,16 @@
"type"
],
"properties": {
"appContext": {
"anyOf": [
{
"$ref": "#/definitions/McpToolCallAppContext"
},
{
"type": "null"
}
]
},
"arguments": true,
"durationMs": {
"description": "The duration of the MCP tool call in milliseconds.",
@@ -1250,6 +1310,7 @@
"type": "string"
},
"mcpAppResourceUri": {
"description": "Deprecated: use `appContext.resourceUri` instead.",
"type": [
"string",
"null"
@@ -1434,6 +1495,38 @@
},
"title": "CollabAgentToolCallThreadItem"
},
{
"type": "object",
"required": [
"agentPath",
"agentThreadId",
"id",
"kind",
"type"
],
"properties": {
"agentPath": {
"type": "string"
},
"agentThreadId": {
"type": "string"
},
"id": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/SubAgentActivityKind"
},
"type": {
"type": "string",
"enum": [
"subAgentActivity"
],
"title": "SubAgentActivityThreadItemType"
}
},
"title": "SubAgentActivityThreadItem"
},
{
"type": "object",
"required": [
@@ -1492,6 +1585,32 @@
},
"title": "ImageViewThreadItem"
},
{
"type": "object",
"required": [
"durationMs",
"id",
"type"
],
"properties": {
"durationMs": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"sleep"
],
"title": "SleepThreadItemType"
}
},
"title": "SleepThreadItem"
},
{
"type": "object",
"required": [
@@ -1607,12 +1726,7 @@
]
},
"ThreadSource": {
"type": "string",
"enum": [
"user",
"subagent",
"memory_consolidation"
]
"type": "string"
},
"ThreadStatus": {
"oneOf": [
+374 -25
View File
@@ -53,6 +53,15 @@
"null"
]
},
"serviceTier": {
"type": [
"string",
"null"
]
},
"threadId": {
"type": "string"
},
"personality": {
"anyOf": [
{
@@ -63,16 +72,6 @@
}
]
},
"sandbox": {
"anyOf": [
{
"$ref": "#/definitions/SandboxMode"
},
{
"type": "null"
}
]
},
"model": {
"description": "Configuration overrides for the resumed thread, if any.",
"type": [
@@ -86,17 +85,66 @@
"null"
]
},
"serviceTier": {
"type": [
"string",
"null"
"sandbox": {
"anyOf": [
{
"$ref": "#/definitions/SandboxMode"
},
{
"type": "null"
}
]
},
"threadId": {
"type": "string"
}
},
"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"
},
"AgentMessageInputContent": {
"oneOf": [
{
"type": "object",
"required": [
"text",
"type"
],
"properties": {
"text": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"input_text"
],
"title": "InputTextAgentMessageInputContentType"
}
},
"title": "InputTextAgentMessageInputContent"
},
{
"type": "object",
"required": [
"encrypted_content",
"type"
],
"properties": {
"encrypted_content": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"encrypted_content"
],
"title": "EncryptedContentAgentMessageInputContentType"
}
},
"title": "EncryptedContentAgentMessageInputContent"
}
]
},
"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",
@@ -321,10 +369,24 @@
"ImageDetail": {
"type": "string",
"enum": [
"auto",
"low",
"high",
"original"
]
},
"InternalChatMessageMetadataPassthrough": {
"description": "Internal Responses API passthrough metadata copied into underlying chat messages.\n\nResponses API strongly types this payload. Do not modify it without first getting API approval and making the corresponding Responses API change.",
"type": "object",
"properties": {
"turn_id": {
"type": [
"string",
"null"
]
}
}
},
"LocalShellAction": {
"oneOf": [
{
@@ -501,12 +563,21 @@
}
},
"id": {
"writeOnly": true,
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"phase": {
"anyOf": [
{
@@ -530,6 +601,53 @@
},
"title": "MessageResponseItem"
},
{
"type": "object",
"required": [
"author",
"content",
"recipient",
"type"
],
"properties": {
"author": {
"type": "string"
},
"content": {
"type": "array",
"items": {
"$ref": "#/definitions/AgentMessageInputContent"
}
},
"id": {
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"recipient": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"agent_message"
],
"title": "AgentMessageResponseItemType"
}
},
"title": "AgentMessageResponseItem"
},
{
"type": "object",
"required": [
@@ -553,6 +671,22 @@
"null"
]
},
"id": {
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"summary": {
"type": "array",
"items": {
@@ -589,12 +723,21 @@
},
"id": {
"description": "Legacy id field retained for compatibility with older payloads.",
"writeOnly": true,
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"status": {
"$ref": "#/definitions/LocalShellStatus"
},
@@ -624,12 +767,21 @@
"type": "string"
},
"id": {
"writeOnly": true,
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
@@ -668,12 +820,21 @@
"type": "string"
},
"id": {
"writeOnly": true,
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"status": {
"type": [
"string",
@@ -701,6 +862,22 @@
"call_id": {
"type": "string"
},
"id": {
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"output": {
"$ref": "#/definitions/FunctionCallOutputBody"
},
@@ -727,7 +904,6 @@
"type": "string"
},
"id": {
"writeOnly": true,
"type": [
"string",
"null"
@@ -736,6 +912,16 @@
"input": {
"type": "string"
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
@@ -766,6 +952,22 @@
"call_id": {
"type": "string"
},
"id": {
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"name": {
"type": [
"string",
@@ -803,6 +1005,22 @@
"execution": {
"type": "string"
},
"id": {
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"status": {
"type": "string"
},
@@ -837,12 +1055,21 @@
]
},
"id": {
"writeOnly": true,
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"status": {
"type": [
"string",
@@ -862,14 +1089,26 @@
{
"type": "object",
"required": [
"id",
"result",
"status",
"type"
],
"properties": {
"id": {
"type": "string"
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"result": {
"type": "string"
@@ -903,6 +1142,22 @@
"encrypted_content": {
"type": "string"
},
"id": {
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"enum": [
@@ -919,6 +1174,16 @@
"type"
],
"properties": {
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"enum": [
@@ -941,6 +1206,22 @@
"null"
]
},
"id": {
"type": [
"string",
"null"
]
},
"internal_chat_message_metadata_passthrough": {
"anyOf": [
{
"$ref": "#/definitions/InternalChatMessageMetadataPassthrough"
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"enum": [
@@ -1077,6 +1358,74 @@
"workspace-write",
"danger-full-access"
]
},
"SortDirection": {
"type": "string",
"enum": [
"asc",
"desc"
]
},
"ThreadResumeInitialTurnsPageParams": {
"type": "object",
"properties": {
"itemsView": {
"description": "How much item detail to include for each returned turn; defaults to summary.",
"anyOf": [
{
"$ref": "#/definitions/TurnItemsView"
},
{
"type": "null"
}
]
},
"limit": {
"description": "Optional turn page size.",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"sortDirection": {
"description": "Optional turn pagination direction; defaults to descending.",
"anyOf": [
{
"$ref": "#/definitions/SortDirection"
},
{
"type": "null"
}
]
}
}
},
"TurnItemsView": {
"oneOf": [
{
"description": "`items` was not loaded for this turn. The field is intentionally empty.",
"type": "string",
"enum": [
"notLoaded"
]
},
{
"description": "`items` contains only a display summary for this turn.",
"type": "string",
"enum": [
"summary"
]
},
{
"description": "`items` contains every ThreadItem available from persisted app-server history for this turn.",
"type": "string",
"enum": [
"full"
]
}
]
}
}
}
+183 -34
View File
@@ -12,11 +12,8 @@
"thread"
],
"properties": {
"serviceTier": {
"type": [
"string",
"null"
]
"thread": {
"$ref": "#/definitions/Thread"
},
"approvalPolicy": {
"$ref": "#/definitions/AskForApproval"
@@ -32,12 +29,20 @@
"cwd": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"sandbox": {
"description": "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.",
"allOf": [
{
"$ref": "#/definitions/SandboxPolicy"
}
]
},
"instructionSources": {
"description": "Instruction source files currently loaded for this thread.",
"description": "Environment-native paths to instruction source files currently loaded for this thread.",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
},
"model": {
@@ -46,6 +51,12 @@
"modelProvider": {
"type": "string"
},
"serviceTier": {
"type": [
"string",
"null"
]
},
"reasoningEffort": {
"anyOf": [
{
@@ -55,17 +66,6 @@
"type": "null"
}
]
},
"thread": {
"$ref": "#/definitions/Thread"
},
"sandbox": {
"description": "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.",
"allOf": [
{
"$ref": "#/definitions/SandboxPolicy"
}
]
}
},
"definitions": {
@@ -598,10 +598,38 @@
"ImageDetail": {
"type": "string",
"enum": [
"auto",
"low",
"high",
"original"
]
},
"LegacyAppPathString": {
"type": "string"
},
"McpToolCallAppContext": {
"type": "object",
"required": [
"connectorId"
],
"properties": {
"connectorId": {
"type": "string"
},
"linkId": {
"type": [
"string",
"null"
]
},
"resourceUri": {
"type": [
"string",
"null"
]
}
}
},
"McpToolCallError": {
"type": "object",
"required": [
@@ -702,6 +730,15 @@
}
]
},
"MultiAgentMode": {
"description": "Controls whether the model receives multi-agent delegation instructions and, when it does, whether it should only spawn sub-agents after an explicit user request or may delegate proactively when doing so would help. `none` leaves the multi-agent tools available without injecting delegation instructions.",
"type": "string",
"enum": [
"none",
"explicitRequestOnly",
"proactive"
]
},
"NetworkAccess": {
"type": "string",
"enum": [
@@ -784,16 +821,9 @@
]
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"description": "A non-empty reasoning effort value advertised by the model.",
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
]
"minLength": 1
},
"SandboxPolicy": {
"oneOf": [
@@ -934,6 +964,14 @@
}
]
},
"SubAgentActivityKind": {
"type": "string",
"enum": [
"started",
"interacted",
"interrupted"
]
},
"SubAgentSource": {
"oneOf": [
{
@@ -1117,6 +1155,13 @@
"null"
]
},
"parentThreadId": {
"description": "The ID of the parent thread. This will only be set if this thread is a subagent.",
"type": [
"string",
"null"
]
},
"path": {
"description": "[UNSTABLE] Path to the thread on disk.",
"type": [
@@ -1128,6 +1173,14 @@
"description": "Usually the first user message in the thread, if available.",
"type": "string"
},
"recencyAt": {
"description": "Unix timestamp (in seconds) used for thread recency ordering.",
"type": [
"integer",
"null"
],
"format": "int64"
},
"sessionId": {
"description": "Session id shared by threads that belong to the same session tree.",
"type": "string"
@@ -1193,6 +1246,12 @@
"type"
],
"properties": {
"clientId": {
"type": [
"string",
"null"
]
},
"content": {
"type": "array",
"items": {
@@ -1377,7 +1436,7 @@
"description": "The command's working directory.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
]
},
@@ -1470,6 +1529,16 @@
"type"
],
"properties": {
"appContext": {
"anyOf": [
{
"$ref": "#/definitions/McpToolCallAppContext"
},
{
"type": "null"
}
]
},
"arguments": true,
"durationMs": {
"description": "The duration of the MCP tool call in milliseconds.",
@@ -1493,6 +1562,7 @@
"type": "string"
},
"mcpAppResourceUri": {
"description": "Deprecated: use `appContext.resourceUri` instead.",
"type": [
"string",
"null"
@@ -1677,6 +1747,38 @@
},
"title": "CollabAgentToolCallThreadItem"
},
{
"type": "object",
"required": [
"agentPath",
"agentThreadId",
"id",
"kind",
"type"
],
"properties": {
"agentPath": {
"type": "string"
},
"agentThreadId": {
"type": "string"
},
"id": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/SubAgentActivityKind"
},
"type": {
"type": "string",
"enum": [
"subAgentActivity"
],
"title": "SubAgentActivityThreadItemType"
}
},
"title": "SubAgentActivityThreadItem"
},
{
"type": "object",
"required": [
@@ -1735,6 +1837,32 @@
},
"title": "ImageViewThreadItem"
},
{
"type": "object",
"required": [
"durationMs",
"id",
"type"
],
"properties": {
"durationMs": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"sleep"
],
"title": "SleepThreadItemType"
}
},
"title": "SleepThreadItem"
},
{
"type": "object",
"required": [
@@ -1850,12 +1978,7 @@
]
},
"ThreadSource": {
"type": "string",
"enum": [
"user",
"subagent",
"memory_consolidation"
]
"type": "string"
},
"ThreadStatus": {
"oneOf": [
@@ -2061,6 +2184,32 @@
"inProgress"
]
},
"TurnsPage": {
"type": "object",
"required": [
"data"
],
"properties": {
"backwardsCursor": {
"type": [
"string",
"null"
]
},
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/Turn"
}
},
"nextCursor": {
"type": [
"string",
"null"
]
}
}
},
"UserInput": {
"oneOf": [
{
+130 -16
View File
@@ -466,10 +466,38 @@
"ImageDetail": {
"type": "string",
"enum": [
"auto",
"low",
"high",
"original"
]
},
"LegacyAppPathString": {
"type": "string"
},
"McpToolCallAppContext": {
"type": "object",
"required": [
"connectorId"
],
"properties": {
"connectorId": {
"type": "string"
},
"linkId": {
"type": [
"string",
"null"
]
},
"resourceUri": {
"type": [
"string",
"null"
]
}
}
},
"McpToolCallError": {
"type": "object",
"required": [
@@ -645,16 +673,9 @@
]
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"description": "A non-empty reasoning effort value advertised by the model.",
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
]
"minLength": 1
},
"SessionSource": {
"oneOf": [
@@ -696,6 +717,14 @@
}
]
},
"SubAgentActivityKind": {
"type": "string",
"enum": [
"started",
"interacted",
"interrupted"
]
},
"SubAgentSource": {
"oneOf": [
{
@@ -879,6 +908,13 @@
"null"
]
},
"parentThreadId": {
"description": "The ID of the parent thread. This will only be set if this thread is a subagent.",
"type": [
"string",
"null"
]
},
"path": {
"description": "[UNSTABLE] Path to the thread on disk.",
"type": [
@@ -890,6 +926,14 @@
"description": "Usually the first user message in the thread, if available.",
"type": "string"
},
"recencyAt": {
"description": "Unix timestamp (in seconds) used for thread recency ordering.",
"type": [
"integer",
"null"
],
"format": "int64"
},
"sessionId": {
"description": "Session id shared by threads that belong to the same session tree.",
"type": "string"
@@ -955,6 +999,12 @@
"type"
],
"properties": {
"clientId": {
"type": [
"string",
"null"
]
},
"content": {
"type": "array",
"items": {
@@ -1139,7 +1189,7 @@
"description": "The command's working directory.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
]
},
@@ -1232,6 +1282,16 @@
"type"
],
"properties": {
"appContext": {
"anyOf": [
{
"$ref": "#/definitions/McpToolCallAppContext"
},
{
"type": "null"
}
]
},
"arguments": true,
"durationMs": {
"description": "The duration of the MCP tool call in milliseconds.",
@@ -1255,6 +1315,7 @@
"type": "string"
},
"mcpAppResourceUri": {
"description": "Deprecated: use `appContext.resourceUri` instead.",
"type": [
"string",
"null"
@@ -1439,6 +1500,38 @@
},
"title": "CollabAgentToolCallThreadItem"
},
{
"type": "object",
"required": [
"agentPath",
"agentThreadId",
"id",
"kind",
"type"
],
"properties": {
"agentPath": {
"type": "string"
},
"agentThreadId": {
"type": "string"
},
"id": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/SubAgentActivityKind"
},
"type": {
"type": "string",
"enum": [
"subAgentActivity"
],
"title": "SubAgentActivityThreadItemType"
}
},
"title": "SubAgentActivityThreadItem"
},
{
"type": "object",
"required": [
@@ -1497,6 +1590,32 @@
},
"title": "ImageViewThreadItem"
},
{
"type": "object",
"required": [
"durationMs",
"id",
"type"
],
"properties": {
"durationMs": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"sleep"
],
"title": "SleepThreadItemType"
}
},
"title": "SleepThreadItem"
},
{
"type": "object",
"required": [
@@ -1612,12 +1731,7 @@
]
},
"ThreadSource": {
"type": "string",
"enum": [
"user",
"subagent",
"memory_consolidation"
]
"type": "string"
},
"ThreadStatus": {
"oneOf": [
@@ -122,6 +122,15 @@
"default"
]
},
"MultiAgentMode": {
"description": "Controls whether the model receives multi-agent delegation instructions and, when it does, whether it should only spawn sub-agents after an explicit user request or may delegate proactively when doing so would help. `none` leaves the multi-agent tools available without injecting delegation instructions.",
"type": "string",
"enum": [
"none",
"explicitRequestOnly",
"proactive"
]
},
"NetworkAccess": {
"type": "string",
"enum": [
@@ -138,16 +147,9 @@
]
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"description": "A non-empty reasoning effort value advertised by the model.",
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
]
"minLength": 1
},
"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",
@@ -346,6 +348,16 @@
"modelProvider": {
"type": "string"
},
"summary": {
"anyOf": [
{
"$ref": "#/definitions/ReasoningSummary"
},
{
"type": "null"
}
]
},
"personality": {
"anyOf": [
{
@@ -364,16 +376,6 @@
"string",
"null"
]
},
"summary": {
"anyOf": [
{
"$ref": "#/definitions/ReasoningSummary"
},
{
"type": "null"
}
]
}
}
}
+182 -52
View File
@@ -49,6 +49,12 @@
"null"
]
},
"serviceName": {
"type": [
"string",
"null"
]
},
"sandbox": {
"anyOf": [
{
@@ -59,27 +65,21 @@
}
]
},
"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"
"threadSource": {
"description": "Optional client-supplied analytics source classification for this thread.",
"anyOf": [
{
"$ref": "#/definitions/ThreadSource"
},
{
"type": "null"
}
]
},
"personality": {
@@ -104,6 +104,12 @@
"null"
]
},
"serviceTier": {
"type": [
"string",
"null"
]
},
"sessionStartSource": {
"anyOf": [
{
@@ -113,12 +119,6 @@
"type": "null"
}
]
},
"serviceName": {
"type": [
"string",
"null"
]
}
},
"definitions": {
@@ -185,31 +185,144 @@
}
]
},
"DynamicToolSpec": {
"type": "object",
"required": [
"description",
"inputSchema",
"name"
],
"properties": {
"deferLoading": {
"type": "boolean"
},
"description": {
"type": "string"
},
"inputSchema": true,
"name": {
"type": "string"
},
"namespace": {
"type": [
"string",
"null"
]
"CapabilityRootLocation": {
"description": "Location used to resolve a selected capability root.",
"oneOf": [
{
"description": "A path owned by an execution environment.",
"type": "object",
"required": [
"environmentId",
"path",
"type"
],
"properties": {
"environmentId": {
"type": "string"
},
"path": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"environment"
],
"title": "EnvironmentCapabilityRootLocationType"
}
},
"title": "EnvironmentCapabilityRootLocation"
}
}
]
},
"DynamicToolNamespaceTool": {
"oneOf": [
{
"type": "object",
"required": [
"description",
"inputSchema",
"name",
"type"
],
"properties": {
"deferLoading": {
"type": "boolean"
},
"description": {
"type": "string"
},
"inputSchema": true,
"name": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"function"
],
"title": "FunctionDynamicToolNamespaceToolType"
}
},
"title": "FunctionDynamicToolNamespaceTool"
}
]
},
"DynamicToolSpec": {
"oneOf": [
{
"type": "object",
"required": [
"description",
"inputSchema",
"name",
"type"
],
"properties": {
"deferLoading": {
"type": "boolean"
},
"description": {
"type": "string"
},
"inputSchema": true,
"name": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"function"
],
"title": "FunctionDynamicToolSpecType"
}
},
"title": "FunctionDynamicToolSpec"
},
{
"type": "object",
"required": [
"description",
"name",
"tools",
"type"
],
"properties": {
"description": {
"type": "string"
},
"name": {
"type": "string"
},
"tools": {
"type": "array",
"items": {
"$ref": "#/definitions/DynamicToolNamespaceTool"
}
},
"type": {
"type": "string",
"enum": [
"namespace"
],
"title": "NamespaceDynamicToolSpecType"
}
},
"title": "NamespaceDynamicToolSpec"
}
]
},
"LegacyAppPathString": {
"type": "string"
},
"MultiAgentMode": {
"description": "Controls whether the model receives multi-agent delegation instructions and, when it does, whether it should only spawn sub-agents after an explicit user request or may delegate proactively when doing so would help. `none` leaves the multi-agent tools available without injecting delegation instructions.",
"type": "string",
"enum": [
"none",
"explicitRequestOnly",
"proactive"
]
},
"Personality": {
"type": "string",
@@ -227,13 +340,30 @@
"danger-full-access"
]
},
"SelectedCapabilityRoot": {
"description": "A user-selected root that can expose one or more runtime capabilities.",
"type": "object",
"required": [
"id",
"location"
],
"properties": {
"id": {
"description": "Stable identifier supplied by the capability selection platform.",
"type": "string"
},
"location": {
"description": "Where the selected root can be resolved.",
"allOf": [
{
"$ref": "#/definitions/CapabilityRootLocation"
}
]
}
}
},
"ThreadSource": {
"type": "string",
"enum": [
"user",
"subagent",
"memory_consolidation"
]
"type": "string"
},
"ThreadStartSource": {
"type": "string",
@@ -250,7 +380,7 @@
],
"properties": {
"cwd": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
},
"environmentId": {
"type": "string"
+144 -21
View File
@@ -33,11 +33,11 @@
"$ref": "#/definitions/AbsolutePathBuf"
},
"instructionSources": {
"description": "Instruction source files currently loaded for this thread.",
"description": "Environment-native paths to instruction source files currently loaded for this thread.",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
},
"model": {
@@ -46,6 +46,9 @@
"modelProvider": {
"type": "string"
},
"thread": {
"$ref": "#/definitions/Thread"
},
"reasoningEffort": {
"anyOf": [
{
@@ -56,9 +59,6 @@
}
]
},
"thread": {
"$ref": "#/definitions/Thread"
},
"sandbox": {
"description": "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.",
"allOf": [
@@ -598,10 +598,38 @@
"ImageDetail": {
"type": "string",
"enum": [
"auto",
"low",
"high",
"original"
]
},
"LegacyAppPathString": {
"type": "string"
},
"McpToolCallAppContext": {
"type": "object",
"required": [
"connectorId"
],
"properties": {
"connectorId": {
"type": "string"
},
"linkId": {
"type": [
"string",
"null"
]
},
"resourceUri": {
"type": [
"string",
"null"
]
}
}
},
"McpToolCallError": {
"type": "object",
"required": [
@@ -702,6 +730,15 @@
}
]
},
"MultiAgentMode": {
"description": "Controls whether the model receives multi-agent delegation instructions and, when it does, whether it should only spawn sub-agents after an explicit user request or may delegate proactively when doing so would help. `none` leaves the multi-agent tools available without injecting delegation instructions.",
"type": "string",
"enum": [
"none",
"explicitRequestOnly",
"proactive"
]
},
"NetworkAccess": {
"type": "string",
"enum": [
@@ -784,16 +821,9 @@
]
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"description": "A non-empty reasoning effort value advertised by the model.",
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
]
"minLength": 1
},
"SandboxPolicy": {
"oneOf": [
@@ -934,6 +964,14 @@
}
]
},
"SubAgentActivityKind": {
"type": "string",
"enum": [
"started",
"interacted",
"interrupted"
]
},
"SubAgentSource": {
"oneOf": [
{
@@ -1117,6 +1155,13 @@
"null"
]
},
"parentThreadId": {
"description": "The ID of the parent thread. This will only be set if this thread is a subagent.",
"type": [
"string",
"null"
]
},
"path": {
"description": "[UNSTABLE] Path to the thread on disk.",
"type": [
@@ -1128,6 +1173,14 @@
"description": "Usually the first user message in the thread, if available.",
"type": "string"
},
"recencyAt": {
"description": "Unix timestamp (in seconds) used for thread recency ordering.",
"type": [
"integer",
"null"
],
"format": "int64"
},
"sessionId": {
"description": "Session id shared by threads that belong to the same session tree.",
"type": "string"
@@ -1193,6 +1246,12 @@
"type"
],
"properties": {
"clientId": {
"type": [
"string",
"null"
]
},
"content": {
"type": "array",
"items": {
@@ -1377,7 +1436,7 @@
"description": "The command's working directory.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
]
},
@@ -1470,6 +1529,16 @@
"type"
],
"properties": {
"appContext": {
"anyOf": [
{
"$ref": "#/definitions/McpToolCallAppContext"
},
{
"type": "null"
}
]
},
"arguments": true,
"durationMs": {
"description": "The duration of the MCP tool call in milliseconds.",
@@ -1493,6 +1562,7 @@
"type": "string"
},
"mcpAppResourceUri": {
"description": "Deprecated: use `appContext.resourceUri` instead.",
"type": [
"string",
"null"
@@ -1677,6 +1747,38 @@
},
"title": "CollabAgentToolCallThreadItem"
},
{
"type": "object",
"required": [
"agentPath",
"agentThreadId",
"id",
"kind",
"type"
],
"properties": {
"agentPath": {
"type": "string"
},
"agentThreadId": {
"type": "string"
},
"id": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/SubAgentActivityKind"
},
"type": {
"type": "string",
"enum": [
"subAgentActivity"
],
"title": "SubAgentActivityThreadItemType"
}
},
"title": "SubAgentActivityThreadItem"
},
{
"type": "object",
"required": [
@@ -1735,6 +1837,32 @@
},
"title": "ImageViewThreadItem"
},
{
"type": "object",
"required": [
"durationMs",
"id",
"type"
],
"properties": {
"durationMs": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"sleep"
],
"title": "SleepThreadItemType"
}
},
"title": "SleepThreadItem"
},
{
"type": "object",
"required": [
@@ -1850,12 +1978,7 @@
]
},
"ThreadSource": {
"type": "string",
"enum": [
"user",
"subagent",
"memory_consolidation"
]
"type": "string"
},
"ThreadStatus": {
"oneOf": [
+130 -16
View File
@@ -461,10 +461,38 @@
"ImageDetail": {
"type": "string",
"enum": [
"auto",
"low",
"high",
"original"
]
},
"LegacyAppPathString": {
"type": "string"
},
"McpToolCallAppContext": {
"type": "object",
"required": [
"connectorId"
],
"properties": {
"connectorId": {
"type": "string"
},
"linkId": {
"type": [
"string",
"null"
]
},
"resourceUri": {
"type": [
"string",
"null"
]
}
}
},
"McpToolCallError": {
"type": "object",
"required": [
@@ -640,16 +668,9 @@
]
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"description": "A non-empty reasoning effort value advertised by the model.",
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
]
"minLength": 1
},
"SessionSource": {
"oneOf": [
@@ -691,6 +712,14 @@
}
]
},
"SubAgentActivityKind": {
"type": "string",
"enum": [
"started",
"interacted",
"interrupted"
]
},
"SubAgentSource": {
"oneOf": [
{
@@ -874,6 +903,13 @@
"null"
]
},
"parentThreadId": {
"description": "The ID of the parent thread. This will only be set if this thread is a subagent.",
"type": [
"string",
"null"
]
},
"path": {
"description": "[UNSTABLE] Path to the thread on disk.",
"type": [
@@ -885,6 +921,14 @@
"description": "Usually the first user message in the thread, if available.",
"type": "string"
},
"recencyAt": {
"description": "Unix timestamp (in seconds) used for thread recency ordering.",
"type": [
"integer",
"null"
],
"format": "int64"
},
"sessionId": {
"description": "Session id shared by threads that belong to the same session tree.",
"type": "string"
@@ -950,6 +994,12 @@
"type"
],
"properties": {
"clientId": {
"type": [
"string",
"null"
]
},
"content": {
"type": "array",
"items": {
@@ -1134,7 +1184,7 @@
"description": "The command's working directory.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
]
},
@@ -1227,6 +1277,16 @@
"type"
],
"properties": {
"appContext": {
"anyOf": [
{
"$ref": "#/definitions/McpToolCallAppContext"
},
{
"type": "null"
}
]
},
"arguments": true,
"durationMs": {
"description": "The duration of the MCP tool call in milliseconds.",
@@ -1250,6 +1310,7 @@
"type": "string"
},
"mcpAppResourceUri": {
"description": "Deprecated: use `appContext.resourceUri` instead.",
"type": [
"string",
"null"
@@ -1434,6 +1495,38 @@
},
"title": "CollabAgentToolCallThreadItem"
},
{
"type": "object",
"required": [
"agentPath",
"agentThreadId",
"id",
"kind",
"type"
],
"properties": {
"agentPath": {
"type": "string"
},
"agentThreadId": {
"type": "string"
},
"id": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/SubAgentActivityKind"
},
"type": {
"type": "string",
"enum": [
"subAgentActivity"
],
"title": "SubAgentActivityThreadItemType"
}
},
"title": "SubAgentActivityThreadItem"
},
{
"type": "object",
"required": [
@@ -1492,6 +1585,32 @@
},
"title": "ImageViewThreadItem"
},
{
"type": "object",
"required": [
"durationMs",
"id",
"type"
],
"properties": {
"durationMs": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"sleep"
],
"title": "SleepThreadItemType"
}
},
"title": "SleepThreadItem"
},
{
"type": "object",
"required": [
@@ -1607,12 +1726,7 @@
]
},
"ThreadSource": {
"type": "string",
"enum": [
"user",
"subagent",
"memory_consolidation"
]
"type": "string"
},
"ThreadStatus": {
"oneOf": [
+130 -16
View File
@@ -461,10 +461,38 @@
"ImageDetail": {
"type": "string",
"enum": [
"auto",
"low",
"high",
"original"
]
},
"LegacyAppPathString": {
"type": "string"
},
"McpToolCallAppContext": {
"type": "object",
"required": [
"connectorId"
],
"properties": {
"connectorId": {
"type": "string"
},
"linkId": {
"type": [
"string",
"null"
]
},
"resourceUri": {
"type": [
"string",
"null"
]
}
}
},
"McpToolCallError": {
"type": "object",
"required": [
@@ -640,16 +668,9 @@
]
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"description": "A non-empty reasoning effort value advertised by the model.",
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
]
"minLength": 1
},
"SessionSource": {
"oneOf": [
@@ -691,6 +712,14 @@
}
]
},
"SubAgentActivityKind": {
"type": "string",
"enum": [
"started",
"interacted",
"interrupted"
]
},
"SubAgentSource": {
"oneOf": [
{
@@ -874,6 +903,13 @@
"null"
]
},
"parentThreadId": {
"description": "The ID of the parent thread. This will only be set if this thread is a subagent.",
"type": [
"string",
"null"
]
},
"path": {
"description": "[UNSTABLE] Path to the thread on disk.",
"type": [
@@ -885,6 +921,14 @@
"description": "Usually the first user message in the thread, if available.",
"type": "string"
},
"recencyAt": {
"description": "Unix timestamp (in seconds) used for thread recency ordering.",
"type": [
"integer",
"null"
],
"format": "int64"
},
"sessionId": {
"description": "Session id shared by threads that belong to the same session tree.",
"type": "string"
@@ -950,6 +994,12 @@
"type"
],
"properties": {
"clientId": {
"type": [
"string",
"null"
]
},
"content": {
"type": "array",
"items": {
@@ -1134,7 +1184,7 @@
"description": "The command's working directory.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
]
},
@@ -1227,6 +1277,16 @@
"type"
],
"properties": {
"appContext": {
"anyOf": [
{
"$ref": "#/definitions/McpToolCallAppContext"
},
{
"type": "null"
}
]
},
"arguments": true,
"durationMs": {
"description": "The duration of the MCP tool call in milliseconds.",
@@ -1250,6 +1310,7 @@
"type": "string"
},
"mcpAppResourceUri": {
"description": "Deprecated: use `appContext.resourceUri` instead.",
"type": [
"string",
"null"
@@ -1434,6 +1495,38 @@
},
"title": "CollabAgentToolCallThreadItem"
},
{
"type": "object",
"required": [
"agentPath",
"agentThreadId",
"id",
"kind",
"type"
],
"properties": {
"agentPath": {
"type": "string"
},
"agentThreadId": {
"type": "string"
},
"id": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/SubAgentActivityKind"
},
"type": {
"type": "string",
"enum": [
"subAgentActivity"
],
"title": "SubAgentActivityThreadItemType"
}
},
"title": "SubAgentActivityThreadItem"
},
{
"type": "object",
"required": [
@@ -1492,6 +1585,32 @@
},
"title": "ImageViewThreadItem"
},
{
"type": "object",
"required": [
"durationMs",
"id",
"type"
],
"properties": {
"durationMs": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"sleep"
],
"title": "SleepThreadItemType"
}
},
"title": "SleepThreadItem"
},
{
"type": "object",
"required": [
@@ -1607,12 +1726,7 @@
]
},
"ThreadSource": {
"type": "string",
"enum": [
"user",
"subagent",
"memory_consolidation"
]
"type": "string"
},
"ThreadStatus": {
"oneOf": [
+112 -8
View File
@@ -439,10 +439,38 @@
"ImageDetail": {
"type": "string",
"enum": [
"auto",
"low",
"high",
"original"
]
},
"LegacyAppPathString": {
"type": "string"
},
"McpToolCallAppContext": {
"type": "object",
"required": [
"connectorId"
],
"properties": {
"connectorId": {
"type": "string"
},
"linkId": {
"type": [
"string",
"null"
]
},
"resourceUri": {
"type": [
"string",
"null"
]
}
}
},
"McpToolCallError": {
"type": "object",
"required": [
@@ -618,15 +646,16 @@
]
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"description": "A non-empty reasoning effort value advertised by the model.",
"type": "string",
"minLength": 1
},
"SubAgentActivityKind": {
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
"started",
"interacted",
"interrupted"
]
},
"TextElement": {
@@ -662,6 +691,12 @@
"type"
],
"properties": {
"clientId": {
"type": [
"string",
"null"
]
},
"content": {
"type": "array",
"items": {
@@ -846,7 +881,7 @@
"description": "The command's working directory.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
]
},
@@ -939,6 +974,16 @@
"type"
],
"properties": {
"appContext": {
"anyOf": [
{
"$ref": "#/definitions/McpToolCallAppContext"
},
{
"type": "null"
}
]
},
"arguments": true,
"durationMs": {
"description": "The duration of the MCP tool call in milliseconds.",
@@ -962,6 +1007,7 @@
"type": "string"
},
"mcpAppResourceUri": {
"description": "Deprecated: use `appContext.resourceUri` instead.",
"type": [
"string",
"null"
@@ -1146,6 +1192,38 @@
},
"title": "CollabAgentToolCallThreadItem"
},
{
"type": "object",
"required": [
"agentPath",
"agentThreadId",
"id",
"kind",
"type"
],
"properties": {
"agentPath": {
"type": "string"
},
"agentThreadId": {
"type": "string"
},
"id": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/SubAgentActivityKind"
},
"type": {
"type": "string",
"enum": [
"subAgentActivity"
],
"title": "SubAgentActivityThreadItemType"
}
},
"title": "SubAgentActivityThreadItem"
},
{
"type": "object",
"required": [
@@ -1204,6 +1282,32 @@
},
"title": "ImageViewThreadItem"
},
{
"type": "object",
"required": [
"durationMs",
"id",
"type"
],
"properties": {
"durationMs": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"sleep"
],
"title": "SleepThreadItemType"
}
},
"title": "SleepThreadItem"
},
{
"type": "object",
"required": [
@@ -0,0 +1,19 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "TurnModerationMetadataNotification",
"type": "object",
"required": [
"metadata",
"threadId",
"turnId"
],
"properties": {
"metadata": true,
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
}
}
+69 -34
View File
@@ -7,6 +7,9 @@
"threadId"
],
"properties": {
"threadId": {
"type": "string"
},
"approvalPolicy": {
"description": "Override the approval policy for this turn and subsequent turns.",
"anyOf": [
@@ -29,6 +32,12 @@
}
]
},
"clientUserMessageId": {
"type": [
"string",
"null"
]
},
"serviceTier": {
"description": "Override the service tier for this turn and subsequent turns.",
"type": [
@@ -54,8 +63,16 @@
}
]
},
"threadId": {
"type": "string"
"personality": {
"description": "Override the personality for this turn and subsequent turns.",
"anyOf": [
{
"$ref": "#/definitions/Personality"
},
{
"type": "null"
}
]
},
"input": {
"type": "array",
@@ -70,6 +87,17 @@
"null"
]
},
"summary": {
"description": "Override the reasoning summary for this turn and subsequent turns.",
"anyOf": [
{
"$ref": "#/definitions/ReasoningSummary"
},
{
"type": "null"
}
]
},
"outputSchema": {
"description": "Optional JSON Schema used to constrain the final assistant message for this turn."
},
@@ -83,28 +111,6 @@
"type": "null"
}
]
},
"personality": {
"description": "Override the personality for this turn and subsequent turns.",
"anyOf": [
{
"$ref": "#/definitions/Personality"
},
{
"type": "null"
}
]
},
"summary": {
"description": "Override the reasoning summary for this turn and subsequent turns.",
"anyOf": [
{
"$ref": "#/definitions/ReasoningSummary"
},
{
"type": "null"
}
]
}
},
"definitions": {
@@ -112,6 +118,28 @@
"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"
},
"AdditionalContextEntry": {
"type": "object",
"required": [
"kind",
"value"
],
"properties": {
"kind": {
"$ref": "#/definitions/AdditionalContextKind"
},
"value": {
"type": "string"
}
}
},
"AdditionalContextKind": {
"type": "string",
"enum": [
"untrusted",
"application"
]
},
"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",
@@ -209,10 +237,15 @@
"ImageDetail": {
"type": "string",
"enum": [
"auto",
"low",
"high",
"original"
]
},
"LegacyAppPathString": {
"type": "string"
},
"ModeKind": {
"description": "Initial collaboration mode to use when the TUI starts.",
"type": "string",
@@ -221,6 +254,15 @@
"default"
]
},
"MultiAgentMode": {
"description": "Controls whether the model receives multi-agent delegation instructions and, when it does, whether it should only spawn sub-agents after an explicit user request or may delegate proactively when doing so would help. `none` leaves the multi-agent tools available without injecting delegation instructions.",
"type": "string",
"enum": [
"none",
"explicitRequestOnly",
"proactive"
]
},
"NetworkAccess": {
"type": "string",
"enum": [
@@ -237,16 +279,9 @@
]
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"description": "A non-empty reasoning effort value advertised by the model.",
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
]
"minLength": 1
},
"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",
@@ -426,7 +461,7 @@
],
"properties": {
"cwd": {
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
},
"environmentId": {
"type": "string"
+112 -8
View File
@@ -435,10 +435,38 @@
"ImageDetail": {
"type": "string",
"enum": [
"auto",
"low",
"high",
"original"
]
},
"LegacyAppPathString": {
"type": "string"
},
"McpToolCallAppContext": {
"type": "object",
"required": [
"connectorId"
],
"properties": {
"connectorId": {
"type": "string"
},
"linkId": {
"type": [
"string",
"null"
]
},
"resourceUri": {
"type": [
"string",
"null"
]
}
}
},
"McpToolCallError": {
"type": "object",
"required": [
@@ -614,15 +642,16 @@
]
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"description": "A non-empty reasoning effort value advertised by the model.",
"type": "string",
"minLength": 1
},
"SubAgentActivityKind": {
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
"started",
"interacted",
"interrupted"
]
},
"TextElement": {
@@ -658,6 +687,12 @@
"type"
],
"properties": {
"clientId": {
"type": [
"string",
"null"
]
},
"content": {
"type": "array",
"items": {
@@ -842,7 +877,7 @@
"description": "The command's working directory.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
]
},
@@ -935,6 +970,16 @@
"type"
],
"properties": {
"appContext": {
"anyOf": [
{
"$ref": "#/definitions/McpToolCallAppContext"
},
{
"type": "null"
}
]
},
"arguments": true,
"durationMs": {
"description": "The duration of the MCP tool call in milliseconds.",
@@ -958,6 +1003,7 @@
"type": "string"
},
"mcpAppResourceUri": {
"description": "Deprecated: use `appContext.resourceUri` instead.",
"type": [
"string",
"null"
@@ -1142,6 +1188,38 @@
},
"title": "CollabAgentToolCallThreadItem"
},
{
"type": "object",
"required": [
"agentPath",
"agentThreadId",
"id",
"kind",
"type"
],
"properties": {
"agentPath": {
"type": "string"
},
"agentThreadId": {
"type": "string"
},
"id": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/SubAgentActivityKind"
},
"type": {
"type": "string",
"enum": [
"subAgentActivity"
],
"title": "SubAgentActivityThreadItemType"
}
},
"title": "SubAgentActivityThreadItem"
},
{
"type": "object",
"required": [
@@ -1200,6 +1278,32 @@
},
"title": "ImageViewThreadItem"
},
{
"type": "object",
"required": [
"durationMs",
"id",
"type"
],
"properties": {
"durationMs": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"sleep"
],
"title": "SleepThreadItemType"
}
},
"title": "SleepThreadItem"
},
{
"type": "object",
"required": [
+112 -8
View File
@@ -439,10 +439,38 @@
"ImageDetail": {
"type": "string",
"enum": [
"auto",
"low",
"high",
"original"
]
},
"LegacyAppPathString": {
"type": "string"
},
"McpToolCallAppContext": {
"type": "object",
"required": [
"connectorId"
],
"properties": {
"connectorId": {
"type": "string"
},
"linkId": {
"type": [
"string",
"null"
]
},
"resourceUri": {
"type": [
"string",
"null"
]
}
}
},
"McpToolCallError": {
"type": "object",
"required": [
@@ -618,15 +646,16 @@
]
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"description": "A non-empty reasoning effort value advertised by the model.",
"type": "string",
"minLength": 1
},
"SubAgentActivityKind": {
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
"started",
"interacted",
"interrupted"
]
},
"TextElement": {
@@ -662,6 +691,12 @@
"type"
],
"properties": {
"clientId": {
"type": [
"string",
"null"
]
},
"content": {
"type": "array",
"items": {
@@ -846,7 +881,7 @@
"description": "The command's working directory.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
"$ref": "#/definitions/LegacyAppPathString"
}
]
},
@@ -939,6 +974,16 @@
"type"
],
"properties": {
"appContext": {
"anyOf": [
{
"$ref": "#/definitions/McpToolCallAppContext"
},
{
"type": "null"
}
]
},
"arguments": true,
"durationMs": {
"description": "The duration of the MCP tool call in milliseconds.",
@@ -962,6 +1007,7 @@
"type": "string"
},
"mcpAppResourceUri": {
"description": "Deprecated: use `appContext.resourceUri` instead.",
"type": [
"string",
"null"
@@ -1146,6 +1192,38 @@
},
"title": "CollabAgentToolCallThreadItem"
},
{
"type": "object",
"required": [
"agentPath",
"agentThreadId",
"id",
"kind",
"type"
],
"properties": {
"agentPath": {
"type": "string"
},
"agentThreadId": {
"type": "string"
},
"id": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/SubAgentActivityKind"
},
"type": {
"type": "string",
"enum": [
"subAgentActivity"
],
"title": "SubAgentActivityThreadItemType"
}
},
"title": "SubAgentActivityThreadItem"
},
{
"type": "object",
"required": [
@@ -1204,6 +1282,32 @@
},
"title": "ImageViewThreadItem"
},
{
"type": "object",
"required": [
"durationMs",
"id",
"type"
],
"properties": {
"durationMs": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"sleep"
],
"title": "SleepThreadItemType"
}
},
"title": "SleepThreadItem"
},
{
"type": "object",
"required": [
+33 -3
View File
@@ -8,6 +8,15 @@
"threadId"
],
"properties": {
"threadId": {
"type": "string"
},
"clientUserMessageId": {
"type": [
"string",
"null"
]
},
"expectedTurnId": {
"description": "Required active turn id precondition. The request fails when it does not match the currently active turn.",
"type": "string"
@@ -17,12 +26,31 @@
"items": {
"$ref": "#/definitions/UserInput"
}
},
"threadId": {
"type": "string"
}
},
"definitions": {
"AdditionalContextEntry": {
"type": "object",
"required": [
"kind",
"value"
],
"properties": {
"kind": {
"$ref": "#/definitions/AdditionalContextKind"
},
"value": {
"type": "string"
}
}
},
"AdditionalContextKind": {
"type": "string",
"enum": [
"untrusted",
"application"
]
},
"ByteRange": {
"type": "object",
"required": [
@@ -45,6 +73,8 @@
"ImageDetail": {
"type": "string",
"enum": [
"auto",
"low",
"high",
"original"
]