[codex] Add thread catalog subscriptions

This commit is contained in:
Brent Traut
2026-07-08 10:51:27 -07:00
parent f56595f4bc
commit a18f769372
22 changed files with 1415 additions and 2 deletions
@@ -5268,6 +5268,29 @@
"title": "Thread/listRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"threadCatalog/subscribe"
],
"title": "ThreadCatalog/subscribeRequestMethod",
"type": "string"
},
"params": {
"type": "null"
}
},
"required": [
"id",
"method"
],
"title": "ThreadCatalog/subscribeRequest",
"type": "object"
},
{
"properties": {
"id": {
@@ -3825,6 +3825,66 @@
],
"type": "object"
},
"ThreadCatalogChangedNotification": {
"oneOf": [
{
"properties": {
"thread": {
"$ref": "#/definitions/ThreadSummary"
},
"type": {
"enum": [
"upsert"
],
"title": "UpsertThreadCatalogChangedNotificationType",
"type": "string"
}
},
"required": [
"thread",
"type"
],
"title": "UpsertThreadCatalogChangedNotification",
"type": "object"
},
{
"properties": {
"threadId": {
"type": "string"
},
"type": {
"enum": [
"delete"
],
"title": "DeleteThreadCatalogChangedNotificationType",
"type": "string"
}
},
"required": [
"threadId",
"type"
],
"title": "DeleteThreadCatalogChangedNotification",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"invalidate"
],
"title": "InvalidateThreadCatalogChangedNotificationType",
"type": "string"
}
},
"required": [
"type"
],
"title": "InvalidateThreadCatalogChangedNotification",
"type": "object"
}
]
},
"ThreadClosedNotification": {
"properties": {
"threadId": {
@@ -5090,6 +5150,125 @@
],
"type": "object"
},
"ThreadSummary": {
"description": "Persisted metadata needed to render and order a thread catalog row.",
"properties": {
"agentNickname": {
"type": [
"string",
"null"
]
},
"agentRole": {
"type": [
"string",
"null"
]
},
"archivedAt": {
"format": "int64",
"type": [
"integer",
"null"
]
},
"createdAt": {
"format": "int64",
"type": "integer"
},
"createdAtMs": {
"format": "int64",
"type": "integer"
},
"cwd": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"forkedFromId": {
"type": [
"string",
"null"
]
},
"gitInfo": {
"anyOf": [
{
"$ref": "#/definitions/GitInfo"
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"modelProvider": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"parentThreadId": {
"type": [
"string",
"null"
]
},
"preview": {
"type": "string"
},
"recencyAt": {
"format": "int64",
"type": [
"integer",
"null"
]
},
"recencyAtMs": {
"format": "int64",
"type": [
"integer",
"null"
]
},
"source": {
"$ref": "#/definitions/SessionSource"
},
"threadSource": {
"anyOf": [
{
"$ref": "#/definitions/ThreadSource"
},
{
"type": "null"
}
]
},
"updatedAt": {
"format": "int64",
"type": "integer"
},
"updatedAtMs": {
"format": "int64",
"type": "integer"
}
},
"required": [
"createdAt",
"createdAtMs",
"cwd",
"id",
"modelProvider",
"preview",
"source",
"updatedAt",
"updatedAtMs"
],
"type": "object"
},
"ThreadTokenUsage": {
"properties": {
"last": {
@@ -5860,6 +6039,26 @@
"title": "Thread/unarchivedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"threadCatalog/changed"
],
"title": "ThreadCatalog/changedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/ThreadCatalogChangedNotification"
}
},
"required": [
"method",
"params"
],
"title": "ThreadCatalog/changedNotification",
"type": "object"
},
{
"properties": {
"method": {
@@ -636,6 +636,29 @@
"title": "Thread/listRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/v2/RequestId"
},
"method": {
"enum": [
"threadCatalog/subscribe"
],
"title": "ThreadCatalog/subscribeRequestMethod",
"type": "string"
},
"params": {
"type": "null"
}
},
"required": [
"id",
"method"
],
"title": "ThreadCatalog/subscribeRequest",
"type": "object"
},
{
"properties": {
"id": {
@@ -4228,6 +4251,26 @@
"title": "Thread/unarchivedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"threadCatalog/changed"
],
"title": "ThreadCatalog/changedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ThreadCatalogChangedNotification"
}
},
"required": [
"method",
"params"
],
"title": "ThreadCatalog/changedNotification",
"type": "object"
},
{
"properties": {
"method": {
@@ -17317,6 +17360,73 @@
"title": "ThreadArchivedNotification",
"type": "object"
},
"ThreadCatalogChangedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"oneOf": [
{
"properties": {
"thread": {
"$ref": "#/definitions/v2/ThreadSummary"
},
"type": {
"enum": [
"upsert"
],
"title": "Upsertv2::ThreadCatalogChangedNotificationType",
"type": "string"
}
},
"required": [
"thread",
"type"
],
"title": "Upsertv2::ThreadCatalogChangedNotification",
"type": "object"
},
{
"properties": {
"threadId": {
"type": "string"
},
"type": {
"enum": [
"delete"
],
"title": "Deletev2::ThreadCatalogChangedNotificationType",
"type": "string"
}
},
"required": [
"threadId",
"type"
],
"title": "Deletev2::ThreadCatalogChangedNotification",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"invalidate"
],
"title": "Invalidatev2::ThreadCatalogChangedNotificationType",
"type": "string"
}
},
"required": [
"type"
],
"title": "Invalidatev2::ThreadCatalogChangedNotification",
"type": "object"
}
],
"title": "ThreadCatalogChangedNotification"
},
"ThreadCatalogSubscribeResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ThreadCatalogSubscribeResponse",
"type": "object"
},
"ThreadClosedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
@@ -19816,6 +19926,125 @@
"title": "ThreadStatusChangedNotification",
"type": "object"
},
"ThreadSummary": {
"description": "Persisted metadata needed to render and order a thread catalog row.",
"properties": {
"agentNickname": {
"type": [
"string",
"null"
]
},
"agentRole": {
"type": [
"string",
"null"
]
},
"archivedAt": {
"format": "int64",
"type": [
"integer",
"null"
]
},
"createdAt": {
"format": "int64",
"type": "integer"
},
"createdAtMs": {
"format": "int64",
"type": "integer"
},
"cwd": {
"$ref": "#/definitions/v2/AbsolutePathBuf"
},
"forkedFromId": {
"type": [
"string",
"null"
]
},
"gitInfo": {
"anyOf": [
{
"$ref": "#/definitions/v2/GitInfo"
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"modelProvider": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"parentThreadId": {
"type": [
"string",
"null"
]
},
"preview": {
"type": "string"
},
"recencyAt": {
"format": "int64",
"type": [
"integer",
"null"
]
},
"recencyAtMs": {
"format": "int64",
"type": [
"integer",
"null"
]
},
"source": {
"$ref": "#/definitions/v2/SessionSource"
},
"threadSource": {
"anyOf": [
{
"$ref": "#/definitions/v2/ThreadSource"
},
{
"type": "null"
}
]
},
"updatedAt": {
"format": "int64",
"type": "integer"
},
"updatedAtMs": {
"format": "int64",
"type": "integer"
}
},
"required": [
"createdAt",
"createdAtMs",
"cwd",
"id",
"modelProvider",
"preview",
"source",
"updatedAt",
"updatedAtMs"
],
"type": "object"
},
"ThreadTokenUsage": {
"properties": {
"last": {
@@ -1674,6 +1674,29 @@
"title": "Thread/listRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"threadCatalog/subscribe"
],
"title": "ThreadCatalog/subscribeRequestMethod",
"type": "string"
},
"params": {
"type": "null"
}
},
"required": [
"id",
"method"
],
"title": "ThreadCatalog/subscribeRequest",
"type": "object"
},
{
"properties": {
"id": {
@@ -12943,6 +12966,26 @@
"title": "Thread/unarchivedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"threadCatalog/changed"
],
"title": "ThreadCatalog/changedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/ThreadCatalogChangedNotification"
}
},
"required": [
"method",
"params"
],
"title": "ThreadCatalog/changedNotification",
"type": "object"
},
{
"properties": {
"method": {
@@ -15096,6 +15139,73 @@
"title": "ThreadArchivedNotification",
"type": "object"
},
"ThreadCatalogChangedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"oneOf": [
{
"properties": {
"thread": {
"$ref": "#/definitions/ThreadSummary"
},
"type": {
"enum": [
"upsert"
],
"title": "Upsertv2::ThreadCatalogChangedNotificationType",
"type": "string"
}
},
"required": [
"thread",
"type"
],
"title": "Upsertv2::ThreadCatalogChangedNotification",
"type": "object"
},
{
"properties": {
"threadId": {
"type": "string"
},
"type": {
"enum": [
"delete"
],
"title": "Deletev2::ThreadCatalogChangedNotificationType",
"type": "string"
}
},
"required": [
"threadId",
"type"
],
"title": "Deletev2::ThreadCatalogChangedNotification",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"invalidate"
],
"title": "Invalidatev2::ThreadCatalogChangedNotificationType",
"type": "string"
}
},
"required": [
"type"
],
"title": "Invalidatev2::ThreadCatalogChangedNotification",
"type": "object"
}
],
"title": "ThreadCatalogChangedNotification"
},
"ThreadCatalogSubscribeResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ThreadCatalogSubscribeResponse",
"type": "object"
},
"ThreadClosedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
@@ -17595,6 +17705,125 @@
"title": "ThreadStatusChangedNotification",
"type": "object"
},
"ThreadSummary": {
"description": "Persisted metadata needed to render and order a thread catalog row.",
"properties": {
"agentNickname": {
"type": [
"string",
"null"
]
},
"agentRole": {
"type": [
"string",
"null"
]
},
"archivedAt": {
"format": "int64",
"type": [
"integer",
"null"
]
},
"createdAt": {
"format": "int64",
"type": "integer"
},
"createdAtMs": {
"format": "int64",
"type": "integer"
},
"cwd": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"forkedFromId": {
"type": [
"string",
"null"
]
},
"gitInfo": {
"anyOf": [
{
"$ref": "#/definitions/GitInfo"
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"modelProvider": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"parentThreadId": {
"type": [
"string",
"null"
]
},
"preview": {
"type": "string"
},
"recencyAt": {
"format": "int64",
"type": [
"integer",
"null"
]
},
"recencyAtMs": {
"format": "int64",
"type": [
"integer",
"null"
]
},
"source": {
"$ref": "#/definitions/SessionSource"
},
"threadSource": {
"anyOf": [
{
"$ref": "#/definitions/ThreadSource"
},
{
"type": "null"
}
]
},
"updatedAt": {
"format": "int64",
"type": "integer"
},
"updatedAtMs": {
"format": "int64",
"type": "integer"
}
},
"required": [
"createdAt",
"createdAtMs",
"cwd",
"id",
"modelProvider",
"preview",
"source",
"updatedAt",
"updatedAtMs"
],
"type": "object"
},
"ThreadTokenUsage": {
"properties": {
"last": {
@@ -0,0 +1,335 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"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"
},
"AgentPath": {
"type": "string"
},
"GitInfo": {
"properties": {
"branch": {
"type": [
"string",
"null"
]
},
"originUrl": {
"type": [
"string",
"null"
]
},
"sha": {
"type": [
"string",
"null"
]
}
},
"type": "object"
},
"SessionSource": {
"oneOf": [
{
"enum": [
"cli",
"vscode",
"exec",
"appServer",
"unknown"
],
"type": "string"
},
{
"additionalProperties": false,
"properties": {
"custom": {
"type": "string"
}
},
"required": [
"custom"
],
"title": "CustomSessionSource",
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"subAgent": {
"$ref": "#/definitions/SubAgentSource"
}
},
"required": [
"subAgent"
],
"title": "SubAgentSessionSource",
"type": "object"
}
]
},
"SubAgentSource": {
"oneOf": [
{
"enum": [
"review",
"compact",
"memory_consolidation"
],
"type": "string"
},
{
"additionalProperties": false,
"properties": {
"thread_spawn": {
"properties": {
"agent_nickname": {
"default": null,
"type": [
"string",
"null"
]
},
"agent_path": {
"anyOf": [
{
"$ref": "#/definitions/AgentPath"
},
{
"type": "null"
}
],
"default": null
},
"agent_role": {
"default": null,
"type": [
"string",
"null"
]
},
"depth": {
"format": "int32",
"type": "integer"
},
"parent_thread_id": {
"$ref": "#/definitions/ThreadId"
}
},
"required": [
"depth",
"parent_thread_id"
],
"type": "object"
}
},
"required": [
"thread_spawn"
],
"title": "ThreadSpawnSubAgentSource",
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"other": {
"type": "string"
}
},
"required": [
"other"
],
"title": "OtherSubAgentSource",
"type": "object"
}
]
},
"ThreadId": {
"type": "string"
},
"ThreadSource": {
"type": "string"
},
"ThreadSummary": {
"description": "Persisted metadata needed to render and order a thread catalog row.",
"properties": {
"agentNickname": {
"type": [
"string",
"null"
]
},
"agentRole": {
"type": [
"string",
"null"
]
},
"archivedAt": {
"format": "int64",
"type": [
"integer",
"null"
]
},
"createdAt": {
"format": "int64",
"type": "integer"
},
"createdAtMs": {
"format": "int64",
"type": "integer"
},
"cwd": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"forkedFromId": {
"type": [
"string",
"null"
]
},
"gitInfo": {
"anyOf": [
{
"$ref": "#/definitions/GitInfo"
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"modelProvider": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"parentThreadId": {
"type": [
"string",
"null"
]
},
"preview": {
"type": "string"
},
"recencyAt": {
"format": "int64",
"type": [
"integer",
"null"
]
},
"recencyAtMs": {
"format": "int64",
"type": [
"integer",
"null"
]
},
"source": {
"$ref": "#/definitions/SessionSource"
},
"threadSource": {
"anyOf": [
{
"$ref": "#/definitions/ThreadSource"
},
{
"type": "null"
}
]
},
"updatedAt": {
"format": "int64",
"type": "integer"
},
"updatedAtMs": {
"format": "int64",
"type": "integer"
}
},
"required": [
"createdAt",
"createdAtMs",
"cwd",
"id",
"modelProvider",
"preview",
"source",
"updatedAt",
"updatedAtMs"
],
"type": "object"
}
},
"oneOf": [
{
"properties": {
"thread": {
"$ref": "#/definitions/ThreadSummary"
},
"type": {
"enum": [
"upsert"
],
"title": "Upsertv2::ThreadCatalogChangedNotificationType",
"type": "string"
}
},
"required": [
"thread",
"type"
],
"title": "Upsertv2::ThreadCatalogChangedNotification",
"type": "object"
},
{
"properties": {
"threadId": {
"type": "string"
},
"type": {
"enum": [
"delete"
],
"title": "Deletev2::ThreadCatalogChangedNotificationType",
"type": "string"
}
},
"required": [
"threadId",
"type"
],
"title": "Deletev2::ThreadCatalogChangedNotification",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"invalidate"
],
"title": "Invalidatev2::ThreadCatalogChangedNotificationType",
"type": "string"
}
},
"required": [
"type"
],
"title": "Invalidatev2::ThreadCatalogChangedNotification",
"type": "object"
}
],
"title": "ThreadCatalogChangedNotification"
}
@@ -0,0 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ThreadCatalogSubscribeResponse",
"type": "object"
}