@komputer-ai/sdk 0.11.1

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 (76) hide show
  1. package/.openapi-generator-ignore +31 -0
  2. package/README.md +147 -0
  3. package/docs/AgentListResponse.md +34 -0
  4. package/docs/AgentResponse.md +68 -0
  5. package/docs/AgentsApi.md +584 -0
  6. package/docs/ConnectorResponse.md +58 -0
  7. package/docs/ConnectorsApi.md +366 -0
  8. package/docs/CreateAgentRequest.md +58 -0
  9. package/docs/CreateConnectorRequest.md +54 -0
  10. package/docs/CreateMemoryRequest.md +40 -0
  11. package/docs/CreateScheduleAgentSpec.md +42 -0
  12. package/docs/CreateScheduleRequest.md +50 -0
  13. package/docs/CreateSecretRequest.md +38 -0
  14. package/docs/CreateSkillRequest.md +40 -0
  15. package/docs/MemoriesApi.md +368 -0
  16. package/docs/MemoryResponse.md +46 -0
  17. package/docs/OfficeListResponse.md +34 -0
  18. package/docs/OfficeMemberResponse.md +40 -0
  19. package/docs/OfficeResponse.md +54 -0
  20. package/docs/OfficesApi.md +300 -0
  21. package/docs/PatchAgentRequest.md +50 -0
  22. package/docs/PatchMemoryRequest.md +36 -0
  23. package/docs/PatchScheduleRequest.md +34 -0
  24. package/docs/PatchSkillRequest.md +36 -0
  25. package/docs/ScheduleListResponse.md +34 -0
  26. package/docs/ScheduleResponse.md +70 -0
  27. package/docs/SchedulesApi.md +369 -0
  28. package/docs/SecretListResponse.md +34 -0
  29. package/docs/SecretResponse.md +48 -0
  30. package/docs/SecretsApi.md +298 -0
  31. package/docs/SkillResponse.md +48 -0
  32. package/docs/SkillsApi.md +368 -0
  33. package/docs/TemplatesApi.md +138 -0
  34. package/docs/UpdateSecretRequest.md +36 -0
  35. package/package.json +27 -0
  36. package/src/apis/AgentsApi.ts +485 -0
  37. package/src/apis/ConnectorsApi.ts +301 -0
  38. package/src/apis/MemoriesApi.ts +315 -0
  39. package/src/apis/OfficesApi.ts +253 -0
  40. package/src/apis/SchedulesApi.ts +318 -0
  41. package/src/apis/SecretsApi.ts +267 -0
  42. package/src/apis/SkillsApi.ts +315 -0
  43. package/src/apis/TemplatesApi.ts +109 -0
  44. package/src/apis/index.ts +10 -0
  45. package/src/client.test.ts +88 -0
  46. package/src/client.ts +212 -0
  47. package/src/index.ts +7 -0
  48. package/src/models/AgentListResponse.ts +73 -0
  49. package/src/models/AgentResponse.ts +201 -0
  50. package/src/models/ConnectorResponse.ts +161 -0
  51. package/src/models/CreateAgentRequest.ts +163 -0
  52. package/src/models/CreateConnectorRequest.ts +148 -0
  53. package/src/models/CreateMemoryRequest.ts +91 -0
  54. package/src/models/CreateScheduleAgentSpec.ts +97 -0
  55. package/src/models/CreateScheduleRequest.ts +140 -0
  56. package/src/models/CreateSecretRequest.ts +83 -0
  57. package/src/models/CreateSkillRequest.ts +92 -0
  58. package/src/models/MemoryResponse.ts +113 -0
  59. package/src/models/OfficeListResponse.ts +73 -0
  60. package/src/models/OfficeMemberResponse.ts +89 -0
  61. package/src/models/OfficeResponse.ts +153 -0
  62. package/src/models/PatchAgentRequest.ts +129 -0
  63. package/src/models/PatchMemoryRequest.ts +73 -0
  64. package/src/models/PatchScheduleRequest.ts +65 -0
  65. package/src/models/PatchSkillRequest.ts +73 -0
  66. package/src/models/ScheduleListResponse.ts +73 -0
  67. package/src/models/ScheduleResponse.ts +209 -0
  68. package/src/models/SecretListResponse.ts +73 -0
  69. package/src/models/SecretResponse.ts +121 -0
  70. package/src/models/SkillResponse.ts +121 -0
  71. package/src/models/UpdateSecretRequest.ts +74 -0
  72. package/src/models/index.ts +26 -0
  73. package/src/runtime.ts +450 -0
  74. package/src/watch.ts +89 -0
  75. package/tsconfig.esm.json +7 -0
  76. package/tsconfig.json +18 -0
