asteroid-odyssey 1.6.176 → 1.6.188
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 +60 -13
- package/dist/index.d.ts +60 -13
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -518,16 +518,6 @@ type AgentsExecutionActivityActionStartedPayload = {
|
|
|
518
518
|
actionId: string;
|
|
519
519
|
info?: AgentsExecutionActivityActionStartedInfo;
|
|
520
520
|
};
|
|
521
|
-
type AgentsExecutionActivityContinuedOnNodePayload = {
|
|
522
|
-
activityType: 'continued_on_node';
|
|
523
|
-
nodeUUID: CommonUuid;
|
|
524
|
-
nodeName: string;
|
|
525
|
-
nodeType: string;
|
|
526
|
-
/**
|
|
527
|
-
* Reasoning for why the LLM decided to continue on the current node
|
|
528
|
-
*/
|
|
529
|
-
reasoning: string;
|
|
530
|
-
};
|
|
531
521
|
type AgentsExecutionActivityFileAddedPayload = {
|
|
532
522
|
activityType: 'file_added';
|
|
533
523
|
fileId: CommonUuid;
|
|
@@ -554,8 +544,6 @@ type AgentsExecutionActivityPayloadUnion = ({
|
|
|
554
544
|
} & AgentsExecutionActivityStepCompletedPayload) | ({
|
|
555
545
|
activityType: 'transitioned_node';
|
|
556
546
|
} & AgentsExecutionActivityTransitionedNodePayload) | ({
|
|
557
|
-
activityType: 'continued_on_node';
|
|
558
|
-
} & AgentsExecutionActivityContinuedOnNodePayload) | ({
|
|
559
547
|
activityType: 'status_changed';
|
|
560
548
|
} & AgentsExecutionActivityStatusChangedPayload) | ({
|
|
561
549
|
activityType: 'action_started';
|
|
@@ -1589,6 +1577,15 @@ type AgentsProfileCustomProxyConfigOutput = {
|
|
|
1589
1577
|
*/
|
|
1590
1578
|
username: string;
|
|
1591
1579
|
};
|
|
1580
|
+
/**
|
|
1581
|
+
* Request to duplicate an agent profile
|
|
1582
|
+
*/
|
|
1583
|
+
type AgentsProfileDuplicateAgentProfileRequest = {
|
|
1584
|
+
/**
|
|
1585
|
+
* Target organization ID. Defaults to the source profile's organization if omitted.
|
|
1586
|
+
*/
|
|
1587
|
+
organizationId?: CommonUuid;
|
|
1588
|
+
};
|
|
1592
1589
|
/**
|
|
1593
1590
|
* Operating system to emulate in the browser
|
|
1594
1591
|
*/
|
|
@@ -2301,6 +2298,50 @@ type AgentProfileClearBrowserCacheResponses = {
|
|
|
2301
2298
|
};
|
|
2302
2299
|
};
|
|
2303
2300
|
type AgentProfileClearBrowserCacheResponse = AgentProfileClearBrowserCacheResponses[keyof AgentProfileClearBrowserCacheResponses];
|
|
2301
|
+
type AgentProfileDuplicateData = {
|
|
2302
|
+
/**
|
|
2303
|
+
* Optional request body for cross-org duplication
|
|
2304
|
+
*/
|
|
2305
|
+
body?: AgentsProfileDuplicateAgentProfileRequest;
|
|
2306
|
+
path: {
|
|
2307
|
+
/**
|
|
2308
|
+
* The ID of the agent profile to duplicate
|
|
2309
|
+
*/
|
|
2310
|
+
profileId: CommonUuid;
|
|
2311
|
+
};
|
|
2312
|
+
query?: never;
|
|
2313
|
+
url: '/agent-profiles/{profileId}/duplicate';
|
|
2314
|
+
};
|
|
2315
|
+
type AgentProfileDuplicateErrors = {
|
|
2316
|
+
/**
|
|
2317
|
+
* The server could not understand the request due to invalid syntax.
|
|
2318
|
+
*/
|
|
2319
|
+
400: CommonBadRequestErrorBody;
|
|
2320
|
+
/**
|
|
2321
|
+
* Access is unauthorized.
|
|
2322
|
+
*/
|
|
2323
|
+
401: CommonUnauthorizedErrorBody;
|
|
2324
|
+
/**
|
|
2325
|
+
* Access is forbidden.
|
|
2326
|
+
*/
|
|
2327
|
+
403: CommonForbiddenErrorBody;
|
|
2328
|
+
/**
|
|
2329
|
+
* The server cannot find the requested resource.
|
|
2330
|
+
*/
|
|
2331
|
+
404: CommonNotFoundErrorBody;
|
|
2332
|
+
/**
|
|
2333
|
+
* Server error
|
|
2334
|
+
*/
|
|
2335
|
+
500: CommonInternalServerErrorBody;
|
|
2336
|
+
};
|
|
2337
|
+
type AgentProfileDuplicateError = AgentProfileDuplicateErrors[keyof AgentProfileDuplicateErrors];
|
|
2338
|
+
type AgentProfileDuplicateResponses = {
|
|
2339
|
+
/**
|
|
2340
|
+
* The request has succeeded and a new resource has been created as a result.
|
|
2341
|
+
*/
|
|
2342
|
+
201: AgentsProfileAgentProfile;
|
|
2343
|
+
};
|
|
2344
|
+
type AgentProfileDuplicateResponse = AgentProfileDuplicateResponses[keyof AgentProfileDuplicateResponses];
|
|
2304
2345
|
type AgentListData = {
|
|
2305
2346
|
body?: never;
|
|
2306
2347
|
path?: never;
|
|
@@ -3130,6 +3171,12 @@ declare const agentProfileUpdate: <ThrowOnError extends boolean = false>(options
|
|
|
3130
3171
|
* Clears the browser profile/cache for the specified agent profile by deleting its browser profile
|
|
3131
3172
|
*/
|
|
3132
3173
|
declare const agentProfileClearBrowserCache: <ThrowOnError extends boolean = false>(options: Options<AgentProfileClearBrowserCacheData, ThrowOnError>) => RequestResult<AgentProfileClearBrowserCacheResponses, AgentProfileClearBrowserCacheErrors, ThrowOnError, "fields">;
|
|
3174
|
+
/**
|
|
3175
|
+
* Duplicate Agent Profile
|
|
3176
|
+
*
|
|
3177
|
+
* Duplicate an agent profile with all settings, credentials, and cookies
|
|
3178
|
+
*/
|
|
3179
|
+
declare const agentProfileDuplicate: <ThrowOnError extends boolean = false>(options: Options<AgentProfileDuplicateData, ThrowOnError>) => RequestResult<AgentProfileDuplicateResponses, AgentProfileDuplicateErrors, ThrowOnError, "fields">;
|
|
3133
3180
|
/**
|
|
3134
3181
|
* List Agents
|
|
3135
3182
|
*
|
|
@@ -3239,4 +3286,4 @@ declare const schemaValidationValidate: <ThrowOnError extends boolean = false>(o
|
|
|
3239
3286
|
*/
|
|
3240
3287
|
declare const tempFilesStage: <ThrowOnError extends boolean = false>(options: Options<TempFilesStageData, ThrowOnError>) => RequestResult<TempFilesStageResponses, TempFilesStageErrors, ThrowOnError, "fields">;
|
|
3241
3288
|
|
|
3242
|
-
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 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 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 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 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, agentProfileGet, agentProfileUpdate, agentProfilesCreate, agentProfilesList, agentWorkflowsCreate, agentWorkflowsExecute, agentWorkflowsGet, agentWorkflowsList, agentWorkflowsPublish, agentWorkflowsSyncExecution, client, docsSearchSearch, executionActivitiesGet, executionContextFilesGet, executionContextFilesUpload, executionGet, executionStatusUpdate, executionUserMessagesAdd, executionsList, schemaValidationValidate, tempFilesStage };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -518,16 +518,6 @@ type AgentsExecutionActivityActionStartedPayload = {
|
|
|
518
518
|
actionId: string;
|
|
519
519
|
info?: AgentsExecutionActivityActionStartedInfo;
|
|
520
520
|
};
|
|
521
|
-
type AgentsExecutionActivityContinuedOnNodePayload = {
|
|
522
|
-
activityType: 'continued_on_node';
|
|
523
|
-
nodeUUID: CommonUuid;
|
|
524
|
-
nodeName: string;
|
|
525
|
-
nodeType: string;
|
|
526
|
-
/**
|
|
527
|
-
* Reasoning for why the LLM decided to continue on the current node
|
|
528
|
-
*/
|
|
529
|
-
reasoning: string;
|
|
530
|
-
};
|
|
531
521
|
type AgentsExecutionActivityFileAddedPayload = {
|
|
532
522
|
activityType: 'file_added';
|
|
533
523
|
fileId: CommonUuid;
|
|
@@ -554,8 +544,6 @@ type AgentsExecutionActivityPayloadUnion = ({
|
|
|
554
544
|
} & AgentsExecutionActivityStepCompletedPayload) | ({
|
|
555
545
|
activityType: 'transitioned_node';
|
|
556
546
|
} & AgentsExecutionActivityTransitionedNodePayload) | ({
|
|
557
|
-
activityType: 'continued_on_node';
|
|
558
|
-
} & AgentsExecutionActivityContinuedOnNodePayload) | ({
|
|
559
547
|
activityType: 'status_changed';
|
|
560
548
|
} & AgentsExecutionActivityStatusChangedPayload) | ({
|
|
561
549
|
activityType: 'action_started';
|
|
@@ -1589,6 +1577,15 @@ type AgentsProfileCustomProxyConfigOutput = {
|
|
|
1589
1577
|
*/
|
|
1590
1578
|
username: string;
|
|
1591
1579
|
};
|
|
1580
|
+
/**
|
|
1581
|
+
* Request to duplicate an agent profile
|
|
1582
|
+
*/
|
|
1583
|
+
type AgentsProfileDuplicateAgentProfileRequest = {
|
|
1584
|
+
/**
|
|
1585
|
+
* Target organization ID. Defaults to the source profile's organization if omitted.
|
|
1586
|
+
*/
|
|
1587
|
+
organizationId?: CommonUuid;
|
|
1588
|
+
};
|
|
1592
1589
|
/**
|
|
1593
1590
|
* Operating system to emulate in the browser
|
|
1594
1591
|
*/
|
|
@@ -2301,6 +2298,50 @@ type AgentProfileClearBrowserCacheResponses = {
|
|
|
2301
2298
|
};
|
|
2302
2299
|
};
|
|
2303
2300
|
type AgentProfileClearBrowserCacheResponse = AgentProfileClearBrowserCacheResponses[keyof AgentProfileClearBrowserCacheResponses];
|
|
2301
|
+
type AgentProfileDuplicateData = {
|
|
2302
|
+
/**
|
|
2303
|
+
* Optional request body for cross-org duplication
|
|
2304
|
+
*/
|
|
2305
|
+
body?: AgentsProfileDuplicateAgentProfileRequest;
|
|
2306
|
+
path: {
|
|
2307
|
+
/**
|
|
2308
|
+
* The ID of the agent profile to duplicate
|
|
2309
|
+
*/
|
|
2310
|
+
profileId: CommonUuid;
|
|
2311
|
+
};
|
|
2312
|
+
query?: never;
|
|
2313
|
+
url: '/agent-profiles/{profileId}/duplicate';
|
|
2314
|
+
};
|
|
2315
|
+
type AgentProfileDuplicateErrors = {
|
|
2316
|
+
/**
|
|
2317
|
+
* The server could not understand the request due to invalid syntax.
|
|
2318
|
+
*/
|
|
2319
|
+
400: CommonBadRequestErrorBody;
|
|
2320
|
+
/**
|
|
2321
|
+
* Access is unauthorized.
|
|
2322
|
+
*/
|
|
2323
|
+
401: CommonUnauthorizedErrorBody;
|
|
2324
|
+
/**
|
|
2325
|
+
* Access is forbidden.
|
|
2326
|
+
*/
|
|
2327
|
+
403: CommonForbiddenErrorBody;
|
|
2328
|
+
/**
|
|
2329
|
+
* The server cannot find the requested resource.
|
|
2330
|
+
*/
|
|
2331
|
+
404: CommonNotFoundErrorBody;
|
|
2332
|
+
/**
|
|
2333
|
+
* Server error
|
|
2334
|
+
*/
|
|
2335
|
+
500: CommonInternalServerErrorBody;
|
|
2336
|
+
};
|
|
2337
|
+
type AgentProfileDuplicateError = AgentProfileDuplicateErrors[keyof AgentProfileDuplicateErrors];
|
|
2338
|
+
type AgentProfileDuplicateResponses = {
|
|
2339
|
+
/**
|
|
2340
|
+
* The request has succeeded and a new resource has been created as a result.
|
|
2341
|
+
*/
|
|
2342
|
+
201: AgentsProfileAgentProfile;
|
|
2343
|
+
};
|
|
2344
|
+
type AgentProfileDuplicateResponse = AgentProfileDuplicateResponses[keyof AgentProfileDuplicateResponses];
|
|
2304
2345
|
type AgentListData = {
|
|
2305
2346
|
body?: never;
|
|
2306
2347
|
path?: never;
|
|
@@ -3130,6 +3171,12 @@ declare const agentProfileUpdate: <ThrowOnError extends boolean = false>(options
|
|
|
3130
3171
|
* Clears the browser profile/cache for the specified agent profile by deleting its browser profile
|
|
3131
3172
|
*/
|
|
3132
3173
|
declare const agentProfileClearBrowserCache: <ThrowOnError extends boolean = false>(options: Options<AgentProfileClearBrowserCacheData, ThrowOnError>) => RequestResult<AgentProfileClearBrowserCacheResponses, AgentProfileClearBrowserCacheErrors, ThrowOnError, "fields">;
|
|
3174
|
+
/**
|
|
3175
|
+
* Duplicate Agent Profile
|
|
3176
|
+
*
|
|
3177
|
+
* Duplicate an agent profile with all settings, credentials, and cookies
|
|
3178
|
+
*/
|
|
3179
|
+
declare const agentProfileDuplicate: <ThrowOnError extends boolean = false>(options: Options<AgentProfileDuplicateData, ThrowOnError>) => RequestResult<AgentProfileDuplicateResponses, AgentProfileDuplicateErrors, ThrowOnError, "fields">;
|
|
3133
3180
|
/**
|
|
3134
3181
|
* List Agents
|
|
3135
3182
|
*
|
|
@@ -3239,4 +3286,4 @@ declare const schemaValidationValidate: <ThrowOnError extends boolean = false>(o
|
|
|
3239
3286
|
*/
|
|
3240
3287
|
declare const tempFilesStage: <ThrowOnError extends boolean = false>(options: Options<TempFilesStageData, ThrowOnError>) => RequestResult<TempFilesStageResponses, TempFilesStageErrors, ThrowOnError, "fields">;
|
|
3241
3288
|
|
|
3242
|
-
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 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 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 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 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, agentProfileGet, agentProfileUpdate, agentProfilesCreate, agentProfilesList, agentWorkflowsCreate, agentWorkflowsExecute, agentWorkflowsGet, agentWorkflowsList, agentWorkflowsPublish, agentWorkflowsSyncExecution, client, docsSearchSearch, executionActivitiesGet, executionContextFilesGet, executionContextFilesUpload, executionGet, executionStatusUpdate, executionUserMessagesAdd, executionsList, schemaValidationValidate, tempFilesStage };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
|
|
5
5
|
`);T=B.pop()??"";for(let re of B){let oe=re.split(`
|
|
6
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 P,K=!1;if(W.length){let h=W.join(`
|
|
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},b=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 b,request:new b,response:new b}),ue=J({allowReserved:false,array:{explode:true,style:"form"},object:{explode:true,style:"deepObject"}}),de={"Content-Type":"application/json"},D=(e={})=>({...I,headers:de,parseAs:"auto",querySerializer:ue,...e});var F=(e={})=>{let t=L(D(),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(D({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).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e}),me=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}}),we=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e}),Se=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}),Re=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}}),Ce=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/publish",...e}),Oe=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}}),Te=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}),De=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}",...e}),ke=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/activities",...e}),We=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e}),Ge=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}}),Ue=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}}),qe=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}}),ze=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}}),Ie=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=
|
|
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=ye;exports.agentProfileUpdate=Ee;exports.agentProfilesCreate=fe;exports.agentProfilesList=ge;exports.agentWorkflowsCreate=Pe;exports.agentWorkflowsExecute=Ce;exports.agentWorkflowsGet=Re;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.executionStatusUpdate=qe;exports.executionUserMessagesAdd=ze;exports.executionsList=be;exports.schemaValidationValidate=Ie;exports.tempFilesStage=ve;
|
package/dist/index.mjs
CHANGED
|
@@ -4,5 +4,5 @@ var V=(e,t,r)=>{typeof r=="string"||r instanceof Blob?e.append(t,r):r instanceof
|
|
|
4
4
|
|
|
5
5
|
`);T=B.pop()??"";for(let re of B){let oe=re.split(`
|
|
6
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 P,K=!1;if(W.length){let h=W.join(`
|
|
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},b=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 b,request:new b,response:new b}),ue=J({allowReserved:false,array:{explode:true,style:"form"},object:{explode:true,style:"deepObject"}}),de={"Content-Type":"application/json"},D=(e={})=>({...I,headers:de,parseAs:"auto",querySerializer:ue,...e});var F=(e={})=>{let t=L(D(),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(D({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).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents",...e}),me=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}}),we=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows",...e}),Se=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}),Re=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}}),Ce=e=>(e.client??p).post({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/agents/{agentId}/workflows/{workflowId}/publish",...e}),Oe=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}}),Te=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}),De=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}",...e}),ke=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/activities",...e}),We=e=>(e.client??p).get({security:[{name:"X-Asteroid-Agents-Api-Key",type:"apiKey"}],url:"/executions/{executionId}/context-files",...e}),Ge=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}}),Ue=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}}),qe=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}}),ze=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}}),Ie=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{
|
|
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,ye as agentProfileGet,Ee as agentProfileUpdate,fe as agentProfilesCreate,ge as agentProfilesList,Pe as agentWorkflowsCreate,Ce as agentWorkflowsExecute,Re 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 executionStatusUpdate,ze as executionUserMessagesAdd,be as executionsList,Ie as schemaValidationValidate,ve as tempFilesStage};
|