diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 904b037e5..6538ca917 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.7.4" + ".": "0.8.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index eb7394407..bc57821e7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 35 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-9d9cdf54bd30f5ba9041b0eec194236a3b85c8860a5ce4aebb28bae25fc07e9e.yml -openapi_spec_hash: dfcabcfa1497cb45607a908ba4f0086a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-cdb8c2bba2a7afe729633081644f04f118739f8c5119ed6947003ca1beb356c9.yml +openapi_spec_hash: 53c804f1c35a6733b69499e47b109664 config_hash: 32eb65911c08ac84d117cecdf2759869 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f5d79951..6a101fef8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.8.0 (2025-12-17) + +Full Changelog: [v0.7.4...v0.8.0](https://github.com/scaleapi/scale-agentex-python/compare/v0.7.4...v0.8.0) + +### Features + +* **api:** api update ([2e4ec2f](https://github.com/scaleapi/scale-agentex-python/commit/2e4ec2f28413ee58afa664b793565d6be4da5dfe)) + + +### Bug Fixes + +* use async_to_httpx_files in patch method ([8abb539](https://github.com/scaleapi/scale-agentex-python/commit/8abb539a340af3a2a42482757412c0c408817461)) + ## 0.7.4 (2025-12-17) Full Changelog: [v0.7.3...v0.7.4](https://github.com/scaleapi/scale-agentex-python/compare/v0.7.3...v0.7.4) diff --git a/pyproject.toml b/pyproject.toml index 3aaebb443..997d43c84 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "agentex-sdk" -version = "0.7.4" +version = "0.8.0" description = "The official Python library for the agentex API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/agentex/_base_client.py b/src/agentex/_base_client.py index 2d022cdac..cbf5b038f 100644 --- a/src/agentex/_base_client.py +++ b/src/agentex/_base_client.py @@ -1774,7 +1774,7 @@ async def patch( options: RequestOptions = {}, ) -> ResponseT: opts = FinalRequestOptions.construct( - method="patch", url=path, json_data=body, files=to_httpx_files(files), **options + method="patch", url=path, json_data=body, files=await async_to_httpx_files(files), **options ) return await self.request(cast_to, opts) diff --git a/src/agentex/_version.py b/src/agentex/_version.py index 9c1ed430c..455d4ff34 100644 --- a/src/agentex/_version.py +++ b/src/agentex/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "agentex" -__version__ = "0.7.4" # x-release-please-version +__version__ = "0.8.0" # x-release-please-version diff --git a/src/agentex/resources/messages/messages.py b/src/agentex/resources/messages/messages.py index d3f9e4386..c047c9c23 100644 --- a/src/agentex/resources/messages/messages.py +++ b/src/agentex/resources/messages/messages.py @@ -207,7 +207,505 @@ def list( Args: task_id: The task ID - filters: JSON-encoded filter object + filters: JSON-encoded array of TaskMessageEntityFilter objects. + + Schema: { + "$defs": { + "DataContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "data", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `data`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "data": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The contents of the data message.", + "title": "Data" + } + }, + "title": "DataContentEntityOptional", + "type": "object" + }, + "FileAttachmentEntity": { + "description": "Represents a file attachment in messages.", + "properties": { + "file_id": { + "description": "The unique ID of the attached file", + "title": "File Id", + "type": "string" + }, + "name": { + "description": "The name of the file", + "title": "Name", + "type": "string" + }, + "size": { + "description": "The size of the file in bytes", + "title": "Size", + "type": "integer" + }, + "type": { + "description": "The MIME type or content type of the file", + "title": "Type", + "type": "string" + } + }, + "required": [ + "file_id", + "name", + "size", + "type" + ], + "title": "FileAttachmentEntity", + "type": "object" + }, + "MessageAuthor": { + "enum": [ + "user", + "agent" + ], + "title": "MessageAuthor", + "type": "string" + }, + "MessageStyle": { + "enum": [ + "static", + "active" + ], + "title": "MessageStyle", + "type": "string" + }, + "ReasoningContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "reasoning", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `reasoning`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "summary": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A list of short reasoning summaries", + "title": "Summary" + }, + "content": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The reasoning content or chain-of-thought text", + "title": "Content" + } + }, + "title": "ReasoningContentEntityOptional", + "type": "object" + }, + "TextContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "text", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `text`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "format": { + "anyOf": [ + { + "$ref": + "#/$defs/TextFormat" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The format of the message. This is used by the client to determine how to display the message." + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The contents of the text message.", + "title": "Content" + }, + "attachments": { + "anyOf": [ + { + "items": { + "$ref": + "#/$defs/FileAttachmentEntity" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional list of file attachments with structured metadata.", + "title": "Attachments" + } + }, + "title": "TextContentEntityOptional", + "type": "object" + }, + "TextFormat": { + "enum": [ + "markdown", + "plain", + "code" + ], + "title": "TextFormat", + "type": "string" + }, + "ToolRequestContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "tool_request", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `tool_request`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "tool_call_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The ID of the tool call that is being requested.", + "title": "Tool Call Id" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the tool that is being requested.", + "title": "Name" + }, + "arguments": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The arguments to the tool.", + "title": "Arguments" + } + }, + "title": "ToolRequestContentEntityOptional", + "type": "object" + }, + "ToolResponseContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "tool_response", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `tool_response`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "tool_call_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The ID of the tool call that is being responded to.", + "title": "Tool Call Id" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the tool that is being responded to.", + "title": "Name" + }, + "content": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "The result of the tool.", + "title": "Content" + } + }, + "title": "ToolResponseContentEntityOptional", + "type": "object" + } + }, + "description": "Filter model for TaskMessage - all fields optional for flexible filtering.\n\nThe `exclude` field determines whether this filter is inclusionary or exclusionary.\nWhen multiple filters are provided:\n- Inclusionary filters (exclude=False) are OR'd together\n- Exclusionary filters (exclude=True) are OR'd together and negated with $nor\n- The two groups are AND'd: (include1 OR include2) AND NOT (exclude1 OR exclude2)", + "properties": { + "content": { + "anyOf": [ + { + "$ref": + "#/$defs/ToolRequestContentEntityOptional" + }, + { + "$ref": + "#/$defs/DataContentEntityOptional" + }, + { + "$ref": + "#/$defs/TextContentEntityOptional" + }, + { + "$ref": + "#/$defs/ToolResponseContentEntityOptional" + }, + { + "$ref": + "#/$defs/ReasoningContentEntityOptional" }, { "type": "null" } ], "default": + null, "description": "Filter by message content", "title": "Content" }, + "streaming_status": { "anyOf": [ { "enum": [ "IN_PROGRESS", "DONE" ], "type": + "string" }, { "type": "null" } ], "default": null, "description": "Filter by + streaming status", "title": "Streaming Status" }, "exclude": { "default": false, + "description": "If true, this filter excludes matching messages", "title": + "Exclude", "type": "boolean" } }, "title": "TaskMessageEntityFilter", "type": + "object" } + + Each filter can include: + + - `content`: Filter by message content (type, author, data fields) + - `streaming_status`: Filter by status ("IN_PROGRESS" or "DONE") + - `exclude`: If true, excludes matching messages (default: false) + + Multiple filters are combined: inclusionary filters (exclude=false) are OR'd + together, exclusionary filters (exclude=true) are OR'd and negated, then both + groups are AND'd. extra_headers: Send extra headers @@ -276,7 +774,505 @@ def list_paginated( Args: task_id: The task ID - filters: JSON-encoded filter object + filters: JSON-encoded array of TaskMessageEntityFilter objects. + + Schema: { + "$defs": { + "DataContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "data", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `data`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "data": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The contents of the data message.", + "title": "Data" + } + }, + "title": "DataContentEntityOptional", + "type": "object" + }, + "FileAttachmentEntity": { + "description": "Represents a file attachment in messages.", + "properties": { + "file_id": { + "description": "The unique ID of the attached file", + "title": "File Id", + "type": "string" + }, + "name": { + "description": "The name of the file", + "title": "Name", + "type": "string" + }, + "size": { + "description": "The size of the file in bytes", + "title": "Size", + "type": "integer" + }, + "type": { + "description": "The MIME type or content type of the file", + "title": "Type", + "type": "string" + } + }, + "required": [ + "file_id", + "name", + "size", + "type" + ], + "title": "FileAttachmentEntity", + "type": "object" + }, + "MessageAuthor": { + "enum": [ + "user", + "agent" + ], + "title": "MessageAuthor", + "type": "string" + }, + "MessageStyle": { + "enum": [ + "static", + "active" + ], + "title": "MessageStyle", + "type": "string" + }, + "ReasoningContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "reasoning", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `reasoning`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "summary": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A list of short reasoning summaries", + "title": "Summary" + }, + "content": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The reasoning content or chain-of-thought text", + "title": "Content" + } + }, + "title": "ReasoningContentEntityOptional", + "type": "object" + }, + "TextContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "text", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `text`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "format": { + "anyOf": [ + { + "$ref": + "#/$defs/TextFormat" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The format of the message. This is used by the client to determine how to display the message." + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The contents of the text message.", + "title": "Content" + }, + "attachments": { + "anyOf": [ + { + "items": { + "$ref": + "#/$defs/FileAttachmentEntity" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional list of file attachments with structured metadata.", + "title": "Attachments" + } + }, + "title": "TextContentEntityOptional", + "type": "object" + }, + "TextFormat": { + "enum": [ + "markdown", + "plain", + "code" + ], + "title": "TextFormat", + "type": "string" + }, + "ToolRequestContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "tool_request", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `tool_request`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "tool_call_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The ID of the tool call that is being requested.", + "title": "Tool Call Id" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the tool that is being requested.", + "title": "Name" + }, + "arguments": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The arguments to the tool.", + "title": "Arguments" + } + }, + "title": "ToolRequestContentEntityOptional", + "type": "object" + }, + "ToolResponseContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "tool_response", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `tool_response`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "tool_call_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The ID of the tool call that is being responded to.", + "title": "Tool Call Id" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the tool that is being responded to.", + "title": "Name" + }, + "content": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "The result of the tool.", + "title": "Content" + } + }, + "title": "ToolResponseContentEntityOptional", + "type": "object" + } + }, + "description": "Filter model for TaskMessage - all fields optional for flexible filtering.\n\nThe `exclude` field determines whether this filter is inclusionary or exclusionary.\nWhen multiple filters are provided:\n- Inclusionary filters (exclude=False) are OR'd together\n- Exclusionary filters (exclude=True) are OR'd together and negated with $nor\n- The two groups are AND'd: (include1 OR include2) AND NOT (exclude1 OR exclude2)", + "properties": { + "content": { + "anyOf": [ + { + "$ref": + "#/$defs/ToolRequestContentEntityOptional" + }, + { + "$ref": + "#/$defs/DataContentEntityOptional" + }, + { + "$ref": + "#/$defs/TextContentEntityOptional" + }, + { + "$ref": + "#/$defs/ToolResponseContentEntityOptional" + }, + { + "$ref": + "#/$defs/ReasoningContentEntityOptional" }, { "type": "null" } ], "default": + null, "description": "Filter by message content", "title": "Content" }, + "streaming_status": { "anyOf": [ { "enum": [ "IN_PROGRESS", "DONE" ], "type": + "string" }, { "type": "null" } ], "default": null, "description": "Filter by + streaming status", "title": "Streaming Status" }, "exclude": { "default": false, + "description": "If true, this filter excludes matching messages", "title": + "Exclude", "type": "boolean" } }, "title": "TaskMessageEntityFilter", "type": + "object" } + + Each filter can include: + + - `content`: Filter by message content (type, author, data fields) + - `streaming_status`: Filter by status ("IN_PROGRESS" or "DONE") + - `exclude`: If true, excludes matching messages (default: false) + + Multiple filters are combined: inclusionary filters (exclude=false) are OR'd + together, exclusionary filters (exclude=true) are OR'd and negated, then both + groups are AND'd. extra_headers: Send extra headers @@ -475,7 +1471,505 @@ async def list( Args: task_id: The task ID - filters: JSON-encoded filter object + filters: JSON-encoded array of TaskMessageEntityFilter objects. + + Schema: { + "$defs": { + "DataContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "data", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `data`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "data": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The contents of the data message.", + "title": "Data" + } + }, + "title": "DataContentEntityOptional", + "type": "object" + }, + "FileAttachmentEntity": { + "description": "Represents a file attachment in messages.", + "properties": { + "file_id": { + "description": "The unique ID of the attached file", + "title": "File Id", + "type": "string" + }, + "name": { + "description": "The name of the file", + "title": "Name", + "type": "string" + }, + "size": { + "description": "The size of the file in bytes", + "title": "Size", + "type": "integer" + }, + "type": { + "description": "The MIME type or content type of the file", + "title": "Type", + "type": "string" + } + }, + "required": [ + "file_id", + "name", + "size", + "type" + ], + "title": "FileAttachmentEntity", + "type": "object" + }, + "MessageAuthor": { + "enum": [ + "user", + "agent" + ], + "title": "MessageAuthor", + "type": "string" + }, + "MessageStyle": { + "enum": [ + "static", + "active" + ], + "title": "MessageStyle", + "type": "string" + }, + "ReasoningContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "reasoning", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `reasoning`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "summary": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A list of short reasoning summaries", + "title": "Summary" + }, + "content": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The reasoning content or chain-of-thought text", + "title": "Content" + } + }, + "title": "ReasoningContentEntityOptional", + "type": "object" + }, + "TextContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "text", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `text`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "format": { + "anyOf": [ + { + "$ref": + "#/$defs/TextFormat" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The format of the message. This is used by the client to determine how to display the message." + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The contents of the text message.", + "title": "Content" + }, + "attachments": { + "anyOf": [ + { + "items": { + "$ref": + "#/$defs/FileAttachmentEntity" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional list of file attachments with structured metadata.", + "title": "Attachments" + } + }, + "title": "TextContentEntityOptional", + "type": "object" + }, + "TextFormat": { + "enum": [ + "markdown", + "plain", + "code" + ], + "title": "TextFormat", + "type": "string" + }, + "ToolRequestContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "tool_request", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `tool_request`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "tool_call_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The ID of the tool call that is being requested.", + "title": "Tool Call Id" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the tool that is being requested.", + "title": "Name" + }, + "arguments": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The arguments to the tool.", + "title": "Arguments" + } + }, + "title": "ToolRequestContentEntityOptional", + "type": "object" + }, + "ToolResponseContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "tool_response", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `tool_response`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "tool_call_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The ID of the tool call that is being responded to.", + "title": "Tool Call Id" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the tool that is being responded to.", + "title": "Name" + }, + "content": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "The result of the tool.", + "title": "Content" + } + }, + "title": "ToolResponseContentEntityOptional", + "type": "object" + } + }, + "description": "Filter model for TaskMessage - all fields optional for flexible filtering.\n\nThe `exclude` field determines whether this filter is inclusionary or exclusionary.\nWhen multiple filters are provided:\n- Inclusionary filters (exclude=False) are OR'd together\n- Exclusionary filters (exclude=True) are OR'd together and negated with $nor\n- The two groups are AND'd: (include1 OR include2) AND NOT (exclude1 OR exclude2)", + "properties": { + "content": { + "anyOf": [ + { + "$ref": + "#/$defs/ToolRequestContentEntityOptional" + }, + { + "$ref": + "#/$defs/DataContentEntityOptional" + }, + { + "$ref": + "#/$defs/TextContentEntityOptional" + }, + { + "$ref": + "#/$defs/ToolResponseContentEntityOptional" + }, + { + "$ref": + "#/$defs/ReasoningContentEntityOptional" }, { "type": "null" } ], "default": + null, "description": "Filter by message content", "title": "Content" }, + "streaming_status": { "anyOf": [ { "enum": [ "IN_PROGRESS", "DONE" ], "type": + "string" }, { "type": "null" } ], "default": null, "description": "Filter by + streaming status", "title": "Streaming Status" }, "exclude": { "default": false, + "description": "If true, this filter excludes matching messages", "title": + "Exclude", "type": "boolean" } }, "title": "TaskMessageEntityFilter", "type": + "object" } + + Each filter can include: + + - `content`: Filter by message content (type, author, data fields) + - `streaming_status`: Filter by status ("IN_PROGRESS" or "DONE") + - `exclude`: If true, excludes matching messages (default: false) + + Multiple filters are combined: inclusionary filters (exclude=false) are OR'd + together, exclusionary filters (exclude=true) are OR'd and negated, then both + groups are AND'd. extra_headers: Send extra headers @@ -544,7 +2038,505 @@ async def list_paginated( Args: task_id: The task ID - filters: JSON-encoded filter object + filters: JSON-encoded array of TaskMessageEntityFilter objects. + + Schema: { + "$defs": { + "DataContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "data", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `data`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "data": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The contents of the data message.", + "title": "Data" + } + }, + "title": "DataContentEntityOptional", + "type": "object" + }, + "FileAttachmentEntity": { + "description": "Represents a file attachment in messages.", + "properties": { + "file_id": { + "description": "The unique ID of the attached file", + "title": "File Id", + "type": "string" + }, + "name": { + "description": "The name of the file", + "title": "Name", + "type": "string" + }, + "size": { + "description": "The size of the file in bytes", + "title": "Size", + "type": "integer" + }, + "type": { + "description": "The MIME type or content type of the file", + "title": "Type", + "type": "string" + } + }, + "required": [ + "file_id", + "name", + "size", + "type" + ], + "title": "FileAttachmentEntity", + "type": "object" + }, + "MessageAuthor": { + "enum": [ + "user", + "agent" + ], + "title": "MessageAuthor", + "type": "string" + }, + "MessageStyle": { + "enum": [ + "static", + "active" + ], + "title": "MessageStyle", + "type": "string" + }, + "ReasoningContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "reasoning", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `reasoning`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "summary": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A list of short reasoning summaries", + "title": "Summary" + }, + "content": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The reasoning content or chain-of-thought text", + "title": "Content" + } + }, + "title": "ReasoningContentEntityOptional", + "type": "object" + }, + "TextContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "text", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `text`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "format": { + "anyOf": [ + { + "$ref": + "#/$defs/TextFormat" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The format of the message. This is used by the client to determine how to display the message." + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The contents of the text message.", + "title": "Content" + }, + "attachments": { + "anyOf": [ + { + "items": { + "$ref": + "#/$defs/FileAttachmentEntity" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional list of file attachments with structured metadata.", + "title": "Attachments" + } + }, + "title": "TextContentEntityOptional", + "type": "object" + }, + "TextFormat": { + "enum": [ + "markdown", + "plain", + "code" + ], + "title": "TextFormat", + "type": "string" + }, + "ToolRequestContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "tool_request", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `tool_request`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "tool_call_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The ID of the tool call that is being requested.", + "title": "Tool Call Id" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the tool that is being requested.", + "title": "Name" + }, + "arguments": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The arguments to the tool.", + "title": "Arguments" + } + }, + "title": "ToolRequestContentEntityOptional", + "type": "object" + }, + "ToolResponseContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "tool_response", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `tool_response`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "tool_call_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The ID of the tool call that is being responded to.", + "title": "Tool Call Id" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the tool that is being responded to.", + "title": "Name" + }, + "content": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "The result of the tool.", + "title": "Content" + } + }, + "title": "ToolResponseContentEntityOptional", + "type": "object" + } + }, + "description": "Filter model for TaskMessage - all fields optional for flexible filtering.\n\nThe `exclude` field determines whether this filter is inclusionary or exclusionary.\nWhen multiple filters are provided:\n- Inclusionary filters (exclude=False) are OR'd together\n- Exclusionary filters (exclude=True) are OR'd together and negated with $nor\n- The two groups are AND'd: (include1 OR include2) AND NOT (exclude1 OR exclude2)", + "properties": { + "content": { + "anyOf": [ + { + "$ref": + "#/$defs/ToolRequestContentEntityOptional" + }, + { + "$ref": + "#/$defs/DataContentEntityOptional" + }, + { + "$ref": + "#/$defs/TextContentEntityOptional" + }, + { + "$ref": + "#/$defs/ToolResponseContentEntityOptional" + }, + { + "$ref": + "#/$defs/ReasoningContentEntityOptional" }, { "type": "null" } ], "default": + null, "description": "Filter by message content", "title": "Content" }, + "streaming_status": { "anyOf": [ { "enum": [ "IN_PROGRESS", "DONE" ], "type": + "string" }, { "type": "null" } ], "default": null, "description": "Filter by + streaming status", "title": "Streaming Status" }, "exclude": { "default": false, + "description": "If true, this filter excludes matching messages", "title": + "Exclude", "type": "boolean" } }, "title": "TaskMessageEntityFilter", "type": + "object" } + + Each filter can include: + + - `content`: Filter by message content (type, author, data fields) + - `streaming_status`: Filter by status ("IN_PROGRESS" or "DONE") + - `exclude`: If true, excludes matching messages (default: false) + + Multiple filters are combined: inclusionary filters (exclude=false) are OR'd + together, exclusionary filters (exclude=true) are OR'd and negated, then both + groups are AND'd. extra_headers: Send extra headers diff --git a/src/agentex/types/message_list_paginated_params.py b/src/agentex/types/message_list_paginated_params.py index 2990a409c..594305327 100644 --- a/src/agentex/types/message_list_paginated_params.py +++ b/src/agentex/types/message_list_paginated_params.py @@ -17,6 +17,505 @@ class MessageListPaginatedParams(TypedDict, total=False): direction: Literal["older", "newer"] filters: Optional[str] - """JSON-encoded filter object""" + """JSON-encoded array of TaskMessageEntityFilter objects. + + Schema: { + "$defs": { + "DataContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "data", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `data`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "data": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The contents of the data message.", + "title": "Data" + } + }, + "title": "DataContentEntityOptional", + "type": "object" + }, + "FileAttachmentEntity": { + "description": "Represents a file attachment in messages.", + "properties": { + "file_id": { + "description": "The unique ID of the attached file", + "title": "File Id", + "type": "string" + }, + "name": { + "description": "The name of the file", + "title": "Name", + "type": "string" + }, + "size": { + "description": "The size of the file in bytes", + "title": "Size", + "type": "integer" + }, + "type": { + "description": "The MIME type or content type of the file", + "title": "Type", + "type": "string" + } + }, + "required": [ + "file_id", + "name", + "size", + "type" + ], + "title": "FileAttachmentEntity", + "type": "object" + }, + "MessageAuthor": { + "enum": [ + "user", + "agent" + ], + "title": "MessageAuthor", + "type": "string" + }, + "MessageStyle": { + "enum": [ + "static", + "active" + ], + "title": "MessageStyle", + "type": "string" + }, + "ReasoningContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "reasoning", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `reasoning`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "summary": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A list of short reasoning summaries", + "title": "Summary" + }, + "content": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The reasoning content or chain-of-thought text", + "title": "Content" + } + }, + "title": "ReasoningContentEntityOptional", + "type": "object" + }, + "TextContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "text", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `text`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "format": { + "anyOf": [ + { + "$ref": + "#/$defs/TextFormat" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The format of the message. This is used by the client to determine how to display the message." + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The contents of the text message.", + "title": "Content" + }, + "attachments": { + "anyOf": [ + { + "items": { + "$ref": + "#/$defs/FileAttachmentEntity" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional list of file attachments with structured metadata.", + "title": "Attachments" + } + }, + "title": "TextContentEntityOptional", + "type": "object" + }, + "TextFormat": { + "enum": [ + "markdown", + "plain", + "code" + ], + "title": "TextFormat", + "type": "string" + }, + "ToolRequestContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "tool_request", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `tool_request`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "tool_call_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The ID of the tool call that is being requested.", + "title": "Tool Call Id" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the tool that is being requested.", + "title": "Name" + }, + "arguments": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The arguments to the tool.", + "title": "Arguments" + } + }, + "title": "ToolRequestContentEntityOptional", + "type": "object" + }, + "ToolResponseContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "tool_response", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `tool_response`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "tool_call_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The ID of the tool call that is being responded to.", + "title": "Tool Call Id" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the tool that is being responded to.", + "title": "Name" + }, + "content": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "The result of the tool.", + "title": "Content" + } + }, + "title": "ToolResponseContentEntityOptional", + "type": "object" + } + }, + "description": "Filter model for TaskMessage - all fields optional for flexible filtering.\n\nThe `exclude` field determines whether this filter is inclusionary or exclusionary.\nWhen multiple filters are provided:\n- Inclusionary filters (exclude=False) are OR'd together\n- Exclusionary filters (exclude=True) are OR'd together and negated with $nor\n- The two groups are AND'd: (include1 OR include2) AND NOT (exclude1 OR exclude2)", + "properties": { + "content": { + "anyOf": [ + { + "$ref": + "#/$defs/ToolRequestContentEntityOptional" + }, + { + "$ref": + "#/$defs/DataContentEntityOptional" + }, + { + "$ref": + "#/$defs/TextContentEntityOptional" + }, + { + "$ref": + "#/$defs/ToolResponseContentEntityOptional" + }, + { + "$ref": + "#/$defs/ReasoningContentEntityOptional" }, { "type": "null" } ], "default": + null, "description": "Filter by message content", "title": "Content" }, + "streaming_status": { "anyOf": [ { "enum": [ "IN_PROGRESS", "DONE" ], "type": + "string" }, { "type": "null" } ], "default": null, "description": "Filter by + streaming status", "title": "Streaming Status" }, "exclude": { "default": false, + "description": "If true, this filter excludes matching messages", "title": + "Exclude", "type": "boolean" } }, "title": "TaskMessageEntityFilter", "type": + "object" } + + Each filter can include: + + - `content`: Filter by message content (type, author, data fields) + - `streaming_status`: Filter by status ("IN_PROGRESS" or "DONE") + - `exclude`: If true, excludes matching messages (default: false) + + Multiple filters are combined: inclusionary filters (exclude=false) are OR'd + together, exclusionary filters (exclude=true) are OR'd and negated, then both + groups are AND'd. + """ limit: int diff --git a/src/agentex/types/message_list_params.py b/src/agentex/types/message_list_params.py index 06b043143..c47569a2f 100644 --- a/src/agentex/types/message_list_params.py +++ b/src/agentex/types/message_list_params.py @@ -13,7 +13,506 @@ class MessageListParams(TypedDict, total=False): """The task ID""" filters: Optional[str] - """JSON-encoded filter object""" + """JSON-encoded array of TaskMessageEntityFilter objects. + + Schema: { + "$defs": { + "DataContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "data", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `data`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "data": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The contents of the data message.", + "title": "Data" + } + }, + "title": "DataContentEntityOptional", + "type": "object" + }, + "FileAttachmentEntity": { + "description": "Represents a file attachment in messages.", + "properties": { + "file_id": { + "description": "The unique ID of the attached file", + "title": "File Id", + "type": "string" + }, + "name": { + "description": "The name of the file", + "title": "Name", + "type": "string" + }, + "size": { + "description": "The size of the file in bytes", + "title": "Size", + "type": "integer" + }, + "type": { + "description": "The MIME type or content type of the file", + "title": "Type", + "type": "string" + } + }, + "required": [ + "file_id", + "name", + "size", + "type" + ], + "title": "FileAttachmentEntity", + "type": "object" + }, + "MessageAuthor": { + "enum": [ + "user", + "agent" + ], + "title": "MessageAuthor", + "type": "string" + }, + "MessageStyle": { + "enum": [ + "static", + "active" + ], + "title": "MessageStyle", + "type": "string" + }, + "ReasoningContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "reasoning", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `reasoning`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "summary": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A list of short reasoning summaries", + "title": "Summary" + }, + "content": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The reasoning content or chain-of-thought text", + "title": "Content" + } + }, + "title": "ReasoningContentEntityOptional", + "type": "object" + }, + "TextContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "text", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `text`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "format": { + "anyOf": [ + { + "$ref": + "#/$defs/TextFormat" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The format of the message. This is used by the client to determine how to display the message." + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The contents of the text message.", + "title": "Content" + }, + "attachments": { + "anyOf": [ + { + "items": { + "$ref": + "#/$defs/FileAttachmentEntity" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional list of file attachments with structured metadata.", + "title": "Attachments" + } + }, + "title": "TextContentEntityOptional", + "type": "object" + }, + "TextFormat": { + "enum": [ + "markdown", + "plain", + "code" + ], + "title": "TextFormat", + "type": "string" + }, + "ToolRequestContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "tool_request", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `tool_request`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "tool_call_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The ID of the tool call that is being requested.", + "title": "Tool Call Id" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the tool that is being requested.", + "title": "Name" + }, + "arguments": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The arguments to the tool.", + "title": "Arguments" + } + }, + "title": "ToolRequestContentEntityOptional", + "type": "object" + }, + "ToolResponseContentEntityOptional": { + "properties": { + "type": { + "anyOf": [ + { + "const": "tool_response", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The type of the message, in this case `tool_response`.", + "title": "Type" + }, + "author": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageAuthor" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`." + }, + "style": { + "anyOf": [ + { + "$ref": + "#/$defs/MessageStyle" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The style of the message. This is used by the client to determine how to display the message." + }, + "tool_call_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The ID of the tool call that is being responded to.", + "title": "Tool Call Id" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the tool that is being responded to.", + "title": "Name" + }, + "content": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "The result of the tool.", + "title": "Content" + } + }, + "title": "ToolResponseContentEntityOptional", + "type": "object" + } + }, + "description": "Filter model for TaskMessage - all fields optional for flexible filtering.\n\nThe `exclude` field determines whether this filter is inclusionary or exclusionary.\nWhen multiple filters are provided:\n- Inclusionary filters (exclude=False) are OR'd together\n- Exclusionary filters (exclude=True) are OR'd together and negated with $nor\n- The two groups are AND'd: (include1 OR include2) AND NOT (exclude1 OR exclude2)", + "properties": { + "content": { + "anyOf": [ + { + "$ref": + "#/$defs/ToolRequestContentEntityOptional" + }, + { + "$ref": + "#/$defs/DataContentEntityOptional" + }, + { + "$ref": + "#/$defs/TextContentEntityOptional" + }, + { + "$ref": + "#/$defs/ToolResponseContentEntityOptional" + }, + { + "$ref": + "#/$defs/ReasoningContentEntityOptional" }, { "type": "null" } ], "default": + null, "description": "Filter by message content", "title": "Content" }, + "streaming_status": { "anyOf": [ { "enum": [ "IN_PROGRESS", "DONE" ], "type": + "string" }, { "type": "null" } ], "default": null, "description": "Filter by + streaming status", "title": "Streaming Status" }, "exclude": { "default": false, + "description": "If true, this filter excludes matching messages", "title": + "Exclude", "type": "boolean" } }, "title": "TaskMessageEntityFilter", "type": + "object" } + + Each filter can include: + + - `content`: Filter by message content (type, author, data fields) + - `streaming_status`: Filter by status ("IN_PROGRESS" or "DONE") + - `exclude`: If true, excludes matching messages (default: false) + + Multiple filters are combined: inclusionary filters (exclude=false) are OR'd + together, exclusionary filters (exclude=true) are OR'd and negated, then both + groups are AND'd. + """ limit: int