fetch_hive 0.2.8 → 0.2.9

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.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/fetch_hive/client.rb +17 -2
  4. data/lib/fetch_hive/generated/api/agent_chat_messages_api.rb +1 -1
  5. data/lib/fetch_hive/generated/api/agent_chats_api.rb +1 -1
  6. data/lib/fetch_hive/generated/api/agents_api.rb +190 -1
  7. data/lib/fetch_hive/generated/api/assets_api.rb +1 -1
  8. data/lib/fetch_hive/generated/api/hive_agents_api.rb +1 -1
  9. data/lib/fetch_hive/generated/api/knowledge_base_items_api.rb +1 -1
  10. data/lib/fetch_hive/generated/api/knowledge_bases_api.rb +1 -1
  11. data/lib/fetch_hive/generated/api/models_api.rb +1 -1
  12. data/lib/fetch_hive/generated/api/prompts_api.rb +1 -1
  13. data/lib/fetch_hive/generated/api/requests_api.rb +1 -1
  14. data/lib/fetch_hive/generated/api/search_services_api.rb +1 -1
  15. data/lib/fetch_hive/generated/api/workflows_api.rb +1 -1
  16. data/lib/fetch_hive/generated/api_client.rb +1 -1
  17. data/lib/fetch_hive/generated/api_error.rb +1 -1
  18. data/lib/fetch_hive/generated/api_model_base.rb +1 -1
  19. data/lib/fetch_hive/generated/configuration.rb +1 -1
  20. data/lib/fetch_hive/generated/models/agent_attachment.rb +1 -1
  21. data/lib/fetch_hive/generated/models/agent_attachment_one_of.rb +1 -1
  22. data/lib/fetch_hive/generated/models/agent_delegation.rb +383 -0
  23. data/lib/fetch_hive/generated/models/agent_invoke_async_config.rb +159 -0
  24. data/lib/fetch_hive/generated/models/agent_message.rb +1 -1
  25. data/lib/fetch_hive/generated/models/asset_object.rb +1 -1
  26. data/lib/fetch_hive/generated/models/asset_object_transcription.rb +1 -1
  27. data/lib/fetch_hive/generated/models/async_config.rb +1 -1
  28. data/lib/fetch_hive/generated/models/delete_public_workspaces_agents200_response.rb +1 -1
  29. data/lib/fetch_hive/generated/models/delete_public_workspaces_agents_chats200_response.rb +1 -1
  30. data/lib/fetch_hive/generated/models/delete_public_workspaces_agents_chats404_response.rb +1 -1
  31. data/lib/fetch_hive/generated/models/delete_public_workspaces_knowledge_bases200_response.rb +1 -1
  32. data/lib/fetch_hive/generated/models/delete_public_workspaces_knowledge_bases_items200_response.rb +1 -1
  33. data/lib/fetch_hive/generated/models/error_response.rb +1 -1
  34. data/lib/fetch_hive/generated/models/generated_artifact.rb +1 -1
  35. data/lib/fetch_hive/generated/models/get_public_models200_response_inner.rb +1 -1
  36. data/lib/fetch_hive/generated/models/get_public_requests200_response.rb +1 -1
  37. data/lib/fetch_hive/generated/models/get_public_requests404_response.rb +1 -1
  38. data/lib/fetch_hive/generated/models/get_public_search_services_countries200_response.rb +1 -1
  39. data/lib/fetch_hive/generated/models/get_public_search_services_countries200_response_services_inner.rb +1 -1
  40. data/lib/fetch_hive/generated/models/get_public_search_services_countries200_response_services_inner_countries_inner.rb +1 -1
  41. data/lib/fetch_hive/generated/models/get_public_search_services_countries2404_response.rb +1 -1
  42. data/lib/fetch_hive/generated/models/get_public_workspaces_agents200_response.rb +1 -1
  43. data/lib/fetch_hive/generated/models/get_public_workspaces_agents2200_response.rb +1 -1
  44. data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats200_response.rb +1 -1
  45. data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats_messages200_response.rb +1 -1
  46. data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats_messages200_response_messages_inner.rb +1 -1
  47. data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats_messages422_response.rb +1 -1
  48. data/lib/fetch_hive/generated/models/get_public_workspaces_assets200_response.rb +1 -1
  49. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases200_response.rb +1 -1
  50. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases2200_response.rb +1 -1
  51. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases2422_response.rb +1 -1
  52. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items200_response.rb +1 -1
  53. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items200_response_knowledge_base_items_inner.rb +1 -1
  54. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items2200_response.rb +1 -1
  55. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items2422_response.rb +1 -1
  56. data/lib/fetch_hive/generated/models/hive_agent_async_config.rb +1 -1
  57. data/lib/fetch_hive/generated/models/hive_agent_sources.rb +1 -1
  58. data/lib/fetch_hive/generated/models/invoke_agent_request.rb +14 -5
  59. data/lib/fetch_hive/generated/models/invoke_agent_response.rb +17 -5
  60. data/lib/fetch_hive/generated/models/invoke_hive_agent_request.rb +56 -2
  61. data/lib/fetch_hive/generated/models/invoke_hive_agent_response.rb +1 -1
  62. data/lib/fetch_hive/generated/models/invoke_prompt_request.rb +1 -1
  63. data/lib/fetch_hive/generated/models/invoke_prompt_response.rb +1 -1
  64. data/lib/fetch_hive/generated/models/invoke_workflow_async_response.rb +1 -1
  65. data/lib/fetch_hive/generated/models/invoke_workflow_request.rb +1 -1
  66. data/lib/fetch_hive/generated/models/invoke_workflow_response.rb +1 -1
  67. data/lib/fetch_hive/generated/models/knowledge_base_object.rb +1 -1
  68. data/lib/fetch_hive/generated/models/list_thread_agent_delegations200_response.rb +166 -0
  69. data/lib/fetch_hive/generated/models/metadata_value.rb +1 -1
  70. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents200_response.rb +1 -1
  71. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats200_response.rb +1 -1
  72. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats_clear_messages200_response.rb +1 -1
  73. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats_request.rb +1 -1
  74. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats_request_chat.rb +1 -1
  75. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_request.rb +1 -1
  76. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_request_agent.rb +1 -1
  77. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases200_response.rb +1 -1
  78. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_items200_response.rb +1 -1
  79. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_items_request.rb +1 -1
  80. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_items_request_knowledge_base_item.rb +1 -1
  81. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_request.rb +1 -1
  82. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_request_knowledge_base.rb +1 -1
  83. data/lib/fetch_hive/generated/models/pending_delegation.rb +234 -0
  84. data/lib/fetch_hive/generated/models/post_public_workspaces_agents200_response.rb +1 -1
  85. data/lib/fetch_hive/generated/models/post_public_workspaces_agents422_response.rb +1 -1
  86. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats200_response.rb +1 -1
  87. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats200_response_chat.rb +1 -1
  88. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats422_response.rb +1 -1
  89. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats_request.rb +1 -1
  90. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats_request_chat.rb +1 -1
  91. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_request.rb +1 -1
  92. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_request_agent.rb +1 -1
  93. data/lib/fetch_hive/generated/models/post_public_workspaces_assets200_response.rb +1 -1
  94. data/lib/fetch_hive/generated/models/post_public_workspaces_assets422_response.rb +1 -1
  95. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases200_response.rb +1 -1
  96. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items200_response.rb +1 -1
  97. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items422_response.rb +1 -1
  98. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items_regenerate200_response.rb +1 -1
  99. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items_request.rb +1 -1
  100. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items_request_knowledge_base_item.rb +1 -1
  101. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_request.rb +1 -1
  102. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_request_knowledge_base.rb +1 -1
  103. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_search200_response.rb +1 -1
  104. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_search422_response.rb +1 -1
  105. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_search_request.rb +1 -1
  106. data/lib/fetch_hive/generated/models/sse_chunk.rb +1 -1
  107. data/lib/fetch_hive/generated/models/token_usage.rb +1 -1
  108. data/lib/fetch_hive/generated/models/tool_invocation.rb +1 -1
  109. data/lib/fetch_hive/generated/version.rb +1 -1
  110. metadata +6 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b421e652356ba9afa06d2b9e6f142ef76f59d5d4d39c0ea0db9f9038bb20d26