@@ -0,0 +1,88 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import { KomputerClient } from "./client";
3
+
4
+ describe("KomputerClient", () => {
5
+ it("instantiates with default URL", () => {
6
+ const client = new KomputerClient();
7
+ expect(client).toBeDefined();
8
+ });
9
+
10
+ it("instantiates with custom URL", () => {
11
+ const client = new KomputerClient("http://example.com:8080");
12
+ expect(client).toBeDefined();
13
+ });
14
+
15
+ it("strips trailing slash from URL", () => {
16
+ const client = new KomputerClient("http://localhost:8080/");
17
+ expect(client).toBeDefined();
18
+ });
19
+ });
20
+
21
+ describe("Agent methods exist", () => {
22
+ const client = new KomputerClient();
23
+
24
+ it("has createAgent", () => expect(typeof client.createAgent).toBe("function"));
25
+ it("has listAgents", () => expect(typeof client.listAgents).toBe("function"));
26
+ it("has getAgent", () => expect(typeof client.getAgent).toBe("function"));
27
+ it("has patchAgent", () => expect(typeof client.patchAgent).toBe("function"));
28
+ it("has deleteAgent", () => expect(typeof client.deleteAgent).toBe("function"));
29
+ it("has cancelAgentTask", () => expect(typeof client.cancelAgentTask).toBe("function"));
30
+ it("has getAgentEvents", () => expect(typeof client.getAgentEvents).toBe("function"));
31
+ it("has watchAgent", () => expect(typeof client.watchAgent).toBe("function"));
32
+ });
33
+
34
+ describe("Memory methods exist", () => {
35
+ const client = new KomputerClient();
36
+
37
+ it("has createMemory", () => expect(typeof client.createMemory).toBe("function"));
38
+ it("has listMemories", () => expect(typeof client.listMemories).toBe("function"));
39
+ it("has getMemory", () => expect(typeof client.getMemory).toBe("function"));
40
+ it("has patchMemory", () => expect(typeof client.patchMemory).toBe("function"));
41
+ it("has deleteMemory", () => expect(typeof client.deleteMemory).toBe("function"));
42
+ });
43
+
44
+ describe("Skill methods exist", () => {
45
+ const client = new KomputerClient();
46
+
47
+ it("has createSkill", () => expect(typeof client.createSkill).toBe("function"));
48
+ it("has listSkills", () => expect(typeof client.listSkills).toBe("function"));
49
+ it("has getSkill", () => expect(typeof client.getSkill).toBe("function"));
50
+ it("has patchSkill", () => expect(typeof client.patchSkill).toBe("function"));
51
+ it("has deleteSkill", () => expect(typeof client.deleteSkill).toBe("function"));
52
+ });
53
+
54
+ describe("Schedule methods exist", () => {
55
+ const client = new KomputerClient();
56
+
57
+ it("has createSchedule", () => expect(typeof client.createSchedule).toBe("function"));
58
+ it("has listSchedules", () => expect(typeof client.listSchedules).toBe("function"));
59
+ it("has getSchedule", () => expect(typeof client.getSchedule).toBe("function"));
60
+ it("has patchSchedule", () => expect(typeof client.patchSchedule).toBe("function"));
61
+ it("has deleteSchedule", () => expect(typeof client.deleteSchedule).toBe("function"));
62
+ });
63
+
64
+ describe("Secret methods exist", () => {
65
+ const client = new KomputerClient();
66
+
67
+ it("has createSecret", () => expect(typeof client.createSecret).toBe("function"));
68
+ it("has listSecrets", () => expect(typeof client.listSecrets).toBe("function"));
69
+ it("has updateSecret", () => expect(typeof client.updateSecret).toBe("function"));
70
+ it("has deleteSecret", () => expect(typeof client.deleteSecret).toBe("function"));
71
+ });
72
+
73
+ describe("Connector methods exist", () => {
74
+ const client = new KomputerClient();
75
+
76
+ it("has createConnector", () => expect(typeof client.createConnector).toBe("function"));
77
+ it("has listConnectors", () => expect(typeof client.listConnectors).toBe("function"));
78
+ it("has getConnector", () => expect(typeof client.getConnector).toBe("function"));
79
+ it("has deleteConnector", () => expect(typeof client.deleteConnector).toBe("function"));
80
+ });
81
+
82
+ describe("Office methods exist", () => {
83
+ const client = new KomputerClient();
84
+
85
+ it("has listOffices", () => expect(typeof client.listOffices).toBe("function"));
86
+ it("has getOffice", () => expect(typeof client.getOffice).toBe("function"));
87
+ it("has deleteOffice", () => expect(typeof client.deleteOffice).toBe("function"));
88
+ });
package/src/client.ts ADDED
@@ -0,0 +1,212 @@
1
+ /**
2
+ * High-level convenience client for the komputer.ai API.
3
+ *
4
+ * Auto-generated by generate_client.py — do not edit manually.
5
+ *
6
+ * @example
7
+ * const client = new KomputerClient("http://localhost:8080");
8
+ * const agent = await client.createAgent({
9
+ * name: "my-agent",
10
+ * instructions: "Say hello",
11
+ * model: "claude-sonnet-4-6",
12
+ * });
13
+ */
14
+
15
+ import { Configuration } from "./runtime";
16
+ import { AgentsApi, ConnectorsApi, MemoriesApi, OfficesApi, SchedulesApi, SecretsApi, SkillsApi, TemplatesApi } from "./apis";
17
+ import type { CreateAgentRequest, CreateConnectorRequest, CreateMemoryRequest, CreateScheduleAgentSpec, CreateScheduleRequest, CreateSecretRequest, CreateSkillRequest, PatchAgentRequest, PatchMemoryRequest, PatchScheduleRequest, PatchSkillRequest, UpdateSecretRequest } from "./models";
18
+ import { AgentEventStream } from "./watch";
19
+ export type { AgentEvent } from "./watch";
20
+
21
+ export class KomputerClient {
22
+ private _agents: AgentsApi;
23
+ private _connectors: ConnectorsApi;
24
+ private _memories: MemoriesApi;
25
+ private _offices: OfficesApi;
26
+ private _schedules: SchedulesApi;
27
+ private _secrets: SecretsApi;
28
+ private _skills: SkillsApi;
29
+ private _templates: TemplatesApi;
30
+ private _baseUrl: string;
31
+
32
+ constructor(baseUrl: string = "http://localhost:8080") {
33
+ this._baseUrl = baseUrl.replace(/\/$/, "");
34
+ const config = new Configuration({ basePath: this._baseUrl + "/api/v1" });
35
+ this._agents = new AgentsApi(config);
36
+ this._connectors = new ConnectorsApi(config);
37
+ this._memories = new MemoriesApi(config);
38
+ this._offices = new OfficesApi(config);
39
+ this._schedules = new SchedulesApi(config);
40
+ this._secrets = new SecretsApi(config);
41
+ this._skills = new SkillsApi(config);
42
+ this._templates = new TemplatesApi(config);
43
+ }
44
+
45
+ // --- Agents ---
46
+
47
+ async listAgents() {
48
+ return this._agents.listAgents({});
49
+ }
50
+
51
+ async createAgent(params: { name: string; instructions: string; connectors?: string[]; lifecycle?: string; memories?: string[]; model?: string; namespace?: string; officeManager?: string; role?: string; secretRefs?: string[]; skills?: string[]; systemPrompt?: string; templateRef?: string }) {
52
+ return this._agents.createAgent({ request: { connectors: params.connectors, instructions: params.instructions, lifecycle: params.lifecycle, memories: params.memories, model: params.model, name: params.name, namespace: params.namespace, officeManager: params.officeManager, role: params.role, secretRefs: params.secretRefs, skills: params.skills, systemPrompt: params.systemPrompt, templateRef: params.templateRef } });
53
+ }
54
+
55
+ async getAgent(name: string) {
56
+ return this._agents.getAgent({ name });
57
+ }
58
+
59
+ async patchAgent(params: { name: string; connectors?: string[]; instructions?: string; lifecycle?: string; memories?: string[]; model?: string; secretRefs?: string[]; skills?: string[]; systemPrompt?: string; templateRef?: string }) {
60
+ return this._agents.patchAgent({ name: params.name, request: { connectors: params.connectors, instructions: params.instructions, lifecycle: params.lifecycle, memories: params.memories, model: params.model, secretRefs: params.secretRefs, skills: params.skills, systemPrompt: params.systemPrompt, templateRef: params.templateRef } });
61
+ }
62
+
63
+ async deleteAgent(name: string) {
64
+ return this._agents.deleteAgent({ name });
65
+ }
66
+
67
+ async cancelAgentTask(name: string) {
68
+ return this._agents.cancelAgentTask({ name });
69
+ }
70
+
71
+ async getAgentEvents(name: string) {
72
+ return this._agents.getAgentEvents({ name });
73
+ }
74
+
75
+ // --- Memories ---
76
+
77
+ async listMemories() {
78
+ return this._memories.listMemories({});
79
+ }
80
+
81
+ async createMemory(params: { name: string; content: string; description?: string; namespace?: string }) {
82
+ return this._memories.createMemory({ request: { content: params.content, description: params.description, name: params.name, namespace: params.namespace } });
83
+ }
84
+
85
+ async getMemory(name: string) {
86
+ return this._memories.getMemory({ name });
87
+ }
88
+
89
+ async patchMemory(params: { name: string; content?: string; description?: string }) {
90
+ return this._memories.patchMemory({ name: params.name, request: { content: params.content, description: params.description } });
91
+ }
92
+
93
+ async deleteMemory(name: string) {
94
+ return this._memories.deleteMemory({ name });
95
+ }
96
+
97
+ // --- Skills ---
98
+
99
+ async listSkills() {
100
+ return this._skills.listSkills({});
101
+ }
102
+
103
+ async createSkill(params: { name: string; content: string; description: string; namespace?: string }) {
104
+ return this._skills.createSkill({ request: { content: params.content, description: params.description, name: params.name, namespace: params.namespace } });
105
+ }
106
+
107
+ async getSkill(name: string) {
108
+ return this._skills.getSkill({ name });
109
+ }
110
+
111
+ async patchSkill(params: { name: string; content?: string; description?: string }) {
112
+ return this._skills.patchSkill({ name: params.name, request: { content: params.content, description: params.description } });
113
+ }
114
+
115
+ async deleteSkill(name: string) {
116
+ return this._skills.deleteSkill({ name });
117
+ }
118
+
119
+ // --- Schedules ---
120
+
121
+ async listSchedules() {
122
+ return this._schedules.listSchedules({});
123
+ }
124
+
125
+ async createSchedule(params: { name: string; instructions: string; schedule: string; agent?: CreateScheduleAgentSpec; agentName?: string; autoDelete?: boolean; keepAgents?: boolean; namespace?: string; timezone?: string }) {
126
+ return this._schedules.createSchedule({ request: { agent: params.agent, agentName: params.agentName, autoDelete: params.autoDelete, instructions: params.instructions, keepAgents: params.keepAgents, name: params.name, namespace: params.namespace, schedule: params.schedule, timezone: params.timezone } });
127
+ }
128
+
129
+ async getSchedule(name: string) {
130
+ return this._schedules.getSchedule({ name });
131
+ }
132
+
133
+ async patchSchedule(params: { name: string; schedule?: string }) {
134
+ return this._schedules.patchSchedule({ name: params.name, request: { schedule: params.schedule } });
135
+ }
136
+
137
+ async deleteSchedule(name: string) {
138
+ return this._schedules.deleteSchedule({ name });
139
+ }
140
+
141
+ // --- Secrets ---
142
+
143
+ async listSecrets() {
144
+ return this._secrets.listSecrets({});
145
+ }
146
+
147
+ async createSecret(params: { name: string; data: Record<string, string>; namespace?: string }) {
148
+ return this._secrets.createSecret({ request: { data: params.data, name: params.name, namespace: params.namespace } });
149
+ }
150
+
151
+ async updateSecret(params: { name: string; data: Record<string, string>; namespace?: string }) {
152
+ return this._secrets.updateSecret({ name: params.name, request: { data: params.data, namespace: params.namespace } });
153
+ }
154
+
155
+ async deleteSecret(name: string) {
156
+ return this._secrets.deleteSecret({ name });
157
+ }
158
+
159
+ // --- Connectors ---
160
+
161
+ async listConnectors() {
162
+ return this._connectors.listConnectors({});
163
+ }
164
+
165
+ async createConnector(params: { name: string; service: string; url: string; authSecretKey?: string; authSecretName?: string; authType?: string; displayName?: string; namespace?: string; oauthClientId?: string; oauthClientSecret?: string; type?: string }) {
166
+ return this._connectors.createConnector({ request: { authSecretKey: params.authSecretKey, authSecretName: params.authSecretName, authType: params.authType, displayName: params.displayName, name: params.name, namespace: params.namespace, oauthClientId: params.oauthClientId, oauthClientSecret: params.oauthClientSecret, service: params.service, type: params.type, url: params.url } });
167
+ }
168
+
169
+ async getConnector(name: string) {
170
+ return this._connectors.getConnector({ name });
171
+ }
172
+
173
+ async deleteConnector(name: string) {
174
+ return this._connectors.deleteConnector({ name });
175
+ }
176
+
177
+ async listConnectorTools(name: string) {
178
+ return this._connectors.listConnectorTools({ name });
179
+ }
180
+
181
+ // --- Offices ---
182
+
183
+ async listOffices() {
184
+ return this._offices.listOffices({});
185
+ }
186
+
187
+ async getOffice(name: string) {
188
+ return this._offices.getOffice({ name });
189
+ }
190
+
191
+ async deleteOffice(name: string) {
192
+ return this._offices.deleteOffice({ name });
193
+ }
194
+
195
+ async getOfficeEvents(name: string) {
196
+ return this._offices.getOfficeEvents({ name });
197
+ }
198
+
199
+ // --- Templates ---
200
+
201
+ async listTemplates() {
202
+ return this._templates.listTemplates({});
203
+ }
204
+
205
+
206
+ // --- WebSocket ---
207
+
208
+ watchAgent(name: string): AgentEventStream {
209
+ const wsUrl = this._baseUrl.replace("http://", "ws://").replace("https://", "wss://");
210
+ return new AgentEventStream(wsUrl, name);
211
+ }
212
+ }
package/src/index.ts ADDED
@@ -0,0 +1,7 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './runtime';
4
+ export * from './apis/index';
5
+ export * from './models/index';
6
+ export { KomputerClient } from './client';
7
+ export type { AgentEvent } from './watch';
@@ -0,0 +1,73 @@
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
+ import { mapValues } from '../runtime';
16
+ import type { AgentResponse } from './AgentResponse';
17
+ import {
18
+ AgentResponseFromJSON,
19
+ AgentResponseFromJSONTyped,
20
+ AgentResponseToJSON,
21
+ AgentResponseToJSONTyped,
22
+ } from './AgentResponse';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface AgentListResponse
28
+ */
29
+ export interface AgentListResponse {
30
+ /**
31
+ *
32
+ * @type {Array<AgentResponse>}
33
+ * @memberof AgentListResponse
34
+ */
35
+ agents?: Array<AgentResponse>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the AgentListResponse interface.
40
+ */
41
+ export function instanceOfAgentListResponse(value: object): value is AgentListResponse {
42
+ return true;
43
+ }
44
+
45
+ export function AgentListResponseFromJSON(json: any): AgentListResponse {
46
+ return AgentListResponseFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function AgentListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentListResponse {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'agents': json['agents'] == null ? undefined : ((json['agents'] as Array<any>).map(AgentResponseFromJSON)),
56
+ };
57
+ }
58
+
59
+ export function AgentListResponseToJSON(json: any): AgentListResponse {
60
+ return AgentListResponseToJSONTyped(json, false);
61
+ }
62
+
63
+ export function AgentListResponseToJSONTyped(value?: AgentListResponse | null, ignoreDiscriminator: boolean = false): any {
64
+ if (value == null) {
65
+ return value;
66
+ }
67
+
68
+ return {
69
+
70
+ 'agents': value['agents'] == null ? undefined : ((value['agents'] as Array<any>).map(AgentResponseToJSON)),
71
+ };
72
+ }
73
+
@@ -0,0 +1,201 @@
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
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface AgentResponse
20
+ */
21
+ export interface AgentResponse {
22
+ /**
23
+ * KomputerConnector names attached to this agent
24
+ * @type {Array<string>}
25
+ * @memberof AgentResponse
26
+ */
27
+ connectors?: Array<string>;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AgentResponse
32
+ */
33
+ createdAt?: string;
34
+ /**
35
+ * User task (spec.instructions)
36
+ * @type {string}
37
+ * @memberof AgentResponse
38
+ */
39
+ instructions?: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof AgentResponse
44
+ */
45
+ lastTaskCostUSD?: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof AgentResponse
50
+ */
51
+ lastTaskMessage?: string;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof AgentResponse
56
+ */
57
+ lifecycle?: string;
58
+ /**
59
+ * KomputerMemory names attached to this agent
60
+ * @type {Array<string>}
61
+ * @memberof AgentResponse
62
+ */
63
+ memories?: Array<string>;
64
+ /**
65
+ *
66
+ * @type {string}
67
+ * @memberof AgentResponse
68
+ */
69
+ model?: string;
70
+ /**
71
+ *
72
+ * @type {number}
73
+ * @memberof AgentResponse
74
+ */
75
+ modelContextWindow?: number;
76
+ /**
77
+ *
78
+ * @type {string}
79
+ * @memberof AgentResponse
80
+ */
81
+ name?: string;
82
+ /**
83
+ *
84
+ * @type {string}
85
+ * @memberof AgentResponse
86
+ */
87
+ namespace?: string;
88
+ /**
89
+ * Key names from K8s Secrets (not values)
90
+ * @type {Array<string>}
91
+ * @memberof AgentResponse
92
+ */
93
+ secrets?: Array<string>;
94
+ /**
95
+ * KomputerSkill names attached to this agent
96
+ * @type {Array<string>}
97
+ * @memberof AgentResponse
98
+ */
99
+ skills?: Array<string>;
100
+ /**
101
+ *
102
+ * @type {string}
103
+ * @memberof AgentResponse
104
+ */
105
+ status?: string;
106
+ /**
107
+ * Custom system prompt (spec.systemPrompt)
108
+ * @type {string}
109
+ * @memberof AgentResponse
110
+ */
111
+ systemPrompt?: string;
112
+ /**
113
+ *
114
+ * @type {string}
115
+ * @memberof AgentResponse
116
+ */
117
+ taskStatus?: string;
118
+ /**
119
+ *
120
+ * @type {string}
121
+ * @memberof AgentResponse
122
+ */
123
+ totalCostUSD?: string;
124
+ /**
125
+ *
126
+ * @type {number}
127
+ * @memberof AgentResponse
128
+ */
129
+ totalTokens?: number;
130
+ }
131
+
132
+ /**
133
+ * Check if a given object implements the AgentResponse interface.
134
+ */
135
+ export function instanceOfAgentResponse(value: object): value is AgentResponse {
136
+ return true;
137
+ }
138
+
139
+ export function AgentResponseFromJSON(json: any): AgentResponse {
140
+ return AgentResponseFromJSONTyped(json, false);
141
+ }
142
+
143
+ export function AgentResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentResponse {
144
+ if (json == null) {
145
+ return json;
146
+ }
147
+ return {
148
+
149
+ 'connectors': json['connectors'] == null ? undefined : json['connectors'],
150
+ 'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
151
+ 'instructions': json['instructions'] == null ? undefined : json['instructions'],
152
+ 'lastTaskCostUSD': json['lastTaskCostUSD'] == null ? undefined : json['lastTaskCostUSD'],
153
+ 'lastTaskMessage': json['lastTaskMessage'] == null ? undefined : json['lastTaskMessage'],
154
+ 'lifecycle': json['lifecycle'] == null ? undefined : json['lifecycle'],
155
+ 'memories': json['memories'] == null ? undefined : json['memories'],
156
+ 'model': json['model'] == null ? undefined : json['model'],
157
+ 'modelContextWindow': json['modelContextWindow'] == null ? undefined : json['modelContextWindow'],
158
+ 'name': json['name'] == null ? undefined : json['name'],
159
+ 'namespace': json['namespace'] == null ? undefined : json['namespace'],
160
+ 'secrets': json['secrets'] == null ? undefined : json['secrets'],
161
+ 'skills': json['skills'] == null ? undefined : json['skills'],
162
+ 'status': json['status'] == null ? undefined : json['status'],
163
+ 'systemPrompt': json['systemPrompt'] == null ? undefined : json['systemPrompt'],
164
+ 'taskStatus': json['taskStatus'] == null ? undefined : json['taskStatus'],
165
+ 'totalCostUSD': json['totalCostUSD'] == null ? undefined : json['totalCostUSD'],
166
+ 'totalTokens': json['totalTokens'] == null ? undefined : json['totalTokens'],
167
+ };
168
+ }
169
+
170
+ export function AgentResponseToJSON(json: any): AgentResponse {
171
+ return AgentResponseToJSONTyped(json, false);
172
+ }
173
+
174
+ export function AgentResponseToJSONTyped(value?: AgentResponse | null, ignoreDiscriminator: boolean = false): any {
175
+ if (value == null) {
176
+ return value;
177
+ }
178
+
179
+ return {
180
+
181
+ 'connectors': value['connectors'],
182
+ 'createdAt': value['createdAt'],
183
+ 'instructions': value['instructions'],
184
+ 'lastTaskCostUSD': value['lastTaskCostUSD'],
185
+ 'lastTaskMessage': value['lastTaskMessage'],
186
+ 'lifecycle': value['lifecycle'],
187
+ 'memories': value['memories'],
188
+ 'model': value['model'],
189
+ 'modelContextWindow': value['modelContextWindow'],
190
+ 'name': value['name'],
191
+ 'namespace': value['namespace'],
192
+ 'secrets': value['secrets'],
193
+ 'skills': value['skills'],
194
+ 'status': value['status'],
195
+ 'systemPrompt': value['systemPrompt'],
196
+ 'taskStatus': value['taskStatus'],
197
+ 'totalCostUSD': value['totalCostUSD'],
198
+ 'totalTokens': value['totalTokens'],
199
+ };
200
+ }
201
+