@komputer-ai/sdk 0.11.1 → 0.11.3

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 (211) hide show
  1. package/.openapi-generator/FILES +69 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/README.md +147 -122
  4. package/dist/apis/AgentsApi.d.ts +173 -0
  5. package/dist/apis/AgentsApi.js +383 -0
  6. package/dist/apis/ConnectorsApi.d.ts +118 -0
  7. package/dist/apis/ConnectorsApi.js +247 -0
  8. package/dist/apis/MemoriesApi.d.ts +115 -0
  9. package/dist/apis/MemoriesApi.js +252 -0
  10. package/dist/apis/OfficesApi.d.ts +98 -0
  11. package/dist/apis/OfficesApi.js +208 -0
  12. package/dist/apis/SchedulesApi.d.ts +111 -0
  13. package/dist/apis/SchedulesApi.js +252 -0
  14. package/dist/apis/SecretsApi.d.ts +98 -0
  15. package/dist/apis/SecretsApi.js +211 -0
  16. package/dist/apis/SkillsApi.d.ts +115 -0
  17. package/dist/apis/SkillsApi.js +252 -0
  18. package/dist/apis/TemplatesApi.d.ts +56 -0
  19. package/dist/apis/TemplatesApi.js +109 -0
  20. package/dist/apis/index.d.ts +8 -0
  21. package/dist/apis/index.js +26 -0
  22. package/dist/client.d.ts +175 -0
  23. package/dist/client.js +293 -0
  24. package/dist/esm/apis/AgentsApi.d.ts +173 -0
  25. package/dist/esm/apis/AgentsApi.js +379 -0
  26. package/dist/esm/apis/ConnectorsApi.d.ts +118 -0
  27. package/dist/esm/apis/ConnectorsApi.js +243 -0
  28. package/dist/esm/apis/MemoriesApi.d.ts +115 -0
  29. package/dist/esm/apis/MemoriesApi.js +248 -0
  30. package/dist/esm/apis/OfficesApi.d.ts +98 -0
  31. package/dist/esm/apis/OfficesApi.js +204 -0
  32. package/dist/esm/apis/SchedulesApi.d.ts +111 -0
  33. package/dist/esm/apis/SchedulesApi.js +248 -0
  34. package/dist/esm/apis/SecretsApi.d.ts +98 -0
  35. package/dist/esm/apis/SecretsApi.js +207 -0
  36. package/dist/esm/apis/SkillsApi.d.ts +115 -0
  37. package/dist/esm/apis/SkillsApi.js +248 -0
  38. package/dist/esm/apis/TemplatesApi.d.ts +56 -0
  39. package/dist/esm/apis/TemplatesApi.js +105 -0
  40. package/dist/esm/apis/index.d.ts +8 -0
  41. package/dist/esm/client.d.ts +175 -0
  42. package/dist/esm/client.js +289 -0
  43. package/{src/index.ts → dist/esm/index.d.ts} +0 -2
  44. package/dist/esm/index.js +6 -0
  45. package/dist/esm/models/AgentListResponse.d.ts +33 -0
  46. package/dist/esm/models/AgentListResponse.js +42 -0
  47. package/dist/esm/models/AgentResponse.d.ts +134 -0
  48. package/dist/esm/models/AgentResponse.js +75 -0
  49. package/dist/esm/models/ConnectorResponse.d.ts +104 -0
  50. package/{src/models/ConnectorResponse.ts → dist/esm/models/ConnectorResponse.js} +6 -102
  51. package/dist/esm/models/CreateAgentRequest.d.ts +104 -0
  52. package/dist/esm/models/CreateAgentRequest.js +69 -0
  53. package/dist/esm/models/CreateConnectorRequest.d.ts +92 -0
  54. package/{src/models/CreateConnectorRequest.ts → dist/esm/models/CreateConnectorRequest.js} +12 -93
  55. package/dist/esm/models/CreateMemoryRequest.d.ts +50 -0
  56. package/{src/models/CreateMemoryRequest.ts → dist/esm/models/CreateMemoryRequest.js} +10 -50
  57. package/dist/esm/models/CreateScheduleAgentSpec.d.ts +56 -0
  58. package/{src/models/CreateScheduleAgentSpec.ts → dist/esm/models/CreateScheduleAgentSpec.js} +6 -54
  59. package/dist/esm/models/CreateScheduleRequest.d.ts +81 -0
  60. package/dist/esm/models/CreateScheduleRequest.js +64 -0
  61. package/dist/esm/models/CreateSecretRequest.d.ts +46 -0
  62. package/dist/esm/models/CreateSecretRequest.js +49 -0
  63. package/dist/esm/models/CreateSkillRequest.d.ts +50 -0
  64. package/dist/esm/models/CreateSkillRequest.js +53 -0
  65. package/dist/esm/models/MemoryResponse.d.ts +68 -0
  66. package/dist/esm/models/MemoryResponse.js +53 -0
  67. package/dist/esm/models/OfficeListResponse.d.ts +33 -0
  68. package/dist/esm/models/OfficeListResponse.js +42 -0
  69. package/dist/esm/models/OfficeMemberResponse.d.ts +50 -0
  70. package/dist/esm/models/OfficeMemberResponse.js +47 -0
  71. package/dist/esm/models/OfficeResponse.d.ts +93 -0
  72. package/dist/esm/models/OfficeResponse.js +62 -0
  73. package/dist/esm/models/PatchAgentRequest.d.ts +80 -0
  74. package/{src/models/PatchAgentRequest.ts → dist/esm/models/PatchAgentRequest.js} +6 -78
  75. package/dist/esm/models/PatchMemoryRequest.d.ts +38 -0
  76. package/dist/esm/models/PatchMemoryRequest.js +43 -0
  77. package/dist/esm/models/PatchScheduleRequest.d.ts +32 -0
  78. package/dist/esm/models/PatchScheduleRequest.js +41 -0
  79. package/dist/esm/models/PatchSkillRequest.d.ts +38 -0
  80. package/{src/models/PatchSkillRequest.ts → dist/esm/models/PatchSkillRequest.js} +6 -36
  81. package/dist/esm/models/ScheduleListResponse.d.ts +33 -0
  82. package/dist/esm/models/ScheduleListResponse.js +42 -0
  83. package/dist/esm/models/ScheduleResponse.d.ts +140 -0
  84. package/dist/esm/models/ScheduleResponse.js +77 -0
  85. package/dist/esm/models/SecretListResponse.d.ts +33 -0
  86. package/dist/esm/models/SecretListResponse.js +42 -0
  87. package/dist/esm/models/SecretResponse.d.ts +74 -0
  88. package/dist/esm/models/SecretResponse.js +55 -0
  89. package/dist/esm/models/SkillResponse.d.ts +74 -0
  90. package/dist/esm/models/SkillResponse.js +55 -0
  91. package/dist/esm/models/UpdateSecretRequest.d.ts +40 -0
  92. package/{src/models/UpdateSecretRequest.ts → dist/esm/models/UpdateSecretRequest.js} +8 -37
  93. package/dist/esm/models/index.d.ts +24 -0
  94. package/dist/esm/runtime.d.ts +184 -0
  95. package/dist/esm/runtime.js +349 -0
  96. package/dist/esm/watch.d.ts +32 -0
  97. package/dist/esm/watch.js +96 -0
  98. package/dist/index.d.ts +5 -0
  99. package/dist/index.js +24 -0
  100. package/dist/models/AgentListResponse.d.ts +33 -0
  101. package/dist/models/AgentListResponse.js +49 -0
  102. package/dist/models/AgentResponse.d.ts +134 -0
  103. package/{src/models/AgentResponse.ts → dist/models/AgentResponse.js} +13 -132
  104. package/dist/models/ConnectorResponse.d.ts +104 -0
  105. package/dist/models/ConnectorResponse.js +72 -0
  106. package/dist/models/CreateAgentRequest.d.ts +104 -0
  107. package/dist/models/CreateAgentRequest.js +76 -0
  108. package/dist/models/CreateConnectorRequest.d.ts +92 -0
  109. package/dist/models/CreateConnectorRequest.js +74 -0
  110. package/dist/models/CreateMemoryRequest.d.ts +50 -0
  111. package/dist/models/CreateMemoryRequest.js +58 -0
  112. package/dist/models/CreateScheduleAgentSpec.d.ts +56 -0
  113. package/dist/models/CreateScheduleAgentSpec.js +56 -0
  114. package/dist/models/CreateScheduleRequest.d.ts +81 -0
  115. package/dist/models/CreateScheduleRequest.js +71 -0
  116. package/dist/models/CreateSecretRequest.d.ts +46 -0
  117. package/dist/models/CreateSecretRequest.js +56 -0
  118. package/dist/models/CreateSkillRequest.d.ts +50 -0
  119. package/{src/models/CreateSkillRequest.ts → dist/models/CreateSkillRequest.js} +19 -51
  120. package/dist/models/MemoryResponse.d.ts +68 -0
  121. package/{src/models/MemoryResponse.ts → dist/models/MemoryResponse.js} +13 -66
  122. package/dist/models/OfficeListResponse.d.ts +33 -0
  123. package/dist/models/OfficeListResponse.js +49 -0
  124. package/dist/models/OfficeMemberResponse.d.ts +50 -0
  125. package/{src/models/OfficeMemberResponse.ts → dist/models/OfficeMemberResponse.js} +13 -48
  126. package/dist/models/OfficeResponse.d.ts +93 -0
  127. package/dist/models/OfficeResponse.js +69 -0
  128. package/dist/models/PatchAgentRequest.d.ts +80 -0
  129. package/dist/models/PatchAgentRequest.js +64 -0
  130. package/dist/models/PatchMemoryRequest.d.ts +38 -0
  131. package/{src/models/PatchMemoryRequest.ts → dist/models/PatchMemoryRequest.js} +13 -36
  132. package/dist/models/PatchScheduleRequest.d.ts +32 -0
  133. package/{src/models/PatchScheduleRequest.ts → dist/models/PatchScheduleRequest.js} +13 -30
  134. package/dist/models/PatchSkillRequest.d.ts +38 -0
  135. package/dist/models/PatchSkillRequest.js +50 -0
  136. package/dist/models/ScheduleListResponse.d.ts +33 -0
  137. package/dist/models/ScheduleListResponse.js +49 -0
  138. package/dist/models/ScheduleResponse.d.ts +140 -0
  139. package/{src/models/ScheduleResponse.ts → dist/models/ScheduleResponse.js} +13 -138
  140. package/dist/models/SecretListResponse.d.ts +33 -0
  141. package/dist/models/SecretListResponse.js +49 -0
  142. package/dist/models/SecretResponse.d.ts +74 -0
  143. package/{src/models/SecretResponse.ts → dist/models/SecretResponse.js} +13 -72
  144. package/dist/models/SkillResponse.d.ts +74 -0
  145. package/{src/models/SkillResponse.ts → dist/models/SkillResponse.js} +13 -72
  146. package/dist/models/UpdateSecretRequest.d.ts +40 -0
  147. package/dist/models/UpdateSecretRequest.js +52 -0
  148. package/dist/models/index.d.ts +24 -0
  149. package/dist/models/index.js +42 -0
  150. package/dist/runtime.d.ts +184 -0
  151. package/dist/runtime.js +365 -0
  152. package/dist/watch.d.ts +32 -0
  153. package/dist/watch.js +100 -0
  154. package/package.json +6 -3
  155. package/.openapi-generator-ignore +0 -31
  156. package/docs/AgentListResponse.md +0 -34
  157. package/docs/AgentResponse.md +0 -68
  158. package/docs/AgentsApi.md +0 -584
  159. package/docs/ConnectorResponse.md +0 -58
  160. package/docs/ConnectorsApi.md +0 -366
  161. package/docs/CreateAgentRequest.md +0 -58
  162. package/docs/CreateConnectorRequest.md +0 -54
  163. package/docs/CreateMemoryRequest.md +0 -40
  164. package/docs/CreateScheduleAgentSpec.md +0 -42
  165. package/docs/CreateScheduleRequest.md +0 -50
  166. package/docs/CreateSecretRequest.md +0 -38
  167. package/docs/CreateSkillRequest.md +0 -40
  168. package/docs/MemoriesApi.md +0 -368
  169. package/docs/MemoryResponse.md +0 -46
  170. package/docs/OfficeListResponse.md +0 -34
  171. package/docs/OfficeMemberResponse.md +0 -40
  172. package/docs/OfficeResponse.md +0 -54
  173. package/docs/OfficesApi.md +0 -300
  174. package/docs/PatchAgentRequest.md +0 -50
  175. package/docs/PatchMemoryRequest.md +0 -36
  176. package/docs/PatchScheduleRequest.md +0 -34
  177. package/docs/PatchSkillRequest.md +0 -36
  178. package/docs/ScheduleListResponse.md +0 -34
  179. package/docs/ScheduleResponse.md +0 -70
  180. package/docs/SchedulesApi.md +0 -369
  181. package/docs/SecretListResponse.md +0 -34
  182. package/docs/SecretResponse.md +0 -48
  183. package/docs/SecretsApi.md +0 -298
  184. package/docs/SkillResponse.md +0 -48
  185. package/docs/SkillsApi.md +0 -368
  186. package/docs/TemplatesApi.md +0 -138
  187. package/docs/UpdateSecretRequest.md +0 -36
  188. package/src/apis/AgentsApi.ts +0 -485
  189. package/src/apis/ConnectorsApi.ts +0 -301
  190. package/src/apis/MemoriesApi.ts +0 -315
  191. package/src/apis/OfficesApi.ts +0 -253
  192. package/src/apis/SchedulesApi.ts +0 -318
  193. package/src/apis/SecretsApi.ts +0 -267
  194. package/src/apis/SkillsApi.ts +0 -315
  195. package/src/apis/TemplatesApi.ts +0 -109
  196. package/src/client.test.ts +0 -88
  197. package/src/client.ts +0 -212
  198. package/src/models/AgentListResponse.ts +0 -73
  199. package/src/models/CreateAgentRequest.ts +0 -163
  200. package/src/models/CreateScheduleRequest.ts +0 -140
  201. package/src/models/CreateSecretRequest.ts +0 -83
  202. package/src/models/OfficeListResponse.ts +0 -73
  203. package/src/models/OfficeResponse.ts +0 -153
  204. package/src/models/ScheduleListResponse.ts +0 -73
  205. package/src/models/SecretListResponse.ts +0 -73
  206. package/src/runtime.ts +0 -450
  207. package/src/watch.ts +0 -89
  208. package/tsconfig.esm.json +0 -7
  209. package/tsconfig.json +0 -18
  210. /package/{src/apis/index.ts → dist/esm/apis/index.js} +0 -0
  211. /package/{src/models/index.ts → dist/esm/models/index.js} +0 -0