4
- data.tar.gz: a9d4effda45cfd0e3dbf2eb79fa028aecf65163cfd206d5a99aa27d72374f825
3
+ metadata.gz: eb9434ab93e434f4b25afe94d6b79f080645ae4d728df7d0f361b6b9f9bb2799
4
+ data.tar.gz: ff40c6e5fa1af76eded3851936963413f434ade2d2973dbfa9345033c69ccdc0
5
5
  SHA512:
6
- metadata.gz: 491c5faf21f2698e3125678f4609423c3a1d1dc7d44975862252a8692b3e8d69420dcd1441abc9603ffd1e5d5c974e6a2d45f9744235526300454c26d8bff1e4
7
- data.tar.gz: 0fbfafc2cb06f92ee3b8f94ab32e18eea82912d7b19dee93d1e9fed888c0aac4854211eb30db4e850483de6a29407e93eec475c9c6fbf458fac7fb1171592b6f
6
+ metadata.gz: 163396220e9d5a22f61192650659667b2c2a7f2630f91c9107e813b19b7581c32b60673140aaa80b13b6d52784ef75d0082fc95581a1b4f33cb538fc878d67c2
7
+ data.tar.gz: c15054576375f4fba9946e8c5412f83afbec7ae33de1bc342857724aec7c558ca234ac2cc335ad958b2063f6339cab4920775648b82d77107a4840937f9cc2f1
data/README.md CHANGED
@@ -9,7 +9,7 @@ Official Ruby SDK for [Fetch Hive](https://fetchhive.com) — invoke AI prompts,
9
9
  Add to your `Gemfile`:
10
10
 
11
11
  ```ruby
12
- gem "fetch_hive", "~> 0.2.8"
12
+ gem "fetch_hive", "~> 0.2.9"
13
13
  ```
14
14
 
15
15
  Then run:
@@ -149,7 +149,7 @@ client = FetchHive::Client.new # picks up FETCH_HIVE_API_KEY automatically
149
149
 
150
150
  ## Version
151
151
 
152
- 0.2.8
152
+ 0.2.9
153
153
 
154
154
  ## License
155
155
 
@@ -81,7 +81,7 @@ module FetchHive
81
81
  # ── Agent ───────────────────────────────────────────────────────────────────
82
82
 
83
83
  # Send a message to an agent and return the full response hash.
84
- def invoke_agent(agent:, message:, thread_id: nil, user: nil, metadata: nil, messages: nil, image_urls: nil, attachments: nil, known_artifact_refs: nil, artifact_refs: nil)
84
+ def invoke_agent(agent:, message:, thread_id: nil, user: nil, metadata: nil, messages: nil, image_urls: nil, attachments: nil, known_artifact_refs: nil, artifact_refs: nil, async: nil)
85
85
  body = { agent: agent, message: message, streaming: false }
86
86
  body[:thread_id] = thread_id if thread_id
87
87
  body[:user] = user if user
@@ -90,6 +90,7 @@ module FetchHive
90
90
  body[:attachments] = attachments || image_urls if attachments || image_urls
91
91
  body[:known_artifact_refs] = known_artifact_refs if known_artifact_refs
92
92
  body[:artifact_refs] = artifact_refs if artifact_refs
93
+ body[:async] = async if async
93
94
  post("/agent/invoke", body)
94
95
  end
95
96
 
@@ -110,7 +111,7 @@ module FetchHive
110
111
  # ── Hive Agent ──────────────────────────────────────────────────────────────
111
112
 
112
113
  # Start a Hive Agent run asynchronously. Requires a callback URL.
113
- def invoke_hive_agent(hive_agent:, objective:, callback_url:, sources: nil, metadata: nil)
114
+ def invoke_hive_agent(hive_agent:, objective:, callback_url:, sources: nil, metadata: nil, unattended: nil, budget_policy: nil)
114
115
  raise ArgumentError, "callback_url is required for Hive Agent invocation" if callback_url.nil? || callback_url.to_s.strip.empty?
115
116
 
116
117
  body = {
@@ -120,6 +121,8 @@ module FetchHive
120
121
  }
121
122
  body[:sources] = sources if sources
122
123
  body[:metadata] = metadata if metadata
124
+ body[:unattended] = unattended unless unattended.nil?
125
+ body[:budget_policy] = budget_policy if budget_policy
123
126
  post("/hive-agent/invoke", body)
124
127
  end
125
128
 
@@ -129,6 +132,18 @@ module FetchHive
129
132
  request("GET", "/public/requests/#{id}")
130
133
  end
131
134
 
135
+ def get_agent_delegation(id:)
136
+ request("GET", "/agent/delegations/#{id}")
137
+ end
138
+
139
+ def cancel_agent_delegation(id:)
140
+ post("/agent/delegations/#{id}/cancel", {})
141
+ end
142
+
143
+ def list_thread_delegations(thread_id:)
144
+ request("GET", "/agent/threads/#{thread_id}/delegations")
145
+ end
146
+
132
147
  def list_knowledge_bases(workspace_id:)
133
148
  request("GET", "/public/workspaces/#{workspace_id}/knowledge_bases")
134
149
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.2.9
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.2.9
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.2.9
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -19,6 +19,69 @@ module FetchHive::Generated
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Cancel an agent delegation
23
+ # Cancels a pending or running background workflow that an agent started. Already finished delegations are returned unchanged.
24
+ # @param id [String]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [AgentDelegation]
27
+ def cancel_agent_delegation(id, opts = {})
28
+ data, _status_code, _headers = cancel_agent_delegation_with_http_info(id, opts)
29
+ data
30
+ end
31
+
32
+ # Cancel an agent delegation
33
+ # Cancels a pending or running background workflow that an agent started. Already finished delegations are returned unchanged.
34
+ # @param id [String]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(AgentDelegation, Integer, Hash)>] AgentDelegation data, response status code and response headers
37
+ def cancel_agent_delegation_with_http_info(id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: AgentsApi.cancel_agent_delegation ...'
40
+ end
41
+ # verify the required parameter 'id' is set
42
+ if @api_client.config.client_side_validation && id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'id' when calling AgentsApi.cancel_agent_delegation"
44
+ end
45
+ # resource path
46
+ local_var_path = '/agent/delegations/{id}/cancel'.sub('{id}', CGI.escape(id.to_s))
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
+
56
+ # form parameters
57
+ form_params = opts[:form_params] || {}
58
+
59
+ # http body (model)
60
+ post_body = opts[:debug_body]
61
+
62
+ # return_type
63
+ return_type = opts[:debug_return_type] || 'AgentDelegation'
64
+
65
+ # auth_names
66
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
67
+
68
+ new_options = opts.merge(
69
+ :operation => :"AgentsApi.cancel_agent_delegation",
70
+ :header_params => header_params,
71
+ :query_params => query_params,
72
+ :form_params => form_params,
73
+ :body => post_body,
74
+ :auth_names => auth_names,
75
+ :return_type => return_type
76
+ )
77
+
78
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
79
+ if @api_client.config.debugging
80
+ @api_client.config.logger.debug "API called: AgentsApi#cancel_agent_delegation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
81
+ end
82
+ return data, status_code, headers
83
+ end
84
+
22
85
  # Delete an agent
23
86
  # Destroys the agent record.
24
87
  # @param workspace_id [String] Workspace UUID
@@ -88,6 +151,69 @@ module FetchHive::Generated
88
151
  return data, status_code, headers
89
152
  end
90
153
 
154
+ # Get an agent delegation
155
+ # Returns the status and result of a background workflow started by an agent. Use this when you invoked an agent without a `thread_id` and without `async.callback_url`.
156
+ # @param id [String]
157
+ # @param [Hash] opts the optional parameters
158
+ # @return [AgentDelegation]
159
+ def get_agent_delegation(id, opts = {})
160
+ data, _status_code, _headers = get_agent_delegation_with_http_info(id, opts)
161
+ data
162
+ end
163
+
164
+ # Get an agent delegation
165
+ # Returns the status and result of a background workflow started by an agent. Use this when you invoked an agent without a &#x60;thread_id&#x60; and without &#x60;async.callback_url&#x60;.
166
+ # @param id [String]
167
+ # @param [Hash] opts the optional parameters
168
+ # @return [Array<(AgentDelegation, Integer, Hash)>] AgentDelegation data, response status code and response headers
169
+ def get_agent_delegation_with_http_info(id, opts = {})
170
+ if @api_client.config.debugging
171
+ @api_client.config.logger.debug 'Calling API: AgentsApi.get_agent_delegation ...'
172
+ end
173
+ # verify the required parameter 'id' is set
174
+ if @api_client.config.client_side_validation && id.nil?
175
+ fail ArgumentError, "Missing the required parameter 'id' when calling AgentsApi.get_agent_delegation"
176
+ end
177
+ # resource path
178
+ local_var_path = '/agent/delegations/{id}'.sub('{id}', CGI.escape(id.to_s))
179
+
180
+ # query parameters
181
+ query_params = opts[:query_params] || {}
182
+
183
+ # header parameters
184
+ header_params = opts[:header_params] || {}
185
+ # HTTP header 'Accept' (if needed)
186
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
187
+
188
+ # form parameters
189
+ form_params = opts[:form_params] || {}
190
+
191
+ # http body (model)
192
+ post_body = opts[:debug_body]
193
+
194
+ # return_type
195
+ return_type = opts[:debug_return_type] || 'AgentDelegation'
196
+
197
+ # auth_names
198
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
199
+
200
+ new_options = opts.merge(
201
+ :operation => :"AgentsApi.get_agent_delegation",
202
+ :header_params => header_params,
203
+ :query_params => query_params,
204
+ :form_params => form_params,
205
+ :body => post_body,
206
+ :auth_names => auth_names,
207
+ :return_type => return_type
208
+ )
209
+
210
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
211
+ if @api_client.config.debugging
212
+ @api_client.config.logger.debug "API called: AgentsApi#get_agent_delegation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
213
+ end
214
+ return data, status_code, headers
215
+ end
216
+
91
217
  # Get an agent
92
218
  # Returns a single active agent belonging to the requested workspace.
93
219
  # @param workspace_id [String] Workspace UUID
@@ -288,6 +414,69 @@ module FetchHive::Generated
288
414
  return data, status_code, headers
289
415
  end
290
416
 
417
+ # List pending agent delegations for a thread
418
+ # Lists pending and running background workflows for a conversation thread. Pass the same `thread_id` you send to `POST /agent/invoke`.
419
+ # @param thread_id [String]
420
+ # @param [Hash] opts the optional parameters
421
+ # @return [ListThreadAgentDelegations200Response]
422
+ def list_thread_agent_delegations(thread_id, opts = {})
423
+ data, _status_code, _headers = list_thread_agent_delegations_with_http_info(thread_id, opts)
424
+ data
425
+ end
426
+
427
+ # List pending agent delegations for a thread
428
+ # Lists pending and running background workflows for a conversation thread. Pass the same &#x60;thread_id&#x60; you send to &#x60;POST /agent/invoke&#x60;.
429
+ # @param thread_id [String]
430
+ # @param [Hash] opts the optional parameters
431
+ # @return [Array<(ListThreadAgentDelegations200Response, Integer, Hash)>] ListThreadAgentDelegations200Response data, response status code and response headers
432
+ def list_thread_agent_delegations_with_http_info(thread_id, opts = {})
433
+ if @api_client.config.debugging
434
+ @api_client.config.logger.debug 'Calling API: AgentsApi.list_thread_agent_delegations ...'
435
+ end
436
+ # verify the required parameter 'thread_id' is set
437
+ if @api_client.config.client_side_validation && thread_id.nil?
438
+ fail ArgumentError, "Missing the required parameter 'thread_id' when calling AgentsApi.list_thread_agent_delegations"
439
+ end
440
+ # resource path
441
+ local_var_path = '/agent/threads/{thread_id}/delegations'.sub('{thread_id}', CGI.escape(thread_id.to_s))
442
+
443
+ # query parameters
444
+ query_params = opts[:query_params] || {}
445
+
446
+ # header parameters
447
+ header_params = opts[:header_params] || {}
448
+ # HTTP header 'Accept' (if needed)
449
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
450
+
451
+ # form parameters
452
+ form_params = opts[:form_params] || {}
453
+
454
+ # http body (model)
455
+ post_body = opts[:debug_body]
456
+
457
+ # return_type
458
+ return_type = opts[:debug_return_type] || 'ListThreadAgentDelegations200Response'
459
+
460
+ # auth_names
461
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
462
+
463
+ new_options = opts.merge(
464
+ :operation => :"AgentsApi.list_thread_agent_delegations",
465
+ :header_params => header_params,
466
+ :query_params => query_params,
467
+ :form_params => form_params,
468
+ :body => post_body,
469
+ :auth_names => auth_names,
470
+ :return_type => return_type
471
+ )
472
+
473
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
474
+ if @api_client.config.debugging
475
+ @api_client.config.logger.debug "API called: AgentsApi#list_thread_agent_delegations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
476
+ end
477
+ return data, status_code, headers
478
+ end
479
+
291
480
  # Update an agent
292
481
  # Updates an existing agent in the requested workspace.
293
482
  # @param workspace_id [String] Workspace UUID
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.2.9
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.2.9
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.2.9
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.2.9
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.2.9
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.2.9
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.2.9
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.2.9
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.2.9
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.2.9
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.2.9
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.2.9
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.2.9
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.2.9
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.2.9
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0