asteroid-odyssey 1.6.215 → 1.6.254
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/index.d.mts +119 -1
- package/dist/index.d.ts +119 -1
- package/dist/index.js +6 -6
- package/dist/index.mjs +6 -6
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -308,6 +308,15 @@ type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boole
|
|
|
308
308
|
type ClientOptions = {
|
|
309
309
|
baseUrl: 'https://odyssey.asteroid.ai/agents/v2' | (string & {});
|
|
310
310
|
};
|
|
311
|
+
type AgentsAgentAvailableTool = {
|
|
312
|
+
name: string;
|
|
313
|
+
description: string;
|
|
314
|
+
capability: string;
|
|
315
|
+
isRequired: boolean;
|
|
316
|
+
};
|
|
317
|
+
type AgentsAgentAvailableToolsResponse = {
|
|
318
|
+
tools: Array<AgentsAgentAvailableTool>;
|
|
319
|
+
};
|
|
311
320
|
type AgentsAgentBase = {
|
|
312
321
|
id: CommonUuid;
|
|
313
322
|
name: string;
|
|
@@ -360,6 +369,15 @@ type AgentsAgentExecuteAgentResponse = {
|
|
|
360
369
|
executionId: CommonUuid;
|
|
361
370
|
};
|
|
362
371
|
type AgentsAgentSortField = 'name' | 'created_at';
|
|
372
|
+
type AgentsContextUserContextResponse = {
|
|
373
|
+
userId: CommonUuid;
|
|
374
|
+
email: string;
|
|
375
|
+
organizations: Array<AgentsContextUserOrganization>;
|
|
376
|
+
};
|
|
377
|
+
type AgentsContextUserOrganization = {
|
|
378
|
+
id: CommonUuid;
|
|
379
|
+
name: string;
|
|
380
|
+
};
|
|
363
381
|
/**
|
|
364
382
|
* Request to search Asteroid documentation
|
|
365
383
|
*/
|
|
@@ -624,6 +642,9 @@ type AgentsExecutionAgentQueryContextStartedDetails = {
|
|
|
624
642
|
actionName: 'agent_query_context';
|
|
625
643
|
query: string;
|
|
626
644
|
};
|
|
645
|
+
type AgentsExecutionAskUserQuestion = {
|
|
646
|
+
questions: Array<AgentsExecutionQuestionItem>;
|
|
647
|
+
};
|
|
627
648
|
type AgentsExecutionAwaitingConfirmationPayload = {
|
|
628
649
|
reason: string;
|
|
629
650
|
};
|
|
@@ -893,6 +914,17 @@ type AgentsExecutionObsSnapshotWithSelectorsCompletedDetails = {
|
|
|
893
914
|
};
|
|
894
915
|
type AgentsExecutionPausedPayload = {
|
|
895
916
|
reason: string;
|
|
917
|
+
question?: AgentsExecutionAskUserQuestion;
|
|
918
|
+
};
|
|
919
|
+
type AgentsExecutionQuestionItem = {
|
|
920
|
+
question: string;
|
|
921
|
+
header: string;
|
|
922
|
+
options: Array<AgentsExecutionQuestionOption>;
|
|
923
|
+
multiSelect?: boolean;
|
|
924
|
+
};
|
|
925
|
+
type AgentsExecutionQuestionOption = {
|
|
926
|
+
label: string;
|
|
927
|
+
description: string;
|
|
896
928
|
};
|
|
897
929
|
type AgentsExecutionRulesDetails = {
|
|
898
930
|
rules: string;
|
|
@@ -1188,6 +1220,8 @@ type AgentsGraphModelsNodesPropertiesIrisProperties = {
|
|
|
1188
1220
|
type AgentsGraphModelsNodesPropertiesOutcomeString = string;
|
|
1189
1221
|
type AgentsGraphModelsNodesPropertiesOutputProperties = {
|
|
1190
1222
|
type: 'output';
|
|
1223
|
+
instructionsEnabled?: boolean;
|
|
1224
|
+
instructions?: string;
|
|
1191
1225
|
schema?: {
|
|
1192
1226
|
[key: string]: unknown;
|
|
1193
1227
|
};
|
|
@@ -2892,6 +2926,42 @@ type AgentListResponses = {
|
|
|
2892
2926
|
};
|
|
2893
2927
|
};
|
|
2894
2928
|
type AgentListResponse = AgentListResponses[keyof AgentListResponses];
|
|
2929
|
+
type AvailableToolsListData = {
|
|
2930
|
+
body?: never;
|
|
2931
|
+
path?: never;
|
|
2932
|
+
query?: never;
|
|
2933
|
+
url: '/agents/available-tools';
|
|
2934
|
+
};
|
|
2935
|
+
type AvailableToolsListErrors = {
|
|
2936
|
+
/**
|
|
2937
|
+
* The server could not understand the request due to invalid syntax.
|
|
2938
|
+
*/
|
|
2939
|
+
400: CommonBadRequestErrorBody;
|
|
2940
|
+
/**
|
|
2941
|
+
* Access is unauthorized.
|
|
2942
|
+
*/
|
|
2943
|
+
401: CommonUnauthorizedErrorBody;
|
|
2944
|
+
/**
|
|
2945
|
+
* Access is forbidden.
|
|
2946
|
+
*/
|
|
2947
|
+
403: CommonForbiddenErrorBody;
|
|
2948
|
+
/**
|
|
2949
|
+
* The server cannot find the requested resource.
|
|
2950
|
+
*/
|
|
2951
|
+
404: CommonNotFoundErrorBody;
|
|
2952
|
+
/**
|
|
2953
|
+
* Server error
|
|
2954
|
+
*/
|
|
2955
|
+
500: CommonInternalServerErrorBody;
|
|
2956
|
+
};
|
|
2957
|
+
type AvailableToolsListError = AvailableToolsListErrors[keyof AvailableToolsListErrors];
|
|
2958
|
+
type AvailableToolsListResponses = {
|
|
2959
|
+
/**
|
|
2960
|
+
* The request has succeeded.
|
|
2961
|
+
*/
|
|
2962
|
+
200: AgentsAgentAvailableToolsResponse;
|
|
2963
|
+
};
|
|
2964
|
+
type AvailableToolsListResponse = AvailableToolsListResponses[keyof AvailableToolsListResponses];
|
|
2895
2965
|
type AgentExecutePostData = {
|
|
2896
2966
|
/**
|
|
2897
2967
|
* Execution request parameters
|
|
@@ -3191,6 +3261,42 @@ type AgentWorkflowsSyncExecutionResponses = {
|
|
|
3191
3261
|
200: AgentsWorkflowSyncExecutionResponse;
|
|
3192
3262
|
};
|
|
3193
3263
|
type AgentWorkflowsSyncExecutionResponse = AgentWorkflowsSyncExecutionResponses[keyof AgentWorkflowsSyncExecutionResponses];
|
|
3264
|
+
type ContextGetData = {
|
|
3265
|
+
body?: never;
|
|
3266
|
+
path?: never;
|
|
3267
|
+
query?: never;
|
|
3268
|
+
url: '/context';
|
|
3269
|
+
};
|
|
3270
|
+
type ContextGetErrors = {
|
|
3271
|
+
/**
|
|
3272
|
+
* The server could not understand the request due to invalid syntax.
|
|
3273
|
+
*/
|
|
3274
|
+
400: CommonBadRequestErrorBody;
|
|
3275
|
+
/**
|
|
3276
|
+
* Access is unauthorized.
|
|
3277
|
+
*/
|
|
3278
|
+
401: CommonUnauthorizedErrorBody;
|
|
3279
|
+
/**
|
|
3280
|
+
* Access is forbidden.
|
|
3281
|
+
*/
|
|
3282
|
+
403: CommonForbiddenErrorBody;
|
|
3283
|
+
/**
|
|
3284
|
+
* The server cannot find the requested resource.
|
|
3285
|
+
*/
|
|
3286
|
+
404: CommonNotFoundErrorBody;
|
|
3287
|
+
/**
|
|
3288
|
+
* Server error
|
|
3289
|
+
*/
|
|
3290
|
+
500: CommonInternalServerErrorBody;
|
|
3291
|
+
};
|
|
3292
|
+
type ContextGetError = ContextGetErrors[keyof ContextGetErrors];
|
|
3293
|
+
type ContextGetResponses = {
|
|
3294
|
+
/**
|
|
3295
|
+
* The request has succeeded.
|
|
3296
|
+
*/
|
|
3297
|
+
200: AgentsContextUserContextResponse;
|
|
3298
|
+
};
|
|
3299
|
+
type ContextGetResponse = ContextGetResponses[keyof ContextGetResponses];
|
|
3194
3300
|
type DocsSearchSearchData = {
|
|
3195
3301
|
/**
|
|
3196
3302
|
* The search request
|
|
@@ -3780,6 +3886,12 @@ declare const agentProfileDuplicate: <ThrowOnError extends boolean = false>(opti
|
|
|
3780
3886
|
* List all agents for an organization
|
|
3781
3887
|
*/
|
|
3782
3888
|
declare const agentList: <ThrowOnError extends boolean = false>(options?: Options<AgentListData, ThrowOnError>) => RequestResult<AgentListResponses, AgentListErrors, ThrowOnError, "fields">;
|
|
3889
|
+
/**
|
|
3890
|
+
* List Available Tools
|
|
3891
|
+
*
|
|
3892
|
+
* List all available tools/capabilities for AI Task nodes in workflows
|
|
3893
|
+
*/
|
|
3894
|
+
declare const availableToolsList: <ThrowOnError extends boolean = false>(options?: Options<AvailableToolsListData, ThrowOnError>) => RequestResult<AvailableToolsListResponses, AvailableToolsListErrors, ThrowOnError, "fields">;
|
|
3783
3895
|
/**
|
|
3784
3896
|
* Execute an agent
|
|
3785
3897
|
*
|
|
@@ -3822,6 +3934,12 @@ declare const agentWorkflowsPublish: <ThrowOnError extends boolean = false>(opti
|
|
|
3822
3934
|
* Sync an execution to use this workflow (updates execution's workflow reference)
|
|
3823
3935
|
*/
|
|
3824
3936
|
declare const agentWorkflowsSyncExecution: <ThrowOnError extends boolean = false>(options: Options<AgentWorkflowsSyncExecutionData, ThrowOnError>) => RequestResult<AgentWorkflowsSyncExecutionResponses, AgentWorkflowsSyncExecutionErrors, ThrowOnError, "fields">;
|
|
3937
|
+
/**
|
|
3938
|
+
* Get Context
|
|
3939
|
+
*
|
|
3940
|
+
* Get the current user's context including organization memberships
|
|
3941
|
+
*/
|
|
3942
|
+
declare const contextGet: <ThrowOnError extends boolean = false>(options?: Options<ContextGetData, ThrowOnError>) => RequestResult<ContextGetResponses, ContextGetErrors, ThrowOnError, "fields">;
|
|
3825
3943
|
/**
|
|
3826
3944
|
* Search documentation
|
|
3827
3945
|
*
|
|
@@ -3889,4 +4007,4 @@ declare const schemaValidationValidate: <ThrowOnError extends boolean = false>(o
|
|
|
3889
4007
|
*/
|
|
3890
4008
|
declare const tempFilesStage: <ThrowOnError extends boolean = false>(options: Options<TempFilesStageData, ThrowOnError>) => RequestResult<TempFilesStageResponses, TempFilesStageErrors, ThrowOnError, "fields">;
|
|
3891
4009
|
|
|
3892
|
-
export { type AgentExecutePostData, type AgentExecutePostError, type AgentExecutePostErrors, type AgentExecutePostResponse, type AgentExecutePostResponses, type AgentListData, type AgentListError, type AgentListErrors, type AgentListResponse, type AgentListResponses, type AgentProfileClearBrowserCacheData, type AgentProfileClearBrowserCacheError, type AgentProfileClearBrowserCacheErrors, type AgentProfileClearBrowserCacheResponse, type AgentProfileClearBrowserCacheResponses, type AgentProfileDeleteData, type AgentProfileDeleteError, type AgentProfileDeleteErrors, type AgentProfileDeleteResponse, type AgentProfileDeleteResponses, type AgentProfileDuplicateData, type AgentProfileDuplicateError, type AgentProfileDuplicateErrors, type AgentProfileDuplicateResponse, type AgentProfileDuplicateResponses, type AgentProfileGetData, type AgentProfileGetError, type AgentProfileGetErrors, type AgentProfileGetResponse, type AgentProfileGetResponses, type AgentProfilePoolDeleteData, type AgentProfilePoolDeleteError, type AgentProfilePoolDeleteErrors, type AgentProfilePoolDeleteResponse, type AgentProfilePoolDeleteResponses, type AgentProfilePoolGetData, type AgentProfilePoolGetError, type AgentProfilePoolGetErrors, type AgentProfilePoolGetResponse, type AgentProfilePoolGetResponses, type AgentProfilePoolMembersAddData, type AgentProfilePoolMembersAddError, type AgentProfilePoolMembersAddErrors, type AgentProfilePoolMembersAddResponse, type AgentProfilePoolMembersAddResponses, type AgentProfilePoolMembersListData, type AgentProfilePoolMembersListError, type AgentProfilePoolMembersListErrors, type AgentProfilePoolMembersListResponse, type AgentProfilePoolMembersListResponses, type AgentProfilePoolMembersRemoveData, type AgentProfilePoolMembersRemoveError, type AgentProfilePoolMembersRemoveErrors, type AgentProfilePoolMembersRemoveResponse, type AgentProfilePoolMembersRemoveResponses, type AgentProfilePoolUpdateData, type AgentProfilePoolUpdateError, type AgentProfilePoolUpdateErrors, type AgentProfilePoolUpdateResponse, type AgentProfilePoolUpdateResponses, type AgentProfilePoolsCreateData, type AgentProfilePoolsCreateError, type AgentProfilePoolsCreateErrors, type AgentProfilePoolsCreateResponse, type AgentProfilePoolsCreateResponses, type AgentProfilePoolsListData, type AgentProfilePoolsListError, type AgentProfilePoolsListErrors, type AgentProfilePoolsListResponse, type AgentProfilePoolsListResponses, type AgentProfileUpdateData, type AgentProfileUpdateError, type AgentProfileUpdateErrors, type AgentProfileUpdateResponse, type AgentProfileUpdateResponses, type AgentProfilesCreateData, type AgentProfilesCreateError, type AgentProfilesCreateErrors, type AgentProfilesCreateResponse, type AgentProfilesCreateResponses, type AgentProfilesListData, type AgentProfilesListError, type AgentProfilesListErrors, type AgentProfilesListResponse, type AgentProfilesListResponses, type AgentWorkflowsCreateData, type AgentWorkflowsCreateError, type AgentWorkflowsCreateErrors, type AgentWorkflowsCreateResponse, type AgentWorkflowsCreateResponses, type AgentWorkflowsExecuteData, type AgentWorkflowsExecuteError, type AgentWorkflowsExecuteErrors, type AgentWorkflowsExecuteResponse, type AgentWorkflowsExecuteResponses, type AgentWorkflowsGetData, type AgentWorkflowsGetError, type AgentWorkflowsGetErrors, type AgentWorkflowsGetResponse, type AgentWorkflowsGetResponses, type AgentWorkflowsListData, type AgentWorkflowsListError, type AgentWorkflowsListErrors, type AgentWorkflowsListResponse, type AgentWorkflowsListResponses, type AgentWorkflowsPublishData, type AgentWorkflowsPublishError, type AgentWorkflowsPublishErrors, type AgentWorkflowsPublishResponse, type AgentWorkflowsPublishResponses, type AgentWorkflowsSyncExecutionData, type AgentWorkflowsSyncExecutionError, type AgentWorkflowsSyncExecutionErrors, type AgentWorkflowsSyncExecutionResponse, type AgentWorkflowsSyncExecutionResponses, type AgentsAgentBase, type AgentsAgentExecuteAgentRequest, type AgentsAgentExecuteAgentResponse, type AgentsAgentSearch, type AgentsAgentSortField, type AgentsDocsSearchDocsRequest, type AgentsDocsSearchDocsResponse, type AgentsDocsSearchResult, type AgentsExecutionActionName, type AgentsExecutionActivity, type AgentsExecutionActivityActionCompletedInfo, type AgentsExecutionActivityActionCompletedPayload, type AgentsExecutionActivityActionFailedPayload, type AgentsExecutionActivityActionStartedInfo, type AgentsExecutionActivityActionStartedPayload, type AgentsExecutionActivityFileAddedPayload, type AgentsExecutionActivityGenericPayload, type AgentsExecutionActivityPayloadUnion, type AgentsExecutionActivityPlaywrightScriptGeneratedPayload, type AgentsExecutionActivityReasoningPayload, type AgentsExecutionActivityStatusChangedPayload, type AgentsExecutionActivityStepCompletedPayload, type AgentsExecutionActivityStepStartedPayload, type AgentsExecutionActivityTransitionedNodePayload, type AgentsExecutionActivityUserMessageReceivedPayload, type AgentsExecutionActivityWorkflowUpdatedPayload, type AgentsExecutionAgentQueryContextCompletedDetails, type AgentsExecutionAgentQueryContextStartedDetails, type AgentsExecutionApiKeyRef, type AgentsExecutionApiTriggerContext, type AgentsExecutionAwaitingConfirmationPayload, type AgentsExecutionCancelReason, type AgentsExecutionCancelledPayload, type AgentsExecutionComment, type AgentsExecutionCompletedPayload, type AgentsExecutionElementFileUploadCompletedDetails, type AgentsExecutionExecutionResult, type AgentsExecutionExtApiCallCompletedDetails, type AgentsExecutionExtGetMailCompletedDetails, type AgentsExecutionFailedPayload, type AgentsExecutionFileListCompletedDetails, type AgentsExecutionFileReadCompletedDetails, type AgentsExecutionFileStageCompletedDetails, type AgentsExecutionHumanLabel, type AgentsExecutionListItem, type AgentsExecutionLlmCallPurpose, type AgentsExecutionLlmCallStartedDetails, type AgentsExecutionNavToCompletedDetails, type AgentsExecutionNavToStartedDetails, type AgentsExecutionNodeDetails, type AgentsExecutionNodeOutputItem, type AgentsExecutionObsSnapshotWithSelectorsCompletedDetails, type AgentsExecutionPausedPayload, type AgentsExecutionRulesDetails, type AgentsExecutionScheduleRef, type AgentsExecutionScheduleTriggerContext, type AgentsExecutionScratchpadReadCompletedDetails, type AgentsExecutionScratchpadReadStartedDetails, type AgentsExecutionScratchpadWriteCompletedDetails, type AgentsExecutionScratchpadWriteStartedDetails, type AgentsExecutionScriptEvalCompletedDetails, type AgentsExecutionScriptEvalStartedDetails, type AgentsExecutionScriptHybridPlaywrightCompletedDetails, type AgentsExecutionScriptHybridPlaywrightStartedDetails, type AgentsExecutionScriptPadRunFunctionCompletedDetails, type AgentsExecutionScriptPlaywrightCompletedDetails, type AgentsExecutionScriptPlaywrightStartedDetails, type AgentsExecutionScriptpadReadCompletedDetails, type AgentsExecutionScriptpadReadStartedDetails, type AgentsExecutionScriptpadRunFunctionStartedDetails, type AgentsExecutionScriptpadSearchReplaceCompletedDetails, type AgentsExecutionScriptpadSearchReplaceStartedDetails, type AgentsExecutionScriptpadWriteCompletedDetails, type AgentsExecutionSearchAgentId, type AgentsExecutionSearchCreatedAfter, type AgentsExecutionSearchCreatedBefore, type AgentsExecutionSearchExecutionId, type AgentsExecutionSearchHumanLabels, type AgentsExecutionSearchMetadataKey, type AgentsExecutionSearchMetadataValue, type AgentsExecutionSearchOutcomeLabel, type AgentsExecutionSearchStatus, type AgentsExecutionSearchWorkflowVersion, type AgentsExecutionSortField, type AgentsExecutionStatus, type AgentsExecutionTerminalPayload, type AgentsExecutionTransitionDetails, type AgentsExecutionTriggerContext, type AgentsExecutionTriggerRunner, type AgentsExecutionUiTriggerContext, type AgentsExecutionUpdateExecutionStatusRequest, type AgentsExecutionUpdateType, type AgentsExecutionUpdateableStatus, type AgentsExecutionUserMessagesAddTextBody, type AgentsExecutionUtilGetDatetimeCompletedDetails, type AgentsExecutionUtilGetDatetimeStartedDetails, type AgentsExecutionWorkflowUpdate, type AgentsFilesFile, type AgentsFilesFilePart, type AgentsFilesTempFile, type AgentsFilesTempFilesResponse, type AgentsGraphModelsAgentGraph, type AgentsGraphModelsNodesNode, type AgentsGraphModelsNodesNodePropertiesUnion, type AgentsGraphModelsNodesNodeType, type AgentsGraphModelsNodesPosition, type AgentsGraphModelsNodesPropertiesApiMethod, type AgentsGraphModelsNodesPropertiesApiProperties, type AgentsGraphModelsNodesPropertiesIrisPlaywrightScriptProperties, type AgentsGraphModelsNodesPropertiesIrisProperties, type AgentsGraphModelsNodesPropertiesOutcomeString, type AgentsGraphModelsNodesPropertiesOutputProperties, type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVar, type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVarType, type AgentsGraphModelsNodesPropertiesPlaywrightScriptProperties, type AgentsGraphModelsNodesPropertiesUrlProperties, type AgentsGraphModelsNodesPropertiesVestaProperties, type AgentsGraphModelsSettings, type AgentsGraphModelsStickyNote, type AgentsGraphModelsTransitionsPropertiesIrisProperties, type AgentsGraphModelsTransitionsPropertiesOutcomeSuccessProperties, type AgentsGraphModelsTransitionsPropertiesSelectorProperties, type AgentsGraphModelsTransitionsTransition, type AgentsGraphModelsTransitionsTransitionPropertiesUnion, type AgentsGraphModelsTransitionsTransitionType, type AgentsGraphModelsTypeInputMethod, type AgentsProfileAddProfilesToPoolRequest, type AgentsProfileAgentProfile, type AgentsProfileAgentProfilePool, type AgentsProfileAgentProfilePoolMember, type AgentsProfileCookie, type AgentsProfileCountryCode, type AgentsProfileCreateAgentProfilePoolRequest, type AgentsProfileCreateAgentProfileRequest, type AgentsProfileCredential, type AgentsProfileCredentialUpdate, type AgentsProfileCustomProxyConfigInput, type AgentsProfileCustomProxyConfigOutput, type AgentsProfileDuplicateAgentProfileRequest, type AgentsProfileOperatingSystem, type AgentsProfilePoolSearch, type AgentsProfilePoolSortField, type AgentsProfileProxyMode, type AgentsProfileProxyType, type AgentsProfileRemoveProfilesFromPoolRequest, type AgentsProfileSameSite, type AgentsProfileSearch, type AgentsProfileSelectionStrategy, type AgentsProfileSortField, type AgentsProfileUpdateAgentProfilePoolRequest, type AgentsProfileUpdateAgentProfileRequest, type AgentsSchemaValidateSchemaRequest, type AgentsSchemaValidateSchemaResponse, type AgentsWorkflowBrowserProvider, type AgentsWorkflowBrowserTemplateConfig, type AgentsWorkflowCreateWorkflowRequest, type AgentsWorkflowCreateWorkflowResponse, type AgentsWorkflowEnvironmentTemplate, type AgentsWorkflowEnvironmentType, type AgentsWorkflowExecuteWorkflowRequest, type AgentsWorkflowExecuteWorkflowResponse, type AgentsWorkflowOsProvider, type AgentsWorkflowOsTemplateConfig, type AgentsWorkflowPublishWorkflowResponse, type AgentsWorkflowSyncExecutionRequest, type AgentsWorkflowSyncExecutionResponse, type AgentsWorkflowWorkflowRef, type AgentsWorkflowWorkflowSnapshot, type ClientOptions, type CommonBadRequestErrorBody, type CommonError, type CommonForbiddenErrorBody, type CommonInternalServerErrorBody, type CommonNotFoundErrorBody, type CommonOsError, type CommonPaginationPage, type CommonPaginationPageSize, type CommonSortDirection, type CommonUnauthorizedErrorBody, type CommonUuid, type CreateClientConfig, type DocsSearchSearchData, type DocsSearchSearchError, type DocsSearchSearchErrors, type DocsSearchSearchResponse, type DocsSearchSearchResponses, type ExecutionActivitiesGetData, type ExecutionActivitiesGetError, type ExecutionActivitiesGetErrors, type ExecutionActivitiesGetResponse, type ExecutionActivitiesGetResponses, type ExecutionContextFilesGetData, type ExecutionContextFilesGetError, type ExecutionContextFilesGetErrors, type ExecutionContextFilesGetResponse, type ExecutionContextFilesGetResponses, type ExecutionContextFilesUploadData, type ExecutionContextFilesUploadError, type ExecutionContextFilesUploadErrors, type ExecutionContextFilesUploadResponse, type ExecutionContextFilesUploadResponses, type ExecutionGetData, type ExecutionGetError, type ExecutionGetErrors, type ExecutionGetResponse, type ExecutionGetResponses, type ExecutionRecordingRedirectData, type ExecutionRecordingRedirectError, type ExecutionRecordingRedirectErrors, type ExecutionStatusUpdateData, type ExecutionStatusUpdateError, type ExecutionStatusUpdateErrors, type ExecutionStatusUpdateResponse, type ExecutionStatusUpdateResponses, type ExecutionUserMessagesAddData, type ExecutionUserMessagesAddError, type ExecutionUserMessagesAddErrors, type ExecutionUserMessagesAddResponse, type ExecutionUserMessagesAddResponses, type ExecutionsListData, type ExecutionsListError, type ExecutionsListErrors, type ExecutionsListResponse, type ExecutionsListResponses, type Options, type SchemaValidationValidateData, type SchemaValidationValidateError, type SchemaValidationValidateErrors, type SchemaValidationValidateResponse, type SchemaValidationValidateResponses, type TempFilesStageData, type TempFilesStageError, type TempFilesStageErrors, type TempFilesStageResponse, type TempFilesStageResponses, type Version, agentExecutePost, agentList, agentProfileClearBrowserCache, agentProfileDelete, agentProfileDuplicate, agentProfileGet, agentProfilePoolDelete, agentProfilePoolGet, agentProfilePoolMembersAdd, agentProfilePoolMembersList, agentProfilePoolMembersRemove, agentProfilePoolUpdate, agentProfilePoolsCreate, agentProfilePoolsList, agentProfileUpdate, agentProfilesCreate, agentProfilesList, agentWorkflowsCreate, agentWorkflowsExecute, agentWorkflowsGet, agentWorkflowsList, agentWorkflowsPublish, agentWorkflowsSyncExecution, client, docsSearchSearch, executionActivitiesGet, executionContextFilesGet, executionContextFilesUpload, executionGet, executionRecordingRedirect, executionStatusUpdate, executionUserMessagesAdd, executionsList, schemaValidationValidate, tempFilesStage };
|
|
4010
|
+
export { type AgentExecutePostData, type AgentExecutePostError, type AgentExecutePostErrors, type AgentExecutePostResponse, type AgentExecutePostResponses, type AgentListData, type AgentListError, type AgentListErrors, type AgentListResponse, type AgentListResponses, type AgentProfileClearBrowserCacheData, type AgentProfileClearBrowserCacheError, type AgentProfileClearBrowserCacheErrors, type AgentProfileClearBrowserCacheResponse, type AgentProfileClearBrowserCacheResponses, type AgentProfileDeleteData, type AgentProfileDeleteError, type AgentProfileDeleteErrors, type AgentProfileDeleteResponse, type AgentProfileDeleteResponses, type AgentProfileDuplicateData, type AgentProfileDuplicateError, type AgentProfileDuplicateErrors, type AgentProfileDuplicateResponse, type AgentProfileDuplicateResponses, type AgentProfileGetData, type AgentProfileGetError, type AgentProfileGetErrors, type AgentProfileGetResponse, type AgentProfileGetResponses, type AgentProfilePoolDeleteData, type AgentProfilePoolDeleteError, type AgentProfilePoolDeleteErrors, type AgentProfilePoolDeleteResponse, type AgentProfilePoolDeleteResponses, type AgentProfilePoolGetData, type AgentProfilePoolGetError, type AgentProfilePoolGetErrors, type AgentProfilePoolGetResponse, type AgentProfilePoolGetResponses, type AgentProfilePoolMembersAddData, type AgentProfilePoolMembersAddError, type AgentProfilePoolMembersAddErrors, type AgentProfilePoolMembersAddResponse, type AgentProfilePoolMembersAddResponses, type AgentProfilePoolMembersListData, type AgentProfilePoolMembersListError, type AgentProfilePoolMembersListErrors, type AgentProfilePoolMembersListResponse, type AgentProfilePoolMembersListResponses, type AgentProfilePoolMembersRemoveData, type AgentProfilePoolMembersRemoveError, type AgentProfilePoolMembersRemoveErrors, type AgentProfilePoolMembersRemoveResponse, type AgentProfilePoolMembersRemoveResponses, type AgentProfilePoolUpdateData, type AgentProfilePoolUpdateError, type AgentProfilePoolUpdateErrors, type AgentProfilePoolUpdateResponse, type AgentProfilePoolUpdateResponses, type AgentProfilePoolsCreateData, type AgentProfilePoolsCreateError, type AgentProfilePoolsCreateErrors, type AgentProfilePoolsCreateResponse, type AgentProfilePoolsCreateResponses, type AgentProfilePoolsListData, type AgentProfilePoolsListError, type AgentProfilePoolsListErrors, type AgentProfilePoolsListResponse, type AgentProfilePoolsListResponses, type AgentProfileUpdateData, type AgentProfileUpdateError, type AgentProfileUpdateErrors, type AgentProfileUpdateResponse, type AgentProfileUpdateResponses, type AgentProfilesCreateData, type AgentProfilesCreateError, type AgentProfilesCreateErrors, type AgentProfilesCreateResponse, type AgentProfilesCreateResponses, type AgentProfilesListData, type AgentProfilesListError, type AgentProfilesListErrors, type AgentProfilesListResponse, type AgentProfilesListResponses, type AgentWorkflowsCreateData, type AgentWorkflowsCreateError, type AgentWorkflowsCreateErrors, type AgentWorkflowsCreateResponse, type AgentWorkflowsCreateResponses, type AgentWorkflowsExecuteData, type AgentWorkflowsExecuteError, type AgentWorkflowsExecuteErrors, type AgentWorkflowsExecuteResponse, type AgentWorkflowsExecuteResponses, type AgentWorkflowsGetData, type AgentWorkflowsGetError, type AgentWorkflowsGetErrors, type AgentWorkflowsGetResponse, type AgentWorkflowsGetResponses, type AgentWorkflowsListData, type AgentWorkflowsListError, type AgentWorkflowsListErrors, type AgentWorkflowsListResponse, type AgentWorkflowsListResponses, type AgentWorkflowsPublishData, type AgentWorkflowsPublishError, type AgentWorkflowsPublishErrors, type AgentWorkflowsPublishResponse, type AgentWorkflowsPublishResponses, type AgentWorkflowsSyncExecutionData, type AgentWorkflowsSyncExecutionError, type AgentWorkflowsSyncExecutionErrors, type AgentWorkflowsSyncExecutionResponse, type AgentWorkflowsSyncExecutionResponses, type AgentsAgentAvailableTool, type AgentsAgentAvailableToolsResponse, type AgentsAgentBase, type AgentsAgentExecuteAgentRequest, type AgentsAgentExecuteAgentResponse, type AgentsAgentSearch, type AgentsAgentSortField, type AgentsContextUserContextResponse, type AgentsContextUserOrganization, type AgentsDocsSearchDocsRequest, type AgentsDocsSearchDocsResponse, type AgentsDocsSearchResult, type AgentsExecutionActionName, type AgentsExecutionActivity, type AgentsExecutionActivityActionCompletedInfo, type AgentsExecutionActivityActionCompletedPayload, type AgentsExecutionActivityActionFailedPayload, type AgentsExecutionActivityActionStartedInfo, type AgentsExecutionActivityActionStartedPayload, type AgentsExecutionActivityFileAddedPayload, type AgentsExecutionActivityGenericPayload, type AgentsExecutionActivityPayloadUnion, type AgentsExecutionActivityPlaywrightScriptGeneratedPayload, type AgentsExecutionActivityReasoningPayload, type AgentsExecutionActivityStatusChangedPayload, type AgentsExecutionActivityStepCompletedPayload, type AgentsExecutionActivityStepStartedPayload, type AgentsExecutionActivityTransitionedNodePayload, type AgentsExecutionActivityUserMessageReceivedPayload, type AgentsExecutionActivityWorkflowUpdatedPayload, type AgentsExecutionAgentQueryContextCompletedDetails, type AgentsExecutionAgentQueryContextStartedDetails, type AgentsExecutionApiKeyRef, type AgentsExecutionApiTriggerContext, type AgentsExecutionAskUserQuestion, type AgentsExecutionAwaitingConfirmationPayload, type AgentsExecutionCancelReason, type AgentsExecutionCancelledPayload, type AgentsExecutionComment, type AgentsExecutionCompletedPayload, type AgentsExecutionElementFileUploadCompletedDetails, type AgentsExecutionExecutionResult, type AgentsExecutionExtApiCallCompletedDetails, type AgentsExecutionExtGetMailCompletedDetails, type AgentsExecutionFailedPayload, type AgentsExecutionFileListCompletedDetails, type AgentsExecutionFileReadCompletedDetails, type AgentsExecutionFileStageCompletedDetails, type AgentsExecutionHumanLabel, type AgentsExecutionListItem, type AgentsExecutionLlmCallPurpose, type AgentsExecutionLlmCallStartedDetails, type AgentsExecutionNavToCompletedDetails, type AgentsExecutionNavToStartedDetails, type AgentsExecutionNodeDetails, type AgentsExecutionNodeOutputItem, type AgentsExecutionObsSnapshotWithSelectorsCompletedDetails, type AgentsExecutionPausedPayload, type AgentsExecutionQuestionItem, type AgentsExecutionQuestionOption, type AgentsExecutionRulesDetails, type AgentsExecutionScheduleRef, type AgentsExecutionScheduleTriggerContext, type AgentsExecutionScratchpadReadCompletedDetails, type AgentsExecutionScratchpadReadStartedDetails, type AgentsExecutionScratchpadWriteCompletedDetails, type AgentsExecutionScratchpadWriteStartedDetails, type AgentsExecutionScriptEvalCompletedDetails, type AgentsExecutionScriptEvalStartedDetails, type AgentsExecutionScriptHybridPlaywrightCompletedDetails, type AgentsExecutionScriptHybridPlaywrightStartedDetails, type AgentsExecutionScriptPadRunFunctionCompletedDetails, type AgentsExecutionScriptPlaywrightCompletedDetails, type AgentsExecutionScriptPlaywrightStartedDetails, type AgentsExecutionScriptpadReadCompletedDetails, type AgentsExecutionScriptpadReadStartedDetails, type AgentsExecutionScriptpadRunFunctionStartedDetails, type AgentsExecutionScriptpadSearchReplaceCompletedDetails, type AgentsExecutionScriptpadSearchReplaceStartedDetails, type AgentsExecutionScriptpadWriteCompletedDetails, type AgentsExecutionSearchAgentId, type AgentsExecutionSearchCreatedAfter, type AgentsExecutionSearchCreatedBefore, type AgentsExecutionSearchExecutionId, type AgentsExecutionSearchHumanLabels, type AgentsExecutionSearchMetadataKey, type AgentsExecutionSearchMetadataValue, type AgentsExecutionSearchOutcomeLabel, type AgentsExecutionSearchStatus, type AgentsExecutionSearchWorkflowVersion, type AgentsExecutionSortField, type AgentsExecutionStatus, type AgentsExecutionTerminalPayload, type AgentsExecutionTransitionDetails, type AgentsExecutionTriggerContext, type AgentsExecutionTriggerRunner, type AgentsExecutionUiTriggerContext, type AgentsExecutionUpdateExecutionStatusRequest, type AgentsExecutionUpdateType, type AgentsExecutionUpdateableStatus, type AgentsExecutionUserMessagesAddTextBody, type AgentsExecutionUtilGetDatetimeCompletedDetails, type AgentsExecutionUtilGetDatetimeStartedDetails, type AgentsExecutionWorkflowUpdate, type AgentsFilesFile, type AgentsFilesFilePart, type AgentsFilesTempFile, type AgentsFilesTempFilesResponse, type AgentsGraphModelsAgentGraph, type AgentsGraphModelsNodesNode, type AgentsGraphModelsNodesNodePropertiesUnion, type AgentsGraphModelsNodesNodeType, type AgentsGraphModelsNodesPosition, type AgentsGraphModelsNodesPropertiesApiMethod, type AgentsGraphModelsNodesPropertiesApiProperties, type AgentsGraphModelsNodesPropertiesIrisPlaywrightScriptProperties, type AgentsGraphModelsNodesPropertiesIrisProperties, type AgentsGraphModelsNodesPropertiesOutcomeString, type AgentsGraphModelsNodesPropertiesOutputProperties, type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVar, type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVarType, type AgentsGraphModelsNodesPropertiesPlaywrightScriptProperties, type AgentsGraphModelsNodesPropertiesUrlProperties, type AgentsGraphModelsNodesPropertiesVestaProperties, type AgentsGraphModelsSettings, type AgentsGraphModelsStickyNote, type AgentsGraphModelsTransitionsPropertiesIrisProperties, type AgentsGraphModelsTransitionsPropertiesOutcomeSuccessProperties, type AgentsGraphModelsTransitionsPropertiesSelectorProperties, type AgentsGraphModelsTransitionsTransition, type AgentsGraphModelsTransitionsTransitionPropertiesUnion, type AgentsGraphModelsTransitionsTransitionType, type AgentsGraphModelsTypeInputMethod, type AgentsProfileAddProfilesToPoolRequest, type AgentsProfileAgentProfile, type AgentsProfileAgentProfilePool, type AgentsProfileAgentProfilePoolMember, type AgentsProfileCookie, type AgentsProfileCountryCode, type AgentsProfileCreateAgentProfilePoolRequest, type AgentsProfileCreateAgentProfileRequest, type AgentsProfileCredential, type AgentsProfileCredentialUpdate, type AgentsProfileCustomProxyConfigInput, type AgentsProfileCustomProxyConfigOutput, type AgentsProfileDuplicateAgentProfileRequest, type AgentsProfileOperatingSystem, type AgentsProfilePoolSearch, type AgentsProfilePoolSortField, type AgentsProfileProxyMode, type AgentsProfileProxyType, type AgentsProfileRemoveProfilesFromPoolRequest, type AgentsProfileSameSite, type AgentsProfileSearch, type AgentsProfileSelectionStrategy, type AgentsProfileSortField, type AgentsProfileUpdateAgentProfilePoolRequest, type AgentsProfileUpdateAgentProfileRequest, type AgentsSchemaValidateSchemaRequest, type AgentsSchemaValidateSchemaResponse, type AgentsWorkflowBrowserProvider, type AgentsWorkflowBrowserTemplateConfig, type AgentsWorkflowCreateWorkflowRequest, type AgentsWorkflowCreateWorkflowResponse, type AgentsWorkflowEnvironmentTemplate, type AgentsWorkflowEnvironmentType, type AgentsWorkflowExecuteWorkflowRequest, type AgentsWorkflowExecuteWorkflowResponse, type AgentsWorkflowOsProvider, type AgentsWorkflowOsTemplateConfig, type AgentsWorkflowPublishWorkflowResponse, type AgentsWorkflowSyncExecutionRequest, type AgentsWorkflowSyncExecutionResponse, type AgentsWorkflowWorkflowRef, type AgentsWorkflowWorkflowSnapshot, type AvailableToolsListData, type AvailableToolsListError, type AvailableToolsListErrors, type AvailableToolsListResponse, type AvailableToolsListResponses, type ClientOptions, type CommonBadRequestErrorBody, type CommonError, type CommonForbiddenErrorBody, type CommonInternalServerErrorBody, type CommonNotFoundErrorBody, type CommonOsError, type CommonPaginationPage, type CommonPaginationPageSize, type CommonSortDirection, type CommonUnauthorizedErrorBody, type CommonUuid, type ContextGetData, type ContextGetError, type ContextGetErrors, type ContextGetResponse, type ContextGetResponses, type CreateClientConfig, type DocsSearchSearchData, type DocsSearchSearchError, type DocsSearchSearchErrors, type DocsSearchSearchResponse, type DocsSearchSearchResponses, type ExecutionActivitiesGetData, type ExecutionActivitiesGetError, type ExecutionActivitiesGetErrors, type ExecutionActivitiesGetResponse, type ExecutionActivitiesGetResponses, type ExecutionContextFilesGetData, type ExecutionContextFilesGetError, type ExecutionContextFilesGetErrors, type ExecutionContextFilesGetResponse, type ExecutionContextFilesGetResponses, type ExecutionContextFilesUploadData, type ExecutionContextFilesUploadError, type ExecutionContextFilesUploadErrors, type ExecutionContextFilesUploadResponse, type ExecutionContextFilesUploadResponses, type ExecutionGetData, type ExecutionGetError, type ExecutionGetErrors, type ExecutionGetResponse, type ExecutionGetResponses, type ExecutionRecordingRedirectData, type ExecutionRecordingRedirectError, type ExecutionRecordingRedirectErrors, type ExecutionStatusUpdateData, type ExecutionStatusUpdateError, type ExecutionStatusUpdateErrors, type ExecutionStatusUpdateResponse, type ExecutionStatusUpdateResponses, type ExecutionUserMessagesAddData, type ExecutionUserMessagesAddError, type ExecutionUserMessagesAddErrors, type ExecutionUserMessagesAddResponse, type ExecutionUserMessagesAddResponses, type ExecutionsListData, type ExecutionsListError, type ExecutionsListErrors, type ExecutionsListResponse, type ExecutionsListResponses, type Options, type SchemaValidationValidateData, type SchemaValidationValidateError, type SchemaValidationValidateErrors, type SchemaValidationValidateResponse, type SchemaValidationValidateResponses, type TempFilesStageData, type TempFilesStageError, type TempFilesStageErrors, type TempFilesStageResponse, type TempFilesStageResponses, type Version, agentExecutePost, agentList, agentProfileClearBrowserCache, agentProfileDelete, agentProfileDuplicate, agentProfileGet, agentProfilePoolDelete, agentProfilePoolGet, agentProfilePoolMembersAdd, agentProfilePoolMembersList, agentProfilePoolMembersRemove, agentProfilePoolUpdate, agentProfilePoolsCreate, agentProfilePoolsList, agentProfileUpdate, agentProfilesCreate, agentProfilesList, agentWorkflowsCreate, agentWorkflowsExecute, agentWorkflowsGet, agentWorkflowsList, agentWorkflowsPublish, agentWorkflowsSyncExecution, availableToolsList, client, contextGet, docsSearchSearch, executionActivitiesGet, executionContextFilesGet, executionContextFilesUpload, executionGet, executionRecordingRedirect, executionStatusUpdate, executionUserMessagesAdd, executionsList, schemaValidationValidate, tempFilesStage };
|
package/dist/index.d.ts
CHANGED
|
@@ -308,6 +308,15 @@ type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boole
|
|
|
308
308
|
type ClientOptions = {
|
|
309
309
|
baseUrl: 'https://odyssey.asteroid.ai/agents/v2' | (string & {});
|
|
310
310
|
};
|
|
311
|
+
type AgentsAgentAvailableTool = {
|
|
312
|
+
name: string;
|
|
313
|
+
description: string;
|
|
314
|
+
capability: string;
|
|
315
|
+
isRequired: boolean;
|
|
316
|
+
};
|
|
317
|
+
type AgentsAgentAvailableToolsResponse = {
|
|
318
|
+
tools: Array<AgentsAgentAvailableTool>;
|
|
319
|
+
};
|
|
311
320
|
type AgentsAgentBase = {
|
|
312
321
|
id: CommonUuid;
|
|
313
322
|
name: string;
|
|
@@ -360,6 +369,15 @@ type AgentsAgentExecuteAgentResponse = {
|
|
|
360
369
|
executionId: CommonUuid;
|
|
361
370
|
};
|
|
362
371
|
type AgentsAgentSortField = 'name' | 'created_at';
|
|
372
|
+
type AgentsContextUserContextResponse = {
|
|
373
|
+
userId: CommonUuid;
|
|
374
|
+
email: string;
|
|
375
|
+
organizations: Array<AgentsContextUserOrganization>;
|
|
376
|
+
};
|
|
377
|
+
type AgentsContextUserOrganization = {
|
|
378
|
+
id: CommonUuid;
|
|
379
|
+
name: string;
|
|
380
|
+
};
|
|
363
381
|
/**
|
|
364
382
|
* Request to search Asteroid documentation
|
|
365
383
|
*/
|
|
@@ -624,6 +642,9 @@ type AgentsExecutionAgentQueryContextStartedDetails = {
|
|
|
624
642
|
actionName: 'agent_query_context';
|
|
625
643
|
query: string;
|
|
626
644
|
};
|
|
645
|
+
type AgentsExecutionAskUserQuestion = {
|
|
646
|
+
questions: Array<AgentsExecutionQuestionItem>;
|
|
647
|
+
};
|
|
627
648
|
type AgentsExecutionAwaitingConfirmationPayload = {
|
|
628
649
|
reason: string;
|
|
629
650
|
};
|
|
@@ -893,6 +914,17 @@ type AgentsExecutionObsSnapshotWithSelectorsCompletedDetails = {
|
|
|
893
914
|
};
|
|
894
915
|
type AgentsExecutionPausedPayload = {
|
|
895
916
|
reason: string;
|
|
917
|
+
question?: AgentsExecutionAskUserQuestion;
|
|
918
|
+
};
|
|
919
|
+
type AgentsExecutionQuestionItem = {
|
|
920
|
+
question: string;
|
|
921
|
+
header: string;
|
|
922
|
+
options: Array<AgentsExecutionQuestionOption>;
|
|
923
|
+
multiSelect?: boolean;
|
|
924
|
+
};
|
|
925
|
+
type AgentsExecutionQuestionOption = {
|
|
926
|
+
label: string;
|
|
927
|
+
description: string;
|
|
896
928
|
};
|
|
897
929
|
type AgentsExecutionRulesDetails = {
|
|
898
930
|
rules: string;
|
|
@@ -1188,6 +1220,8 @@ type AgentsGraphModelsNodesPropertiesIrisProperties = {
|
|
|
1188
1220
|
type AgentsGraphModelsNodesPropertiesOutcomeString = string;
|
|
1189
1221
|
type AgentsGraphModelsNodesPropertiesOutputProperties = {
|
|
1190
1222
|
type: 'output';
|
|
1223
|
+
instructionsEnabled?: boolean;
|
|
1224
|
+
instructions?: string;
|
|
1191
1225
|
schema?: {
|
|
1192
1226
|
[key: string]: unknown;
|
|
1193
1227
|
};
|
|
@@ -2892,6 +2926,42 @@ type AgentListResponses = {
|
|
|
2892
2926
|
};
|
|
2893
2927
|
};
|
|
2894
2928
|
type AgentListResponse = AgentListResponses[keyof AgentListResponses];
|
|
2929
|
+
type AvailableToolsListData = {
|
|
2930
|
+
body?: never;
|
|
2931
|
+
path?: never;
|
|
2932
|
+
query?: never;
|
|
2933
|
+
url: '/agents/available-tools';
|
|
2934
|
+
};
|
|
2935
|
+
type AvailableToolsListErrors = {
|
|
2936
|
+
/**
|
|
2937
|
+
* The server could not understand the request due to invalid syntax.
|
|
2938
|
+
*/
|
|
2939
|
+
400: CommonBadRequestErrorBody;
|
|
2940
|
+
/**
|
|
2941
|
+
* Access is unauthorized.
|
|
2942
|
+
*/
|
|
2943
|
+
401: CommonUnauthorizedErrorBody;
|
|
2944
|
+
/**
|
|
2945
|
+
* Access is forbidden.
|
|
2946
|
+
*/
|
|
2947
|
+
403: CommonForbiddenErrorBody;
|
|
2948
|
+
/**
|
|
2949
|
+
* The server cannot find the requested resource.
|
|
2950
|
+
*/
|
|
2951
|
+
404: CommonNotFoundErrorBody;
|
|
2952
|
+
/**
|
|
2953
|
+
* Server error
|
|
2954
|
+
*/
|
|
2955
|
+
500: CommonInternalServerErrorBody;
|
|
2956
|
+
};
|
|
2957
|
+
type AvailableToolsListError = AvailableToolsListErrors[keyof AvailableToolsListErrors];
|
|
2958
|
+
type AvailableToolsListResponses = {
|
|
2959
|
+
/**
|
|
2960
|
+
* The request has succeeded.
|
|
2961
|
+
*/
|
|
2962
|
+
200: AgentsAgentAvailableToolsResponse;
|
|
2963
|
+
};
|
|
2964
|
+
type AvailableToolsListResponse = AvailableToolsListResponses[keyof AvailableToolsListResponses];
|
|
2895
2965
|
type AgentExecutePostData = {
|
|
2896
2966
|
/**
|
|
2897
2967
|
* Execution request parameters
|
|
@@ -3191,6 +3261,42 @@ type AgentWorkflowsSyncExecutionResponses = {
|
|
|
3191
3261
|
200: AgentsWorkflowSyncExecutionResponse;
|
|
3192
3262
|
};
|
|
3193
3263
|
type AgentWorkflowsSyncExecutionResponse = AgentWorkflowsSyncExecutionResponses[keyof AgentWorkflowsSyncExecutionResponses];
|
|
3264
|
+
type ContextGetData = {
|
|
3265
|
+
body?: never;
|
|
3266
|
+
path?: never;
|
|
3267
|
+
query?: never;
|
|
3268
|
+
url: '/context';
|
|
3269
|
+
};
|
|
3270
|
+
type ContextGetErrors = {
|
|
3271
|
+
/**
|
|
3272
|
+
* The server could not understand the request due to invalid syntax.
|
|
3273
|
+
*/
|
|
3274
|
+
400: CommonBadRequestErrorBody;
|
|
3275
|
+
/**
|
|
3276
|
+
* Access is unauthorized.
|
|
3277
|
+
*/
|
|
3278
|
+
401: CommonUnauthorizedErrorBody;
|
|
3279
|
+
/**
|
|
3280
|
+
* Access is forbidden.
|
|
3281
|
+
*/
|
|
3282
|
+
403: CommonForbiddenErrorBody;
|
|
3283
|
+
/**
|
|
3284
|
+
* The server cannot find the requested resource.
|
|
3285
|
+
*/
|
|
3286
|
+
404: CommonNotFoundErrorBody;
|
|
3287
|
+
/**
|
|
3288
|
+
* Server error
|
|
3289
|
+
*/
|
|
3290
|
+
500: CommonInternalServerErrorBody;
|
|
3291
|
+
};
|
|
3292
|
+
type ContextGetError = ContextGetErrors[keyof ContextGetErrors];
|
|
3293
|
+
type ContextGetResponses = {
|
|
3294
|
+
/**
|
|
3295
|
+
* The request has succeeded.
|
|
3296
|
+
*/
|
|
3297
|
+
200: AgentsContextUserContextResponse;
|
|
3298
|
+
};
|
|
3299
|
+
type ContextGetResponse = ContextGetResponses[keyof ContextGetResponses];
|
|
3194
3300
|
type DocsSearchSearchData = {
|
|
3195
3301
|
/**
|
|
3196
3302
|
* The search request
|
|
@@ -3780,6 +3886,12 @@ declare const agentProfileDuplicate: <ThrowOnError extends boolean = false>(opti
|
|
|
3780
3886
|
* List all agents for an organization
|
|
3781
3887
|
*/
|
|
3782
3888
|
declare const agentList: <ThrowOnError extends boolean = false>(options?: Options<AgentListData, ThrowOnError>) => RequestResult<AgentListResponses, AgentListErrors, ThrowOnError, "fields">;
|
|
3889
|
+
/**
|
|
3890
|
+
* List Available Tools
|
|
3891
|
+
*
|
|
3892
|
+
* List all available tools/capabilities for AI Task nodes in workflows
|
|
3893
|
+
*/
|
|
3894
|
+
declare const availableToolsList: <ThrowOnError extends boolean = false>(options?: Options<AvailableToolsListData, ThrowOnError>) => RequestResult<AvailableToolsListResponses, AvailableToolsListErrors, ThrowOnError, "fields">;
|
|
3783
3895
|
/**
|
|
3784
3896
|
* Execute an agent
|
|
3785
3897
|
*
|
|
@@ -3822,6 +3934,12 @@ declare const agentWorkflowsPublish: <ThrowOnError extends boolean = false>(opti
|
|
|
3822
3934
|
* Sync an execution to use this workflow (updates execution's workflow reference)
|
|
3823
3935
|
*/
|
|
3824
3936
|
declare const agentWorkflowsSyncExecution: <ThrowOnError extends boolean = false>(options: Options<AgentWorkflowsSyncExecutionData, ThrowOnError>) => RequestResult<AgentWorkflowsSyncExecutionResponses, AgentWorkflowsSyncExecutionErrors, ThrowOnError, "fields">;
|
|
3937
|
+
/**
|
|
3938
|
+
* Get Context
|
|
3939
|
+
*
|
|
3940
|
+
* Get the current user's context including organization memberships
|
|
3941
|
+
*/
|
|
3942
|
+
declare const contextGet: <ThrowOnError extends boolean = false>(options?: Options<ContextGetData, ThrowOnError>) => RequestResult<ContextGetResponses, ContextGetErrors, ThrowOnError, "fields">;
|
|
3825
3943
|
/**
|
|
3826
3944
|
* Search documentation
|
|
3827
3945
|
*
|
|
@@ -3889,4 +4007,4 @@ declare const schemaValidationValidate: <ThrowOnError extends boolean = false>(o
|
|
|
3889
4007
|
*/
|
|
3890
4008
|
declare const tempFilesStage: <ThrowOnError extends boolean = false>(options: Options<TempFilesStageData, ThrowOnError>) => RequestResult<TempFilesStageResponses, TempFilesStageErrors, ThrowOnError, "fields">;
|
|
3891
4009
|
|
|
3892
|
-
export { type AgentExecutePostData, type AgentExecutePostError, type AgentExecutePostErrors, type AgentExecutePostResponse, type AgentExecutePostResponses, type AgentListData, type AgentListError, type AgentListErrors, type AgentListResponse, type AgentListResponses, type AgentProfileClearBrowserCacheData, type AgentProfileClearBrowserCacheError, type AgentProfileClearBrowserCacheErrors, type AgentProfileClearBrowserCacheResponse, type AgentProfileClearBrowserCacheResponses, type AgentProfileDeleteData, type AgentProfileDeleteError, type AgentProfileDeleteErrors, type AgentProfileDeleteResponse, type AgentProfileDeleteResponses, type AgentProfileDuplicateData, type AgentProfileDuplicateError, type AgentProfileDuplicateErrors, type AgentProfileDuplicateResponse, type AgentProfileDuplicateResponses, type AgentProfileGetData, type AgentProfileGetError, type AgentProfileGetErrors, type AgentProfileGetResponse, type AgentProfileGetResponses, type AgentProfilePoolDeleteData, type AgentProfilePoolDeleteError, type AgentProfilePoolDeleteErrors, type AgentProfilePoolDeleteResponse, type AgentProfilePoolDeleteResponses, type AgentProfilePoolGetData, type AgentProfilePoolGetError, type AgentProfilePoolGetErrors, type AgentProfilePoolGetResponse, type AgentProfilePoolGetResponses, type AgentProfilePoolMembersAddData, type AgentProfilePoolMembersAddError, type AgentProfilePoolMembersAddErrors, type AgentProfilePoolMembersAddResponse, type AgentProfilePoolMembersAddResponses, type AgentProfilePoolMembersListData, type AgentProfilePoolMembersListError, type AgentProfilePoolMembersListErrors, type AgentProfilePoolMembersListResponse, type AgentProfilePoolMembersListResponses, type AgentProfilePoolMembersRemoveData, type AgentProfilePoolMembersRemoveError, type AgentProfilePoolMembersRemoveErrors, type AgentProfilePoolMembersRemoveResponse, type AgentProfilePoolMembersRemoveResponses, type AgentProfilePoolUpdateData, type AgentProfilePoolUpdateError, type AgentProfilePoolUpdateErrors, type AgentProfilePoolUpdateResponse, type AgentProfilePoolUpdateResponses, type AgentProfilePoolsCreateData, type AgentProfilePoolsCreateError, type AgentProfilePoolsCreateErrors, type AgentProfilePoolsCreateResponse, type AgentProfilePoolsCreateResponses, type AgentProfilePoolsListData, type AgentProfilePoolsListError, type AgentProfilePoolsListErrors, type AgentProfilePoolsListResponse, type AgentProfilePoolsListResponses, type AgentProfileUpdateData, type AgentProfileUpdateError, type AgentProfileUpdateErrors, type AgentProfileUpdateResponse, type AgentProfileUpdateResponses, type AgentProfilesCreateData, type AgentProfilesCreateError, type AgentProfilesCreateErrors, type AgentProfilesCreateResponse, type AgentProfilesCreateResponses, type AgentProfilesListData, type AgentProfilesListError, type AgentProfilesListErrors, type AgentProfilesListResponse, type AgentProfilesListResponses, type AgentWorkflowsCreateData, type AgentWorkflowsCreateError, type AgentWorkflowsCreateErrors, type AgentWorkflowsCreateResponse, type AgentWorkflowsCreateResponses, type AgentWorkflowsExecuteData, type AgentWorkflowsExecuteError, type AgentWorkflowsExecuteErrors, type AgentWorkflowsExecuteResponse, type AgentWorkflowsExecuteResponses, type AgentWorkflowsGetData, type AgentWorkflowsGetError, type AgentWorkflowsGetErrors, type AgentWorkflowsGetResponse, type AgentWorkflowsGetResponses, type AgentWorkflowsListData, type AgentWorkflowsListError, type AgentWorkflowsListErrors, type AgentWorkflowsListResponse, type AgentWorkflowsListResponses, type AgentWorkflowsPublishData, type AgentWorkflowsPublishError, type AgentWorkflowsPublishErrors, type AgentWorkflowsPublishResponse, type AgentWorkflowsPublishResponses, type AgentWorkflowsSyncExecutionData, type AgentWorkflowsSyncExecutionError, type AgentWorkflowsSyncExecutionErrors, type AgentWorkflowsSyncExecutionResponse, type AgentWorkflowsSyncExecutionResponses, type AgentsAgentBase, type AgentsAgentExecuteAgentRequest, type AgentsAgentExecuteAgentResponse, type AgentsAgentSearch, type AgentsAgentSortField, type AgentsDocsSearchDocsRequest, type AgentsDocsSearchDocsResponse, type AgentsDocsSearchResult, type AgentsExecutionActionName, type AgentsExecutionActivity, type AgentsExecutionActivityActionCompletedInfo, type AgentsExecutionActivityActionCompletedPayload, type AgentsExecutionActivityActionFailedPayload, type AgentsExecutionActivityActionStartedInfo, type AgentsExecutionActivityActionStartedPayload, type AgentsExecutionActivityFileAddedPayload, type AgentsExecutionActivityGenericPayload, type AgentsExecutionActivityPayloadUnion, type AgentsExecutionActivityPlaywrightScriptGeneratedPayload, type AgentsExecutionActivityReasoningPayload, type AgentsExecutionActivityStatusChangedPayload, type AgentsExecutionActivityStepCompletedPayload, type AgentsExecutionActivityStepStartedPayload, type AgentsExecutionActivityTransitionedNodePayload, type AgentsExecutionActivityUserMessageReceivedPayload, type AgentsExecutionActivityWorkflowUpdatedPayload, type AgentsExecutionAgentQueryContextCompletedDetails, type AgentsExecutionAgentQueryContextStartedDetails, type AgentsExecutionApiKeyRef, type AgentsExecutionApiTriggerContext, type AgentsExecutionAwaitingConfirmationPayload, type AgentsExecutionCancelReason, type AgentsExecutionCancelledPayload, type AgentsExecutionComment, type AgentsExecutionCompletedPayload, type AgentsExecutionElementFileUploadCompletedDetails, type AgentsExecutionExecutionResult, type AgentsExecutionExtApiCallCompletedDetails, type AgentsExecutionExtGetMailCompletedDetails, type AgentsExecutionFailedPayload, type AgentsExecutionFileListCompletedDetails, type AgentsExecutionFileReadCompletedDetails, type AgentsExecutionFileStageCompletedDetails, type AgentsExecutionHumanLabel, type AgentsExecutionListItem, type AgentsExecutionLlmCallPurpose, type AgentsExecutionLlmCallStartedDetails, type AgentsExecutionNavToCompletedDetails, type AgentsExecutionNavToStartedDetails, type AgentsExecutionNodeDetails, type AgentsExecutionNodeOutputItem, type AgentsExecutionObsSnapshotWithSelectorsCompletedDetails, type AgentsExecutionPausedPayload, type AgentsExecutionRulesDetails, type AgentsExecutionScheduleRef, type AgentsExecutionScheduleTriggerContext, type AgentsExecutionScratchpadReadCompletedDetails, type AgentsExecutionScratchpadReadStartedDetails, type AgentsExecutionScratchpadWriteCompletedDetails, type AgentsExecutionScratchpadWriteStartedDetails, type AgentsExecutionScriptEvalCompletedDetails, type AgentsExecutionScriptEvalStartedDetails, type AgentsExecutionScriptHybridPlaywrightCompletedDetails, type AgentsExecutionScriptHybridPlaywrightStartedDetails, type AgentsExecutionScriptPadRunFunctionCompletedDetails, type AgentsExecutionScriptPlaywrightCompletedDetails, type AgentsExecutionScriptPlaywrightStartedDetails, type AgentsExecutionScriptpadReadCompletedDetails, type AgentsExecutionScriptpadReadStartedDetails, type AgentsExecutionScriptpadRunFunctionStartedDetails, type AgentsExecutionScriptpadSearchReplaceCompletedDetails, type AgentsExecutionScriptpadSearchReplaceStartedDetails, type AgentsExecutionScriptpadWriteCompletedDetails, type AgentsExecutionSearchAgentId, type AgentsExecutionSearchCreatedAfter, type AgentsExecutionSearchCreatedBefore, type AgentsExecutionSearchExecutionId, type AgentsExecutionSearchHumanLabels, type AgentsExecutionSearchMetadataKey, type AgentsExecutionSearchMetadataValue, type AgentsExecutionSearchOutcomeLabel, type AgentsExecutionSearchStatus, type AgentsExecutionSearchWorkflowVersion, type AgentsExecutionSortField, type AgentsExecutionStatus, type AgentsExecutionTerminalPayload, type AgentsExecutionTransitionDetails, type AgentsExecutionTriggerContext, type AgentsExecutionTriggerRunner, type AgentsExecutionUiTriggerContext, type AgentsExecutionUpdateExecutionStatusRequest, type AgentsExecutionUpdateType, type AgentsExecutionUpdateableStatus, type AgentsExecutionUserMessagesAddTextBody, type AgentsExecutionUtilGetDatetimeCompletedDetails, type AgentsExecutionUtilGetDatetimeStartedDetails, type AgentsExecutionWorkflowUpdate, type AgentsFilesFile, type AgentsFilesFilePart, type AgentsFilesTempFile, type AgentsFilesTempFilesResponse, type AgentsGraphModelsAgentGraph, type AgentsGraphModelsNodesNode, type AgentsGraphModelsNodesNodePropertiesUnion, type AgentsGraphModelsNodesNodeType, type AgentsGraphModelsNodesPosition, type AgentsGraphModelsNodesPropertiesApiMethod, type AgentsGraphModelsNodesPropertiesApiProperties, type AgentsGraphModelsNodesPropertiesIrisPlaywrightScriptProperties, type AgentsGraphModelsNodesPropertiesIrisProperties, type AgentsGraphModelsNodesPropertiesOutcomeString, type AgentsGraphModelsNodesPropertiesOutputProperties, type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVar, type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVarType, type AgentsGraphModelsNodesPropertiesPlaywrightScriptProperties, type AgentsGraphModelsNodesPropertiesUrlProperties, type AgentsGraphModelsNodesPropertiesVestaProperties, type AgentsGraphModelsSettings, type AgentsGraphModelsStickyNote, type AgentsGraphModelsTransitionsPropertiesIrisProperties, type AgentsGraphModelsTransitionsPropertiesOutcomeSuccessProperties, type AgentsGraphModelsTransitionsPropertiesSelectorProperties, type AgentsGraphModelsTransitionsTransition, type AgentsGraphModelsTransitionsTransitionPropertiesUnion, type AgentsGraphModelsTransitionsTransitionType, type AgentsGraphModelsTypeInputMethod, type AgentsProfileAddProfilesToPoolRequest, type AgentsProfileAgentProfile, type AgentsProfileAgentProfilePool, type AgentsProfileAgentProfilePoolMember, type AgentsProfileCookie, type AgentsProfileCountryCode, type AgentsProfileCreateAgentProfilePoolRequest, type AgentsProfileCreateAgentProfileRequest, type AgentsProfileCredential, type AgentsProfileCredentialUpdate, type AgentsProfileCustomProxyConfigInput, type AgentsProfileCustomProxyConfigOutput, type AgentsProfileDuplicateAgentProfileRequest, type AgentsProfileOperatingSystem, type AgentsProfilePoolSearch, type AgentsProfilePoolSortField, type AgentsProfileProxyMode, type AgentsProfileProxyType, type AgentsProfileRemoveProfilesFromPoolRequest, type AgentsProfileSameSite, type AgentsProfileSearch, type AgentsProfileSelectionStrategy, type AgentsProfileSortField, type AgentsProfileUpdateAgentProfilePoolRequest, type AgentsProfileUpdateAgentProfileRequest, type AgentsSchemaValidateSchemaRequest, type AgentsSchemaValidateSchemaResponse, type AgentsWorkflowBrowserProvider, type AgentsWorkflowBrowserTemplateConfig, type AgentsWorkflowCreateWorkflowRequest, type AgentsWorkflowCreateWorkflowResponse, type AgentsWorkflowEnvironmentTemplate, type AgentsWorkflowEnvironmentType, type AgentsWorkflowExecuteWorkflowRequest, type AgentsWorkflowExecuteWorkflowResponse, type AgentsWorkflowOsProvider, type AgentsWorkflowOsTemplateConfig, type AgentsWorkflowPublishWorkflowResponse, type AgentsWorkflowSyncExecutionRequest, type AgentsWorkflowSyncExecutionResponse, type AgentsWorkflowWorkflowRef, type AgentsWorkflowWorkflowSnapshot, type ClientOptions, type CommonBadRequestErrorBody, type CommonError, type CommonForbiddenErrorBody, type CommonInternalServerErrorBody, type CommonNotFoundErrorBody, type CommonOsError, type CommonPaginationPage, type CommonPaginationPageSize, type CommonSortDirection, type CommonUnauthorizedErrorBody, type CommonUuid, type CreateClientConfig, type DocsSearchSearchData, type DocsSearchSearchError, type DocsSearchSearchErrors, type DocsSearchSearchResponse, type DocsSearchSearchResponses, type ExecutionActivitiesGetData, type ExecutionActivitiesGetError, type ExecutionActivitiesGetErrors, type ExecutionActivitiesGetResponse, type ExecutionActivitiesGetResponses, type ExecutionContextFilesGetData, type ExecutionContextFilesGetError, type ExecutionContextFilesGetErrors, type ExecutionContextFilesGetResponse, type ExecutionContextFilesGetResponses, type ExecutionContextFilesUploadData, type ExecutionContextFilesUploadError, type ExecutionContextFilesUploadErrors, type ExecutionContextFilesUploadResponse, type ExecutionContextFilesUploadResponses, type ExecutionGetData, type ExecutionGetError, type ExecutionGetErrors, type ExecutionGetResponse, type ExecutionGetResponses, type ExecutionRecordingRedirectData, type ExecutionRecordingRedirectError, type ExecutionRecordingRedirectErrors, type ExecutionStatusUpdateData, type ExecutionStatusUpdateError, type ExecutionStatusUpdateErrors, type ExecutionStatusUpdateResponse, type ExecutionStatusUpdateResponses, type ExecutionUserMessagesAddData, type ExecutionUserMessagesAddError, type ExecutionUserMessagesAddErrors, type ExecutionUserMessagesAddResponse, type ExecutionUserMessagesAddResponses, type ExecutionsListData, type ExecutionsListError, type ExecutionsListErrors, type ExecutionsListResponse, type ExecutionsListResponses, type Options, type SchemaValidationValidateData, type SchemaValidationValidateError, type SchemaValidationValidateErrors, type SchemaValidationValidateResponse, type SchemaValidationValidateResponses, type TempFilesStageData, type TempFilesStageError, type TempFilesStageErrors, type TempFilesStageResponse, type TempFilesStageResponses, type Version, agentExecutePost, agentList, agentProfileClearBrowserCache, agentProfileDelete, agentProfileDuplicate, agentProfileGet, agentProfilePoolDelete, agentProfilePoolGet, agentProfilePoolMembersAdd, agentProfilePoolMembersList, agentProfilePoolMembersRemove, agentProfilePoolUpdate, agentProfilePoolsCreate, agentProfilePoolsList, agentProfileUpdate, agentProfilesCreate, agentProfilesList, agentWorkflowsCreate, agentWorkflowsExecute, agentWorkflowsGet, agentWorkflowsList, agentWorkflowsPublish, agentWorkflowsSyncExecution, client, docsSearchSearch, executionActivitiesGet, executionContextFilesGet, executionContextFilesUpload, executionGet, executionRecordingRedirect, executionStatusUpdate, executionUserMessagesAdd, executionsList, schemaValidationValidate, tempFilesStage };
|
|
4010
|
+
export { type AgentExecutePostData, type AgentExecutePostError, type AgentExecutePostErrors, type AgentExecutePostResponse, type AgentExecutePostResponses, type AgentListData, type AgentListError, type AgentListErrors, type AgentListResponse, type AgentListResponses, type AgentProfileClearBrowserCacheData, type AgentProfileClearBrowserCacheError, type AgentProfileClearBrowserCacheErrors, type AgentProfileClearBrowserCacheResponse, type AgentProfileClearBrowserCacheResponses, type AgentProfileDeleteData, type AgentProfileDeleteError, type AgentProfileDeleteErrors, type AgentProfileDeleteResponse, type AgentProfileDeleteResponses, type AgentProfileDuplicateData, type AgentProfileDuplicateError, type AgentProfileDuplicateErrors, type AgentProfileDuplicateResponse, type AgentProfileDuplicateResponses, type AgentProfileGetData, type AgentProfileGetError, type AgentProfileGetErrors, type AgentProfileGetResponse, type AgentProfileGetResponses, type AgentProfilePoolDeleteData, type AgentProfilePoolDeleteError, type AgentProfilePoolDeleteErrors, type AgentProfilePoolDeleteResponse, type AgentProfilePoolDeleteResponses, type AgentProfilePoolGetData, type AgentProfilePoolGetError, type AgentProfilePoolGetErrors, type AgentProfilePoolGetResponse, type AgentProfilePoolGetResponses, type AgentProfilePoolMembersAddData, type AgentProfilePoolMembersAddError, type AgentProfilePoolMembersAddErrors, type AgentProfilePoolMembersAddResponse, type AgentProfilePoolMembersAddResponses, type AgentProfilePoolMembersListData, type AgentProfilePoolMembersListError, type AgentProfilePoolMembersListErrors, type AgentProfilePoolMembersListResponse, type AgentProfilePoolMembersListResponses, type AgentProfilePoolMembersRemoveData, type AgentProfilePoolMembersRemoveError, type AgentProfilePoolMembersRemoveErrors, type AgentProfilePoolMembersRemoveResponse, type AgentProfilePoolMembersRemoveResponses, type AgentProfilePoolUpdateData, type AgentProfilePoolUpdateError, type AgentProfilePoolUpdateErrors, type AgentProfilePoolUpdateResponse, type AgentProfilePoolUpdateResponses, type AgentProfilePoolsCreateData, type AgentProfilePoolsCreateError, type AgentProfilePoolsCreateErrors, type AgentProfilePoolsCreateResponse, type AgentProfilePoolsCreateResponses, type AgentProfilePoolsListData, type AgentProfilePoolsListError, type AgentProfilePoolsListErrors, type AgentProfilePoolsListResponse, type AgentProfilePoolsListResponses, type AgentProfileUpdateData, type AgentProfileUpdateError, type AgentProfileUpdateErrors, type AgentProfileUpdateResponse, type AgentProfileUpdateResponses, type AgentProfilesCreateData, type AgentProfilesCreateError, type AgentProfilesCreateErrors, type AgentProfilesCreateResponse, type AgentProfilesCreateResponses, type AgentProfilesListData, type AgentProfilesListError, type AgentProfilesListErrors, type AgentProfilesListResponse, type AgentProfilesListResponses, type AgentWorkflowsCreateData, type AgentWorkflowsCreateError, type AgentWorkflowsCreateErrors, type AgentWorkflowsCreateResponse, type AgentWorkflowsCreateResponses, type AgentWorkflowsExecuteData, type AgentWorkflowsExecuteError, type AgentWorkflowsExecuteErrors, type AgentWorkflowsExecuteResponse, type AgentWorkflowsExecuteResponses, type AgentWorkflowsGetData, type AgentWorkflowsGetError, type AgentWorkflowsGetErrors, type AgentWorkflowsGetResponse, type AgentWorkflowsGetResponses, type AgentWorkflowsListData, type AgentWorkflowsListError, type AgentWorkflowsListErrors, type AgentWorkflowsListResponse, type AgentWorkflowsListResponses, type AgentWorkflowsPublishData, type AgentWorkflowsPublishError, type AgentWorkflowsPublishErrors, type AgentWorkflowsPublishResponse, type AgentWorkflowsPublishResponses, type AgentWorkflowsSyncExecutionData, type AgentWorkflowsSyncExecutionError, type AgentWorkflowsSyncExecutionErrors, type AgentWorkflowsSyncExecutionResponse, type AgentWorkflowsSyncExecutionResponses, type AgentsAgentAvailableTool, type AgentsAgentAvailableToolsResponse, type AgentsAgentBase, type AgentsAgentExecuteAgentRequest, type AgentsAgentExecuteAgentResponse, type AgentsAgentSearch, type AgentsAgentSortField, type AgentsContextUserContextResponse, type AgentsContextUserOrganization, type AgentsDocsSearchDocsRequest, type AgentsDocsSearchDocsResponse, type AgentsDocsSearchResult, type AgentsExecutionActionName, type AgentsExecutionActivity, type AgentsExecutionActivityActionCompletedInfo, type AgentsExecutionActivityActionCompletedPayload, type AgentsExecutionActivityActionFailedPayload, type AgentsExecutionActivityActionStartedInfo, type AgentsExecutionActivityActionStartedPayload, type AgentsExecutionActivityFileAddedPayload, type AgentsExecutionActivityGenericPayload, type AgentsExecutionActivityPayloadUnion, type AgentsExecutionActivityPlaywrightScriptGeneratedPayload, type AgentsExecutionActivityReasoningPayload, type AgentsExecutionActivityStatusChangedPayload, type AgentsExecutionActivityStepCompletedPayload, type AgentsExecutionActivityStepStartedPayload, type AgentsExecutionActivityTransitionedNodePayload, type AgentsExecutionActivityUserMessageReceivedPayload, type AgentsExecutionActivityWorkflowUpdatedPayload, type AgentsExecutionAgentQueryContextCompletedDetails, type AgentsExecutionAgentQueryContextStartedDetails, type AgentsExecutionApiKeyRef, type AgentsExecutionApiTriggerContext, type AgentsExecutionAskUserQuestion, type AgentsExecutionAwaitingConfirmationPayload, type AgentsExecutionCancelReason, type AgentsExecutionCancelledPayload, type AgentsExecutionComment, type AgentsExecutionCompletedPayload, type AgentsExecutionElementFileUploadCompletedDetails, type AgentsExecutionExecutionResult, type AgentsExecutionExtApiCallCompletedDetails, type AgentsExecutionExtGetMailCompletedDetails, type AgentsExecutionFailedPayload, type AgentsExecutionFileListCompletedDetails, type AgentsExecutionFileReadCompletedDetails, type AgentsExecutionFileStageCompletedDetails, type AgentsExecutionHumanLabel, type AgentsExecutionListItem, type AgentsExecutionLlmCallPurpose, type AgentsExecutionLlmCallStartedDetails, type AgentsExecutionNavToCompletedDetails, type AgentsExecutionNavToStartedDetails, type AgentsExecutionNodeDetails, type AgentsExecutionNodeOutputItem, type AgentsExecutionObsSnapshotWithSelectorsCompletedDetails, type AgentsExecutionPausedPayload, type AgentsExecutionQuestionItem, type AgentsExecutionQuestionOption, type AgentsExecutionRulesDetails, type AgentsExecutionScheduleRef, type AgentsExecutionScheduleTriggerContext, type AgentsExecutionScratchpadReadCompletedDetails, type AgentsExecutionScratchpadReadStartedDetails, type AgentsExecutionScratchpadWriteCompletedDetails, type AgentsExecutionScratchpadWriteStartedDetails, type AgentsExecutionScriptEvalCompletedDetails, type AgentsExecutionScriptEvalStartedDetails, type AgentsExecutionScriptHybridPlaywrightCompletedDetails, type AgentsExecutionScriptHybridPlaywrightStartedDetails, type AgentsExecutionScriptPadRunFunctionCompletedDetails, type AgentsExecutionScriptPlaywrightCompletedDetails, type AgentsExecutionScriptPlaywrightStartedDetails, type AgentsExecutionScriptpadReadCompletedDetails, type AgentsExecutionScriptpadReadStartedDetails, type AgentsExecutionScriptpadRunFunctionStartedDetails, type AgentsExecutionScriptpadSearchReplaceCompletedDetails, type AgentsExecutionScriptpadSearchReplaceStartedDetails, type AgentsExecutionScriptpadWriteCompletedDetails, type AgentsExecutionSearchAgentId, type AgentsExecutionSearchCreatedAfter, type AgentsExecutionSearchCreatedBefore, type AgentsExecutionSearchExecutionId, type AgentsExecutionSearchHumanLabels, type AgentsExecutionSearchMetadataKey, type AgentsExecutionSearchMetadataValue, type AgentsExecutionSearchOutcomeLabel, type AgentsExecutionSearchStatus, type AgentsExecutionSearchWorkflowVersion, type AgentsExecutionSortField, type AgentsExecutionStatus, type AgentsExecutionTerminalPayload, type AgentsExecutionTransitionDetails, type AgentsExecutionTriggerContext, type AgentsExecutionTriggerRunner, type AgentsExecutionUiTriggerContext, type AgentsExecutionUpdateExecutionStatusRequest, type AgentsExecutionUpdateType, type AgentsExecutionUpdateableStatus, type AgentsExecutionUserMessagesAddTextBody, type AgentsExecutionUtilGetDatetimeCompletedDetails, type AgentsExecutionUtilGetDatetimeStartedDetails, type AgentsExecutionWorkflowUpdate, type AgentsFilesFile, type AgentsFilesFilePart, type AgentsFilesTempFile, type AgentsFilesTempFilesResponse, type AgentsGraphModelsAgentGraph, type AgentsGraphModelsNodesNode, type AgentsGraphModelsNodesNodePropertiesUnion, type AgentsGraphModelsNodesNodeType, type AgentsGraphModelsNodesPosition, type AgentsGraphModelsNodesPropertiesApiMethod, type AgentsGraphModelsNodesPropertiesApiProperties, type AgentsGraphModelsNodesPropertiesIrisPlaywrightScriptProperties, type AgentsGraphModelsNodesPropertiesIrisProperties, type AgentsGraphModelsNodesPropertiesOutcomeString, type AgentsGraphModelsNodesPropertiesOutputProperties, type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVar, type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVarType, type AgentsGraphModelsNodesPropertiesPlaywrightScriptProperties, type AgentsGraphModelsNodesPropertiesUrlProperties, type AgentsGraphModelsNodesPropertiesVestaProperties, type AgentsGraphModelsSettings, type AgentsGraphModelsStickyNote, type AgentsGraphModelsTransitionsPropertiesIrisProperties, type AgentsGraphModelsTransitionsPropertiesOutcomeSuccessProperties, type AgentsGraphModelsTransitionsPropertiesSelectorProperties, type AgentsGraphModelsTransitionsTransition, type AgentsGraphModelsTransitionsTransitionPropertiesUnion, type AgentsGraphModelsTransitionsTransitionType, type AgentsGraphModelsTypeInputMethod, type AgentsProfileAddProfilesToPoolRequest, type AgentsProfileAgentProfile, type AgentsProfileAgentProfilePool, type AgentsProfileAgentProfilePoolMember, type AgentsProfileCookie, type AgentsProfileCountryCode, type AgentsProfileCreateAgentProfilePoolRequest, type AgentsProfileCreateAgentProfileRequest, type AgentsProfileCredential, type AgentsProfileCredentialUpdate, type AgentsProfileCustomProxyConfigInput, type AgentsProfileCustomProxyConfigOutput, type AgentsProfileDuplicateAgentProfileRequest, type AgentsProfileOperatingSystem, type AgentsProfilePoolSearch, type AgentsProfilePoolSortField, type AgentsProfileProxyMode, type AgentsProfileProxyType, type AgentsProfileRemoveProfilesFromPoolRequest, type AgentsProfileSameSite, type AgentsProfileSearch, type AgentsProfileSelectionStrategy, type AgentsProfileSortField, type AgentsProfileUpdateAgentProfilePoolRequest, type AgentsProfileUpdateAgentProfileRequest, type AgentsSchemaValidateSchemaRequest, type AgentsSchemaValidateSchemaResponse, type AgentsWorkflowBrowserProvider, type AgentsWorkflowBrowserTemplateConfig, type AgentsWorkflowCreateWorkflowRequest, type AgentsWorkflowCreateWorkflowResponse, type AgentsWorkflowEnvironmentTemplate, type AgentsWorkflowEnvironmentType, type AgentsWorkflowExecuteWorkflowRequest, type AgentsWorkflowExecuteWorkflowResponse, type AgentsWorkflowOsProvider, type AgentsWorkflowOsTemplateConfig, type AgentsWorkflowPublishWorkflowResponse, type AgentsWorkflowSyncExecutionRequest, type AgentsWorkflowSyncExecutionResponse, type AgentsWorkflowWorkflowRef, type AgentsWorkflowWorkflowSnapshot, type AvailableToolsListData, type AvailableToolsListError, type AvailableToolsListErrors, type AvailableToolsListResponse, type AvailableToolsListResponses, type ClientOptions, type CommonBadRequestErrorBody, type CommonError, type CommonForbiddenErrorBody, type CommonInternalServerErrorBody, type CommonNotFoundErrorBody, type CommonOsError, type CommonPaginationPage, type CommonPaginationPageSize, type CommonSortDirection, type CommonUnauthorizedErrorBody, type CommonUuid, type ContextGetData, type ContextGetError, type ContextGetErrors, type ContextGetResponse, type ContextGetResponses, type CreateClientConfig, type DocsSearchSearchData, type DocsSearchSearchError, type DocsSearchSearchErrors, type DocsSearchSearchResponse, type DocsSearchSearchResponses, type ExecutionActivitiesGetData, type ExecutionActivitiesGetError, type ExecutionActivitiesGetErrors, type ExecutionActivitiesGetResponse, type ExecutionActivitiesGetResponses, type ExecutionContextFilesGetData, type ExecutionContextFilesGetError, type ExecutionContextFilesGetErrors, type ExecutionContextFilesGetResponse, type ExecutionContextFilesGetResponses, type ExecutionContextFilesUploadData, type ExecutionContextFilesUploadError, type ExecutionContextFilesUploadErrors, type ExecutionContextFilesUploadResponse, type ExecutionContextFilesUploadResponses, type ExecutionGetData, type ExecutionGetError, type ExecutionGetErrors, type ExecutionGetResponse, type ExecutionGetResponses, type ExecutionRecordingRedirectData, type ExecutionRecordingRedirectError, type ExecutionRecordingRedirectErrors, type ExecutionStatusUpdateData, type ExecutionStatusUpdateError, type ExecutionStatusUpdateErrors, type ExecutionStatusUpdateResponse, type ExecutionStatusUpdateResponses, type ExecutionUserMessagesAddData, type ExecutionUserMessagesAddError, type ExecutionUserMessagesAddErrors, type ExecutionUserMessagesAddResponse, type ExecutionUserMessagesAddResponses, type ExecutionsListData, type ExecutionsListError, type ExecutionsListErrors, type ExecutionsListResponse, type ExecutionsListResponses, type Options, type SchemaValidationValidateData, type SchemaValidationValidateError, type SchemaValidationValidateErrors, type SchemaValidationValidateResponse, type SchemaValidationValidateResponses, type TempFilesStageData, type TempFilesStageError, type TempFilesStageErrors, type TempFilesStageResponse, type TempFilesStageResponses, type Version, agentExecutePost, agentList, agentProfileClearBrowserCache, agentProfileDelete, agentProfileDuplicate, agentProfileGet, agentProfilePoolDelete, agentProfilePoolGet, agentProfilePoolMembersAdd, agentProfilePoolMembersList, agentProfilePoolMembersRemove, agentProfilePoolUpdate, agentProfilePoolsCreate, agentProfilePoolsList, agentProfileUpdate, agentProfilesCreate, agentProfilesList, agentWorkflowsCreate, agentWorkflowsExecute, agentWorkflowsGet, agentWorkflowsList, agentWorkflowsPublish, agentWorkflowsSyncExecution, availableToolsList, client, contextGet, docsSearchSearch, executionActivitiesGet, executionContextFilesGet, executionContextFilesUpload, executionGet, executionRecordingRedirect, executionStatusUpdate, executionUserMessagesAdd, executionsList, schemaValidationValidate, tempFilesStage };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
'use strict';var V=(e,t,r)=>{typeof r=="string"||r instanceof Blob?e.append(t,r):r instanceof Date?e.append(t,r.toISOString()):e.append(t,JSON.stringify(r));};var
|
|
1
|
+
'use strict';var V=(e,t,r)=>{typeof r=="string"||r instanceof Blob?e.append(t,r):r instanceof Date?e.append(t,r.toISOString()):e.append(t,JSON.stringify(r));};var W={bodySerializer:e=>{let t=new FormData;return Object.entries(e).forEach(([r,s])=>{s!=null&&(Array.isArray(s)?s.forEach(n=>V(t,r,n)):V(t,r,s));}),t}},q={bodySerializer:e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)};var X=({onRequest:e,onSseError:t,onSseEvent:r,responseTransformer:s,responseValidator:n,sseDefaultRetryDelay:p,sseMaxRetryAttempts:a,sseMaxRetryDelay:i,sseSleepFn:l,url:d,...o})=>{let A,O=l??(g=>new Promise(E=>setTimeout(E,g)));return {stream:async function*(){let g=p??3e3,E=0,m=o.signal??new AbortController().signal;for(;!m.aborted;){E++;let C=o.headers instanceof Headers?o.headers:new Headers(o.headers);A!==void 0&&C.set("Last-Event-ID",A);try{let w={redirect:"follow",...o,body:o.serializedBody,headers:C,signal:m},h=new Request(d,w);e&&(h=await e(d,w));let f=await(o.fetch??globalThis.fetch)(h);if(!f.ok)throw new Error(`SSE failed: ${f.status} ${f.statusText}`);if(!f.body)throw new Error("No body in SSE response");let y=f.body.pipeThrough(new TextDecoderStream).getReader(),b="",K=()=>{try{y.cancel();}catch{}};m.addEventListener("abort",K);try{for(;;){let{done:ee,value:te}=await y.read();if(ee)break;b+=te,b=b.replace(/\r\n/g,`
|
|
2
2
|
`).replace(/\r/g,`
|
|
3
|
-
`);let
|
|
3
|
+
`);let j=b.split(`
|
|
4
4
|
|
|
5
|
-
`);b=
|
|
6
|
-
`),
|
|
7
|
-
`);try{R=JSON.parse(x),B=!0;}catch{R=x;}}B&&(n&&await n(R),s&&(R=await s(R))),r?.({data:R,event:K,id:A,retry:d}),W.length&&(yield R);}}}finally{m.removeEventListener("abort",j),y.releaseLock();}break}catch(w){if(t?.(w),a!==void 0&&E>=a)break;let h=Math.min(d*2**(E-1),i??3e4);await O(h);}}}()}};var se=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},ne=e=>{switch(e){case "form":return ",";case "pipeDelimited":return "|";case "spaceDelimited":return "%20";default:return ","}},ie=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},U=({allowReserved:e,explode:t,name:r,style:s,value:n})=>{if(!t){let i=(e?n:n.map(l=>encodeURIComponent(l))).join(ne(s));switch(s){case "label":return `.${i}`;case "matrix":return `;${r}=${i}`;case "simple":return i;default:return `${r}=${i}`}}let p=se(s),a=n.map(i=>s==="label"||s==="simple"?e?i:encodeURIComponent(i):S({allowReserved:e,name:r,value:i})).join(p);return s==="label"||s==="matrix"?p+a:a},S=({allowReserved:e,name:t,value:r})=>{if(r==null)return "";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return `${t}=${e?r:encodeURIComponent(r)}`},q=({allowReserved:e,explode:t,name:r,style:s,value:n,valueOnly:p})=>{if(n instanceof Date)return p?n.toISOString():`${r}=${n.toISOString()}`;if(s!=="deepObject"&&!t){let l=[];Object.entries(n).forEach(([o,A])=>{l=[...l,o,e?A:encodeURIComponent(A)];});let g=l.join(",");switch(s){case "form":return `${r}=${g}`;case "label":return `.${g}`;case "matrix":return `;${r}=${g}`;default:return g}}let a=ie(s),i=Object.entries(n).map(([l,g])=>S({allowReserved:e,name:s==="deepObject"?`${r}[${l}]`:l,value:g})).join(a);return s==="label"||s==="matrix"?a+i:i};var ae=/\{[^{}]+\}/g,le=({path:e,url:t})=>{let r=t,s=t.match(ae);if(s)for(let n of s){let p=false,a=n.substring(1,n.length-1),i="simple";a.endsWith("*")&&(p=true,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),i="label"):a.startsWith(";")&&(a=a.substring(1),i="matrix");let l=e[a];if(l==null)continue;if(Array.isArray(l)){r=r.replace(n,U({explode:p,name:a,style:i,value:l}));continue}if(typeof l=="object"){r=r.replace(n,q({explode:p,name:a,style:i,value:l,valueOnly:true}));continue}if(i==="matrix"){r=r.replace(n,`;${S({name:a,value:l})}`);continue}let g=encodeURIComponent(i==="label"?`.${l}`:l);r=r.replace(n,g);}return r},H=({baseUrl:e,path:t,query:r,querySerializer:s,url:n})=>{let p=n.startsWith("/")?n:`/${n}`,a=(e??"")+p;t&&(a=le({path:t,url:a}));let i=r?s(r):"";return i.startsWith("?")&&(i=i.substring(1)),i&&(a+=`?${i}`),a};function $(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return "serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}var Q=async(e,t)=>{let r=typeof t=="function"?await t(e):t;if(r)return e.scheme==="bearer"?`Bearer ${r}`:e.scheme==="basic"?`Basic ${btoa(r)}`:r};var J=({parameters:e={},...t}={})=>s=>{let n=[];if(s&&typeof s=="object")for(let p in s){let a=s[p];if(a==null)continue;let i=e[p]||t;if(Array.isArray(a)){let l=U({allowReserved:i.allowReserved,explode:true,name:p,style:"form",value:a,...i.array});l&&n.push(l);}else if(typeof a=="object"){let l=q({allowReserved:i.allowReserved,explode:true,name:p,style:"deepObject",value:a,...i.object});l&&n.push(l);}else {let l=S({allowReserved:i.allowReserved,name:p,value:a});l&&n.push(l);}}return n.join("&")},_=e=>{if(!e)return "stream";let t=e.split(";")[0]?.trim();if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return "json";if(t==="multipart/form-data")return "formData";if(["application/","audio/","image/","video/"].some(r=>t.startsWith(r)))return "blob";if(t.startsWith("text/"))return "text"}},ce=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get("Cookie")?.includes(`${t}=`)):false,Y=async({security:e,...t})=>{for(let r of e){if(ce(t,r.name))continue;let s=await Q(r,t.auth);if(!s)continue;let n=r.name??"Authorization";switch(r.in){case "query":t.query||(t.query={}),t.query[n]=s;break;case "cookie":t.headers.append("Cookie",`${n}=${s}`);break;default:t.headers.set(n,s);break}}},v=e=>H({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:J(e.querySerializer),url:e.url}),I=(e,t)=>{let r={...e,...t};return r.baseUrl?.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=M(e.headers,t.headers),r},pe=e=>{let t=[];return e.forEach((r,s)=>{t.push([s,r]);}),t},M=(...e)=>{let t=new Headers;for(let r of e){if(!r)continue;let s=r instanceof Headers?pe(r):Object.entries(r);for(let[n,p]of s)if(p===null)t.delete(n);else if(Array.isArray(p))for(let a of p)t.append(n,a);else p!==void 0&&t.set(n,typeof p=="object"?JSON.stringify(p):p);}return t},D=class{fns=[];clear(){this.fns=[];}eject(t){let r=this.getInterceptorIndex(t);this.fns[r]&&(this.fns[r]=null);}exists(t){let r=this.getInterceptorIndex(t);return !!this.fns[r]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,r){let s=this.getInterceptorIndex(t);return this.fns[s]?(this.fns[s]=r,t):false}use(t){return this.fns.push(t),this.fns.length-1}},Z=()=>({error:new D,request:new D,response:new D}),de=J({allowReserved:false,array:{explode:true,style:"form"},object:{explode:true,style:"deepObject"}}),ge={"Content-Type":"application/json"},T=(e={})=>({...L,headers:ge,parseAs:"auto",querySerializer:de,...e});var z=(e={})=>{let t=I(T(),e),r=()=>({...t}),s=g=>(t=I(t,g),r()),n=Z(),p=async g=>{let o={...t,...g,fetch:g.fetch??t.fetch??globalThis.fetch,headers:M(t.headers,g.headers),serializedBody:void 0};o.security&&await Y({...o,security:o.security}),o.requestValidator&&await o.requestValidator(o),o.body!==void 0&&o.bodySerializer&&(o.serializedBody=o.bodySerializer(o.body)),(o.body===void 0||o.serializedBody==="")&&o.headers.delete("Content-Type");let A=v(o);return {opts:o,url:A}},a=async g=>{let{opts:o,url:A}=await p(g),O={redirect:"follow",...o,body:$(o)},P=new Request(A,O);for(let u of n.request.fns)u&&(P=await u(P,o));let k=o.fetch,d;try{d=await k(P);}catch(u){let f=u;for(let y of n.error.fns)y&&(f=await y(u,void 0,P,o));if(f=f||{},o.throwOnError)throw f;return o.responseStyle==="data"?void 0:{error:f,request:P,response:void 0}}for(let u of n.response.fns)u&&(d=await u(d,P,o));let E={request:P,response:d};if(d.ok){let u=(o.parseAs==="auto"?_(d.headers.get("Content-Type")):o.parseAs)??"json";if(d.status===204||d.headers.get("Content-Length")==="0"){let y;switch(u){case "arrayBuffer":case "blob":case "text":y=await d[u]();break;case "formData":y=new FormData;break;case "stream":y=d.body;break;default:y={};break}return o.responseStyle==="data"?y:{data:y,...E}}let f;switch(u){case "arrayBuffer":case "blob":case "formData":case "json":case "text":f=await d[u]();break;case "stream":return o.responseStyle==="data"?d.body:{data:d.body,...E}}return u==="json"&&(o.responseValidator&&await o.responseValidator(f),o.responseTransformer&&(f=await o.responseTransformer(f))),o.responseStyle==="data"?f:{data:f,...E}}let m=await d.text(),C;try{C=JSON.parse(m);}catch{}let w=C??m,h=w;for(let u of n.error.fns)u&&(h=await u(w,d,P,o));if(h=h||{},o.throwOnError)throw h;return o.responseStyle==="data"?void 0:{error:h,...E}},i=g=>o=>a({...o,method:g}),l=g=>async o=>{let{opts:A,url:O}=await p(o);return X({...A,body:A.body,headers:A.headers,method:g,onRequest:async(P,k)=>{let d=new Request(P,k);for(let E of n.request.fns)E&&(d=await E(d,A));return d},url:O})};return {buildUrl:v,connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:r,head:i("HEAD"),interceptors:n,options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),request:a,setConfig:s,sse:{connect:l("CONNECT"),delete:l("DELETE"),get:l("GET"),head:l("HEAD"),options:l("OPTIONS"),patch:l("PATCH"),post:l("POST"),put:l("PUT"),trace:l("TRACE")},trace:i("TRACE")}};var c=z(T({baseUrl:"https://odyssey.asteroid.ai/agents/v2"}));var ue=e=>(e?.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools",...e}),fe=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(e.client??c).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e}),Ee=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e}),ye=e=>(e.client??c).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(e.client??c).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e}),he=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e,headers:{"Content-Type":"application/json",...e.headers}}),me=e=>(e?.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e}),we=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e,headers:{"Content-Type":"application/json",...e.headers}}),Re=e=>(e.client??c).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),Se=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),Oe=e=>(e.client??c).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ce=e=>(e.client??c).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/clear-browser-cache",...e}),be=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/duplicate",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(e?.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e}),Te=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),ke=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e}),We=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ge=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}",...e}),Ue=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/publish",...e}),Me=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/sync-execution",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/docs/search",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(e?.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions",...e}),Ie=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}",...e}),ze=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/activities",...e}),je=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e}),Fe=e=>(e.client??c).post({...G,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e,headers:{"Content-Type":null,...e.headers}}),Ke=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/recording",...e}),Be=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/status",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ne=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/user-messages",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/schema/validate",...e,headers:{"Content-Type":"application/json",...e.headers}}),Xe=e=>(e.client??c).post({...G,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/temp-files/{organizationId}",...e,headers:{"Content-Type":null,...e.headers}});
|
|
8
|
-
exports.agentExecutePost=
|
|
5
|
+
`);b=j.pop()??"";for(let re of j){let oe=re.split(`
|
|
6
|
+
`),G=[],F;for(let x of oe)if(x.startsWith("data:"))G.push(x.replace(/^data:\s*/,""));else if(x.startsWith("event:"))F=x.replace(/^event:\s*/,"");else if(x.startsWith("id:"))A=x.replace(/^id:\s*/,"");else if(x.startsWith("retry:")){let N=Number.parseInt(x.replace(/^retry:\s*/,""),10);Number.isNaN(N)||(g=N);}let R,B=!1;if(G.length){let x=G.join(`
|
|
7
|
+
`);try{R=JSON.parse(x),B=!0;}catch{R=x;}}B&&(n&&await n(R),s&&(R=await s(R))),r?.({data:R,event:F,id:A,retry:g}),G.length&&(yield R);}}}finally{m.removeEventListener("abort",K),y.releaseLock();}break}catch(w){if(t?.(w),a!==void 0&&E>=a)break;let h=Math.min(g*2**(E-1),i??3e4);await O(h);}}}()}};var se=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},ne=e=>{switch(e){case "form":return ",";case "pipeDelimited":return "|";case "spaceDelimited":return "%20";default:return ","}},ie=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},U=({allowReserved:e,explode:t,name:r,style:s,value:n})=>{if(!t){let i=(e?n:n.map(l=>encodeURIComponent(l))).join(ne(s));switch(s){case "label":return `.${i}`;case "matrix":return `;${r}=${i}`;case "simple":return i;default:return `${r}=${i}`}}let p=se(s),a=n.map(i=>s==="label"||s==="simple"?e?i:encodeURIComponent(i):S({allowReserved:e,name:r,value:i})).join(p);return s==="label"||s==="matrix"?p+a:a},S=({allowReserved:e,name:t,value:r})=>{if(r==null)return "";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return `${t}=${e?r:encodeURIComponent(r)}`},v=({allowReserved:e,explode:t,name:r,style:s,value:n,valueOnly:p})=>{if(n instanceof Date)return p?n.toISOString():`${r}=${n.toISOString()}`;if(s!=="deepObject"&&!t){let l=[];Object.entries(n).forEach(([o,A])=>{l=[...l,o,e?A:encodeURIComponent(A)];});let d=l.join(",");switch(s){case "form":return `${r}=${d}`;case "label":return `.${d}`;case "matrix":return `;${r}=${d}`;default:return d}}let a=ie(s),i=Object.entries(n).map(([l,d])=>S({allowReserved:e,name:s==="deepObject"?`${r}[${l}]`:l,value:d})).join(a);return s==="label"||s==="matrix"?a+i:i};var ae=/\{[^{}]+\}/g,le=({path:e,url:t})=>{let r=t,s=t.match(ae);if(s)for(let n of s){let p=false,a=n.substring(1,n.length-1),i="simple";a.endsWith("*")&&(p=true,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),i="label"):a.startsWith(";")&&(a=a.substring(1),i="matrix");let l=e[a];if(l==null)continue;if(Array.isArray(l)){r=r.replace(n,U({explode:p,name:a,style:i,value:l}));continue}if(typeof l=="object"){r=r.replace(n,v({explode:p,name:a,style:i,value:l,valueOnly:true}));continue}if(i==="matrix"){r=r.replace(n,`;${S({name:a,value:l})}`);continue}let d=encodeURIComponent(i==="label"?`.${l}`:l);r=r.replace(n,d);}return r},H=({baseUrl:e,path:t,query:r,querySerializer:s,url:n})=>{let p=n.startsWith("/")?n:`/${n}`,a=(e??"")+p;t&&(a=le({path:t,url:a}));let i=r?s(r):"";return i.startsWith("?")&&(i=i.substring(1)),i&&(a+=`?${i}`),a};function $(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return "serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}var Q=async(e,t)=>{let r=typeof t=="function"?await t(e):t;if(r)return e.scheme==="bearer"?`Bearer ${r}`:e.scheme==="basic"?`Basic ${btoa(r)}`:r};var J=({parameters:e={},...t}={})=>s=>{let n=[];if(s&&typeof s=="object")for(let p in s){let a=s[p];if(a==null)continue;let i=e[p]||t;if(Array.isArray(a)){let l=U({allowReserved:i.allowReserved,explode:true,name:p,style:"form",value:a,...i.array});l&&n.push(l);}else if(typeof a=="object"){let l=v({allowReserved:i.allowReserved,explode:true,name:p,style:"deepObject",value:a,...i.object});l&&n.push(l);}else {let l=S({allowReserved:i.allowReserved,name:p,value:a});l&&n.push(l);}}return n.join("&")},_=e=>{if(!e)return "stream";let t=e.split(";")[0]?.trim();if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return "json";if(t==="multipart/form-data")return "formData";if(["application/","audio/","image/","video/"].some(r=>t.startsWith(r)))return "blob";if(t.startsWith("text/"))return "text"}},ce=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get("Cookie")?.includes(`${t}=`)):false,Y=async({security:e,...t})=>{for(let r of e){if(ce(t,r.name))continue;let s=await Q(r,t.auth);if(!s)continue;let n=r.name??"Authorization";switch(r.in){case "query":t.query||(t.query={}),t.query[n]=s;break;case "cookie":t.headers.append("Cookie",`${n}=${s}`);break;default:t.headers.set(n,s);break}}},M=e=>H({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:J(e.querySerializer),url:e.url}),I=(e,t)=>{let r={...e,...t};return r.baseUrl?.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=L(e.headers,t.headers),r},pe=e=>{let t=[];return e.forEach((r,s)=>{t.push([s,r]);}),t},L=(...e)=>{let t=new Headers;for(let r of e){if(!r)continue;let s=r instanceof Headers?pe(r):Object.entries(r);for(let[n,p]of s)if(p===null)t.delete(n);else if(Array.isArray(p))for(let a of p)t.append(n,a);else p!==void 0&&t.set(n,typeof p=="object"?JSON.stringify(p):p);}return t},T=class{fns=[];clear(){this.fns=[];}eject(t){let r=this.getInterceptorIndex(t);this.fns[r]&&(this.fns[r]=null);}exists(t){let r=this.getInterceptorIndex(t);return !!this.fns[r]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,r){let s=this.getInterceptorIndex(t);return this.fns[s]?(this.fns[s]=r,t):false}use(t){return this.fns.push(t),this.fns.length-1}},Z=()=>({error:new T,request:new T,response:new T}),ge=J({allowReserved:false,array:{explode:true,style:"form"},object:{explode:true,style:"deepObject"}}),de={"Content-Type":"application/json"},D=(e={})=>({...q,headers:de,parseAs:"auto",querySerializer:ge,...e});var z=(e={})=>{let t=I(D(),e),r=()=>({...t}),s=d=>(t=I(t,d),r()),n=Z(),p=async d=>{let o={...t,...d,fetch:d.fetch??t.fetch??globalThis.fetch,headers:L(t.headers,d.headers),serializedBody:void 0};o.security&&await Y({...o,security:o.security}),o.requestValidator&&await o.requestValidator(o),o.body!==void 0&&o.bodySerializer&&(o.serializedBody=o.bodySerializer(o.body)),(o.body===void 0||o.serializedBody==="")&&o.headers.delete("Content-Type");let A=M(o);return {opts:o,url:A}},a=async d=>{let{opts:o,url:A}=await p(d),O={redirect:"follow",...o,body:$(o)},P=new Request(A,O);for(let u of n.request.fns)u&&(P=await u(P,o));let k=o.fetch,g;try{g=await k(P);}catch(u){let f=u;for(let y of n.error.fns)y&&(f=await y(u,void 0,P,o));if(f=f||{},o.throwOnError)throw f;return o.responseStyle==="data"?void 0:{error:f,request:P,response:void 0}}for(let u of n.response.fns)u&&(g=await u(g,P,o));let E={request:P,response:g};if(g.ok){let u=(o.parseAs==="auto"?_(g.headers.get("Content-Type")):o.parseAs)??"json";if(g.status===204||g.headers.get("Content-Length")==="0"){let y;switch(u){case "arrayBuffer":case "blob":case "text":y=await g[u]();break;case "formData":y=new FormData;break;case "stream":y=g.body;break;default:y={};break}return o.responseStyle==="data"?y:{data:y,...E}}let f;switch(u){case "arrayBuffer":case "blob":case "formData":case "json":case "text":f=await g[u]();break;case "stream":return o.responseStyle==="data"?g.body:{data:g.body,...E}}return u==="json"&&(o.responseValidator&&await o.responseValidator(f),o.responseTransformer&&(f=await o.responseTransformer(f))),o.responseStyle==="data"?f:{data:f,...E}}let m=await g.text(),C;try{C=JSON.parse(m);}catch{}let w=C??m,h=w;for(let u of n.error.fns)u&&(h=await u(w,g,P,o));if(h=h||{},o.throwOnError)throw h;return o.responseStyle==="data"?void 0:{error:h,...E}},i=d=>o=>a({...o,method:d}),l=d=>async o=>{let{opts:A,url:O}=await p(o);return X({...A,body:A.body,headers:A.headers,method:d,onRequest:async(P,k)=>{let g=new Request(P,k);for(let E of n.request.fns)E&&(g=await E(g,A));return g},url:O})};return {buildUrl:M,connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:r,head:i("HEAD"),interceptors:n,options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),request:a,setConfig:s,sse:{connect:l("CONNECT"),delete:l("DELETE"),get:l("GET"),head:l("HEAD"),options:l("OPTIONS"),patch:l("PATCH"),post:l("POST"),put:l("PUT"),trace:l("TRACE")},trace:i("TRACE")}};var c=z(D({baseUrl:"https://odyssey.asteroid.ai/agents/v2"}));var ue=e=>(e?.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools",...e}),fe=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(e.client??c).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e}),Ee=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e}),ye=e=>(e.client??c).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(e.client??c).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e}),he=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e,headers:{"Content-Type":"application/json",...e.headers}}),me=e=>(e?.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e}),we=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e,headers:{"Content-Type":"application/json",...e.headers}}),Re=e=>(e.client??c).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),Se=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),Oe=e=>(e.client??c).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ce=e=>(e.client??c).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/clear-browser-cache",...e}),be=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/duplicate",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e?.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e}),De=e=>(e?.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/available-tools",...e}),ke=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ge=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e}),We=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}",...e}),ve=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/publish",...e}),qe=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/sync-execution",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(e?.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/context",...e}),Ie=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/docs/search",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(e?.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions",...e}),Ke=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}",...e}),je=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/activities",...e}),Fe=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e}),Be=e=>(e.client??c).post({...W,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e,headers:{"Content-Type":null,...e.headers}}),Ne=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/recording",...e}),Ve=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/status",...e,headers:{"Content-Type":"application/json",...e.headers}}),Xe=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/user-messages",...e,headers:{"Content-Type":"application/json",...e.headers}}),He=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/schema/validate",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(e.client??c).post({...W,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/temp-files/{organizationId}",...e,headers:{"Content-Type":null,...e.headers}});
|
|
8
|
+
exports.agentExecutePost=ke;exports.agentList=Te;exports.agentProfileClearBrowserCache=Ce;exports.agentProfileDelete=Re;exports.agentProfileDuplicate=be;exports.agentProfileGet=Se;exports.agentProfilePoolDelete=Ae;exports.agentProfilePoolGet=Ee;exports.agentProfilePoolMembersAdd=he;exports.agentProfilePoolMembersList=xe;exports.agentProfilePoolMembersRemove=Pe;exports.agentProfilePoolUpdate=ye;exports.agentProfilePoolsCreate=fe;exports.agentProfilePoolsList=ue;exports.agentProfileUpdate=Oe;exports.agentProfilesCreate=we;exports.agentProfilesList=me;exports.agentWorkflowsCreate=We;exports.agentWorkflowsExecute=ve;exports.agentWorkflowsGet=Ue;exports.agentWorkflowsList=Ge;exports.agentWorkflowsPublish=Le;exports.agentWorkflowsSyncExecution=qe;exports.availableToolsList=De;exports.client=c;exports.contextGet=Me;exports.docsSearchSearch=Ie;exports.executionActivitiesGet=je;exports.executionContextFilesGet=Fe;exports.executionContextFilesUpload=Be;exports.executionGet=Ke;exports.executionRecordingRedirect=Ne;exports.executionStatusUpdate=Ve;exports.executionUserMessagesAdd=Xe;exports.executionsList=ze;exports.schemaValidationValidate=He;exports.tempFilesStage=$e;
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var V=(e,t,r)=>{typeof r=="string"||r instanceof Blob?e.append(t,r):r instanceof Date?e.append(t,r.toISOString()):e.append(t,JSON.stringify(r));};var
|
|
1
|
+
var V=(e,t,r)=>{typeof r=="string"||r instanceof Blob?e.append(t,r):r instanceof Date?e.append(t,r.toISOString()):e.append(t,JSON.stringify(r));};var W={bodySerializer:e=>{let t=new FormData;return Object.entries(e).forEach(([r,s])=>{s!=null&&(Array.isArray(s)?s.forEach(n=>V(t,r,n)):V(t,r,s));}),t}},q={bodySerializer:e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)};var X=({onRequest:e,onSseError:t,onSseEvent:r,responseTransformer:s,responseValidator:n,sseDefaultRetryDelay:p,sseMaxRetryAttempts:a,sseMaxRetryDelay:i,sseSleepFn:l,url:d,...o})=>{let A,O=l??(g=>new Promise(E=>setTimeout(E,g)));return {stream:async function*(){let g=p??3e3,E=0,m=o.signal??new AbortController().signal;for(;!m.aborted;){E++;let C=o.headers instanceof Headers?o.headers:new Headers(o.headers);A!==void 0&&C.set("Last-Event-ID",A);try{let w={redirect:"follow",...o,body:o.serializedBody,headers:C,signal:m},h=new Request(d,w);e&&(h=await e(d,w));let f=await(o.fetch??globalThis.fetch)(h);if(!f.ok)throw new Error(`SSE failed: ${f.status} ${f.statusText}`);if(!f.body)throw new Error("No body in SSE response");let y=f.body.pipeThrough(new TextDecoderStream).getReader(),b="",K=()=>{try{y.cancel();}catch{}};m.addEventListener("abort",K);try{for(;;){let{done:ee,value:te}=await y.read();if(ee)break;b+=te,b=b.replace(/\r\n/g,`
|
|
2
2
|
`).replace(/\r/g,`
|
|
3
|
-
`);let
|
|
3
|
+
`);let j=b.split(`
|
|
4
4
|
|
|
5
|
-
`);b=
|
|
6
|
-
`),
|
|
7
|
-
`);try{R=JSON.parse(x),B=!0;}catch{R=x;}}B&&(n&&await n(R),s&&(R=await s(R))),r?.({data:R,event:K,id:A,retry:d}),W.length&&(yield R);}}}finally{m.removeEventListener("abort",j),y.releaseLock();}break}catch(w){if(t?.(w),a!==void 0&&E>=a)break;let h=Math.min(d*2**(E-1),i??3e4);await O(h);}}}()}};var se=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},ne=e=>{switch(e){case "form":return ",";case "pipeDelimited":return "|";case "spaceDelimited":return "%20";default:return ","}},ie=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},U=({allowReserved:e,explode:t,name:r,style:s,value:n})=>{if(!t){let i=(e?n:n.map(l=>encodeURIComponent(l))).join(ne(s));switch(s){case "label":return `.${i}`;case "matrix":return `;${r}=${i}`;case "simple":return i;default:return `${r}=${i}`}}let p=se(s),a=n.map(i=>s==="label"||s==="simple"?e?i:encodeURIComponent(i):S({allowReserved:e,name:r,value:i})).join(p);return s==="label"||s==="matrix"?p+a:a},S=({allowReserved:e,name:t,value:r})=>{if(r==null)return "";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return `${t}=${e?r:encodeURIComponent(r)}`},q=({allowReserved:e,explode:t,name:r,style:s,value:n,valueOnly:p})=>{if(n instanceof Date)return p?n.toISOString():`${r}=${n.toISOString()}`;if(s!=="deepObject"&&!t){let l=[];Object.entries(n).forEach(([o,A])=>{l=[...l,o,e?A:encodeURIComponent(A)];});let g=l.join(",");switch(s){case "form":return `${r}=${g}`;case "label":return `.${g}`;case "matrix":return `;${r}=${g}`;default:return g}}let a=ie(s),i=Object.entries(n).map(([l,g])=>S({allowReserved:e,name:s==="deepObject"?`${r}[${l}]`:l,value:g})).join(a);return s==="label"||s==="matrix"?a+i:i};var ae=/\{[^{}]+\}/g,le=({path:e,url:t})=>{let r=t,s=t.match(ae);if(s)for(let n of s){let p=false,a=n.substring(1,n.length-1),i="simple";a.endsWith("*")&&(p=true,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),i="label"):a.startsWith(";")&&(a=a.substring(1),i="matrix");let l=e[a];if(l==null)continue;if(Array.isArray(l)){r=r.replace(n,U({explode:p,name:a,style:i,value:l}));continue}if(typeof l=="object"){r=r.replace(n,q({explode:p,name:a,style:i,value:l,valueOnly:true}));continue}if(i==="matrix"){r=r.replace(n,`;${S({name:a,value:l})}`);continue}let g=encodeURIComponent(i==="label"?`.${l}`:l);r=r.replace(n,g);}return r},H=({baseUrl:e,path:t,query:r,querySerializer:s,url:n})=>{let p=n.startsWith("/")?n:`/${n}`,a=(e??"")+p;t&&(a=le({path:t,url:a}));let i=r?s(r):"";return i.startsWith("?")&&(i=i.substring(1)),i&&(a+=`?${i}`),a};function $(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return "serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}var Q=async(e,t)=>{let r=typeof t=="function"?await t(e):t;if(r)return e.scheme==="bearer"?`Bearer ${r}`:e.scheme==="basic"?`Basic ${btoa(r)}`:r};var J=({parameters:e={},...t}={})=>s=>{let n=[];if(s&&typeof s=="object")for(let p in s){let a=s[p];if(a==null)continue;let i=e[p]||t;if(Array.isArray(a)){let l=U({allowReserved:i.allowReserved,explode:true,name:p,style:"form",value:a,...i.array});l&&n.push(l);}else if(typeof a=="object"){let l=q({allowReserved:i.allowReserved,explode:true,name:p,style:"deepObject",value:a,...i.object});l&&n.push(l);}else {let l=S({allowReserved:i.allowReserved,name:p,value:a});l&&n.push(l);}}return n.join("&")},_=e=>{if(!e)return "stream";let t=e.split(";")[0]?.trim();if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return "json";if(t==="multipart/form-data")return "formData";if(["application/","audio/","image/","video/"].some(r=>t.startsWith(r)))return "blob";if(t.startsWith("text/"))return "text"}},ce=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get("Cookie")?.includes(`${t}=`)):false,Y=async({security:e,...t})=>{for(let r of e){if(ce(t,r.name))continue;let s=await Q(r,t.auth);if(!s)continue;let n=r.name??"Authorization";switch(r.in){case "query":t.query||(t.query={}),t.query[n]=s;break;case "cookie":t.headers.append("Cookie",`${n}=${s}`);break;default:t.headers.set(n,s);break}}},v=e=>H({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:J(e.querySerializer),url:e.url}),I=(e,t)=>{let r={...e,...t};return r.baseUrl?.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=M(e.headers,t.headers),r},pe=e=>{let t=[];return e.forEach((r,s)=>{t.push([s,r]);}),t},M=(...e)=>{let t=new Headers;for(let r of e){if(!r)continue;let s=r instanceof Headers?pe(r):Object.entries(r);for(let[n,p]of s)if(p===null)t.delete(n);else if(Array.isArray(p))for(let a of p)t.append(n,a);else p!==void 0&&t.set(n,typeof p=="object"?JSON.stringify(p):p);}return t},D=class{fns=[];clear(){this.fns=[];}eject(t){let r=this.getInterceptorIndex(t);this.fns[r]&&(this.fns[r]=null);}exists(t){let r=this.getInterceptorIndex(t);return !!this.fns[r]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,r){let s=this.getInterceptorIndex(t);return this.fns[s]?(this.fns[s]=r,t):false}use(t){return this.fns.push(t),this.fns.length-1}},Z=()=>({error:new D,request:new D,response:new D}),de=J({allowReserved:false,array:{explode:true,style:"form"},object:{explode:true,style:"deepObject"}}),ge={"Content-Type":"application/json"},T=(e={})=>({...L,headers:ge,parseAs:"auto",querySerializer:de,...e});var z=(e={})=>{let t=I(T(),e),r=()=>({...t}),s=g=>(t=I(t,g),r()),n=Z(),p=async g=>{let o={...t,...g,fetch:g.fetch??t.fetch??globalThis.fetch,headers:M(t.headers,g.headers),serializedBody:void 0};o.security&&await Y({...o,security:o.security}),o.requestValidator&&await o.requestValidator(o),o.body!==void 0&&o.bodySerializer&&(o.serializedBody=o.bodySerializer(o.body)),(o.body===void 0||o.serializedBody==="")&&o.headers.delete("Content-Type");let A=v(o);return {opts:o,url:A}},a=async g=>{let{opts:o,url:A}=await p(g),O={redirect:"follow",...o,body:$(o)},P=new Request(A,O);for(let u of n.request.fns)u&&(P=await u(P,o));let k=o.fetch,d;try{d=await k(P);}catch(u){let f=u;for(let y of n.error.fns)y&&(f=await y(u,void 0,P,o));if(f=f||{},o.throwOnError)throw f;return o.responseStyle==="data"?void 0:{error:f,request:P,response:void 0}}for(let u of n.response.fns)u&&(d=await u(d,P,o));let E={request:P,response:d};if(d.ok){let u=(o.parseAs==="auto"?_(d.headers.get("Content-Type")):o.parseAs)??"json";if(d.status===204||d.headers.get("Content-Length")==="0"){let y;switch(u){case "arrayBuffer":case "blob":case "text":y=await d[u]();break;case "formData":y=new FormData;break;case "stream":y=d.body;break;default:y={};break}return o.responseStyle==="data"?y:{data:y,...E}}let f;switch(u){case "arrayBuffer":case "blob":case "formData":case "json":case "text":f=await d[u]();break;case "stream":return o.responseStyle==="data"?d.body:{data:d.body,...E}}return u==="json"&&(o.responseValidator&&await o.responseValidator(f),o.responseTransformer&&(f=await o.responseTransformer(f))),o.responseStyle==="data"?f:{data:f,...E}}let m=await d.text(),C;try{C=JSON.parse(m);}catch{}let w=C??m,h=w;for(let u of n.error.fns)u&&(h=await u(w,d,P,o));if(h=h||{},o.throwOnError)throw h;return o.responseStyle==="data"?void 0:{error:h,...E}},i=g=>o=>a({...o,method:g}),l=g=>async o=>{let{opts:A,url:O}=await p(o);return X({...A,body:A.body,headers:A.headers,method:g,onRequest:async(P,k)=>{let d=new Request(P,k);for(let E of n.request.fns)E&&(d=await E(d,A));return d},url:O})};return {buildUrl:v,connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:r,head:i("HEAD"),interceptors:n,options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),request:a,setConfig:s,sse:{connect:l("CONNECT"),delete:l("DELETE"),get:l("GET"),head:l("HEAD"),options:l("OPTIONS"),patch:l("PATCH"),post:l("POST"),put:l("PUT"),trace:l("TRACE")},trace:i("TRACE")}};var c=z(T({baseUrl:"https://odyssey.asteroid.ai/agents/v2"}));var ue=e=>(e?.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools",...e}),fe=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(e.client??c).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e}),Ee=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e}),ye=e=>(e.client??c).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(e.client??c).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e}),he=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e,headers:{"Content-Type":"application/json",...e.headers}}),me=e=>(e?.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e}),we=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e,headers:{"Content-Type":"application/json",...e.headers}}),Re=e=>(e.client??c).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),Se=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),Oe=e=>(e.client??c).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ce=e=>(e.client??c).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/clear-browser-cache",...e}),be=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/duplicate",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(e?.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e}),Te=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),ke=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e}),We=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ge=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}",...e}),Ue=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/publish",...e}),Me=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/sync-execution",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/docs/search",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(e?.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions",...e}),Ie=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}",...e}),ze=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/activities",...e}),je=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e}),Fe=e=>(e.client??c).post({...G,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e,headers:{"Content-Type":null,...e.headers}}),Ke=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/recording",...e}),Be=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/status",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ne=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/user-messages",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/schema/validate",...e,headers:{"Content-Type":"application/json",...e.headers}}),Xe=e=>(e.client??c).post({...G,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/temp-files/{organizationId}",...e,headers:{"Content-Type":null,...e.headers}});
|
|
8
|
-
export{
|
|
5
|
+
`);b=j.pop()??"";for(let re of j){let oe=re.split(`
|
|
6
|
+
`),G=[],F;for(let x of oe)if(x.startsWith("data:"))G.push(x.replace(/^data:\s*/,""));else if(x.startsWith("event:"))F=x.replace(/^event:\s*/,"");else if(x.startsWith("id:"))A=x.replace(/^id:\s*/,"");else if(x.startsWith("retry:")){let N=Number.parseInt(x.replace(/^retry:\s*/,""),10);Number.isNaN(N)||(g=N);}let R,B=!1;if(G.length){let x=G.join(`
|
|
7
|
+
`);try{R=JSON.parse(x),B=!0;}catch{R=x;}}B&&(n&&await n(R),s&&(R=await s(R))),r?.({data:R,event:F,id:A,retry:g}),G.length&&(yield R);}}}finally{m.removeEventListener("abort",K),y.releaseLock();}break}catch(w){if(t?.(w),a!==void 0&&E>=a)break;let h=Math.min(g*2**(E-1),i??3e4);await O(h);}}}()}};var se=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},ne=e=>{switch(e){case "form":return ",";case "pipeDelimited":return "|";case "spaceDelimited":return "%20";default:return ","}},ie=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},U=({allowReserved:e,explode:t,name:r,style:s,value:n})=>{if(!t){let i=(e?n:n.map(l=>encodeURIComponent(l))).join(ne(s));switch(s){case "label":return `.${i}`;case "matrix":return `;${r}=${i}`;case "simple":return i;default:return `${r}=${i}`}}let p=se(s),a=n.map(i=>s==="label"||s==="simple"?e?i:encodeURIComponent(i):S({allowReserved:e,name:r,value:i})).join(p);return s==="label"||s==="matrix"?p+a:a},S=({allowReserved:e,name:t,value:r})=>{if(r==null)return "";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return `${t}=${e?r:encodeURIComponent(r)}`},v=({allowReserved:e,explode:t,name:r,style:s,value:n,valueOnly:p})=>{if(n instanceof Date)return p?n.toISOString():`${r}=${n.toISOString()}`;if(s!=="deepObject"&&!t){let l=[];Object.entries(n).forEach(([o,A])=>{l=[...l,o,e?A:encodeURIComponent(A)];});let d=l.join(",");switch(s){case "form":return `${r}=${d}`;case "label":return `.${d}`;case "matrix":return `;${r}=${d}`;default:return d}}let a=ie(s),i=Object.entries(n).map(([l,d])=>S({allowReserved:e,name:s==="deepObject"?`${r}[${l}]`:l,value:d})).join(a);return s==="label"||s==="matrix"?a+i:i};var ae=/\{[^{}]+\}/g,le=({path:e,url:t})=>{let r=t,s=t.match(ae);if(s)for(let n of s){let p=false,a=n.substring(1,n.length-1),i="simple";a.endsWith("*")&&(p=true,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),i="label"):a.startsWith(";")&&(a=a.substring(1),i="matrix");let l=e[a];if(l==null)continue;if(Array.isArray(l)){r=r.replace(n,U({explode:p,name:a,style:i,value:l}));continue}if(typeof l=="object"){r=r.replace(n,v({explode:p,name:a,style:i,value:l,valueOnly:true}));continue}if(i==="matrix"){r=r.replace(n,`;${S({name:a,value:l})}`);continue}let d=encodeURIComponent(i==="label"?`.${l}`:l);r=r.replace(n,d);}return r},H=({baseUrl:e,path:t,query:r,querySerializer:s,url:n})=>{let p=n.startsWith("/")?n:`/${n}`,a=(e??"")+p;t&&(a=le({path:t,url:a}));let i=r?s(r):"";return i.startsWith("?")&&(i=i.substring(1)),i&&(a+=`?${i}`),a};function $(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return "serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}var Q=async(e,t)=>{let r=typeof t=="function"?await t(e):t;if(r)return e.scheme==="bearer"?`Bearer ${r}`:e.scheme==="basic"?`Basic ${btoa(r)}`:r};var J=({parameters:e={},...t}={})=>s=>{let n=[];if(s&&typeof s=="object")for(let p in s){let a=s[p];if(a==null)continue;let i=e[p]||t;if(Array.isArray(a)){let l=U({allowReserved:i.allowReserved,explode:true,name:p,style:"form",value:a,...i.array});l&&n.push(l);}else if(typeof a=="object"){let l=v({allowReserved:i.allowReserved,explode:true,name:p,style:"deepObject",value:a,...i.object});l&&n.push(l);}else {let l=S({allowReserved:i.allowReserved,name:p,value:a});l&&n.push(l);}}return n.join("&")},_=e=>{if(!e)return "stream";let t=e.split(";")[0]?.trim();if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return "json";if(t==="multipart/form-data")return "formData";if(["application/","audio/","image/","video/"].some(r=>t.startsWith(r)))return "blob";if(t.startsWith("text/"))return "text"}},ce=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get("Cookie")?.includes(`${t}=`)):false,Y=async({security:e,...t})=>{for(let r of e){if(ce(t,r.name))continue;let s=await Q(r,t.auth);if(!s)continue;let n=r.name??"Authorization";switch(r.in){case "query":t.query||(t.query={}),t.query[n]=s;break;case "cookie":t.headers.append("Cookie",`${n}=${s}`);break;default:t.headers.set(n,s);break}}},M=e=>H({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:J(e.querySerializer),url:e.url}),I=(e,t)=>{let r={...e,...t};return r.baseUrl?.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=L(e.headers,t.headers),r},pe=e=>{let t=[];return e.forEach((r,s)=>{t.push([s,r]);}),t},L=(...e)=>{let t=new Headers;for(let r of e){if(!r)continue;let s=r instanceof Headers?pe(r):Object.entries(r);for(let[n,p]of s)if(p===null)t.delete(n);else if(Array.isArray(p))for(let a of p)t.append(n,a);else p!==void 0&&t.set(n,typeof p=="object"?JSON.stringify(p):p);}return t},T=class{fns=[];clear(){this.fns=[];}eject(t){let r=this.getInterceptorIndex(t);this.fns[r]&&(this.fns[r]=null);}exists(t){let r=this.getInterceptorIndex(t);return !!this.fns[r]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,r){let s=this.getInterceptorIndex(t);return this.fns[s]?(this.fns[s]=r,t):false}use(t){return this.fns.push(t),this.fns.length-1}},Z=()=>({error:new T,request:new T,response:new T}),ge=J({allowReserved:false,array:{explode:true,style:"form"},object:{explode:true,style:"deepObject"}}),de={"Content-Type":"application/json"},D=(e={})=>({...q,headers:de,parseAs:"auto",querySerializer:ge,...e});var z=(e={})=>{let t=I(D(),e),r=()=>({...t}),s=d=>(t=I(t,d),r()),n=Z(),p=async d=>{let o={...t,...d,fetch:d.fetch??t.fetch??globalThis.fetch,headers:L(t.headers,d.headers),serializedBody:void 0};o.security&&await Y({...o,security:o.security}),o.requestValidator&&await o.requestValidator(o),o.body!==void 0&&o.bodySerializer&&(o.serializedBody=o.bodySerializer(o.body)),(o.body===void 0||o.serializedBody==="")&&o.headers.delete("Content-Type");let A=M(o);return {opts:o,url:A}},a=async d=>{let{opts:o,url:A}=await p(d),O={redirect:"follow",...o,body:$(o)},P=new Request(A,O);for(let u of n.request.fns)u&&(P=await u(P,o));let k=o.fetch,g;try{g=await k(P);}catch(u){let f=u;for(let y of n.error.fns)y&&(f=await y(u,void 0,P,o));if(f=f||{},o.throwOnError)throw f;return o.responseStyle==="data"?void 0:{error:f,request:P,response:void 0}}for(let u of n.response.fns)u&&(g=await u(g,P,o));let E={request:P,response:g};if(g.ok){let u=(o.parseAs==="auto"?_(g.headers.get("Content-Type")):o.parseAs)??"json";if(g.status===204||g.headers.get("Content-Length")==="0"){let y;switch(u){case "arrayBuffer":case "blob":case "text":y=await g[u]();break;case "formData":y=new FormData;break;case "stream":y=g.body;break;default:y={};break}return o.responseStyle==="data"?y:{data:y,...E}}let f;switch(u){case "arrayBuffer":case "blob":case "formData":case "json":case "text":f=await g[u]();break;case "stream":return o.responseStyle==="data"?g.body:{data:g.body,...E}}return u==="json"&&(o.responseValidator&&await o.responseValidator(f),o.responseTransformer&&(f=await o.responseTransformer(f))),o.responseStyle==="data"?f:{data:f,...E}}let m=await g.text(),C;try{C=JSON.parse(m);}catch{}let w=C??m,h=w;for(let u of n.error.fns)u&&(h=await u(w,g,P,o));if(h=h||{},o.throwOnError)throw h;return o.responseStyle==="data"?void 0:{error:h,...E}},i=d=>o=>a({...o,method:d}),l=d=>async o=>{let{opts:A,url:O}=await p(o);return X({...A,body:A.body,headers:A.headers,method:d,onRequest:async(P,k)=>{let g=new Request(P,k);for(let E of n.request.fns)E&&(g=await E(g,A));return g},url:O})};return {buildUrl:M,connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:r,head:i("HEAD"),interceptors:n,options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),request:a,setConfig:s,sse:{connect:l("CONNECT"),delete:l("DELETE"),get:l("GET"),head:l("HEAD"),options:l("OPTIONS"),patch:l("PATCH"),post:l("POST"),put:l("PUT"),trace:l("TRACE")},trace:i("TRACE")}};var c=z(D({baseUrl:"https://odyssey.asteroid.ai/agents/v2"}));var ue=e=>(e?.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools",...e}),fe=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(e.client??c).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e}),Ee=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e}),ye=e=>(e.client??c).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(e.client??c).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e}),he=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profile-pools/{poolId}/members",...e,headers:{"Content-Type":"application/json",...e.headers}}),me=e=>(e?.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e}),we=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e,headers:{"Content-Type":"application/json",...e.headers}}),Re=e=>(e.client??c).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),Se=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),Oe=e=>(e.client??c).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ce=e=>(e.client??c).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/clear-browser-cache",...e}),be=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/duplicate",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e?.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e}),De=e=>(e?.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/available-tools",...e}),ke=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ge=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e}),We=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}",...e}),ve=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/publish",...e}),qe=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/sync-execution",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(e?.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/context",...e}),Ie=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/docs/search",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(e?.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions",...e}),Ke=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}",...e}),je=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/activities",...e}),Fe=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e}),Be=e=>(e.client??c).post({...W,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e,headers:{"Content-Type":null,...e.headers}}),Ne=e=>(e.client??c).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/recording",...e}),Ve=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/status",...e,headers:{"Content-Type":"application/json",...e.headers}}),Xe=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/user-messages",...e,headers:{"Content-Type":"application/json",...e.headers}}),He=e=>(e.client??c).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/schema/validate",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(e.client??c).post({...W,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/temp-files/{organizationId}",...e,headers:{"Content-Type":null,...e.headers}});
|
|
8
|
+
export{ke as agentExecutePost,Te as agentList,Ce as agentProfileClearBrowserCache,Re as agentProfileDelete,be as agentProfileDuplicate,Se as agentProfileGet,Ae as agentProfilePoolDelete,Ee as agentProfilePoolGet,he as agentProfilePoolMembersAdd,xe as agentProfilePoolMembersList,Pe as agentProfilePoolMembersRemove,ye as agentProfilePoolUpdate,fe as agentProfilePoolsCreate,ue as agentProfilePoolsList,Oe as agentProfileUpdate,we as agentProfilesCreate,me as agentProfilesList,We as agentWorkflowsCreate,ve as agentWorkflowsExecute,Ue as agentWorkflowsGet,Ge as agentWorkflowsList,Le as agentWorkflowsPublish,qe as agentWorkflowsSyncExecution,De as availableToolsList,c as client,Me as contextGet,Ie as docsSearchSearch,je as executionActivitiesGet,Fe as executionContextFilesGet,Be as executionContextFilesUpload,Ke as executionGet,Ne as executionRecordingRedirect,Ve as executionStatusUpdate,Xe as executionUserMessagesAdd,ze as executionsList,He as schemaValidationValidate,$e as tempFilesStage};
|