@@ -1,138 +0,0 @@
1
- # TemplatesApi
2
-
3
- All URIs are relative to *http://localhost:8080/api/v1*
4
-
5
- | Method | HTTP request | Description |
6
- |------------- | ------------- | -------------|
7
- | [**listTemplates**](TemplatesApi.md#listtemplates) | **GET** /templates | List agent templates |
8
- | [**namespacesGet**](TemplatesApi.md#namespacesget) | **GET** /namespaces | List namespaces |
9
-
10
-
11
-
12
- ## listTemplates
13
-
14
- > { [key: string]: any; } listTemplates(namespace)
15
-
16
- List agent templates
17
-
18
- Returns all agent templates (both namespace-scoped and cluster-scoped) available in the specified namespace.
19
-
20
- ### Example
21
-
22
- ```ts
23
- import {
24
- Configuration,
25
- TemplatesApi,
26
- } from 'komputer-ai';
27
- import type { ListTemplatesRequest } from 'komputer-ai';
28
-
29
- async function example() {
30
- console.log("🚀 Testing komputer-ai SDK...");
31
- const api = new TemplatesApi();
32
-
33
- const body = {
34
- // string | Kubernetes namespace (optional)
35
- namespace: namespace_example,
36
- } satisfies ListTemplatesRequest;
37
-
38
- try {
39
- const data = await api.listTemplates(body);
40
- console.log(data);
41
- } catch (error) {
42
- console.error(error);
43
- }
44
- }
45
-
46
- // Run the test
47
- example().catch(console.error);
48
- ```
49
-
50
- ### Parameters
51
-
52
-
53
- | Name | Type | Description | Notes |
54
- |------------- | ------------- | ------------- | -------------|
55
- | **namespace** | `string` | Kubernetes namespace | [Optional] [Defaults to `undefined`] |
56
-
57
- ### Return type
58
-
59
- **{ [key: string]: any; }**
60
-
61
- ### Authorization
62
-
63
- No authorization required
64
-
65
- ### HTTP request headers
66
-
67
- - **Content-Type**: Not defined
68
- - **Accept**: `application/json`
69
-
70
-
71
- ### HTTP response details
72
- | Status code | Description | Response headers |
73
- |-------------|-------------|------------------|
74
- | **200** | List of templates | - |
75
- | **500** | Internal error | - |
76
-
77
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
78
-
79
-
80
- ## namespacesGet
81
-
82
- > { [key: string]: any; } namespacesGet()
83
-
84
- List namespaces
85
-
86
- Returns all Kubernetes namespaces the API has access to.
87
-
88
- ### Example
89
-
90
- ```ts
91
- import {
92
- Configuration,
93
- TemplatesApi,
94
- } from 'komputer-ai';
95
- import type { NamespacesGetRequest } from 'komputer-ai';
96
-
97
- async function example() {
98
- console.log("🚀 Testing komputer-ai SDK...");
99
- const api = new TemplatesApi();
100
-
101
- try {
102
- const data = await api.namespacesGet();
103
- console.log(data);
104
- } catch (error) {
105
- console.error(error);
106
- }
107
- }
108
-
109
- // Run the test
110
- example().catch(console.error);
111
- ```
112
-
113
- ### Parameters
114
-
115
- This endpoint does not need any parameter.
116
-
117
- ### Return type
118
-
119
- **{ [key: string]: any; }**
120
-
121
- ### Authorization
122
-
123
- No authorization required
124
-
125
- ### HTTP request headers
126
-
127
- - **Content-Type**: Not defined
128
- - **Accept**: `application/json`
129
-
130
-
131
- ### HTTP response details
132
- | Status code | Description | Response headers |
133
- |-------------|-------------|------------------|
134
- | **200** | List of namespaces | - |
135
- | **500** | Internal error | - |
136
-
137
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
138
-
@@ -1,36 +0,0 @@
1
-
2
- # UpdateSecretRequest
3
-
4
-
5
- ## Properties
6
-
7
- Name | Type
8
- ------------ | -------------
9
- `data` | { [key: string]: string; }
10
- `namespace` | string
11
-
12
- ## Example
13
-
14
- ```typescript
15
- import type { UpdateSecretRequest } from 'komputer-ai'
16
-
17
- // TODO: Update the object below with actual values
18
- const example = {
19
- "data": null,
20
- "namespace": null,
21
- } satisfies UpdateSecretRequest
22
-
23
- console.log(example)
24
-
25
- // Convert the instance to a JSON string
26
- const exampleJSON: string = JSON.stringify(example)
27
- console.log(exampleJSON)
28
-
29
- // Parse the JSON string back to an object
30
- const exampleParsed = JSON.parse(exampleJSON) as UpdateSecretRequest
31
- console.log(exampleParsed)
32
- ```
33
-
34
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
-
36
-
@@ -1,485 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * komputer.ai API
5
- * API-first platform for running persistent Claude AI agents on Kubernetes. Designed to be driven by external systems — create agents, send tasks, and stream real-time results via REST + WebSocket.
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
- import * as runtime from '../runtime';
17
- import type {
18
- AgentListResponse,
19
- AgentResponse,
20
- CreateAgentRequest,
21
- PatchAgentRequest,
22
- } from '../models/index';
23
- import {
24
- AgentListResponseFromJSON,
25
- AgentListResponseToJSON,
26
- AgentResponseFromJSON,
27
- AgentResponseToJSON,
28
- CreateAgentRequestFromJSON,
29
- CreateAgentRequestToJSON,
30
- PatchAgentRequestFromJSON,
31
- PatchAgentRequestToJSON,
32
- } from '../models/index';
33
-
34
- export interface AgentsNameWsGetRequest {
35
- name: string;
36
- }
37
-
38
- export interface CancelAgentTaskRequest {
39
- name: string;
40
- namespace?: string;
41
- }
42
-
43
- export interface CreateAgentOperationRequest {
44
- request: CreateAgentRequest;
45
- }
46
-
47
- export interface DeleteAgentRequest {
48
- name: string;
49
- namespace?: string;
50
- }
51
-
52
- export interface GetAgentRequest {
53
- name: string;
54
- namespace?: string;
55
- }
56
-
57
- export interface GetAgentEventsRequest {
58
- name: string;
59
- namespace?: string;
60
- limit?: number;
61
- }
62
-
63
- export interface ListAgentsRequest {
64
- namespace?: string;
65
- }
66
-
67
- export interface PatchAgentOperationRequest {
68
- name: string;
69
- request: PatchAgentRequest;
70
- namespace?: string;
71
- }
72
-
73
- /**
74
- *
75
- */
76
- export class AgentsApi extends runtime.BaseAPI {
77
-
78
- /**
79
- * Creates request options for agentsNameWsGet without sending the request
80
- */
81
- async agentsNameWsGetRequestOpts(requestParameters: AgentsNameWsGetRequest): Promise<runtime.RequestOpts> {
82
- if (requestParameters['name'] == null) {
83
- throw new runtime.RequiredError(
84
- 'name',
85
- 'Required parameter "name" was null or undefined when calling agentsNameWsGet().'
86
- );
87
- }
88
-
89
- const queryParameters: any = {};
90
-
91
- const headerParameters: runtime.HTTPHeaders = {};
92
-
93
-
94
- let urlPath = `/agents/{name}/ws`;
95
- urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name'])));
96
-
97
- return {
98
- path: urlPath,
99
- method: 'GET',
100
- headers: headerParameters,
101
- query: queryParameters,
102
- };
103
- }
104
-
105
- /**
106
- * Upgrades to a WebSocket connection to stream real-time agent events. Events include task_started, thinking, tool_call, tool_result, text, task_completed, task_cancelled, and error.
107
- * Stream agent events (WebSocket)
108
- */
109
- async agentsNameWsGetRaw(requestParameters: AgentsNameWsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
110
- const requestOptions = await this.agentsNameWsGetRequestOpts(requestParameters);
111
- const response = await this.request(requestOptions, initOverrides);
112
-
113
- return new runtime.VoidApiResponse(response);
114
- }
115
-
116
- /**
117
- * Upgrades to a WebSocket connection to stream real-time agent events. Events include task_started, thinking, tool_call, tool_result, text, task_completed, task_cancelled, and error.
118
- * Stream agent events (WebSocket)
119
- */
120
- async agentsNameWsGet(requestParameters: AgentsNameWsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
121
- await this.agentsNameWsGetRaw(requestParameters, initOverrides);
122
- }
123
-
124
- /**
125
- * Creates request options for cancelAgentTask without sending the request
126
- */
127
- async cancelAgentTaskRequestOpts(requestParameters: CancelAgentTaskRequest): Promise<runtime.RequestOpts> {
128
- if (requestParameters['name'] == null) {
129
- throw new runtime.RequiredError(
130
- 'name',
131
- 'Required parameter "name" was null or undefined when calling cancelAgentTask().'
132
- );
133
- }
134
-
135
- const queryParameters: any = {};
136
-
137
- if (requestParameters['namespace'] != null) {
138
- queryParameters['namespace'] = requestParameters['namespace'];
139
- }
140
-
141
- const headerParameters: runtime.HTTPHeaders = {};
142
-
143
-
144
- let urlPath = `/agents/{name}/cancel`;
145
- urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name'])));
146
-
147
- return {
148
- path: urlPath,
149
- method: 'POST',
150
- headers: headerParameters,
151
- query: queryParameters,
152
- };
153
- }
154
-
155
- /**
156
- * Gracefully cancels the currently running task. The agent pod stays alive for future tasks.
157
- * Cancel agent task
158
- */
159
- async cancelAgentTaskRaw(requestParameters: CancelAgentTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: string; }>> {
160
- const requestOptions = await this.cancelAgentTaskRequestOpts(requestParameters);
161
- const response = await this.request(requestOptions, initOverrides);
162
-
163
- return new runtime.JSONApiResponse<any>(response);
164
- }
165
-
166
- /**
167
- * Gracefully cancels the currently running task. The agent pod stays alive for future tasks.
168
- * Cancel agent task
169
- */
170
- async cancelAgentTask(requestParameters: CancelAgentTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: string; }> {
171
- const response = await this.cancelAgentTaskRaw(requestParameters, initOverrides);
172
- return await response.value();
173
- }
174
-
175
- /**
176
- * Creates request options for createAgent without sending the request
177
- */
178
- async createAgentRequestOpts(requestParameters: CreateAgentOperationRequest): Promise<runtime.RequestOpts> {
179
- if (requestParameters['request'] == null) {
180
- throw new runtime.RequiredError(
181
- 'request',
182
- 'Required parameter "request" was null or undefined when calling createAgent().'
183
- );
184
- }
185
-
186
- const queryParameters: any = {};
187
-
188
- const headerParameters: runtime.HTTPHeaders = {};
189
-
190
- headerParameters['Content-Type'] = 'application/json';
191
-
192
-
193
- let urlPath = `/agents`;
194
-
195
- return {
196
- path: urlPath,
197
- method: 'POST',
198
- headers: headerParameters,
199
- query: queryParameters,
200
- body: CreateAgentRequestToJSON(requestParameters['request']),
201
- };
202
- }
203
-
204
- /**
205
- * Creates a new agent or sends a task to an existing idle agent (upsert by name). If the agent doesn\'t exist, it is created. If it exists and is idle, the task is forwarded.
206
- * Create agent or send task
207
- */
208
- async createAgentRaw(requestParameters: CreateAgentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentResponse>> {
209
- const requestOptions = await this.createAgentRequestOpts(requestParameters);
210
- const response = await this.request(requestOptions, initOverrides);
211
-
212
- return new runtime.JSONApiResponse(response, (jsonValue) => AgentResponseFromJSON(jsonValue));
213
- }
214
-
215
- /**
216
- * Creates a new agent or sends a task to an existing idle agent (upsert by name). If the agent doesn\'t exist, it is created. If it exists and is idle, the task is forwarded.
217
- * Create agent or send task
218
- */
219
- async createAgent(requestParameters: CreateAgentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentResponse> {
220
- const response = await this.createAgentRaw(requestParameters, initOverrides);
221
- return await response.value();
222
- }
223
-
224
- /**
225
- * Creates request options for deleteAgent without sending the request
226
- */
227
- async deleteAgentRequestOpts(requestParameters: DeleteAgentRequest): Promise<runtime.RequestOpts> {
228
- if (requestParameters['name'] == null) {
229
- throw new runtime.RequiredError(
230
- 'name',
231
- 'Required parameter "name" was null or undefined when calling deleteAgent().'
232
- );
233
- }
234
-
235
- const queryParameters: any = {};
236
-
237
- if (requestParameters['namespace'] != null) {
238
- queryParameters['namespace'] = requestParameters['namespace'];
239
- }
240
-
241
- const headerParameters: runtime.HTTPHeaders = {};
242
-
243
-
244
- let urlPath = `/agents/{name}`;
245
- urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name'])));
246
-
247
- return {
248
- path: urlPath,
249
- method: 'DELETE',
250
- headers: headerParameters,
251
- query: queryParameters,
252
- };
253
- }
254
-
255
- /**
256
- * Deletes the agent CR, pod, PVC, secrets, and Redis event stream.
257
- * Delete agent
258
- */
259
- async deleteAgentRaw(requestParameters: DeleteAgentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: string; }>> {
260
- const requestOptions = await this.deleteAgentRequestOpts(requestParameters);
261
- const response = await this.request(requestOptions, initOverrides);
262
-
263
- return new runtime.JSONApiResponse<any>(response);
264
- }
265
-
266
- /**
267
- * Deletes the agent CR, pod, PVC, secrets, and Redis event stream.
268
- * Delete agent
269
- */
270
- async deleteAgent(requestParameters: DeleteAgentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: string; }> {
271
- const response = await this.deleteAgentRaw(requestParameters, initOverrides);
272
- return await response.value();
273
- }
274
-
275
- /**
276
- * Creates request options for getAgent without sending the request
277
- */
278
- async getAgentRequestOpts(requestParameters: GetAgentRequest): Promise<runtime.RequestOpts> {
279
- if (requestParameters['name'] == null) {
280
- throw new runtime.RequiredError(
281
- 'name',
282
- 'Required parameter "name" was null or undefined when calling getAgent().'
283
- );
284
- }
285
-
286
- const queryParameters: any = {};
287
-
288
- if (requestParameters['namespace'] != null) {
289
- queryParameters['namespace'] = requestParameters['namespace'];
290
- }
291
-
292
- const headerParameters: runtime.HTTPHeaders = {};
293
-
294
-
295
- let urlPath = `/agents/{name}`;
296
- urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name'])));
297
-
298
- return {
299
- path: urlPath,
300
- method: 'GET',
301
- headers: headerParameters,
302
- query: queryParameters,
303
- };
304
- }
305
-
306
- /**
307
- * Returns the current status and metadata for a single agent.
308
- * Get agent details
309
- */
310
- async getAgentRaw(requestParameters: GetAgentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentResponse>> {
311
- const requestOptions = await this.getAgentRequestOpts(requestParameters);
312
- const response = await this.request(requestOptions, initOverrides);
313
-
314
- return new runtime.JSONApiResponse(response, (jsonValue) => AgentResponseFromJSON(jsonValue));
315
- }
316
-
317
- /**
318
- * Returns the current status and metadata for a single agent.
319
- * Get agent details
320
- */
321
- async getAgent(requestParameters: GetAgentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentResponse> {
322
- const response = await this.getAgentRaw(requestParameters, initOverrides);
323
- return await response.value();
324
- }
325
-
326
- /**
327
- * Creates request options for getAgentEvents without sending the request
328
- */
329
- async getAgentEventsRequestOpts(requestParameters: GetAgentEventsRequest): Promise<runtime.RequestOpts> {
330
- if (requestParameters['name'] == null) {
331
- throw new runtime.RequiredError(
332
- 'name',
333
- 'Required parameter "name" was null or undefined when calling getAgentEvents().'
334
- );
335
- }
336
-
337
- const queryParameters: any = {};
338
-
339
- if (requestParameters['namespace'] != null) {
340
- queryParameters['namespace'] = requestParameters['namespace'];
341
- }
342
-
343
- if (requestParameters['limit'] != null) {
344
- queryParameters['limit'] = requestParameters['limit'];
345
- }
346
-
347
- const headerParameters: runtime.HTTPHeaders = {};
348
-
349
-
350
- let urlPath = `/agents/{name}/events`;
351
- urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name'])));
352
-
353
- return {
354
- path: urlPath,
355
- method: 'GET',
356
- headers: headerParameters,
357
- query: queryParameters,
358
- };
359
- }
360
-
361
- /**
362
- * Returns recent events from the agent\'s Redis stream in chronological order.
363
- * Get agent events
364
- */
365
- async getAgentEventsRaw(requestParameters: GetAgentEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: any; }>> {
366
- const requestOptions = await this.getAgentEventsRequestOpts(requestParameters);
367
- const response = await this.request(requestOptions, initOverrides);
368
-
369
- return new runtime.JSONApiResponse<any>(response);
370
- }
371
-
372
- /**
373
- * Returns recent events from the agent\'s Redis stream in chronological order.
374
- * Get agent events
375
- */
376
- async getAgentEvents(requestParameters: GetAgentEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }> {
377
- const response = await this.getAgentEventsRaw(requestParameters, initOverrides);
378
- return await response.value();
379
- }
380
-
381
- /**
382
- * Creates request options for listAgents without sending the request
383
- */
384
- async listAgentsRequestOpts(requestParameters: ListAgentsRequest): Promise<runtime.RequestOpts> {
385
- const queryParameters: any = {};
386
-
387
- if (requestParameters['namespace'] != null) {
388
- queryParameters['namespace'] = requestParameters['namespace'];
389
- }
390
-
391
- const headerParameters: runtime.HTTPHeaders = {};
392
-
393
-
394
- let urlPath = `/agents`;
395
-
396
- return {
397
- path: urlPath,
398
- method: 'GET',
399
- headers: headerParameters,
400
- query: queryParameters,
401
- };
402
- }
403
-
404
- /**
405
- * Returns all agents with their current status in the specified namespace.
406
- * List agents
407
- */
408
- async listAgentsRaw(requestParameters: ListAgentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentListResponse>> {
409
- const requestOptions = await this.listAgentsRequestOpts(requestParameters);
410
- const response = await this.request(requestOptions, initOverrides);
411
-
412
- return new runtime.JSONApiResponse(response, (jsonValue) => AgentListResponseFromJSON(jsonValue));
413
- }
414
-
415
- /**
416
- * Returns all agents with their current status in the specified namespace.
417
- * List agents
418
- */
419
- async listAgents(requestParameters: ListAgentsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentListResponse> {
420
- const response = await this.listAgentsRaw(requestParameters, initOverrides);
421
- return await response.value();
422
- }
423
-
424
- /**
425
- * Creates request options for patchAgent without sending the request
426
- */
427
- async patchAgentRequestOpts(requestParameters: PatchAgentOperationRequest): Promise<runtime.RequestOpts> {
428
- if (requestParameters['name'] == null) {
429
- throw new runtime.RequiredError(
430
- 'name',
431
- 'Required parameter "name" was null or undefined when calling patchAgent().'
432
- );
433
- }
434
-
435
- if (requestParameters['request'] == null) {
436
- throw new runtime.RequiredError(
437
- 'request',
438
- 'Required parameter "request" was null or undefined when calling patchAgent().'
439
- );
440
- }
441
-
442
- const queryParameters: any = {};
443
-
444
- if (requestParameters['namespace'] != null) {
445
- queryParameters['namespace'] = requestParameters['namespace'];
446
- }
447
-
448
- const headerParameters: runtime.HTTPHeaders = {};
449
-
450
- headerParameters['Content-Type'] = 'application/json';
451
-
452
-
453
- let urlPath = `/agents/{name}`;
454
- urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name'])));
455
-
456
- return {
457
- path: urlPath,
458
- method: 'PATCH',
459
- headers: headerParameters,
460
- query: queryParameters,
461
- body: PatchAgentRequestToJSON(requestParameters['request']),
462
- };
463
- }
464
-
465
- /**
466
- * Updates model, lifecycle, instructions, secretRefs, memories, skills, or connectors on an existing agent.
467
- * Patch agent
468
- */
469
- async patchAgentRaw(requestParameters: PatchAgentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentResponse>> {
470
- const requestOptions = await this.patchAgentRequestOpts(requestParameters);
471
- const response = await this.request(requestOptions, initOverrides);
472
-
473
- return new runtime.JSONApiResponse(response, (jsonValue) => AgentResponseFromJSON(jsonValue));
474
- }
475
-
476
- /**
477
- * Updates model, lifecycle, instructions, secretRefs, memories, skills, or connectors on an existing agent.
478
- * Patch agent
479
- */
480
- async patchAgent(requestParameters: PatchAgentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentResponse> {
481
- const response = await this.patchAgentRaw(requestParameters, initOverrides);
482
- return await response.value();
483
- }
484
-
485
- }