asteroid-odyssey 1.0.7

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 (160) hide show
  1. package/README.md +54 -0
  2. package/dist/generated/agents/core/ApiError.d.ts +10 -0
  3. package/dist/generated/agents/core/ApiError.js +20 -0
  4. package/dist/generated/agents/core/ApiRequestOptions.d.ts +13 -0
  5. package/dist/generated/agents/core/ApiRequestOptions.js +2 -0
  6. package/dist/generated/agents/core/ApiResult.d.ts +7 -0
  7. package/dist/generated/agents/core/ApiResult.js +2 -0
  8. package/dist/generated/agents/core/CancelablePromise.d.ts +20 -0
  9. package/dist/generated/agents/core/CancelablePromise.js +104 -0
  10. package/dist/generated/agents/core/OpenAPI.d.ts +16 -0
  11. package/dist/generated/agents/core/OpenAPI.js +14 -0
  12. package/dist/generated/agents/core/request.d.ts +30 -0
  13. package/dist/generated/agents/core/request.js +294 -0
  14. package/dist/generated/agents/index.d.ts +16 -0
  15. package/dist/generated/agents/index.js +24 -0
  16. package/dist/generated/agents/models/Agent.d.ts +22 -0
  17. package/dist/generated/agents/models/Agent.js +2 -0
  18. package/dist/generated/agents/models/CreateWorkflowRequest.d.ts +27 -0
  19. package/dist/generated/agents/models/CreateWorkflowRequest.js +14 -0
  20. package/dist/generated/agents/models/Execution.d.ts +18 -0
  21. package/dist/generated/agents/models/Execution.js +2 -0
  22. package/dist/generated/agents/models/OptimisationRequest.d.ts +6 -0
  23. package/dist/generated/agents/models/OptimisationRequest.js +2 -0
  24. package/dist/generated/agents/models/Workflow.d.ts +26 -0
  25. package/dist/generated/agents/models/Workflow.js +2 -0
  26. package/dist/generated/agents/models/WorkflowExecution.d.ts +6 -0
  27. package/dist/generated/agents/models/WorkflowExecution.js +2 -0
  28. package/dist/generated/agents/models/WorkflowExecutionRequest.d.ts +4 -0
  29. package/dist/generated/agents/models/WorkflowExecutionRequest.js +2 -0
  30. package/dist/generated/agents/services/AgentService.d.ts +10 -0
  31. package/dist/generated/agents/services/AgentService.js +19 -0
  32. package/dist/generated/agents/services/ApiService.d.ts +9 -0
  33. package/dist/generated/agents/services/ApiService.js +19 -0
  34. package/dist/generated/agents/services/DefaultService.d.ts +23 -0
  35. package/dist/generated/agents/services/DefaultService.js +43 -0
  36. package/dist/generated/agents/services/OptimiserService.d.ts +11 -0
  37. package/dist/generated/agents/services/OptimiserService.js +22 -0
  38. package/dist/generated/agents/services/WorkflowService.d.ts +19 -0
  39. package/dist/generated/agents/services/WorkflowService.js +40 -0
  40. package/dist/generated/platform/core/ApiError.d.ts +10 -0
  41. package/dist/generated/platform/core/ApiError.js +20 -0
  42. package/dist/generated/platform/core/ApiRequestOptions.d.ts +13 -0
  43. package/dist/generated/platform/core/ApiRequestOptions.js +2 -0
  44. package/dist/generated/platform/core/ApiResult.d.ts +7 -0
  45. package/dist/generated/platform/core/ApiResult.js +2 -0
  46. package/dist/generated/platform/core/CancelablePromise.d.ts +20 -0
  47. package/dist/generated/platform/core/CancelablePromise.js +104 -0
  48. package/dist/generated/platform/core/OpenAPI.d.ts +16 -0
  49. package/dist/generated/platform/core/OpenAPI.js +14 -0
  50. package/dist/generated/platform/core/request.d.ts +30 -0
  51. package/dist/generated/platform/core/request.js +294 -0
  52. package/dist/generated/platform/index.d.ts +56 -0
  53. package/dist/generated/platform/index.js +58 -0
  54. package/dist/generated/platform/models/APIKey.d.ts +9 -0
  55. package/dist/generated/platform/models/APIKey.js +2 -0
  56. package/dist/generated/platform/models/AgentReport.d.ts +45 -0
  57. package/dist/generated/platform/models/AgentReport.js +2 -0
  58. package/dist/generated/platform/models/AsteroidChat.d.ts +9 -0
  59. package/dist/generated/platform/models/AsteroidChat.js +2 -0
  60. package/dist/generated/platform/models/AsteroidChoice.d.ts +16 -0
  61. package/dist/generated/platform/models/AsteroidChoice.js +14 -0
  62. package/dist/generated/platform/models/AsteroidMessage.d.ts +27 -0
  63. package/dist/generated/platform/models/AsteroidMessage.js +15 -0
  64. package/dist/generated/platform/models/AsteroidToolCall.d.ts +11 -0
  65. package/dist/generated/platform/models/AsteroidToolCall.js +2 -0
  66. package/dist/generated/platform/models/ChainExecution.d.ts +6 -0
  67. package/dist/generated/platform/models/ChainExecution.js +2 -0
  68. package/dist/generated/platform/models/ChainExecutionState.d.ts +8 -0
  69. package/dist/generated/platform/models/ChainExecutionState.js +2 -0
  70. package/dist/generated/platform/models/ChainRequest.d.ts +6 -0
  71. package/dist/generated/platform/models/ChainRequest.js +2 -0
  72. package/dist/generated/platform/models/ChatFormat.d.ts +5 -0
  73. package/dist/generated/platform/models/ChatFormat.js +13 -0
  74. package/dist/generated/platform/models/ChatIds.d.ts +5 -0
  75. package/dist/generated/platform/models/ChatIds.js +2 -0
  76. package/dist/generated/platform/models/ChoiceIds.d.ts +6 -0
  77. package/dist/generated/platform/models/ChoiceIds.js +2 -0
  78. package/dist/generated/platform/models/Decision.d.ts +7 -0
  79. package/dist/generated/platform/models/Decision.js +15 -0
  80. package/dist/generated/platform/models/ErrorResponse.d.ts +4 -0
  81. package/dist/generated/platform/models/ErrorResponse.js +2 -0
  82. package/dist/generated/platform/models/FailureCategory.d.ts +12 -0
  83. package/dist/generated/platform/models/FailureCategory.js +20 -0
  84. package/dist/generated/platform/models/FailureReport.d.ts +33 -0
  85. package/dist/generated/platform/models/FailureReport.js +13 -0
  86. package/dist/generated/platform/models/Feedback.d.ts +13 -0
  87. package/dist/generated/platform/models/Feedback.js +2 -0
  88. package/dist/generated/platform/models/FeedbackRequest.d.ts +6 -0
  89. package/dist/generated/platform/models/FeedbackRequest.js +2 -0
  90. package/dist/generated/platform/models/HubStats.d.ts +10 -0
  91. package/dist/generated/platform/models/HubStats.js +2 -0
  92. package/dist/generated/platform/models/MessageRole.d.ts +5 -0
  93. package/dist/generated/platform/models/MessageRole.js +13 -0
  94. package/dist/generated/platform/models/MessageType.d.ts +6 -0
  95. package/dist/generated/platform/models/MessageType.js +14 -0
  96. package/dist/generated/platform/models/Permission.d.ts +5 -0
  97. package/dist/generated/platform/models/Permission.js +13 -0
  98. package/dist/generated/platform/models/Project.d.ts +8 -0
  99. package/dist/generated/platform/models/Project.js +2 -0
  100. package/dist/generated/platform/models/ReviewPayload.d.ts +29 -0
  101. package/dist/generated/platform/models/ReviewPayload.js +2 -0
  102. package/dist/generated/platform/models/Run.d.ts +9 -0
  103. package/dist/generated/platform/models/Run.js +2 -0
  104. package/dist/generated/platform/models/RunExecution.d.ts +8 -0
  105. package/dist/generated/platform/models/RunExecution.js +2 -0
  106. package/dist/generated/platform/models/RunState.d.ts +2 -0
  107. package/dist/generated/platform/models/RunState.js +2 -0
  108. package/dist/generated/platform/models/Status.d.ts +8 -0
  109. package/dist/generated/platform/models/Status.js +16 -0
  110. package/dist/generated/platform/models/SupervisionRequest.d.ts +9 -0
  111. package/dist/generated/platform/models/SupervisionRequest.js +2 -0
  112. package/dist/generated/platform/models/SupervisionRequestState.d.ts +8 -0
  113. package/dist/generated/platform/models/SupervisionRequestState.js +2 -0
  114. package/dist/generated/platform/models/SupervisionResult.d.ts +9 -0
  115. package/dist/generated/platform/models/SupervisionResult.js +2 -0
  116. package/dist/generated/platform/models/SupervisionStatus.d.ts +7 -0
  117. package/dist/generated/platform/models/SupervisionStatus.js +2 -0
  118. package/dist/generated/platform/models/Supervisor.d.ts +10 -0
  119. package/dist/generated/platform/models/Supervisor.js +2 -0
  120. package/dist/generated/platform/models/SupervisorChain.d.ts +5 -0
  121. package/dist/generated/platform/models/SupervisorChain.js +2 -0
  122. package/dist/generated/platform/models/SupervisorStats.d.ts +21 -0
  123. package/dist/generated/platform/models/SupervisorStats.js +2 -0
  124. package/dist/generated/platform/models/SupervisorType.d.ts +8 -0
  125. package/dist/generated/platform/models/SupervisorType.js +16 -0
  126. package/dist/generated/platform/models/Task.d.ts +7 -0
  127. package/dist/generated/platform/models/Task.js +2 -0
  128. package/dist/generated/platform/models/Tool.d.ts +9 -0
  129. package/dist/generated/platform/models/Tool.js +2 -0
  130. package/dist/generated/platform/models/ToolCallIds.d.ts +4 -0
  131. package/dist/generated/platform/models/ToolCallIds.js +2 -0
  132. package/dist/generated/platform/models/ToolSupervisionResult.d.ts +36 -0
  133. package/dist/generated/platform/models/ToolSupervisionResult.js +2 -0
  134. package/dist/generated/platform/models/User.d.ts +4 -0
  135. package/dist/generated/platform/models/User.js +2 -0
  136. package/dist/generated/platform/services/ApiKeyService.d.ts +33 -0
  137. package/dist/generated/platform/services/ApiKeyService.js +64 -0
  138. package/dist/generated/platform/services/ApiService.d.ts +9 -0
  139. package/dist/generated/platform/services/ApiService.js +19 -0
  140. package/dist/generated/platform/services/ImproveService.d.ts +20 -0
  141. package/dist/generated/platform/services/ImproveService.js +47 -0
  142. package/dist/generated/platform/services/ProjectService.d.ts +34 -0
  143. package/dist/generated/platform/services/ProjectService.js +72 -0
  144. package/dist/generated/platform/services/RunService.d.ts +103 -0
  145. package/dist/generated/platform/services/RunService.js +227 -0
  146. package/dist/generated/platform/services/StatsService.d.ts +10 -0
  147. package/dist/generated/platform/services/StatsService.js +22 -0
  148. package/dist/generated/platform/services/SupervisionService.d.ts +46 -0
  149. package/dist/generated/platform/services/SupervisionService.js +100 -0
  150. package/dist/generated/platform/services/SupervisorService.d.ts +43 -0
  151. package/dist/generated/platform/services/SupervisorService.js +92 -0
  152. package/dist/generated/platform/services/TaskService.d.ts +29 -0
  153. package/dist/generated/platform/services/TaskService.js +59 -0
  154. package/dist/generated/platform/services/ToolCallService.d.ts +42 -0
  155. package/dist/generated/platform/services/ToolCallService.js +92 -0
  156. package/dist/generated/platform/services/ToolService.d.ts +47 -0
  157. package/dist/generated/platform/services/ToolService.js +92 -0
  158. package/dist/index.d.ts +70 -0
  159. package/dist/index.js +102 -0
  160. package/package.json +30 -0
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SupervisionService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class SupervisionService {
7
+ /**
8
+ * Create a supervision request for a supervisor in a chain on a tool call
9
+ * @param toolCallId
10
+ * @param chainId
11
+ * @param supervisorId
12
+ * @param requestBody
13
+ * @returns string Supervision request created
14
+ * @throws ApiError
15
+ */
16
+ static createSupervisionRequest(toolCallId, chainId, supervisorId, requestBody) {
17
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
18
+ method: 'POST',
19
+ url: '/tool_call/{toolCallId}/chain/{chainId}/supervisor/{supervisorId}/supervision_request',
20
+ path: {
21
+ 'toolCallId': toolCallId,
22
+ 'chainId': chainId,
23
+ 'supervisorId': supervisorId,
24
+ },
25
+ body: requestBody,
26
+ mediaType: 'application/json',
27
+ errors: {
28
+ 400: `Bad request`,
29
+ 404: `Not found`,
30
+ },
31
+ });
32
+ }
33
+ /**
34
+ * Get a supervision request status
35
+ * @param supervisionRequestId
36
+ * @returns SupervisionStatus Get the supervision request status
37
+ * @throws ApiError
38
+ */
39
+ static getSupervisionRequestStatus(supervisionRequestId) {
40
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
41
+ method: 'GET',
42
+ url: '/supervision_request/{supervisionRequestId}/status',
43
+ path: {
44
+ 'supervisionRequestId': supervisionRequestId,
45
+ },
46
+ });
47
+ }
48
+ /**
49
+ * Get a supervision result
50
+ * @param supervisionRequestId
51
+ * @returns SupervisionResult Get the supervision result for a supervision request
52
+ * @throws ApiError
53
+ */
54
+ static getSupervisionResult(supervisionRequestId) {
55
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
56
+ method: 'GET',
57
+ url: '/supervision_request/{supervisionRequestId}/result',
58
+ path: {
59
+ 'supervisionRequestId': supervisionRequestId,
60
+ },
61
+ });
62
+ }
63
+ /**
64
+ * Create a supervision result for a supervision request
65
+ * @param supervisionRequestId
66
+ * @param requestBody
67
+ * @returns string Supervision result created
68
+ * @throws ApiError
69
+ */
70
+ static createSupervisionResult(supervisionRequestId, requestBody) {
71
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
72
+ method: 'POST',
73
+ url: '/supervision_request/{supervisionRequestId}/result',
74
+ path: {
75
+ 'supervisionRequestId': supervisionRequestId,
76
+ },
77
+ body: requestBody,
78
+ mediaType: 'application/json',
79
+ });
80
+ }
81
+ /**
82
+ * Get the review payload for a supervision request
83
+ * @param supervisionRequestId
84
+ * @returns ReviewPayload Review payload for the supervision request
85
+ * @throws ApiError
86
+ */
87
+ static getSupervisionReviewPayload(supervisionRequestId) {
88
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
89
+ method: 'GET',
90
+ url: '/supervision_request/{supervisionRequestId}/review_payload',
91
+ path: {
92
+ 'supervisionRequestId': supervisionRequestId,
93
+ },
94
+ errors: {
95
+ 404: `Supervision request not found`,
96
+ },
97
+ });
98
+ }
99
+ }
100
+ exports.SupervisionService = SupervisionService;
@@ -0,0 +1,43 @@
1
+ import type { ChainRequest } from '../models/ChainRequest';
2
+ import type { Supervisor } from '../models/Supervisor';
3
+ import type { SupervisorChain } from '../models/SupervisorChain';
4
+ import type { CancelablePromise } from '../core/CancelablePromise';
5
+ export declare class SupervisorService {
6
+ /**
7
+ * Get a supervisor
8
+ * @param supervisorId
9
+ * @returns Supervisor Supervisor
10
+ * @throws ApiError
11
+ */
12
+ static getSupervisor(supervisorId: string): CancelablePromise<Supervisor>;
13
+ /**
14
+ * Get all supervisors
15
+ * @param projectId
16
+ * @returns Supervisor List of supervisors
17
+ * @throws ApiError
18
+ */
19
+ static getSupervisors(projectId: string): CancelablePromise<Array<Supervisor>>;
20
+ /**
21
+ * Create a new supervisor
22
+ * @param projectId
23
+ * @param requestBody
24
+ * @returns string Supervisor created
25
+ * @throws ApiError
26
+ */
27
+ static createSupervisor(projectId: string, requestBody: Supervisor): CancelablePromise<string>;
28
+ /**
29
+ * Get all supervisors for a tool, in chain format
30
+ * @param toolId
31
+ * @returns SupervisorChain List of chains with their supervisors
32
+ * @throws ApiError
33
+ */
34
+ static getToolSupervisorChains(toolId: string): CancelablePromise<Array<SupervisorChain>>;
35
+ /**
36
+ * Create new chains with supervisors for a tool
37
+ * @param toolId
38
+ * @param requestBody
39
+ * @returns string Chains created
40
+ * @throws ApiError
41
+ */
42
+ static createToolSupervisorChains(toolId: string, requestBody: Array<ChainRequest>): CancelablePromise<Array<string>>;
43
+ }
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SupervisorService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class SupervisorService {
7
+ /**
8
+ * Get a supervisor
9
+ * @param supervisorId
10
+ * @returns Supervisor Supervisor
11
+ * @throws ApiError
12
+ */
13
+ static getSupervisor(supervisorId) {
14
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
15
+ method: 'GET',
16
+ url: '/supervisor/{supervisorId}',
17
+ path: {
18
+ 'supervisorId': supervisorId,
19
+ },
20
+ });
21
+ }
22
+ /**
23
+ * Get all supervisors
24
+ * @param projectId
25
+ * @returns Supervisor List of supervisors
26
+ * @throws ApiError
27
+ */
28
+ static getSupervisors(projectId) {
29
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
30
+ method: 'GET',
31
+ url: '/project/{projectId}/supervisor',
32
+ path: {
33
+ 'projectId': projectId,
34
+ },
35
+ });
36
+ }
37
+ /**
38
+ * Create a new supervisor
39
+ * @param projectId
40
+ * @param requestBody
41
+ * @returns string Supervisor created
42
+ * @throws ApiError
43
+ */
44
+ static createSupervisor(projectId, requestBody) {
45
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
46
+ method: 'POST',
47
+ url: '/project/{projectId}/supervisor',
48
+ path: {
49
+ 'projectId': projectId,
50
+ },
51
+ body: requestBody,
52
+ mediaType: 'application/json',
53
+ errors: {
54
+ 400: `Bad request`,
55
+ },
56
+ });
57
+ }
58
+ /**
59
+ * Get all supervisors for a tool, in chain format
60
+ * @param toolId
61
+ * @returns SupervisorChain List of chains with their supervisors
62
+ * @throws ApiError
63
+ */
64
+ static getToolSupervisorChains(toolId) {
65
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
66
+ method: 'GET',
67
+ url: '/tool/{toolId}/supervisors',
68
+ path: {
69
+ 'toolId': toolId,
70
+ },
71
+ });
72
+ }
73
+ /**
74
+ * Create new chains with supervisors for a tool
75
+ * @param toolId
76
+ * @param requestBody
77
+ * @returns string Chains created
78
+ * @throws ApiError
79
+ */
80
+ static createToolSupervisorChains(toolId, requestBody) {
81
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
82
+ method: 'POST',
83
+ url: '/tool/{toolId}/supervisors',
84
+ path: {
85
+ 'toolId': toolId,
86
+ },
87
+ body: requestBody,
88
+ mediaType: 'application/json',
89
+ });
90
+ }
91
+ }
92
+ exports.SupervisorService = SupervisorService;
@@ -0,0 +1,29 @@
1
+ import type { Task } from '../models/Task';
2
+ import type { CancelablePromise } from '../core/CancelablePromise';
3
+ export declare class TaskService {
4
+ /**
5
+ * Get all tasks for a project
6
+ * @param projectId
7
+ * @returns Task List of tasks
8
+ * @throws ApiError
9
+ */
10
+ static getProjectTasks(projectId: string): CancelablePromise<Array<Task>>;
11
+ /**
12
+ * Create a new task
13
+ * @param projectId
14
+ * @param requestBody
15
+ * @returns string Task created
16
+ * @throws ApiError
17
+ */
18
+ static createTask(projectId: string, requestBody: {
19
+ name: string;
20
+ description?: string;
21
+ }): CancelablePromise<string>;
22
+ /**
23
+ * Get a task
24
+ * @param taskId
25
+ * @returns Task Task
26
+ * @throws ApiError
27
+ */
28
+ static getTask(taskId: string): CancelablePromise<Task>;
29
+ }
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TaskService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class TaskService {
7
+ /**
8
+ * Get all tasks for a project
9
+ * @param projectId
10
+ * @returns Task List of tasks
11
+ * @throws ApiError
12
+ */
13
+ static getProjectTasks(projectId) {
14
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
15
+ method: 'GET',
16
+ url: '/project/{projectId}/tasks',
17
+ path: {
18
+ 'projectId': projectId,
19
+ },
20
+ errors: {
21
+ 404: `Project not found`,
22
+ },
23
+ });
24
+ }
25
+ /**
26
+ * Create a new task
27
+ * @param projectId
28
+ * @param requestBody
29
+ * @returns string Task created
30
+ * @throws ApiError
31
+ */
32
+ static createTask(projectId, requestBody) {
33
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
34
+ method: 'POST',
35
+ url: '/project/{projectId}/tasks',
36
+ path: {
37
+ 'projectId': projectId,
38
+ },
39
+ body: requestBody,
40
+ mediaType: 'application/json',
41
+ });
42
+ }
43
+ /**
44
+ * Get a task
45
+ * @param taskId
46
+ * @returns Task Task
47
+ * @throws ApiError
48
+ */
49
+ static getTask(taskId) {
50
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
51
+ method: 'GET',
52
+ url: '/task/{taskId}',
53
+ path: {
54
+ 'taskId': taskId,
55
+ },
56
+ });
57
+ }
58
+ }
59
+ exports.TaskService = TaskService;
@@ -0,0 +1,42 @@
1
+ import type { AsteroidToolCall } from '../models/AsteroidToolCall';
2
+ import type { RunExecution } from '../models/RunExecution';
3
+ import type { Status } from '../models/Status';
4
+ import type { CancelablePromise } from '../core/CancelablePromise';
5
+ export declare class ToolCallService {
6
+ /**
7
+ * Get a tool call
8
+ * @param toolCallId
9
+ * @returns AsteroidToolCall Tool call
10
+ * @throws ApiError
11
+ */
12
+ static getToolCall(toolCallId: string): CancelablePromise<AsteroidToolCall>;
13
+ /**
14
+ * Update a tool call
15
+ * @param toolCallId
16
+ * @param requestBody
17
+ * @returns AsteroidToolCall Tool call updated
18
+ * @throws ApiError
19
+ */
20
+ static updateToolCall(toolCallId: string, requestBody: AsteroidToolCall): CancelablePromise<AsteroidToolCall>;
21
+ /**
22
+ * Get a tool call status
23
+ * @param toolCallId
24
+ * @returns Status Tool call
25
+ * @throws ApiError
26
+ */
27
+ static getToolCallStatus(toolCallId: string): CancelablePromise<Status>;
28
+ /**
29
+ * Get the modifications to a tool call
30
+ * @param toolCallId
31
+ * @returns AsteroidToolCall Tool call history
32
+ * @throws ApiError
33
+ */
34
+ static getToolCallHistory(toolCallId: string): CancelablePromise<Array<AsteroidToolCall>>;
35
+ /**
36
+ * Get the state of a tool call
37
+ * @param toolCallId
38
+ * @returns RunExecution Tool call state
39
+ * @throws ApiError
40
+ */
41
+ static getToolCallState(toolCallId: string): CancelablePromise<RunExecution>;
42
+ }
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ToolCallService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class ToolCallService {
7
+ /**
8
+ * Get a tool call
9
+ * @param toolCallId
10
+ * @returns AsteroidToolCall Tool call
11
+ * @throws ApiError
12
+ */
13
+ static getToolCall(toolCallId) {
14
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
15
+ method: 'GET',
16
+ url: '/tool_call/{toolCallId}',
17
+ path: {
18
+ 'toolCallId': toolCallId,
19
+ },
20
+ errors: {
21
+ 404: `Tool call not found`,
22
+ },
23
+ });
24
+ }
25
+ /**
26
+ * Update a tool call
27
+ * @param toolCallId
28
+ * @param requestBody
29
+ * @returns AsteroidToolCall Tool call updated
30
+ * @throws ApiError
31
+ */
32
+ static updateToolCall(toolCallId, requestBody) {
33
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
34
+ method: 'PATCH',
35
+ url: '/tool_call/{toolCallId}',
36
+ path: {
37
+ 'toolCallId': toolCallId,
38
+ },
39
+ body: requestBody,
40
+ mediaType: 'application/json',
41
+ });
42
+ }
43
+ /**
44
+ * Get a tool call status
45
+ * @param toolCallId
46
+ * @returns Status Tool call
47
+ * @throws ApiError
48
+ */
49
+ static getToolCallStatus(toolCallId) {
50
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
51
+ method: 'GET',
52
+ url: '/tool_call/{toolCallId}/status',
53
+ path: {
54
+ 'toolCallId': toolCallId,
55
+ },
56
+ });
57
+ }
58
+ /**
59
+ * Get the modifications to a tool call
60
+ * @param toolCallId
61
+ * @returns AsteroidToolCall Tool call history
62
+ * @throws ApiError
63
+ */
64
+ static getToolCallHistory(toolCallId) {
65
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
66
+ method: 'GET',
67
+ url: '/tool_call/{toolCallId}/history',
68
+ path: {
69
+ 'toolCallId': toolCallId,
70
+ },
71
+ errors: {
72
+ 404: `Tool call not found`,
73
+ },
74
+ });
75
+ }
76
+ /**
77
+ * Get the state of a tool call
78
+ * @param toolCallId
79
+ * @returns RunExecution Tool call state
80
+ * @throws ApiError
81
+ */
82
+ static getToolCallState(toolCallId) {
83
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
84
+ method: 'GET',
85
+ url: '/tool_call/{toolCallId}/state',
86
+ path: {
87
+ 'toolCallId': toolCallId,
88
+ },
89
+ });
90
+ }
91
+ }
92
+ exports.ToolCallService = ToolCallService;
@@ -0,0 +1,47 @@
1
+ import type { Tool } from '../models/Tool';
2
+ import type { ToolSupervisionResult } from '../models/ToolSupervisionResult';
3
+ import type { CancelablePromise } from '../core/CancelablePromise';
4
+ export declare class ToolService {
5
+ /**
6
+ * Get all tools for a run
7
+ * @param runId
8
+ * @returns Tool List of tools
9
+ * @throws ApiError
10
+ */
11
+ static getRunTools(runId: string): CancelablePromise<Array<Tool>>;
12
+ /**
13
+ * Create a new tool for a run
14
+ * @param runId
15
+ * @param requestBody
16
+ * @returns Tool Tool found
17
+ * @throws ApiError
18
+ */
19
+ static createRunTool(runId: string, requestBody: {
20
+ name: string;
21
+ description: string;
22
+ attributes: Record<string, any>;
23
+ ignored_attributes?: Array<string>;
24
+ code: string;
25
+ }): CancelablePromise<Tool>;
26
+ /**
27
+ * Get a tool
28
+ * @param toolId
29
+ * @returns Tool Tool
30
+ * @throws ApiError
31
+ */
32
+ static getTool(toolId: string): CancelablePromise<Tool>;
33
+ /**
34
+ * Get all tools for a project
35
+ * @param projectId
36
+ * @returns Tool List of tools
37
+ * @throws ApiError
38
+ */
39
+ static getProjectTools(projectId: string): CancelablePromise<Array<Tool>>;
40
+ /**
41
+ * Get the supervision results for a tool
42
+ * @param toolId
43
+ * @returns ToolSupervisionResult Supervision results
44
+ * @throws ApiError
45
+ */
46
+ static getToolSupervisionResults(toolId: string): CancelablePromise<Array<ToolSupervisionResult>>;
47
+ }
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ToolService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class ToolService {
7
+ /**
8
+ * Get all tools for a run
9
+ * @param runId
10
+ * @returns Tool List of tools
11
+ * @throws ApiError
12
+ */
13
+ static getRunTools(runId) {
14
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
15
+ method: 'GET',
16
+ url: '/run/{runId}/tool',
17
+ path: {
18
+ 'runId': runId,
19
+ },
20
+ });
21
+ }
22
+ /**
23
+ * Create a new tool for a run
24
+ * @param runId
25
+ * @param requestBody
26
+ * @returns Tool Tool found
27
+ * @throws ApiError
28
+ */
29
+ static createRunTool(runId, requestBody) {
30
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
31
+ method: 'POST',
32
+ url: '/run/{runId}/tool',
33
+ path: {
34
+ 'runId': runId,
35
+ },
36
+ body: requestBody,
37
+ mediaType: 'application/json',
38
+ });
39
+ }
40
+ /**
41
+ * Get a tool
42
+ * @param toolId
43
+ * @returns Tool Tool
44
+ * @throws ApiError
45
+ */
46
+ static getTool(toolId) {
47
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
48
+ method: 'GET',
49
+ url: '/tool/{toolId}',
50
+ path: {
51
+ 'toolId': toolId,
52
+ },
53
+ errors: {
54
+ 404: `Tool not found`,
55
+ },
56
+ });
57
+ }
58
+ /**
59
+ * Get all tools for a project
60
+ * @param projectId
61
+ * @returns Tool List of tools
62
+ * @throws ApiError
63
+ */
64
+ static getProjectTools(projectId) {
65
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
66
+ method: 'GET',
67
+ url: '/project/{projectId}/tools',
68
+ path: {
69
+ 'projectId': projectId,
70
+ },
71
+ });
72
+ }
73
+ /**
74
+ * Get the supervision results for a tool
75
+ * @param toolId
76
+ * @returns ToolSupervisionResult Supervision results
77
+ * @throws ApiError
78
+ */
79
+ static getToolSupervisionResults(toolId) {
80
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
81
+ method: 'GET',
82
+ url: '/tool/{tool_id}/supervision_results',
83
+ path: {
84
+ 'tool_id': toolId,
85
+ },
86
+ errors: {
87
+ 404: `Tool not found`,
88
+ },
89
+ });
90
+ }
91
+ }
92
+ exports.ToolService = ToolService;
@@ -0,0 +1,70 @@
1
+ import { OpenAPI as AgentsOpenAPI } from './generated/agents';
2
+ import { OpenAPI as PlatformOpenAPI } from './generated/platform';
3
+ import type { Agent } from './generated/agents/models/Agent';
4
+ import type { CreateWorkflowRequest } from './generated/agents/models/CreateWorkflowRequest';
5
+ import type { WorkflowExecutionRequest } from './generated/agents/models/WorkflowExecutionRequest';
6
+ import type { WorkflowExecution } from './generated/agents/models/WorkflowExecution';
7
+ import type { Status } from './generated/platform/models/Status';
8
+ import type { FeedbackRequest } from './generated/platform/models/FeedbackRequest';
9
+ import type { Feedback } from './generated/platform/models/Feedback';
10
+ /**
11
+ * AgentsSDK provides a simple interface for interacting with the Asteroid Agents API.
12
+ * It wraps the generated client services and exposes high-level methods.
13
+ */
14
+ export declare class AsteroidAgents {
15
+ /**
16
+ * Optionally pass a custom OpenAPI config. For instance, to change the API base URL.
17
+ * @param config Partial OpenAPI config values.
18
+ */
19
+ constructor(apiKey: string, agentsConfig?: Partial<typeof AgentsOpenAPI>, platformConfig?: Partial<typeof PlatformOpenAPI>);
20
+ /**
21
+ * Retrieves the OpenAPI schema from the API.
22
+ * @returns The OpenAPI specification.
23
+ */
24
+ getOpenApiSchema(): Promise<any>;
25
+ /**
26
+ * Checks the health of the API.
27
+ * @returns An object containing the health status.
28
+ */
29
+ healthCheck(): Promise<{
30
+ status?: string;
31
+ }>;
32
+ /**
33
+ * Retrieves a list of all agents.
34
+ * @returns An array of agents.
35
+ */
36
+ getAgents(): Promise<Agent[]>;
37
+ /**
38
+ * Creates a new workflow for a given agent.
39
+ * @param agentName The name of the agent for which the workflow is created.
40
+ * @param request The workflow creation request.
41
+ * @returns The ID of the newly created workflow.
42
+ */
43
+ createWorkflow(agentName: string, request: CreateWorkflowRequest): Promise<string>;
44
+ /**
45
+ * Executes a saved workflow for an agent.
46
+ * @param workflowId The ID of the workflow to execute.
47
+ * @param request The execution request containing dynamic values.
48
+ * @returns A string indicating that the job was queued.
49
+ */
50
+ runWorkflow(workflowId: string, request: WorkflowExecutionRequest): Promise<string>;
51
+ /**
52
+ * Retrieves all workflows along with their executions.
53
+ * @returns An array containing workflow executions.
54
+ */
55
+ getWorkflowRuns(): Promise<WorkflowExecution[]>;
56
+ /**
57
+ * Retrieves the status of a run.
58
+ * @param runId The ID of the run to retrieve the status for.
59
+ * @returns The status of the run.
60
+ */
61
+ getRunStatus(runId: string): Promise<Status>;
62
+ getRunResult(runId: string): Promise<string>;
63
+ /**
64
+ * Creates feedback for a run.
65
+ * @param runId The ID of the run to create feedback for.
66
+ * @param request The feedback request.
67
+ * @returns The feedback created.
68
+ */
69
+ createRunFeedback(runId: string, request: FeedbackRequest): Promise<Feedback>;
70
+ }