asteroid-odyssey 1.6.21 → 1.6.23
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 +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -449,6 +449,16 @@ type AgentsExecutionActivityActionStartedPayload = {
|
|
|
449
449
|
actionId: string;
|
|
450
450
|
info?: AgentsExecutionActivityActionStartedInfo;
|
|
451
451
|
};
|
|
452
|
+
type AgentsExecutionActivityContinuedOnNodePayload = {
|
|
453
|
+
activityType: 'continued_on_node';
|
|
454
|
+
nodeUUID: CommonUuid;
|
|
455
|
+
nodeName: string;
|
|
456
|
+
nodeType: string;
|
|
457
|
+
/**
|
|
458
|
+
* Reasoning for why the LLM decided to continue on the current node
|
|
459
|
+
*/
|
|
460
|
+
reasoning: string;
|
|
461
|
+
};
|
|
452
462
|
type AgentsExecutionActivityFileAddedPayload = {
|
|
453
463
|
activityType: 'file_added';
|
|
454
464
|
fileId: CommonUuid;
|
|
@@ -475,6 +485,8 @@ type AgentsExecutionActivityPayloadUnion = ({
|
|
|
475
485
|
} & AgentsExecutionActivityStepCompletedPayload) | ({
|
|
476
486
|
activityType: 'transitioned_node';
|
|
477
487
|
} & AgentsExecutionActivityTransitionedNodePayload) | ({
|
|
488
|
+
activityType: 'continued_on_node';
|
|
489
|
+
} & AgentsExecutionActivityContinuedOnNodePayload) | ({
|
|
478
490
|
activityType: 'status_changed';
|
|
479
491
|
} & AgentsExecutionActivityStatusChangedPayload) | ({
|
|
480
492
|
activityType: 'action_started';
|
|
@@ -2093,4 +2105,4 @@ declare const executionUserMessagesAdd: <ThrowOnError extends boolean = false>(o
|
|
|
2093
2105
|
*/
|
|
2094
2106
|
declare const tempFilesStage: <ThrowOnError extends boolean = false>(options: Options<TempFilesStageData, ThrowOnError>) => RequestResult<TempFilesStageResponses, TempFilesStageErrors, ThrowOnError, "fields">;
|
|
2095
2107
|
|
|
2096
|
-
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 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 AgentsAgentBase, type AgentsAgentExecuteAgentRequest, type AgentsAgentExecuteAgentResponse, type AgentsAgentSearch, type AgentsAgentSortField, 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 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 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 AgentsExecutionUpdateExecutionStatusRequest, type AgentsExecutionUpdateType, type AgentsExecutionUpdateableStatus, type AgentsExecutionUserMessagesAddTextBody, type AgentsExecutionUtilGetDatetimeCompletedDetails, type AgentsExecutionUtilGetDatetimeStartedDetails, type AgentsExecutionWorkflowUpdate, type AgentsFilesFile, type AgentsFilesFilePart, type AgentsFilesTempFile, type AgentsFilesTempFilesResponse, type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVar, type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVarType, type AgentsGraphModelsTransitionsTransitionType, type AgentsProfileAgentProfile, type AgentsProfileCookie, type AgentsProfileCountryCode, type AgentsProfileCreateAgentProfileRequest, type AgentsProfileCredential, type AgentsProfileOperatingSystem, type AgentsProfileProxyType, type AgentsProfileSameSite, type AgentsProfileSearch, type AgentsProfileSortField, type AgentsProfileUpdateAgentProfileRequest, 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 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 TempFilesStageData, type TempFilesStageError, type TempFilesStageErrors, type TempFilesStageResponse, type TempFilesStageResponses, type Version, agentExecutePost, agentList, agentProfileClearBrowserCache, agentProfileDelete, agentProfileGet, agentProfileUpdate, agentProfilesCreate, agentProfilesList, client, executionActivitiesGet, executionContextFilesGet, executionContextFilesUpload, executionGet, executionStatusUpdate, executionUserMessagesAdd, executionsList, tempFilesStage };
|
|
2108
|
+
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 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 AgentsAgentBase, type AgentsAgentExecuteAgentRequest, type AgentsAgentExecuteAgentResponse, type AgentsAgentSearch, type AgentsAgentSortField, type AgentsExecutionActionName, type AgentsExecutionActivity, type AgentsExecutionActivityActionCompletedInfo, type AgentsExecutionActivityActionCompletedPayload, type AgentsExecutionActivityActionFailedPayload, type AgentsExecutionActivityActionStartedInfo, type AgentsExecutionActivityActionStartedPayload, type AgentsExecutionActivityContinuedOnNodePayload, 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 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 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 AgentsExecutionUpdateExecutionStatusRequest, type AgentsExecutionUpdateType, type AgentsExecutionUpdateableStatus, type AgentsExecutionUserMessagesAddTextBody, type AgentsExecutionUtilGetDatetimeCompletedDetails, type AgentsExecutionUtilGetDatetimeStartedDetails, type AgentsExecutionWorkflowUpdate, type AgentsFilesFile, type AgentsFilesFilePart, type AgentsFilesTempFile, type AgentsFilesTempFilesResponse, type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVar, type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVarType, type AgentsGraphModelsTransitionsTransitionType, type AgentsProfileAgentProfile, type AgentsProfileCookie, type AgentsProfileCountryCode, type AgentsProfileCreateAgentProfileRequest, type AgentsProfileCredential, type AgentsProfileOperatingSystem, type AgentsProfileProxyType, type AgentsProfileSameSite, type AgentsProfileSearch, type AgentsProfileSortField, type AgentsProfileUpdateAgentProfileRequest, 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 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 TempFilesStageData, type TempFilesStageError, type TempFilesStageErrors, type TempFilesStageResponse, type TempFilesStageResponses, type Version, agentExecutePost, agentList, agentProfileClearBrowserCache, agentProfileDelete, agentProfileGet, agentProfileUpdate, agentProfilesCreate, agentProfilesList, client, executionActivitiesGet, executionContextFilesGet, executionContextFilesUpload, executionGet, executionStatusUpdate, executionUserMessagesAdd, executionsList, tempFilesStage };
|
package/dist/index.d.ts
CHANGED
|
@@ -449,6 +449,16 @@ type AgentsExecutionActivityActionStartedPayload = {
|
|
|
449
449
|
actionId: string;
|
|
450
450
|
info?: AgentsExecutionActivityActionStartedInfo;
|
|
451
451
|
};
|
|
452
|
+
type AgentsExecutionActivityContinuedOnNodePayload = {
|
|
453
|
+
activityType: 'continued_on_node';
|
|
454
|
+
nodeUUID: CommonUuid;
|
|
455
|
+
nodeName: string;
|
|
456
|
+
nodeType: string;
|
|
457
|
+
/**
|
|
458
|
+
* Reasoning for why the LLM decided to continue on the current node
|
|
459
|
+
*/
|
|
460
|
+
reasoning: string;
|
|
461
|
+
};
|
|
452
462
|
type AgentsExecutionActivityFileAddedPayload = {
|
|
453
463
|
activityType: 'file_added';
|
|
454
464
|
fileId: CommonUuid;
|
|
@@ -475,6 +485,8 @@ type AgentsExecutionActivityPayloadUnion = ({
|
|
|
475
485
|
} & AgentsExecutionActivityStepCompletedPayload) | ({
|
|
476
486
|
activityType: 'transitioned_node';
|
|
477
487
|
} & AgentsExecutionActivityTransitionedNodePayload) | ({
|
|
488
|
+
activityType: 'continued_on_node';
|
|
489
|
+
} & AgentsExecutionActivityContinuedOnNodePayload) | ({
|
|
478
490
|
activityType: 'status_changed';
|
|
479
491
|
} & AgentsExecutionActivityStatusChangedPayload) | ({
|
|
480
492
|
activityType: 'action_started';
|
|
@@ -2093,4 +2105,4 @@ declare const executionUserMessagesAdd: <ThrowOnError extends boolean = false>(o
|
|
|
2093
2105
|
*/
|
|
2094
2106
|
declare const tempFilesStage: <ThrowOnError extends boolean = false>(options: Options<TempFilesStageData, ThrowOnError>) => RequestResult<TempFilesStageResponses, TempFilesStageErrors, ThrowOnError, "fields">;
|
|
2095
2107
|
|
|
2096
|
-
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 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 AgentsAgentBase, type AgentsAgentExecuteAgentRequest, type AgentsAgentExecuteAgentResponse, type AgentsAgentSearch, type AgentsAgentSortField, 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 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 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 AgentsExecutionUpdateExecutionStatusRequest, type AgentsExecutionUpdateType, type AgentsExecutionUpdateableStatus, type AgentsExecutionUserMessagesAddTextBody, type AgentsExecutionUtilGetDatetimeCompletedDetails, type AgentsExecutionUtilGetDatetimeStartedDetails, type AgentsExecutionWorkflowUpdate, type AgentsFilesFile, type AgentsFilesFilePart, type AgentsFilesTempFile, type AgentsFilesTempFilesResponse, type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVar, type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVarType, type AgentsGraphModelsTransitionsTransitionType, type AgentsProfileAgentProfile, type AgentsProfileCookie, type AgentsProfileCountryCode, type AgentsProfileCreateAgentProfileRequest, type AgentsProfileCredential, type AgentsProfileOperatingSystem, type AgentsProfileProxyType, type AgentsProfileSameSite, type AgentsProfileSearch, type AgentsProfileSortField, type AgentsProfileUpdateAgentProfileRequest, 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 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 TempFilesStageData, type TempFilesStageError, type TempFilesStageErrors, type TempFilesStageResponse, type TempFilesStageResponses, type Version, agentExecutePost, agentList, agentProfileClearBrowserCache, agentProfileDelete, agentProfileGet, agentProfileUpdate, agentProfilesCreate, agentProfilesList, client, executionActivitiesGet, executionContextFilesGet, executionContextFilesUpload, executionGet, executionStatusUpdate, executionUserMessagesAdd, executionsList, tempFilesStage };
|
|
2108
|
+
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 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 AgentsAgentBase, type AgentsAgentExecuteAgentRequest, type AgentsAgentExecuteAgentResponse, type AgentsAgentSearch, type AgentsAgentSortField, type AgentsExecutionActionName, type AgentsExecutionActivity, type AgentsExecutionActivityActionCompletedInfo, type AgentsExecutionActivityActionCompletedPayload, type AgentsExecutionActivityActionFailedPayload, type AgentsExecutionActivityActionStartedInfo, type AgentsExecutionActivityActionStartedPayload, type AgentsExecutionActivityContinuedOnNodePayload, 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 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 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 AgentsExecutionUpdateExecutionStatusRequest, type AgentsExecutionUpdateType, type AgentsExecutionUpdateableStatus, type AgentsExecutionUserMessagesAddTextBody, type AgentsExecutionUtilGetDatetimeCompletedDetails, type AgentsExecutionUtilGetDatetimeStartedDetails, type AgentsExecutionWorkflowUpdate, type AgentsFilesFile, type AgentsFilesFilePart, type AgentsFilesTempFile, type AgentsFilesTempFilesResponse, type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVar, type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVarType, type AgentsGraphModelsTransitionsTransitionType, type AgentsProfileAgentProfile, type AgentsProfileCookie, type AgentsProfileCountryCode, type AgentsProfileCreateAgentProfileRequest, type AgentsProfileCredential, type AgentsProfileOperatingSystem, type AgentsProfileProxyType, type AgentsProfileSameSite, type AgentsProfileSearch, type AgentsProfileSortField, type AgentsProfileUpdateAgentProfileRequest, 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 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 TempFilesStageData, type TempFilesStageError, type TempFilesStageErrors, type TempFilesStageResponse, type TempFilesStageResponses, type Version, agentExecutePost, agentList, agentProfileClearBrowserCache, agentProfileDelete, agentProfileGet, agentProfileUpdate, agentProfilesCreate, agentProfilesList, client, executionActivitiesGet, executionContextFilesGet, executionContextFilesUpload, executionGet, executionStatusUpdate, executionUserMessagesAdd, executionsList, tempFilesStage };
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
`);let K=w.split(`
|
|
4
4
|
|
|
5
5
|
`);w=K.pop()??"";for(let re of K){let ne=re.split(`
|
|
6
|
-
`),U=[],M;for(let m of ne)if(m.startsWith("data:"))U.push(m.replace(/^data:\s*/,""));else if(m.startsWith("event:"))M=m.replace(/^event:\s*/,"");else if(m.startsWith("id:"))y=m.replace(/^id:\s*/,"");else if(m.startsWith("retry:")){let H=Number.parseInt(m.replace(/^retry:\s*/,""),10);Number.isNaN(H)||(p=H);}let
|
|
7
|
-
`);try{R=JSON.parse(m),N=!0;}catch{R=m;}}N&&(o&&await o(R),s&&(R=await s(R))),r?.({data:R,event:M,id:y,retry:p}),U.length&&(yield R);}}}finally{S.removeEventListener("abort",B),A.releaseLock();}break}catch(C){if(t?.(C),a!==void 0&&x>=a)break;let h=Math.min(p*2**(x-1),i??3e4);await O(h);}}}()}};var se=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},oe=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 "&"}},v=({allowReserved:e,explode:t,name:r,style:s,value:o})=>{if(!t){let i=(e?o:o.map(l=>encodeURIComponent(l))).join(oe(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=o.map(i=>s==="label"||s==="simple"?e?i:encodeURIComponent(i):P({allowReserved:e,name:r,value:i})).join(c);return s==="label"||s==="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)}`},I=({allowReserved:e,explode:t,name:r,style:s,value:o,valueOnly:c})=>{if(o instanceof Date)return c?o.toISOString():`${r}=${o.toISOString()}`;if(s!=="deepObject"&&!t){let l=[];Object.entries(o).forEach(([n,y])=>{l=[...l,n,e?y:encodeURIComponent(y)];});let u=l.join(",");switch(s){case "form":return `${r}=${u}`;case "label":return `.${u}`;case "matrix":return `;${r}=${u}`;default:return u}}let a=ie(s),i=Object.entries(o).map(([l,u])=>P({allowReserved:e,name:s==="deepObject"?`${r}[${l}]`:l,value:u})).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 o of s){let c=false,a=o.substring(1,o.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(o,v({explode:c,name:a,style:i,value:l}));continue}if(typeof l=="object"){r=r.replace(o,I({explode:c,name:a,style:i,value:l,valueOnly:true}));continue}if(i==="matrix"){r=r.replace(o,`;${P({name:a,value:l})}`);continue}let u=encodeURIComponent(i==="label"?`.${l}`:l);r=r.replace(o,u);}return r},V=({baseUrl:e,path:t,query:r,querySerializer:s,url:o})=>{let c=o.startsWith("/")?o:`/${o}`,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 o=[];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=v({allowReserved:i.allowReserved,explode:true,name:c,style:"form",value:a,...i.array});l&&o.push(l);}else if(typeof a=="object"){let l=I({allowReserved:i.allowReserved,explode:true,name:c,style:"deepObject",value:a,...i.object});l&&o.push(l);}else {let l=P({allowReserved:i.allowReserved,name:c,value:a});l&&o.push(l);}}return o.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 o=r.name??"Authorization";switch(r.in){case "query":t.query||(t.query={}),t.query[o]=s;break;case "cookie":t.headers.append("Cookie",`${o}=${s}`);break;default:t.headers.set(o,s);break}}},G=e=>V({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:J(e.querySerializer),url:e.url}),j=(e,t)=>{let r={...e,...t};return r.baseUrl?.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=F(e.headers,t.headers),r},pe=e=>{let t=[];return e.forEach((r,s)=>{t.push([s,r]);}),t},F=(...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[o,c]of s)if(c===null)t.delete(o);else if(Array.isArray(c))for(let a of c)t.append(o,a);else c!==void 0&&t.set(o,typeof c=="object"?JSON.stringify(c):c);}return t},T=class{fns=[];clear(){this.fns=[];}eject(t){let r=this.getInterceptorIndex(t);this.fns[r]&&(this.fns[r]=null);}exists(t){let r=this.getInterceptorIndex(t);return !!this.fns[r]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,r){let s=this.getInterceptorIndex(t);return this.fns[s]?(this.fns[s]=r,t):false}use(t){return this.fns.push(t),this.fns.length-1}},Z=()=>({error:new T,request:new T,response:new T}),ue=J({allowReserved:false,array:{explode:true,style:"form"},object:{explode:true,style:"deepObject"}}),de={"Content-Type":"application/json"},D=(e={})=>({...k,headers:de,parseAs:"auto",querySerializer:ue,...e});var L=(e={})=>{let t=j(D(),e),r=()=>({...t}),s=u=>(t=j(t,u),r()),o=Z(),c=async u=>{let n={...t,...u,fetch:u.fetch??t.fetch??globalThis.fetch,headers:F(t.headers,u.headers),serializedBody:void 0};n.security&&await Y({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let y=G(n);return {opts:n,url:y}},a=async u=>{let{opts:n,url:y}=await c(u),O={redirect:"follow",...n,body:X(n)},E=new Request(y,O);for(let d of o.request.fns)d&&(E=await d(E,n));let z=n.fetch,p;try{p=await z(E);}catch(d){let g=d;for(let A of o.error.fns)A&&(g=await A(d,void 0,E,n));if(g=g||{},n.throwOnError)throw g;return n.responseStyle==="data"?void 0:{error:g,request:E,response:void 0}}for(let d of o.response.fns)d&&(p=await d(p,E,n));let x={request:E,response:p};if(p.ok){let d=(n.parseAs==="auto"?_(p.headers.get("Content-Type")):n.parseAs)??"json";if(p.status===204||p.headers.get("Content-Length")==="0"){let A;switch(d){case "arrayBuffer":case "blob":case "text":A=await p[d]();break;case "formData":A=new FormData;break;case "stream":A=p.body;break;default:A={};break}return n.responseStyle==="data"?A:{data:A,...x}}let g;switch(d){case "arrayBuffer":case "blob":case "formData":case "json":case "text":g=await p[d]();break;case "stream":return n.responseStyle==="data"?p.body:{data:p.body,...x}}return d==="json"&&(n.responseValidator&&await n.responseValidator(g),n.responseTransformer&&(g=await n.responseTransformer(g))),n.responseStyle==="data"?g:{data:g,...x}}let S=await p.text(),b;try{b=JSON.parse(S);}catch{}let C=b??S,h=C;for(let d of o.error.fns)d&&(h=await d(C,p,E,n));if(h=h||{},n.throwOnError)throw h;return n.responseStyle==="data"?void 0:{error:h,...x}},i=u=>n=>a({...n,method:u}),l=u=>async n=>{let{opts:y,url:O}=await c(n);return W({...y,body:y.body,headers:y.headers,method:u,onRequest:async(E,z)=>{let p=new Request(E,z);for(let x of o.request.fns)x&&(p=await x(p,y));return p},url:O})};return {buildUrl:G,connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:r,head:i("HEAD"),interceptors:o,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 f=L(D({baseUrl:"https://odyssey.asteroid.ai/agents/v2"}));var ge=e=>(e?.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e}),fe=e=>(e.client??f).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e,headers:{"Content-Type":"application/json",...e.headers}}),ye=e=>(e.client??f).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),xe=e=>(e.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),Ae=e=>(e.client??f).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(e.client??f).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/clear-browser-cache",...e}),me=e=>(e?.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e}),he=e=>(e.client??f).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??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions",...e}),Ce=e=>(e.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}",...e}),Re=e=>(e.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/activities",...e}),Pe=e=>(e.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e}),Oe=e=>(e.client??f).post({...q,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e,headers:{"Content-Type":null,...e.headers}}),be=e=>(e.client??f).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/status",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(e.client??f).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/user-messages",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e.client??f).post({...q,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/temp-files/{organizationId}",...e,headers:{"Content-Type":null,...e.headers}});
|
|
8
|
-
exports.agentExecutePost=he;exports.agentList=me;exports.agentProfileClearBrowserCache=Ee;exports.agentProfileDelete=ye;exports.agentProfileGet=xe;exports.agentProfileUpdate=Ae;exports.agentProfilesCreate=fe;exports.agentProfilesList=ge;exports.client=f;exports.executionActivitiesGet=
|
|
6
|
+
`),U=[],M;for(let m of ne)if(m.startsWith("data:"))U.push(m.replace(/^data:\s*/,""));else if(m.startsWith("event:"))M=m.replace(/^event:\s*/,"");else if(m.startsWith("id:"))y=m.replace(/^id:\s*/,"");else if(m.startsWith("retry:")){let H=Number.parseInt(m.replace(/^retry:\s*/,""),10);Number.isNaN(H)||(p=H);}let P,N=!1;if(U.length){let m=U.join(`
|
|
7
|
+
`);try{P=JSON.parse(m),N=!0;}catch{P=m;}}N&&(o&&await o(P),s&&(P=await s(P))),r?.({data:P,event:M,id:y,retry:p}),U.length&&(yield P);}}}finally{S.removeEventListener("abort",B),A.releaseLock();}break}catch(C){if(t?.(C),a!==void 0&&x>=a)break;let h=Math.min(p*2**(x-1),i??3e4);await O(h);}}}()}};var se=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},oe=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 "&"}},v=({allowReserved:e,explode:t,name:r,style:s,value:o})=>{if(!t){let i=(e?o:o.map(l=>encodeURIComponent(l))).join(oe(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=o.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)}`},I=({allowReserved:e,explode:t,name:r,style:s,value:o,valueOnly:c})=>{if(o instanceof Date)return c?o.toISOString():`${r}=${o.toISOString()}`;if(s!=="deepObject"&&!t){let l=[];Object.entries(o).forEach(([n,y])=>{l=[...l,n,e?y:encodeURIComponent(y)];});let u=l.join(",");switch(s){case "form":return `${r}=${u}`;case "label":return `.${u}`;case "matrix":return `;${r}=${u}`;default:return u}}let a=ie(s),i=Object.entries(o).map(([l,u])=>R({allowReserved:e,name:s==="deepObject"?`${r}[${l}]`:l,value:u})).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 o of s){let c=false,a=o.substring(1,o.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(o,v({explode:c,name:a,style:i,value:l}));continue}if(typeof l=="object"){r=r.replace(o,I({explode:c,name:a,style:i,value:l,valueOnly:true}));continue}if(i==="matrix"){r=r.replace(o,`;${R({name:a,value:l})}`);continue}let u=encodeURIComponent(i==="label"?`.${l}`:l);r=r.replace(o,u);}return r},V=({baseUrl:e,path:t,query:r,querySerializer:s,url:o})=>{let c=o.startsWith("/")?o:`/${o}`,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 o=[];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=v({allowReserved:i.allowReserved,explode:true,name:c,style:"form",value:a,...i.array});l&&o.push(l);}else if(typeof a=="object"){let l=I({allowReserved:i.allowReserved,explode:true,name:c,style:"deepObject",value:a,...i.object});l&&o.push(l);}else {let l=R({allowReserved:i.allowReserved,name:c,value:a});l&&o.push(l);}}return o.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 o=r.name??"Authorization";switch(r.in){case "query":t.query||(t.query={}),t.query[o]=s;break;case "cookie":t.headers.append("Cookie",`${o}=${s}`);break;default:t.headers.set(o,s);break}}},G=e=>V({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:J(e.querySerializer),url:e.url}),j=(e,t)=>{let r={...e,...t};return r.baseUrl?.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=F(e.headers,t.headers),r},pe=e=>{let t=[];return e.forEach((r,s)=>{t.push([s,r]);}),t},F=(...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[o,c]of s)if(c===null)t.delete(o);else if(Array.isArray(c))for(let a of c)t.append(o,a);else c!==void 0&&t.set(o,typeof c=="object"?JSON.stringify(c):c);}return t},T=class{fns=[];clear(){this.fns=[];}eject(t){let r=this.getInterceptorIndex(t);this.fns[r]&&(this.fns[r]=null);}exists(t){let r=this.getInterceptorIndex(t);return !!this.fns[r]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,r){let s=this.getInterceptorIndex(t);return this.fns[s]?(this.fns[s]=r,t):false}use(t){return this.fns.push(t),this.fns.length-1}},Z=()=>({error:new T,request:new T,response:new T}),ue=J({allowReserved:false,array:{explode:true,style:"form"},object:{explode:true,style:"deepObject"}}),de={"Content-Type":"application/json"},D=(e={})=>({...k,headers:de,parseAs:"auto",querySerializer:ue,...e});var L=(e={})=>{let t=j(D(),e),r=()=>({...t}),s=u=>(t=j(t,u),r()),o=Z(),c=async u=>{let n={...t,...u,fetch:u.fetch??t.fetch??globalThis.fetch,headers:F(t.headers,u.headers),serializedBody:void 0};n.security&&await Y({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let y=G(n);return {opts:n,url:y}},a=async u=>{let{opts:n,url:y}=await c(u),O={redirect:"follow",...n,body:X(n)},E=new Request(y,O);for(let d of o.request.fns)d&&(E=await d(E,n));let z=n.fetch,p;try{p=await z(E);}catch(d){let g=d;for(let A of o.error.fns)A&&(g=await A(d,void 0,E,n));if(g=g||{},n.throwOnError)throw g;return n.responseStyle==="data"?void 0:{error:g,request:E,response:void 0}}for(let d of o.response.fns)d&&(p=await d(p,E,n));let x={request:E,response:p};if(p.ok){let d=(n.parseAs==="auto"?_(p.headers.get("Content-Type")):n.parseAs)??"json";if(p.status===204||p.headers.get("Content-Length")==="0"){let A;switch(d){case "arrayBuffer":case "blob":case "text":A=await p[d]();break;case "formData":A=new FormData;break;case "stream":A=p.body;break;default:A={};break}return n.responseStyle==="data"?A:{data:A,...x}}let g;switch(d){case "arrayBuffer":case "blob":case "formData":case "json":case "text":g=await p[d]();break;case "stream":return n.responseStyle==="data"?p.body:{data:p.body,...x}}return d==="json"&&(n.responseValidator&&await n.responseValidator(g),n.responseTransformer&&(g=await n.responseTransformer(g))),n.responseStyle==="data"?g:{data:g,...x}}let S=await p.text(),b;try{b=JSON.parse(S);}catch{}let C=b??S,h=C;for(let d of o.error.fns)d&&(h=await d(C,p,E,n));if(h=h||{},n.throwOnError)throw h;return n.responseStyle==="data"?void 0:{error:h,...x}},i=u=>n=>a({...n,method:u}),l=u=>async n=>{let{opts:y,url:O}=await c(n);return W({...y,body:y.body,headers:y.headers,method:u,onRequest:async(E,z)=>{let p=new Request(E,z);for(let x of o.request.fns)x&&(p=await x(p,y));return p},url:O})};return {buildUrl:G,connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:r,head:i("HEAD"),interceptors:o,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 f=L(D({baseUrl:"https://odyssey.asteroid.ai/agents/v2"}));var ge=e=>(e?.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e}),fe=e=>(e.client??f).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e,headers:{"Content-Type":"application/json",...e.headers}}),ye=e=>(e.client??f).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),xe=e=>(e.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),Ae=e=>(e.client??f).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(e.client??f).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/clear-browser-cache",...e}),me=e=>(e?.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e}),he=e=>(e.client??f).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??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions",...e}),Ce=e=>(e.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}",...e}),Pe=e=>(e.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/activities",...e}),Re=e=>(e.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e}),Oe=e=>(e.client??f).post({...q,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e,headers:{"Content-Type":null,...e.headers}}),be=e=>(e.client??f).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/status",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(e.client??f).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/user-messages",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e.client??f).post({...q,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/temp-files/{organizationId}",...e,headers:{"Content-Type":null,...e.headers}});
|
|
8
|
+
exports.agentExecutePost=he;exports.agentList=me;exports.agentProfileClearBrowserCache=Ee;exports.agentProfileDelete=ye;exports.agentProfileGet=xe;exports.agentProfileUpdate=Ae;exports.agentProfilesCreate=fe;exports.agentProfilesList=ge;exports.client=f;exports.executionActivitiesGet=Pe;exports.executionContextFilesGet=Re;exports.executionContextFilesUpload=Oe;exports.executionGet=Ce;exports.executionStatusUpdate=be;exports.executionUserMessagesAdd=we;exports.executionsList=Se;exports.tempFilesStage=Te;
|
package/dist/index.mjs
CHANGED
|
@@ -3,6 +3,6 @@ var $=(e,t,r)=>{typeof r=="string"||r instanceof Blob?e.append(t,r):r instanceof
|
|
|
3
3
|
`);let K=w.split(`
|
|
4
4
|
|
|
5
5
|
`);w=K.pop()??"";for(let re of K){let ne=re.split(`
|
|
6
|
-
`),U=[],M;for(let m of ne)if(m.startsWith("data:"))U.push(m.replace(/^data:\s*/,""));else if(m.startsWith("event:"))M=m.replace(/^event:\s*/,"");else if(m.startsWith("id:"))y=m.replace(/^id:\s*/,"");else if(m.startsWith("retry:")){let H=Number.parseInt(m.replace(/^retry:\s*/,""),10);Number.isNaN(H)||(p=H);}let
|
|
7
|
-
`);try{R=JSON.parse(m),N=!0;}catch{R=m;}}N&&(o&&await o(R),s&&(R=await s(R))),r?.({data:R,event:M,id:y,retry:p}),U.length&&(yield R);}}}finally{S.removeEventListener("abort",B),A.releaseLock();}break}catch(C){if(t?.(C),a!==void 0&&x>=a)break;let h=Math.min(p*2**(x-1),i??3e4);await O(h);}}}()}};var se=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},oe=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 "&"}},v=({allowReserved:e,explode:t,name:r,style:s,value:o})=>{if(!t){let i=(e?o:o.map(l=>encodeURIComponent(l))).join(oe(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=o.map(i=>s==="label"||s==="simple"?e?i:encodeURIComponent(i):P({allowReserved:e,name:r,value:i})).join(c);return s==="label"||s==="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)}`},I=({allowReserved:e,explode:t,name:r,style:s,value:o,valueOnly:c})=>{if(o instanceof Date)return c?o.toISOString():`${r}=${o.toISOString()}`;if(s!=="deepObject"&&!t){let l=[];Object.entries(o).forEach(([n,y])=>{l=[...l,n,e?y:encodeURIComponent(y)];});let u=l.join(",");switch(s){case "form":return `${r}=${u}`;case "label":return `.${u}`;case "matrix":return `;${r}=${u}`;default:return u}}let a=ie(s),i=Object.entries(o).map(([l,u])=>P({allowReserved:e,name:s==="deepObject"?`${r}[${l}]`:l,value:u})).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 o of s){let c=false,a=o.substring(1,o.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(o,v({explode:c,name:a,style:i,value:l}));continue}if(typeof l=="object"){r=r.replace(o,I({explode:c,name:a,style:i,value:l,valueOnly:true}));continue}if(i==="matrix"){r=r.replace(o,`;${P({name:a,value:l})}`);continue}let u=encodeURIComponent(i==="label"?`.${l}`:l);r=r.replace(o,u);}return r},V=({baseUrl:e,path:t,query:r,querySerializer:s,url:o})=>{let c=o.startsWith("/")?o:`/${o}`,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 o=[];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=v({allowReserved:i.allowReserved,explode:true,name:c,style:"form",value:a,...i.array});l&&o.push(l);}else if(typeof a=="object"){let l=I({allowReserved:i.allowReserved,explode:true,name:c,style:"deepObject",value:a,...i.object});l&&o.push(l);}else {let l=P({allowReserved:i.allowReserved,name:c,value:a});l&&o.push(l);}}return o.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 o=r.name??"Authorization";switch(r.in){case "query":t.query||(t.query={}),t.query[o]=s;break;case "cookie":t.headers.append("Cookie",`${o}=${s}`);break;default:t.headers.set(o,s);break}}},G=e=>V({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:J(e.querySerializer),url:e.url}),j=(e,t)=>{let r={...e,...t};return r.baseUrl?.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=F(e.headers,t.headers),r},pe=e=>{let t=[];return e.forEach((r,s)=>{t.push([s,r]);}),t},F=(...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[o,c]of s)if(c===null)t.delete(o);else if(Array.isArray(c))for(let a of c)t.append(o,a);else c!==void 0&&t.set(o,typeof c=="object"?JSON.stringify(c):c);}return t},T=class{fns=[];clear(){this.fns=[];}eject(t){let r=this.getInterceptorIndex(t);this.fns[r]&&(this.fns[r]=null);}exists(t){let r=this.getInterceptorIndex(t);return !!this.fns[r]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,r){let s=this.getInterceptorIndex(t);return this.fns[s]?(this.fns[s]=r,t):false}use(t){return this.fns.push(t),this.fns.length-1}},Z=()=>({error:new T,request:new T,response:new T}),ue=J({allowReserved:false,array:{explode:true,style:"form"},object:{explode:true,style:"deepObject"}}),de={"Content-Type":"application/json"},D=(e={})=>({...k,headers:de,parseAs:"auto",querySerializer:ue,...e});var L=(e={})=>{let t=j(D(),e),r=()=>({...t}),s=u=>(t=j(t,u),r()),o=Z(),c=async u=>{let n={...t,...u,fetch:u.fetch??t.fetch??globalThis.fetch,headers:F(t.headers,u.headers),serializedBody:void 0};n.security&&await Y({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let y=G(n);return {opts:n,url:y}},a=async u=>{let{opts:n,url:y}=await c(u),O={redirect:"follow",...n,body:X(n)},E=new Request(y,O);for(let d of o.request.fns)d&&(E=await d(E,n));let z=n.fetch,p;try{p=await z(E);}catch(d){let g=d;for(let A of o.error.fns)A&&(g=await A(d,void 0,E,n));if(g=g||{},n.throwOnError)throw g;return n.responseStyle==="data"?void 0:{error:g,request:E,response:void 0}}for(let d of o.response.fns)d&&(p=await d(p,E,n));let x={request:E,response:p};if(p.ok){let d=(n.parseAs==="auto"?_(p.headers.get("Content-Type")):n.parseAs)??"json";if(p.status===204||p.headers.get("Content-Length")==="0"){let A;switch(d){case "arrayBuffer":case "blob":case "text":A=await p[d]();break;case "formData":A=new FormData;break;case "stream":A=p.body;break;default:A={};break}return n.responseStyle==="data"?A:{data:A,...x}}let g;switch(d){case "arrayBuffer":case "blob":case "formData":case "json":case "text":g=await p[d]();break;case "stream":return n.responseStyle==="data"?p.body:{data:p.body,...x}}return d==="json"&&(n.responseValidator&&await n.responseValidator(g),n.responseTransformer&&(g=await n.responseTransformer(g))),n.responseStyle==="data"?g:{data:g,...x}}let S=await p.text(),b;try{b=JSON.parse(S);}catch{}let C=b??S,h=C;for(let d of o.error.fns)d&&(h=await d(C,p,E,n));if(h=h||{},n.throwOnError)throw h;return n.responseStyle==="data"?void 0:{error:h,...x}},i=u=>n=>a({...n,method:u}),l=u=>async n=>{let{opts:y,url:O}=await c(n);return W({...y,body:y.body,headers:y.headers,method:u,onRequest:async(E,z)=>{let p=new Request(E,z);for(let x of o.request.fns)x&&(p=await x(p,y));return p},url:O})};return {buildUrl:G,connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:r,head:i("HEAD"),interceptors:o,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 f=L(D({baseUrl:"https://odyssey.asteroid.ai/agents/v2"}));var ge=e=>(e?.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e}),fe=e=>(e.client??f).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e,headers:{"Content-Type":"application/json",...e.headers}}),ye=e=>(e.client??f).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),xe=e=>(e.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),Ae=e=>(e.client??f).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(e.client??f).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/clear-browser-cache",...e}),me=e=>(e?.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e}),he=e=>(e.client??f).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??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions",...e}),Ce=e=>(e.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}",...e}),Re=e=>(e.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/activities",...e}),Pe=e=>(e.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e}),Oe=e=>(e.client??f).post({...q,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e,headers:{"Content-Type":null,...e.headers}}),be=e=>(e.client??f).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/status",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(e.client??f).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/user-messages",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e.client??f).post({...q,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/temp-files/{organizationId}",...e,headers:{"Content-Type":null,...e.headers}});
|
|
8
|
-
export{he as agentExecutePost,me as agentList,Ee as agentProfileClearBrowserCache,ye as agentProfileDelete,xe as agentProfileGet,Ae as agentProfileUpdate,fe as agentProfilesCreate,ge as agentProfilesList,f as client,
|
|
6
|
+
`),U=[],M;for(let m of ne)if(m.startsWith("data:"))U.push(m.replace(/^data:\s*/,""));else if(m.startsWith("event:"))M=m.replace(/^event:\s*/,"");else if(m.startsWith("id:"))y=m.replace(/^id:\s*/,"");else if(m.startsWith("retry:")){let H=Number.parseInt(m.replace(/^retry:\s*/,""),10);Number.isNaN(H)||(p=H);}let P,N=!1;if(U.length){let m=U.join(`
|
|
7
|
+
`);try{P=JSON.parse(m),N=!0;}catch{P=m;}}N&&(o&&await o(P),s&&(P=await s(P))),r?.({data:P,event:M,id:y,retry:p}),U.length&&(yield P);}}}finally{S.removeEventListener("abort",B),A.releaseLock();}break}catch(C){if(t?.(C),a!==void 0&&x>=a)break;let h=Math.min(p*2**(x-1),i??3e4);await O(h);}}}()}};var se=e=>{switch(e){case "label":return ".";case "matrix":return ";";case "simple":return ",";default:return "&"}},oe=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 "&"}},v=({allowReserved:e,explode:t,name:r,style:s,value:o})=>{if(!t){let i=(e?o:o.map(l=>encodeURIComponent(l))).join(oe(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=o.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)}`},I=({allowReserved:e,explode:t,name:r,style:s,value:o,valueOnly:c})=>{if(o instanceof Date)return c?o.toISOString():`${r}=${o.toISOString()}`;if(s!=="deepObject"&&!t){let l=[];Object.entries(o).forEach(([n,y])=>{l=[...l,n,e?y:encodeURIComponent(y)];});let u=l.join(",");switch(s){case "form":return `${r}=${u}`;case "label":return `.${u}`;case "matrix":return `;${r}=${u}`;default:return u}}let a=ie(s),i=Object.entries(o).map(([l,u])=>R({allowReserved:e,name:s==="deepObject"?`${r}[${l}]`:l,value:u})).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 o of s){let c=false,a=o.substring(1,o.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(o,v({explode:c,name:a,style:i,value:l}));continue}if(typeof l=="object"){r=r.replace(o,I({explode:c,name:a,style:i,value:l,valueOnly:true}));continue}if(i==="matrix"){r=r.replace(o,`;${R({name:a,value:l})}`);continue}let u=encodeURIComponent(i==="label"?`.${l}`:l);r=r.replace(o,u);}return r},V=({baseUrl:e,path:t,query:r,querySerializer:s,url:o})=>{let c=o.startsWith("/")?o:`/${o}`,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 o=[];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=v({allowReserved:i.allowReserved,explode:true,name:c,style:"form",value:a,...i.array});l&&o.push(l);}else if(typeof a=="object"){let l=I({allowReserved:i.allowReserved,explode:true,name:c,style:"deepObject",value:a,...i.object});l&&o.push(l);}else {let l=R({allowReserved:i.allowReserved,name:c,value:a});l&&o.push(l);}}return o.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 o=r.name??"Authorization";switch(r.in){case "query":t.query||(t.query={}),t.query[o]=s;break;case "cookie":t.headers.append("Cookie",`${o}=${s}`);break;default:t.headers.set(o,s);break}}},G=e=>V({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:J(e.querySerializer),url:e.url}),j=(e,t)=>{let r={...e,...t};return r.baseUrl?.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=F(e.headers,t.headers),r},pe=e=>{let t=[];return e.forEach((r,s)=>{t.push([s,r]);}),t},F=(...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[o,c]of s)if(c===null)t.delete(o);else if(Array.isArray(c))for(let a of c)t.append(o,a);else c!==void 0&&t.set(o,typeof c=="object"?JSON.stringify(c):c);}return t},T=class{fns=[];clear(){this.fns=[];}eject(t){let r=this.getInterceptorIndex(t);this.fns[r]&&(this.fns[r]=null);}exists(t){let r=this.getInterceptorIndex(t);return !!this.fns[r]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,r){let s=this.getInterceptorIndex(t);return this.fns[s]?(this.fns[s]=r,t):false}use(t){return this.fns.push(t),this.fns.length-1}},Z=()=>({error:new T,request:new T,response:new T}),ue=J({allowReserved:false,array:{explode:true,style:"form"},object:{explode:true,style:"deepObject"}}),de={"Content-Type":"application/json"},D=(e={})=>({...k,headers:de,parseAs:"auto",querySerializer:ue,...e});var L=(e={})=>{let t=j(D(),e),r=()=>({...t}),s=u=>(t=j(t,u),r()),o=Z(),c=async u=>{let n={...t,...u,fetch:u.fetch??t.fetch??globalThis.fetch,headers:F(t.headers,u.headers),serializedBody:void 0};n.security&&await Y({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let y=G(n);return {opts:n,url:y}},a=async u=>{let{opts:n,url:y}=await c(u),O={redirect:"follow",...n,body:X(n)},E=new Request(y,O);for(let d of o.request.fns)d&&(E=await d(E,n));let z=n.fetch,p;try{p=await z(E);}catch(d){let g=d;for(let A of o.error.fns)A&&(g=await A(d,void 0,E,n));if(g=g||{},n.throwOnError)throw g;return n.responseStyle==="data"?void 0:{error:g,request:E,response:void 0}}for(let d of o.response.fns)d&&(p=await d(p,E,n));let x={request:E,response:p};if(p.ok){let d=(n.parseAs==="auto"?_(p.headers.get("Content-Type")):n.parseAs)??"json";if(p.status===204||p.headers.get("Content-Length")==="0"){let A;switch(d){case "arrayBuffer":case "blob":case "text":A=await p[d]();break;case "formData":A=new FormData;break;case "stream":A=p.body;break;default:A={};break}return n.responseStyle==="data"?A:{data:A,...x}}let g;switch(d){case "arrayBuffer":case "blob":case "formData":case "json":case "text":g=await p[d]();break;case "stream":return n.responseStyle==="data"?p.body:{data:p.body,...x}}return d==="json"&&(n.responseValidator&&await n.responseValidator(g),n.responseTransformer&&(g=await n.responseTransformer(g))),n.responseStyle==="data"?g:{data:g,...x}}let S=await p.text(),b;try{b=JSON.parse(S);}catch{}let C=b??S,h=C;for(let d of o.error.fns)d&&(h=await d(C,p,E,n));if(h=h||{},n.throwOnError)throw h;return n.responseStyle==="data"?void 0:{error:h,...x}},i=u=>n=>a({...n,method:u}),l=u=>async n=>{let{opts:y,url:O}=await c(n);return W({...y,body:y.body,headers:y.headers,method:u,onRequest:async(E,z)=>{let p=new Request(E,z);for(let x of o.request.fns)x&&(p=await x(p,y));return p},url:O})};return {buildUrl:G,connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:r,head:i("HEAD"),interceptors:o,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 f=L(D({baseUrl:"https://odyssey.asteroid.ai/agents/v2"}));var ge=e=>(e?.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e}),fe=e=>(e.client??f).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles",...e,headers:{"Content-Type":"application/json",...e.headers}}),ye=e=>(e.client??f).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),xe=e=>(e.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e}),Ae=e=>(e.client??f).patch({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(e.client??f).delete({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agent-profiles/{profileId}/clear-browser-cache",...e}),me=e=>(e?.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e}),he=e=>(e.client??f).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??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions",...e}),Ce=e=>(e.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}",...e}),Pe=e=>(e.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/activities",...e}),Re=e=>(e.client??f).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e}),Oe=e=>(e.client??f).post({...q,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e,headers:{"Content-Type":null,...e.headers}}),be=e=>(e.client??f).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/status",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(e.client??f).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/user-messages",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e.client??f).post({...q,security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/temp-files/{organizationId}",...e,headers:{"Content-Type":null,...e.headers}});
|
|
8
|
+
export{he as agentExecutePost,me as agentList,Ee as agentProfileClearBrowserCache,ye as agentProfileDelete,xe as agentProfileGet,Ae as agentProfileUpdate,fe as agentProfilesCreate,ge as agentProfilesList,f as client,Pe as executionActivitiesGet,Re as executionContextFilesGet,Oe as executionContextFilesUpload,Ce as executionGet,be as executionStatusUpdate,we as executionUserMessagesAdd,Se as executionsList,Te as tempFilesStage};
|