agentex-sdk 0.1.0a6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agentex/__init__.py +103 -0
- agentex/_base_client.py +1992 -0
- agentex/_client.py +506 -0
- agentex/_compat.py +219 -0
- agentex/_constants.py +14 -0
- agentex/_exceptions.py +108 -0
- agentex/_files.py +123 -0
- agentex/_models.py +829 -0
- agentex/_qs.py +150 -0
- agentex/_resource.py +43 -0
- agentex/_response.py +830 -0
- agentex/_streaming.py +333 -0
- agentex/_types.py +219 -0
- agentex/_utils/__init__.py +57 -0
- agentex/_utils/_logs.py +25 -0
- agentex/_utils/_proxy.py +65 -0
- agentex/_utils/_reflection.py +42 -0
- agentex/_utils/_resources_proxy.py +24 -0
- agentex/_utils/_streams.py +12 -0
- agentex/_utils/_sync.py +86 -0
- agentex/_utils/_transform.py +447 -0
- agentex/_utils/_typing.py +151 -0
- agentex/_utils/_utils.py +422 -0
- agentex/_version.py +4 -0
- agentex/lib/.keep +4 -0
- agentex/lib/__init__.py +0 -0
- agentex/lib/adk/__init__.py +41 -0
- agentex/lib/adk/_modules/__init__.py +0 -0
- agentex/lib/adk/_modules/acp.py +247 -0
- agentex/lib/adk/_modules/agent_task_tracker.py +176 -0
- agentex/lib/adk/_modules/agents.py +77 -0
- agentex/lib/adk/_modules/events.py +141 -0
- agentex/lib/adk/_modules/messages.py +285 -0
- agentex/lib/adk/_modules/state.py +291 -0
- agentex/lib/adk/_modules/streaming.py +75 -0
- agentex/lib/adk/_modules/tasks.py +124 -0
- agentex/lib/adk/_modules/tracing.py +194 -0
- agentex/lib/adk/providers/__init__.py +9 -0
- agentex/lib/adk/providers/_modules/__init__.py +0 -0
- agentex/lib/adk/providers/_modules/litellm.py +232 -0
- agentex/lib/adk/providers/_modules/openai.py +416 -0
- agentex/lib/adk/providers/_modules/sgp.py +85 -0
- agentex/lib/adk/utils/__init__.py +5 -0
- agentex/lib/adk/utils/_modules/__init__.py +0 -0
- agentex/lib/adk/utils/_modules/templating.py +94 -0
- agentex/lib/cli/__init__.py +0 -0
- agentex/lib/cli/commands/__init__.py +0 -0
- agentex/lib/cli/commands/agents.py +328 -0
- agentex/lib/cli/commands/init.py +227 -0
- agentex/lib/cli/commands/main.py +33 -0
- agentex/lib/cli/commands/secrets.py +169 -0
- agentex/lib/cli/commands/tasks.py +118 -0
- agentex/lib/cli/commands/uv.py +133 -0
- agentex/lib/cli/handlers/__init__.py +0 -0
- agentex/lib/cli/handlers/agent_handlers.py +160 -0
- agentex/lib/cli/handlers/cleanup_handlers.py +186 -0
- agentex/lib/cli/handlers/deploy_handlers.py +351 -0
- agentex/lib/cli/handlers/run_handlers.py +452 -0
- agentex/lib/cli/handlers/secret_handlers.py +670 -0
- agentex/lib/cli/templates/default/.dockerignore.j2 +43 -0
- agentex/lib/cli/templates/default/Dockerfile-uv.j2 +42 -0
- agentex/lib/cli/templates/default/Dockerfile.j2 +42 -0
- agentex/lib/cli/templates/default/README.md.j2 +193 -0
- agentex/lib/cli/templates/default/deploy/example.yaml.j2 +55 -0
- agentex/lib/cli/templates/default/manifest.yaml.j2 +116 -0
- agentex/lib/cli/templates/default/project/acp.py.j2 +29 -0
- agentex/lib/cli/templates/default/pyproject.toml.j2 +33 -0
- agentex/lib/cli/templates/default/requirements.txt.j2 +5 -0
- agentex/lib/cli/templates/deploy/Screenshot 2025-03-19 at 10.36.57/342/200/257AM.png +0 -0
- agentex/lib/cli/templates/deploy/example.yaml.j2 +55 -0
- agentex/lib/cli/templates/sync/.dockerignore.j2 +43 -0
- agentex/lib/cli/templates/sync/Dockerfile-uv.j2 +42 -0
- agentex/lib/cli/templates/sync/Dockerfile.j2 +42 -0
- agentex/lib/cli/templates/sync/README.md.j2 +293 -0
- agentex/lib/cli/templates/sync/deploy/example.yaml.j2 +55 -0
- agentex/lib/cli/templates/sync/manifest.yaml.j2 +116 -0
- agentex/lib/cli/templates/sync/project/acp.py.j2 +26 -0
- agentex/lib/cli/templates/sync/pyproject.toml.j2 +33 -0
- agentex/lib/cli/templates/sync/requirements.txt.j2 +5 -0
- agentex/lib/cli/templates/temporal/.dockerignore.j2 +43 -0
- agentex/lib/cli/templates/temporal/Dockerfile-uv.j2 +48 -0
- agentex/lib/cli/templates/temporal/Dockerfile.j2 +48 -0
- agentex/lib/cli/templates/temporal/README.md.j2 +316 -0
- agentex/lib/cli/templates/temporal/deploy/example.yaml.j2 +55 -0
- agentex/lib/cli/templates/temporal/manifest.yaml.j2 +137 -0
- agentex/lib/cli/templates/temporal/project/acp.py.j2 +30 -0
- agentex/lib/cli/templates/temporal/project/run_worker.py.j2 +33 -0
- agentex/lib/cli/templates/temporal/project/workflow.py.j2 +66 -0
- agentex/lib/cli/templates/temporal/pyproject.toml.j2 +34 -0
- agentex/lib/cli/templates/temporal/requirements.txt.j2 +5 -0
- agentex/lib/cli/utils/cli_utils.py +14 -0
- agentex/lib/cli/utils/credential_utils.py +103 -0
- agentex/lib/cli/utils/exceptions.py +6 -0
- agentex/lib/cli/utils/kubectl_utils.py +135 -0
- agentex/lib/cli/utils/kubernetes_secrets_utils.py +185 -0
- agentex/lib/core/__init__.py +0 -0
- agentex/lib/core/adapters/__init__.py +0 -0
- agentex/lib/core/adapters/llm/__init__.py +1 -0
- agentex/lib/core/adapters/llm/adapter_litellm.py +46 -0
- agentex/lib/core/adapters/llm/adapter_sgp.py +55 -0
- agentex/lib/core/adapters/llm/port.py +24 -0
- agentex/lib/core/adapters/streams/adapter_redis.py +128 -0
- agentex/lib/core/adapters/streams/port.py +50 -0
- agentex/lib/core/clients/__init__.py +1 -0
- agentex/lib/core/clients/temporal/__init__.py +0 -0
- agentex/lib/core/clients/temporal/temporal_client.py +181 -0
- agentex/lib/core/clients/temporal/types.py +47 -0
- agentex/lib/core/clients/temporal/utils.py +56 -0
- agentex/lib/core/services/__init__.py +0 -0
- agentex/lib/core/services/adk/__init__.py +0 -0
- agentex/lib/core/services/adk/acp/__init__.py +0 -0
- agentex/lib/core/services/adk/acp/acp.py +210 -0
- agentex/lib/core/services/adk/agent_task_tracker.py +85 -0
- agentex/lib/core/services/adk/agents.py +43 -0
- agentex/lib/core/services/adk/events.py +61 -0
- agentex/lib/core/services/adk/messages.py +164 -0
- agentex/lib/core/services/adk/providers/__init__.py +0 -0
- agentex/lib/core/services/adk/providers/litellm.py +256 -0
- agentex/lib/core/services/adk/providers/openai.py +723 -0
- agentex/lib/core/services/adk/providers/sgp.py +99 -0
- agentex/lib/core/services/adk/state.py +120 -0
- agentex/lib/core/services/adk/streaming.py +262 -0
- agentex/lib/core/services/adk/tasks.py +69 -0
- agentex/lib/core/services/adk/tracing.py +36 -0
- agentex/lib/core/services/adk/utils/__init__.py +0 -0
- agentex/lib/core/services/adk/utils/templating.py +58 -0
- agentex/lib/core/temporal/__init__.py +0 -0
- agentex/lib/core/temporal/activities/__init__.py +207 -0
- agentex/lib/core/temporal/activities/activity_helpers.py +37 -0
- agentex/lib/core/temporal/activities/adk/__init__.py +0 -0
- agentex/lib/core/temporal/activities/adk/acp/__init__.py +0 -0
- agentex/lib/core/temporal/activities/adk/acp/acp_activities.py +86 -0
- agentex/lib/core/temporal/activities/adk/agent_task_tracker_activities.py +76 -0
- agentex/lib/core/temporal/activities/adk/agents_activities.py +35 -0
- agentex/lib/core/temporal/activities/adk/events_activities.py +50 -0
- agentex/lib/core/temporal/activities/adk/messages_activities.py +94 -0
- agentex/lib/core/temporal/activities/adk/providers/__init__.py +0 -0
- agentex/lib/core/temporal/activities/adk/providers/litellm_activities.py +71 -0
- agentex/lib/core/temporal/activities/adk/providers/openai_activities.py +210 -0
- agentex/lib/core/temporal/activities/adk/providers/sgp_activities.py +42 -0
- agentex/lib/core/temporal/activities/adk/state_activities.py +85 -0
- agentex/lib/core/temporal/activities/adk/streaming_activities.py +33 -0
- agentex/lib/core/temporal/activities/adk/tasks_activities.py +48 -0
- agentex/lib/core/temporal/activities/adk/tracing_activities.py +55 -0
- agentex/lib/core/temporal/activities/adk/utils/__init__.py +0 -0
- agentex/lib/core/temporal/activities/adk/utils/templating_activities.py +41 -0
- agentex/lib/core/temporal/services/__init__.py +0 -0
- agentex/lib/core/temporal/services/temporal_task_service.py +69 -0
- agentex/lib/core/temporal/types/__init__.py +0 -0
- agentex/lib/core/temporal/types/workflow.py +5 -0
- agentex/lib/core/temporal/workers/__init__.py +0 -0
- agentex/lib/core/temporal/workers/worker.py +162 -0
- agentex/lib/core/temporal/workflows/workflow.py +26 -0
- agentex/lib/core/tracing/__init__.py +5 -0
- agentex/lib/core/tracing/processors/agentex_tracing_processor.py +117 -0
- agentex/lib/core/tracing/processors/sgp_tracing_processor.py +119 -0
- agentex/lib/core/tracing/processors/tracing_processor_interface.py +40 -0
- agentex/lib/core/tracing/trace.py +311 -0
- agentex/lib/core/tracing/tracer.py +70 -0
- agentex/lib/core/tracing/tracing_processor_manager.py +62 -0
- agentex/lib/environment_variables.py +87 -0
- agentex/lib/py.typed +0 -0
- agentex/lib/sdk/__init__.py +0 -0
- agentex/lib/sdk/config/__init__.py +0 -0
- agentex/lib/sdk/config/agent_config.py +61 -0
- agentex/lib/sdk/config/agent_manifest.py +219 -0
- agentex/lib/sdk/config/build_config.py +35 -0
- agentex/lib/sdk/config/deployment_config.py +117 -0
- agentex/lib/sdk/config/local_development_config.py +56 -0
- agentex/lib/sdk/config/project_config.py +103 -0
- agentex/lib/sdk/fastacp/__init__.py +3 -0
- agentex/lib/sdk/fastacp/base/base_acp_server.py +406 -0
- agentex/lib/sdk/fastacp/fastacp.py +74 -0
- agentex/lib/sdk/fastacp/impl/agentic_base_acp.py +72 -0
- agentex/lib/sdk/fastacp/impl/sync_acp.py +109 -0
- agentex/lib/sdk/fastacp/impl/temporal_acp.py +97 -0
- agentex/lib/sdk/fastacp/tests/README.md +297 -0
- agentex/lib/sdk/fastacp/tests/conftest.py +307 -0
- agentex/lib/sdk/fastacp/tests/pytest.ini +10 -0
- agentex/lib/sdk/fastacp/tests/run_tests.py +227 -0
- agentex/lib/sdk/fastacp/tests/test_base_acp_server.py +450 -0
- agentex/lib/sdk/fastacp/tests/test_fastacp_factory.py +344 -0
- agentex/lib/sdk/fastacp/tests/test_integration.py +477 -0
- agentex/lib/sdk/state_machine/__init__.py +6 -0
- agentex/lib/sdk/state_machine/noop_workflow.py +21 -0
- agentex/lib/sdk/state_machine/state.py +10 -0
- agentex/lib/sdk/state_machine/state_machine.py +189 -0
- agentex/lib/sdk/state_machine/state_workflow.py +16 -0
- agentex/lib/sdk/utils/__init__.py +0 -0
- agentex/lib/sdk/utils/messages.py +223 -0
- agentex/lib/types/__init__.py +0 -0
- agentex/lib/types/acp.py +94 -0
- agentex/lib/types/agent_configs.py +79 -0
- agentex/lib/types/agent_results.py +29 -0
- agentex/lib/types/credentials.py +34 -0
- agentex/lib/types/fastacp.py +61 -0
- agentex/lib/types/files.py +13 -0
- agentex/lib/types/json_rpc.py +49 -0
- agentex/lib/types/llm_messages.py +354 -0
- agentex/lib/types/task_message_updates.py +171 -0
- agentex/lib/types/tracing.py +34 -0
- agentex/lib/utils/__init__.py +0 -0
- agentex/lib/utils/completions.py +131 -0
- agentex/lib/utils/console.py +14 -0
- agentex/lib/utils/io.py +29 -0
- agentex/lib/utils/iterables.py +14 -0
- agentex/lib/utils/json_schema.py +23 -0
- agentex/lib/utils/logging.py +31 -0
- agentex/lib/utils/mcp.py +17 -0
- agentex/lib/utils/model_utils.py +46 -0
- agentex/lib/utils/parsing.py +15 -0
- agentex/lib/utils/regex.py +6 -0
- agentex/lib/utils/temporal.py +13 -0
- agentex/py.typed +0 -0
- agentex/resources/__init__.py +103 -0
- agentex/resources/agents.py +707 -0
- agentex/resources/events.py +294 -0
- agentex/resources/messages/__init__.py +33 -0
- agentex/resources/messages/batch.py +271 -0
- agentex/resources/messages/messages.py +492 -0
- agentex/resources/spans.py +557 -0
- agentex/resources/states.py +544 -0
- agentex/resources/tasks.py +615 -0
- agentex/resources/tracker.py +384 -0
- agentex/types/__init__.py +56 -0
- agentex/types/acp_type.py +7 -0
- agentex/types/agent.py +29 -0
- agentex/types/agent_list_params.py +13 -0
- agentex/types/agent_list_response.py +10 -0
- agentex/types/agent_rpc_by_name_params.py +21 -0
- agentex/types/agent_rpc_params.py +51 -0
- agentex/types/agent_rpc_params1.py +21 -0
- agentex/types/agent_rpc_response.py +20 -0
- agentex/types/agent_rpc_result.py +90 -0
- agentex/types/agent_task_tracker.py +34 -0
- agentex/types/data_content.py +30 -0
- agentex/types/data_content_param.py +31 -0
- agentex/types/data_delta.py +14 -0
- agentex/types/event.py +29 -0
- agentex/types/event_list_params.py +22 -0
- agentex/types/event_list_response.py +10 -0
- agentex/types/message_author.py +7 -0
- agentex/types/message_create_params.py +18 -0
- agentex/types/message_list_params.py +14 -0
- agentex/types/message_list_response.py +10 -0
- agentex/types/message_style.py +7 -0
- agentex/types/message_update_params.py +18 -0
- agentex/types/messages/__init__.py +8 -0
- agentex/types/messages/batch_create_params.py +16 -0
- agentex/types/messages/batch_create_response.py +10 -0
- agentex/types/messages/batch_update_params.py +16 -0
- agentex/types/messages/batch_update_response.py +10 -0
- agentex/types/shared/__init__.py +3 -0
- agentex/types/shared/task_message_update.py +83 -0
- agentex/types/span.py +36 -0
- agentex/types/span_create_params.py +40 -0
- agentex/types/span_list_params.py +12 -0
- agentex/types/span_list_response.py +10 -0
- agentex/types/span_update_params.py +37 -0
- agentex/types/state.py +25 -0
- agentex/types/state_create_params.py +16 -0
- agentex/types/state_list_params.py +16 -0
- agentex/types/state_list_response.py +10 -0
- agentex/types/state_update_params.py +16 -0
- agentex/types/task.py +23 -0
- agentex/types/task_delete_by_name_response.py +8 -0
- agentex/types/task_delete_response.py +8 -0
- agentex/types/task_list_response.py +10 -0
- agentex/types/task_message.py +33 -0
- agentex/types/task_message_content.py +16 -0
- agentex/types/task_message_content_param.py +17 -0
- agentex/types/task_message_delta.py +16 -0
- agentex/types/text_content.py +53 -0
- agentex/types/text_content_param.py +54 -0
- agentex/types/text_delta.py +14 -0
- agentex/types/tool_request_content.py +36 -0
- agentex/types/tool_request_content_param.py +37 -0
- agentex/types/tool_request_delta.py +18 -0
- agentex/types/tool_response_content.py +36 -0
- agentex/types/tool_response_content_param.py +36 -0
- agentex/types/tool_response_delta.py +18 -0
- agentex/types/tracker_list_params.py +16 -0
- agentex/types/tracker_list_response.py +10 -0
- agentex/types/tracker_update_params.py +19 -0
- agentex_sdk-0.1.0a6.dist-info/METADATA +426 -0
- agentex_sdk-0.1.0a6.dist-info/RECORD +289 -0
- agentex_sdk-0.1.0a6.dist-info/WHEEL +4 -0
- agentex_sdk-0.1.0a6.dist-info/entry_points.txt +2 -0
- agentex_sdk-0.1.0a6.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,16 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing import Dict
|
6
|
+
from typing_extensions import Required, TypedDict
|
7
|
+
|
8
|
+
__all__ = ["StateCreateParams"]
|
9
|
+
|
10
|
+
|
11
|
+
class StateCreateParams(TypedDict, total=False):
|
12
|
+
agent_id: Required[str]
|
13
|
+
|
14
|
+
state: Required[Dict[str, object]]
|
15
|
+
|
16
|
+
task_id: Required[str]
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing import Optional
|
6
|
+
from typing_extensions import TypedDict
|
7
|
+
|
8
|
+
__all__ = ["StateListParams"]
|
9
|
+
|
10
|
+
|
11
|
+
class StateListParams(TypedDict, total=False):
|
12
|
+
agent_id: Optional[str]
|
13
|
+
"""Agent ID"""
|
14
|
+
|
15
|
+
task_id: Optional[str]
|
16
|
+
"""Task ID"""
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import List
|
4
|
+
from typing_extensions import TypeAlias
|
5
|
+
|
6
|
+
from .state import State
|
7
|
+
|
8
|
+
__all__ = ["StateListResponse"]
|
9
|
+
|
10
|
+
StateListResponse: TypeAlias = List[State]
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing import Dict
|
6
|
+
from typing_extensions import Required, TypedDict
|
7
|
+
|
8
|
+
__all__ = ["StateUpdateParams"]
|
9
|
+
|
10
|
+
|
11
|
+
class StateUpdateParams(TypedDict, total=False):
|
12
|
+
agent_id: Required[str]
|
13
|
+
|
14
|
+
state: Required[Dict[str, object]]
|
15
|
+
|
16
|
+
task_id: Required[str]
|
agentex/types/task.py
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import Optional
|
4
|
+
from datetime import datetime
|
5
|
+
from typing_extensions import Literal
|
6
|
+
|
7
|
+
from .._models import BaseModel
|
8
|
+
|
9
|
+
__all__ = ["Task"]
|
10
|
+
|
11
|
+
|
12
|
+
class Task(BaseModel):
|
13
|
+
id: str
|
14
|
+
|
15
|
+
created_at: Optional[datetime] = None
|
16
|
+
|
17
|
+
name: Optional[str] = None
|
18
|
+
|
19
|
+
status: Optional[Literal["CANCELED", "COMPLETED", "FAILED", "RUNNING", "TERMINATED", "TIMED_OUT"]] = None
|
20
|
+
|
21
|
+
status_reason: Optional[str] = None
|
22
|
+
|
23
|
+
updated_at: Optional[datetime] = None
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import List
|
4
|
+
from typing_extensions import TypeAlias
|
5
|
+
|
6
|
+
from .task import Task
|
7
|
+
|
8
|
+
__all__ = ["TaskListResponse"]
|
9
|
+
|
10
|
+
TaskListResponse: TypeAlias = List[Task]
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import Optional
|
4
|
+
from datetime import datetime
|
5
|
+
from typing_extensions import Literal
|
6
|
+
|
7
|
+
from .._models import BaseModel
|
8
|
+
from .task_message_content import TaskMessageContent
|
9
|
+
|
10
|
+
__all__ = ["TaskMessage"]
|
11
|
+
|
12
|
+
|
13
|
+
class TaskMessage(BaseModel):
|
14
|
+
content: TaskMessageContent
|
15
|
+
"""The content of the message.
|
16
|
+
|
17
|
+
This content is not OpenAI compatible. These are messages that are meant to be
|
18
|
+
displayed to the user.
|
19
|
+
"""
|
20
|
+
|
21
|
+
task_id: str
|
22
|
+
"""ID of the task this message belongs to"""
|
23
|
+
|
24
|
+
id: Optional[str] = None
|
25
|
+
"""The task message's unique id"""
|
26
|
+
|
27
|
+
created_at: Optional[datetime] = None
|
28
|
+
"""The timestamp when the message was created"""
|
29
|
+
|
30
|
+
streaming_status: Optional[Literal["IN_PROGRESS", "DONE"]] = None
|
31
|
+
|
32
|
+
updated_at: Optional[datetime] = None
|
33
|
+
"""The timestamp when the message was last updated"""
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import Union
|
4
|
+
from typing_extensions import Annotated, TypeAlias
|
5
|
+
|
6
|
+
from .._utils import PropertyInfo
|
7
|
+
from .data_content import DataContent
|
8
|
+
from .text_content import TextContent
|
9
|
+
from .tool_request_content import ToolRequestContent
|
10
|
+
from .tool_response_content import ToolResponseContent
|
11
|
+
|
12
|
+
__all__ = ["TaskMessageContent"]
|
13
|
+
|
14
|
+
TaskMessageContent: TypeAlias = Annotated[
|
15
|
+
Union[TextContent, DataContent, ToolRequestContent, ToolResponseContent], PropertyInfo(discriminator="type")
|
16
|
+
]
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing import Union
|
6
|
+
from typing_extensions import TypeAlias
|
7
|
+
|
8
|
+
from .data_content_param import DataContentParam
|
9
|
+
from .text_content_param import TextContentParam
|
10
|
+
from .tool_request_content_param import ToolRequestContentParam
|
11
|
+
from .tool_response_content_param import ToolResponseContentParam
|
12
|
+
|
13
|
+
__all__ = ["TaskMessageContentParam"]
|
14
|
+
|
15
|
+
TaskMessageContentParam: TypeAlias = Union[
|
16
|
+
TextContentParam, DataContentParam, ToolRequestContentParam, ToolResponseContentParam
|
17
|
+
]
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import Union
|
4
|
+
from typing_extensions import Annotated, TypeAlias
|
5
|
+
|
6
|
+
from .._utils import PropertyInfo
|
7
|
+
from .data_delta import DataDelta
|
8
|
+
from .text_delta import TextDelta
|
9
|
+
from .tool_request_delta import ToolRequestDelta
|
10
|
+
from .tool_response_delta import ToolResponseDelta
|
11
|
+
|
12
|
+
__all__ = ["TaskMessageDelta"]
|
13
|
+
|
14
|
+
TaskMessageDelta: TypeAlias = Annotated[
|
15
|
+
Union[TextDelta, DataDelta, ToolRequestDelta, ToolResponseDelta], PropertyInfo(discriminator="type")
|
16
|
+
]
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import List, Optional
|
4
|
+
from typing_extensions import Literal
|
5
|
+
|
6
|
+
from .._models import BaseModel
|
7
|
+
from .message_style import MessageStyle
|
8
|
+
from .message_author import MessageAuthor
|
9
|
+
|
10
|
+
__all__ = ["TextContent", "Attachment"]
|
11
|
+
|
12
|
+
|
13
|
+
class Attachment(BaseModel):
|
14
|
+
file_id: str
|
15
|
+
"""The unique ID of the attached file"""
|
16
|
+
|
17
|
+
name: str
|
18
|
+
"""The name of the file"""
|
19
|
+
|
20
|
+
size: int
|
21
|
+
"""The size of the file in bytes"""
|
22
|
+
|
23
|
+
type: str
|
24
|
+
"""The MIME type or content type of the file"""
|
25
|
+
|
26
|
+
|
27
|
+
class TextContent(BaseModel):
|
28
|
+
author: MessageAuthor
|
29
|
+
"""
|
30
|
+
The role of the messages author, in this case `system`, `user`, `assistant`, or
|
31
|
+
`tool`.
|
32
|
+
"""
|
33
|
+
|
34
|
+
content: str
|
35
|
+
"""The contents of the text message."""
|
36
|
+
|
37
|
+
attachments: Optional[List[Attachment]] = None
|
38
|
+
"""Optional list of file attachments with structured metadata."""
|
39
|
+
|
40
|
+
format: Literal["markdown", "plain", "code"] = "plain"
|
41
|
+
"""The format of the message.
|
42
|
+
|
43
|
+
This is used by the client to determine how to display the message.
|
44
|
+
"""
|
45
|
+
|
46
|
+
style: MessageStyle = "static"
|
47
|
+
"""The style of the message.
|
48
|
+
|
49
|
+
This is used by the client to determine how to display the message.
|
50
|
+
"""
|
51
|
+
|
52
|
+
type: Literal["text"] = "text"
|
53
|
+
"""The type of the message, in this case `text`."""
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing import Iterable, Optional
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
7
|
+
|
8
|
+
from .message_style import MessageStyle
|
9
|
+
from .message_author import MessageAuthor
|
10
|
+
|
11
|
+
__all__ = ["TextContentParam", "Attachment"]
|
12
|
+
|
13
|
+
|
14
|
+
class Attachment(TypedDict, total=False):
|
15
|
+
file_id: Required[str]
|
16
|
+
"""The unique ID of the attached file"""
|
17
|
+
|
18
|
+
name: Required[str]
|
19
|
+
"""The name of the file"""
|
20
|
+
|
21
|
+
size: Required[int]
|
22
|
+
"""The size of the file in bytes"""
|
23
|
+
|
24
|
+
type: Required[str]
|
25
|
+
"""The MIME type or content type of the file"""
|
26
|
+
|
27
|
+
|
28
|
+
class TextContentParam(TypedDict, total=False):
|
29
|
+
author: Required[MessageAuthor]
|
30
|
+
"""
|
31
|
+
The role of the messages author, in this case `system`, `user`, `assistant`, or
|
32
|
+
`tool`.
|
33
|
+
"""
|
34
|
+
|
35
|
+
content: Required[str]
|
36
|
+
"""The contents of the text message."""
|
37
|
+
|
38
|
+
attachments: Optional[Iterable[Attachment]]
|
39
|
+
"""Optional list of file attachments with structured metadata."""
|
40
|
+
|
41
|
+
format: Literal["markdown", "plain", "code"]
|
42
|
+
"""The format of the message.
|
43
|
+
|
44
|
+
This is used by the client to determine how to display the message.
|
45
|
+
"""
|
46
|
+
|
47
|
+
style: MessageStyle
|
48
|
+
"""The style of the message.
|
49
|
+
|
50
|
+
This is used by the client to determine how to display the message.
|
51
|
+
"""
|
52
|
+
|
53
|
+
type: Literal["text"]
|
54
|
+
"""The type of the message, in this case `text`."""
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import Optional
|
4
|
+
from typing_extensions import Literal
|
5
|
+
|
6
|
+
from .._models import BaseModel
|
7
|
+
|
8
|
+
__all__ = ["TextDelta"]
|
9
|
+
|
10
|
+
|
11
|
+
class TextDelta(BaseModel):
|
12
|
+
text_delta: Optional[str] = None
|
13
|
+
|
14
|
+
type: Optional[Literal["text"]] = None
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import Dict, Optional
|
4
|
+
from typing_extensions import Literal
|
5
|
+
|
6
|
+
from .._models import BaseModel
|
7
|
+
from .message_style import MessageStyle
|
8
|
+
from .message_author import MessageAuthor
|
9
|
+
|
10
|
+
__all__ = ["ToolRequestContent"]
|
11
|
+
|
12
|
+
|
13
|
+
class ToolRequestContent(BaseModel):
|
14
|
+
arguments: Dict[str, object]
|
15
|
+
"""The arguments to the tool."""
|
16
|
+
|
17
|
+
author: MessageAuthor
|
18
|
+
"""
|
19
|
+
The role of the messages author, in this case `system`, `user`, `assistant`, or
|
20
|
+
`tool`.
|
21
|
+
"""
|
22
|
+
|
23
|
+
name: str
|
24
|
+
"""The name of the tool that is being requested."""
|
25
|
+
|
26
|
+
tool_call_id: str
|
27
|
+
"""The ID of the tool call that is being requested."""
|
28
|
+
|
29
|
+
style: MessageStyle = "static"
|
30
|
+
"""The style of the message.
|
31
|
+
|
32
|
+
This is used by the client to determine how to display the message.
|
33
|
+
"""
|
34
|
+
|
35
|
+
type: Literal["tool_request"] = "tool_request"
|
36
|
+
"""The type of the message, in this case `tool_request`."""
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing import Dict
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
7
|
+
|
8
|
+
from .message_style import MessageStyle
|
9
|
+
from .message_author import MessageAuthor
|
10
|
+
|
11
|
+
__all__ = ["ToolRequestContentParam"]
|
12
|
+
|
13
|
+
|
14
|
+
class ToolRequestContentParam(TypedDict, total=False):
|
15
|
+
arguments: Required[Dict[str, object]]
|
16
|
+
"""The arguments to the tool."""
|
17
|
+
|
18
|
+
author: Required[MessageAuthor]
|
19
|
+
"""
|
20
|
+
The role of the messages author, in this case `system`, `user`, `assistant`, or
|
21
|
+
`tool`.
|
22
|
+
"""
|
23
|
+
|
24
|
+
name: Required[str]
|
25
|
+
"""The name of the tool that is being requested."""
|
26
|
+
|
27
|
+
tool_call_id: Required[str]
|
28
|
+
"""The ID of the tool call that is being requested."""
|
29
|
+
|
30
|
+
style: MessageStyle
|
31
|
+
"""The style of the message.
|
32
|
+
|
33
|
+
This is used by the client to determine how to display the message.
|
34
|
+
"""
|
35
|
+
|
36
|
+
type: Literal["tool_request"]
|
37
|
+
"""The type of the message, in this case `tool_request`."""
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import Optional
|
4
|
+
from typing_extensions import Literal
|
5
|
+
|
6
|
+
from .._models import BaseModel
|
7
|
+
|
8
|
+
__all__ = ["ToolRequestDelta"]
|
9
|
+
|
10
|
+
|
11
|
+
class ToolRequestDelta(BaseModel):
|
12
|
+
name: str
|
13
|
+
|
14
|
+
tool_call_id: str
|
15
|
+
|
16
|
+
arguments_delta: Optional[str] = None
|
17
|
+
|
18
|
+
type: Optional[Literal["tool_request"]] = None
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import Optional
|
4
|
+
from typing_extensions import Literal
|
5
|
+
|
6
|
+
from .._models import BaseModel
|
7
|
+
from .message_style import MessageStyle
|
8
|
+
from .message_author import MessageAuthor
|
9
|
+
|
10
|
+
__all__ = ["ToolResponseContent"]
|
11
|
+
|
12
|
+
|
13
|
+
class ToolResponseContent(BaseModel):
|
14
|
+
author: MessageAuthor
|
15
|
+
"""
|
16
|
+
The role of the messages author, in this case `system`, `user`, `assistant`, or
|
17
|
+
`tool`.
|
18
|
+
"""
|
19
|
+
|
20
|
+
content: object
|
21
|
+
"""The result of the tool."""
|
22
|
+
|
23
|
+
name: str
|
24
|
+
"""The name of the tool that is being responded to."""
|
25
|
+
|
26
|
+
tool_call_id: str
|
27
|
+
"""The ID of the tool call that is being responded to."""
|
28
|
+
|
29
|
+
style: MessageStyle = "static"
|
30
|
+
"""The style of the message.
|
31
|
+
|
32
|
+
This is used by the client to determine how to display the message.
|
33
|
+
"""
|
34
|
+
|
35
|
+
type: Literal["tool_response"] = "tool_response"
|
36
|
+
"""The type of the message, in this case `tool_response`."""
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing_extensions import Literal, Required, TypedDict
|
6
|
+
|
7
|
+
from .message_style import MessageStyle
|
8
|
+
from .message_author import MessageAuthor
|
9
|
+
|
10
|
+
__all__ = ["ToolResponseContentParam"]
|
11
|
+
|
12
|
+
|
13
|
+
class ToolResponseContentParam(TypedDict, total=False):
|
14
|
+
author: Required[MessageAuthor]
|
15
|
+
"""
|
16
|
+
The role of the messages author, in this case `system`, `user`, `assistant`, or
|
17
|
+
`tool`.
|
18
|
+
"""
|
19
|
+
|
20
|
+
content: Required[object]
|
21
|
+
"""The result of the tool."""
|
22
|
+
|
23
|
+
name: Required[str]
|
24
|
+
"""The name of the tool that is being responded to."""
|
25
|
+
|
26
|
+
tool_call_id: Required[str]
|
27
|
+
"""The ID of the tool call that is being responded to."""
|
28
|
+
|
29
|
+
style: MessageStyle
|
30
|
+
"""The style of the message.
|
31
|
+
|
32
|
+
This is used by the client to determine how to display the message.
|
33
|
+
"""
|
34
|
+
|
35
|
+
type: Literal["tool_response"]
|
36
|
+
"""The type of the message, in this case `tool_response`."""
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import Optional
|
4
|
+
from typing_extensions import Literal
|
5
|
+
|
6
|
+
from .._models import BaseModel
|
7
|
+
|
8
|
+
__all__ = ["ToolResponseDelta"]
|
9
|
+
|
10
|
+
|
11
|
+
class ToolResponseDelta(BaseModel):
|
12
|
+
name: str
|
13
|
+
|
14
|
+
tool_call_id: str
|
15
|
+
|
16
|
+
content_delta: Optional[str] = None
|
17
|
+
|
18
|
+
type: Optional[Literal["tool_response"]] = None
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing import Optional
|
6
|
+
from typing_extensions import TypedDict
|
7
|
+
|
8
|
+
__all__ = ["TrackerListParams"]
|
9
|
+
|
10
|
+
|
11
|
+
class TrackerListParams(TypedDict, total=False):
|
12
|
+
agent_id: Optional[str]
|
13
|
+
"""Agent ID"""
|
14
|
+
|
15
|
+
task_id: Optional[str]
|
16
|
+
"""Task ID"""
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import List
|
4
|
+
from typing_extensions import TypeAlias
|
5
|
+
|
6
|
+
from .agent_task_tracker import AgentTaskTracker
|
7
|
+
|
8
|
+
__all__ = ["TrackerListResponse"]
|
9
|
+
|
10
|
+
TrackerListResponse: TypeAlias = List[AgentTaskTracker]
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing import Optional
|
6
|
+
from typing_extensions import TypedDict
|
7
|
+
|
8
|
+
__all__ = ["TrackerUpdateParams"]
|
9
|
+
|
10
|
+
|
11
|
+
class TrackerUpdateParams(TypedDict, total=False):
|
12
|
+
last_processed_event_id: Optional[str]
|
13
|
+
"""The most recent processed event ID (omit to leave unchanged)"""
|
14
|
+
|
15
|
+
status: Optional[str]
|
16
|
+
"""Processing status"""
|
17
|
+
|
18
|
+
status_reason: Optional[str]
|
19
|
+
"""Optional status reason"""
|