asteroid-odyssey 1.1.2 → 1.2.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.
- package/dist/generated/agents/sdk.gen.d.ts +29 -1
- package/dist/generated/agents/sdk.gen.js +95 -1
- package/dist/generated/agents/types.gen.d.ts +301 -1
- package/dist/index.d.ts +68 -1
- package/dist/index.js +118 -2
- package/package.json +6 -7
- package/dist/AgentsSDK.d.ts +0 -70
- package/dist/AgentsSDK.js +0 -102
- package/dist/Asteroid.d.ts +0 -70
- package/dist/Asteroid.js +0 -102
- package/dist/examples/index.d.ts +0 -1
- package/dist/examples/index.js +0 -33
- package/dist/generated/agents/core/ApiError.d.ts +0 -10
- package/dist/generated/agents/core/ApiError.js +0 -20
- package/dist/generated/agents/core/ApiRequestOptions.d.ts +0 -13
- package/dist/generated/agents/core/ApiRequestOptions.js +0 -2
- package/dist/generated/agents/core/ApiResult.d.ts +0 -7
- package/dist/generated/agents/core/ApiResult.js +0 -2
- package/dist/generated/agents/core/CancelablePromise.d.ts +0 -20
- package/dist/generated/agents/core/CancelablePromise.js +0 -104
- package/dist/generated/agents/core/OpenAPI.d.ts +0 -16
- package/dist/generated/agents/core/OpenAPI.js +0 -14
- package/dist/generated/agents/core/request.d.ts +0 -30
- package/dist/generated/agents/core/request.js +0 -294
- package/dist/generated/agents/models/Agent.d.ts +0 -22
- package/dist/generated/agents/models/Agent.js +0 -2
- package/dist/generated/agents/models/CreateWorkflowRequest.d.ts +0 -27
- package/dist/generated/agents/models/CreateWorkflowRequest.js +0 -14
- package/dist/generated/agents/models/Execution.d.ts +0 -18
- package/dist/generated/agents/models/Execution.js +0 -2
- package/dist/generated/agents/models/OptimisationRequest.d.ts +0 -6
- package/dist/generated/agents/models/OptimisationRequest.js +0 -2
- package/dist/generated/agents/models/Workflow.d.ts +0 -30
- package/dist/generated/agents/models/Workflow.js +0 -2
- package/dist/generated/agents/models/WorkflowExecution.d.ts +0 -6
- package/dist/generated/agents/models/WorkflowExecution.js +0 -2
- package/dist/generated/agents/models/WorkflowExecutionRequest.d.ts +0 -4
- package/dist/generated/agents/models/WorkflowExecutionRequest.js +0 -2
- package/dist/generated/agents/services/AgentService.d.ts +0 -10
- package/dist/generated/agents/services/AgentService.js +0 -19
- package/dist/generated/agents/services/ApiService.d.ts +0 -9
- package/dist/generated/agents/services/ApiService.js +0 -19
- package/dist/generated/agents/services/DefaultService.d.ts +0 -23
- package/dist/generated/agents/services/DefaultService.js +0 -43
- package/dist/generated/agents/services/OptimiserService.d.ts +0 -11
- package/dist/generated/agents/services/OptimiserService.js +0 -22
- package/dist/generated/agents/services/WorkflowService.d.ts +0 -20
- package/dist/generated/agents/services/WorkflowService.js +0 -44
- package/dist/generated/platform/core/ApiError.d.ts +0 -10
- package/dist/generated/platform/core/ApiError.js +0 -20
- package/dist/generated/platform/core/ApiRequestOptions.d.ts +0 -13
- package/dist/generated/platform/core/ApiRequestOptions.js +0 -2
- package/dist/generated/platform/core/ApiResult.d.ts +0 -7
- package/dist/generated/platform/core/ApiResult.js +0 -2
- package/dist/generated/platform/core/CancelablePromise.d.ts +0 -20
- package/dist/generated/platform/core/CancelablePromise.js +0 -104
- package/dist/generated/platform/core/OpenAPI.d.ts +0 -16
- package/dist/generated/platform/core/OpenAPI.js +0 -14
- package/dist/generated/platform/core/request.d.ts +0 -30
- package/dist/generated/platform/core/request.js +0 -294
- package/dist/generated/platform/index.d.ts +0 -57
- package/dist/generated/platform/index.js +0 -58
- package/dist/generated/platform/models/APIKey.d.ts +0 -9
- package/dist/generated/platform/models/APIKey.js +0 -2
- package/dist/generated/platform/models/AgentReport.d.ts +0 -45
- package/dist/generated/platform/models/AgentReport.js +0 -2
- package/dist/generated/platform/models/AsteroidChat.d.ts +0 -9
- package/dist/generated/platform/models/AsteroidChat.js +0 -2
- package/dist/generated/platform/models/AsteroidChoice.d.ts +0 -16
- package/dist/generated/platform/models/AsteroidChoice.js +0 -14
- package/dist/generated/platform/models/AsteroidMessage.d.ts +0 -27
- package/dist/generated/platform/models/AsteroidMessage.js +0 -15
- package/dist/generated/platform/models/AsteroidToolCall.d.ts +0 -11
- package/dist/generated/platform/models/AsteroidToolCall.js +0 -2
- package/dist/generated/platform/models/ChainExecution.d.ts +0 -6
- package/dist/generated/platform/models/ChainExecution.js +0 -2
- package/dist/generated/platform/models/ChainExecutionState.d.ts +0 -8
- package/dist/generated/platform/models/ChainExecutionState.js +0 -2
- package/dist/generated/platform/models/ChainRequest.d.ts +0 -6
- package/dist/generated/platform/models/ChainRequest.js +0 -2
- package/dist/generated/platform/models/ChatFormat.d.ts +0 -5
- package/dist/generated/platform/models/ChatFormat.js +0 -13
- package/dist/generated/platform/models/ChatIds.d.ts +0 -5
- package/dist/generated/platform/models/ChatIds.js +0 -2
- package/dist/generated/platform/models/ChoiceIds.d.ts +0 -6
- package/dist/generated/platform/models/ChoiceIds.js +0 -2
- package/dist/generated/platform/models/Decision.d.ts +0 -7
- package/dist/generated/platform/models/Decision.js +0 -15
- package/dist/generated/platform/models/ErrorResponse.d.ts +0 -4
- package/dist/generated/platform/models/ErrorResponse.js +0 -2
- package/dist/generated/platform/models/FailureCategory.d.ts +0 -12
- package/dist/generated/platform/models/FailureCategory.js +0 -20
- package/dist/generated/platform/models/FailureReport.d.ts +0 -33
- package/dist/generated/platform/models/FailureReport.js +0 -13
- package/dist/generated/platform/models/Feedback.d.ts +0 -13
- package/dist/generated/platform/models/Feedback.js +0 -2
- package/dist/generated/platform/models/FeedbackRequest.d.ts +0 -6
- package/dist/generated/platform/models/FeedbackRequest.js +0 -2
- package/dist/generated/platform/models/FileURL.d.ts +0 -4
- package/dist/generated/platform/models/FileURL.js +0 -2
- package/dist/generated/platform/models/HubStats.d.ts +0 -10
- package/dist/generated/platform/models/HubStats.js +0 -2
- package/dist/generated/platform/models/MessageRole.d.ts +0 -5
- package/dist/generated/platform/models/MessageRole.js +0 -13
- package/dist/generated/platform/models/MessageType.d.ts +0 -6
- package/dist/generated/platform/models/MessageType.js +0 -14
- package/dist/generated/platform/models/Permission.d.ts +0 -5
- package/dist/generated/platform/models/Permission.js +0 -13
- package/dist/generated/platform/models/Project.d.ts +0 -8
- package/dist/generated/platform/models/Project.js +0 -2
- package/dist/generated/platform/models/ReviewPayload.d.ts +0 -29
- package/dist/generated/platform/models/ReviewPayload.js +0 -2
- package/dist/generated/platform/models/Run.d.ts +0 -9
- package/dist/generated/platform/models/Run.js +0 -2
- package/dist/generated/platform/models/RunExecution.d.ts +0 -8
- package/dist/generated/platform/models/RunExecution.js +0 -2
- package/dist/generated/platform/models/RunState.d.ts +0 -2
- package/dist/generated/platform/models/RunState.js +0 -2
- package/dist/generated/platform/models/Status.d.ts +0 -8
- package/dist/generated/platform/models/Status.js +0 -16
- package/dist/generated/platform/models/SupervisionRequest.d.ts +0 -9
- package/dist/generated/platform/models/SupervisionRequest.js +0 -2
- package/dist/generated/platform/models/SupervisionRequestState.d.ts +0 -8
- package/dist/generated/platform/models/SupervisionRequestState.js +0 -2
- package/dist/generated/platform/models/SupervisionResult.d.ts +0 -9
- package/dist/generated/platform/models/SupervisionResult.js +0 -2
- package/dist/generated/platform/models/SupervisionStatus.d.ts +0 -7
- package/dist/generated/platform/models/SupervisionStatus.js +0 -2
- package/dist/generated/platform/models/Supervisor.d.ts +0 -10
- package/dist/generated/platform/models/Supervisor.js +0 -2
- package/dist/generated/platform/models/SupervisorChain.d.ts +0 -5
- package/dist/generated/platform/models/SupervisorChain.js +0 -2
- package/dist/generated/platform/models/SupervisorStats.d.ts +0 -21
- package/dist/generated/platform/models/SupervisorStats.js +0 -2
- package/dist/generated/platform/models/SupervisorType.d.ts +0 -8
- package/dist/generated/platform/models/SupervisorType.js +0 -16
- package/dist/generated/platform/models/Task.d.ts +0 -7
- package/dist/generated/platform/models/Task.js +0 -2
- package/dist/generated/platform/models/Tool.d.ts +0 -9
- package/dist/generated/platform/models/Tool.js +0 -2
- package/dist/generated/platform/models/ToolCallIds.d.ts +0 -4
- package/dist/generated/platform/models/ToolCallIds.js +0 -2
- package/dist/generated/platform/models/ToolSupervisionResult.d.ts +0 -36
- package/dist/generated/platform/models/ToolSupervisionResult.js +0 -2
- package/dist/generated/platform/models/User.d.ts +0 -4
- package/dist/generated/platform/models/User.js +0 -2
- package/dist/generated/platform/services/ApiKeyService.d.ts +0 -33
- package/dist/generated/platform/services/ApiKeyService.js +0 -64
- package/dist/generated/platform/services/ApiService.d.ts +0 -9
- package/dist/generated/platform/services/ApiService.js +0 -19
- package/dist/generated/platform/services/ImproveService.d.ts +0 -20
- package/dist/generated/platform/services/ImproveService.js +0 -47
- package/dist/generated/platform/services/ProjectService.d.ts +0 -34
- package/dist/generated/platform/services/ProjectService.js +0 -72
- package/dist/generated/platform/services/RunService.d.ts +0 -121
- package/dist/generated/platform/services/RunService.js +0 -260
- package/dist/generated/platform/services/StatsService.d.ts +0 -10
- package/dist/generated/platform/services/StatsService.js +0 -22
- package/dist/generated/platform/services/SupervisionService.d.ts +0 -46
- package/dist/generated/platform/services/SupervisionService.js +0 -100
- package/dist/generated/platform/services/SupervisorService.d.ts +0 -43
- package/dist/generated/platform/services/SupervisorService.js +0 -92
- package/dist/generated/platform/services/TaskService.d.ts +0 -29
- package/dist/generated/platform/services/TaskService.js +0 -59
- package/dist/generated/platform/services/ToolCallService.d.ts +0 -42
- package/dist/generated/platform/services/ToolCallService.js +0 -92
- package/dist/generated/platform/services/ToolService.d.ts +0 -47
- package/dist/generated/platform/services/ToolService.js +0 -92
- package/dist/src/generated/agents/core/ApiError.d.ts +0 -10
- package/dist/src/generated/agents/core/ApiError.js +0 -20
- package/dist/src/generated/agents/core/ApiRequestOptions.d.ts +0 -13
- package/dist/src/generated/agents/core/ApiRequestOptions.js +0 -2
- package/dist/src/generated/agents/core/ApiResult.d.ts +0 -7
- package/dist/src/generated/agents/core/ApiResult.js +0 -2
- package/dist/src/generated/agents/core/CancelablePromise.d.ts +0 -20
- package/dist/src/generated/agents/core/CancelablePromise.js +0 -104
- package/dist/src/generated/agents/core/OpenAPI.d.ts +0 -16
- package/dist/src/generated/agents/core/OpenAPI.js +0 -14
- package/dist/src/generated/agents/core/request.d.ts +0 -30
- package/dist/src/generated/agents/core/request.js +0 -294
- package/dist/src/generated/agents/index.d.ts +0 -16
- package/dist/src/generated/agents/index.js +0 -24
- package/dist/src/generated/agents/models/Agent.d.ts +0 -22
- package/dist/src/generated/agents/models/Agent.js +0 -2
- package/dist/src/generated/agents/models/CreateWorkflowRequest.d.ts +0 -14
- package/dist/src/generated/agents/models/CreateWorkflowRequest.js +0 -2
- package/dist/src/generated/agents/models/Execution.d.ts +0 -18
- package/dist/src/generated/agents/models/Execution.js +0 -2
- package/dist/src/generated/agents/models/OptimisationRequest.d.ts +0 -6
- package/dist/src/generated/agents/models/OptimisationRequest.js +0 -2
- package/dist/src/generated/agents/models/Workflow.d.ts +0 -26
- package/dist/src/generated/agents/models/Workflow.js +0 -2
- package/dist/src/generated/agents/models/WorkflowExecution.d.ts +0 -6
- package/dist/src/generated/agents/models/WorkflowExecution.js +0 -2
- package/dist/src/generated/agents/models/WorkflowExecutionRequest.d.ts +0 -4
- package/dist/src/generated/agents/models/WorkflowExecutionRequest.js +0 -2
- package/dist/src/generated/agents/services/AgentService.d.ts +0 -10
- package/dist/src/generated/agents/services/AgentService.js +0 -19
- package/dist/src/generated/agents/services/ApiService.d.ts +0 -9
- package/dist/src/generated/agents/services/ApiService.js +0 -19
- package/dist/src/generated/agents/services/DefaultService.d.ts +0 -23
- package/dist/src/generated/agents/services/DefaultService.js +0 -43
- package/dist/src/generated/agents/services/OptimiserService.d.ts +0 -11
- package/dist/src/generated/agents/services/OptimiserService.js +0 -22
- package/dist/src/generated/agents/services/WorkflowService.d.ts +0 -19
- package/dist/src/generated/agents/services/WorkflowService.js +0 -40
- package/dist/src/generated/platform/core/ApiError.d.ts +0 -10
- package/dist/src/generated/platform/core/ApiError.js +0 -20
- package/dist/src/generated/platform/core/ApiRequestOptions.d.ts +0 -13
- package/dist/src/generated/platform/core/ApiRequestOptions.js +0 -2
- package/dist/src/generated/platform/core/ApiResult.d.ts +0 -7
- package/dist/src/generated/platform/core/ApiResult.js +0 -2
- package/dist/src/generated/platform/core/CancelablePromise.d.ts +0 -20
- package/dist/src/generated/platform/core/CancelablePromise.js +0 -104
- package/dist/src/generated/platform/core/OpenAPI.d.ts +0 -16
- package/dist/src/generated/platform/core/OpenAPI.js +0 -14
- package/dist/src/generated/platform/core/request.d.ts +0 -30
- package/dist/src/generated/platform/core/request.js +0 -294
- package/dist/src/generated/platform/index.d.ts +0 -56
- package/dist/src/generated/platform/index.js +0 -58
- package/dist/src/generated/platform/models/APIKey.d.ts +0 -9
- package/dist/src/generated/platform/models/APIKey.js +0 -2
- package/dist/src/generated/platform/models/AgentReport.d.ts +0 -45
- package/dist/src/generated/platform/models/AgentReport.js +0 -2
- package/dist/src/generated/platform/models/AsteroidChat.d.ts +0 -9
- package/dist/src/generated/platform/models/AsteroidChat.js +0 -2
- package/dist/src/generated/platform/models/AsteroidChoice.d.ts +0 -16
- package/dist/src/generated/platform/models/AsteroidChoice.js +0 -14
- package/dist/src/generated/platform/models/AsteroidMessage.d.ts +0 -27
- package/dist/src/generated/platform/models/AsteroidMessage.js +0 -15
- package/dist/src/generated/platform/models/AsteroidToolCall.d.ts +0 -11
- package/dist/src/generated/platform/models/AsteroidToolCall.js +0 -2
- package/dist/src/generated/platform/models/ChainExecution.d.ts +0 -6
- package/dist/src/generated/platform/models/ChainExecution.js +0 -2
- package/dist/src/generated/platform/models/ChainExecutionState.d.ts +0 -8
- package/dist/src/generated/platform/models/ChainExecutionState.js +0 -2
- package/dist/src/generated/platform/models/ChainRequest.d.ts +0 -6
- package/dist/src/generated/platform/models/ChainRequest.js +0 -2
- package/dist/src/generated/platform/models/ChatFormat.d.ts +0 -5
- package/dist/src/generated/platform/models/ChatFormat.js +0 -13
- package/dist/src/generated/platform/models/ChatIds.d.ts +0 -5
- package/dist/src/generated/platform/models/ChatIds.js +0 -2
- package/dist/src/generated/platform/models/ChoiceIds.d.ts +0 -6
- package/dist/src/generated/platform/models/ChoiceIds.js +0 -2
- package/dist/src/generated/platform/models/Decision.d.ts +0 -7
- package/dist/src/generated/platform/models/Decision.js +0 -15
- package/dist/src/generated/platform/models/ErrorResponse.d.ts +0 -4
- package/dist/src/generated/platform/models/ErrorResponse.js +0 -2
- package/dist/src/generated/platform/models/FailureCategory.d.ts +0 -12
- package/dist/src/generated/platform/models/FailureCategory.js +0 -20
- package/dist/src/generated/platform/models/FailureReport.d.ts +0 -33
- package/dist/src/generated/platform/models/FailureReport.js +0 -13
- package/dist/src/generated/platform/models/Feedback.d.ts +0 -13
- package/dist/src/generated/platform/models/Feedback.js +0 -2
- package/dist/src/generated/platform/models/FeedbackRequest.d.ts +0 -6
- package/dist/src/generated/platform/models/FeedbackRequest.js +0 -2
- package/dist/src/generated/platform/models/HubStats.d.ts +0 -10
- package/dist/src/generated/platform/models/HubStats.js +0 -2
- package/dist/src/generated/platform/models/MessageRole.d.ts +0 -5
- package/dist/src/generated/platform/models/MessageRole.js +0 -13
- package/dist/src/generated/platform/models/MessageType.d.ts +0 -6
- package/dist/src/generated/platform/models/MessageType.js +0 -14
- package/dist/src/generated/platform/models/Permission.d.ts +0 -5
- package/dist/src/generated/platform/models/Permission.js +0 -13
- package/dist/src/generated/platform/models/Project.d.ts +0 -8
- package/dist/src/generated/platform/models/Project.js +0 -2
- package/dist/src/generated/platform/models/ReviewPayload.d.ts +0 -29
- package/dist/src/generated/platform/models/ReviewPayload.js +0 -2
- package/dist/src/generated/platform/models/Run.d.ts +0 -9
- package/dist/src/generated/platform/models/Run.js +0 -2
- package/dist/src/generated/platform/models/RunExecution.d.ts +0 -8
- package/dist/src/generated/platform/models/RunExecution.js +0 -2
- package/dist/src/generated/platform/models/RunState.d.ts +0 -2
- package/dist/src/generated/platform/models/RunState.js +0 -2
- package/dist/src/generated/platform/models/Status.d.ts +0 -8
- package/dist/src/generated/platform/models/Status.js +0 -16
- package/dist/src/generated/platform/models/SupervisionRequest.d.ts +0 -9
- package/dist/src/generated/platform/models/SupervisionRequest.js +0 -2
- package/dist/src/generated/platform/models/SupervisionRequestState.d.ts +0 -8
- package/dist/src/generated/platform/models/SupervisionRequestState.js +0 -2
- package/dist/src/generated/platform/models/SupervisionResult.d.ts +0 -9
- package/dist/src/generated/platform/models/SupervisionResult.js +0 -2
- package/dist/src/generated/platform/models/SupervisionStatus.d.ts +0 -7
- package/dist/src/generated/platform/models/SupervisionStatus.js +0 -2
- package/dist/src/generated/platform/models/Supervisor.d.ts +0 -10
- package/dist/src/generated/platform/models/Supervisor.js +0 -2
- package/dist/src/generated/platform/models/SupervisorChain.d.ts +0 -5
- package/dist/src/generated/platform/models/SupervisorChain.js +0 -2
- package/dist/src/generated/platform/models/SupervisorStats.d.ts +0 -21
- package/dist/src/generated/platform/models/SupervisorStats.js +0 -2
- package/dist/src/generated/platform/models/SupervisorType.d.ts +0 -8
- package/dist/src/generated/platform/models/SupervisorType.js +0 -16
- package/dist/src/generated/platform/models/Task.d.ts +0 -7
- package/dist/src/generated/platform/models/Task.js +0 -2
- package/dist/src/generated/platform/models/Tool.d.ts +0 -9
- package/dist/src/generated/platform/models/Tool.js +0 -2
- package/dist/src/generated/platform/models/ToolCallIds.d.ts +0 -4
- package/dist/src/generated/platform/models/ToolCallIds.js +0 -2
- package/dist/src/generated/platform/models/ToolSupervisionResult.d.ts +0 -36
- package/dist/src/generated/platform/models/ToolSupervisionResult.js +0 -2
- package/dist/src/generated/platform/models/User.d.ts +0 -4
- package/dist/src/generated/platform/models/User.js +0 -2
- package/dist/src/generated/platform/services/ApiKeyService.d.ts +0 -33
- package/dist/src/generated/platform/services/ApiKeyService.js +0 -64
- package/dist/src/generated/platform/services/ApiService.d.ts +0 -9
- package/dist/src/generated/platform/services/ApiService.js +0 -19
- package/dist/src/generated/platform/services/ImproveService.d.ts +0 -20
- package/dist/src/generated/platform/services/ImproveService.js +0 -47
- package/dist/src/generated/platform/services/ProjectService.d.ts +0 -34
- package/dist/src/generated/platform/services/ProjectService.js +0 -72
- package/dist/src/generated/platform/services/RunService.d.ts +0 -103
- package/dist/src/generated/platform/services/RunService.js +0 -227
- package/dist/src/generated/platform/services/StatsService.d.ts +0 -10
- package/dist/src/generated/platform/services/StatsService.js +0 -22
- package/dist/src/generated/platform/services/SupervisionService.d.ts +0 -46
- package/dist/src/generated/platform/services/SupervisionService.js +0 -100
- package/dist/src/generated/platform/services/SupervisorService.d.ts +0 -43
- package/dist/src/generated/platform/services/SupervisorService.js +0 -92
- package/dist/src/generated/platform/services/TaskService.d.ts +0 -29
- package/dist/src/generated/platform/services/TaskService.js +0 -59
- package/dist/src/generated/platform/services/ToolCallService.d.ts +0 -42
- package/dist/src/generated/platform/services/ToolCallService.js +0 -92
- package/dist/src/generated/platform/services/ToolService.d.ts +0 -47
- package/dist/src/generated/platform/services/ToolService.js +0 -92
- package/dist/src/index.d.ts +0 -70
- package/dist/src/index.js +0 -102
|
@@ -1,92 +0,0 @@
|
|
|
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;
|
|
@@ -1,47 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
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;
|
package/dist/src/index.d.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
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
|
-
}
|
package/dist/src/index.js
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AsteroidAgents = void 0;
|
|
4
|
-
const agents_1 = require("./generated/agents");
|
|
5
|
-
const platform_1 = require("./generated/platform");
|
|
6
|
-
/**
|
|
7
|
-
* AgentsSDK provides a simple interface for interacting with the Asteroid Agents API.
|
|
8
|
-
* It wraps the generated client services and exposes high-level methods.
|
|
9
|
-
*/
|
|
10
|
-
class AsteroidAgents {
|
|
11
|
-
/**
|
|
12
|
-
* Optionally pass a custom OpenAPI config. For instance, to change the API base URL.
|
|
13
|
-
* @param config Partial OpenAPI config values.
|
|
14
|
-
*/
|
|
15
|
-
constructor(apiKey, agentsConfig, platformConfig) {
|
|
16
|
-
// We use a custom headers for the API keys
|
|
17
|
-
platform_1.OpenAPI.HEADERS = { 'X-Asteroid-Api-Key': apiKey };
|
|
18
|
-
agents_1.OpenAPI.HEADERS = { 'X-Asteroid-Agents-Api-Key': apiKey };
|
|
19
|
-
if (agentsConfig) {
|
|
20
|
-
Object.assign(agents_1.OpenAPI, agentsConfig);
|
|
21
|
-
}
|
|
22
|
-
if (platformConfig) {
|
|
23
|
-
Object.assign(platform_1.OpenAPI, platformConfig);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Retrieves the OpenAPI schema from the API.
|
|
28
|
-
* @returns The OpenAPI specification.
|
|
29
|
-
*/
|
|
30
|
-
async getOpenApiSchema() {
|
|
31
|
-
return agents_1.ApiService.getOpenApi();
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Checks the health of the API.
|
|
35
|
-
* @returns An object containing the health status.
|
|
36
|
-
*/
|
|
37
|
-
async healthCheck() {
|
|
38
|
-
return agents_1.DefaultService.healthCheck();
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Retrieves a list of all agents.
|
|
42
|
-
* @returns An array of agents.
|
|
43
|
-
*/
|
|
44
|
-
async getAgents() {
|
|
45
|
-
return agents_1.AgentService.getAgents();
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Creates a new workflow for a given agent.
|
|
49
|
-
* @param agentName The name of the agent for which the workflow is created.
|
|
50
|
-
* @param request The workflow creation request.
|
|
51
|
-
* @returns The ID of the newly created workflow.
|
|
52
|
-
*/
|
|
53
|
-
async createWorkflow(agentName, request) {
|
|
54
|
-
return agents_1.DefaultService.createWorkflow(agentName, request);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Executes a saved workflow for an agent.
|
|
58
|
-
* @param workflowId The ID of the workflow to execute.
|
|
59
|
-
* @param request The execution request containing dynamic values.
|
|
60
|
-
* @returns A string indicating that the job was queued.
|
|
61
|
-
*/
|
|
62
|
-
async runWorkflow(workflowId, request) {
|
|
63
|
-
return agents_1.WorkflowService.executeWorkflow(workflowId, request);
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Retrieves all workflows along with their executions.
|
|
67
|
-
* @returns An array containing workflow executions.
|
|
68
|
-
*/
|
|
69
|
-
async getWorkflowRuns() {
|
|
70
|
-
return agents_1.WorkflowService.getWorkflowExecutions();
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Retrieves the status of a run.
|
|
74
|
-
* @param runId The ID of the run to retrieve the status for.
|
|
75
|
-
* @returns The status of the run.
|
|
76
|
-
*/
|
|
77
|
-
async getRunStatus(runId) {
|
|
78
|
-
return platform_1.RunService.getRunStatus(runId);
|
|
79
|
-
}
|
|
80
|
-
async getRunResult(runId) {
|
|
81
|
-
const run = await platform_1.RunService.getRun(runId);
|
|
82
|
-
const metadata = run.metadata;
|
|
83
|
-
if (!metadata) {
|
|
84
|
-
throw new Error('Run metadata not found');
|
|
85
|
-
}
|
|
86
|
-
const result = metadata.final_result;
|
|
87
|
-
if (!result) {
|
|
88
|
-
throw new Error('Run result not found');
|
|
89
|
-
}
|
|
90
|
-
return result;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Creates feedback for a run.
|
|
94
|
-
* @param runId The ID of the run to create feedback for.
|
|
95
|
-
* @param request The feedback request.
|
|
96
|
-
* @returns The feedback created.
|
|
97
|
-
*/
|
|
98
|
-
async createRunFeedback(runId, request) {
|
|
99
|
-
return platform_1.ImproveService.createFeedback(runId, request);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
exports.AsteroidAgents = AsteroidAgents;
|