diff --git a/.roe-main-release-version b/.roe-main-release-version index f749893..b1194c6 100644 --- a/.roe-main-release-version +++ b/.roe-main-release-version @@ -1 +1 @@ -1-1-1 +1-0-84 diff --git a/README.md b/README.md index be3534a..52d02cb 100644 --- a/README.md +++ b/README.md @@ -113,9 +113,9 @@ result carries `result["status"] == JobStatus.FAILURE` and hierarchy above. -## SDK Operation Groups +## Generated Friendly APIs -Common operations are available directly on the SDK client. +This block is synced from `roe-main/roe-sdk/sdk_contract.yml` during SDK fan-out. ```python engines = client.discovery.list_agent_engine_types() diff --git a/openapi/openapi.yml b/openapi/openapi.yml index e5c4f66..405bb20 100644 --- a/openapi/openapi.yml +++ b/openapi/openapi.yml @@ -449,8 +449,8 @@ paths: /v1/agents/{agent_id}/jobs/cancel-all/: post: operationId: agents_jobs_cancel_all_create - description: Cancel all running jobs for a given agent. - summary: Cancel all agent jobs + description: Cancel all running jobs for an agent. + summary: Cancel all running agent jobs (:cancelAll) parameters: - in: path name: agent_id @@ -471,22 +471,13 @@ paths: - sdk security: - apiKeyAuth: [] - deprecated: true responses: - '204': - description: All running agent jobs cancelled successfully - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorDetailResponse' - description: Access forbidden - '404': + '200': content: application/json: schema: - $ref: '#/components/schemas/ErrorDetailResponse' - description: Agent not found + $ref: '#/components/schemas/AgentJobCancelAllResponse' + description: '' /v1/agents/{agent_id}/versions/: get: operationId: agents_versions_list @@ -918,7 +909,7 @@ paths: accepts_multiple_files: null engine_config: text: ${text} - model: gpt-5.5-2026-04-23 + model: gpt-4.1-2025-04-14 instruction: Process the text temperature: '0.0' output_schema: '{"type":"string","description":"The result"}' @@ -3399,6 +3390,21 @@ components: - data_type - description - key + AgentJobCancelAllResponse: + type: object + properties: + task_id: + type: + - string + - 'null' + targeted_count: + type: integer + note: + type: string + required: + - note + - targeted_count + - task_id AgentJobDeleteDataResponse: type: object description: Response payload of purge_agent_job_data (delete-data and :purgeData). diff --git a/openapi/readme_blocks.yml b/openapi/readme_blocks.yml index 57287fc..91a18c1 100644 --- a/openapi/readme_blocks.yml +++ b/openapi/readme_blocks.yml @@ -4,9 +4,9 @@ blocks: generated_friendly_apis: python: | - ## SDK Operation Groups + ## Generated Friendly APIs - Common operations are available directly on the SDK client. + This block is synced from `roe-main/roe-sdk/sdk_contract.yml` during SDK fan-out. ```python engines = client.discovery.list_agent_engine_types() @@ -19,9 +19,9 @@ blocks: ) ``` typescript: | - ## SDK Operation Groups + ## Generated Friendly APIs - Common operations are available directly on the SDK client. + This block is synced from `roe-main/roe-sdk/sdk_contract.yml` during SDK fan-out. ```typescript const engines = await client.discovery.listAgentEngineTypes(); @@ -34,9 +34,9 @@ blocks: }); ``` go: | - ## SDK Operation Groups + ## Generated Friendly APIs - Common operations are available directly on the SDK client. + This block is synced from `roe-main/roe-sdk/sdk_contract.yml` during SDK fan-out. ```go engines, err := client.Discovery.ListAgentEngineTypes() diff --git a/openapi/wrappers.yml b/openapi/wrappers.yml index e62659b..ec8c9d3 100644 --- a/openapi/wrappers.yml +++ b/openapi/wrappers.yml @@ -28,16 +28,8 @@ apis: pass_unset_when_none: true tables: class_name: TablesAPI - docstring: API for managing Roe tables. + docstring: API for uploading CSV files into Roe tables. operations: - - kind: body - method_name: list - docstring: List Roe tables. - method: GET - path: /v1/tables/ - endpoint_module: roe._generated.api.tables.tables_list - return_type: TableListResponse - return_import: roe._generated.models.table_list_response.TableListResponse - kind: table_upload method_name: upload docstring: Upload a CSV file and create a Roe table. @@ -47,906 +39,3 @@ apis: empty_response_message: table upload returned an empty response body_type: TableUploadRequest body_import: roe._generated.models.table_upload_request.TableUploadRequest - - kind: body - method_name: query - docstring: Run a read-only query against Roe tables. - method: POST - path: /v1/tables/query/ - endpoint_module: roe._generated.api.tables.tables_query_create - return_type: TableQuerySubmitResponse - return_import: roe._generated.models.table_query_submit_response.TableQuerySubmitResponse - body_type: TableQueryRequest - body_import: roe._generated.models.table_query_request.TableQueryRequest - parameters: - - name: sql - location: body - wire_name: sql - annotation: str - - name: limit - location: body - wire_name: limit - annotation: int | None - default: null - pass_unset_when_none: true - - kind: body - method_name: query_result - docstring: Get the result for a submitted table query. - method: GET - path: /v1/tables/query/{table_query_id}/result/ - endpoint_module: roe._generated.api.tables.tables_query_result_retrieve - return_type: TableQueryResultResponse - return_import: roe._generated.models.table_query_result_response.TableQueryResultResponse - parameters: - - name: table_query_id - location: path - wire_name: table_query_id - annotation: str - - kind: body - method_name: describe - docstring: Describe a Roe table. - method: GET - path: /v1/tables/{table_name}/describe/ - endpoint_module: roe._generated.api.tables.tables_describe_retrieve - return_type: TableDescribeResponse - return_import: roe._generated.models.table_describe_response.TableDescribeResponse - parameters: - - name: table_name - location: path - wire_name: table_name - annotation: str - - kind: body - method_name: preview - docstring: Preview rows from a Roe table. - method: GET - path: /v1/tables/{table_name}/preview/ - endpoint_module: roe._generated.api.tables.tables_preview_retrieve - return_type: TablePreviewResponse - return_import: roe._generated.models.table_preview_response.TablePreviewResponse - parameters: - - name: table_name - location: path - wire_name: table_name - annotation: str - - name: limit - location: query - wire_name: limit - annotation: int | None - default: null - pass_unset_when_none: true - - kind: body - method_name: delete - docstring: Delete a Roe table. - method: DELETE - path: /v1/tables/{table_name}/ - endpoint_module: roe._generated.api.tables.tables_destroy - parameters: - - name: table_name - location: path - wire_name: table_name - annotation: str - agents: - class_name: AgentsAPI - docstring: API for managing and running agents. - operations: - - kind: body - method_name: list - docstring: '' - method: GET - path: /v1/agents/ - endpoint_module: roe._generated.api.agents.agents_list - return_type: PaginatedBaseAgentList - return_import: roe._generated.models.paginated_base_agent_list.PaginatedBaseAgentList - parameters: - - name: page - location: query - annotation: int | None - default: null - pass_unset_when_none: true - - name: page_size - location: query - annotation: int | None - default: null - pass_unset_when_none: true - - kind: body - method_name: retrieve - docstring: '' - method: GET - path: /v1/agents/{agent_id}/ - endpoint_module: roe._generated.api.agents.agents_retrieve - return_type: BaseAgent - return_import: roe._generated.models.base_agent.BaseAgent - parameters: - - name: agent_id - location: path - annotation: str - coerce: uuid - - kind: body - method_name: create - docstring: '' - method: POST - path: /v1/agents/ - endpoint_module: roe._generated.api.agents.agents_create - return_type: BaseAgent - return_import: roe._generated.models.base_agent.BaseAgent - body_type: BaseAgentCreateRequest - body_import: roe._generated.models.base_agent_create_request.BaseAgentCreateRequest - inject_organization_id: true - parameters: - - name: name - location: body - annotation: str - - name: engine_class_id - location: body - annotation: str - - name: input_definitions - location: body - annotation: list[dict[str, Any]] | None - default: null - or_empty: list - - name: engine_config - location: body - annotation: dict[str, Any] | None - default: null - or_empty: dict - - name: version_name - location: body - annotation: str | None - default: null - pass_unset_when_none: true - - name: description - location: body - annotation: str | None - default: null - pass_unset_when_none: true - - kind: body - method_name: update - docstring: Update an agent via PATCH (partial update). - method: PATCH - path: /v1/agents/{agent_id}/ - endpoint_module: roe._generated.api.agents.agents_partial_update - return_type: BaseAgent - return_import: roe._generated.models.base_agent.BaseAgent - body_type: PatchedBaseAgentUpdateRequest - body_import: roe._generated.models.patched_base_agent_update_request.PatchedBaseAgentUpdateRequest - parameters: - - name: agent_id - location: path - annotation: str - coerce: uuid - - name: name - location: body - annotation: str | None - default: null - pass_unset_when_none: true - - name: disable_cache - location: body - annotation: bool | None - default: null - pass_unset_when_none: true - - name: cache_failed_jobs - location: body - annotation: bool | None - default: null - pass_unset_when_none: true - - kind: body - method_name: replace - docstring: Replace an agent via PUT. - method: PUT - path: /v1/agents/{agent_id}/ - endpoint_module: roe._generated.api.agents.agents_update - return_type: BaseAgent - return_import: roe._generated.models.base_agent.BaseAgent - body_type: BaseAgentUpdateRequest - body_import: roe._generated.models.base_agent_update_request.BaseAgentUpdateRequest - inject_organization_id: true - parameters: - - name: agent_id - location: path - annotation: str - coerce: uuid - - name: name - location: body - annotation: str | None - default: null - pass_unset_when_none: true - - name: disable_cache - location: body - annotation: bool | None - default: null - pass_unset_when_none: true - - name: cache_failed_jobs - location: body - annotation: bool | None - default: null - pass_unset_when_none: true - - kind: body - method_name: delete - docstring: '' - method: DELETE - path: /v1/agents/{agent_id}/ - endpoint_module: roe._generated.api.agents.agents_destroy - parameters: - - name: agent_id - location: path - annotation: str - coerce: uuid - - kind: body - method_name: duplicate - docstring: |- - Duplicate an agent. Returns the resulting ``AgentVersion``. - - The endpoint historically returned a JSON object with a ``base_agent`` - key wrapping the new agent; the generated client now models the - response as ``AgentVersion`` directly. Callers wanting the new base - agent should read ``result.base_agent`` (already populated). - method: POST - path: /v1/agents/{agent_id}/duplicate/ - endpoint_module: roe._generated.api.agents.agents_duplicate_create - return_type: AgentVersion - return_import: roe._generated.models.agent_version.AgentVersion - parameters: - - name: agent_id - location: path - annotation: str - coerce: uuid - - kind: manual - method_name: run - docstring: Run an agent asynchronously and return a Job handle. - method: POST - path: /v1/agents/run/{agent_id}/async/ - - kind: manual - method_name: run_many - docstring: Run an agent over a batch of inputs and return a JobBatch handle. - method: POST - path: /v1/agents/run/{agent_id}/async/many/ - - kind: manual - method_name: run_sync - docstring: Run an agent synchronously and return its output data. - method: POST - path: /v1/agents/run/{agent_id}/ - - kind: manual - method_name: run_version - docstring: Run a specific agent version asynchronously and return a Job handle. - method: POST - path: /v1/agents/run/{agent_id}/versions/{agent_version_id}/async/ - - kind: manual - method_name: run_version_sync - docstring: Run a specific agent version synchronously and return its output data. - method: POST - path: /v1/agents/run/{agent_id}/versions/{agent_version_id}/ - namespaces: - versions: - class_name: AgentVersionsAPI - attr: versions - docstring: Nested API for agent version operations. - operations: - - kind: body - method_name: list - docstring: '' - method: GET - path: /v1/agents/{agent_id}/versions/ - endpoint_module: roe._generated.api.agents.agents_versions_list - return_type: AgentVersion - return_import: roe._generated.models.agent_version.AgentVersion - return_shape: list - list_error_label: agent versions - parameters: - - name: agent_id - location: path - annotation: str - coerce: uuid - - kind: body - method_name: retrieve - docstring: '' - method: GET - path: /v1/agents/{agent_id}/versions/{agent_version_id}/ - endpoint_module: roe._generated.api.agents.agents_versions_retrieve - return_type: AgentVersion - return_import: roe._generated.models.agent_version.AgentVersion - parameters: - - name: agent_id - location: path - annotation: str - coerce: uuid - - name: version_id - location: path - annotation: str - coerce: uuid - - name: get_supports_eval - location: query - annotation: bool | None - default: null - pass_unset_when_none: true - - kind: body - method_name: retrieve_current - docstring: '' - method: GET - path: /v1/agents/{agent_id}/versions/current/ - endpoint_module: roe._generated.api.agents.agents_versions_current_retrieve - return_type: AgentVersion - return_import: roe._generated.models.agent_version.AgentVersion - parameters: - - name: agent_id - location: path - annotation: str - coerce: uuid - - kind: body - method_name: create - docstring: '' - method: POST - path: /v1/agents/{agent_id}/versions/ - endpoint_module: roe._generated.api.agents.agents_versions_create - return_type: AgentVersion - return_import: roe._generated.models.agent_version.AgentVersion - body_type: AgentVersionCreateRequest - body_import: roe._generated.models.agent_version_create_request.AgentVersionCreateRequest - refetch_with_retrieve: true - parameters: - - name: agent_id - location: path - annotation: str - coerce: uuid - - name: input_definitions - location: body - annotation: list[dict[str, Any]] | None - default: null - or_empty: list - - name: engine_config - location: body - annotation: dict[str, Any] | None - default: null - or_empty: dict - - name: version_name - location: body - annotation: str | None - default: null - pass_unset_when_none: true - - name: description - location: body - annotation: str | None - default: null - pass_unset_when_none: true - - kind: body - method_name: update - docstring: Update an agent version via PATCH (partial update). - method: PATCH - path: /v1/agents/{agent_id}/versions/{agent_version_id}/ - endpoint_module: roe._generated.api.agents.agents_versions_partial_update - body_type: PatchedAgentVersionUpdateRequest - body_import: roe._generated.models.patched_agent_version_update_request.PatchedAgentVersionUpdateRequest - parameters: - - name: agent_id - location: path - annotation: str - coerce: uuid - - name: version_id - location: path - annotation: str - coerce: uuid - - name: version_name - location: body - annotation: str | None - default: null - pass_unset_when_none: true - - name: description - location: body - annotation: str | None - default: null - pass_unset_when_none: true - - kind: body - method_name: replace - docstring: Replace an agent version via PUT. - method: PUT - path: /v1/agents/{agent_id}/versions/{agent_version_id}/ - endpoint_module: roe._generated.api.agents.agents_versions_update - return_type: MessageResponse - return_import: roe._generated.models.message_response.MessageResponse - body_type: AgentVersionUpdateRequest - body_import: roe._generated.models.agent_version_update_request.AgentVersionUpdateRequest - inject_organization_id: true - parameters: - - name: agent_id - location: path - annotation: str - coerce: uuid - - name: version_id - location: path - annotation: str - coerce: uuid - - name: version_name - location: body - annotation: str | None - default: null - pass_unset_when_none: true - - name: description - location: body - annotation: str | None - default: null - pass_unset_when_none: true - - kind: body - method_name: delete - docstring: '' - method: DELETE - path: /v1/agents/{agent_id}/versions/{agent_version_id}/ - endpoint_module: roe._generated.api.agents.agents_versions_destroy - parameters: - - name: agent_id - location: path - annotation: str - coerce: uuid - - name: version_id - location: path - annotation: str - coerce: uuid - jobs: - class_name: AgentJobsAPI - attr: jobs - docstring: Nested API for agent job operations. - operations: - - kind: body - method_name: retrieve_status - docstring: '' - method: GET - path: /v1/agents/jobs/{job_id}/status/ - endpoint_module: roe._generated.api.agents.agents_jobs_status_retrieve - return_type: AgentJobSingleStatus - return_import: roe._generated.models.agent_job_single_status.AgentJobSingleStatus - parameters: - - name: job_id - location: path - annotation: str - coerce: uuid - - kind: body - method_name: retrieve_result - docstring: '' - method: GET - path: /v1/agents/jobs/{agent_job_id}/result/ - endpoint_module: roe._generated.api.agents.agents_jobs_result_retrieve - return_type: AgentJobResultResponse - return_import: roe._generated.models.agent_job_result_response.AgentJobResultResponse - parameters: - - name: job_id - location: path - annotation: str - coerce: uuid - - kind: body - method_name: cancel - docstring: '' - method: POST - path: /v1/agents/jobs/{job_id}/cancel/ - endpoint_module: roe._generated.api.agents.agents_jobs_cancel_create - parameters: - - name: job_id - location: path - annotation: str - coerce: uuid - - kind: body - method_name: cancel_all - docstring: '' - method: POST - path: /v1/agents/{agent_id}/jobs/cancel-all/ - endpoint_module: roe._generated.api.agents.agents_jobs_cancel_all_create - parameters: - - name: agent_id - location: path - annotation: str - coerce: uuid - - kind: body - method_name: delete_data - docstring: '' - method: POST - path: /v1/agents/jobs/{job_id}/delete-data/ - endpoint_module: roe._generated.api.agents.agents_jobs_delete_data_create - return_type: AgentJobDeleteDataResponse - return_import: roe._generated.models.agent_job_delete_data_response.AgentJobDeleteDataResponse - parameters: - - name: job_id - location: path - annotation: str - coerce: uuid - - kind: manual - method_name: retrieve_status_many - docstring: Retrieve statuses for many jobs (chunked batch calls). - method: POST - path: /v1/agents/jobs/statuses/ - - kind: manual - method_name: retrieve_result_many - docstring: Retrieve results for many jobs (chunked batch calls). - method: POST - path: /v1/agents/jobs/results/ - - kind: manual - method_name: download_reference - docstring: Download a binary reference produced by an agent job. - method: GET - path: /v1/agents/jobs/{agent_job_id}/references/{resource_id}/ - connections: - class_name: ConnectionsAPI - docstring: API for managing external data connections. - operations: - - kind: body - method_name: list - docstring: List connections. - method: GET - path: /v1/connections/ - endpoint_module: roe._generated.api.connections.connections_list - return_type: PaginatedConnectionListList - return_import: roe._generated.models.paginated_connection_list_list.PaginatedConnectionListList - inject_organization_id: true - parameters: - - name: connector_type - location: query - wire_name: connector_type - annotation: str | None - default: null - pass_unset_when_none: true - - name: search - location: query - wire_name: search - annotation: str | None - default: null - pass_unset_when_none: true - - name: page - location: query - wire_name: page - annotation: int | None - default: null - pass_unset_when_none: true - - name: page_size - location: query - wire_name: page_size - annotation: int | None - default: null - pass_unset_when_none: true - - kind: body - method_name: create - docstring: Create a connection. - method: POST - path: /v1/connections/ - endpoint_module: roe._generated.api.connections.connections_create - return_type: Connection - return_import: roe._generated.models.connection.Connection - body_format: dict - inject_organization_id: true - parameters: - - name: connector_type - location: body - wire_name: connector_type - annotation: str - - name: name - location: body - wire_name: name - annotation: str - - name: config - location: body - wire_name: config - annotation: dict[str, Any] - - name: description - location: body - wire_name: description - annotation: str | None - default: null - pass_unset_when_none: true - - name: auth_config - location: body - wire_name: auth_config - annotation: dict[str, Any] | None - default: null - pass_unset_when_none: true - - kind: body - method_name: test_credentials - docstring: Test connection credentials without saving a connection. - method: POST - path: /v1/connections/test-credentials/ - endpoint_module: roe._generated.api.connections.connections_test_credentials_create - return_type: TestConnection - return_import: roe._generated.models.test_connection.TestConnection - body_format: dict - parameters: - - name: connector_type - location: body - wire_name: connector_type - annotation: str - - name: config - location: body - wire_name: config - annotation: dict[str, Any] - - name: auth_config - location: body - wire_name: auth_config - annotation: dict[str, Any] | None - default: null - pass_unset_when_none: true - - kind: body - method_name: retrieve - docstring: Retrieve a connection. - method: GET - path: /v1/connections/{id}/ - endpoint_module: roe._generated.api.connections.connections_retrieve - return_type: Connection - return_import: roe._generated.models.connection.Connection - inject_organization_id: true - parameters: - - name: connection_id - location: path - wire_name: id - annotation: str - - kind: body - method_name: update - docstring: Update mutable connection fields. - method: PATCH - path: /v1/connections/{id}/ - endpoint_module: roe._generated.api.connections.connections_partial_update - return_type: Connection - return_import: roe._generated.models.connection.Connection - body_format: dict - inject_organization_id: true - parameters: - - name: connection_id - location: path - wire_name: id - annotation: str - - name: name - location: body - wire_name: name - annotation: str | None - default: null - pass_unset_when_none: true - - name: description - location: body - wire_name: description - annotation: str | None - default: null - pass_unset_when_none: true - - name: config - location: body - wire_name: config - annotation: dict[str, Any] | None - default: null - pass_unset_when_none: true - - name: auth_config - location: body - wire_name: auth_config - annotation: dict[str, Any] | None - default: null - pass_unset_when_none: true - - kind: body - method_name: replace - docstring: Replace a connection. - method: PUT - path: /v1/connections/{id}/ - endpoint_module: roe._generated.api.connections.connections_update - return_type: Connection - return_import: roe._generated.models.connection.Connection - body_format: dict - inject_organization_id: true - parameters: - - name: connection_id - location: path - wire_name: id - annotation: str - - name: name - location: body - wire_name: name - annotation: str | None - default: null - pass_unset_when_none: true - - name: description - location: body - wire_name: description - annotation: str | None - default: null - pass_unset_when_none: true - - name: config - location: body - wire_name: config - annotation: dict[str, Any] | None - default: null - pass_unset_when_none: true - - name: auth_config - location: body - wire_name: auth_config - annotation: dict[str, Any] | None - default: null - pass_unset_when_none: true - - kind: body - method_name: delete - docstring: Delete a connection. - method: DELETE - path: /v1/connections/{id}/ - endpoint_module: roe._generated.api.connections.connections_destroy - inject_organization_id: true - parameters: - - name: connection_id - location: path - wire_name: id - annotation: str - - kind: body - method_name: test - docstring: Test a saved connection. - method: POST - path: /v1/connections/{id}/test/ - endpoint_module: roe._generated.api.connections.connections_test_create - return_type: TestConnection - return_import: roe._generated.models.test_connection.TestConnection - inject_organization_id: true - parameters: - - name: connection_id - location: path - wire_name: id - annotation: str - connectors: - class_name: ConnectorsAPI - docstring: API for discovering available connector types. - operations: - - kind: body - method_name: list - docstring: List available connector types. - method: GET - path: /v1/connectors/ - endpoint_module: roe._generated.api.connectors.connectors_retrieve - return_type: ConnectorListResponse - return_import: roe._generated.models.connector_list_response.ConnectorListResponse - - kind: body - method_name: retrieve - docstring: Retrieve metadata for a connector type. - method: GET - path: /v1/connectors/{connector_type}/ - endpoint_module: roe._generated.api.connectors.connectors_retrieve_by_type - return_type: ConnectorMetadata - return_import: roe._generated.models.connector_metadata.ConnectorMetadata - parameters: - - name: connector_type - location: path - wire_name: connector_type - annotation: str - policies: - class_name: PoliciesAPI - docstring: API for managing policies used by agentic workflows. - operations: - - kind: body - method_name: list - docstring: List policies in the organization. - method: GET - path: /v1/policies/ - endpoint_module: roe._generated.api.policies.policies_list - return_type: PaginatedPolicyList - return_import: roe._generated.models.paginated_policy_list.PaginatedPolicyList - parameters: - - name: page - location: query - annotation: int | None - default: null - pass_unset_when_none: true - - name: page_size - location: query - annotation: int | None - default: null - pass_unset_when_none: true - - kind: body - method_name: retrieve - docstring: Retrieve a specific policy by ID. - method: GET - path: /v1/policies/{id}/ - endpoint_module: roe._generated.api.policies.policies_retrieve - return_type: Policy - return_import: roe._generated.models.policy.Policy - parameters: - - name: policy_id - location: path - annotation: str - coerce: uuid - - kind: body - method_name: create - docstring: Create a new policy with an initial version. - method: POST - path: /v1/policies/ - endpoint_module: roe._generated.api.policies.policies_create - return_type: CreatePolicy - return_import: roe._generated.models.create_policy.CreatePolicy - body_type: CreatePolicyRequest - body_import: roe._generated.models.create_policy_request.CreatePolicyRequest - parameters: - - name: name - location: body - annotation: str - - name: content - location: body - annotation: dict[str, Any] - - name: description - location: body - annotation: str - default: '' - - name: version_name - location: body - annotation: str | None - default: null - pass_unset_when_none: true - - kind: body - method_name: update - docstring: Update a policy's metadata via PATCH (partial update). - method: PATCH - path: /v1/policies/{id}/ - endpoint_module: roe._generated.api.policies.policies_partial_update - return_type: Any - body_type: PatchedUpdatePolicyRequest - body_import: roe._generated.models.patched_update_policy_request.PatchedUpdatePolicyRequest - parameters: - - name: policy_id - location: path - annotation: str - coerce: uuid - - name: name - location: body - annotation: str | None - default: null - pass_unset_when_none: true - - name: description - location: body - annotation: str | None - default: null - pass_unset_when_none: true - - kind: body - method_name: replace - docstring: Replace a policy via PUT. - method: PUT - path: /v1/policies/{id}/ - endpoint_module: roe._generated.api.policies.policies_update - return_type: UpdatePolicy - return_import: roe._generated.models.update_policy.UpdatePolicy - body_type: UpdatePolicyRequest - body_import: roe._generated.models.update_policy_request.UpdatePolicyRequest - inject_organization_id: true - parameters: - - name: policy_id - location: path - annotation: str - coerce: uuid - - name: name - location: body - annotation: str - - name: description - location: body - annotation: str | None - default: null - pass_unset_when_none: true - - kind: body - method_name: delete - docstring: Delete a policy and all its versions. - method: DELETE - path: /v1/policies/{id}/ - endpoint_module: roe._generated.api.policies.policies_destroy - parameters: - - name: policy_id - location: path - annotation: str - coerce: uuid - namespaces: - versions: - class_name: PolicyVersionsAPI - attr: versions - docstring: Nested API for policy version operations. - operations: - - kind: manual - method_name: list - docstring: List versions of a policy. - method: GET - path: /v1/policies/{policy_id}/versions/ - - kind: manual - method_name: retrieve - docstring: Retrieve a specific version of a policy. - method: GET - path: /v1/policies/{policy_id}/versions/{version_id}/ - - kind: manual - method_name: create - docstring: Create a new policy version (auto-set as current). - method: POST - path: /v1/policies/{policy_id}/versions/ - users: - class_name: UsersAPI - docstring: API for retrieving information about the authenticated user. - operations: - - kind: manual - method_name: me - docstring: Return the currently-authenticated user. - method: GET - path: /v1/users/current_user/ diff --git a/pyproject.toml b/pyproject.toml index bb92b20..197dc1b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "roe-ai" -version = "1.1.1" +version = "1.1.2" authors = [ { name = "Roe", email = "founders@roe-ai.com" }, ] diff --git a/src/roe/_generated/api/agents/agents_jobs_cancel_all_create.py b/src/roe/_generated/api/agents/agents_jobs_cancel_all_create.py index 8ab885d..e562a6a 100644 --- a/src/roe/_generated/api/agents/agents_jobs_cancel_all_create.py +++ b/src/roe/_generated/api/agents/agents_jobs_cancel_all_create.py @@ -8,7 +8,7 @@ from ...types import Response, UNSET from ... import errors -from ...models.error_detail_response import ErrorDetailResponse +from ...models.agent_job_cancel_all_response import AgentJobCancelAllResponse from ...types import UNSET, Unset from typing import cast from uuid import UUID @@ -47,24 +47,13 @@ def _get_kwargs( -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | ErrorDetailResponse | None: - if response.status_code == 204: - response_204 = cast(Any, None) - return response_204 +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AgentJobCancelAllResponse | None: + if response.status_code == 200: + response_200 = AgentJobCancelAllResponse.from_dict(response.json()) - if response.status_code == 403: - response_403 = ErrorDetailResponse.from_dict(response.json()) - - return response_403 - - if response.status_code == 404: - response_404 = ErrorDetailResponse.from_dict(response.json()) - - - - return response_404 + return response_200 if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) @@ -72,7 +61,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | ErrorDetailResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AgentJobCancelAllResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -87,10 +76,10 @@ def sync_detailed( client: AuthenticatedClient, organization_id: UUID | Unset = UNSET, -) -> Response[Any | ErrorDetailResponse]: - """ Cancel all agent jobs +) -> Response[AgentJobCancelAllResponse]: + """ Cancel all running agent jobs (:cancelAll) - Cancel all running jobs for a given agent. + Cancel all running jobs for an agent. Args: agent_id (UUID): @@ -101,7 +90,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any | ErrorDetailResponse] + Response[AgentJobCancelAllResponse] """ @@ -123,10 +112,10 @@ def sync( client: AuthenticatedClient, organization_id: UUID | Unset = UNSET, -) -> Any | ErrorDetailResponse | None: - """ Cancel all agent jobs +) -> AgentJobCancelAllResponse | None: + """ Cancel all running agent jobs (:cancelAll) - Cancel all running jobs for a given agent. + Cancel all running jobs for an agent. Args: agent_id (UUID): @@ -137,7 +126,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Any | ErrorDetailResponse + AgentJobCancelAllResponse """ @@ -154,10 +143,10 @@ async def asyncio_detailed( client: AuthenticatedClient, organization_id: UUID | Unset = UNSET, -) -> Response[Any | ErrorDetailResponse]: - """ Cancel all agent jobs +) -> Response[AgentJobCancelAllResponse]: + """ Cancel all running agent jobs (:cancelAll) - Cancel all running jobs for a given agent. + Cancel all running jobs for an agent. Args: agent_id (UUID): @@ -168,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any | ErrorDetailResponse] + Response[AgentJobCancelAllResponse] """ @@ -190,10 +179,10 @@ async def asyncio( client: AuthenticatedClient, organization_id: UUID | Unset = UNSET, -) -> Any | ErrorDetailResponse | None: - """ Cancel all agent jobs +) -> AgentJobCancelAllResponse | None: + """ Cancel all running agent jobs (:cancelAll) - Cancel all running jobs for a given agent. + Cancel all running jobs for an agent. Args: agent_id (UUID): @@ -204,7 +193,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Any | ErrorDetailResponse + AgentJobCancelAllResponse """ diff --git a/src/roe/_generated/models/__init__.py b/src/roe/_generated/models/__init__.py index 64f8a46..dadf06a 100644 --- a/src/roe/_generated/models/__init__.py +++ b/src/roe/_generated/models/__init__.py @@ -6,6 +6,7 @@ from .agent_execution_request import AgentExecutionRequest from .agent_execution_request_metadata_type_0 import AgentExecutionRequestMetadataType0 from .agent_input_definition import AgentInputDefinition +from .agent_job_cancel_all_response import AgentJobCancelAllResponse from .agent_job_delete_data_response import AgentJobDeleteDataResponse from .agent_job_result_item import AgentJobResultItem from .agent_job_result_many_request import AgentJobResultManyRequest @@ -131,6 +132,7 @@ "AgentExecutionRequest", "AgentExecutionRequestMetadataType0", "AgentInputDefinition", + "AgentJobCancelAllResponse", "AgentJobDeleteDataResponse", "AgentJobResultItem", "AgentJobResultManyRequest", diff --git a/src/roe/_generated/models/agent_job_cancel_all_response.py b/src/roe/_generated/models/agent_job_cancel_all_response.py new file mode 100644 index 0000000..6922682 --- /dev/null +++ b/src/roe/_generated/models/agent_job_cancel_all_response.py @@ -0,0 +1,100 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + + + + + + +T = TypeVar("T", bound="AgentJobCancelAllResponse") + + + +@_attrs_define +class AgentJobCancelAllResponse: + """ + Attributes: + task_id (None | str): + targeted_count (int): + note (str): + """ + + task_id: None | str + targeted_count: int + note: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + + + + + def to_dict(self) -> dict[str, Any]: + task_id: None | str + task_id = self.task_id + + targeted_count = self.targeted_count + + note = self.note + + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({ + "task_id": task_id, + "targeted_count": targeted_count, + "note": note, + }) + + return field_dict + + + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + def _parse_task_id(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + task_id = _parse_task_id(d.pop("task_id")) + + + targeted_count = d.pop("targeted_count") + + note = d.pop("note") + + agent_job_cancel_all_response = cls( + task_id=task_id, + targeted_count=targeted_count, + note=note, + ) + + + agent_job_cancel_all_response.additional_properties = d + return agent_job_cancel_all_response + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/roe/api/_generated_registry.py b/src/roe/api/_generated_registry.py index d8de5ef..5739805 100644 --- a/src/roe/api/_generated_registry.py +++ b/src/roe/api/_generated_registry.py @@ -5,15 +5,11 @@ from __future__ import annotations -from roe.api.connections import ConnectionsAPI -from roe.api.connectors import ConnectorsAPI from roe.api.discovery import DiscoveryAPI from roe.api.tables import TablesAPI GENERATED_API_CLASSES = { - "connections": ConnectionsAPI, - "connectors": ConnectorsAPI, "discovery": DiscoveryAPI, "tables": TablesAPI, } diff --git a/src/roe/api/tables.py b/src/roe/api/tables.py index ba72e72..cbcbe14 100644 --- a/src/roe/api/tables.py +++ b/src/roe/api/tables.py @@ -11,46 +11,23 @@ from typing import BinaryIO from uuid import UUID -from roe._generated.api.tables import ( - tables_describe_retrieve, - tables_destroy, - tables_list, - tables_preview_retrieve, - tables_query_create, - tables_query_result_retrieve, - upload_table, -) +from roe._generated.api.tables import upload_table from roe._generated.client import AuthenticatedClient -from roe._generated.models.table_describe_response import TableDescribeResponse -from roe._generated.models.table_list_response import TableListResponse -from roe._generated.models.table_preview_response import TablePreviewResponse -from roe._generated.models.table_query_request import TableQueryRequest -from roe._generated.models.table_query_result_response import TableQueryResultResponse -from roe._generated.models.table_query_submit_response import TableQuerySubmitResponse from roe._generated.models.table_upload_request import TableUploadRequest from roe._generated.models.table_upload_response import TableUploadResponse from roe._generated.types import File, UNSET, Unset from roe.config import RoeConfig from roe.exceptions import RoeAPIException, translate_response from roe.models import FileUpload -from roe.utils.generated_request import request_json, request_raw class TablesAPI: - """API for managing Roe tables.""" + """API for uploading CSV files into Roe tables.""" def __init__(self, config: RoeConfig, raw_client: AuthenticatedClient): self.config = config self._raw = raw_client - def list(self) -> TableListResponse: - """List Roe tables.""" - response = request_raw( - self._raw, - tables_list, - ) - return TableListResponse.from_dict(response.json()) - def upload( self, *, @@ -145,73 +122,6 @@ def _as_generated_file( False, ) - def query( - self, - sql: str, - limit: int | None = None, - ) -> TableQuerySubmitResponse: - """Run a read-only query against Roe tables.""" - body = TableQueryRequest( - sql=sql, - limit=limit if limit is not None else UNSET, - ) - resp = request_json( - self._raw, - tables_query_create, - body=body, - ) - return resp.parsed # type: ignore[return-value] - - def query_result( - self, - table_query_id: str, - ) -> TableQueryResultResponse: - """Get the result for a submitted table query.""" - response = request_raw( - self._raw, - tables_query_result_retrieve, - table_query_id, - ) - return TableQueryResultResponse.from_dict(response.json()) - - def describe( - self, - table_name: str, - ) -> TableDescribeResponse: - """Describe a Roe table.""" - response = request_raw( - self._raw, - tables_describe_retrieve, - table_name, - ) - return TableDescribeResponse.from_dict(response.json()) - - def preview( - self, - table_name: str, - limit: int | None = None, - ) -> TablePreviewResponse: - """Preview rows from a Roe table.""" - response = request_raw( - self._raw, - tables_preview_retrieve, - table_name, - limit=limit if limit is not None else UNSET, - ) - return TablePreviewResponse.from_dict(response.json()) - - def delete( - self, - table_name: str, - ) -> None: - """Delete a Roe table.""" - request_raw( - self._raw, - tables_destroy, - table_name, - ) - return None - def _mime_type(filename: str, override: str | None) -> str: if override: diff --git a/uv.lock b/uv.lock index 65b3d72..b5617aa 100644 --- a/uv.lock +++ b/uv.lock @@ -454,7 +454,7 @@ wheels = [ [[package]] name = "roe-ai" -version = "1.1.1" +version = "1.1.2" source = { editable = "." } dependencies = [ { name = "attrs" },