asteroid-odyssey 1.6.190 → 1.6.201
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 +76 -3
- package/dist/index.d.ts +76 -3
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -836,11 +836,23 @@ type AgentsExecutionListItem = {
|
|
|
836
836
|
[key: string]: unknown;
|
|
837
837
|
};
|
|
838
838
|
/**
|
|
839
|
-
*
|
|
839
|
+
* Recording URL for playback (if an environment was used and execution is terminal)
|
|
840
|
+
*/
|
|
841
|
+
recordingUrl?: string;
|
|
842
|
+
/**
|
|
843
|
+
* Live view URL for debugging (if an environment is active and execution is running)
|
|
844
|
+
*/
|
|
845
|
+
liveViewUrl?: string;
|
|
846
|
+
/**
|
|
847
|
+
* Deprecated: Use 'recordingUrl' instead.
|
|
848
|
+
*
|
|
849
|
+
* @deprecated
|
|
840
850
|
*/
|
|
841
851
|
browserRecordingUrl?: string;
|
|
842
852
|
/**
|
|
843
|
-
*
|
|
853
|
+
* Deprecated: Use 'liveViewUrl' instead.
|
|
854
|
+
*
|
|
855
|
+
* @deprecated
|
|
844
856
|
*/
|
|
845
857
|
browserLiveViewUrl?: string;
|
|
846
858
|
/**
|
|
@@ -1358,6 +1370,14 @@ type AgentsProfileAgentProfile = {
|
|
|
1358
1370
|
* Whether browser tracing is enabled (admin only)
|
|
1359
1371
|
*/
|
|
1360
1372
|
tracingEnabled: boolean;
|
|
1373
|
+
/**
|
|
1374
|
+
* Optional custom prefix for the agent's inbox email address. If set, the inbox will be {prefix}@agentmail.asteroid.ai. If not set, defaults to the first 8 characters of the profile ID.
|
|
1375
|
+
*/
|
|
1376
|
+
inboxEmailPrefix?: string;
|
|
1377
|
+
/**
|
|
1378
|
+
* The resolved inbox email address for this profile
|
|
1379
|
+
*/
|
|
1380
|
+
inboxEmail: string;
|
|
1361
1381
|
/**
|
|
1362
1382
|
* List of credentials associated with this profile
|
|
1363
1383
|
*/
|
|
@@ -1504,6 +1524,10 @@ type AgentsProfileCreateAgentProfileRequest = {
|
|
|
1504
1524
|
* Whether browser tracing is enabled (admin only, defaults to true)
|
|
1505
1525
|
*/
|
|
1506
1526
|
tracingEnabled?: boolean;
|
|
1527
|
+
/**
|
|
1528
|
+
* Optional custom prefix for the agent's inbox email address. If set, the inbox will be {prefix}@agentmail.asteroid.ai.
|
|
1529
|
+
*/
|
|
1530
|
+
inboxEmailPrefix?: string;
|
|
1507
1531
|
/**
|
|
1508
1532
|
* Initial credentials to create with the profile
|
|
1509
1533
|
*/
|
|
@@ -1678,6 +1702,10 @@ type AgentsProfileUpdateAgentProfileRequest = {
|
|
|
1678
1702
|
* Whether browser tracing is enabled (admin only)
|
|
1679
1703
|
*/
|
|
1680
1704
|
tracingEnabled?: boolean;
|
|
1705
|
+
/**
|
|
1706
|
+
* Optional custom prefix for the agent's inbox email address. If set, the inbox will be {prefix}@agentmail.asteroid.ai.
|
|
1707
|
+
*/
|
|
1708
|
+
inboxEmailPrefix?: string;
|
|
1681
1709
|
/**
|
|
1682
1710
|
* Credentials to add to the profile
|
|
1683
1711
|
*/
|
|
@@ -2951,6 +2979,45 @@ type ExecutionContextFilesUploadResponses = {
|
|
|
2951
2979
|
200: 'Files uploaded.';
|
|
2952
2980
|
};
|
|
2953
2981
|
type ExecutionContextFilesUploadResponse = ExecutionContextFilesUploadResponses[keyof ExecutionContextFilesUploadResponses];
|
|
2982
|
+
type ExecutionRecordingRedirectData = {
|
|
2983
|
+
body?: never;
|
|
2984
|
+
path: {
|
|
2985
|
+
/**
|
|
2986
|
+
* The unique identifier of the execution
|
|
2987
|
+
*/
|
|
2988
|
+
executionId: CommonUuid;
|
|
2989
|
+
};
|
|
2990
|
+
query?: {
|
|
2991
|
+
/**
|
|
2992
|
+
* Optional token for authentication. Use this when the client cannot set Authorization headers (e.g., native video elements).
|
|
2993
|
+
*/
|
|
2994
|
+
token?: string;
|
|
2995
|
+
};
|
|
2996
|
+
url: '/executions/{executionId}/recording';
|
|
2997
|
+
};
|
|
2998
|
+
type ExecutionRecordingRedirectErrors = {
|
|
2999
|
+
/**
|
|
3000
|
+
* The server could not understand the request due to invalid syntax.
|
|
3001
|
+
*/
|
|
3002
|
+
400: CommonBadRequestErrorBody;
|
|
3003
|
+
/**
|
|
3004
|
+
* Access is unauthorized.
|
|
3005
|
+
*/
|
|
3006
|
+
401: CommonUnauthorizedErrorBody;
|
|
3007
|
+
/**
|
|
3008
|
+
* Access is forbidden.
|
|
3009
|
+
*/
|
|
3010
|
+
403: CommonForbiddenErrorBody;
|
|
3011
|
+
/**
|
|
3012
|
+
* The server cannot find the requested resource.
|
|
3013
|
+
*/
|
|
3014
|
+
404: CommonNotFoundErrorBody;
|
|
3015
|
+
/**
|
|
3016
|
+
* Server error
|
|
3017
|
+
*/
|
|
3018
|
+
500: CommonInternalServerErrorBody;
|
|
3019
|
+
};
|
|
3020
|
+
type ExecutionRecordingRedirectError = ExecutionRecordingRedirectErrors[keyof ExecutionRecordingRedirectErrors];
|
|
2954
3021
|
type ExecutionStatusUpdateData = {
|
|
2955
3022
|
/**
|
|
2956
3023
|
* The status update request
|
|
@@ -3261,6 +3328,12 @@ declare const executionContextFilesGet: <ThrowOnError extends boolean = false>(o
|
|
|
3261
3328
|
* Upload files to a running execution that is already in progress. If you want to attach files to an execution that is not yet running, see the /temp-files endpoint.
|
|
3262
3329
|
*/
|
|
3263
3330
|
declare const executionContextFilesUpload: <ThrowOnError extends boolean = false>(options: Options<ExecutionContextFilesUploadData, ThrowOnError>) => RequestResult<ExecutionContextFilesUploadResponses, ExecutionContextFilesUploadErrors, ThrowOnError, "fields">;
|
|
3331
|
+
/**
|
|
3332
|
+
* Get recording redirect
|
|
3333
|
+
*
|
|
3334
|
+
* Redirect to the recording playback URL. Returns a 307 with a short-lived signed URL. Embed this endpoint in <video> tags — the player will follow the redirect and re-fetch on expiry.
|
|
3335
|
+
*/
|
|
3336
|
+
declare const executionRecordingRedirect: <ThrowOnError extends boolean = false>(options: Options<ExecutionRecordingRedirectData, ThrowOnError>) => RequestResult<unknown, ExecutionRecordingRedirectErrors, ThrowOnError, "fields">;
|
|
3264
3337
|
/**
|
|
3265
3338
|
* Update execution status
|
|
3266
3339
|
*
|
|
@@ -3286,4 +3359,4 @@ declare const schemaValidationValidate: <ThrowOnError extends boolean = false>(o
|
|
|
3286
3359
|
*/
|
|
3287
3360
|
declare const tempFilesStage: <ThrowOnError extends boolean = false>(options: Options<TempFilesStageData, ThrowOnError>) => RequestResult<TempFilesStageResponses, TempFilesStageErrors, ThrowOnError, "fields">;
|
|
3288
3361
|
|
|
3289
|
-
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 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 AgentsProfileAgentProfile, type AgentsProfileCookie, type AgentsProfileCountryCode, type AgentsProfileCreateAgentProfileRequest, type AgentsProfileCredential, type AgentsProfileCredentialUpdate, type AgentsProfileCustomProxyConfigInput, type AgentsProfileCustomProxyConfigOutput, type AgentsProfileDuplicateAgentProfileRequest, type AgentsProfileOperatingSystem, type AgentsProfileProxyMode, type AgentsProfileProxyType, type AgentsProfileSameSite, type AgentsProfileSearch, type AgentsProfileSortField, 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 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, agentProfileUpdate, agentProfilesCreate, agentProfilesList, agentWorkflowsCreate, agentWorkflowsExecute, agentWorkflowsGet, agentWorkflowsList, agentWorkflowsPublish, agentWorkflowsSyncExecution, client, docsSearchSearch, executionActivitiesGet, executionContextFilesGet, executionContextFilesUpload, executionGet, executionStatusUpdate, executionUserMessagesAdd, executionsList, schemaValidationValidate, tempFilesStage };
|
|
3362
|
+
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 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 AgentsProfileAgentProfile, type AgentsProfileCookie, type AgentsProfileCountryCode, type AgentsProfileCreateAgentProfileRequest, type AgentsProfileCredential, type AgentsProfileCredentialUpdate, type AgentsProfileCustomProxyConfigInput, type AgentsProfileCustomProxyConfigOutput, type AgentsProfileDuplicateAgentProfileRequest, type AgentsProfileOperatingSystem, type AgentsProfileProxyMode, type AgentsProfileProxyType, type AgentsProfileSameSite, type AgentsProfileSearch, type AgentsProfileSortField, 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, agentProfileUpdate, agentProfilesCreate, agentProfilesList, agentWorkflowsCreate, agentWorkflowsExecute, agentWorkflowsGet, agentWorkflowsList, agentWorkflowsPublish, agentWorkflowsSyncExecution, client, docsSearchSearch, executionActivitiesGet, executionContextFilesGet, executionContextFilesUpload, executionGet, executionRecordingRedirect, executionStatusUpdate, executionUserMessagesAdd, executionsList, schemaValidationValidate, tempFilesStage };
|
package/dist/index.d.ts
CHANGED
|
@@ -836,11 +836,23 @@ type AgentsExecutionListItem = {
|
|
|
836
836
|
[key: string]: unknown;
|
|
837
837
|
};
|
|
838
838
|
/**
|
|
839
|
-
*
|
|
839
|
+
* Recording URL for playback (if an environment was used and execution is terminal)
|
|
840
|
+
*/
|
|
841
|
+
recordingUrl?: string;
|
|
842
|
+
/**
|
|
843
|
+
* Live view URL for debugging (if an environment is active and execution is running)
|
|
844
|
+
*/
|
|
845
|
+
liveViewUrl?: string;
|
|
846
|
+
/**
|
|
847
|
+
* Deprecated: Use 'recordingUrl' instead.
|
|
848
|
+
*
|
|
849
|
+
* @deprecated
|
|
840
850
|
*/
|
|
841
851
|
browserRecordingUrl?: string;
|
|
842
852
|
/**
|
|
843
|
-
*
|
|
853
|
+
* Deprecated: Use 'liveViewUrl' instead.
|
|
854
|
+
*
|
|
855
|
+
* @deprecated
|
|
844
856
|
*/
|
|
845
857
|
browserLiveViewUrl?: string;
|
|
846
858
|
/**
|
|
@@ -1358,6 +1370,14 @@ type AgentsProfileAgentProfile = {
|
|
|
1358
1370
|
* Whether browser tracing is enabled (admin only)
|
|
1359
1371
|
*/
|
|
1360
1372
|
tracingEnabled: boolean;
|
|
1373
|
+
/**
|
|
1374
|
+
* Optional custom prefix for the agent's inbox email address. If set, the inbox will be {prefix}@agentmail.asteroid.ai. If not set, defaults to the first 8 characters of the profile ID.
|
|
1375
|
+
*/
|
|
1376
|
+
inboxEmailPrefix?: string;
|
|
1377
|
+
/**
|
|
1378
|
+
* The resolved inbox email address for this profile
|
|
1379
|
+
*/
|
|
1380
|
+
inboxEmail: string;
|
|
1361
1381
|
/**
|
|
1362
1382
|
* List of credentials associated with this profile
|
|
1363
1383
|
*/
|
|
@@ -1504,6 +1524,10 @@ type AgentsProfileCreateAgentProfileRequest = {
|
|
|
1504
1524
|
* Whether browser tracing is enabled (admin only, defaults to true)
|
|
1505
1525
|
*/
|
|
1506
1526
|
tracingEnabled?: boolean;
|
|
1527
|
+
/**
|
|
1528
|
+
* Optional custom prefix for the agent's inbox email address. If set, the inbox will be {prefix}@agentmail.asteroid.ai.
|
|
1529
|
+
*/
|
|
1530
|
+
inboxEmailPrefix?: string;
|
|
1507
1531
|
/**
|
|
1508
1532
|
* Initial credentials to create with the profile
|
|
1509
1533
|
*/
|
|
@@ -1678,6 +1702,10 @@ type AgentsProfileUpdateAgentProfileRequest = {
|
|
|
1678
1702
|
* Whether browser tracing is enabled (admin only)
|
|
1679
1703
|
*/
|
|
1680
1704
|
tracingEnabled?: boolean;
|
|
1705
|
+
/**
|
|
1706
|
+
* Optional custom prefix for the agent's inbox email address. If set, the inbox will be {prefix}@agentmail.asteroid.ai.
|
|
1707
|
+
*/
|
|
1708
|
+
inboxEmailPrefix?: string;
|
|
1681
1709
|
/**
|
|
1682
1710
|
* Credentials to add to the profile
|
|
1683
1711
|
*/
|
|
@@ -2951,6 +2979,45 @@ type ExecutionContextFilesUploadResponses = {
|
|
|
2951
2979
|
200: 'Files uploaded.';
|
|
2952
2980
|
};
|
|
2953
2981
|
type ExecutionContextFilesUploadResponse = ExecutionContextFilesUploadResponses[keyof ExecutionContextFilesUploadResponses];
|
|
2982
|
+
type ExecutionRecordingRedirectData = {
|
|
2983
|
+
body?: never;
|
|
2984
|
+
path: {
|
|
2985
|
+
/**
|
|
2986
|
+
* The unique identifier of the execution
|
|
2987
|
+
*/
|
|
2988
|
+
executionId: CommonUuid;
|
|
2989
|
+
};
|
|
2990
|
+
query?: {
|
|
2991
|
+
/**
|
|
2992
|
+
* Optional token for authentication. Use this when the client cannot set Authorization headers (e.g., native video elements).
|
|
2993
|
+
*/
|
|
2994
|
+
token?: string;
|
|
2995
|
+
};
|
|
2996
|
+
url: '/executions/{executionId}/recording';
|
|
2997
|
+
};
|
|
2998
|
+
type ExecutionRecordingRedirectErrors = {
|
|
2999
|
+
/**
|
|
3000
|
+
* The server could not understand the request due to invalid syntax.
|
|
3001
|
+
*/
|
|
3002
|
+
400: CommonBadRequestErrorBody;
|
|
3003
|
+
/**
|
|
3004
|
+
* Access is unauthorized.
|
|
3005
|
+
*/
|
|
3006
|
+
401: CommonUnauthorizedErrorBody;
|
|
3007
|
+
/**
|
|
3008
|
+
* Access is forbidden.
|
|
3009
|
+
*/
|
|
3010
|
+
403: CommonForbiddenErrorBody;
|
|
3011
|
+
/**
|
|
3012
|
+
* The server cannot find the requested resource.
|
|
3013
|
+
*/
|
|
3014
|
+
404: CommonNotFoundErrorBody;
|
|
3015
|
+
/**
|
|
3016
|
+
* Server error
|
|
3017
|
+
*/
|
|
3018
|
+
500: CommonInternalServerErrorBody;
|
|
3019
|
+
};
|
|
3020
|
+
type ExecutionRecordingRedirectError = ExecutionRecordingRedirectErrors[keyof ExecutionRecordingRedirectErrors];
|
|
2954
3021
|
type ExecutionStatusUpdateData = {
|
|
2955
3022
|
/**
|
|
2956
3023
|
* The status update request
|
|
@@ -3261,6 +3328,12 @@ declare const executionContextFilesGet: <ThrowOnError extends boolean = false>(o
|
|
|
3261
3328
|
* Upload files to a running execution that is already in progress. If you want to attach files to an execution that is not yet running, see the /temp-files endpoint.
|
|
3262
3329
|
*/
|
|
3263
3330
|
declare const executionContextFilesUpload: <ThrowOnError extends boolean = false>(options: Options<ExecutionContextFilesUploadData, ThrowOnError>) => RequestResult<ExecutionContextFilesUploadResponses, ExecutionContextFilesUploadErrors, ThrowOnError, "fields">;
|
|
3331
|
+
/**
|
|
3332
|
+
* Get recording redirect
|
|
3333
|
+
*
|
|
3334
|
+
* Redirect to the recording playback URL. Returns a 307 with a short-lived signed URL. Embed this endpoint in <video> tags — the player will follow the redirect and re-fetch on expiry.
|
|
3335
|
+
*/
|
|
3336
|
+
declare const executionRecordingRedirect: <ThrowOnError extends boolean = false>(options: Options<ExecutionRecordingRedirectData, ThrowOnError>) => RequestResult<unknown, ExecutionRecordingRedirectErrors, ThrowOnError, "fields">;
|
|
3264
3337
|
/**
|
|
3265
3338
|
* Update execution status
|
|
3266
3339
|
*
|
|
@@ -3286,4 +3359,4 @@ declare const schemaValidationValidate: <ThrowOnError extends boolean = false>(o
|
|
|
3286
3359
|
*/
|
|
3287
3360
|
declare const tempFilesStage: <ThrowOnError extends boolean = false>(options: Options<TempFilesStageData, ThrowOnError>) => RequestResult<TempFilesStageResponses, TempFilesStageErrors, ThrowOnError, "fields">;
|
|
3288
3361
|
|
|
3289
|
-
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 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 AgentsProfileAgentProfile, type AgentsProfileCookie, type AgentsProfileCountryCode, type AgentsProfileCreateAgentProfileRequest, type AgentsProfileCredential, type AgentsProfileCredentialUpdate, type AgentsProfileCustomProxyConfigInput, type AgentsProfileCustomProxyConfigOutput, type AgentsProfileDuplicateAgentProfileRequest, type AgentsProfileOperatingSystem, type AgentsProfileProxyMode, type AgentsProfileProxyType, type AgentsProfileSameSite, type AgentsProfileSearch, type AgentsProfileSortField, 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 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, agentProfileUpdate, agentProfilesCreate, agentProfilesList, agentWorkflowsCreate, agentWorkflowsExecute, agentWorkflowsGet, agentWorkflowsList, agentWorkflowsPublish, agentWorkflowsSyncExecution, client, docsSearchSearch, executionActivitiesGet, executionContextFilesGet, executionContextFilesUpload, executionGet, executionStatusUpdate, executionUserMessagesAdd, executionsList, schemaValidationValidate, tempFilesStage };
|
|
3362
|
+
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 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 AgentsProfileAgentProfile, type AgentsProfileCookie, type AgentsProfileCountryCode, type AgentsProfileCreateAgentProfileRequest, type AgentsProfileCredential, type AgentsProfileCredentialUpdate, type AgentsProfileCustomProxyConfigInput, type AgentsProfileCustomProxyConfigOutput, type AgentsProfileDuplicateAgentProfileRequest, type AgentsProfileOperatingSystem, type AgentsProfileProxyMode, type AgentsProfileProxyType, type AgentsProfileSameSite, type AgentsProfileSearch, type AgentsProfileSortField, 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, agentProfileUpdate, agentProfilesCreate, agentProfilesList, agentWorkflowsCreate, agentWorkflowsExecute, agentWorkflowsGet, agentWorkflowsList, agentWorkflowsPublish, agentWorkflowsSyncExecution, client, 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 G={bodySerializer:e=>{let t=new FormData;return Object.entries(e).forEach(([r,
|
|
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 G={bodySerializer:e=>{let t=new FormData;return Object.entries(e).forEach(([r,n])=>{n!=null&&(Array.isArray(n)?n.forEach(s=>V(t,r,s)):V(t,r,n));}),t}},I={bodySerializer:e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)};var H=({onRequest:e,onSseError:t,onSseEvent:r,responseTransformer:n,responseValidator:s,sseDefaultRetryDelay:c,sseMaxRetryAttempts:a,sseMaxRetryDelay:i,sseSleepFn:l,url:d,...o})=>{let A,C=l??(u=>new Promise(E=>setTimeout(E,u)));return {stream:async function*(){let u=c??3e3,E=0,w=o.signal??new AbortController().signal;for(;!w.aborted;){E++;let O=o.headers instanceof Headers?o.headers:new Headers(o.headers);A!==void 0&&O.set("Last-Event-ID",A);try{let S={redirect:"follow",...o,body:o.serializedBody,headers:O,signal:w},m=new Request(d,S);e&&(m=await e(d,S));let f=await(o.fetch??globalThis.fetch)(m);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(),T="",j=()=>{try{y.cancel();}catch{}};w.addEventListener("abort",j);try{for(;;){let{done:ee,value:te}=await y.read();if(ee)break;T+=te,T=T.replace(/\r\n/g,`
|
|
2
2
|
`).replace(/\r/g,`
|
|
3
3
|
`);let B=T.split(`
|
|
4
4
|
|
|
5
5
|
`);T=B.pop()??"";for(let re of B){let oe=re.split(`
|
|
6
|
-
`),W=[],M;for(let h of oe)if(h.startsWith("data:"))W.push(h.replace(/^data:\s*/,""));else if(h.startsWith("event:"))M=h.replace(/^event:\s*/,"");else if(h.startsWith("id:"))A=h.replace(/^id:\s*/,"");else if(h.startsWith("retry:")){let N=Number.parseInt(h.replace(/^retry:\s*/,""),10);Number.isNaN(N)||(u=N);}let
|
|
7
|
-
`);try{P=JSON.parse(h),K=!0;}catch{P=h;}}K&&(n&&await n(P),s&&(P=await s(P))),r?.({data:P,event:M,id:A,retry:u}),W.length&&(yield P);}}}finally{w.removeEventListener("abort",j),E.releaseLock();}break}catch(S){if(t?.(S),a!==void 0&&y>=a)break;let m=Math.min(u*2**(y-1),i??3e4);await C(m);}}}()}};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 c=se(s),a=n.map(i=>s==="label"||s==="simple"?e?i:encodeURIComponent(i):R({allowReserved:e,name:r,value:i})).join(c);return s==="label"||s==="matrix"?c+a:a},R=({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:c})=>{if(n instanceof Date)return c?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])=>R({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 c=false,a=n.substring(1,n.length-1),i="simple";a.endsWith("*")&&(c=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:c,name:a,style:i,value:l}));continue}if(typeof l=="object"){r=r.replace(n,q({explode:c,name:a,style:i,value:l,valueOnly:true}));continue}if(i==="matrix"){r=r.replace(n,`;${R({name:a,value:l})}`);continue}let d=encodeURIComponent(i==="label"?`.${l}`:l);r=r.replace(n,d);}return r},$=({baseUrl:e,path:t,query:r,querySerializer:s,url:n})=>{let c=n.startsWith("/")?n:`/${n}`,a=(e??"")+c;t&&(a=le({path:t,url:a}));let i=r?s(r):"";return i.startsWith("?")&&(i=i.substring(1)),i&&(a+=`?${i}`),a};function X(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 c in s){let a=s[c];if(a==null)continue;let i=e[c]||t;if(Array.isArray(a)){let l=U({allowReserved:i.allowReserved,explode:true,name:c,style:"form",value:a,...i.array});l&&n.push(l);}else if(typeof a=="object"){let l=q({allowReserved:i.allowReserved,explode:true,name:c,style:"deepObject",value:a,...i.object});l&&n.push(l);}else {let l=R({allowReserved:i.allowReserved,name:c,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=>$({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:J(e.querySerializer),url:e.url}),L=(e,t)=>{let r={...e,...t};return r.baseUrl?.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=z(e.headers,t.headers),r},pe=e=>{let t=[];return e.forEach((r,s)=>{t.push([s,r]);}),t},z=(...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,c]of s)if(c===null)t.delete(n);else if(Array.isArray(c))for(let a of c)t.append(n,a);else c!==void 0&&t.set(n,typeof c=="object"?JSON.stringify(c):c);}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}),ue=J({allowReserved:false,array:{explode:true,style:"form"},object:{explode:true,style:"deepObject"}}),de={"Content-Type":"application/json"},b=(e={})=>({...I,headers:de,parseAs:"auto",querySerializer:ue,...e});var F=(e={})=>{let t=L(b(),e),r=()=>({...t}),s=d=>(t=L(t,d),r()),n=Z(),c=async d=>{let o={...t,...d,fetch:d.fetch??t.fetch??globalThis.fetch,headers:z(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=v(o);return {opts:o,url:A}},a=async d=>{let{opts:o,url:A}=await c(d),C={redirect:"follow",...o,body:X(o)},x=new Request(A,C);for(let g of n.request.fns)g&&(x=await g(x,o));let k=o.fetch,u;try{u=await k(x);}catch(g){let f=g;for(let E of n.error.fns)E&&(f=await E(g,void 0,x,o));if(f=f||{},o.throwOnError)throw f;return o.responseStyle==="data"?void 0:{error:f,request:x,response:void 0}}for(let g of n.response.fns)g&&(u=await g(u,x,o));let y={request:x,response:u};if(u.ok){let g=(o.parseAs==="auto"?_(u.headers.get("Content-Type")):o.parseAs)??"json";if(u.status===204||u.headers.get("Content-Length")==="0"){let E;switch(g){case "arrayBuffer":case "blob":case "text":E=await u[g]();break;case "formData":E=new FormData;break;case "stream":E=u.body;break;default:E={};break}return o.responseStyle==="data"?E:{data:E,...y}}let f;switch(g){case "arrayBuffer":case "blob":case "formData":case "json":case "text":f=await u[g]();break;case "stream":return o.responseStyle==="data"?u.body:{data:u.body,...y}}return g==="json"&&(o.responseValidator&&await o.responseValidator(f),o.responseTransformer&&(f=await o.responseTransformer(f))),o.responseStyle==="data"?f:{data:f,...y}}let w=await u.text(),O;try{O=JSON.parse(w);}catch{}let S=O??w,m=S;for(let g of n.error.fns)g&&(m=await g(S,u,x,o));if(m=m||{},o.throwOnError)throw m;return o.responseStyle==="data"?void 0:{error:m,...y}},i=d=>o=>a({...o,method:d}),l=d=>async o=>{let{opts:A,url:C}=await c(o);return H({...A,body:A.body,headers:A.headers,method:d,onRequest:async(x,k)=>{let u=new Request(x,k);for(let y of n.request.fns)y&&(u=await y(u,A));return u},url:C})};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 p=F(b({baseUrl:"https://odyssey.asteroid.ai/agents/v2"}));var ge=e=>(e?.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e}),fe=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(e.client??p).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),ye=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),Ee=e=>(e.client??p).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e.client??p).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/clear-browser-cache",...e}),he=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/duplicate",...e,headers:{"Content-Type":"application/json",...e.headers}}),me=e=>(e?.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e}),we=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e}),Pe=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e,headers:{"Content-Type":"application/json",...e.headers}}),Re=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}",...e}),Ce=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/publish",...e}),Te=e=>(e.client??p).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}}),De=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/docs/search",...e,headers:{"Content-Type":"application/json",...e.headers}}),be=e=>(e?.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions",...e}),ke=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}",...e}),We=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/activities",...e}),Ge=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e}),Ue=e=>(e.client??p).post({...G,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e,headers:{"Content-Type":null,...e.headers}}),qe=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/status",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/user-messages",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ie=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/schema/validate",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(e.client??p).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=we;exports.agentList=me;exports.agentProfileClearBrowserCache=xe;exports.agentProfileDelete=Ae;exports.agentProfileDuplicate=he;exports.agentProfileGet=
|
|
6
|
+
`),W=[],M;for(let h of oe)if(h.startsWith("data:"))W.push(h.replace(/^data:\s*/,""));else if(h.startsWith("event:"))M=h.replace(/^event:\s*/,"");else if(h.startsWith("id:"))A=h.replace(/^id:\s*/,"");else if(h.startsWith("retry:")){let N=Number.parseInt(h.replace(/^retry:\s*/,""),10);Number.isNaN(N)||(u=N);}let R,K=!1;if(W.length){let h=W.join(`
|
|
7
|
+
`);try{R=JSON.parse(h),K=!0;}catch{R=h;}}K&&(s&&await s(R),n&&(R=await n(R))),r?.({data:R,event:M,id:A,retry:u}),W.length&&(yield R);}}}finally{w.removeEventListener("abort",j),y.releaseLock();}break}catch(S){if(t?.(S),a!==void 0&&E>=a)break;let m=Math.min(u*2**(E-1),i??3e4);await C(m);}}}()}};var ne=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},se=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:n,value:s})=>{if(!t){let i=(e?s:s.map(l=>encodeURIComponent(l))).join(se(n));switch(n){case "label":return `.${i}`;case "matrix":return `;${r}=${i}`;case "simple":return i;default:return `${r}=${i}`}}let c=ne(n),a=s.map(i=>n==="label"||n==="simple"?e?i:encodeURIComponent(i):P({allowReserved:e,name:r,value:i})).join(c);return n==="label"||n==="matrix"?c+a:a},P=({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:n,value:s,valueOnly:c})=>{if(s instanceof Date)return c?s.toISOString():`${r}=${s.toISOString()}`;if(n!=="deepObject"&&!t){let l=[];Object.entries(s).forEach(([o,A])=>{l=[...l,o,e?A:encodeURIComponent(A)];});let d=l.join(",");switch(n){case "form":return `${r}=${d}`;case "label":return `.${d}`;case "matrix":return `;${r}=${d}`;default:return d}}let a=ie(n),i=Object.entries(s).map(([l,d])=>P({allowReserved:e,name:n==="deepObject"?`${r}[${l}]`:l,value:d})).join(a);return n==="label"||n==="matrix"?a+i:i};var ae=/\{[^{}]+\}/g,le=({path:e,url:t})=>{let r=t,n=t.match(ae);if(n)for(let s of n){let c=false,a=s.substring(1,s.length-1),i="simple";a.endsWith("*")&&(c=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(s,U({explode:c,name:a,style:i,value:l}));continue}if(typeof l=="object"){r=r.replace(s,q({explode:c,name:a,style:i,value:l,valueOnly:true}));continue}if(i==="matrix"){r=r.replace(s,`;${P({name:a,value:l})}`);continue}let d=encodeURIComponent(i==="label"?`.${l}`:l);r=r.replace(s,d);}return r},$=({baseUrl:e,path:t,query:r,querySerializer:n,url:s})=>{let c=s.startsWith("/")?s:`/${s}`,a=(e??"")+c;t&&(a=le({path:t,url:a}));let i=r?n(r):"";return i.startsWith("?")&&(i=i.substring(1)),i&&(a+=`?${i}`),a};function X(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}={})=>n=>{let s=[];if(n&&typeof n=="object")for(let c in n){let a=n[c];if(a==null)continue;let i=e[c]||t;if(Array.isArray(a)){let l=U({allowReserved:i.allowReserved,explode:true,name:c,style:"form",value:a,...i.array});l&&s.push(l);}else if(typeof a=="object"){let l=q({allowReserved:i.allowReserved,explode:true,name:c,style:"deepObject",value:a,...i.object});l&&s.push(l);}else {let l=P({allowReserved:i.allowReserved,name:c,value:a});l&&s.push(l);}}return s.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 n=await Q(r,t.auth);if(!n)continue;let s=r.name??"Authorization";switch(r.in){case "query":t.query||(t.query={}),t.query[s]=n;break;case "cookie":t.headers.append("Cookie",`${s}=${n}`);break;default:t.headers.set(s,n);break}}},v=e=>$({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:J(e.querySerializer),url:e.url}),L=(e,t)=>{let r={...e,...t};return r.baseUrl?.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=z(e.headers,t.headers),r},pe=e=>{let t=[];return e.forEach((r,n)=>{t.push([n,r]);}),t},z=(...e)=>{let t=new Headers;for(let r of e){if(!r)continue;let n=r instanceof Headers?pe(r):Object.entries(r);for(let[s,c]of n)if(c===null)t.delete(s);else if(Array.isArray(c))for(let a of c)t.append(s,a);else c!==void 0&&t.set(s,typeof c=="object"?JSON.stringify(c):c);}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 n=this.getInterceptorIndex(t);return this.fns[n]?(this.fns[n]=r,t):false}use(t){return this.fns.push(t),this.fns.length-1}},Z=()=>({error:new D,request:new D,response:new D}),ue=J({allowReserved:false,array:{explode:true,style:"form"},object:{explode:true,style:"deepObject"}}),de={"Content-Type":"application/json"},b=(e={})=>({...I,headers:de,parseAs:"auto",querySerializer:ue,...e});var F=(e={})=>{let t=L(b(),e),r=()=>({...t}),n=d=>(t=L(t,d),r()),s=Z(),c=async d=>{let o={...t,...d,fetch:d.fetch??t.fetch??globalThis.fetch,headers:z(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=v(o);return {opts:o,url:A}},a=async d=>{let{opts:o,url:A}=await c(d),C={redirect:"follow",...o,body:X(o)},x=new Request(A,C);for(let g of s.request.fns)g&&(x=await g(x,o));let k=o.fetch,u;try{u=await k(x);}catch(g){let f=g;for(let y of s.error.fns)y&&(f=await y(g,void 0,x,o));if(f=f||{},o.throwOnError)throw f;return o.responseStyle==="data"?void 0:{error:f,request:x,response:void 0}}for(let g of s.response.fns)g&&(u=await g(u,x,o));let E={request:x,response:u};if(u.ok){let g=(o.parseAs==="auto"?_(u.headers.get("Content-Type")):o.parseAs)??"json";if(u.status===204||u.headers.get("Content-Length")==="0"){let y;switch(g){case "arrayBuffer":case "blob":case "text":y=await u[g]();break;case "formData":y=new FormData;break;case "stream":y=u.body;break;default:y={};break}return o.responseStyle==="data"?y:{data:y,...E}}let f;switch(g){case "arrayBuffer":case "blob":case "formData":case "json":case "text":f=await u[g]();break;case "stream":return o.responseStyle==="data"?u.body:{data:u.body,...E}}return g==="json"&&(o.responseValidator&&await o.responseValidator(f),o.responseTransformer&&(f=await o.responseTransformer(f))),o.responseStyle==="data"?f:{data:f,...E}}let w=await u.text(),O;try{O=JSON.parse(w);}catch{}let S=O??w,m=S;for(let g of s.error.fns)g&&(m=await g(S,u,x,o));if(m=m||{},o.throwOnError)throw m;return o.responseStyle==="data"?void 0:{error:m,...E}},i=d=>o=>a({...o,method:d}),l=d=>async o=>{let{opts:A,url:C}=await c(o);return H({...A,body:A.body,headers:A.headers,method:d,onRequest:async(x,k)=>{let u=new Request(x,k);for(let E of s.request.fns)E&&(u=await E(u,A));return u},url:C})};return {buildUrl:v,connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:r,head:i("HEAD"),interceptors:s,options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),request:a,setConfig:n,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 p=F(b({baseUrl:"https://odyssey.asteroid.ai/agents/v2"}));var ge=e=>(e?.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e}),fe=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(e.client??p).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),Ee=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),ye=e=>(e.client??p).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e.client??p).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/clear-browser-cache",...e}),he=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/duplicate",...e,headers:{"Content-Type":"application/json",...e.headers}}),me=e=>(e?.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e}),we=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e}),Re=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}",...e}),Ce=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/publish",...e}),Te=e=>(e.client??p).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}}),De=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/docs/search",...e,headers:{"Content-Type":"application/json",...e.headers}}),be=e=>(e?.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions",...e}),ke=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}",...e}),We=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/activities",...e}),Ge=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e}),Ue=e=>(e.client??p).post({...G,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e,headers:{"Content-Type":null,...e.headers}}),qe=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/recording",...e}),ze=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/status",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ie=e=>(e.client??p).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??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/schema/validate",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(e.client??p).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=we;exports.agentList=me;exports.agentProfileClearBrowserCache=xe;exports.agentProfileDelete=Ae;exports.agentProfileDuplicate=he;exports.agentProfileGet=Ee;exports.agentProfileUpdate=ye;exports.agentProfilesCreate=fe;exports.agentProfilesList=ge;exports.agentWorkflowsCreate=Re;exports.agentWorkflowsExecute=Ce;exports.agentWorkflowsGet=Pe;exports.agentWorkflowsList=Se;exports.agentWorkflowsPublish=Oe;exports.agentWorkflowsSyncExecution=Te;exports.client=p;exports.docsSearchSearch=De;exports.executionActivitiesGet=We;exports.executionContextFilesGet=Ge;exports.executionContextFilesUpload=Ue;exports.executionGet=ke;exports.executionRecordingRedirect=qe;exports.executionStatusUpdate=ze;exports.executionUserMessagesAdd=Ie;exports.executionsList=be;exports.schemaValidationValidate=ve;exports.tempFilesStage=Le;
|
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 G={bodySerializer:e=>{let t=new FormData;return Object.entries(e).forEach(([r,
|
|
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 G={bodySerializer:e=>{let t=new FormData;return Object.entries(e).forEach(([r,n])=>{n!=null&&(Array.isArray(n)?n.forEach(s=>V(t,r,s)):V(t,r,n));}),t}},I={bodySerializer:e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)};var H=({onRequest:e,onSseError:t,onSseEvent:r,responseTransformer:n,responseValidator:s,sseDefaultRetryDelay:c,sseMaxRetryAttempts:a,sseMaxRetryDelay:i,sseSleepFn:l,url:d,...o})=>{let A,C=l??(u=>new Promise(E=>setTimeout(E,u)));return {stream:async function*(){let u=c??3e3,E=0,w=o.signal??new AbortController().signal;for(;!w.aborted;){E++;let O=o.headers instanceof Headers?o.headers:new Headers(o.headers);A!==void 0&&O.set("Last-Event-ID",A);try{let S={redirect:"follow",...o,body:o.serializedBody,headers:O,signal:w},m=new Request(d,S);e&&(m=await e(d,S));let f=await(o.fetch??globalThis.fetch)(m);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(),T="",j=()=>{try{y.cancel();}catch{}};w.addEventListener("abort",j);try{for(;;){let{done:ee,value:te}=await y.read();if(ee)break;T+=te,T=T.replace(/\r\n/g,`
|
|
2
2
|
`).replace(/\r/g,`
|
|
3
3
|
`);let B=T.split(`
|
|
4
4
|
|
|
5
5
|
`);T=B.pop()??"";for(let re of B){let oe=re.split(`
|
|
6
|
-
`),W=[],M;for(let h of oe)if(h.startsWith("data:"))W.push(h.replace(/^data:\s*/,""));else if(h.startsWith("event:"))M=h.replace(/^event:\s*/,"");else if(h.startsWith("id:"))A=h.replace(/^id:\s*/,"");else if(h.startsWith("retry:")){let N=Number.parseInt(h.replace(/^retry:\s*/,""),10);Number.isNaN(N)||(u=N);}let
|
|
7
|
-
`);try{P=JSON.parse(h),K=!0;}catch{P=h;}}K&&(n&&await n(P),s&&(P=await s(P))),r?.({data:P,event:M,id:A,retry:u}),W.length&&(yield P);}}}finally{w.removeEventListener("abort",j),E.releaseLock();}break}catch(S){if(t?.(S),a!==void 0&&y>=a)break;let m=Math.min(u*2**(y-1),i??3e4);await C(m);}}}()}};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 c=se(s),a=n.map(i=>s==="label"||s==="simple"?e?i:encodeURIComponent(i):R({allowReserved:e,name:r,value:i})).join(c);return s==="label"||s==="matrix"?c+a:a},R=({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:c})=>{if(n instanceof Date)return c?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])=>R({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 c=false,a=n.substring(1,n.length-1),i="simple";a.endsWith("*")&&(c=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:c,name:a,style:i,value:l}));continue}if(typeof l=="object"){r=r.replace(n,q({explode:c,name:a,style:i,value:l,valueOnly:true}));continue}if(i==="matrix"){r=r.replace(n,`;${R({name:a,value:l})}`);continue}let d=encodeURIComponent(i==="label"?`.${l}`:l);r=r.replace(n,d);}return r},$=({baseUrl:e,path:t,query:r,querySerializer:s,url:n})=>{let c=n.startsWith("/")?n:`/${n}`,a=(e??"")+c;t&&(a=le({path:t,url:a}));let i=r?s(r):"";return i.startsWith("?")&&(i=i.substring(1)),i&&(a+=`?${i}`),a};function X(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 c in s){let a=s[c];if(a==null)continue;let i=e[c]||t;if(Array.isArray(a)){let l=U({allowReserved:i.allowReserved,explode:true,name:c,style:"form",value:a,...i.array});l&&n.push(l);}else if(typeof a=="object"){let l=q({allowReserved:i.allowReserved,explode:true,name:c,style:"deepObject",value:a,...i.object});l&&n.push(l);}else {let l=R({allowReserved:i.allowReserved,name:c,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=>$({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:J(e.querySerializer),url:e.url}),L=(e,t)=>{let r={...e,...t};return r.baseUrl?.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=z(e.headers,t.headers),r},pe=e=>{let t=[];return e.forEach((r,s)=>{t.push([s,r]);}),t},z=(...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,c]of s)if(c===null)t.delete(n);else if(Array.isArray(c))for(let a of c)t.append(n,a);else c!==void 0&&t.set(n,typeof c=="object"?JSON.stringify(c):c);}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}),ue=J({allowReserved:false,array:{explode:true,style:"form"},object:{explode:true,style:"deepObject"}}),de={"Content-Type":"application/json"},b=(e={})=>({...I,headers:de,parseAs:"auto",querySerializer:ue,...e});var F=(e={})=>{let t=L(b(),e),r=()=>({...t}),s=d=>(t=L(t,d),r()),n=Z(),c=async d=>{let o={...t,...d,fetch:d.fetch??t.fetch??globalThis.fetch,headers:z(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=v(o);return {opts:o,url:A}},a=async d=>{let{opts:o,url:A}=await c(d),C={redirect:"follow",...o,body:X(o)},x=new Request(A,C);for(let g of n.request.fns)g&&(x=await g(x,o));let k=o.fetch,u;try{u=await k(x);}catch(g){let f=g;for(let E of n.error.fns)E&&(f=await E(g,void 0,x,o));if(f=f||{},o.throwOnError)throw f;return o.responseStyle==="data"?void 0:{error:f,request:x,response:void 0}}for(let g of n.response.fns)g&&(u=await g(u,x,o));let y={request:x,response:u};if(u.ok){let g=(o.parseAs==="auto"?_(u.headers.get("Content-Type")):o.parseAs)??"json";if(u.status===204||u.headers.get("Content-Length")==="0"){let E;switch(g){case "arrayBuffer":case "blob":case "text":E=await u[g]();break;case "formData":E=new FormData;break;case "stream":E=u.body;break;default:E={};break}return o.responseStyle==="data"?E:{data:E,...y}}let f;switch(g){case "arrayBuffer":case "blob":case "formData":case "json":case "text":f=await u[g]();break;case "stream":return o.responseStyle==="data"?u.body:{data:u.body,...y}}return g==="json"&&(o.responseValidator&&await o.responseValidator(f),o.responseTransformer&&(f=await o.responseTransformer(f))),o.responseStyle==="data"?f:{data:f,...y}}let w=await u.text(),O;try{O=JSON.parse(w);}catch{}let S=O??w,m=S;for(let g of n.error.fns)g&&(m=await g(S,u,x,o));if(m=m||{},o.throwOnError)throw m;return o.responseStyle==="data"?void 0:{error:m,...y}},i=d=>o=>a({...o,method:d}),l=d=>async o=>{let{opts:A,url:C}=await c(o);return H({...A,body:A.body,headers:A.headers,method:d,onRequest:async(x,k)=>{let u=new Request(x,k);for(let y of n.request.fns)y&&(u=await y(u,A));return u},url:C})};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 p=F(b({baseUrl:"https://odyssey.asteroid.ai/agents/v2"}));var ge=e=>(e?.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e}),fe=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(e.client??p).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),ye=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),Ee=e=>(e.client??p).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e.client??p).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/clear-browser-cache",...e}),he=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/duplicate",...e,headers:{"Content-Type":"application/json",...e.headers}}),me=e=>(e?.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e}),we=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e}),Pe=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e,headers:{"Content-Type":"application/json",...e.headers}}),Re=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}",...e}),Ce=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/publish",...e}),Te=e=>(e.client??p).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}}),De=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/docs/search",...e,headers:{"Content-Type":"application/json",...e.headers}}),be=e=>(e?.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions",...e}),ke=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}",...e}),We=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/activities",...e}),Ge=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e}),Ue=e=>(e.client??p).post({...G,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e,headers:{"Content-Type":null,...e.headers}}),qe=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/status",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/user-messages",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ie=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/schema/validate",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(e.client??p).post({...G,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/temp-files/{organizationId}",...e,headers:{"Content-Type":null,...e.headers}});
|
|
8
|
-
export{we as agentExecutePost,me as agentList,xe as agentProfileClearBrowserCache,Ae as agentProfileDelete,he as agentProfileDuplicate,
|
|
6
|
+
`),W=[],M;for(let h of oe)if(h.startsWith("data:"))W.push(h.replace(/^data:\s*/,""));else if(h.startsWith("event:"))M=h.replace(/^event:\s*/,"");else if(h.startsWith("id:"))A=h.replace(/^id:\s*/,"");else if(h.startsWith("retry:")){let N=Number.parseInt(h.replace(/^retry:\s*/,""),10);Number.isNaN(N)||(u=N);}let R,K=!1;if(W.length){let h=W.join(`
|
|
7
|
+
`);try{R=JSON.parse(h),K=!0;}catch{R=h;}}K&&(s&&await s(R),n&&(R=await n(R))),r?.({data:R,event:M,id:A,retry:u}),W.length&&(yield R);}}}finally{w.removeEventListener("abort",j),y.releaseLock();}break}catch(S){if(t?.(S),a!==void 0&&E>=a)break;let m=Math.min(u*2**(E-1),i??3e4);await C(m);}}}()}};var ne=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},se=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:n,value:s})=>{if(!t){let i=(e?s:s.map(l=>encodeURIComponent(l))).join(se(n));switch(n){case "label":return `.${i}`;case "matrix":return `;${r}=${i}`;case "simple":return i;default:return `${r}=${i}`}}let c=ne(n),a=s.map(i=>n==="label"||n==="simple"?e?i:encodeURIComponent(i):P({allowReserved:e,name:r,value:i})).join(c);return n==="label"||n==="matrix"?c+a:a},P=({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:n,value:s,valueOnly:c})=>{if(s instanceof Date)return c?s.toISOString():`${r}=${s.toISOString()}`;if(n!=="deepObject"&&!t){let l=[];Object.entries(s).forEach(([o,A])=>{l=[...l,o,e?A:encodeURIComponent(A)];});let d=l.join(",");switch(n){case "form":return `${r}=${d}`;case "label":return `.${d}`;case "matrix":return `;${r}=${d}`;default:return d}}let a=ie(n),i=Object.entries(s).map(([l,d])=>P({allowReserved:e,name:n==="deepObject"?`${r}[${l}]`:l,value:d})).join(a);return n==="label"||n==="matrix"?a+i:i};var ae=/\{[^{}]+\}/g,le=({path:e,url:t})=>{let r=t,n=t.match(ae);if(n)for(let s of n){let c=false,a=s.substring(1,s.length-1),i="simple";a.endsWith("*")&&(c=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(s,U({explode:c,name:a,style:i,value:l}));continue}if(typeof l=="object"){r=r.replace(s,q({explode:c,name:a,style:i,value:l,valueOnly:true}));continue}if(i==="matrix"){r=r.replace(s,`;${P({name:a,value:l})}`);continue}let d=encodeURIComponent(i==="label"?`.${l}`:l);r=r.replace(s,d);}return r},$=({baseUrl:e,path:t,query:r,querySerializer:n,url:s})=>{let c=s.startsWith("/")?s:`/${s}`,a=(e??"")+c;t&&(a=le({path:t,url:a}));let i=r?n(r):"";return i.startsWith("?")&&(i=i.substring(1)),i&&(a+=`?${i}`),a};function X(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}={})=>n=>{let s=[];if(n&&typeof n=="object")for(let c in n){let a=n[c];if(a==null)continue;let i=e[c]||t;if(Array.isArray(a)){let l=U({allowReserved:i.allowReserved,explode:true,name:c,style:"form",value:a,...i.array});l&&s.push(l);}else if(typeof a=="object"){let l=q({allowReserved:i.allowReserved,explode:true,name:c,style:"deepObject",value:a,...i.object});l&&s.push(l);}else {let l=P({allowReserved:i.allowReserved,name:c,value:a});l&&s.push(l);}}return s.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 n=await Q(r,t.auth);if(!n)continue;let s=r.name??"Authorization";switch(r.in){case "query":t.query||(t.query={}),t.query[s]=n;break;case "cookie":t.headers.append("Cookie",`${s}=${n}`);break;default:t.headers.set(s,n);break}}},v=e=>$({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:J(e.querySerializer),url:e.url}),L=(e,t)=>{let r={...e,...t};return r.baseUrl?.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=z(e.headers,t.headers),r},pe=e=>{let t=[];return e.forEach((r,n)=>{t.push([n,r]);}),t},z=(...e)=>{let t=new Headers;for(let r of e){if(!r)continue;let n=r instanceof Headers?pe(r):Object.entries(r);for(let[s,c]of n)if(c===null)t.delete(s);else if(Array.isArray(c))for(let a of c)t.append(s,a);else c!==void 0&&t.set(s,typeof c=="object"?JSON.stringify(c):c);}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 n=this.getInterceptorIndex(t);return this.fns[n]?(this.fns[n]=r,t):false}use(t){return this.fns.push(t),this.fns.length-1}},Z=()=>({error:new D,request:new D,response:new D}),ue=J({allowReserved:false,array:{explode:true,style:"form"},object:{explode:true,style:"deepObject"}}),de={"Content-Type":"application/json"},b=(e={})=>({...I,headers:de,parseAs:"auto",querySerializer:ue,...e});var F=(e={})=>{let t=L(b(),e),r=()=>({...t}),n=d=>(t=L(t,d),r()),s=Z(),c=async d=>{let o={...t,...d,fetch:d.fetch??t.fetch??globalThis.fetch,headers:z(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=v(o);return {opts:o,url:A}},a=async d=>{let{opts:o,url:A}=await c(d),C={redirect:"follow",...o,body:X(o)},x=new Request(A,C);for(let g of s.request.fns)g&&(x=await g(x,o));let k=o.fetch,u;try{u=await k(x);}catch(g){let f=g;for(let y of s.error.fns)y&&(f=await y(g,void 0,x,o));if(f=f||{},o.throwOnError)throw f;return o.responseStyle==="data"?void 0:{error:f,request:x,response:void 0}}for(let g of s.response.fns)g&&(u=await g(u,x,o));let E={request:x,response:u};if(u.ok){let g=(o.parseAs==="auto"?_(u.headers.get("Content-Type")):o.parseAs)??"json";if(u.status===204||u.headers.get("Content-Length")==="0"){let y;switch(g){case "arrayBuffer":case "blob":case "text":y=await u[g]();break;case "formData":y=new FormData;break;case "stream":y=u.body;break;default:y={};break}return o.responseStyle==="data"?y:{data:y,...E}}let f;switch(g){case "arrayBuffer":case "blob":case "formData":case "json":case "text":f=await u[g]();break;case "stream":return o.responseStyle==="data"?u.body:{data:u.body,...E}}return g==="json"&&(o.responseValidator&&await o.responseValidator(f),o.responseTransformer&&(f=await o.responseTransformer(f))),o.responseStyle==="data"?f:{data:f,...E}}let w=await u.text(),O;try{O=JSON.parse(w);}catch{}let S=O??w,m=S;for(let g of s.error.fns)g&&(m=await g(S,u,x,o));if(m=m||{},o.throwOnError)throw m;return o.responseStyle==="data"?void 0:{error:m,...E}},i=d=>o=>a({...o,method:d}),l=d=>async o=>{let{opts:A,url:C}=await c(o);return H({...A,body:A.body,headers:A.headers,method:d,onRequest:async(x,k)=>{let u=new Request(x,k);for(let E of s.request.fns)E&&(u=await E(u,A));return u},url:C})};return {buildUrl:v,connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:r,head:i("HEAD"),interceptors:s,options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),request:a,setConfig:n,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 p=F(b({baseUrl:"https://odyssey.asteroid.ai/agents/v2"}));var ge=e=>(e?.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e}),fe=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(e.client??p).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),Ee=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),ye=e=>(e.client??p).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e.client??p).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/clear-browser-cache",...e}),he=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/duplicate",...e,headers:{"Content-Type":"application/json",...e.headers}}),me=e=>(e?.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e}),we=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e}),Re=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}",...e}),Ce=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/execute",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/publish",...e}),Te=e=>(e.client??p).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}}),De=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/docs/search",...e,headers:{"Content-Type":"application/json",...e.headers}}),be=e=>(e?.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions",...e}),ke=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}",...e}),We=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/activities",...e}),Ge=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e}),Ue=e=>(e.client??p).post({...G,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e,headers:{"Content-Type":null,...e.headers}}),qe=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/recording",...e}),ze=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/status",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ie=e=>(e.client??p).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??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/schema/validate",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(e.client??p).post({...G,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/temp-files/{organizationId}",...e,headers:{"Content-Type":null,...e.headers}});
|
|
8
|
+
export{we as agentExecutePost,me as agentList,xe as agentProfileClearBrowserCache,Ae as agentProfileDelete,he as agentProfileDuplicate,Ee as agentProfileGet,ye as agentProfileUpdate,fe as agentProfilesCreate,ge as agentProfilesList,Re as agentWorkflowsCreate,Ce as agentWorkflowsExecute,Pe as agentWorkflowsGet,Se as agentWorkflowsList,Oe as agentWorkflowsPublish,Te as agentWorkflowsSyncExecution,p as client,De as docsSearchSearch,We as executionActivitiesGet,Ge as executionContextFilesGet,Ue as executionContextFilesUpload,ke as executionGet,qe as executionRecordingRedirect,ze as executionStatusUpdate,Ie as executionUserMessagesAdd,be as executionsList,ve as schemaValidationValidate,Le as tempFilesStage};
|