runtype 0.2.2 → 0.5.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +169 -1
- data/README.md +188 -23
- data/generated/lib/runtype/agent_aliases/client.rb +202 -1
- data/generated/lib/runtype/agent_aliases/types/delete_v1agents_id_aliases_alias_bindings_request.rb +17 -0
- data/generated/lib/runtype/agent_aliases/types/delete_v1agents_id_aliases_alias_bindings_response.rb +19 -0
- data/generated/lib/runtype/agent_aliases/types/get_v1agent_aliases_request.rb +13 -0
- data/generated/lib/runtype/agent_aliases/types/get_v1agent_aliases_response.rb +11 -0
- data/generated/lib/runtype/agent_aliases/types/get_v1agent_aliases_response_data_item.rb +25 -0
- data/generated/lib/runtype/agent_aliases/types/get_v1agents_id_aliases_alias_bindings_request.rb +13 -0
- data/generated/lib/runtype/agent_aliases/types/get_v1agents_id_aliases_alias_bindings_response.rb +19 -0
- data/generated/lib/runtype/agent_aliases/types/get_v1agents_id_aliases_alias_response.rb +2 -0
- data/generated/lib/runtype/agent_aliases/types/get_v1agents_id_aliases_response_data_item.rb +2 -0
- data/generated/lib/runtype/agent_aliases/types/get_v1agents_id_deployments_response_data_item.rb +2 -0
- data/generated/lib/runtype/agent_aliases/types/post_v1agents_id_aliases_alias_rollback_response.rb +6 -0
- data/generated/lib/runtype/agent_aliases/types/put_v1agents_id_aliases_alias_bindings_request.rb +21 -0
- data/generated/lib/runtype/agent_aliases/types/put_v1agents_id_aliases_alias_bindings_response.rb +19 -0
- data/generated/lib/runtype/agent_aliases/types/put_v1agents_id_aliases_alias_request.rb +2 -0
- data/generated/lib/runtype/agent_aliases/types/put_v1agents_id_aliases_alias_response.rb +6 -0
- data/generated/lib/runtype/agent_versions/client.rb +13 -1
- data/generated/lib/runtype/agent_versions/types/post_v1agent_versions_agent_id_publish_request.rb +6 -0
- data/generated/lib/runtype/agent_versions/types/post_v1agent_versions_agent_id_publish_request_deployment.rb +11 -0
- data/generated/lib/runtype/agent_versions/types/post_v1agent_versions_agent_id_publish_request_deployment_action.rb +14 -0
- data/generated/lib/runtype/agent_versions/types/post_v1agent_versions_agent_id_publish_response.rb +1 -1
- data/generated/lib/runtype/agents/types/post_v1agents_ensure_request_definition_config_memory.rb +2 -0
- data/generated/lib/runtype/agents/types/post_v1agents_ensure_request_definition_config_memory_pointer_scope.rb +15 -0
- data/generated/lib/runtype/agents/types/post_v1agents_id_execute_request_x_runtype_concurrency.rb +1 -0
- data/generated/lib/runtype/agents/types/post_v1agents_request_config_memory.rb +2 -0
- data/generated/lib/runtype/agents/types/post_v1agents_request_config_memory_pointer_scope.rb +15 -0
- data/generated/lib/runtype/agents/types/put_v1agents_id_request_config_memory.rb +2 -0
- data/generated/lib/runtype/agents/types/put_v1agents_id_request_config_memory_pointer_scope.rb +15 -0
- data/generated/lib/runtype/batch/types/get_v1batch_batch_id_records_record_id_steps_response_data_item_execution_engine.rb +1 -0
- data/generated/lib/runtype/client.rb +5 -5
- data/generated/lib/runtype/client_runtime/client.rb +118 -1
- data/generated/lib/runtype/client_runtime/types/get_v1client_conversations_conversation_id_executions_execution_id_deliveries_delivery_id_request.rb +21 -0
- data/generated/lib/runtype/client_runtime/types/post_v1client_chat_request_submit_mode.rb +1 -0
- data/generated/lib/runtype/client_runtime/types/post_v1client_conversations_conversation_id_executions_execution_id_cancel_request.rb +19 -0
- data/generated/lib/runtype/client_runtime/types/post_v1client_conversations_conversation_id_executions_execution_id_cancel_response.rb +13 -0
- data/generated/lib/runtype/client_runtime/types/post_v1client_init_response_durable_recovery.rb +2 -0
- data/generated/lib/runtype/client_tokens/types/get_v1client_tokens_id_response_client_token.rb +4 -0
- data/generated/lib/runtype/client_tokens/types/get_v1client_tokens_response_client_tokens_item.rb +4 -0
- data/generated/lib/runtype/client_tokens/types/post_v1client_tokens_id_regenerate_response_client_token.rb +4 -0
- data/generated/lib/runtype/client_tokens/types/post_v1client_tokens_request.rb +4 -0
- data/generated/lib/runtype/client_tokens/types/post_v1client_tokens_response_client_token.rb +4 -0
- data/generated/lib/runtype/client_tokens/types/put_v1client_tokens_id_request.rb +4 -0
- data/generated/lib/runtype/client_tokens/types/put_v1client_tokens_id_response_client_token.rb +4 -0
- data/generated/lib/runtype/conversations/client.rb +28 -10
- data/generated/lib/runtype/conversations/types/get_v1conversations_id_response.rb +3 -1
- data/generated/lib/runtype/conversations/types/post_v1conversations_request.rb +6 -0
- data/generated/lib/runtype/conversations/types/post_v1conversations_response.rb +3 -1
- data/generated/lib/runtype/conversations/types/put_v1conversations_id_request.rb +7 -1
- data/generated/lib/runtype/conversations/types/{put_v1conversations_id_request_messages_item_content_one_item_asset_ref_ref_kind.rb → put_v1conversations_id_request_messages_mode.rb} +3 -3
- data/generated/lib/runtype/conversations/types/put_v1conversations_id_response.rb +3 -1
- data/generated/lib/runtype/dispatch/client.rb +5 -3
- data/generated/lib/runtype/dispatch/types/post_v1dispatch_request_one.rb +2 -0
- data/generated/lib/runtype/dispatch/types/post_v1dispatch_request_one_agent_memory.rb +2 -0
- data/generated/lib/runtype/dispatch/types/post_v1dispatch_request_one_agent_memory_pointer_scope.rb +15 -0
- data/generated/lib/runtype/dispatch/types/post_v1dispatch_request_one_history.rb +14 -0
- data/generated/lib/runtype/dispatch/types/post_v1dispatch_request_one_messages_item.rb +4 -0
- data/generated/lib/runtype/dispatch/types/post_v1dispatch_request_one_messages_item_role.rb +1 -0
- data/generated/lib/runtype/dispatch/types/post_v1dispatch_request_one_messages_item_tool_calls_item.rb +17 -0
- data/generated/lib/runtype/dispatch/types/post_v1dispatch_request_one_messages_item_tool_results_item.rb +17 -0
- data/generated/lib/runtype/dispatch/types/post_v1dispatch_request_zero.rb +2 -0
- data/generated/lib/runtype/dispatch/types/post_v1dispatch_request_zero_agent_memory.rb +2 -0
- data/generated/lib/runtype/dispatch/types/post_v1dispatch_request_zero_agent_memory_pointer_scope.rb +15 -0
- data/generated/lib/runtype/dispatch/types/post_v1dispatch_request_zero_history.rb +14 -0
- data/generated/lib/runtype/dispatch/types/post_v1dispatch_request_zero_messages_item.rb +4 -0
- data/generated/lib/runtype/dispatch/types/post_v1dispatch_request_zero_messages_item_role.rb +1 -0
- data/generated/lib/runtype/dispatch/types/post_v1dispatch_request_zero_messages_item_tool_calls_item.rb +17 -0
- data/generated/lib/runtype/dispatch/types/post_v1dispatch_request_zero_messages_item_tool_results_item.rb +17 -0
- data/generated/lib/runtype/evals/types/get_v1eval_id_results_response.rb +10 -0
- data/generated/lib/runtype/evals/types/get_v1eval_id_results_response_agent_target_resolution.rb +15 -0
- data/generated/lib/runtype/evals/types/get_v1eval_id_results_response_results_by_record_value_item_execution_engine.rb +1 -0
- data/generated/lib/runtype/evals/types/post_v1eval_run_request.rb +2 -0
- data/generated/lib/runtype/evals/types/post_v1eval_run_request_agent.rb +15 -0
- data/generated/lib/runtype/evals/types/post_v1eval_submit_request.rb +2 -0
- data/generated/lib/runtype/evals/types/post_v1eval_submit_request_agent.rb +15 -0
- data/generated/lib/runtype/evals/types/post_v1eval_suites_id_run_request.rb +2 -0
- data/generated/lib/runtype/executions/client.rb +43 -0
- data/generated/lib/runtype/executions/types/get_v1executions_execution_id_deliveries_delivery_id_request.rb +13 -0
- data/generated/lib/runtype/flows/client.rb +3 -4
- data/generated/lib/runtype/flows/types/get_v1flows_id_step_results_response_data_item_execution_engine.rb +1 -0
- data/generated/lib/runtype/messaging_conversations/client.rb +2 -0
- data/generated/lib/runtype/messaging_conversations/types/get_v1messaging_conversations_request.rb +2 -0
- data/generated/lib/runtype/model_configs/types/post_v1model_configs_request_settings_custom_model.rb +2 -0
- data/generated/lib/runtype/model_configs/types/post_v1model_configs_request_settings_custom_model_mid_conversation_system_messages.rb +14 -0
- data/generated/lib/runtype/model_configs/types/put_v1model_configs_id_request_settings_custom_model.rb +2 -0
- data/generated/lib/runtype/model_configs/types/put_v1model_configs_id_request_settings_custom_model_mid_conversation_system_messages.rb +14 -0
- data/generated/lib/runtype/products/client.rb +45 -0
- data/generated/lib/runtype/products/types/get_v1products_id_activity_request.rb +13 -0
- data/generated/lib/runtype/products/types/get_v1products_id_activity_response.rb +13 -0
- data/generated/lib/runtype/products/types/get_v1products_id_activity_response_data.rb +13 -0
- data/generated/lib/runtype/products/types/get_v1products_id_activity_response_data_agents_item.rb +17 -0
- data/generated/lib/runtype/products/types/get_v1products_id_activity_response_data_agents_item_data_item.rb +77 -0
- data/generated/lib/runtype/products/types/get_v1products_id_activity_response_data_agents_item_data_item_agent_target_resolution.rb +15 -0
- data/generated/lib/runtype/products/types/get_v1products_id_activity_response_data_agents_item_data_item_agent_version.rb +17 -0
- data/generated/lib/runtype/products/types/get_v1products_id_activity_response_data_agents_item_data_item_execution_mode.rb +14 -0
- data/generated/lib/runtype/products/types/get_v1products_id_activity_response_data_agents_item_data_item_notification_mode.rb +15 -0
- data/generated/lib/runtype/products/types/get_v1products_id_activity_response_data_agents_item_data_item_pending_approval.rb +27 -0
- data/generated/lib/runtype/products/types/get_v1products_id_activity_response_data_agents_item_data_item_status.rb +19 -0
- data/generated/lib/runtype/products/types/get_v1products_id_activity_response_data_agents_item_error.rb +11 -0
- data/generated/lib/runtype/products/types/get_v1products_id_activity_response_data_surfaces_item.rb +19 -0
- data/generated/lib/runtype/products/types/get_v1products_id_activity_response_data_surfaces_item_data_item.rb +15 -0
- data/generated/lib/runtype/products/types/get_v1products_id_activity_response_data_surfaces_item_data_item_agent_mode.rb +45 -0
- data/generated/lib/runtype/products/types/get_v1products_id_activity_response_data_surfaces_item_data_item_available_fields.rb +39 -0
- data/generated/lib/runtype/products/types/get_v1products_id_activity_response_data_surfaces_item_data_item_available_fields_metadata_schema.rb +11 -0
- data/generated/lib/runtype/products/types/get_v1products_id_activity_response_data_surfaces_item_error.rb +11 -0
- data/generated/lib/runtype/products/types/get_v1products_id_activity_response_data_surfaces_item_source.rb +14 -0
- data/generated/lib/runtype/provider_keys/types/post_v1provider_keys_id_sync_models_request_models_item.rb +2 -0
- data/generated/lib/runtype/provider_keys/types/post_v1provider_keys_id_sync_models_request_models_item_mid_conversation_system_messages.rb +14 -0
- data/generated/lib/runtype/records/types/get_v1records_id_results_response_data_item_execution_engine.rb +1 -0
- data/generated/lib/runtype/records/types/get_v1records_id_step_results_response_data_item_execution_engine.rb +1 -0
- data/generated/lib/runtype/schedules/types/get_v1schedules_batch_batch_id_results_response_data_item_execution_engine.rb +1 -0
- data/generated/lib/runtype/schedules/types/get_v1schedules_runs_run_id_results_response_data_item_execution_engine.rb +1 -0
- data/generated/lib/runtype/types/agent_deployment_promotion.rb +17 -0
- data/generated/lib/runtype/types/agent_ensure_deploy_target.rb +2 -0
- data/generated/lib/runtype/types/agent_ensure_preview_alias_limit.rb +19 -0
- data/generated/lib/runtype/types/agent_ensure_preview_alias_limit_code.rb +11 -0
- data/generated/lib/runtype/types/agent_ensure_preview_alias_limit_scope.rb +12 -0
- data/generated/lib/runtype/types/agent_pull_response_definition_config_memory.rb +2 -0
- data/generated/lib/runtype/types/agent_pull_response_definition_config_memory_pointer_scope.rb +13 -0
- data/generated/lib/runtype/types/async_dispatch_handle.rb +10 -0
- data/generated/lib/runtype/types/async_dispatch_handle_delivery_status.rb +14 -0
- data/generated/lib/runtype/types/async_dispatch_handle_status.rb +5 -0
- data/generated/lib/runtype/types/client_input_delivery_receipt.rb +19 -0
- data/generated/lib/runtype/types/client_input_delivery_receipt_status.rb +14 -0
- data/generated/lib/runtype/types/conflict_error_body_candidate_count.rb +21 -0
- data/generated/lib/runtype/types/conflict_error_body_candidate_count_code.rb +11 -0
- data/generated/lib/runtype/types/conversation_busy_error.rb +15 -0
- data/generated/lib/runtype/types/conversation_busy_error_code.rb +11 -0
- data/generated/lib/runtype/types/conversation_busy_error_phase.rb +14 -0
- data/generated/lib/runtype/types/conversation_message_author.rb +16 -0
- data/generated/lib/runtype/types/conversation_message_author_type.rb +14 -0
- data/generated/lib/runtype/types/conversation_modified_error.rb +13 -0
- data/generated/lib/runtype/types/conversation_modified_error_code.rb +11 -0
- data/generated/lib/runtype/types/conversation_source.rb +14 -0
- data/generated/lib/runtype/types/conversation_transcript_message.rb +23 -0
- data/generated/lib/runtype/types/conversation_transcript_message_content.rb +14 -0
- data/generated/lib/runtype/types/conversation_transcript_message_content_one_item.rb +21 -0
- data/generated/lib/runtype/types/conversation_transcript_message_content_one_item_asset_ref.rb +19 -0
- data/generated/lib/runtype/types/conversation_transcript_message_content_one_item_asset_ref_ref_kind.rb +12 -0
- data/generated/lib/runtype/types/conversation_transcript_message_content_one_item_file.rb +13 -0
- data/generated/lib/runtype/types/conversation_transcript_message_content_one_item_image.rb +11 -0
- data/generated/lib/runtype/types/conversation_transcript_message_content_one_item_reasoning.rb +11 -0
- data/generated/lib/runtype/types/conversation_transcript_message_content_one_item_text.rb +9 -0
- data/generated/lib/runtype/types/conversation_transcript_message_role.rb +14 -0
- data/generated/lib/runtype/types/conversation_transcript_message_tool_calls_item.rb +15 -0
- data/generated/lib/runtype/types/conversation_transcript_message_tool_results_item.rb +15 -0
- data/generated/lib/runtype/types/dispatch_agent_json_response.rb +12 -0
- data/generated/lib/runtype/types/dispatch_agent_json_response_delivery_status.rb +14 -0
- data/generated/lib/runtype/types/dispatch_agent_json_response_execution_mode.rb +1 -0
- data/generated/lib/runtype/types/eval_agent_selector.rb +13 -0
- data/generated/lib/runtype/types/eval_run_scores_response.rb +10 -0
- data/generated/lib/runtype/types/eval_run_scores_response_agent_target_resolution.rb +13 -0
- data/generated/lib/runtype/types/eval_run_scores_response_cases_item_execution_engine.rb +1 -0
- data/generated/lib/runtype/types/eval_suite_run_queued.rb +10 -0
- data/generated/lib/runtype/types/eval_suite_run_queued_agent_target_resolution.rb +13 -0
- data/generated/lib/runtype/types/input_delivery_receipt.rb +19 -0
- data/generated/lib/runtype/types/input_delivery_receipt_status.rb +14 -0
- data/generated/lib/runtype/types/preview_alias_limit_error.rb +21 -0
- data/generated/lib/runtype/types/preview_alias_limit_error_code.rb +11 -0
- data/generated/lib/runtype/types/preview_alias_limit_error_scope.rb +12 -0
- data/generated/lib/runtype/types/run_eval_response.rb +10 -0
- data/generated/lib/runtype/types/run_eval_response_agent_target_resolution.rb +13 -0
- data/generated/lib/runtype.rb +109 -26
- data/lib/runtype/agent_ensure.rb +68 -4
- data/lib/runtype/agent_release_aliases.rb +282 -0
- data/lib/runtype/client.rb +22 -1
- data/lib/runtype/errors.rb +14 -2
- data/lib/runtype/raw_client_timeout.rb +56 -0
- data/lib/runtype/sdk_version.rb +2 -1
- data/lib/runtype.rb +2 -0
- metadata +95 -10
- data/generated/lib/runtype/conversations/types/put_v1conversations_id_request_messages_item.rb +0 -17
- data/generated/lib/runtype/conversations/types/put_v1conversations_id_request_messages_item_content.rb +0 -15
- data/generated/lib/runtype/conversations/types/put_v1conversations_id_request_messages_item_content_one_item.rb +0 -21
- data/generated/lib/runtype/conversations/types/put_v1conversations_id_request_messages_item_content_one_item_asset_ref.rb +0 -21
- data/generated/lib/runtype/conversations/types/put_v1conversations_id_request_messages_item_content_one_item_file.rb +0 -15
- data/generated/lib/runtype/conversations/types/put_v1conversations_id_request_messages_item_content_one_item_image.rb +0 -13
- data/generated/lib/runtype/conversations/types/put_v1conversations_id_request_messages_item_content_one_item_text.rb +0 -11
- data/generated/lib/runtype/conversations/types/put_v1conversations_id_request_messages_item_role.rb +0 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d76301f01717eb2c8c268aa576abea7ab7281c9e333ef117bc8fd2786dffe4a4
|
|
4
|
+
data.tar.gz: 9e1210dc611fc2db3c7f2f949dbff9eb24cc3f1aeb7e2c8b64a5b62660cd4f8d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a24d85ce1007caa25806f38f04b6b3cd5f1f1eb1b0b71b77e3817b464501dfc7cfb151916d9f282a9252dad90018ee39871c1c39a97fab5659e6731289bbbb68
|
|
7
|
+
data.tar.gz: d909413a2c441648bf3b0387355e0479e549fa556cc4e13fe9ce9a0ac1592e0477066181d12e797868d672cf8f4a0e2f1bd05481a8b8a21f631c6353d5c0d806
|
data/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,175 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c6dee53: Regenerate the Java, Python and Ruby SDK cores from the OpenAPI spec (spec 1228fedfe63e -> 14f6826470f1, output aca7693058e4).
|
|
8
|
+
|
|
9
|
+
API changes:
|
|
10
|
+
- breaking: POST /v1/agent-versions/{agentId}/publish response 200: property "applied" is now optional
|
|
11
|
+
- breaking: POST /v1/agent-versions/{agentId}/publish response 409<allOf[0]>: property "lastModifiedSource" is now optional
|
|
12
|
+
- breaking: POST /v1/agents/{id}/execute response 409: anyOf composition changed (0 -> 1 branches)
|
|
13
|
+
- breaking: POST /v1/agents/{id}/execute response 409: property "candidateCount" removed
|
|
14
|
+
- breaking: POST /v1/agents/{id}/execute response 409: property "code" removed
|
|
15
|
+
- breaking: POST /v1/agents/{id}/execute response 409: property "configId" removed
|
|
16
|
+
- breaking: POST /v1/agents/{id}/execute response 409: property "details" removed
|
|
17
|
+
- breaking: POST /v1/agents/{id}/execute response 409: property "error" removed
|
|
18
|
+
- breaking: POST /v1/agents/{id}/execute response 409: property "modelId" removed
|
|
19
|
+
- breaking: POST /v1/agents/{id}/execute response 409: property "provider" removed
|
|
20
|
+
- breaking: POST /v1/agents/{id}/execute response 409: type changed object -> anyOf
|
|
21
|
+
- breaking: PUT /v1/conversations/{id} request.messages[].content<anyOf[1]>[]: anyOf composition changed (4 -> 5 branches)
|
|
22
|
+
- breaking: PUT /v1/conversations/{id} request.messages[].content<anyOf[1]>[]<anyOf[3]>: property "assetId" removed
|
|
23
|
+
- breaking: PUT /v1/conversations/{id} request.messages[].content<anyOf[1]>[]<anyOf[3]>: property "filename" removed
|
|
24
|
+
- breaking: PUT /v1/conversations/{id} request.messages[].content<anyOf[1]>[]<anyOf[3]>: property "mimeType" removed
|
|
25
|
+
- breaking: PUT /v1/conversations/{id} request.messages[].content<anyOf[1]>[]<anyOf[3]>: property "orgKey" removed
|
|
26
|
+
- breaking: PUT /v1/conversations/{id} request.messages[].content<anyOf[1]>[]<anyOf[3]>: property "refKind" removed
|
|
27
|
+
- breaking: PUT /v1/conversations/{id} request.messages[].content<anyOf[1]>[]<anyOf[3]>: property "sizeBytes" removed
|
|
28
|
+
- breaking: PUT /v1/conversations/{id} request.messages[].content<anyOf[1]>[]<anyOf[3]>: required property "text" added
|
|
29
|
+
- breaking: PUT /v1/conversations/{id} request.messages[].content<anyOf[1]>[]<anyOf[3]>.type: enum value "asset_ref" removed
|
|
30
|
+
- breaking: schema ClientInputDeliveryReceipt: required property "initial" added
|
|
31
|
+
- breaking: schema InputDeliveryReceipt: required property "initial" added
|
|
32
|
+
- added: DELETE /v1/agents/{id}/aliases/{alias}/bindings: operation added
|
|
33
|
+
- added: GET /v1/agent-aliases: operation added
|
|
34
|
+
- added: GET /v1/agents/{id}/aliases response 200.data[]: required property "bindingNames" added
|
|
35
|
+
- added: GET /v1/agents/{id}/aliases/{alias} response 200: required property "bindingNames" added
|
|
36
|
+
- added: GET /v1/agents/{id}/aliases/{alias}/bindings: operation added
|
|
37
|
+
- added: GET /v1/agents/{id}/deployments response 200.data[]: required property "bindings" added
|
|
38
|
+
- added: GET /v1/conversations/{id} response 200: property "imported" added
|
|
39
|
+
- added: GET /v1/conversations/{id} response 200.messages[]: property "author" added
|
|
40
|
+
- added: GET /v1/conversations/{id} response 200.messages[]: property "createdAt" added
|
|
41
|
+
- added: GET /v1/conversations/{id} response 200.messages[]: property "id" added
|
|
42
|
+
- added: GET /v1/conversations/{id} response 200.messages[]: property "metadata" added
|
|
43
|
+
- added: GET /v1/conversations/{id} response 200.messages[]: property "toolCalls" added
|
|
44
|
+
- added: GET /v1/conversations/{id} response 200.messages[]: property "toolResults" added
|
|
45
|
+
- added: GET /v1/conversations/{id} response 200.messages[]: required property "content" added
|
|
46
|
+
- added: GET /v1/conversations/{id} response 200.messages[]: required property "role" added
|
|
47
|
+
- added: GET /v1/products/{id}/activity: operation added
|
|
48
|
+
- added: POST /v1/agent-versions/{agentId}/publish: header parameter "idempotency-key" added
|
|
49
|
+
- added: POST /v1/agent-versions/{agentId}/publish: header parameter "if-match" added
|
|
50
|
+
- added: POST /v1/agent-versions/{agentId}/publish: response 412 added
|
|
51
|
+
- added: POST /v1/agent-versions/{agentId}/publish request: property "deployment" added
|
|
52
|
+
- added: POST /v1/agent-versions/{agentId}/publish response 409<allOf[0]>: property "expectedVersionId" added
|
|
53
|
+
- added: POST /v1/agent-versions/{agentId}/publish response 409<allOf[0]>.code: enum value "idempotency_key_reused" added
|
|
54
|
+
- added: POST /v1/agent-versions/{agentId}/publish response 409<allOf[0]>.code: enum value "rollback_target_mismatch" added
|
|
55
|
+
- added: POST /v1/agents/{id}/aliases/{alias}/rollback response 200: required property "activePreviewCount" added
|
|
56
|
+
- added: POST /v1/agents/{id}/aliases/{alias}/rollback response 200: required property "bindingNames" added
|
|
57
|
+
- added: POST /v1/agents/{id}/aliases/{alias}/rollback response 200: required property "previewLimit" added
|
|
58
|
+
- added: POST /v1/agents/{id}/execute: response 413 added
|
|
59
|
+
- added: POST /v1/agents/{id}/execute response 409: anyOf branch "ConversationBusyError" added
|
|
60
|
+
- added: POST /v1/agents/{id}/execute response 409: anyOf branch "ConversationModifiedError" added
|
|
61
|
+
- added: POST /v1/agents/ensure: response 429 added
|
|
62
|
+
- added: POST /v1/conversations: response 200 added
|
|
63
|
+
- added: POST /v1/conversations: response 404 added
|
|
64
|
+
- added: POST /v1/conversations request: property "agentId" added
|
|
65
|
+
- added: POST /v1/conversations request: property "messages" added
|
|
66
|
+
- added: POST /v1/conversations request: property "source" added
|
|
67
|
+
- added: POST /v1/conversations response 201: property "imported" added
|
|
68
|
+
- added: POST /v1/conversations response 201.messages[]: property "author" added
|
|
69
|
+
- added: POST /v1/conversations response 201.messages[]: property "createdAt" added
|
|
70
|
+
- … 68 more changes
|
|
71
|
+
|
|
72
|
+
SDK surface:
|
|
73
|
+
- java: 657 public symbols added, 156 removed
|
|
74
|
+
- removed: `Builder`
|
|
75
|
+
- removed: `Builder.additionalProperties`
|
|
76
|
+
- removed: `Builder.additionalProperty`
|
|
77
|
+
- removed: `Builder.build`
|
|
78
|
+
- removed: `Builder.content`
|
|
79
|
+
- removed: `Builder.createdAt`
|
|
80
|
+
- removed: `Builder.from`
|
|
81
|
+
- removed: `Builder.id`
|
|
82
|
+
- removed: `Builder.role`
|
|
83
|
+
- removed: `ContentStage`
|
|
84
|
+
- removed: `IdStage`
|
|
85
|
+
- removed: `PutV1ConversationsIdRequestMessagesItem`
|
|
86
|
+
- removed: `PutV1ConversationsIdRequestMessagesItem.builder`
|
|
87
|
+
- removed: `PutV1ConversationsIdRequestMessagesItem.equals`
|
|
88
|
+
- removed: `PutV1ConversationsIdRequestMessagesItem.getAdditionalProperties`
|
|
89
|
+
- removed: `PutV1ConversationsIdRequestMessagesItem.getContent`
|
|
90
|
+
- removed: `PutV1ConversationsIdRequestMessagesItem.getCreatedAt`
|
|
91
|
+
- removed: `PutV1ConversationsIdRequestMessagesItem.getId`
|
|
92
|
+
- removed: `PutV1ConversationsIdRequestMessagesItem.getRole`
|
|
93
|
+
- removed: `PutV1ConversationsIdRequestMessagesItem.hashCode`
|
|
94
|
+
- … 136 more removed
|
|
95
|
+
- python: 22 public symbols added, 9 removed
|
|
96
|
+
- removed: `PutV1ConversationsIdRequestMessagesItem`
|
|
97
|
+
- removed: `PutV1ConversationsIdRequestMessagesItemContentOneItem_AssetRef`
|
|
98
|
+
- removed: `PutV1ConversationsIdRequestMessagesItemContentOneItem_File`
|
|
99
|
+
- removed: `PutV1ConversationsIdRequestMessagesItemContentOneItem_Image`
|
|
100
|
+
- removed: `PutV1ConversationsIdRequestMessagesItemContentOneItem_Text`
|
|
101
|
+
- removed: `PutV1ConversationsIdRequestMessagesItemContentOneItemAssetRef`
|
|
102
|
+
- removed: `PutV1ConversationsIdRequestMessagesItemContentOneItemFile`
|
|
103
|
+
- removed: `PutV1ConversationsIdRequestMessagesItemContentOneItemImage`
|
|
104
|
+
- removed: `PutV1ConversationsIdRequestMessagesItemContentOneItemText`
|
|
105
|
+
- ruby: 113 public symbols added, 36 removed
|
|
106
|
+
- removed: `Conversations`
|
|
107
|
+
- removed: `PutV1ConversationsIDRequestMessagesItem`
|
|
108
|
+
- removed: `Runtype`
|
|
109
|
+
- removed: `Types`
|
|
110
|
+
- removed: `Conversations`
|
|
111
|
+
- removed: `PutV1ConversationsIDRequestMessagesItemContent`
|
|
112
|
+
- removed: `Runtype`
|
|
113
|
+
- removed: `Types`
|
|
114
|
+
- removed: `Conversations`
|
|
115
|
+
- removed: `PutV1ConversationsIDRequestMessagesItemContentOneItem`
|
|
116
|
+
- removed: `Runtype`
|
|
117
|
+
- removed: `Types`
|
|
118
|
+
- removed: `Conversations`
|
|
119
|
+
- removed: `PutV1ConversationsIDRequestMessagesItemContentOneItemAssetRef`
|
|
120
|
+
- removed: `Runtype`
|
|
121
|
+
- removed: `Types`
|
|
122
|
+
- removed: `Conversations`
|
|
123
|
+
- removed: `PutV1ConversationsIDRequestMessagesItemContentOneItemAssetRefRefKind`
|
|
124
|
+
- removed: `Runtype`
|
|
125
|
+
- removed: `Types`
|
|
126
|
+
- … 16 more removed
|
|
127
|
+
|
|
128
|
+
### Patch Changes
|
|
129
|
+
|
|
130
|
+
- a2839fb: `Runtype::Client.new(timeout:)` now governs generated resource calls, not only the dispatch and streaming paths. The generated `BaseClient` accepts no timeout, so every `client.flows.*`, `client.evals.*` and delegated `client.api.*` call ran under the code generator's 60 second default no matter what the client was given; a synchronous eval run that took 80 seconds always timed out. The documented 600 second default now actually applies, and `request_options: { timeout_in_seconds: n }` overrides it for one call, on a copy of the transport so a client shared across threads is never mutated mid-call.
|
|
131
|
+
|
|
132
|
+
A socket timeout inside a generated call is also curated now. The generated methods rescue `Net::HTTPRequestTimeout`, a 408 response class no socket ever raises, so `Net::ReadTimeout` escaped the `Runtype::Error` tree entirely. `Runtype.wrap_errors` and `Runtype::Error.from_generated` translate `Timeout::Error` (which covers open, read and write timeouts) into `Runtype::APITimeoutError` carrying the original message, matching what the streaming path already did.
|
|
133
|
+
|
|
134
|
+
- ffccd92: `Runtype::Client#archive_agent_alias_everywhere` no longer absorbs an SDK defect
|
|
135
|
+
as an ordinary per-agent failure row. Its per-row rescue is now the curated
|
|
136
|
+
`Runtype::Error` tree plus the transport exceptions `Net::HTTP` raises below
|
|
137
|
+
`Runtype.wrap_errors` (`Timeout::Error`, `OpenSSL::SSL::SSLError`,
|
|
138
|
+
`SocketError`, `SystemCallError`, `IOError`) — the same set
|
|
139
|
+
`Runtype::Streaming::Connection` translates. A `NoMethodError` on a malformed
|
|
140
|
+
generated model, or any other programming error, now aborts the sweep loudly
|
|
141
|
+
instead of making it look complete with an extra `"failed"` row.
|
|
142
|
+
|
|
143
|
+
## 0.4.0
|
|
144
|
+
|
|
145
|
+
### Minor Changes
|
|
146
|
+
|
|
147
|
+
- fdeed1b: Ruby SDK release-alias parity. `Runtype::Client#ensure_agent(version:)` stamps the version row a converge appends with your own `label:` and `notes:`, which is what the agent page, the deployment receipts and the compare-to-live view key on; omit it and the label stays `"sdk-ensure"` with server-generated notes. It rides the hash probe, the full-definition request and a dry run alike.
|
|
148
|
+
|
|
149
|
+
`Runtype::Client#activate_agent_alias(promotion:)` links the source-organization ids and hashes a cross-organization promotion came from onto the deployment receipt, so a production receipt can name the staging version it was promoted from. Provenance only: it authorizes nothing, and the activating credentials alone decide what the activation may do. Takes either key spelling or a `Runtype::Types::AgentDeploymentPromotion`.
|
|
150
|
+
|
|
151
|
+
`Runtype::Client#list_agent_aliases_by_name` reads one pointer name across the whole organization (`GET /v1/agent-aliases`), with each agent's revision to quote back as `If-Match`, and `#archive_agent_alias_everywhere` sweeps that name off every agent carrying it — the cleanup a closed pull request runs. Each row is archived under the revision just read, so a concurrent deploy answers 412 instead of racing, and one agent's failure is reported in `"failed"` rather than aborting the rest — transport failures (DNS, TLS, a connection reset) included, since those are raised by `Net::HTTP` and never reach the curated error tree. `dry_run:` reports what would be archived and archives nothing.
|
|
152
|
+
|
|
153
|
+
Both `version:` and `promotion:` refuse an unrecognized key with an `ArgumentError` naming the accepted ones, rather than letting the server's strict schemas answer a 400; a hash whose values are all `nil` is treated as omitted, so building one from environment variables that may be absent still works.
|
|
154
|
+
|
|
3
155
|
All notable changes to the Runtype Ruby SDK are documented here.
|
|
4
156
|
|
|
157
|
+
## 0.3.0
|
|
158
|
+
|
|
159
|
+
- Release aliases on `Runtype::Client`: `#list_agent_aliases`, `#get_agent_alias`,
|
|
160
|
+
`#activate_agent_alias`, `#archive_agent_alias`, `#rollback_agent_alias` and
|
|
161
|
+
`#list_agent_deployments` wrap the generated `agent_aliases` client with the curated
|
|
162
|
+
`Runtype::Error` tree. `revision:` is sent as `If-Match` and `idempotency_key:` as
|
|
163
|
+
`Idempotency-Key`; `version_id` is sent exactly as given, because an alias is never
|
|
164
|
+
resolved to a version client-side.
|
|
165
|
+
- `Runtype::Client#ensure_agent(deploy:)` saves a version and aims a release alias at
|
|
166
|
+
it in one call, taking `{ alias: "pr-482" }` or the bare alias name. It rides both
|
|
167
|
+
the hash probe and the full-definition request. `release:` remains the compatibility
|
|
168
|
+
spelling of `deploy: { alias: "live" }`; passing both raises an `ArgumentError`
|
|
169
|
+
carrying the API's own refusal sentence.
|
|
170
|
+
- README: a "Release aliases" section covering the wrappers, dispatching against a
|
|
171
|
+
pointer, and the cross-organization prepare, validate, evaluate, activate recipe.
|
|
172
|
+
|
|
5
173
|
## 0.2.2
|
|
6
174
|
|
|
7
175
|
- The durable follow from 0.2.1, hardened after review: a buffered follow gives up
|
|
@@ -30,7 +198,7 @@ All notable changes to the Runtype Ruby SDK are documented here.
|
|
|
30
198
|
## 0.2.0
|
|
31
199
|
|
|
32
200
|
- Agents as code: `Runtype.define_agent` builds a validated, immutable
|
|
33
|
-
`Runtype::AgentDefinition` (snake_case or wire camelCase top-level fields, nested
|
|
201
|
+
`Runtype::AgentDefinition` (`snake_case` or wire `camelCase` top-level fields, nested
|
|
34
202
|
config passed through untouched, account-scoped `tool_…`/`agent_…`/`flow_…` refs
|
|
35
203
|
rejected). `Runtype::Client#ensure_agent` converges it via `POST /v1/agents/ensure`
|
|
36
204
|
with the hash-first probe, per-client memo of the server hash, `dry_run:`,
|
data/README.md
CHANGED
|
@@ -83,11 +83,9 @@ pulled["definition"] # the canonical wire definition; ensure_agent accepts it
|
|
|
83
83
|
pulled["lastModifiedSource"]
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
Top-level fields take
|
|
86
|
+
Top-level fields take snake*case or the wire's camelCase; nested config (`tools`,
|
|
87
87
|
`loop_config`, ...) is passed through in wire shape untouched, because its keys can be
|
|
88
|
-
tool names. Definitions must be environment-portable: raw `
|
|
89
|
-
`flow_…` ids are rejected in favour of `builtin:`, `platform:`, `mcp:` and
|
|
90
|
-
`tool:<name>` / `agent:<name>` / `flow:<name>` references, so the same definition
|
|
88
|
+
tool names. Definitions must be environment-portable: raw `tool*…`, `agent*…`and`flow*…`ids are rejected in favour of`builtin:`, `platform:`, `mcp:`and`tool:<name>`/`agent:<name>`/`flow:<name>` references, so the same definition
|
|
91
89
|
converges staging and production.
|
|
92
90
|
|
|
93
91
|
`ensure_agent` raises `Runtype::EnsureConflictError` (a 409) when the agent's last
|
|
@@ -98,6 +96,146 @@ pass `on_conflict: "overwrite"` to converge over it) or when an
|
|
|
98
96
|
platform does, over the canonical normalized form (keys ordered as `JSON.stringify`
|
|
99
97
|
emits them, numbers rendered as JavaScript renders them).
|
|
100
98
|
|
|
99
|
+
## Release aliases
|
|
100
|
+
|
|
101
|
+
An agent runs an immutable **version**. A named mutable **alias** selects which one:
|
|
102
|
+
`live` is the permanent pointer every unqualified dispatch resolves, and preview
|
|
103
|
+
aliases such as `pr-482` point somewhere else. Every activation appends a
|
|
104
|
+
**deployment receipt**, so the history of what ran is append-only.
|
|
105
|
+
|
|
106
|
+
```ruby
|
|
107
|
+
client.list_agent_aliases(agent_id) # live first, then previews by name
|
|
108
|
+
client.list_agent_aliases(agent_id, include_archived: true, limit: 20, cursor: cursor)
|
|
109
|
+
client.get_agent_alias(agent_id, "live") # 404 names the alias; never falls back to live
|
|
110
|
+
|
|
111
|
+
client.activate_agent_alias(agent_id, "live", version_id: "agv_9",
|
|
112
|
+
revision: current.revision, # sent as If-Match
|
|
113
|
+
idempotency_key: "deploy-482",
|
|
114
|
+
reason: "ship the pricing fix")
|
|
115
|
+
|
|
116
|
+
client.rollback_agent_alias(agent_id, "live", steps: 1, revision: current.revision)
|
|
117
|
+
client.archive_agent_alias(agent_id, "pr-482", revision: preview.revision)
|
|
118
|
+
|
|
119
|
+
client.list_agent_deployments(agent_id, alias_name: "live", limit: 20)
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Closing a pull request
|
|
123
|
+
|
|
124
|
+
One pointer name usually spans several agents, so the cleanup a closed pull
|
|
125
|
+
request runs is org-wide rather than per agent:
|
|
126
|
+
|
|
127
|
+
```ruby
|
|
128
|
+
client.list_agent_aliases_by_name("pr-482") # every agent carrying it, with each revision
|
|
129
|
+
client.archive_agent_alias_everywhere("pr-482", dry_run: true) # report, archive nothing
|
|
130
|
+
client.archive_agent_alias_everywhere("pr-482")
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
The sweep archives each pointer under the revision it just read, so a concurrent
|
|
134
|
+
deploy answers 412 instead of racing. One agent's failure is reported rather than
|
|
135
|
+
aborting the rest, transport failures included:
|
|
136
|
+
|
|
137
|
+
```ruby
|
|
138
|
+
sweep = client.archive_agent_alias_everywhere("pr-482")
|
|
139
|
+
sweep["archived"] # [{"agentId", "agentName", "revision", "receiptId"}, ...]
|
|
140
|
+
sweep["failed"] # [{"agentId", "agentName", "error", "code" => "alias_revision_mismatch"}, ...]
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
`"code"` is the alias plane's refusal code and is absent on a transport failure
|
|
144
|
+
(DNS, TLS, a connection reset), which is reported with its message alone.
|
|
145
|
+
|
|
146
|
+
Only active pointers are listed, so a second run archives nothing. A dry run
|
|
147
|
+
answers `{"alias", "dryRun" => true, "wouldArchive" => [<row>]}` with the listed
|
|
148
|
+
rows unchanged.
|
|
149
|
+
|
|
150
|
+
`version_id` is sent exactly as given: the SDK never resolves an alias to a version
|
|
151
|
+
for you. `revision:` is the alias revision you read back from `get_agent_alias`, sent
|
|
152
|
+
as `If-Match`; moving an existing `live` pointer requires it, and a stale value is a
|
|
153
|
+
409 rather than a lost update. Archiving stops a preview from resolving for new
|
|
154
|
+
executions, keeps its history, and does not interrupt runs already admitted; `live`
|
|
155
|
+
cannot be archived. Rollback restores configuration only, not external data or side
|
|
156
|
+
effects.
|
|
157
|
+
|
|
158
|
+
`ensure_agent` can save and activate in one call. `deploy:` names the alias to aim at
|
|
159
|
+
the version it just saved:
|
|
160
|
+
|
|
161
|
+
```ruby
|
|
162
|
+
client.ensure_agent(assistant) # save a version, live unchanged
|
|
163
|
+
client.ensure_agent(assistant, deploy: { alias: "pr-482" }) # save and aim the preview pointer
|
|
164
|
+
client.ensure_agent(assistant, deploy: "live") # a bare String names the alias
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
`release: "publish"` is the older spelling of `deploy: { alias: "live" }`. Passing both
|
|
168
|
+
raises an `ArgumentError` with the same sentence the API answers a 400 with.
|
|
169
|
+
|
|
170
|
+
`version:` stamps the appended version row with your own provenance, which is what the
|
|
171
|
+
agent page, the receipts and the compare-to-live view key on. Omit it and the label is
|
|
172
|
+
`"sdk-ensure"` with server-generated notes:
|
|
173
|
+
|
|
174
|
+
```ruby
|
|
175
|
+
client.ensure_agent(assistant, deploy: "live",
|
|
176
|
+
version: { label: ENV.fetch("GITHUB_SHA")[0, 7],
|
|
177
|
+
notes: "Promoted from CI run #{ENV.fetch("GITHUB_RUN_ID")}" })
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Both fields are optional (`label` up to 100 characters, `notes` up to 2000), and a hash
|
|
181
|
+
whose values are all `nil` is treated as omitted rather than refused, so building one
|
|
182
|
+
from environment variables that may be absent still saves.
|
|
183
|
+
|
|
184
|
+
Dispatch against a pointer instead of pinning a version, and the run resolves it at
|
|
185
|
+
admission:
|
|
186
|
+
|
|
187
|
+
```ruby
|
|
188
|
+
client.dispatch(agent: { agentId: agent_id }, messages: messages) # live
|
|
189
|
+
client.dispatch(agent: { agentId: agent_id, alias: "pr-482" }, messages: messages) # a preview
|
|
190
|
+
client.dispatch(agent: { agentId: agent_id, versionId: "agv_9" }, messages: messages) # one exact version
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Deploying across organizations
|
|
194
|
+
|
|
195
|
+
Organizations are isolated, so a staging version id means nothing in production. The
|
|
196
|
+
recipe is prepare, validate the bindings, evaluate, activate, with one client per
|
|
197
|
+
organization and the destination's own ids throughout. Credentials are never copied:
|
|
198
|
+
the destination's connections and secrets are what its runs use.
|
|
199
|
+
|
|
200
|
+
```ruby
|
|
201
|
+
staging = Runtype::Client.new(api_key: ENV.fetch("RUNTYPE_STAGING_KEY"))
|
|
202
|
+
production = Runtype::Client.new(api_key: ENV.fetch("RUNTYPE_PRODUCTION_KEY"))
|
|
203
|
+
|
|
204
|
+
# 1. Prepare. Same portable definition, destination account, no deploy: so live is untouched.
|
|
205
|
+
source = staging.pull_agent("Pricing Assistant")
|
|
206
|
+
prepared = production.ensure_agent(
|
|
207
|
+
source["definition"], version: { label: ENV.fetch("GITHUB_SHA")[0, 7] }
|
|
208
|
+
)
|
|
209
|
+
agent_id, candidate = prepared["agentId"], prepared["versionId"]
|
|
210
|
+
|
|
211
|
+
# 2. Validate the bindings in the destination, where the portable refs actually resolve.
|
|
212
|
+
production.pull_agent("Pricing Assistant")["definition"]["tools"]
|
|
213
|
+
live = production.get_agent_alias(agent_id, "live")
|
|
214
|
+
|
|
215
|
+
# 3. Evaluate that exact version id against a destination suite.
|
|
216
|
+
report = production.evals.run_eval_suite_synchronously(
|
|
217
|
+
suite_id: "evs_pricing", agent: { versionId: candidate }
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
# 4. Activate, quoting the revision you just read, and name where this came from.
|
|
221
|
+
production.activate_agent_alias(
|
|
222
|
+
agent_id, "live", version_id: candidate, revision: live.revision,
|
|
223
|
+
idempotency_key: "release-#{candidate}", reason: "promoted from staging",
|
|
224
|
+
promotion: { source_agent_id: source["agentId"], source_version_id: source["versionId"],
|
|
225
|
+
source_content_hash: source["contentHash"], source_commit: ENV.fetch("GITHUB_SHA") }
|
|
226
|
+
)
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
`promotion:` is what makes the production receipt name the staging version it came
|
|
230
|
+
from. It is provenance only: it authorizes nothing, and the destination credentials
|
|
231
|
+
alone decide what the activation may do. Every field is optional, and a hash whose
|
|
232
|
+
values are all `nil` is treated as omitted.
|
|
233
|
+
|
|
234
|
+
Nothing gates step 4 on step 3. `evaluate` reports; it does not hold the pointer. If a
|
|
235
|
+
score should stop a release, branch on `report` yourself before calling
|
|
236
|
+
`activate_agent_alias`. An environment-specific rendering of the definition produces a
|
|
237
|
+
different artifact, so its evaluation evidence does not carry over from staging.
|
|
238
|
+
|
|
101
239
|
## Authentication
|
|
102
240
|
|
|
103
241
|
Pass `api_key:`, or leave it out and the client reads `RUNTYPE_API_KEY`. The base URL
|
|
@@ -115,6 +253,26 @@ different accounts or environments can coexist in one process.
|
|
|
115
253
|
A missing or blank key raises `Runtype::AuthenticationError` at construction, before
|
|
116
254
|
any request goes out.
|
|
117
255
|
|
|
256
|
+
## Timeouts
|
|
257
|
+
|
|
258
|
+
`timeout:` is the per-operation socket timeout in seconds, defaulting to 600. It is
|
|
259
|
+
generous on purpose: an execution stream can idle between events while a model is
|
|
260
|
+
thinking, and a synchronous eval run can take minutes. One value governs the dispatch
|
|
261
|
+
and streaming paths and every generated resource call alike.
|
|
262
|
+
|
|
263
|
+
```ruby
|
|
264
|
+
client = Runtype::Client.new(timeout: 900) # ten minutes is not enough
|
|
265
|
+
client.evals.run_eval_suite_synchronously(suite_id: "evs_1") # runs under 900 seconds
|
|
266
|
+
|
|
267
|
+
# Override for one call, without touching the client other threads are sharing.
|
|
268
|
+
client.flows.list_flows(request_options: { timeout_in_seconds: 5 })
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
A socket timeout raises `Runtype::APITimeoutError` on the dispatch and streaming
|
|
272
|
+
paths. On a generated resource call it raises the transport's own error, so wrap the
|
|
273
|
+
call in `Runtype.wrap_errors` to get `Runtype::APITimeoutError` there too, the same
|
|
274
|
+
way the curated hierarchy is reached for every other generated failure.
|
|
275
|
+
|
|
118
276
|
## Streaming
|
|
119
277
|
|
|
120
278
|
`dispatch_stream` returns a `Runtype::Streaming::EventStream`, an `Enumerable` of
|
|
@@ -216,19 +374,19 @@ loop that exceeds `max_rounds:` raises `Runtype::LocalToolError`.
|
|
|
216
374
|
|
|
217
375
|
Everything the client raises descends from `Runtype::Error`.
|
|
218
376
|
|
|
219
|
-
| Class | When
|
|
220
|
-
| ----------------------------------- |
|
|
221
|
-
| `Runtype::AuthenticationError` | 401, or no API key at construction
|
|
222
|
-
| `Runtype::PermissionDeniedError` | 403
|
|
223
|
-
| `Runtype::NotFoundError` | 404
|
|
224
|
-
| `Runtype::ConflictError` | 409
|
|
225
|
-
| `Runtype::EnsureConflictError` | 409 from `ensure_agent`, exposes `#code`
|
|
226
|
-
| `Runtype::UnprocessableEntityError` | 422
|
|
227
|
-
| `Runtype::RateLimitError` | 429, exposes `#retry_after`
|
|
228
|
-
| `Runtype::APIStatusError` | any other non-2xx
|
|
229
|
-
| `Runtype::APITimeoutError` | the request timed out
|
|
230
|
-
| `Runtype::APIConnectionError` | the request never reached the API
|
|
231
|
-
| `Runtype::DriftError` | `ensure_agent(..., expect_no_changes: true)` found drift, exposes `#plan`
|
|
377
|
+
| Class | When |
|
|
378
|
+
| ----------------------------------- | ------------------------------------------------------------------------------ |
|
|
379
|
+
| `Runtype::AuthenticationError` | 401, or no API key at construction |
|
|
380
|
+
| `Runtype::PermissionDeniedError` | 403 |
|
|
381
|
+
| `Runtype::NotFoundError` | 404 |
|
|
382
|
+
| `Runtype::ConflictError` | 409 |
|
|
383
|
+
| `Runtype::EnsureConflictError` | 409 from `ensure_agent`, exposes `#code` |
|
|
384
|
+
| `Runtype::UnprocessableEntityError` | 422 |
|
|
385
|
+
| `Runtype::RateLimitError` | 429, exposes `#retry_after` |
|
|
386
|
+
| `Runtype::APIStatusError` | any other non-2xx |
|
|
387
|
+
| `Runtype::APITimeoutError` | the request timed out |
|
|
388
|
+
| `Runtype::APIConnectionError` | the request never reached the API |
|
|
389
|
+
| `Runtype::DriftError` | `ensure_agent(..., expect_no_changes: true)` found drift, exposes `#plan` |
|
|
232
390
|
| `Runtype::LocalToolError` | `run_with_local_tools` could not run a tool, exposes `#tool_name` and `#cause` |
|
|
233
391
|
|
|
234
392
|
Status errors carry `#status_code`, `#body` (parsed when the response was JSON), and
|
|
@@ -312,12 +470,19 @@ an empty `GEM_HOME` to prove the packaged layout loads.
|
|
|
312
470
|
|
|
313
471
|
The gem is published by `.github/workflows/publish-ruby-sdk.yml` through RubyGems
|
|
314
472
|
trusted publishing (OIDC against the `rubygems` GitHub environment; no API key).
|
|
315
|
-
The
|
|
316
|
-
|
|
317
|
-
1.
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
`
|
|
473
|
+
The version comes from the monorepo's changesets flow, so a release is:
|
|
474
|
+
|
|
475
|
+
1. Land a changeset naming `@runtypelabs/ruby-sdk` (an overlay PR writes its
|
|
476
|
+
own; the Update SDKs bot writes one for every regenerated core, see
|
|
477
|
+
`docs/claude/sdk-release.md`). Never hand-edit `SDK_VERSION` in
|
|
478
|
+
`lib/runtype/sdk_version.rb`: it is a mirror of `package.json`, rewritten by
|
|
479
|
+
`scripts/sync-sdk-versions.mjs` on every Version Packages run, and
|
|
480
|
+
`pnpm check:release-config` reds on drift.
|
|
481
|
+
2. Merge the Version Packages PR. That bumps `package.json`, mirrors the number
|
|
482
|
+
into `sdk_version.rb`, and prepends the `## <version>` section to
|
|
483
|
+
`CHANGELOG.md`.
|
|
484
|
+
3. Run the workflow from `staging` with that version, first with `dry_run` on,
|
|
485
|
+
then off:
|
|
321
486
|
|
|
322
487
|
```bash
|
|
323
488
|
gh workflow run publish-ruby-sdk.yml --ref staging -f version=<version> -f dry_run=true
|