diff --git a/codex-rs/app-server-protocol/schema/json/ClientRequest.json b/codex-rs/app-server-protocol/schema/json/ClientRequest.json index 6351993046..f90aee1853 100644 --- a/codex-rs/app-server-protocol/schema/json/ClientRequest.json +++ b/codex-rs/app-server-protocol/schema/json/ClientRequest.json @@ -4397,6 +4397,79 @@ "mode" ], "type": "object" + }, + "ThreadArtifactCreateParams": { + "properties": { + "artifact": { + "$ref": "#/definitions/ThreadArtifactWriteParams" + }, + "threadId": { + "type": "string" + } + }, + "required": [ + "artifact", + "threadId" + ], + "type": "object" + }, + "ThreadArtifactDeleteParams": { + "properties": { + "artifactId": { + "type": "string" + }, + "threadId": { + "type": "string" + } + }, + "required": [ + "artifactId", + "threadId" + ], + "type": "object" + }, + "ThreadArtifactListParams": { + "properties": { + "threadId": { + "type": "string" + } + }, + "required": [ + "threadId" + ], + "type": "object" + }, + "ThreadArtifactUpdateParams": { + "properties": { + "artifact": { + "$ref": "#/definitions/ThreadArtifactWriteParams" + }, + "artifactId": { + "type": "string" + }, + "threadId": { + "type": "string" + } + }, + "required": [ + "artifact", + "artifactId", + "threadId" + ], + "type": "object" + }, + "ThreadArtifactWriteParams": { + "properties": { + "artifactType": { + "type": "string" + }, + "payload": true + }, + "required": [ + "artifactType", + "payload" + ], + "type": "object" } }, "description": "Request from the client to the server.", @@ -6201,7 +6274,103 @@ ], "title": "FuzzyFileSearchRequest", "type": "object" + }, + { + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "enum": [ + "thread/artifact/list" + ], + "title": "Thread/artifact/listRequestMethod", + "type": "string" + }, + "params": { + "$ref": "#/definitions/ThreadArtifactListParams" + } + }, + "required": [ + "id", + "method", + "params" + ], + "title": "Thread/artifact/listRequest", + "type": "object" + }, + { + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "enum": [ + "thread/artifact/create" + ], + "title": "Thread/artifact/createRequestMethod", + "type": "string" + }, + "params": { + "$ref": "#/definitions/ThreadArtifactCreateParams" + } + }, + "required": [ + "id", + "method", + "params" + ], + "title": "Thread/artifact/createRequest", + "type": "object" + }, + { + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "enum": [ + "thread/artifact/update" + ], + "title": "Thread/artifact/updateRequestMethod", + "type": "string" + }, + "params": { + "$ref": "#/definitions/ThreadArtifactUpdateParams" + } + }, + "required": [ + "id", + "method", + "params" + ], + "title": "Thread/artifact/updateRequest", + "type": "object" + }, + { + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "enum": [ + "thread/artifact/delete" + ], + "title": "Thread/artifact/deleteRequestMethod", + "type": "string" + }, + "params": { + "$ref": "#/definitions/ThreadArtifactDeleteParams" + } + }, + "required": [ + "id", + "method", + "params" + ], + "title": "Thread/artifact/deleteRequest", + "type": "object" } ], "title": "ClientRequest" -} \ No newline at end of file +} diff --git a/codex-rs/app-server-protocol/schema/json/ServerNotification.json b/codex-rs/app-server-protocol/schema/json/ServerNotification.json index 6af19f89e2..43add3bb30 100644 --- a/codex-rs/app-server-protocol/schema/json/ServerNotification.json +++ b/codex-rs/app-server-protocol/schema/json/ServerNotification.json @@ -3138,6 +3138,16 @@ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64", "type": "integer" + }, + "artifacts": { + "description": "Model-managed artifacts associated with the thread.", + "items": { + "$ref": "#/definitions/ThreadArtifact" + }, + "type": [ + "array", + "null" + ] } }, "required": [ @@ -4848,6 +4858,52 @@ "samplePaths" ], "type": "object" + }, + "ThreadArtifact": { + "properties": { + "artifactType": { + "type": "string" + }, + "createdAt": { + "format": "int64", + "type": "integer" + }, + "id": { + "type": "string" + }, + "payload": true + }, + "required": [ + "artifactType", + "createdAt", + "id", + "payload" + ], + "type": "object" + }, + "ThreadArtifactsUpdatedNotification": { + "properties": { + "artifacts": { + "items": { + "$ref": "#/definitions/ThreadArtifact" + }, + "type": "array" + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "artifacts", + "threadId" + ], + "type": "object" } }, "description": "Notification sent from the server to the client.", @@ -6119,7 +6175,27 @@ ], "title": "Account/login/completedNotification", "type": "object" + }, + { + "properties": { + "method": { + "enum": [ + "thread/artifacts/updated" + ], + "title": "Thread/artifacts/updatedNotificationMethod", + "type": "string" + }, + "params": { + "$ref": "#/definitions/ThreadArtifactsUpdatedNotification" + } + }, + "required": [ + "method", + "params" + ], + "title": "Thread/artifacts/updatedNotification", + "type": "object" } ], "title": "ServerNotification" -} \ No newline at end of file +} diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json index 215842d929..c069ca7ac3 100644 --- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json +++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json @@ -2003,6 +2003,102 @@ ], "title": "FuzzyFileSearchRequest", "type": "object" + }, + { + "properties": { + "id": { + "$ref": "#/definitions/v2/RequestId" + }, + "method": { + "enum": [ + "thread/artifact/list" + ], + "title": "Thread/artifact/listRequestMethod", + "type": "string" + }, + "params": { + "$ref": "#/definitions/v2/ThreadArtifactListParams" + } + }, + "required": [ + "id", + "method", + "params" + ], + "title": "Thread/artifact/listRequest", + "type": "object" + }, + { + "properties": { + "id": { + "$ref": "#/definitions/v2/RequestId" + }, + "method": { + "enum": [ + "thread/artifact/create" + ], + "title": "Thread/artifact/createRequestMethod", + "type": "string" + }, + "params": { + "$ref": "#/definitions/v2/ThreadArtifactCreateParams" + } + }, + "required": [ + "id", + "method", + "params" + ], + "title": "Thread/artifact/createRequest", + "type": "object" + }, + { + "properties": { + "id": { + "$ref": "#/definitions/v2/RequestId" + }, + "method": { + "enum": [ + "thread/artifact/update" + ], + "title": "Thread/artifact/updateRequestMethod", + "type": "string" + }, + "params": { + "$ref": "#/definitions/v2/ThreadArtifactUpdateParams" + } + }, + "required": [ + "id", + "method", + "params" + ], + "title": "Thread/artifact/updateRequest", + "type": "object" + }, + { + "properties": { + "id": { + "$ref": "#/definitions/v2/RequestId" + }, + "method": { + "enum": [ + "thread/artifact/delete" + ], + "title": "Thread/artifact/deleteRequestMethod", + "type": "string" + }, + "params": { + "$ref": "#/definitions/v2/ThreadArtifactDeleteParams" + } + }, + "required": [ + "id", + "method", + "params" + ], + "title": "Thread/artifact/deleteRequest", + "type": "object" } ], "title": "ClientRequest" @@ -5049,6 +5145,26 @@ ], "title": "Account/login/completedNotification", "type": "object" + }, + { + "properties": { + "method": { + "enum": [ + "thread/artifacts/updated" + ], + "title": "Thread/artifacts/updatedNotificationMethod", + "type": "string" + }, + "params": { + "$ref": "#/definitions/v2/ThreadArtifactsUpdatedNotification" + } + }, + "required": [ + "method", + "params" + ], + "title": "Thread/artifacts/updatedNotification", + "type": "object" } ], "title": "ServerNotification" @@ -15201,6 +15317,16 @@ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64", "type": "integer" + }, + "artifacts": { + "description": "Model-managed artifacts associated with the thread.", + "items": { + "$ref": "#/definitions/v2/ThreadArtifact" + }, + "type": [ + "array", + "null" + ] } }, "required": [ @@ -18488,9 +18614,185 @@ "okOverridden" ], "type": "string" + }, + "ThreadArtifact": { + "properties": { + "artifactType": { + "type": "string" + }, + "createdAt": { + "format": "int64", + "type": "integer" + }, + "id": { + "type": "string" + }, + "payload": true + }, + "required": [ + "artifactType", + "createdAt", + "id", + "payload" + ], + "type": "object" + }, + "ThreadArtifactCreateParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "artifact": { + "$ref": "#/definitions/v2/ThreadArtifactWriteParams" + }, + "threadId": { + "type": "string" + } + }, + "required": [ + "artifact", + "threadId" + ], + "title": "ThreadArtifactCreateParams", + "type": "object" + }, + "ThreadArtifactCreateResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "artifact": { + "$ref": "#/definitions/v2/ThreadArtifact" + } + }, + "required": [ + "artifact" + ], + "title": "ThreadArtifactCreateResponse", + "type": "object" + }, + "ThreadArtifactDeleteParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "artifactId": { + "type": "string" + }, + "threadId": { + "type": "string" + } + }, + "required": [ + "artifactId", + "threadId" + ], + "title": "ThreadArtifactDeleteParams", + "type": "object" + }, + "ThreadArtifactDeleteResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadArtifactDeleteResponse", + "type": "object" + }, + "ThreadArtifactListParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "threadId": { + "type": "string" + } + }, + "required": [ + "threadId" + ], + "title": "ThreadArtifactListParams", + "type": "object" + }, + "ThreadArtifactListResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "artifacts": { + "items": { + "$ref": "#/definitions/v2/ThreadArtifact" + }, + "type": "array" + } + }, + "required": [ + "artifacts" + ], + "title": "ThreadArtifactListResponse", + "type": "object" + }, + "ThreadArtifactUpdateParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "artifact": { + "$ref": "#/definitions/v2/ThreadArtifactWriteParams" + }, + "artifactId": { + "type": "string" + }, + "threadId": { + "type": "string" + } + }, + "required": [ + "artifact", + "artifactId", + "threadId" + ], + "title": "ThreadArtifactUpdateParams", + "type": "object" + }, + "ThreadArtifactUpdateResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "artifact": { + "$ref": "#/definitions/v2/ThreadArtifact" + } + }, + "required": [ + "artifact" + ], + "title": "ThreadArtifactUpdateResponse", + "type": "object" + }, + "ThreadArtifactWriteParams": { + "properties": { + "artifactType": { + "type": "string" + }, + "payload": true + }, + "required": [ + "artifactType", + "payload" + ], + "type": "object" + }, + "ThreadArtifactsUpdatedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "artifacts": { + "items": { + "$ref": "#/definitions/v2/ThreadArtifact" + }, + "type": "array" + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "artifacts", + "threadId" + ], + "title": "ThreadArtifactsUpdatedNotification", + "type": "object" } } }, "title": "CodexAppServerProtocol", "type": "object" -} \ No newline at end of file +} diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json index 085744e819..a45d74d291 100644 --- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json +++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json @@ -2743,6 +2743,102 @@ ], "title": "FuzzyFileSearchRequest", "type": "object" + }, + { + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "enum": [ + "thread/artifact/list" + ], + "title": "Thread/artifact/listRequestMethod", + "type": "string" + }, + "params": { + "$ref": "#/definitions/ThreadArtifactListParams" + } + }, + "required": [ + "id", + "method", + "params" + ], + "title": "Thread/artifact/listRequest", + "type": "object" + }, + { + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "enum": [ + "thread/artifact/create" + ], + "title": "Thread/artifact/createRequestMethod", + "type": "string" + }, + "params": { + "$ref": "#/definitions/ThreadArtifactCreateParams" + } + }, + "required": [ + "id", + "method", + "params" + ], + "title": "Thread/artifact/createRequest", + "type": "object" + }, + { + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "enum": [ + "thread/artifact/update" + ], + "title": "Thread/artifact/updateRequestMethod", + "type": "string" + }, + "params": { + "$ref": "#/definitions/ThreadArtifactUpdateParams" + } + }, + "required": [ + "id", + "method", + "params" + ], + "title": "Thread/artifact/updateRequest", + "type": "object" + }, + { + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "enum": [ + "thread/artifact/delete" + ], + "title": "Thread/artifact/deleteRequestMethod", + "type": "string" + }, + "params": { + "$ref": "#/definitions/ThreadArtifactDeleteParams" + } + }, + "required": [ + "id", + "method", + "params" + ], + "title": "Thread/artifact/deleteRequest", + "type": "object" } ], "title": "ClientRequest" @@ -12277,6 +12373,26 @@ ], "title": "Account/login/completedNotification", "type": "object" + }, + { + "properties": { + "method": { + "enum": [ + "thread/artifacts/updated" + ], + "title": "Thread/artifacts/updatedNotificationMethod", + "type": "string" + }, + "params": { + "$ref": "#/definitions/ThreadArtifactsUpdatedNotification" + } + }, + "required": [ + "method", + "params" + ], + "title": "Thread/artifacts/updatedNotification", + "type": "object" } ], "title": "ServerNotification" @@ -13025,6 +13141,16 @@ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64", "type": "integer" + }, + "artifacts": { + "description": "Model-managed artifacts associated with the thread.", + "items": { + "$ref": "#/definitions/ThreadArtifact" + }, + "type": [ + "array", + "null" + ] } }, "required": [ @@ -16312,8 +16438,184 @@ "okOverridden" ], "type": "string" + }, + "ThreadArtifact": { + "properties": { + "artifactType": { + "type": "string" + }, + "createdAt": { + "format": "int64", + "type": "integer" + }, + "id": { + "type": "string" + }, + "payload": true + }, + "required": [ + "artifactType", + "createdAt", + "id", + "payload" + ], + "type": "object" + }, + "ThreadArtifactCreateParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "artifact": { + "$ref": "#/definitions/ThreadArtifactWriteParams" + }, + "threadId": { + "type": "string" + } + }, + "required": [ + "artifact", + "threadId" + ], + "title": "ThreadArtifactCreateParams", + "type": "object" + }, + "ThreadArtifactCreateResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "artifact": { + "$ref": "#/definitions/ThreadArtifact" + } + }, + "required": [ + "artifact" + ], + "title": "ThreadArtifactCreateResponse", + "type": "object" + }, + "ThreadArtifactDeleteParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "artifactId": { + "type": "string" + }, + "threadId": { + "type": "string" + } + }, + "required": [ + "artifactId", + "threadId" + ], + "title": "ThreadArtifactDeleteParams", + "type": "object" + }, + "ThreadArtifactDeleteResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadArtifactDeleteResponse", + "type": "object" + }, + "ThreadArtifactListParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "threadId": { + "type": "string" + } + }, + "required": [ + "threadId" + ], + "title": "ThreadArtifactListParams", + "type": "object" + }, + "ThreadArtifactListResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "artifacts": { + "items": { + "$ref": "#/definitions/ThreadArtifact" + }, + "type": "array" + } + }, + "required": [ + "artifacts" + ], + "title": "ThreadArtifactListResponse", + "type": "object" + }, + "ThreadArtifactUpdateParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "artifact": { + "$ref": "#/definitions/ThreadArtifactWriteParams" + }, + "artifactId": { + "type": "string" + }, + "threadId": { + "type": "string" + } + }, + "required": [ + "artifact", + "artifactId", + "threadId" + ], + "title": "ThreadArtifactUpdateParams", + "type": "object" + }, + "ThreadArtifactUpdateResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "artifact": { + "$ref": "#/definitions/ThreadArtifact" + } + }, + "required": [ + "artifact" + ], + "title": "ThreadArtifactUpdateResponse", + "type": "object" + }, + "ThreadArtifactWriteParams": { + "properties": { + "artifactType": { + "type": "string" + }, + "payload": true + }, + "required": [ + "artifactType", + "payload" + ], + "type": "object" + }, + "ThreadArtifactsUpdatedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "artifacts": { + "items": { + "$ref": "#/definitions/ThreadArtifact" + }, + "type": "array" + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "artifacts", + "threadId" + ], + "title": "ThreadArtifactsUpdatedNotification", + "type": "object" } }, "title": "CodexAppServerProtocolV2", "type": "object" -} \ No newline at end of file +} diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactCreateParams.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactCreateParams.json new file mode 100644 index 0000000000..cd20a613f1 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactCreateParams.json @@ -0,0 +1,32 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "ThreadArtifactWriteParams": { + "properties": { + "artifactType": { + "type": "string" + }, + "payload": true + }, + "required": [ + "artifactType", + "payload" + ], + "type": "object" + } + }, + "properties": { + "artifact": { + "$ref": "#/definitions/ThreadArtifactWriteParams" + }, + "threadId": { + "type": "string" + } + }, + "required": [ + "artifact", + "threadId" + ], + "title": "ThreadArtifactCreateParams", + "type": "object" +} \ No newline at end of file diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactCreateResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactCreateResponse.json new file mode 100644 index 0000000000..61d2ab5271 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactCreateResponse.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "ThreadArtifact": { + "properties": { + "artifactType": { + "type": "string" + }, + "createdAt": { + "format": "int64", + "type": "integer" + }, + "id": { + "type": "string" + }, + "payload": true + }, + "required": [ + "artifactType", + "createdAt", + "id", + "payload" + ], + "type": "object" + } + }, + "properties": { + "artifact": { + "$ref": "#/definitions/ThreadArtifact" + } + }, + "required": [ + "artifact" + ], + "title": "ThreadArtifactCreateResponse", + "type": "object" +} \ No newline at end of file diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactDeleteParams.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactDeleteParams.json new file mode 100644 index 0000000000..cdc698598e --- /dev/null +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactDeleteParams.json @@ -0,0 +1,17 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "artifactId": { + "type": "string" + }, + "threadId": { + "type": "string" + } + }, + "required": [ + "artifactId", + "threadId" + ], + "title": "ThreadArtifactDeleteParams", + "type": "object" +} \ No newline at end of file diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactDeleteResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactDeleteResponse.json new file mode 100644 index 0000000000..652a8fc215 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactDeleteResponse.json @@ -0,0 +1,5 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadArtifactDeleteResponse", + "type": "object" +} \ No newline at end of file diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactListParams.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactListParams.json new file mode 100644 index 0000000000..3e84c2d4fd --- /dev/null +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactListParams.json @@ -0,0 +1,13 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "threadId": { + "type": "string" + } + }, + "required": [ + "threadId" + ], + "title": "ThreadArtifactListParams", + "type": "object" +} \ No newline at end of file diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactListResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactListResponse.json new file mode 100644 index 0000000000..763a001359 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactListResponse.json @@ -0,0 +1,40 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "ThreadArtifact": { + "properties": { + "artifactType": { + "type": "string" + }, + "createdAt": { + "format": "int64", + "type": "integer" + }, + "id": { + "type": "string" + }, + "payload": true + }, + "required": [ + "artifactType", + "createdAt", + "id", + "payload" + ], + "type": "object" + } + }, + "properties": { + "artifacts": { + "items": { + "$ref": "#/definitions/ThreadArtifact" + }, + "type": "array" + } + }, + "required": [ + "artifacts" + ], + "title": "ThreadArtifactListResponse", + "type": "object" +} \ No newline at end of file diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactUpdateParams.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactUpdateParams.json new file mode 100644 index 0000000000..f5f1d89f7e --- /dev/null +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactUpdateParams.json @@ -0,0 +1,36 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "ThreadArtifactWriteParams": { + "properties": { + "artifactType": { + "type": "string" + }, + "payload": true + }, + "required": [ + "artifactType", + "payload" + ], + "type": "object" + } + }, + "properties": { + "artifact": { + "$ref": "#/definitions/ThreadArtifactWriteParams" + }, + "artifactId": { + "type": "string" + }, + "threadId": { + "type": "string" + } + }, + "required": [ + "artifact", + "artifactId", + "threadId" + ], + "title": "ThreadArtifactUpdateParams", + "type": "object" +} \ No newline at end of file diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactUpdateResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactUpdateResponse.json new file mode 100644 index 0000000000..0c477ce43c --- /dev/null +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactUpdateResponse.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "ThreadArtifact": { + "properties": { + "artifactType": { + "type": "string" + }, + "createdAt": { + "format": "int64", + "type": "integer" + }, + "id": { + "type": "string" + }, + "payload": true + }, + "required": [ + "artifactType", + "createdAt", + "id", + "payload" + ], + "type": "object" + } + }, + "properties": { + "artifact": { + "$ref": "#/definitions/ThreadArtifact" + } + }, + "required": [ + "artifact" + ], + "title": "ThreadArtifactUpdateResponse", + "type": "object" +} \ No newline at end of file diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactsUpdatedNotification.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactsUpdatedNotification.json new file mode 100644 index 0000000000..3eda357616 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadArtifactsUpdatedNotification.json @@ -0,0 +1,50 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "ThreadArtifact": { + "properties": { + "artifactType": { + "type": "string" + }, + "createdAt": { + "format": "int64", + "type": "integer" + }, + "id": { + "type": "string" + }, + "payload": true + }, + "required": [ + "artifactType", + "createdAt", + "id", + "payload" + ], + "type": "object" + } + }, + "properties": { + "artifacts": { + "items": { + "$ref": "#/definitions/ThreadArtifact" + }, + "type": "array" + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "artifacts", + "threadId" + ], + "title": "ThreadArtifactsUpdatedNotification", + "type": "object" +} \ No newline at end of file diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json index 6e74ab4ac8..269c70b0d3 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json @@ -1438,6 +1438,16 @@ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64", "type": "integer" + }, + "artifacts": { + "description": "Model-managed artifacts associated with the thread.", + "items": { + "$ref": "#/definitions/ThreadArtifact" + }, + "type": [ + "array", + "null" + ] } }, "required": [ @@ -2558,6 +2568,28 @@ "type": "object" } ] + }, + "ThreadArtifact": { + "properties": { + "artifactType": { + "type": "string" + }, + "createdAt": { + "format": "int64", + "type": "integer" + }, + "id": { + "type": "string" + }, + "payload": true + }, + "required": [ + "artifactType", + "createdAt", + "id", + "payload" + ], + "type": "object" } }, "properties": { @@ -2628,4 +2660,4 @@ ], "title": "ThreadForkResponse", "type": "object" -} \ No newline at end of file +} diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadListResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadListResponse.json index f78fbaf27e..e08256d0a6 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadListResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadListResponse.json @@ -895,6 +895,16 @@ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64", "type": "integer" + }, + "artifacts": { + "description": "Model-managed artifacts associated with the thread.", + "items": { + "$ref": "#/definitions/ThreadArtifact" + }, + "type": [ + "array", + "null" + ] } }, "required": [ @@ -2015,6 +2025,28 @@ "type": "object" } ] + }, + "ThreadArtifact": { + "properties": { + "artifactType": { + "type": "string" + }, + "createdAt": { + "format": "int64", + "type": "integer" + }, + "id": { + "type": "string" + }, + "payload": true + }, + "required": [ + "artifactType", + "createdAt", + "id", + "payload" + ], + "type": "object" } }, "properties": { @@ -2044,4 +2076,4 @@ ], "title": "ThreadListResponse", "type": "object" -} \ No newline at end of file +} diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadMetadataUpdateResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadMetadataUpdateResponse.json index 4268ad203a..69a38baf78 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadMetadataUpdateResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadMetadataUpdateResponse.json @@ -895,6 +895,16 @@ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64", "type": "integer" + }, + "artifacts": { + "description": "Model-managed artifacts associated with the thread.", + "items": { + "$ref": "#/definitions/ThreadArtifact" + }, + "type": [ + "array", + "null" + ] } }, "required": [ @@ -2015,6 +2025,28 @@ "type": "object" } ] + }, + "ThreadArtifact": { + "properties": { + "artifactType": { + "type": "string" + }, + "createdAt": { + "format": "int64", + "type": "integer" + }, + "id": { + "type": "string" + }, + "payload": true + }, + "required": [ + "artifactType", + "createdAt", + "id", + "payload" + ], + "type": "object" } }, "properties": { @@ -2027,4 +2059,4 @@ ], "title": "ThreadMetadataUpdateResponse", "type": "object" -} \ No newline at end of file +} diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadReadResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadReadResponse.json index fb0d80a047..3f6cd7754f 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadReadResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadReadResponse.json @@ -895,6 +895,16 @@ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64", "type": "integer" + }, + "artifacts": { + "description": "Model-managed artifacts associated with the thread.", + "items": { + "$ref": "#/definitions/ThreadArtifact" + }, + "type": [ + "array", + "null" + ] } }, "required": [ @@ -2015,6 +2025,28 @@ "type": "object" } ] + }, + "ThreadArtifact": { + "properties": { + "artifactType": { + "type": "string" + }, + "createdAt": { + "format": "int64", + "type": "integer" + }, + "id": { + "type": "string" + }, + "payload": true + }, + "required": [ + "artifactType", + "createdAt", + "id", + "payload" + ], + "type": "object" } }, "properties": { @@ -2027,4 +2059,4 @@ ], "title": "ThreadReadResponse", "type": "object" -} \ No newline at end of file +} diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json index 727b7a3fb2..e80139139d 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json @@ -1438,6 +1438,16 @@ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64", "type": "integer" + }, + "artifacts": { + "description": "Model-managed artifacts associated with the thread.", + "items": { + "$ref": "#/definitions/ThreadArtifact" + }, + "type": [ + "array", + "null" + ] } }, "required": [ @@ -2558,6 +2568,28 @@ "type": "object" } ] + }, + "ThreadArtifact": { + "properties": { + "artifactType": { + "type": "string" + }, + "createdAt": { + "format": "int64", + "type": "integer" + }, + "id": { + "type": "string" + }, + "payload": true + }, + "required": [ + "artifactType", + "createdAt", + "id", + "payload" + ], + "type": "object" } }, "properties": { @@ -2628,4 +2660,4 @@ ], "title": "ThreadResumeResponse", "type": "object" -} \ No newline at end of file +} diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadRollbackResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadRollbackResponse.json index 204828c732..e77e4b1513 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadRollbackResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadRollbackResponse.json @@ -895,6 +895,16 @@ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64", "type": "integer" + }, + "artifacts": { + "description": "Model-managed artifacts associated with the thread.", + "items": { + "$ref": "#/definitions/ThreadArtifact" + }, + "type": [ + "array", + "null" + ] } }, "required": [ @@ -2015,6 +2025,28 @@ "type": "object" } ] + }, + "ThreadArtifact": { + "properties": { + "artifactType": { + "type": "string" + }, + "createdAt": { + "format": "int64", + "type": "integer" + }, + "id": { + "type": "string" + }, + "payload": true + }, + "required": [ + "artifactType", + "createdAt", + "id", + "payload" + ], + "type": "object" } }, "properties": { @@ -2032,4 +2064,4 @@ ], "title": "ThreadRollbackResponse", "type": "object" -} \ No newline at end of file +} diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json index bf03f0fb55..e142d45f3e 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json @@ -1438,6 +1438,16 @@ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64", "type": "integer" + }, + "artifacts": { + "description": "Model-managed artifacts associated with the thread.", + "items": { + "$ref": "#/definitions/ThreadArtifact" + }, + "type": [ + "array", + "null" + ] } }, "required": [ @@ -2558,6 +2568,28 @@ "type": "object" } ] + }, + "ThreadArtifact": { + "properties": { + "artifactType": { + "type": "string" + }, + "createdAt": { + "format": "int64", + "type": "integer" + }, + "id": { + "type": "string" + }, + "payload": true + }, + "required": [ + "artifactType", + "createdAt", + "id", + "payload" + ], + "type": "object" } }, "properties": { @@ -2628,4 +2660,4 @@ ], "title": "ThreadStartResponse", "type": "object" -} \ No newline at end of file +} diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadStartedNotification.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadStartedNotification.json index 759b5990be..82eb3aa502 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadStartedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadStartedNotification.json @@ -895,6 +895,16 @@ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64", "type": "integer" + }, + "artifacts": { + "description": "Model-managed artifacts associated with the thread.", + "items": { + "$ref": "#/definitions/ThreadArtifact" + }, + "type": [ + "array", + "null" + ] } }, "required": [ @@ -2015,6 +2025,28 @@ "type": "object" } ] + }, + "ThreadArtifact": { + "properties": { + "artifactType": { + "type": "string" + }, + "createdAt": { + "format": "int64", + "type": "integer" + }, + "id": { + "type": "string" + }, + "payload": true + }, + "required": [ + "artifactType", + "createdAt", + "id", + "payload" + ], + "type": "object" } }, "properties": { @@ -2027,4 +2059,4 @@ ], "title": "ThreadStartedNotification", "type": "object" -} \ No newline at end of file +} diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadUnarchiveResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadUnarchiveResponse.json index f64400129a..66d634e2f5 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadUnarchiveResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadUnarchiveResponse.json @@ -895,6 +895,16 @@ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64", "type": "integer" + }, + "artifacts": { + "description": "Model-managed artifacts associated with the thread.", + "items": { + "$ref": "#/definitions/ThreadArtifact" + }, + "type": [ + "array", + "null" + ] } }, "required": [ @@ -2015,6 +2025,28 @@ "type": "object" } ] + }, + "ThreadArtifact": { + "properties": { + "artifactType": { + "type": "string" + }, + "createdAt": { + "format": "int64", + "type": "integer" + }, + "id": { + "type": "string" + }, + "payload": true + }, + "required": [ + "artifactType", + "createdAt", + "id", + "payload" + ], + "type": "object" } }, "properties": { @@ -2027,4 +2059,4 @@ ], "title": "ThreadUnarchiveResponse", "type": "object" -} \ No newline at end of file +} diff --git a/codex-rs/app-server-protocol/schema/typescript/ClientRequest.ts b/codex-rs/app-server-protocol/schema/typescript/ClientRequest.ts index a12185b501..c3a679f44d 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ClientRequest.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ClientRequest.ts @@ -57,6 +57,10 @@ import type { SkillsConfigWriteParams } from "./v2/SkillsConfigWriteParams"; import type { SkillsListParams } from "./v2/SkillsListParams"; import type { ThreadApproveGuardianDeniedActionParams } from "./v2/ThreadApproveGuardianDeniedActionParams"; import type { ThreadArchiveParams } from "./v2/ThreadArchiveParams"; +import type { ThreadArtifactCreateParams } from "./v2/ThreadArtifactCreateParams"; +import type { ThreadArtifactDeleteParams } from "./v2/ThreadArtifactDeleteParams"; +import type { ThreadArtifactListParams } from "./v2/ThreadArtifactListParams"; +import type { ThreadArtifactUpdateParams } from "./v2/ThreadArtifactUpdateParams"; import type { ThreadCompactStartParams } from "./v2/ThreadCompactStartParams"; import type { ThreadForkParams } from "./v2/ThreadForkParams"; import type { ThreadInjectItemsParams } from "./v2/ThreadInjectItemsParams"; @@ -79,4 +83,4 @@ import type { WindowsSandboxSetupStartParams } from "./v2/WindowsSandboxSetupSta /** * Request from the client to the server. */ -export type ClientRequest ={ "method": "initialize", id: RequestId, params: InitializeParams, } | { "method": "thread/start", id: RequestId, params: ThreadStartParams, } | { "method": "thread/resume", id: RequestId, params: ThreadResumeParams, } | { "method": "thread/fork", id: RequestId, params: ThreadForkParams, } | { "method": "thread/archive", id: RequestId, params: ThreadArchiveParams, } | { "method": "thread/unsubscribe", id: RequestId, params: ThreadUnsubscribeParams, } | { "method": "thread/name/set", id: RequestId, params: ThreadSetNameParams, } | { "method": "thread/metadata/update", id: RequestId, params: ThreadMetadataUpdateParams, } | { "method": "thread/unarchive", id: RequestId, params: ThreadUnarchiveParams, } | { "method": "thread/compact/start", id: RequestId, params: ThreadCompactStartParams, } | { "method": "thread/shellCommand", id: RequestId, params: ThreadShellCommandParams, } | { "method": "thread/approveGuardianDeniedAction", id: RequestId, params: ThreadApproveGuardianDeniedActionParams, } | { "method": "thread/rollback", id: RequestId, params: ThreadRollbackParams, } | { "method": "thread/list", id: RequestId, params: ThreadListParams, } | { "method": "thread/loaded/list", id: RequestId, params: ThreadLoadedListParams, } | { "method": "thread/read", id: RequestId, params: ThreadReadParams, } | { "method": "thread/inject_items", id: RequestId, params: ThreadInjectItemsParams, } | { "method": "skills/list", id: RequestId, params: SkillsListParams, } | { "method": "hooks/list", id: RequestId, params: HooksListParams, } | { "method": "marketplace/add", id: RequestId, params: MarketplaceAddParams, } | { "method": "marketplace/remove", id: RequestId, params: MarketplaceRemoveParams, } | { "method": "marketplace/upgrade", id: RequestId, params: MarketplaceUpgradeParams, } | { "method": "plugin/list", id: RequestId, params: PluginListParams, } | { "method": "plugin/read", id: RequestId, params: PluginReadParams, } | { "method": "plugin/skill/read", id: RequestId, params: PluginSkillReadParams, } | { "method": "plugin/share/save", id: RequestId, params: PluginShareSaveParams, } | { "method": "plugin/share/updateTargets", id: RequestId, params: PluginShareUpdateTargetsParams, } | { "method": "plugin/share/list", id: RequestId, params: PluginShareListParams, } | { "method": "plugin/share/delete", id: RequestId, params: PluginShareDeleteParams, } | { "method": "app/list", id: RequestId, params: AppsListParams, } | { "method": "fs/readFile", id: RequestId, params: FsReadFileParams, } | { "method": "fs/writeFile", id: RequestId, params: FsWriteFileParams, } | { "method": "fs/createDirectory", id: RequestId, params: FsCreateDirectoryParams, } | { "method": "fs/getMetadata", id: RequestId, params: FsGetMetadataParams, } | { "method": "fs/readDirectory", id: RequestId, params: FsReadDirectoryParams, } | { "method": "fs/remove", id: RequestId, params: FsRemoveParams, } | { "method": "fs/copy", id: RequestId, params: FsCopyParams, } | { "method": "fs/watch", id: RequestId, params: FsWatchParams, } | { "method": "fs/unwatch", id: RequestId, params: FsUnwatchParams, } | { "method": "skills/config/write", id: RequestId, params: SkillsConfigWriteParams, } | { "method": "plugin/install", id: RequestId, params: PluginInstallParams, } | { "method": "plugin/uninstall", id: RequestId, params: PluginUninstallParams, } | { "method": "turn/start", id: RequestId, params: TurnStartParams, } | { "method": "turn/steer", id: RequestId, params: TurnSteerParams, } | { "method": "turn/interrupt", id: RequestId, params: TurnInterruptParams, } | { "method": "review/start", id: RequestId, params: ReviewStartParams, } | { "method": "model/list", id: RequestId, params: ModelListParams, } | { "method": "modelProvider/capabilities/read", id: RequestId, params: ModelProviderCapabilitiesReadParams, } | { "method": "experimentalFeature/list", id: RequestId, params: ExperimentalFeatureListParams, } | { "method": "experimentalFeature/enablement/set", id: RequestId, params: ExperimentalFeatureEnablementSetParams, } | { "method": "mcpServer/oauth/login", id: RequestId, params: McpServerOauthLoginParams, } | { "method": "config/mcpServer/reload", id: RequestId, params: undefined, } | { "method": "mcpServerStatus/list", id: RequestId, params: ListMcpServerStatusParams, } | { "method": "mcpServer/resource/read", id: RequestId, params: McpResourceReadParams, } | { "method": "mcpServer/tool/call", id: RequestId, params: McpServerToolCallParams, } | { "method": "windowsSandbox/setupStart", id: RequestId, params: WindowsSandboxSetupStartParams, } | { "method": "windowsSandbox/readiness", id: RequestId, params: undefined, } | { "method": "account/login/start", id: RequestId, params: LoginAccountParams, } | { "method": "account/login/cancel", id: RequestId, params: CancelLoginAccountParams, } | { "method": "account/logout", id: RequestId, params: undefined, } | { "method": "account/rateLimits/read", id: RequestId, params: undefined, } | { "method": "account/sendAddCreditsNudgeEmail", id: RequestId, params: SendAddCreditsNudgeEmailParams, } | { "method": "feedback/upload", id: RequestId, params: FeedbackUploadParams, } | { "method": "command/exec", id: RequestId, params: CommandExecParams, } | { "method": "command/exec/write", id: RequestId, params: CommandExecWriteParams, } | { "method": "command/exec/terminate", id: RequestId, params: CommandExecTerminateParams, } | { "method": "command/exec/resize", id: RequestId, params: CommandExecResizeParams, } | { "method": "config/read", id: RequestId, params: ConfigReadParams, } | { "method": "externalAgentConfig/detect", id: RequestId, params: ExternalAgentConfigDetectParams, } | { "method": "externalAgentConfig/import", id: RequestId, params: ExternalAgentConfigImportParams, } | { "method": "config/value/write", id: RequestId, params: ConfigValueWriteParams, } | { "method": "config/batchWrite", id: RequestId, params: ConfigBatchWriteParams, } | { "method": "configRequirements/read", id: RequestId, params: undefined, } | { "method": "account/read", id: RequestId, params: GetAccountParams, } | { "method": "getConversationSummary", id: RequestId, params: GetConversationSummaryParams, } | { "method": "gitDiffToRemote", id: RequestId, params: GitDiffToRemoteParams, } | { "method": "getAuthStatus", id: RequestId, params: GetAuthStatusParams, } | { "method": "fuzzyFileSearch", id: RequestId, params: FuzzyFileSearchParams, }; +export type ClientRequest ={ "method": "initialize", id: RequestId, params: InitializeParams, } | { "method": "thread/start", id: RequestId, params: ThreadStartParams, } | { "method": "thread/resume", id: RequestId, params: ThreadResumeParams, } | { "method": "thread/fork", id: RequestId, params: ThreadForkParams, } | { "method": "thread/archive", id: RequestId, params: ThreadArchiveParams, } | { "method": "thread/unsubscribe", id: RequestId, params: ThreadUnsubscribeParams, } | { "method": "thread/name/set", id: RequestId, params: ThreadSetNameParams, } | { "method": "thread/metadata/update", id: RequestId, params: ThreadMetadataUpdateParams, } | { "method": "thread/artifact/list", id: RequestId, params: ThreadArtifactListParams, } | { "method": "thread/artifact/create", id: RequestId, params: ThreadArtifactCreateParams, } | { "method": "thread/artifact/update", id: RequestId, params: ThreadArtifactUpdateParams, } | { "method": "thread/artifact/delete", id: RequestId, params: ThreadArtifactDeleteParams, } | { "method": "thread/unarchive", id: RequestId, params: ThreadUnarchiveParams, } | { "method": "thread/compact/start", id: RequestId, params: ThreadCompactStartParams, } | { "method": "thread/shellCommand", id: RequestId, params: ThreadShellCommandParams, } | { "method": "thread/approveGuardianDeniedAction", id: RequestId, params: ThreadApproveGuardianDeniedActionParams, } | { "method": "thread/rollback", id: RequestId, params: ThreadRollbackParams, } | { "method": "thread/list", id: RequestId, params: ThreadListParams, } | { "method": "thread/loaded/list", id: RequestId, params: ThreadLoadedListParams, } | { "method": "thread/read", id: RequestId, params: ThreadReadParams, } | { "method": "thread/inject_items", id: RequestId, params: ThreadInjectItemsParams, } | { "method": "skills/list", id: RequestId, params: SkillsListParams, } | { "method": "hooks/list", id: RequestId, params: HooksListParams, } | { "method": "marketplace/add", id: RequestId, params: MarketplaceAddParams, } | { "method": "marketplace/remove", id: RequestId, params: MarketplaceRemoveParams, } | { "method": "marketplace/upgrade", id: RequestId, params: MarketplaceUpgradeParams, } | { "method": "plugin/list", id: RequestId, params: PluginListParams, } | { "method": "plugin/read", id: RequestId, params: PluginReadParams, } | { "method": "plugin/skill/read", id: RequestId, params: PluginSkillReadParams, } | { "method": "plugin/share/save", id: RequestId, params: PluginShareSaveParams, } | { "method": "plugin/share/updateTargets", id: RequestId, params: PluginShareUpdateTargetsParams, } | { "method": "plugin/share/list", id: RequestId, params: PluginShareListParams, } | { "method": "plugin/share/delete", id: RequestId, params: PluginShareDeleteParams, } | { "method": "app/list", id: RequestId, params: AppsListParams, } | { "method": "fs/readFile", id: RequestId, params: FsReadFileParams, } | { "method": "fs/writeFile", id: RequestId, params: FsWriteFileParams, } | { "method": "fs/createDirectory", id: RequestId, params: FsCreateDirectoryParams, } | { "method": "fs/getMetadata", id: RequestId, params: FsGetMetadataParams, } | { "method": "fs/readDirectory", id: RequestId, params: FsReadDirectoryParams, } | { "method": "fs/remove", id: RequestId, params: FsRemoveParams, } | { "method": "fs/copy", id: RequestId, params: FsCopyParams, } | { "method": "fs/watch", id: RequestId, params: FsWatchParams, } | { "method": "fs/unwatch", id: RequestId, params: FsUnwatchParams, } | { "method": "skills/config/write", id: RequestId, params: SkillsConfigWriteParams, } | { "method": "plugin/install", id: RequestId, params: PluginInstallParams, } | { "method": "plugin/uninstall", id: RequestId, params: PluginUninstallParams, } | { "method": "turn/start", id: RequestId, params: TurnStartParams, } | { "method": "turn/steer", id: RequestId, params: TurnSteerParams, } | { "method": "turn/interrupt", id: RequestId, params: TurnInterruptParams, } | { "method": "review/start", id: RequestId, params: ReviewStartParams, } | { "method": "model/list", id: RequestId, params: ModelListParams, } | { "method": "modelProvider/capabilities/read", id: RequestId, params: ModelProviderCapabilitiesReadParams, } | { "method": "experimentalFeature/list", id: RequestId, params: ExperimentalFeatureListParams, } | { "method": "experimentalFeature/enablement/set", id: RequestId, params: ExperimentalFeatureEnablementSetParams, } | { "method": "mcpServer/oauth/login", id: RequestId, params: McpServerOauthLoginParams, } | { "method": "config/mcpServer/reload", id: RequestId, params: undefined, } | { "method": "mcpServerStatus/list", id: RequestId, params: ListMcpServerStatusParams, } | { "method": "mcpServer/resource/read", id: RequestId, params: McpResourceReadParams, } | { "method": "mcpServer/tool/call", id: RequestId, params: McpServerToolCallParams, } | { "method": "windowsSandbox/setupStart", id: RequestId, params: WindowsSandboxSetupStartParams, } | { "method": "windowsSandbox/readiness", id: RequestId, params: undefined, } | { "method": "account/login/start", id: RequestId, params: LoginAccountParams, } | { "method": "account/login/cancel", id: RequestId, params: CancelLoginAccountParams, } | { "method": "account/logout", id: RequestId, params: undefined, } | { "method": "account/rateLimits/read", id: RequestId, params: undefined, } | { "method": "account/sendAddCreditsNudgeEmail", id: RequestId, params: SendAddCreditsNudgeEmailParams, } | { "method": "feedback/upload", id: RequestId, params: FeedbackUploadParams, } | { "method": "command/exec", id: RequestId, params: CommandExecParams, } | { "method": "command/exec/write", id: RequestId, params: CommandExecWriteParams, } | { "method": "command/exec/terminate", id: RequestId, params: CommandExecTerminateParams, } | { "method": "command/exec/resize", id: RequestId, params: CommandExecResizeParams, } | { "method": "config/read", id: RequestId, params: ConfigReadParams, } | { "method": "externalAgentConfig/detect", id: RequestId, params: ExternalAgentConfigDetectParams, } | { "method": "externalAgentConfig/import", id: RequestId, params: ExternalAgentConfigImportParams, } | { "method": "config/value/write", id: RequestId, params: ConfigValueWriteParams, } | { "method": "config/batchWrite", id: RequestId, params: ConfigBatchWriteParams, } | { "method": "configRequirements/read", id: RequestId, params: undefined, } | { "method": "account/read", id: RequestId, params: GetAccountParams, } | { "method": "getConversationSummary", id: RequestId, params: GetConversationSummaryParams, } | { "method": "gitDiffToRemote", id: RequestId, params: GitDiffToRemoteParams, } | { "method": "getAuthStatus", id: RequestId, params: GetAuthStatusParams, } | { "method": "fuzzyFileSearch", id: RequestId, params: FuzzyFileSearchParams, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/ServerNotification.ts b/codex-rs/app-server-protocol/schema/typescript/ServerNotification.ts index f4dd0e1864..5193d97135 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ServerNotification.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ServerNotification.ts @@ -42,6 +42,7 @@ import type { ServerRequestResolvedNotification } from "./v2/ServerRequestResolv import type { SkillsChangedNotification } from "./v2/SkillsChangedNotification"; import type { TerminalInteractionNotification } from "./v2/TerminalInteractionNotification"; import type { ThreadArchivedNotification } from "./v2/ThreadArchivedNotification"; +import type { ThreadArtifactsUpdatedNotification } from "./v2/ThreadArtifactsUpdatedNotification"; import type { ThreadClosedNotification } from "./v2/ThreadClosedNotification"; import type { ThreadGoalClearedNotification } from "./v2/ThreadGoalClearedNotification"; import type { ThreadGoalUpdatedNotification } from "./v2/ThreadGoalUpdatedNotification"; @@ -69,4 +70,4 @@ import type { WindowsWorldWritableWarningNotification } from "./v2/WindowsWorldW /** * Notification sent from the server to the client. */ -export type ServerNotification = { "method": "error", "params": ErrorNotification } | { "method": "thread/started", "params": ThreadStartedNotification } | { "method": "thread/status/changed", "params": ThreadStatusChangedNotification } | { "method": "thread/archived", "params": ThreadArchivedNotification } | { "method": "thread/unarchived", "params": ThreadUnarchivedNotification } | { "method": "thread/closed", "params": ThreadClosedNotification } | { "method": "skills/changed", "params": SkillsChangedNotification } | { "method": "thread/name/updated", "params": ThreadNameUpdatedNotification } | { "method": "thread/goal/updated", "params": ThreadGoalUpdatedNotification } | { "method": "thread/goal/cleared", "params": ThreadGoalClearedNotification } | { "method": "thread/tokenUsage/updated", "params": ThreadTokenUsageUpdatedNotification } | { "method": "turn/started", "params": TurnStartedNotification } | { "method": "hook/started", "params": HookStartedNotification } | { "method": "turn/completed", "params": TurnCompletedNotification } | { "method": "hook/completed", "params": HookCompletedNotification } | { "method": "turn/diff/updated", "params": TurnDiffUpdatedNotification } | { "method": "turn/plan/updated", "params": TurnPlanUpdatedNotification } | { "method": "item/started", "params": ItemStartedNotification } | { "method": "item/autoApprovalReview/started", "params": ItemGuardianApprovalReviewStartedNotification } | { "method": "item/autoApprovalReview/completed", "params": ItemGuardianApprovalReviewCompletedNotification } | { "method": "item/completed", "params": ItemCompletedNotification } | { "method": "rawResponseItem/completed", "params": RawResponseItemCompletedNotification } | { "method": "item/agentMessage/delta", "params": AgentMessageDeltaNotification } | { "method": "item/plan/delta", "params": PlanDeltaNotification } | { "method": "command/exec/outputDelta", "params": CommandExecOutputDeltaNotification } | { "method": "process/outputDelta", "params": ProcessOutputDeltaNotification } | { "method": "process/exited", "params": ProcessExitedNotification } | { "method": "item/commandExecution/outputDelta", "params": CommandExecutionOutputDeltaNotification } | { "method": "item/commandExecution/terminalInteraction", "params": TerminalInteractionNotification } | { "method": "item/fileChange/outputDelta", "params": FileChangeOutputDeltaNotification } | { "method": "item/fileChange/patchUpdated", "params": FileChangePatchUpdatedNotification } | { "method": "serverRequest/resolved", "params": ServerRequestResolvedNotification } | { "method": "item/mcpToolCall/progress", "params": McpToolCallProgressNotification } | { "method": "mcpServer/oauthLogin/completed", "params": McpServerOauthLoginCompletedNotification } | { "method": "mcpServer/startupStatus/updated", "params": McpServerStatusUpdatedNotification } | { "method": "account/updated", "params": AccountUpdatedNotification } | { "method": "account/rateLimits/updated", "params": AccountRateLimitsUpdatedNotification } | { "method": "app/list/updated", "params": AppListUpdatedNotification } | { "method": "remoteControl/status/changed", "params": RemoteControlStatusChangedNotification } | { "method": "externalAgentConfig/import/completed", "params": ExternalAgentConfigImportCompletedNotification } | { "method": "fs/changed", "params": FsChangedNotification } | { "method": "item/reasoning/summaryTextDelta", "params": ReasoningSummaryTextDeltaNotification } | { "method": "item/reasoning/summaryPartAdded", "params": ReasoningSummaryPartAddedNotification } | { "method": "item/reasoning/textDelta", "params": ReasoningTextDeltaNotification } | { "method": "thread/compacted", "params": ContextCompactedNotification } | { "method": "model/rerouted", "params": ModelReroutedNotification } | { "method": "model/verification", "params": ModelVerificationNotification } | { "method": "warning", "params": WarningNotification } | { "method": "guardianWarning", "params": GuardianWarningNotification } | { "method": "deprecationNotice", "params": DeprecationNoticeNotification } | { "method": "configWarning", "params": ConfigWarningNotification } | { "method": "fuzzyFileSearch/sessionUpdated", "params": FuzzyFileSearchSessionUpdatedNotification } | { "method": "fuzzyFileSearch/sessionCompleted", "params": FuzzyFileSearchSessionCompletedNotification } | { "method": "thread/realtime/started", "params": ThreadRealtimeStartedNotification } | { "method": "thread/realtime/itemAdded", "params": ThreadRealtimeItemAddedNotification } | { "method": "thread/realtime/transcript/delta", "params": ThreadRealtimeTranscriptDeltaNotification } | { "method": "thread/realtime/transcript/done", "params": ThreadRealtimeTranscriptDoneNotification } | { "method": "thread/realtime/outputAudio/delta", "params": ThreadRealtimeOutputAudioDeltaNotification } | { "method": "thread/realtime/sdp", "params": ThreadRealtimeSdpNotification } | { "method": "thread/realtime/error", "params": ThreadRealtimeErrorNotification } | { "method": "thread/realtime/closed", "params": ThreadRealtimeClosedNotification } | { "method": "windows/worldWritableWarning", "params": WindowsWorldWritableWarningNotification } | { "method": "windowsSandbox/setupCompleted", "params": WindowsSandboxSetupCompletedNotification } | { "method": "account/login/completed", "params": AccountLoginCompletedNotification }; +export type ServerNotification = { "method": "error", "params": ErrorNotification } | { "method": "thread/started", "params": ThreadStartedNotification } | { "method": "thread/status/changed", "params": ThreadStatusChangedNotification } | { "method": "thread/archived", "params": ThreadArchivedNotification } | { "method": "thread/unarchived", "params": ThreadUnarchivedNotification } | { "method": "thread/closed", "params": ThreadClosedNotification } | { "method": "skills/changed", "params": SkillsChangedNotification } | { "method": "thread/name/updated", "params": ThreadNameUpdatedNotification } | { "method": "thread/goal/updated", "params": ThreadGoalUpdatedNotification } | { "method": "thread/artifacts/updated", "params": ThreadArtifactsUpdatedNotification } | { "method": "thread/goal/cleared", "params": ThreadGoalClearedNotification } | { "method": "thread/tokenUsage/updated", "params": ThreadTokenUsageUpdatedNotification } | { "method": "turn/started", "params": TurnStartedNotification } | { "method": "hook/started", "params": HookStartedNotification } | { "method": "turn/completed", "params": TurnCompletedNotification } | { "method": "hook/completed", "params": HookCompletedNotification } | { "method": "turn/diff/updated", "params": TurnDiffUpdatedNotification } | { "method": "turn/plan/updated", "params": TurnPlanUpdatedNotification } | { "method": "item/started", "params": ItemStartedNotification } | { "method": "item/autoApprovalReview/started", "params": ItemGuardianApprovalReviewStartedNotification } | { "method": "item/autoApprovalReview/completed", "params": ItemGuardianApprovalReviewCompletedNotification } | { "method": "item/completed", "params": ItemCompletedNotification } | { "method": "rawResponseItem/completed", "params": RawResponseItemCompletedNotification } | { "method": "item/agentMessage/delta", "params": AgentMessageDeltaNotification } | { "method": "item/plan/delta", "params": PlanDeltaNotification } | { "method": "command/exec/outputDelta", "params": CommandExecOutputDeltaNotification } | { "method": "process/outputDelta", "params": ProcessOutputDeltaNotification } | { "method": "process/exited", "params": ProcessExitedNotification } | { "method": "item/commandExecution/outputDelta", "params": CommandExecutionOutputDeltaNotification } | { "method": "item/commandExecution/terminalInteraction", "params": TerminalInteractionNotification } | { "method": "item/fileChange/outputDelta", "params": FileChangeOutputDeltaNotification } | { "method": "item/fileChange/patchUpdated", "params": FileChangePatchUpdatedNotification } | { "method": "serverRequest/resolved", "params": ServerRequestResolvedNotification } | { "method": "item/mcpToolCall/progress", "params": McpToolCallProgressNotification } | { "method": "mcpServer/oauthLogin/completed", "params": McpServerOauthLoginCompletedNotification } | { "method": "mcpServer/startupStatus/updated", "params": McpServerStatusUpdatedNotification } | { "method": "account/updated", "params": AccountUpdatedNotification } | { "method": "account/rateLimits/updated", "params": AccountRateLimitsUpdatedNotification } | { "method": "app/list/updated", "params": AppListUpdatedNotification } | { "method": "remoteControl/status/changed", "params": RemoteControlStatusChangedNotification } | { "method": "externalAgentConfig/import/completed", "params": ExternalAgentConfigImportCompletedNotification } | { "method": "fs/changed", "params": FsChangedNotification } | { "method": "item/reasoning/summaryTextDelta", "params": ReasoningSummaryTextDeltaNotification } | { "method": "item/reasoning/summaryPartAdded", "params": ReasoningSummaryPartAddedNotification } | { "method": "item/reasoning/textDelta", "params": ReasoningTextDeltaNotification } | { "method": "thread/compacted", "params": ContextCompactedNotification } | { "method": "model/rerouted", "params": ModelReroutedNotification } | { "method": "model/verification", "params": ModelVerificationNotification } | { "method": "warning", "params": WarningNotification } | { "method": "guardianWarning", "params": GuardianWarningNotification } | { "method": "deprecationNotice", "params": DeprecationNoticeNotification } | { "method": "configWarning", "params": ConfigWarningNotification } | { "method": "fuzzyFileSearch/sessionUpdated", "params": FuzzyFileSearchSessionUpdatedNotification } | { "method": "fuzzyFileSearch/sessionCompleted", "params": FuzzyFileSearchSessionCompletedNotification } | { "method": "thread/realtime/started", "params": ThreadRealtimeStartedNotification } | { "method": "thread/realtime/itemAdded", "params": ThreadRealtimeItemAddedNotification } | { "method": "thread/realtime/transcript/delta", "params": ThreadRealtimeTranscriptDeltaNotification } | { "method": "thread/realtime/transcript/done", "params": ThreadRealtimeTranscriptDoneNotification } | { "method": "thread/realtime/outputAudio/delta", "params": ThreadRealtimeOutputAudioDeltaNotification } | { "method": "thread/realtime/sdp", "params": ThreadRealtimeSdpNotification } | { "method": "thread/realtime/error", "params": ThreadRealtimeErrorNotification } | { "method": "thread/realtime/closed", "params": ThreadRealtimeClosedNotification } | { "method": "windows/worldWritableWarning", "params": WindowsWorldWritableWarningNotification } | { "method": "windowsSandbox/setupCompleted", "params": WindowsSandboxSetupCompletedNotification } | { "method": "account/login/completed", "params": AccountLoginCompletedNotification }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/Thread.ts b/codex-rs/app-server-protocol/schema/typescript/v2/Thread.ts index d917094e36..6410544a8d 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/Thread.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/Thread.ts @@ -4,6 +4,7 @@ import type { AbsolutePathBuf } from "../AbsolutePathBuf"; import type { GitInfo } from "./GitInfo"; import type { SessionSource } from "./SessionSource"; +import type { ThreadArtifact } from "./ThreadArtifact"; import type { ThreadSource } from "./ThreadSource"; import type { ThreadStatus } from "./ThreadStatus"; import type { Turn } from "./Turn"; @@ -73,6 +74,10 @@ agentRole: string | null, * Optional Git metadata captured when the thread was created. */ gitInfo: GitInfo | null, +/** + * Model-managed artifacts associated with the thread. + */ +artifacts?: Array, /** * Optional user-facing thread title. */ diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifact.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifact.ts new file mode 100644 index 0000000000..b0ecccef11 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifact.ts @@ -0,0 +1,6 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { JsonValue } from "../serde_json/JsonValue"; + +export type ThreadArtifact = { id: string, createdAt: number, artifactType: string, payload: JsonValue, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactCreateParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactCreateParams.ts new file mode 100644 index 0000000000..2d7d62e7cf --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactCreateParams.ts @@ -0,0 +1,6 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { ThreadArtifactWriteParams } from "./ThreadArtifactWriteParams"; + +export type ThreadArtifactCreateParams = { threadId: string, artifact: ThreadArtifactWriteParams, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactCreateResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactCreateResponse.ts new file mode 100644 index 0000000000..2bb8edd781 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactCreateResponse.ts @@ -0,0 +1,6 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { ThreadArtifact } from "./ThreadArtifact"; + +export type ThreadArtifactCreateResponse = { artifact: ThreadArtifact, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactDeleteParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactDeleteParams.ts new file mode 100644 index 0000000000..95b293fd07 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactDeleteParams.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type ThreadArtifactDeleteParams = { threadId: string, artifactId: string, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactDeleteResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactDeleteResponse.ts new file mode 100644 index 0000000000..a91d62890d --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactDeleteResponse.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type ThreadArtifactDeleteResponse = Record; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactListParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactListParams.ts new file mode 100644 index 0000000000..0afad81542 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactListParams.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type ThreadArtifactListParams = { threadId: string, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactListResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactListResponse.ts new file mode 100644 index 0000000000..29091ea8a3 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactListResponse.ts @@ -0,0 +1,6 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { ThreadArtifact } from "./ThreadArtifact"; + +export type ThreadArtifactListResponse = { artifacts: Array, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactUpdateParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactUpdateParams.ts new file mode 100644 index 0000000000..642877ef32 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactUpdateParams.ts @@ -0,0 +1,6 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { ThreadArtifactWriteParams } from "./ThreadArtifactWriteParams"; + +export type ThreadArtifactUpdateParams = { threadId: string, artifactId: string, artifact: ThreadArtifactWriteParams, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactUpdateResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactUpdateResponse.ts new file mode 100644 index 0000000000..178ac281ff --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactUpdateResponse.ts @@ -0,0 +1,6 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { ThreadArtifact } from "./ThreadArtifact"; + +export type ThreadArtifactUpdateResponse = { artifact: ThreadArtifact, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactWriteParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactWriteParams.ts new file mode 100644 index 0000000000..6be4082354 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactWriteParams.ts @@ -0,0 +1,6 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { JsonValue } from "../serde_json/JsonValue"; + +export type ThreadArtifactWriteParams = { artifactType: string, payload: JsonValue, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactsUpdatedNotification.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactsUpdatedNotification.ts new file mode 100644 index 0000000000..e711687f98 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadArtifactsUpdatedNotification.ts @@ -0,0 +1,6 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { ThreadArtifact } from "./ThreadArtifact"; + +export type ThreadArtifactsUpdatedNotification = { threadId: string, turnId: string | null, artifacts: Array, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/index.ts b/codex-rs/app-server-protocol/schema/typescript/v2/index.ts index a6b961366e..0f91fdd5e3 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/index.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/index.ts @@ -356,6 +356,17 @@ export type { ThreadApproveGuardianDeniedActionResponse } from "./ThreadApproveG export type { ThreadArchiveParams } from "./ThreadArchiveParams"; export type { ThreadArchiveResponse } from "./ThreadArchiveResponse"; export type { ThreadArchivedNotification } from "./ThreadArchivedNotification"; +export type { ThreadArtifact } from "./ThreadArtifact"; +export type { ThreadArtifactCreateParams } from "./ThreadArtifactCreateParams"; +export type { ThreadArtifactCreateResponse } from "./ThreadArtifactCreateResponse"; +export type { ThreadArtifactDeleteParams } from "./ThreadArtifactDeleteParams"; +export type { ThreadArtifactDeleteResponse } from "./ThreadArtifactDeleteResponse"; +export type { ThreadArtifactListParams } from "./ThreadArtifactListParams"; +export type { ThreadArtifactListResponse } from "./ThreadArtifactListResponse"; +export type { ThreadArtifactUpdateParams } from "./ThreadArtifactUpdateParams"; +export type { ThreadArtifactUpdateResponse } from "./ThreadArtifactUpdateResponse"; +export type { ThreadArtifactWriteParams } from "./ThreadArtifactWriteParams"; +export type { ThreadArtifactsUpdatedNotification } from "./ThreadArtifactsUpdatedNotification"; export type { ThreadClosedNotification } from "./ThreadClosedNotification"; export type { ThreadCompactStartParams } from "./ThreadCompactStartParams"; export type { ThreadCompactStartResponse } from "./ThreadCompactStartResponse"; diff --git a/codex-rs/app-server-protocol/src/protocol/common.rs b/codex-rs/app-server-protocol/src/protocol/common.rs index ae00b08b73..43c8e38350 100644 --- a/codex-rs/app-server-protocol/src/protocol/common.rs +++ b/codex-rs/app-server-protocol/src/protocol/common.rs @@ -516,6 +516,26 @@ client_request_definitions! { serialization: thread_id(params.thread_id), response: v2::ThreadMetadataUpdateResponse, }, + ThreadArtifactList => "thread/artifact/list" { + params: v2::ThreadArtifactListParams, + serialization: thread_id(params.thread_id), + response: v2::ThreadArtifactListResponse, + }, + ThreadArtifactCreate => "thread/artifact/create" { + params: v2::ThreadArtifactCreateParams, + serialization: thread_id(params.thread_id), + response: v2::ThreadArtifactCreateResponse, + }, + ThreadArtifactUpdate => "thread/artifact/update" { + params: v2::ThreadArtifactUpdateParams, + serialization: thread_id(params.thread_id), + response: v2::ThreadArtifactUpdateResponse, + }, + ThreadArtifactDelete => "thread/artifact/delete" { + params: v2::ThreadArtifactDeleteParams, + serialization: thread_id(params.thread_id), + response: v2::ThreadArtifactDeleteResponse, + }, #[experimental("thread/memoryMode/set")] ThreadMemoryModeSet => "thread/memoryMode/set" { params: v2::ThreadMemoryModeSetParams, @@ -1434,6 +1454,7 @@ server_notification_definitions! { ThreadNameUpdated => "thread/name/updated" (v2::ThreadNameUpdatedNotification), #[experimental("thread/goal/updated")] ThreadGoalUpdated => "thread/goal/updated" (v2::ThreadGoalUpdatedNotification), + ThreadArtifactsUpdated => "thread/artifacts/updated" (v2::ThreadArtifactsUpdatedNotification), #[experimental("thread/goal/cleared")] ThreadGoalCleared => "thread/goal/cleared" (v2::ThreadGoalClearedNotification), ThreadTokenUsageUpdated => "thread/tokenUsage/updated" (v2::ThreadTokenUsageUpdatedNotification), @@ -2265,6 +2286,7 @@ mod tests { agent_nickname: None, agent_role: None, git_info: None, + artifacts: None, name: None, turns: Vec::new(), }, diff --git a/codex-rs/app-server-protocol/src/protocol/v2/thread.rs b/codex-rs/app-server-protocol/src/protocol/v2/thread.rs index 458722b3a2..688227cfab 100644 --- a/codex-rs/app-server-protocol/src/protocol/v2/thread.rs +++ b/codex-rs/app-server-protocol/src/protocol/v2/thread.rs @@ -6,6 +6,7 @@ use super::PermissionProfileSelectionParams; use super::SandboxMode; use super::SandboxPolicy; use super::Thread; +use super::ThreadArtifact; use super::ThreadItem; use super::ThreadSource; use super::Turn; @@ -690,6 +691,72 @@ pub struct ThreadMetadataUpdateResponse { pub thread: Thread, } +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] +#[serde(rename_all = "camelCase")] +#[ts(export_to = "v2/")] +pub struct ThreadArtifactListParams { + pub thread_id: String, +} + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] +#[serde(rename_all = "camelCase")] +#[ts(export_to = "v2/")] +pub struct ThreadArtifactListResponse { + pub artifacts: Vec, +} + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] +#[serde(rename_all = "camelCase")] +#[ts(export_to = "v2/")] +pub struct ThreadArtifactWriteParams { + pub artifact_type: String, + pub payload: serde_json::Value, +} + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] +#[serde(rename_all = "camelCase")] +#[ts(export_to = "v2/")] +pub struct ThreadArtifactCreateParams { + pub thread_id: String, + pub artifact: ThreadArtifactWriteParams, +} + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] +#[serde(rename_all = "camelCase")] +#[ts(export_to = "v2/")] +pub struct ThreadArtifactCreateResponse { + pub artifact: ThreadArtifact, +} + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] +#[serde(rename_all = "camelCase")] +#[ts(export_to = "v2/")] +pub struct ThreadArtifactUpdateParams { + pub thread_id: String, + pub artifact_id: String, + pub artifact: ThreadArtifactWriteParams, +} + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] +#[serde(rename_all = "camelCase")] +#[ts(export_to = "v2/")] +pub struct ThreadArtifactUpdateResponse { + pub artifact: ThreadArtifact, +} + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] +#[serde(rename_all = "camelCase")] +#[ts(export_to = "v2/")] +pub struct ThreadArtifactDeleteParams { + pub thread_id: String, + pub artifact_id: String, +} + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] +#[serde(rename_all = "camelCase")] +#[ts(export_to = "v2/")] +pub struct ThreadArtifactDeleteResponse {} + #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] #[serde(rename_all = "lowercase")] #[ts(rename_all = "lowercase")] @@ -1170,6 +1237,15 @@ pub struct ThreadGoalUpdatedNotification { pub goal: ThreadGoal, } +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] +#[serde(rename_all = "camelCase")] +#[ts(export_to = "v2/")] +pub struct ThreadArtifactsUpdatedNotification { + pub thread_id: String, + pub turn_id: Option, + pub artifacts: Vec, +} + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] #[serde(rename_all = "camelCase")] #[ts(export_to = "v2/")] diff --git a/codex-rs/app-server-protocol/src/protocol/v2/thread_data.rs b/codex-rs/app-server-protocol/src/protocol/v2/thread_data.rs index f0c518adf8..97df8716bc 100644 --- a/codex-rs/app-server-protocol/src/protocol/v2/thread_data.rs +++ b/codex-rs/app-server-protocol/src/protocol/v2/thread_data.rs @@ -99,6 +99,17 @@ pub struct GitInfo { pub origin_url: Option, } +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] +#[serde(rename_all = "camelCase")] +#[ts(export_to = "v2/")] +pub struct ThreadArtifact { + pub id: String, + #[ts(type = "number")] + pub created_at: i64, + pub artifact_type: String, + pub payload: serde_json::Value, +} + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] #[serde(rename_all = "camelCase")] #[ts(export_to = "v2/")] @@ -138,6 +149,10 @@ pub struct Thread { pub agent_role: Option, /// Optional Git metadata captured when the thread was created. pub git_info: Option, + /// Model-managed artifacts associated with the thread. + #[serde(default, skip_serializing_if = "Option::is_none")] + #[ts(optional)] + pub artifacts: Option>, /// Optional user-facing thread title. pub name: Option, /// Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read`