mavenagi 1.2.63 → 1.2.65
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/BaseClient.js +2 -2
- package/api/resources/actions/client/Client.js +3 -3
- package/api/resources/agents/client/Client.js +5 -5
- package/api/resources/agents/client/requests/AgentPatchRequest.d.ts +23 -3
- package/api/resources/agents/types/Agent.d.ts +9 -1
- package/api/resources/agents/types/AgentPrompting.d.ts +14 -2
- package/api/resources/appDirectory/client/Client.js +5 -5
- package/api/resources/assets/client/Client.js +1 -1
- package/api/resources/capabilities/client/Client.d.ts +68 -0
- package/api/resources/capabilities/client/Client.js +243 -3
- package/api/resources/capabilities/client/requests/CapabilitiesSearchRequest.d.ts +4 -1
- package/api/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.d.ts +36 -0
- package/api/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.js +3 -0
- package/api/resources/capabilities/client/requests/GetCapabilityByTypeRequest.d.ts +4 -1
- package/api/resources/capabilities/client/requests/SimulateCapabilityByTypeRequest.d.ts +14 -0
- package/api/resources/capabilities/client/requests/SimulateCapabilityByTypeRequest.js +3 -0
- package/api/resources/capabilities/client/requests/index.d.ts +2 -0
- package/api/resources/capabilities/types/ActionSimulationInput.d.ts +5 -0
- package/api/resources/capabilities/types/ActionSimulationInput.js +3 -0
- package/api/resources/capabilities/types/CapabilityExecution.d.ts +14 -0
- package/api/resources/capabilities/types/CapabilityExecution.js +3 -0
- package/api/resources/capabilities/types/CapabilityExecutionBase.d.ts +32 -0
- package/api/resources/capabilities/types/CapabilityExecutionBase.js +3 -0
- package/api/resources/capabilities/types/CapabilityExecutionCompletionReason.d.ts +36 -0
- package/api/resources/capabilities/types/CapabilityExecutionCompletionReason.js +39 -0
- package/api/resources/capabilities/types/CapabilityExecutionRetryability.d.ts +17 -0
- package/api/resources/capabilities/types/CapabilityExecutionRetryability.js +20 -0
- package/api/resources/capabilities/types/CapabilityExecutionStatus.d.ts +10 -0
- package/api/resources/capabilities/types/CapabilityExecutionStatus.js +13 -0
- package/api/resources/capabilities/types/CapabilityExecutionsSearchResponse.d.ts +62 -0
- package/api/resources/capabilities/types/CapabilityExecutionsSearchResponse.js +3 -0
- package/api/resources/capabilities/types/CapabilitySimulationInput.d.ts +11 -0
- package/api/resources/capabilities/types/CapabilitySimulationInput.js +3 -0
- package/api/resources/capabilities/types/CapabilitySimulationResult.d.ts +10 -0
- package/api/resources/capabilities/types/CapabilitySimulationResult.js +3 -0
- package/api/resources/capabilities/types/ConversationContextSimulationInput.d.ts +14 -0
- package/api/resources/capabilities/types/ConversationContextSimulationInput.js +3 -0
- package/api/resources/capabilities/types/ConversationKickoffCapabilityExecution.d.ts +7 -0
- package/api/resources/capabilities/types/ConversationKickoffCapabilityExecution.js +3 -0
- package/api/resources/capabilities/types/SimulatedUser.d.ts +9 -0
- package/api/resources/capabilities/types/SimulatedUser.js +3 -0
- package/api/resources/capabilities/types/SimulatedUserData.d.ts +6 -0
- package/api/resources/capabilities/types/SimulatedUserData.js +3 -0
- package/api/resources/capabilities/types/TriggerCapabilityExecution.d.ts +19 -0
- package/api/resources/capabilities/types/TriggerCapabilityExecution.js +3 -0
- package/api/resources/capabilities/types/index.d.ts +14 -0
- package/api/resources/capabilities/types/index.js +14 -0
- package/api/resources/charters/client/Client.js +7 -5
- package/api/resources/charters/client/requests/CharterDeleteRequest.d.ts +6 -6
- package/api/resources/charters/client/requests/CharterGetAncestorsRequest.d.ts +12 -0
- package/api/resources/charters/client/requests/CharterGetRequest.d.ts +9 -1
- package/api/resources/charters/client/requests/CharterPatchRequest.d.ts +5 -6
- package/api/resources/charters/types/CharterBase.d.ts +9 -4
- package/api/resources/charters/types/CharterChildrenExclusionPolicy.d.ts +2 -0
- package/api/resources/charters/types/CharterChildrenExclusionPolicy.js +2 -0
- package/api/resources/charters/types/CharterContent.d.ts +2 -0
- package/api/resources/charters/types/CharterListChildrenRequest.d.ts +10 -0
- package/api/resources/charters/types/CharterPatchReferences.d.ts +2 -0
- package/api/resources/charters/types/CharterReferences.d.ts +2 -0
- package/api/resources/charters/types/CharterResponse.d.ts +5 -1
- package/api/resources/charters/types/CharterSearchFilter.d.ts +9 -1
- package/api/resources/charters/types/CharterStatus.d.ts +4 -0
- package/api/resources/charters/types/CharterStatus.js +4 -0
- package/api/resources/charters/types/CharterSummary.d.ts +5 -1
- package/api/resources/charters/types/index.d.ts +0 -1
- package/api/resources/charters/types/index.js +0 -1
- package/api/resources/commons/types/ActionExecutionStatus.d.ts +6 -0
- package/api/resources/commons/types/ActionExecutionStatus.js +9 -0
- package/api/resources/commons/types/ActionProperties.d.ts +1 -1
- package/api/resources/commons/types/AdditionalDataKey.d.ts +3 -0
- package/api/resources/commons/types/AdditionalDataKey.js +3 -0
- package/api/resources/commons/types/AppUserRequest.d.ts +11 -0
- package/api/resources/commons/types/BotLogicCharterDetail.d.ts +3 -1
- package/api/resources/commons/types/BotLogicSegmentsItem.d.ts +3 -0
- package/api/resources/commons/types/BotMessage.d.ts +5 -0
- package/api/resources/commons/types/BotMessageStatusReason.d.ts +13 -0
- package/api/resources/commons/types/BotMessageStatusReason.js +16 -0
- package/api/resources/commons/types/Capability.d.ts +4 -0
- package/api/resources/commons/types/Capability.js +4 -0
- package/api/resources/commons/types/CapabilityStatus.d.ts +2 -2
- package/api/resources/commons/types/CapabilityStatus.js +2 -2
- package/api/resources/commons/types/ConversationAnalysis.d.ts +2 -2
- package/api/resources/commons/types/ConversationMetadataValueSource.d.ts +7 -0
- package/api/resources/commons/types/ConversationMetadataValueSource.js +3 -0
- package/api/resources/commons/types/ConversationSummary.d.ts +5 -3
- package/api/resources/commons/types/ConversationValueSource.d.ts +10 -0
- package/api/resources/commons/types/ConversationValueSource.js +3 -0
- package/api/resources/commons/types/EntityType.d.ts +5 -0
- package/api/resources/commons/types/EntityType.js +5 -0
- package/api/resources/commons/types/ErrorReason.d.ts +6 -0
- package/api/resources/commons/types/ErrorReason.js +6 -0
- package/api/resources/commons/types/EventFilter.d.ts +1 -0
- package/api/resources/commons/types/ExecuteActionResponse.d.ts +14 -0
- package/api/resources/commons/types/ExecuteActionResponse.js +3 -0
- package/api/resources/commons/types/ExecutionMode.d.ts +10 -0
- package/api/resources/commons/types/ExecutionMode.js +13 -0
- package/api/resources/commons/types/FunctionVersionBinding.d.ts +11 -0
- package/api/resources/commons/types/FunctionVersionBinding.js +3 -0
- package/api/resources/commons/types/InboxItemDuplicateDocuments.d.ts +1 -1
- package/api/resources/commons/types/InboxItemStatus.d.ts +1 -1
- package/api/resources/commons/types/InboxItemStatus.js +1 -1
- package/api/resources/commons/types/LlmInclusionStatus.d.ts +3 -0
- package/api/resources/commons/types/LlmInclusionStatus.js +3 -0
- package/api/resources/commons/types/MetadataConversationValueFilter.d.ts +15 -0
- package/api/resources/commons/types/MetadataConversationValueFilter.js +3 -0
- package/api/resources/commons/types/MetadataFilter.d.ts +33 -6
- package/api/resources/commons/types/Quality.d.ts +2 -0
- package/api/resources/commons/types/Quality.js +2 -0
- package/api/resources/commons/types/QualityReason.d.ts +4 -0
- package/api/resources/commons/types/QualityReason.js +4 -0
- package/api/resources/commons/types/RelationshipType.d.ts +2 -2
- package/api/resources/commons/types/RelationshipType.js +2 -2
- package/api/resources/commons/types/ResolutionStatus.d.ts +2 -0
- package/api/resources/commons/types/ResolutionStatus.js +2 -0
- package/api/resources/commons/types/ResponseConfig.d.ts +2 -0
- package/api/resources/commons/types/SimulationActionBehavior.d.ts +18 -0
- package/api/resources/commons/types/SimulationActionBehavior.js +3 -0
- package/api/resources/commons/types/SimulationActionCallApp.d.ts +1 -0
- package/api/resources/commons/types/SimulationActionCallApp.js +3 -0
- package/api/resources/commons/types/SimulationActionMock.d.ts +6 -0
- package/api/resources/commons/types/SimulationActionMock.js +3 -0
- package/api/resources/commons/types/SimulationContext.d.ts +19 -0
- package/api/resources/commons/types/SystemEventName.d.ts +5 -2
- package/api/resources/commons/types/SystemEventName.js +5 -2
- package/api/resources/commons/types/UserEvent.d.ts +1 -1
- package/api/resources/commons/types/UserEventName.d.ts +1 -1
- package/api/resources/commons/types/UserEventName.js +1 -1
- package/api/resources/commons/types/index.d.ts +12 -0
- package/api/resources/commons/types/index.js +12 -0
- package/api/resources/conversation/client/Client.d.ts +17 -9
- package/api/resources/conversation/client/Client.js +27 -19
- package/api/resources/conversation/client/requests/ConversationDeleteRequest.d.ts +1 -1
- package/api/resources/conversation/types/BillableFilterField.d.ts +3 -3
- package/api/resources/conversation/types/BillableFilterField.js +3 -3
- package/api/resources/conversation/types/ConversationField.d.ts +8 -0
- package/api/resources/conversation/types/ConversationField.js +8 -0
- package/api/resources/conversation/types/ConversationFilter.d.ts +7 -1
- package/api/resources/conversation/types/ConversationPatchRequest.d.ts +1 -1
- package/api/resources/customers/client/Client.js +2 -2
- package/api/resources/customers/types/CustomerFilter.d.ts +16 -1
- package/api/resources/customers/types/CustomerResponse.d.ts +2 -2
- package/api/resources/events/client/Client.js +1 -1
- package/api/resources/inbox/client/Client.js +6 -6
- package/api/resources/integrations/client/Client.js +1 -1
- package/api/resources/intelligentFields/client/Client.d.ts +4 -3
- package/api/resources/intelligentFields/client/Client.js +7 -6
- package/api/resources/intelligentFields/client/requests/IntelligentFieldGetRequest.d.ts +9 -1
- package/api/resources/intelligentFields/types/EnumOption.d.ts +1 -1
- package/api/resources/intelligentFields/types/IntelligentFieldBase.d.ts +1 -1
- package/api/resources/intelligentFields/types/IntelligentFieldCore.d.ts +5 -1
- package/api/resources/intelligentFields/types/IntelligentFieldType.d.ts +1 -1
- package/api/resources/intelligentFields/types/IntelligentFieldType.js +1 -1
- package/api/resources/intelligentFields/types/IntelligentFieldValueSearchRequest.d.ts +5 -4
- package/api/resources/knowledge/client/Client.js +13 -13
- package/api/resources/knowledge/types/KnowledgeBaseIndexingStatus.d.ts +1 -1
- package/api/resources/knowledge/types/KnowledgeBaseIndexingStatus.js +1 -1
- package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +3 -1
- package/api/resources/knowledge/types/KnowledgeBaseType.d.ts +2 -0
- package/api/resources/knowledge/types/KnowledgeBaseType.js +2 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +2 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersionStatus.d.ts +4 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersionStatus.js +4 -0
- package/api/resources/organizations/client/Client.js +4 -4
- package/api/resources/segments/client/Client.d.ts +1 -1
- package/api/resources/segments/client/Client.js +4 -4
- package/api/resources/segments/types/SegmentStatus.d.ts +4 -0
- package/api/resources/segments/types/SegmentStatus.js +4 -0
- package/api/resources/triggers/client/Client.js +3 -3
- package/api/resources/triggers/types/EventTriggerBase.d.ts +2 -0
- package/api/resources/users/client/Client.d.ts +42 -1
- package/api/resources/users/client/Client.js +116 -4
- package/api/resources/users/types/AgentUser.d.ts +3 -0
- package/api/resources/users/types/AgentUserFilter.d.ts +4 -0
- package/api/resources/voiceConversations/client/Client.d.ts +1 -1
- package/api/resources/voiceConversations/client/Socket.d.ts +2 -2
- package/api/resources/voiceConversations/client/Socket.js +16 -17
- package/core/fetcher/Fetcher.js +33 -3
- package/core/fetcher/getErrorResponseBody.js +20 -7
- package/core/fetcher/getResponseBody.d.ts +16 -0
- package/core/fetcher/getResponseBody.js +27 -22
- package/core/fetcher/makePassthroughRequest.js +20 -4
- package/core/fetcher/makeRequest.d.ts +6 -1
- package/core/fetcher/makeRequest.js +38 -5
- package/core/fetcher/requestWithRetries.d.ts +1 -1
- package/core/fetcher/requestWithRetries.js +23 -2
- package/core/fetcher/signals.d.ts +1 -0
- package/core/fetcher/signals.js +3 -2
- package/core/stream/Stream.d.ts +3 -0
- package/core/stream/Stream.js +5 -0
- package/core/url/encodePathParam.d.ts +3 -1
- package/core/url/encodePathParam.js +8 -2
- package/core/websocket/ws.d.ts +16 -2
- package/core/websocket/ws.js +110 -20
- package/errors/MavenAGIError.js +16 -2
- package/package.json +1 -1
- package/reference.md +273 -13
- package/serialization/resources/agents/client/requests/AgentPatchRequest.d.ts +2 -0
- package/serialization/resources/agents/client/requests/AgentPatchRequest.js +2 -0
- package/serialization/resources/agents/types/Agent.d.ts +2 -0
- package/serialization/resources/agents/types/Agent.js +2 -0
- package/serialization/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.d.ts +16 -0
- package/serialization/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.js +50 -0
- package/serialization/resources/capabilities/client/requests/index.d.ts +1 -0
- package/serialization/resources/capabilities/client/requests/index.js +3 -1
- package/serialization/resources/capabilities/types/ActionSimulationInput.d.ts +10 -0
- package/serialization/resources/capabilities/types/ActionSimulationInput.js +44 -0
- package/serialization/resources/capabilities/types/CapabilityExecution.d.ts +15 -0
- package/serialization/resources/capabilities/types/CapabilityExecution.js +49 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionBase.d.ts +20 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionBase.js +52 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionCompletionReason.d.ts +7 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionCompletionReason.js +50 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionRetryability.d.ts +7 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionRetryability.js +39 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionStatus.d.ts +7 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionStatus.js +39 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionsSearchResponse.d.ts +11 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionsSearchResponse.js +45 -0
- package/serialization/resources/capabilities/types/CapabilitySimulationInput.d.ts +11 -0
- package/serialization/resources/capabilities/types/CapabilitySimulationInput.js +47 -0
- package/serialization/resources/capabilities/types/CapabilitySimulationResult.d.ts +11 -0
- package/serialization/resources/capabilities/types/CapabilitySimulationResult.js +47 -0
- package/serialization/resources/capabilities/types/ConversationContextSimulationInput.d.ts +12 -0
- package/serialization/resources/capabilities/types/ConversationContextSimulationInput.js +46 -0
- package/serialization/resources/capabilities/types/ConversationKickoffCapabilityExecution.d.ts +9 -0
- package/serialization/resources/capabilities/types/ConversationKickoffCapabilityExecution.js +40 -0
- package/serialization/resources/capabilities/types/SimulatedUser.d.ts +10 -0
- package/serialization/resources/capabilities/types/SimulatedUser.js +44 -0
- package/serialization/resources/capabilities/types/SimulatedUserData.d.ts +10 -0
- package/serialization/resources/capabilities/types/SimulatedUserData.js +42 -0
- package/serialization/resources/capabilities/types/TriggerCapabilityExecution.d.ts +15 -0
- package/serialization/resources/capabilities/types/TriggerCapabilityExecution.js +49 -0
- package/serialization/resources/capabilities/types/index.d.ts +14 -0
- package/serialization/resources/capabilities/types/index.js +14 -0
- package/serialization/resources/charters/types/CharterContent.d.ts +1 -1
- package/serialization/resources/charters/types/CharterContent.js +1 -1
- package/serialization/resources/charters/types/CharterListChildrenRequest.d.ts +2 -0
- package/serialization/resources/charters/types/CharterListChildrenRequest.js +2 -0
- package/serialization/resources/charters/types/CharterResponse.d.ts +1 -1
- package/serialization/resources/charters/types/CharterResponse.js +1 -1
- package/serialization/resources/charters/types/CharterSummary.d.ts +1 -1
- package/serialization/resources/charters/types/CharterSummary.js +1 -1
- package/serialization/resources/charters/types/index.d.ts +0 -1
- package/serialization/resources/charters/types/index.js +0 -1
- package/serialization/resources/commons/types/ActionExecutionStatus.d.ts +7 -0
- package/serialization/resources/commons/types/ActionExecutionStatus.js +39 -0
- package/serialization/resources/commons/types/AdditionalDataKey.d.ts +1 -1
- package/serialization/resources/commons/types/AdditionalDataKey.js +1 -0
- package/serialization/resources/commons/types/AppUserRequest.d.ts +2 -0
- package/serialization/resources/commons/types/AppUserRequest.js +2 -0
- package/serialization/resources/commons/types/BotLogicCharterDetail.d.ts +2 -0
- package/serialization/resources/commons/types/BotLogicCharterDetail.js +2 -0
- package/serialization/resources/commons/types/BotMessage.d.ts +2 -0
- package/serialization/resources/commons/types/BotMessage.js +2 -0
- package/serialization/resources/commons/types/BotMessageStatusReason.d.ts +7 -0
- package/serialization/resources/commons/types/BotMessageStatusReason.js +43 -0
- package/serialization/resources/commons/types/ConversationMetadataValueSource.d.ts +9 -0
- package/serialization/resources/commons/types/ConversationMetadataValueSource.js +41 -0
- package/serialization/resources/commons/types/ConversationValueSource.d.ts +11 -0
- package/serialization/resources/commons/types/ConversationValueSource.js +47 -0
- package/serialization/resources/commons/types/EntityType.d.ts +1 -1
- package/serialization/resources/commons/types/EntityType.js +5 -0
- package/serialization/resources/commons/types/ErrorReason.d.ts +1 -1
- package/serialization/resources/commons/types/ErrorReason.js +2 -0
- package/serialization/resources/commons/types/ExecuteActionResponse.d.ts +13 -0
- package/serialization/resources/commons/types/ExecuteActionResponse.js +45 -0
- package/serialization/resources/commons/types/ExecutionMode.d.ts +7 -0
- package/serialization/resources/commons/types/ExecutionMode.js +39 -0
- package/serialization/resources/commons/types/FunctionVersionBinding.d.ts +11 -0
- package/serialization/resources/commons/types/FunctionVersionBinding.js +43 -0
- package/serialization/resources/commons/types/MetadataConversationValueFilter.d.ts +11 -0
- package/serialization/resources/commons/types/MetadataConversationValueFilter.js +43 -0
- package/serialization/resources/commons/types/MetadataFilter.d.ts +5 -1
- package/serialization/resources/commons/types/MetadataFilter.js +2 -0
- package/serialization/resources/commons/types/SimulationActionBehavior.d.ts +15 -0
- package/serialization/resources/commons/types/SimulationActionBehavior.js +49 -0
- package/serialization/resources/commons/types/SimulationActionCallApp.d.ts +7 -0
- package/serialization/resources/commons/types/SimulationActionCallApp.js +39 -0
- package/serialization/resources/commons/types/SimulationActionMock.d.ts +12 -0
- package/serialization/resources/commons/types/SimulationActionMock.js +44 -0
- package/serialization/resources/commons/types/SimulationContext.d.ts +4 -0
- package/serialization/resources/commons/types/SimulationContext.js +4 -0
- package/serialization/resources/commons/types/SystemEventName.d.ts +1 -1
- package/serialization/resources/commons/types/SystemEventName.js +1 -0
- package/serialization/resources/commons/types/index.d.ts +12 -0
- package/serialization/resources/commons/types/index.js +12 -0
- package/serialization/resources/users/types/AgentUser.d.ts +2 -0
- package/serialization/resources/users/types/AgentUser.js +2 -0
- package/serialization/resources/users/types/AgentUserFilter.d.ts +2 -0
- package/serialization/resources/users/types/AgentUserFilter.js +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- /package/api/resources/{charters → commons}/types/CharterType.d.ts +0 -0
- /package/api/resources/{charters → commons}/types/CharterType.js +0 -0
- /package/serialization/resources/{charters → commons}/types/CharterType.d.ts +0 -0
- /package/serialization/resources/{charters → commons}/types/CharterType.js +0 -0
package/core/websocket/ws.js
CHANGED
|
@@ -80,6 +80,7 @@ class ReconnectingWebSocket {
|
|
|
80
80
|
this._binaryType = "blob";
|
|
81
81
|
this._closeCalled = false;
|
|
82
82
|
this._messageQueue = [];
|
|
83
|
+
this._openWaiters = new Set();
|
|
83
84
|
this.CONNECTING = ReconnectingWebSocket.CONNECTING;
|
|
84
85
|
this.OPEN = ReconnectingWebSocket.OPEN;
|
|
85
86
|
this.CLOSING = ReconnectingWebSocket.CLOSING;
|
|
@@ -109,17 +110,20 @@ class ReconnectingWebSocket {
|
|
|
109
110
|
this._shouldReconnect = false;
|
|
110
111
|
this._closeCalled = true;
|
|
111
112
|
this._clearTimeouts();
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
113
|
+
this._notifyOpenWaiters();
|
|
114
|
+
if (!this._ws) {
|
|
115
|
+
this._emitClose(new Events.CloseEvent(1000, "aborted", this));
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
this._removeListeners();
|
|
119
|
+
// Absorb async errors emitted by ws when closing during CONNECTING state
|
|
120
|
+
this._ws.addEventListener("error", () => { });
|
|
121
|
+
try {
|
|
122
|
+
this._ws.close(1000, "aborted");
|
|
123
|
+
this._emitClose(new Events.CloseEvent(1000, "aborted", this));
|
|
124
|
+
}
|
|
125
|
+
catch (_error) {
|
|
126
|
+
// ignore
|
|
123
127
|
}
|
|
124
128
|
};
|
|
125
129
|
this._handleOpen = (event) => {
|
|
@@ -162,10 +166,7 @@ class ReconnectingWebSocket {
|
|
|
162
166
|
if (this._shouldReconnect) {
|
|
163
167
|
this._connect();
|
|
164
168
|
}
|
|
165
|
-
|
|
166
|
-
this.onclose(event);
|
|
167
|
-
}
|
|
168
|
-
this._listeners.close.forEach((listener) => this._callEventListener(event, listener));
|
|
169
|
+
this._emitClose(event);
|
|
169
170
|
};
|
|
170
171
|
this._url = url;
|
|
171
172
|
this._protocols = protocols;
|
|
@@ -236,12 +237,14 @@ class ReconnectingWebSocket {
|
|
|
236
237
|
* The current state of the connection; this is one of the Ready state constants
|
|
237
238
|
*/
|
|
238
239
|
get readyState() {
|
|
240
|
+
var _a;
|
|
239
241
|
if (this._ws) {
|
|
240
242
|
return this._ws.readyState;
|
|
241
243
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
244
|
+
if (this._options.startClosed || this._closeCalled || ((_a = this._abortSignal) === null || _a === void 0 ? void 0 : _a.aborted)) {
|
|
245
|
+
return ReconnectingWebSocket.ReadyState.CLOSED;
|
|
246
|
+
}
|
|
247
|
+
return ReconnectingWebSocket.ReadyState.CONNECTING;
|
|
245
248
|
}
|
|
246
249
|
/**
|
|
247
250
|
* The URL as resolved by the constructor
|
|
@@ -257,6 +260,7 @@ class ReconnectingWebSocket {
|
|
|
257
260
|
this._closeCalled = true;
|
|
258
261
|
this._shouldReconnect = false;
|
|
259
262
|
this._clearTimeouts();
|
|
263
|
+
this._notifyOpenWaiters();
|
|
260
264
|
if (!this._ws) {
|
|
261
265
|
this._debug("close enqueued: no ws instance");
|
|
262
266
|
return;
|
|
@@ -308,6 +312,58 @@ class ReconnectingWebSocket {
|
|
|
308
312
|
this._listeners[type].push(listener);
|
|
309
313
|
}
|
|
310
314
|
}
|
|
315
|
+
/**
|
|
316
|
+
* Resolves once the connection is open. Rejects on an error event, or once the connection is closed and no
|
|
317
|
+
* connection attempt or reconnect is pending (for example after close(), an abort, or a terminal close).
|
|
318
|
+
*/
|
|
319
|
+
waitForOpen() {
|
|
320
|
+
if (this.readyState === ReconnectingWebSocket.ReadyState.OPEN) {
|
|
321
|
+
return Promise.resolve();
|
|
322
|
+
}
|
|
323
|
+
if (this._willNotOpen()) {
|
|
324
|
+
return Promise.reject(new Error("WebSocket closed before the connection was opened"));
|
|
325
|
+
}
|
|
326
|
+
return new Promise((resolve, reject) => {
|
|
327
|
+
const cleanup = () => {
|
|
328
|
+
this._openWaiters.delete(check);
|
|
329
|
+
this.removeEventListener("open", onOpen);
|
|
330
|
+
this.removeEventListener("error", onError);
|
|
331
|
+
this.removeEventListener("close", check);
|
|
332
|
+
};
|
|
333
|
+
const onOpen = () => {
|
|
334
|
+
cleanup();
|
|
335
|
+
resolve();
|
|
336
|
+
};
|
|
337
|
+
const onError = (event) => {
|
|
338
|
+
cleanup();
|
|
339
|
+
reject(event);
|
|
340
|
+
};
|
|
341
|
+
// Deferred so that a reconnect or error triggered by the same close is accounted for first
|
|
342
|
+
const check = () => {
|
|
343
|
+
Promise.resolve().then(() => {
|
|
344
|
+
if (this._openWaiters.has(check) && this._willNotOpen()) {
|
|
345
|
+
cleanup();
|
|
346
|
+
reject(new Error("WebSocket closed before the connection was opened"));
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
};
|
|
350
|
+
this._openWaiters.add(check);
|
|
351
|
+
this.addEventListener("open", onOpen);
|
|
352
|
+
this.addEventListener("error", onError);
|
|
353
|
+
this.addEventListener("close", check);
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Returns whether the given listener is registered for the event type
|
|
358
|
+
*/
|
|
359
|
+
hasEventListener(type, listener) {
|
|
360
|
+
const listeners = this._listeners[type];
|
|
361
|
+
if (!listeners) {
|
|
362
|
+
return false;
|
|
363
|
+
}
|
|
364
|
+
// @ts-ignore
|
|
365
|
+
return listeners.some((l) => l === listener);
|
|
366
|
+
}
|
|
311
367
|
dispatchEvent(event) {
|
|
312
368
|
const listeners = this._listeners[event.type];
|
|
313
369
|
if (listeners) {
|
|
@@ -378,12 +434,12 @@ class ReconnectingWebSocket {
|
|
|
378
434
|
this._debug("connect aborted");
|
|
379
435
|
return;
|
|
380
436
|
}
|
|
381
|
-
this._connectLock = true;
|
|
382
437
|
const { maxRetries = DEFAULT_OPTIONS.maxRetries, connectionTimeout = DEFAULT_OPTIONS.connectionTimeout, WebSocket = getGlobalWebSocket(), } = this._options;
|
|
383
438
|
if (this._retryCount >= maxRetries) {
|
|
384
439
|
this._debug("max retries reached", this._retryCount, ">=", maxRetries);
|
|
385
440
|
return;
|
|
386
441
|
}
|
|
442
|
+
this._connectLock = true;
|
|
387
443
|
this._retryCount++;
|
|
388
444
|
this._debug("connect", this._retryCount);
|
|
389
445
|
this._removeListeners();
|
|
@@ -413,8 +469,36 @@ class ReconnectingWebSocket {
|
|
|
413
469
|
this._connectLock = false;
|
|
414
470
|
this._addListeners();
|
|
415
471
|
this._connectTimeout = setTimeout(() => this._handleTimeout(), connectionTimeout);
|
|
472
|
+
})
|
|
473
|
+
.catch((error) => {
|
|
474
|
+
this._debug("connect failed", error);
|
|
475
|
+
this._connectLock = false;
|
|
476
|
+
const event = new Events.ErrorEvent(error instanceof Error ? error : new Error(String(error)), this);
|
|
477
|
+
if (this.onerror) {
|
|
478
|
+
this.onerror(event);
|
|
479
|
+
}
|
|
480
|
+
this._listeners.error.forEach((listener) => this._callEventListener(event, listener));
|
|
481
|
+
this._connect();
|
|
416
482
|
});
|
|
417
483
|
}
|
|
484
|
+
_willNotOpen() {
|
|
485
|
+
var _a;
|
|
486
|
+
if (this._closeCalled || ((_a = this._abortSignal) === null || _a === void 0 ? void 0 : _a.aborted)) {
|
|
487
|
+
return true;
|
|
488
|
+
}
|
|
489
|
+
if (this._connectLock) {
|
|
490
|
+
return false;
|
|
491
|
+
}
|
|
492
|
+
if (!this._ws) {
|
|
493
|
+
return true;
|
|
494
|
+
}
|
|
495
|
+
return this._ws.readyState === ReconnectingWebSocket.ReadyState.CLOSED;
|
|
496
|
+
}
|
|
497
|
+
_notifyOpenWaiters() {
|
|
498
|
+
for (const waiter of [...this._openWaiters]) {
|
|
499
|
+
waiter();
|
|
500
|
+
}
|
|
501
|
+
}
|
|
418
502
|
_handleTimeout() {
|
|
419
503
|
this._debug("timeout event");
|
|
420
504
|
this._handleError(new Events.ErrorEvent(Error("TIMEOUT"), this));
|
|
@@ -429,7 +513,7 @@ class ReconnectingWebSocket {
|
|
|
429
513
|
this._ws.addEventListener("error", () => { });
|
|
430
514
|
try {
|
|
431
515
|
this._ws.close(code, reason);
|
|
432
|
-
this.
|
|
516
|
+
this._emitClose(new Events.CloseEvent(code, reason, this));
|
|
433
517
|
}
|
|
434
518
|
catch (_error) {
|
|
435
519
|
// ignore
|
|
@@ -449,6 +533,12 @@ class ReconnectingWebSocket {
|
|
|
449
533
|
listener(event);
|
|
450
534
|
}
|
|
451
535
|
}
|
|
536
|
+
_emitClose(event) {
|
|
537
|
+
if (this.onclose) {
|
|
538
|
+
this.onclose(event);
|
|
539
|
+
}
|
|
540
|
+
this._listeners.close.forEach((listener) => this._callEventListener(event, listener));
|
|
541
|
+
}
|
|
452
542
|
_isReconnectableClose(event) {
|
|
453
543
|
const { shouldReconnect = DEFAULT_OPTIONS.shouldReconnect } = this._options;
|
|
454
544
|
try {
|
package/errors/MavenAGIError.js
CHANGED
|
@@ -19,8 +19,22 @@ class MavenAGIError extends Error {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
get requestId() {
|
|
22
|
-
var _a
|
|
23
|
-
|
|
22
|
+
var _a;
|
|
23
|
+
const headers = (_a = this.rawResponse) === null || _a === void 0 ? void 0 : _a.headers;
|
|
24
|
+
if (headers == null) {
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
const requestId = headers.get("X-Request-Id");
|
|
28
|
+
if (requestId != null) {
|
|
29
|
+
return requestId;
|
|
30
|
+
}
|
|
31
|
+
let fallback;
|
|
32
|
+
headers.forEach((value, name) => {
|
|
33
|
+
if (fallback === undefined && /request[-_]?id$/i.test(name)) {
|
|
34
|
+
fallback = value;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
return fallback;
|
|
24
38
|
}
|
|
25
39
|
}
|
|
26
40
|
exports.MavenAGIError = MavenAGIError;
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -2373,6 +2373,97 @@ await client.capabilities.deleteCapability("ACTION", "referenceId");
|
|
|
2373
2373
|
</dl>
|
|
2374
2374
|
|
|
2375
2375
|
|
|
2376
|
+
</dd>
|
|
2377
|
+
</dl>
|
|
2378
|
+
</details>
|
|
2379
|
+
|
|
2380
|
+
<details><summary><code>client.capabilities.<a href="/src/api/resources/capabilities/client/Client.ts">simulateCapability</a>(capabilityType, referenceId, { ...params }) -> MavenAGI.CapabilitySimulationResult</code></summary>
|
|
2381
|
+
<dl>
|
|
2382
|
+
<dd>
|
|
2383
|
+
|
|
2384
|
+
#### 📝 Description
|
|
2385
|
+
|
|
2386
|
+
<dl>
|
|
2387
|
+
<dd>
|
|
2388
|
+
|
|
2389
|
+
<dl>
|
|
2390
|
+
<dd>
|
|
2391
|
+
|
|
2392
|
+
Run one of an agent's capabilities once, as a simulation, and return what it produced.
|
|
2393
|
+
|
|
2394
|
+
The caller supplies everything the capability reads, so it runs in isolation: no
|
|
2395
|
+
conversation or agent user has to exist first. The capability is told its mode is
|
|
2396
|
+
`SIMULATION`, the same as in a test suite run, so an app that honours it can avoid side
|
|
2397
|
+
effects in real systems. Nothing here runs a capability live.
|
|
2398
|
+
|
|
2399
|
+
Only actions can be simulated today. Triggers and conversation kickoffs are rejected with a
|
|
2400
|
+
400 until they can run as simulations. Intelligent fields cannot be simulated.
|
|
2401
|
+
</dd>
|
|
2402
|
+
</dl>
|
|
2403
|
+
</dd>
|
|
2404
|
+
</dl>
|
|
2405
|
+
|
|
2406
|
+
#### 🔌 Usage
|
|
2407
|
+
|
|
2408
|
+
<dl>
|
|
2409
|
+
<dd>
|
|
2410
|
+
|
|
2411
|
+
<dl>
|
|
2412
|
+
<dd>
|
|
2413
|
+
|
|
2414
|
+
```typescript
|
|
2415
|
+
await client.capabilities.simulateCapability("ACTION", "referenceId", {
|
|
2416
|
+
body: {
|
|
2417
|
+
capabilityType: "ACTION"
|
|
2418
|
+
}
|
|
2419
|
+
});
|
|
2420
|
+
|
|
2421
|
+
```
|
|
2422
|
+
</dd>
|
|
2423
|
+
</dl>
|
|
2424
|
+
</dd>
|
|
2425
|
+
</dl>
|
|
2426
|
+
|
|
2427
|
+
#### ⚙️ Parameters
|
|
2428
|
+
|
|
2429
|
+
<dl>
|
|
2430
|
+
<dd>
|
|
2431
|
+
|
|
2432
|
+
<dl>
|
|
2433
|
+
<dd>
|
|
2434
|
+
|
|
2435
|
+
**capabilityType:** `MavenAGI.CapabilityType` — Which kind of capability to simulate. Must match the body's `capabilityType`.
|
|
2436
|
+
|
|
2437
|
+
</dd>
|
|
2438
|
+
</dl>
|
|
2439
|
+
|
|
2440
|
+
<dl>
|
|
2441
|
+
<dd>
|
|
2442
|
+
|
|
2443
|
+
**referenceId:** `string` — The capability's reference ID, unique within its type and app.
|
|
2444
|
+
|
|
2445
|
+
</dd>
|
|
2446
|
+
</dl>
|
|
2447
|
+
|
|
2448
|
+
<dl>
|
|
2449
|
+
<dd>
|
|
2450
|
+
|
|
2451
|
+
**request:** `MavenAGI.SimulateCapabilityByTypeRequest`
|
|
2452
|
+
|
|
2453
|
+
</dd>
|
|
2454
|
+
</dl>
|
|
2455
|
+
|
|
2456
|
+
<dl>
|
|
2457
|
+
<dd>
|
|
2458
|
+
|
|
2459
|
+
**requestOptions:** `CapabilitiesClient.RequestOptions`
|
|
2460
|
+
|
|
2461
|
+
</dd>
|
|
2462
|
+
</dl>
|
|
2463
|
+
</dd>
|
|
2464
|
+
</dl>
|
|
2465
|
+
|
|
2466
|
+
|
|
2376
2467
|
</dd>
|
|
2377
2468
|
</dl>
|
|
2378
2469
|
</details>
|
|
@@ -2444,6 +2535,85 @@ await client.capabilities.searchCapabilities();
|
|
|
2444
2535
|
</dl>
|
|
2445
2536
|
|
|
2446
2537
|
|
|
2538
|
+
</dd>
|
|
2539
|
+
</dl>
|
|
2540
|
+
</details>
|
|
2541
|
+
|
|
2542
|
+
<details><summary><code>client.capabilities.<a href="/src/api/resources/capabilities/client/Client.ts">searchCapabilityExecutions</a>({ ...params }) -> MavenAGI.CapabilityExecutionsSearchResponse</code></summary>
|
|
2543
|
+
<dl>
|
|
2544
|
+
<dd>
|
|
2545
|
+
|
|
2546
|
+
#### 📝 Description
|
|
2547
|
+
|
|
2548
|
+
<dl>
|
|
2549
|
+
<dd>
|
|
2550
|
+
|
|
2551
|
+
<dl>
|
|
2552
|
+
<dd>
|
|
2553
|
+
|
|
2554
|
+
Search the recorded runs of an agent's capabilities, newest first by default. An execution
|
|
2555
|
+
is one run of one capability for one subject, with its outcome and timing: an Event
|
|
2556
|
+
Trigger notifying its app, or a Conversation Kickoff running when a conversation started.
|
|
2557
|
+
|
|
2558
|
+
Pass a conversation in `subjectIds` to get the executions recorded against it. An
|
|
2559
|
+
`EVENT_CREATED` trigger records the event as its subject, so pass the event's ID to find
|
|
2560
|
+
those.
|
|
2561
|
+
|
|
2562
|
+
Results can trail a run by a few seconds. Executions are searchable for 90 days.
|
|
2563
|
+
</dd>
|
|
2564
|
+
</dl>
|
|
2565
|
+
</dd>
|
|
2566
|
+
</dl>
|
|
2567
|
+
|
|
2568
|
+
#### 🔌 Usage
|
|
2569
|
+
|
|
2570
|
+
<dl>
|
|
2571
|
+
<dd>
|
|
2572
|
+
|
|
2573
|
+
<dl>
|
|
2574
|
+
<dd>
|
|
2575
|
+
|
|
2576
|
+
```typescript
|
|
2577
|
+
await client.capabilities.searchCapabilityExecutions({
|
|
2578
|
+
subjectIds: [{
|
|
2579
|
+
referenceId: "conversation-123",
|
|
2580
|
+
appId: "zendesk",
|
|
2581
|
+
organizationId: "acme",
|
|
2582
|
+
agentId: "support",
|
|
2583
|
+
type: "CONVERSATION"
|
|
2584
|
+
}]
|
|
2585
|
+
});
|
|
2586
|
+
|
|
2587
|
+
```
|
|
2588
|
+
</dd>
|
|
2589
|
+
</dl>
|
|
2590
|
+
</dd>
|
|
2591
|
+
</dl>
|
|
2592
|
+
|
|
2593
|
+
#### ⚙️ Parameters
|
|
2594
|
+
|
|
2595
|
+
<dl>
|
|
2596
|
+
<dd>
|
|
2597
|
+
|
|
2598
|
+
<dl>
|
|
2599
|
+
<dd>
|
|
2600
|
+
|
|
2601
|
+
**request:** `MavenAGI.CapabilityExecutionsSearchRequest`
|
|
2602
|
+
|
|
2603
|
+
</dd>
|
|
2604
|
+
</dl>
|
|
2605
|
+
|
|
2606
|
+
<dl>
|
|
2607
|
+
<dd>
|
|
2608
|
+
|
|
2609
|
+
**requestOptions:** `CapabilitiesClient.RequestOptions`
|
|
2610
|
+
|
|
2611
|
+
</dd>
|
|
2612
|
+
</dl>
|
|
2613
|
+
</dd>
|
|
2614
|
+
</dl>
|
|
2615
|
+
|
|
2616
|
+
|
|
2447
2617
|
</dd>
|
|
2448
2618
|
</dl>
|
|
2449
2619
|
</details>
|
|
@@ -3350,17 +3520,19 @@ await client.conversation.get("conversationId");
|
|
|
3350
3520
|
<dl>
|
|
3351
3521
|
<dd>
|
|
3352
3522
|
|
|
3353
|
-
Wipes
|
|
3354
|
-
The conversation ID
|
|
3355
|
-
|
|
3356
|
-
|
|
3523
|
+
Wipes the user content from a conversation.
|
|
3524
|
+
The conversation and its ID still exist afterwards, and so does its non-content data, so it still counts in metrics.
|
|
3525
|
+
The conversation is sealed against further writes as soon as this call returns: adding or changing messages fails with `409 Conflict`, and so does deleting it again once the wipe has finished.
|
|
3526
|
+
A `202 Accepted` response means the wipe is still completing and will finish on its own.
|
|
3357
3527
|
|
|
3358
3528
|
Simulation conversations will no longer be visible in search results nor metrics.
|
|
3359
|
-
Non-simulation conversations
|
|
3529
|
+
Non-simulation conversations remain visible; they cannot be fully removed from the system.
|
|
3360
3530
|
|
|
3361
3531
|
<Warning>This is a destructive operation and cannot be undone. <br/><br/>
|
|
3362
|
-
|
|
3363
|
-
|
|
3532
|
+
What is wiped: the conversation's `subject` and `analysis.agentResponse` are cleared, and `analysis.userRequest` is replaced with `reason`.
|
|
3533
|
+
Every message's text, from the user and the agent alike, is replaced with `reason`, and its attachments, follow-up questions, backend LLM prompt and history, the data actions returned, and action arguments are cleared.
|
|
3534
|
+
Evaluation results for the conversation are deleted, and the payloads recorded on its trigger and action executions are cleared. <br/><br/>
|
|
3535
|
+
What is kept: the conversation's metadata, each message's charts, structured answer and app-supplied metadata, the conversation's intelligent field values, its feedback and events, and the users who took part. To wipe a user's data, use `DELETE /users/{userId}` or `DELETE /agentusers/{agentUserId}`.</Warning>
|
|
3364
3536
|
</dd>
|
|
3365
3537
|
</dl>
|
|
3366
3538
|
</dd>
|
|
@@ -3727,7 +3899,11 @@ for await (const item of response) {
|
|
|
3727
3899
|
<dl>
|
|
3728
3900
|
<dd>
|
|
3729
3901
|
|
|
3730
|
-
|
|
3902
|
+
Deprecated. Set the agent's `categoryIntelligentFieldId` and read that intelligent field's value instead.
|
|
3903
|
+
|
|
3904
|
+
Uses an LLM flow to categorize the conversation.
|
|
3905
|
+
|
|
3906
|
+
Returns a 400 for new agents and for any agent with a `categoryIntelligentFieldId`. Their conversation categories come only from that intelligent field: read the field's value, or react to it changing with an `EVENT_CREATED` trigger on the `INTELLIGENT_FIELD_VALUE_CHANGED` system event.
|
|
3731
3907
|
</dd>
|
|
3732
3908
|
</dl>
|
|
3733
3909
|
</dd>
|
|
@@ -5880,9 +6056,10 @@ deletes any kind of capability the same way. That endpoint returns no body.
|
|
|
5880
6056
|
|
|
5881
6057
|
Soft delete an intelligent field. Only INACTIVE fields can be deleted.
|
|
5882
6058
|
|
|
5883
|
-
Deleted fields are excluded from search results
|
|
5884
|
-
Creating a
|
|
5885
|
-
|
|
6059
|
+
Deleted fields are excluded from search results, and getting one by ID returns 404.
|
|
6060
|
+
Creating a field with the same referenceId as a deleted field reclaims it: the field keeps
|
|
6061
|
+
its identity and entityType, every other setting comes from the request, and it gets the
|
|
6062
|
+
status a new field gets.
|
|
5886
6063
|
|
|
5887
6064
|
Deleted fields cannot be modified.
|
|
5888
6065
|
</dd>
|
|
@@ -8005,7 +8182,7 @@ await client.segments.patch("segmentReferenceId", {});
|
|
|
8005
8182
|
|
|
8006
8183
|
Soft delete a segment. Only INACTIVE segments can be deleted.
|
|
8007
8184
|
|
|
8008
|
-
Deleted segments are excluded from search results but can still be retrieved by ID for archival purposes. Creating a
|
|
8185
|
+
Deleted segments are excluded from search results but can still be retrieved by ID for archival purposes. Creating a segment with the same referenceId as a deleted segment reclaims it: the segment keeps its identity, and every other setting comes from the request.
|
|
8009
8186
|
|
|
8010
8187
|
Deleted segments cannot be modified.
|
|
8011
8188
|
</dd>
|
|
@@ -8601,6 +8778,84 @@ await client.users.getAgentUser("aus_1234567890");
|
|
|
8601
8778
|
</dl>
|
|
8602
8779
|
|
|
8603
8780
|
|
|
8781
|
+
</dd>
|
|
8782
|
+
</dl>
|
|
8783
|
+
</details>
|
|
8784
|
+
|
|
8785
|
+
<details><summary><code>client.users.<a href="/src/api/resources/users/client/Client.ts">deleteAgentUser</a>(agentUserId) -> void</code></summary>
|
|
8786
|
+
<dl>
|
|
8787
|
+
<dd>
|
|
8788
|
+
|
|
8789
|
+
#### 📝 Description
|
|
8790
|
+
|
|
8791
|
+
<dl>
|
|
8792
|
+
<dd>
|
|
8793
|
+
|
|
8794
|
+
<dl>
|
|
8795
|
+
<dd>
|
|
8796
|
+
|
|
8797
|
+
Deletes the identifiers and user data that every app has saved for an agent user.
|
|
8798
|
+
This is the same as calling `DELETE /users/{userId}` for each of the agent user's app users.
|
|
8799
|
+
|
|
8800
|
+
The agent user and its app users still exist afterwards, with no identifiers or user data.
|
|
8801
|
+
Apps can keep writing to them; a later create or update adds data back to the same users.
|
|
8802
|
+
|
|
8803
|
+
Conversations, their messages and events are not modified, apart from the intelligent field values below. To wipe a conversation, use `DELETE /conversations/{conversationId}`.
|
|
8804
|
+
|
|
8805
|
+
If the ID belongs to an agent user that has been merged into another, the agent user it was merged into is wiped.
|
|
8806
|
+
|
|
8807
|
+
<Warning>This is a destructive operation and cannot be undone.</Warning>
|
|
8808
|
+
|
|
8809
|
+
### Intelligent fields
|
|
8810
|
+
|
|
8811
|
+
The agent user's intelligent field values are deleted too, and removed from their `INTELLIGENT_FIELD_VALUE_CHANGED` events; the events themselves are kept.
|
|
8812
|
+
Unlike `DELETE /users/{userId}`, the wipe does not recompute the values. They can be computed again later from the user's remaining conversations, for example after the user sends another message; wipe those conversations first to prevent that.
|
|
8813
|
+
</dd>
|
|
8814
|
+
</dl>
|
|
8815
|
+
</dd>
|
|
8816
|
+
</dl>
|
|
8817
|
+
|
|
8818
|
+
#### 🔌 Usage
|
|
8819
|
+
|
|
8820
|
+
<dl>
|
|
8821
|
+
<dd>
|
|
8822
|
+
|
|
8823
|
+
<dl>
|
|
8824
|
+
<dd>
|
|
8825
|
+
|
|
8826
|
+
```typescript
|
|
8827
|
+
await client.users.deleteAgentUser("aus_1234567890");
|
|
8828
|
+
|
|
8829
|
+
```
|
|
8830
|
+
</dd>
|
|
8831
|
+
</dl>
|
|
8832
|
+
</dd>
|
|
8833
|
+
</dl>
|
|
8834
|
+
|
|
8835
|
+
#### ⚙️ Parameters
|
|
8836
|
+
|
|
8837
|
+
<dl>
|
|
8838
|
+
<dd>
|
|
8839
|
+
|
|
8840
|
+
<dl>
|
|
8841
|
+
<dd>
|
|
8842
|
+
|
|
8843
|
+
**agentUserId:** `string` — The ID of the agent user to wipe.
|
|
8844
|
+
|
|
8845
|
+
</dd>
|
|
8846
|
+
</dl>
|
|
8847
|
+
|
|
8848
|
+
<dl>
|
|
8849
|
+
<dd>
|
|
8850
|
+
|
|
8851
|
+
**requestOptions:** `UsersClient.RequestOptions`
|
|
8852
|
+
|
|
8853
|
+
</dd>
|
|
8854
|
+
</dl>
|
|
8855
|
+
</dd>
|
|
8856
|
+
</dl>
|
|
8857
|
+
|
|
8858
|
+
|
|
8604
8859
|
</dd>
|
|
8605
8860
|
</dl>
|
|
8606
8861
|
</details>
|
|
@@ -8765,9 +9020,14 @@ await client.users.get("user-0");
|
|
|
8765
9020
|
<dl>
|
|
8766
9021
|
<dd>
|
|
8767
9022
|
|
|
8768
|
-
Deletes all identifiers and user data saved by the specified app.
|
|
9023
|
+
Deletes all identifiers and user data saved by the specified app for this user.
|
|
8769
9024
|
Does not modify data or identifiers saved by other apps.
|
|
8770
9025
|
|
|
9026
|
+
The app user still exists afterwards, with no identifiers or user data, and the app can keep writing to it.
|
|
9027
|
+
Conversations, their messages and events are not modified.
|
|
9028
|
+
The agent user's intelligent field values are not deleted; they are recomputed without this app's data.
|
|
9029
|
+
To wipe a conversation, use `DELETE /conversations/{conversationId}`. To wipe every app's data for a user, use `DELETE /agentusers/{agentUserId}`.
|
|
9030
|
+
|
|
8771
9031
|
If this user is linked to a user from another app, it will not be unlinked. Unlinking of users is not yet supported.
|
|
8772
9032
|
|
|
8773
9033
|
<Warning>This is a destructive operation and cannot be undone.</Warning>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type * as MavenAGI from "../../../../../api/index";
|
|
2
2
|
import * as core from "../../../../../core";
|
|
3
3
|
import type * as serializers from "../../../../index";
|
|
4
|
+
import { EntityIdWithoutAgent } from "../../../commons/types/EntityIdWithoutAgent";
|
|
4
5
|
import { LlmPersona } from "../../../commons/types/LlmPersona";
|
|
5
6
|
import { PiiCategory } from "../../../commons/types/PiiCategory";
|
|
6
7
|
import { AgentEnvironment } from "../../types/AgentEnvironment";
|
|
@@ -15,6 +16,7 @@ export declare namespace AgentPatchRequest {
|
|
|
15
16
|
persona?: LlmPersona.Raw | null;
|
|
16
17
|
additionalPromptText?: (string | null | undefined) | null;
|
|
17
18
|
categoryGenerationPromptText?: (string | null | undefined) | null;
|
|
19
|
+
categoryIntelligentFieldId?: (EntityIdWithoutAgent.Raw | null | undefined) | null;
|
|
18
20
|
contentSafetyViolationResponsePromptText?: (string | null | undefined) | null;
|
|
19
21
|
rejectQuestionsWithoutKnowledge?: boolean | null;
|
|
20
22
|
}
|
|
@@ -36,6 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.AgentPatchRequest = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../../core"));
|
|
39
|
+
const EntityIdWithoutAgent_1 = require("../../../commons/types/EntityIdWithoutAgent");
|
|
39
40
|
const LlmPersona_1 = require("../../../commons/types/LlmPersona");
|
|
40
41
|
const PiiCategory_1 = require("../../../commons/types/PiiCategory");
|
|
41
42
|
const AgentEnvironment_1 = require("../../types/AgentEnvironment");
|
|
@@ -48,6 +49,7 @@ exports.AgentPatchRequest = core.serialization.object({
|
|
|
48
49
|
persona: LlmPersona_1.LlmPersona.optional(),
|
|
49
50
|
additionalPromptText: core.serialization.string().optionalNullable(),
|
|
50
51
|
categoryGenerationPromptText: core.serialization.string().optionalNullable(),
|
|
52
|
+
categoryIntelligentFieldId: EntityIdWithoutAgent_1.EntityIdWithoutAgent.optionalNullable(),
|
|
51
53
|
contentSafetyViolationResponsePromptText: core.serialization.string().optionalNullable(),
|
|
52
54
|
rejectQuestionsWithoutKnowledge: core.serialization.boolean().optional(),
|
|
53
55
|
});
|
|
@@ -2,6 +2,7 @@ import type * as MavenAGI from "../../../../api/index";
|
|
|
2
2
|
import * as core from "../../../../core";
|
|
3
3
|
import type * as serializers from "../../../index";
|
|
4
4
|
import { EntityId } from "../../commons/types/EntityId";
|
|
5
|
+
import { EntityIdWithoutAgent } from "../../commons/types/EntityIdWithoutAgent";
|
|
5
6
|
import { PiiCategory } from "../../commons/types/PiiCategory";
|
|
6
7
|
import { AgentEnvironment } from "./AgentEnvironment";
|
|
7
8
|
import { AgentPrompting } from "./AgentPrompting";
|
|
@@ -16,5 +17,6 @@ export declare namespace Agent {
|
|
|
16
17
|
enabledPiiCategories: PiiCategory.Raw[];
|
|
17
18
|
systemFallbackMessage?: string | null;
|
|
18
19
|
prompting: AgentPrompting.Raw;
|
|
20
|
+
categoryIntelligentFieldId?: EntityIdWithoutAgent.Raw | null;
|
|
19
21
|
}
|
|
20
22
|
}
|
|
@@ -37,6 +37,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.Agent = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../core"));
|
|
39
39
|
const EntityId_1 = require("../../commons/types/EntityId");
|
|
40
|
+
const EntityIdWithoutAgent_1 = require("../../commons/types/EntityIdWithoutAgent");
|
|
40
41
|
const PiiCategory_1 = require("../../commons/types/PiiCategory");
|
|
41
42
|
const AgentEnvironment_1 = require("./AgentEnvironment");
|
|
42
43
|
const AgentPrompting_1 = require("./AgentPrompting");
|
|
@@ -49,4 +50,5 @@ exports.Agent = core.serialization.object({
|
|
|
49
50
|
enabledPiiCategories: core.serialization.set(PiiCategory_1.PiiCategory),
|
|
50
51
|
systemFallbackMessage: core.serialization.string().optional(),
|
|
51
52
|
prompting: AgentPrompting_1.AgentPrompting,
|
|
53
|
+
categoryIntelligentFieldId: EntityIdWithoutAgent_1.EntityIdWithoutAgent.optional(),
|
|
52
54
|
});
|
package/serialization/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../../../api/index";
|
|
2
|
+
import * as core from "../../../../../core";
|
|
3
|
+
import type * as serializers from "../../../../index";
|
|
4
|
+
import { BaseCappedPaginatedRequest } from "../../../commons/types/BaseCappedPaginatedRequest";
|
|
5
|
+
import { CapabilityType } from "../../../commons/types/CapabilityType";
|
|
6
|
+
import { EntityId } from "../../../commons/types/EntityId";
|
|
7
|
+
import { CapabilityExecutionStatus } from "../../types/CapabilityExecutionStatus";
|
|
8
|
+
export declare const CapabilityExecutionsSearchRequest: core.serialization.Schema<serializers.CapabilityExecutionsSearchRequest.Raw, MavenAGI.CapabilityExecutionsSearchRequest>;
|
|
9
|
+
export declare namespace CapabilityExecutionsSearchRequest {
|
|
10
|
+
interface Raw extends BaseCappedPaginatedRequest.Raw {
|
|
11
|
+
subjectIds?: EntityId.Raw[] | null;
|
|
12
|
+
capabilityTypes?: CapabilityType.Raw[] | null;
|
|
13
|
+
capabilityIds?: EntityId.Raw[] | null;
|
|
14
|
+
statuses?: CapabilityExecutionStatus.Raw[] | null;
|
|
15
|
+
}
|
|
16
|
+
}
|