mavenagi 1.2.66 → 1.2.68
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.d.ts +14 -0
- package/api/resources/actions/client/Client.js +14 -0
- package/api/resources/agents/client/Client.d.ts +10 -12
- package/api/resources/agents/client/Client.js +10 -12
- package/api/resources/analytics/client/Client.d.ts +10 -0
- package/api/resources/analytics/client/Client.js +10 -0
- package/api/resources/appDirectory/client/Client.d.ts +3 -1
- package/api/resources/appDirectory/client/Client.js +3 -1
- package/api/resources/assets/client/Client.d.ts +4 -0
- package/api/resources/assets/client/Client.js +4 -0
- package/api/resources/capabilities/client/Client.d.ts +20 -0
- package/api/resources/capabilities/client/Client.js +20 -0
- package/api/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.d.ts +4 -0
- package/api/resources/charters/client/Client.d.ts +18 -0
- package/api/resources/charters/client/Client.js +18 -0
- package/api/resources/commons/types/MetadataComparisonOperator.d.ts +4 -4
- package/api/resources/commons/types/MetadataComparisonOperator.js +4 -4
- package/api/resources/commons/types/MetadataConversationValueFilter.d.ts +1 -1
- package/api/resources/commons/types/MetadataFilter.d.ts +6 -1
- package/api/resources/commons/types/SimulationContext.d.ts +9 -0
- package/api/resources/commons/types/SystemEventName.d.ts +3 -0
- package/api/resources/commons/types/SystemEventName.js +3 -0
- package/api/resources/conversation/client/Client.d.ts +42 -3
- package/api/resources/conversation/client/Client.js +42 -3
- package/api/resources/conversation/types/AskRequest.d.ts +1 -62
- package/api/resources/conversation/types/AskRequestBase.d.ts +67 -0
- package/api/resources/conversation/types/index.d.ts +1 -0
- package/api/resources/conversation/types/index.js +1 -0
- package/api/resources/conversationKickoffs/client/Client.d.ts +2 -0
- package/api/resources/conversationKickoffs/client/Client.js +2 -0
- package/api/resources/customers/client/Client.d.ts +14 -0
- package/api/resources/customers/client/Client.js +14 -0
- package/api/resources/events/client/Client.d.ts +16 -3
- package/api/resources/events/client/Client.js +16 -3
- package/api/resources/inbox/client/Client.d.ts +20 -0
- package/api/resources/inbox/client/Client.js +20 -0
- package/api/resources/intelligentFields/client/Client.d.ts +10 -0
- package/api/resources/intelligentFields/client/Client.js +10 -0
- package/api/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.d.ts +1 -1
- package/api/resources/intelligentFields/types/IntelligentFieldCore.d.ts +2 -1
- package/api/resources/knowledge/client/Client.d.ts +40 -0
- package/api/resources/knowledge/client/Client.js +40 -0
- package/api/resources/knowledge/types/KnowledgeBaseFilter.d.ts +5 -1
- 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 -5
- package/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +1 -1
- package/api/resources/knowledge/types/KnowledgeDocumentMetadataValue.d.ts +4 -0
- package/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +9 -3
- package/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +2 -2
- package/api/resources/knowledge/types/index.d.ts +1 -0
- package/api/resources/knowledge/types/index.js +1 -0
- package/api/resources/segments/client/Client.d.ts +16 -0
- package/api/resources/segments/client/Client.js +16 -0
- package/api/resources/translations/client/Client.d.ts +2 -0
- package/api/resources/translations/client/Client.js +2 -0
- package/api/resources/triggers/client/Client.d.ts +10 -0
- package/api/resources/triggers/client/Client.js +10 -0
- package/api/resources/users/client/Client.d.ts +16 -0
- package/api/resources/users/client/Client.js +16 -0
- package/api/resources/voice/client/Client.d.ts +1 -1
- package/api/resources/voice/client/Client.js +1 -1
- package/api/resources/voice/types/VoiceSessionTokenRequest.d.ts +4 -2
- package/api/resources/voiceConversations/client/Client.d.ts +5 -2
- package/api/resources/voiceConversations/client/Client.js +6 -3
- package/api/resources/voiceConversations/client/Socket.d.ts +2 -1
- package/api/resources/voiceConversations/client/Socket.js +10 -0
- package/api/resources/voiceConversations/types/AgentAudioChunk.d.ts +1 -1
- package/api/resources/voiceConversations/types/AudioFormat.d.ts +13 -0
- package/api/resources/voiceConversations/types/AudioFormat.js +13 -0
- package/api/resources/voiceConversations/types/ClientMark.d.ts +10 -0
- package/api/resources/voiceConversations/types/Config.d.ts +2 -6
- package/api/resources/voiceConversations/types/ConversationReady.d.ts +5 -2
- package/api/resources/voiceConversations/types/Error_.d.ts +8 -0
- package/api/resources/voiceConversations/types/Mark.d.ts +9 -0
- package/api/resources/voiceConversations/types/ServerEventBase.d.ts +3 -2
- package/api/resources/voiceConversations/types/Transcript.d.ts +11 -0
- package/api/resources/voiceConversations/types/TranscriptRole.d.ts +5 -0
- package/api/resources/voiceConversations/types/TranscriptRole.js +8 -0
- package/api/resources/voiceConversations/types/VadSpeechStarted.d.ts +8 -0
- package/api/resources/voiceConversations/types/VadSpeechStarted.js +3 -0
- package/api/resources/voiceConversations/types/VadSpeechStopped.d.ts +7 -0
- package/api/resources/voiceConversations/types/VadSpeechStopped.js +3 -0
- package/api/resources/voiceConversations/types/index.d.ts +6 -5
- package/api/resources/voiceConversations/types/index.js +6 -5
- package/package.json +1 -1
- package/reference.md +290 -20
- package/serialization/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.d.ts +2 -0
- package/serialization/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.js +2 -0
- package/serialization/resources/commons/types/SimulationContext.d.ts +1 -0
- package/serialization/resources/commons/types/SimulationContext.js +1 -0
- package/serialization/resources/commons/types/SystemEventName.d.ts +1 -1
- package/serialization/resources/commons/types/SystemEventName.js +1 -0
- package/serialization/resources/conversation/types/AskRequest.d.ts +2 -12
- package/serialization/resources/conversation/types/AskRequest.js +5 -13
- package/serialization/resources/conversation/types/AskRequestBase.d.ts +20 -0
- package/serialization/resources/conversation/types/AskRequestBase.js +52 -0
- package/serialization/resources/conversation/types/index.d.ts +1 -0
- package/serialization/resources/conversation/types/index.js +1 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentMetadataValue.d.ts +7 -0
- package/serialization/resources/{voiceConversations/types/UserTranscript.js → knowledge/types/KnowledgeDocumentMetadataValue.js} +5 -8
- package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +2 -1
- package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +2 -1
- package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +2 -1
- package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +2 -1
- package/serialization/resources/knowledge/types/index.d.ts +1 -0
- package/serialization/resources/knowledge/types/index.js +1 -0
- package/serialization/resources/voiceConversations/client/socket/VoiceConversationsSocketResponse.d.ts +6 -7
- package/serialization/resources/voiceConversations/client/socket/VoiceConversationsSocketResponse.js +8 -10
- package/serialization/resources/voiceConversations/types/ClientMark.d.ts +10 -0
- package/serialization/resources/voiceConversations/types/ClientMark.js +42 -0
- package/serialization/resources/voiceConversations/types/Config.d.ts +0 -2
- package/serialization/resources/voiceConversations/types/Config.js +0 -2
- package/serialization/resources/voiceConversations/types/ConversationReady.d.ts +3 -1
- package/serialization/resources/voiceConversations/types/ConversationReady.js +6 -2
- package/serialization/resources/voiceConversations/types/{ConversationEnded.d.ts → Mark.d.ts} +4 -3
- package/serialization/resources/voiceConversations/types/{UserStartedSpeaking.js → Mark.js} +4 -3
- package/serialization/resources/voiceConversations/types/ServerEventBase.d.ts +1 -1
- package/serialization/resources/voiceConversations/types/ServerEventBase.js +1 -1
- package/serialization/resources/voiceConversations/types/{AgentTranscript.d.ts → Transcript.d.ts} +5 -3
- package/serialization/resources/voiceConversations/types/{AgentTranscript.js → Transcript.js} +5 -3
- package/serialization/resources/voiceConversations/types/TranscriptRole.d.ts +7 -0
- package/serialization/resources/voiceConversations/types/TranscriptRole.js +39 -0
- package/serialization/resources/voiceConversations/types/{UserTranscript.d.ts → VadSpeechStarted.d.ts} +3 -4
- package/serialization/resources/voiceConversations/types/{ConversationEnded.js → VadSpeechStarted.js} +3 -3
- package/serialization/resources/voiceConversations/types/{UserStartedSpeaking.d.ts → VadSpeechStopped.d.ts} +3 -3
- package/serialization/resources/voiceConversations/types/{UserFinishedSpeaking.js → VadSpeechStopped.js} +3 -3
- package/serialization/resources/voiceConversations/types/index.d.ts +6 -5
- package/serialization/resources/voiceConversations/types/index.js +6 -5
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/voiceConversations/types/AgentTranscript.d.ts +0 -9
- package/api/resources/voiceConversations/types/ConversationEnded.d.ts +0 -7
- package/api/resources/voiceConversations/types/UserFinishedSpeaking.d.ts +0 -7
- package/api/resources/voiceConversations/types/UserStartedSpeaking.d.ts +0 -7
- package/api/resources/voiceConversations/types/UserTranscript.d.ts +0 -9
- package/serialization/resources/voiceConversations/types/UserFinishedSpeaking.d.ts +0 -10
- /package/api/resources/{voiceConversations/types/AgentTranscript.js → conversation/types/AskRequestBase.js} +0 -0
- /package/api/resources/{voiceConversations/types/ConversationEnded.js → knowledge/types/KnowledgeDocumentMetadataValue.js} +0 -0
- /package/api/resources/voiceConversations/types/{UserFinishedSpeaking.js → ClientMark.js} +0 -0
- /package/api/resources/voiceConversations/types/{UserStartedSpeaking.js → Mark.js} +0 -0
- /package/api/resources/voiceConversations/types/{UserTranscript.js → Transcript.js} +0 -0
|
@@ -7,16 +7,16 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export declare const MetadataComparisonOperator: {
|
|
9
9
|
/**
|
|
10
|
-
* Equals (=) */
|
|
10
|
+
* Equals (=). On a list value, any element equals. */
|
|
11
11
|
readonly Eq: "EQ";
|
|
12
12
|
/**
|
|
13
|
-
* Not equals (!=) */
|
|
13
|
+
* Not equals (!=). On a list value, no element equals. */
|
|
14
14
|
readonly Neq: "NEQ";
|
|
15
15
|
/**
|
|
16
|
-
* Value starts with the specified prefix */
|
|
16
|
+
* Value starts with the specified prefix. On a list value, any element does. */
|
|
17
17
|
readonly StartsWith: "STARTS_WITH";
|
|
18
18
|
/**
|
|
19
|
-
* Value does not start with the specified prefix */
|
|
19
|
+
* Value does not start with the specified prefix. On a list value, no element does. */
|
|
20
20
|
readonly NotStartsWith: "NOT_STARTS_WITH";
|
|
21
21
|
};
|
|
22
22
|
export type MetadataComparisonOperator = (typeof MetadataComparisonOperator)[keyof typeof MetadataComparisonOperator] | string;
|
|
@@ -11,15 +11,15 @@ exports.MetadataComparisonOperator = void 0;
|
|
|
11
11
|
*/
|
|
12
12
|
exports.MetadataComparisonOperator = {
|
|
13
13
|
/**
|
|
14
|
-
* Equals (=) */
|
|
14
|
+
* Equals (=). On a list value, any element equals. */
|
|
15
15
|
Eq: "EQ",
|
|
16
16
|
/**
|
|
17
|
-
* Not equals (!=) */
|
|
17
|
+
* Not equals (!=). On a list value, no element equals. */
|
|
18
18
|
Neq: "NEQ",
|
|
19
19
|
/**
|
|
20
|
-
* Value starts with the specified prefix */
|
|
20
|
+
* Value starts with the specified prefix. On a list value, any element does. */
|
|
21
21
|
StartsWith: "STARTS_WITH",
|
|
22
22
|
/**
|
|
23
|
-
* Value does not start with the specified prefix */
|
|
23
|
+
* Value does not start with the specified prefix. On a list value, no element does. */
|
|
24
24
|
NotStartsWith: "NOT_STARTS_WITH",
|
|
25
25
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as MavenAGI from "../../../index";
|
|
2
2
|
/**
|
|
3
3
|
* Matches documents whose value under `key` equals a value read from the conversation
|
|
4
|
-
* being answered, so one filter follows each conversation instead of naming a fixed value.
|
|
4
|
+
* being answered (or, when the document holds a list, contains it), so one filter follows each conversation instead of naming a fixed value.
|
|
5
5
|
*
|
|
6
6
|
* When the conversation has no value at `source`, nothing matches. For `userData`, that
|
|
7
7
|
* includes a conversation with no user. To also keep documents that apply everywhere,
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import type * as MavenAGI from "../../../index";
|
|
2
2
|
/**
|
|
3
|
-
* A predicate over a
|
|
3
|
+
* A predicate over a knowledge document's metadata: a condition on the value under one
|
|
4
4
|
* key, a match against a value read from the conversation, or a group of predicates
|
|
5
5
|
* combined with a logical operator.
|
|
6
6
|
*
|
|
7
|
+
* A document's value under a key may be a list of strings. A condition then tests the
|
|
8
|
+
* list element by element: `EQ`, `IN` and `STARTS_WITH` match when any element matches,
|
|
9
|
+
* and `NEQ`, `NOT_IN` and `NOT_STARTS_WITH` match when none does. An empty list is the
|
|
10
|
+
* same as no value.
|
|
11
|
+
*
|
|
7
12
|
* Kept small on purpose: by default at most 3 levels of nesting and 10 nodes in total,
|
|
8
13
|
* counting every group, entry and conversation value. A filter is meant to narrow a
|
|
9
14
|
* knowledge base to a recognisable slice, not to encode a query language. Exceeding
|
|
@@ -27,6 +27,15 @@ export interface SimulationContext {
|
|
|
27
27
|
* keeps the variant it was created with.
|
|
28
28
|
*/
|
|
29
29
|
variantId?: MavenAGI.EntityIdWithoutAgent;
|
|
30
|
+
/**
|
|
31
|
+
* When true, the simulation evaluates the agent's charters even if charter evaluation is
|
|
32
|
+
* turned off for the agent. When absent or false, the simulation follows the agent's own
|
|
33
|
+
* charter evaluation setting, like any other conversation. While charters are evaluated,
|
|
34
|
+
* `additionalPromptText` has no effect. Not yet enabled for every agent: until it is, the
|
|
35
|
+
* value is stored and returned, and the agent's own setting applies. A conversation that
|
|
36
|
+
* already exists keeps the value it was created with.
|
|
37
|
+
*/
|
|
38
|
+
evaluateWithCharters?: boolean;
|
|
30
39
|
/**
|
|
31
40
|
* What the platform does when the agent executes each action during this simulation. At
|
|
32
41
|
* most one entry per action; a request that names an action twice is rejected. An action
|
|
@@ -38,6 +38,9 @@ export declare const SystemEventName: {
|
|
|
38
38
|
/**
|
|
39
39
|
* The agent sent a visible reply in a conversation: a response or a suggestion. `references` carries the conversation, the message, the charters matched in the turn that produced this reply, and the actions the bot ran in that turn, failed attempts included. Actions the user submitted as a form, or was only offered, are not included. Each event covers its own reply's turn, not earlier ones. A `references` condition can name a charter, an action or a combination of them. `contextInfo.additionalData` carries the message's `botMessageType` (see `AdditionalDataKey`). Like `CONVERSATION_CLOSED`, it is recorded once Maven has finished analyzing the conversation through that reply. */
|
|
40
40
|
readonly BotReplyCreated: "BOT_REPLY_CREATED";
|
|
41
|
+
/**
|
|
42
|
+
* The user sent a message in a conversation. `references` carries the conversation and the message. Unlike `BOT_REPLY_CREATED`, it is recorded as soon as Maven saves the message, without waiting for analysis. Each message is recorded once. */
|
|
43
|
+
readonly UserMessageCreated: "USER_MESSAGE_CREATED";
|
|
41
44
|
/**
|
|
42
45
|
* An intelligent field's value on a conversation or agent user was set or changed. `references` carries the field and the conversation or agent user the value belongs to; `contextInfo.additionalData` carries the new `value` and the `previousValue` (see `AdditionalDataKey`). A string value is written as is, a boolean or number as its text (`true`, `3`), and a multi-select's options as a JSON array. A key is absent when its value is undetermined or, for `previousValue`, when the field had no previous value. */
|
|
43
46
|
readonly IntelligentFieldValueChanged: "INTELLIGENT_FIELD_VALUE_CHANGED";
|
|
@@ -42,6 +42,9 @@ exports.SystemEventName = {
|
|
|
42
42
|
/**
|
|
43
43
|
* The agent sent a visible reply in a conversation: a response or a suggestion. `references` carries the conversation, the message, the charters matched in the turn that produced this reply, and the actions the bot ran in that turn, failed attempts included. Actions the user submitted as a form, or was only offered, are not included. Each event covers its own reply's turn, not earlier ones. A `references` condition can name a charter, an action or a combination of them. `contextInfo.additionalData` carries the message's `botMessageType` (see `AdditionalDataKey`). Like `CONVERSATION_CLOSED`, it is recorded once Maven has finished analyzing the conversation through that reply. */
|
|
44
44
|
BotReplyCreated: "BOT_REPLY_CREATED",
|
|
45
|
+
/**
|
|
46
|
+
* The user sent a message in a conversation. `references` carries the conversation and the message. Unlike `BOT_REPLY_CREATED`, it is recorded as soon as Maven saves the message, without waiting for analysis. Each message is recorded once. */
|
|
47
|
+
UserMessageCreated: "USER_MESSAGE_CREATED",
|
|
45
48
|
/**
|
|
46
49
|
* An intelligent field's value on a conversation or agent user was set or changed. `references` carries the field and the conversation or agent user the value belongs to; `contextInfo.additionalData` carries the new `value` and the `previousValue` (see `AdditionalDataKey`). A string value is written as is, a boolean or number as its text (`true`, `3`), and a multi-select's options as a JSON array. A key is absent when its value is undetermined or, for `previousValue`, when the field had no previous value. */
|
|
47
50
|
IntelligentFieldValueChanged: "INTELLIGENT_FIELD_VALUE_CHANGED",
|
|
@@ -20,6 +20,8 @@ export declare class ConversationClient {
|
|
|
20
20
|
* - metadata can be changed using the `updateConversationMetadata` API.
|
|
21
21
|
* - messages can be added to the conversation with the `appendNewMessages` or `ask` APIs.
|
|
22
22
|
*
|
|
23
|
+
* <Note>**Required permission:** `ask:agent`</Note>
|
|
24
|
+
*
|
|
23
25
|
* @param {MavenAGI.ConversationRequest} request
|
|
24
26
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
27
|
*
|
|
@@ -86,6 +88,8 @@ export declare class ConversationClient {
|
|
|
86
88
|
* A closed conversation (`open` set to false) cannot be reopened: a patch setting `open` to true
|
|
87
89
|
* returns a 400. Its other fields can still be patched.
|
|
88
90
|
*
|
|
91
|
+
* <Note>**Required permission:** `ask:agent`</Note>
|
|
92
|
+
*
|
|
89
93
|
* @param {string} conversationId - The ID of the conversation to patch
|
|
90
94
|
* @param {MavenAGI.ConversationPatchRequest} request
|
|
91
95
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -108,6 +112,8 @@ export declare class ConversationClient {
|
|
|
108
112
|
/**
|
|
109
113
|
* Get a conversation
|
|
110
114
|
*
|
|
115
|
+
* <Note>**Required permission:** `read:conversations`</Note>
|
|
116
|
+
*
|
|
111
117
|
* @param {string} conversationId - The ID of the conversation to get
|
|
112
118
|
* @param {MavenAGI.ConversationGetRequest} request
|
|
113
119
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -129,7 +135,7 @@ export declare class ConversationClient {
|
|
|
129
135
|
* Wipes the user content from a conversation.
|
|
130
136
|
* The conversation and its ID still exist afterwards, and so does its non-content data, so it still counts in metrics.
|
|
131
137
|
* 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.
|
|
132
|
-
*
|
|
138
|
+
* The call answers `202 Accepted` and the wipe finishes on its own shortly after. Until it does, getting or searching the conversation can still return its original message text.
|
|
133
139
|
*
|
|
134
140
|
* Simulation conversations will no longer be visible in search results nor metrics.
|
|
135
141
|
* Non-simulation conversations remain visible; they cannot be fully removed from the system.
|
|
@@ -140,6 +146,8 @@ export declare class ConversationClient {
|
|
|
140
146
|
* Evaluation results for the conversation are deleted, and the payloads recorded on its trigger and action executions are cleared. <br/><br/>
|
|
141
147
|
* 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>
|
|
142
148
|
*
|
|
149
|
+
* <Note>**Required permission:** `delete:conversations`</Note>
|
|
150
|
+
*
|
|
143
151
|
* @param {string} conversationId - The ID of the conversation to delete
|
|
144
152
|
* @param {MavenAGI.ConversationDeleteRequest} request
|
|
145
153
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -164,6 +172,8 @@ export declare class ConversationClient {
|
|
|
164
172
|
*
|
|
165
173
|
* A closed conversation (`open` set to false) takes no new messages and returns a 400.
|
|
166
174
|
*
|
|
175
|
+
* <Note>**Required permission:** `ask:agent`</Note>
|
|
176
|
+
*
|
|
167
177
|
* @param {string} conversationId - The ID of the conversation to append messages to
|
|
168
178
|
* @param {MavenAGI.ConversationMessageRequest[]} request
|
|
169
179
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -212,6 +222,8 @@ export declare class ConversationClient {
|
|
|
212
222
|
* Known Limitation:
|
|
213
223
|
* - The API does not currently expose metadata indicating whether a response or message is incomplete. This will be addressed in a future update.
|
|
214
224
|
*
|
|
225
|
+
* <Note>**Required permission:** `ask:agent`</Note>
|
|
226
|
+
*
|
|
215
227
|
* @param {string} conversationId - The ID of a new or existing conversation to use as context for the question
|
|
216
228
|
* @param {MavenAGI.AskRequest} request
|
|
217
229
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -262,6 +274,8 @@ export declare class ConversationClient {
|
|
|
262
274
|
*
|
|
263
275
|
* Known Limitation:
|
|
264
276
|
* - The API does not currently expose metadata indicating whether a response or message is incomplete. This will be addressed in a future update.
|
|
277
|
+
*
|
|
278
|
+
* <Note>**Required permission:** `ask:agent`</Note>
|
|
265
279
|
*/
|
|
266
280
|
askStream(conversationId: string, request: MavenAGI.AskRequest, requestOptions?: ConversationClient.RequestOptions): core.HttpResponsePromise<core.Stream<MavenAGI.StreamResponse>>;
|
|
267
281
|
private __askStream;
|
|
@@ -339,6 +353,8 @@ export declare class ConversationClient {
|
|
|
339
353
|
*
|
|
340
354
|
* A form cannot be submitted on a closed conversation (`open` set to false): that returns a 400.
|
|
341
355
|
*
|
|
356
|
+
* <Note>**Required permission:** `ask:agent`</Note>
|
|
357
|
+
*
|
|
342
358
|
* @param {string} conversationId - The ID of a conversation the form being submitted belongs to
|
|
343
359
|
* @param {MavenAGI.SubmitActionFormRequest} request
|
|
344
360
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -402,6 +418,8 @@ export declare class ConversationClient {
|
|
|
402
418
|
*
|
|
403
419
|
* A closed conversation (`open` set to false) takes no new metadata and returns a 400.
|
|
404
420
|
*
|
|
421
|
+
* <Note>**Required permission:** `ask:agent`</Note>
|
|
422
|
+
*
|
|
405
423
|
* @param {string} conversationId - The ID of the conversation to modify metadata for
|
|
406
424
|
* @param {MavenAGI.UpdateMetadataRequest} request
|
|
407
425
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -425,7 +443,20 @@ export declare class ConversationClient {
|
|
|
425
443
|
updateConversationMetadata(conversationId: string, request: MavenAGI.UpdateMetadataRequest, requestOptions?: ConversationClient.RequestOptions): core.HttpResponsePromise<MavenAGI.ConversationMetadata>;
|
|
426
444
|
private __updateConversationMetadata;
|
|
427
445
|
/**
|
|
428
|
-
* Search conversations
|
|
446
|
+
* Search conversations.
|
|
447
|
+
*
|
|
448
|
+
* Pagination is limited to the first 10,000 matching conversations: `(page + 1) * size` must
|
|
449
|
+
* not exceed 10,000, and a request beyond that is rejected with a 400. To read past the
|
|
450
|
+
* 10,000th result, use `searchCursor`.
|
|
451
|
+
*
|
|
452
|
+
* `searchCursor` orders results by creation time and has no `sort` field. Its defaults differ
|
|
453
|
+
* from `search` in two ways:
|
|
454
|
+
* - Without `sort`, `search` returns the oldest conversations first. `searchCursor` returns the
|
|
455
|
+
* newest first unless `sortDesc` is `false`.
|
|
456
|
+
* - Without a `filter`, `search` returns conversations of every `billable` value.
|
|
457
|
+
* `searchCursor` leaves out `INELIGIBLE` ones unless `filter.billable` includes it.
|
|
458
|
+
*
|
|
459
|
+
* <Note>**Required permission:** `read:conversations`</Note>
|
|
429
460
|
*
|
|
430
461
|
* @param {MavenAGI.ConversationsSearchRequest} request
|
|
431
462
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -456,6 +487,8 @@ export declare class ConversationClient {
|
|
|
456
487
|
* came back with fewer conversations than you asked for: that happens legitimately, and more
|
|
457
488
|
* pages may still remain.
|
|
458
489
|
*
|
|
490
|
+
* <Note>**Required permission:** `read:conversations`</Note>
|
|
491
|
+
*
|
|
459
492
|
* @param {MavenAGI.ConversationsCursorSearchRequest} request
|
|
460
493
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
461
494
|
*
|
|
@@ -475,11 +508,13 @@ export declare class ConversationClient {
|
|
|
475
508
|
/**
|
|
476
509
|
* Export conversations to a CSV file.
|
|
477
510
|
*
|
|
478
|
-
* This will output a summary of each conversation that matches the supplied filter.
|
|
511
|
+
* This will output a summary of each conversation that matches the supplied filter. Only the first 10,000 matching conversations can be exported: `(page + 1) * size` must not exceed 10,000, and a request beyond that is rejected with a 400.
|
|
479
512
|
*
|
|
480
513
|
* For most use cases it is recommended to use the `search` API instead and convert the JSON response to your desired format.
|
|
481
514
|
* The CSV format may change over time and should not be relied upon by code consumers.
|
|
482
515
|
*
|
|
516
|
+
* <Note>**Required permission:** `read:conversations`</Note>
|
|
517
|
+
*
|
|
483
518
|
* @throws {@link MavenAGI.NotFoundError}
|
|
484
519
|
* @throws {@link MavenAGI.BadRequestError}
|
|
485
520
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
@@ -501,6 +536,8 @@ export declare class ConversationClient {
|
|
|
501
536
|
*
|
|
502
537
|
* Shown in Agent Designer as "Import questions".
|
|
503
538
|
*
|
|
539
|
+
* <Note>**Required permission:** `ask:agent`. Importing simulations also needs `read:agents` and `edit:agents`.</Note>
|
|
540
|
+
*
|
|
504
541
|
* @param {core.file.Uploadable} file
|
|
505
542
|
* @param {MavenAGI.SimulationImportRequest} request
|
|
506
543
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -527,6 +564,8 @@ export declare class ConversationClient {
|
|
|
527
564
|
* User message delivery is not yet supported and returns a 400.
|
|
528
565
|
* </Warning>
|
|
529
566
|
*
|
|
567
|
+
* <Note>**Required permission:** `ask:agent`</Note>
|
|
568
|
+
*
|
|
530
569
|
* @param {MavenAGI.DeliverMessageRequest} request
|
|
531
570
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
532
571
|
*
|
|
@@ -68,6 +68,8 @@ class ConversationClient {
|
|
|
68
68
|
* - metadata can be changed using the `updateConversationMetadata` API.
|
|
69
69
|
* - messages can be added to the conversation with the `appendNewMessages` or `ask` APIs.
|
|
70
70
|
*
|
|
71
|
+
* <Note>**Required permission:** `ask:agent`</Note>
|
|
72
|
+
*
|
|
71
73
|
* @param {MavenAGI.ConversationRequest} request
|
|
72
74
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
73
75
|
*
|
|
@@ -216,6 +218,8 @@ class ConversationClient {
|
|
|
216
218
|
* A closed conversation (`open` set to false) cannot be reopened: a patch setting `open` to true
|
|
217
219
|
* returns a 400. Its other fields can still be patched.
|
|
218
220
|
*
|
|
221
|
+
* <Note>**Required permission:** `ask:agent`</Note>
|
|
222
|
+
*
|
|
219
223
|
* @param {string} conversationId - The ID of the conversation to patch
|
|
220
224
|
* @param {MavenAGI.ConversationPatchRequest} request
|
|
221
225
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -320,6 +324,8 @@ class ConversationClient {
|
|
|
320
324
|
/**
|
|
321
325
|
* Get a conversation
|
|
322
326
|
*
|
|
327
|
+
* <Note>**Required permission:** `read:conversations`</Note>
|
|
328
|
+
*
|
|
323
329
|
* @param {string} conversationId - The ID of the conversation to get
|
|
324
330
|
* @param {MavenAGI.ConversationGetRequest} request
|
|
325
331
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -430,7 +436,7 @@ class ConversationClient {
|
|
|
430
436
|
* Wipes the user content from a conversation.
|
|
431
437
|
* The conversation and its ID still exist afterwards, and so does its non-content data, so it still counts in metrics.
|
|
432
438
|
* 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.
|
|
433
|
-
*
|
|
439
|
+
* The call answers `202 Accepted` and the wipe finishes on its own shortly after. Until it does, getting or searching the conversation can still return its original message text.
|
|
434
440
|
*
|
|
435
441
|
* Simulation conversations will no longer be visible in search results nor metrics.
|
|
436
442
|
* Non-simulation conversations remain visible; they cannot be fully removed from the system.
|
|
@@ -441,6 +447,8 @@ class ConversationClient {
|
|
|
441
447
|
* Evaluation results for the conversation are deleted, and the payloads recorded on its trigger and action executions are cleared. <br/><br/>
|
|
442
448
|
* 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>
|
|
443
449
|
*
|
|
450
|
+
* <Note>**Required permission:** `delete:conversations`</Note>
|
|
451
|
+
*
|
|
444
452
|
* @param {string} conversationId - The ID of the conversation to delete
|
|
445
453
|
* @param {MavenAGI.ConversationDeleteRequest} request
|
|
446
454
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -545,6 +553,8 @@ class ConversationClient {
|
|
|
545
553
|
*
|
|
546
554
|
* A closed conversation (`open` set to false) takes no new messages and returns a 400.
|
|
547
555
|
*
|
|
556
|
+
* <Note>**Required permission:** `ask:agent`</Note>
|
|
557
|
+
*
|
|
548
558
|
* @param {string} conversationId - The ID of the conversation to append messages to
|
|
549
559
|
* @param {MavenAGI.ConversationMessageRequest[]} request
|
|
550
560
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -677,6 +687,8 @@ class ConversationClient {
|
|
|
677
687
|
* Known Limitation:
|
|
678
688
|
* - The API does not currently expose metadata indicating whether a response or message is incomplete. This will be addressed in a future update.
|
|
679
689
|
*
|
|
690
|
+
* <Note>**Required permission:** `ask:agent`</Note>
|
|
691
|
+
*
|
|
680
692
|
* @param {string} conversationId - The ID of a new or existing conversation to use as context for the question
|
|
681
693
|
* @param {MavenAGI.AskRequest} request
|
|
682
694
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -809,6 +821,8 @@ class ConversationClient {
|
|
|
809
821
|
*
|
|
810
822
|
* Known Limitation:
|
|
811
823
|
* - The API does not currently expose metadata indicating whether a response or message is incomplete. This will be addressed in a future update.
|
|
824
|
+
*
|
|
825
|
+
* <Note>**Required permission:** `ask:agent`</Note>
|
|
812
826
|
*/
|
|
813
827
|
askStream(conversationId, request, requestOptions) {
|
|
814
828
|
return core.HttpResponsePromise.fromPromise(this.__askStream(conversationId, request, requestOptions));
|
|
@@ -1139,6 +1153,8 @@ class ConversationClient {
|
|
|
1139
1153
|
*
|
|
1140
1154
|
* A form cannot be submitted on a closed conversation (`open` set to false): that returns a 400.
|
|
1141
1155
|
*
|
|
1156
|
+
* <Note>**Required permission:** `ask:agent`</Note>
|
|
1157
|
+
*
|
|
1142
1158
|
* @param {string} conversationId - The ID of a conversation the form being submitted belongs to
|
|
1143
1159
|
* @param {MavenAGI.SubmitActionFormRequest} request
|
|
1144
1160
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1368,6 +1384,8 @@ class ConversationClient {
|
|
|
1368
1384
|
*
|
|
1369
1385
|
* A closed conversation (`open` set to false) takes no new metadata and returns a 400.
|
|
1370
1386
|
*
|
|
1387
|
+
* <Note>**Required permission:** `ask:agent`</Note>
|
|
1388
|
+
*
|
|
1371
1389
|
* @param {string} conversationId - The ID of the conversation to modify metadata for
|
|
1372
1390
|
* @param {MavenAGI.UpdateMetadataRequest} request
|
|
1373
1391
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1473,7 +1491,20 @@ class ConversationClient {
|
|
|
1473
1491
|
});
|
|
1474
1492
|
}
|
|
1475
1493
|
/**
|
|
1476
|
-
* Search conversations
|
|
1494
|
+
* Search conversations.
|
|
1495
|
+
*
|
|
1496
|
+
* Pagination is limited to the first 10,000 matching conversations: `(page + 1) * size` must
|
|
1497
|
+
* not exceed 10,000, and a request beyond that is rejected with a 400. To read past the
|
|
1498
|
+
* 10,000th result, use `searchCursor`.
|
|
1499
|
+
*
|
|
1500
|
+
* `searchCursor` orders results by creation time and has no `sort` field. Its defaults differ
|
|
1501
|
+
* from `search` in two ways:
|
|
1502
|
+
* - Without `sort`, `search` returns the oldest conversations first. `searchCursor` returns the
|
|
1503
|
+
* newest first unless `sortDesc` is `false`.
|
|
1504
|
+
* - Without a `filter`, `search` returns conversations of every `billable` value.
|
|
1505
|
+
* `searchCursor` leaves out `INELIGIBLE` ones unless `filter.billable` includes it.
|
|
1506
|
+
*
|
|
1507
|
+
* <Note>**Required permission:** `read:conversations`</Note>
|
|
1477
1508
|
*
|
|
1478
1509
|
* @param {MavenAGI.ConversationsSearchRequest} request
|
|
1479
1510
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1586,6 +1617,8 @@ class ConversationClient {
|
|
|
1586
1617
|
* came back with fewer conversations than you asked for: that happens legitimately, and more
|
|
1587
1618
|
* pages may still remain.
|
|
1588
1619
|
*
|
|
1620
|
+
* <Note>**Required permission:** `read:conversations`</Note>
|
|
1621
|
+
*
|
|
1589
1622
|
* @param {MavenAGI.ConversationsCursorSearchRequest} request
|
|
1590
1623
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1591
1624
|
*
|
|
@@ -1687,11 +1720,13 @@ class ConversationClient {
|
|
|
1687
1720
|
/**
|
|
1688
1721
|
* Export conversations to a CSV file.
|
|
1689
1722
|
*
|
|
1690
|
-
* This will output a summary of each conversation that matches the supplied filter.
|
|
1723
|
+
* This will output a summary of each conversation that matches the supplied filter. Only the first 10,000 matching conversations can be exported: `(page + 1) * size` must not exceed 10,000, and a request beyond that is rejected with a 400.
|
|
1691
1724
|
*
|
|
1692
1725
|
* For most use cases it is recommended to use the `search` API instead and convert the JSON response to your desired format.
|
|
1693
1726
|
* The CSV format may change over time and should not be relied upon by code consumers.
|
|
1694
1727
|
*
|
|
1728
|
+
* <Note>**Required permission:** `read:conversations`</Note>
|
|
1729
|
+
*
|
|
1695
1730
|
* @throws {@link MavenAGI.NotFoundError}
|
|
1696
1731
|
* @throws {@link MavenAGI.BadRequestError}
|
|
1697
1732
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
@@ -1788,6 +1823,8 @@ class ConversationClient {
|
|
|
1788
1823
|
*
|
|
1789
1824
|
* Shown in Agent Designer as "Import questions".
|
|
1790
1825
|
*
|
|
1826
|
+
* <Note>**Required permission:** `ask:agent`. Importing simulations also needs `read:agents` and `edit:agents`.</Note>
|
|
1827
|
+
*
|
|
1791
1828
|
* @param {core.file.Uploadable} file
|
|
1792
1829
|
* @param {MavenAGI.SimulationImportRequest} request
|
|
1793
1830
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1891,6 +1928,8 @@ class ConversationClient {
|
|
|
1891
1928
|
* User message delivery is not yet supported and returns a 400.
|
|
1892
1929
|
* </Warning>
|
|
1893
1930
|
*
|
|
1931
|
+
* <Note>**Required permission:** `ask:agent`</Note>
|
|
1932
|
+
*
|
|
1894
1933
|
* @param {MavenAGI.DeliverMessageRequest} request
|
|
1895
1934
|
* @param {ConversationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1896
1935
|
*
|
|
@@ -75,68 +75,7 @@ import type * as MavenAGI from "../../../index";
|
|
|
75
75
|
* }
|
|
76
76
|
* }
|
|
77
77
|
*/
|
|
78
|
-
export interface AskRequest {
|
|
79
|
-
/** Externally supplied ID to uniquely identify this message within the conversation. If a message with this ID already exists it will be reused and will not be updated. */
|
|
80
|
-
conversationMessageId: MavenAGI.EntityIdBase;
|
|
78
|
+
export interface AskRequest extends MavenAGI.AskRequestBase {
|
|
81
79
|
/** Externally supplied ID to uniquely identify the user that created this message */
|
|
82
80
|
userId: MavenAGI.EntityIdBase;
|
|
83
|
-
/**
|
|
84
|
-
* What prompts this assistant response. Omit (or send USER_MESSAGE) for a normal user
|
|
85
|
-
* question — this is the backwards-compatible default. Use WELCOME for an agent-authored
|
|
86
|
-
* opener, or PROACTIVE for a message the user did not prompt.
|
|
87
|
-
*/
|
|
88
|
-
type?: MavenAGI.AskType;
|
|
89
|
-
/**
|
|
90
|
-
* For USER_MESSAGE (the default) this is the user's message, in the user's own words, and
|
|
91
|
-
* is required. For WELCOME and PROACTIVE it is optional and, when provided, steers the
|
|
92
|
-
* agent's response (a directive to the agent, not the user's own words). (Changed from
|
|
93
|
-
* required to optional to support the non-user ask types — existing USER_MESSAGE callers
|
|
94
|
-
* are unaffected.)
|
|
95
|
-
*/
|
|
96
|
-
text?: string;
|
|
97
|
-
/**
|
|
98
|
-
* What form the answer takes. Omit it for prose, or send `jsonSchema` to additionally get a
|
|
99
|
-
* `BotObjectResponse` matching a schema you supply.
|
|
100
|
-
*
|
|
101
|
-
* Set per ask and independent of `type`, so one conversation can mix prose and structured
|
|
102
|
-
* rounds. Only the answer's form changes: knowledge, actions, charters and segments apply
|
|
103
|
-
* the same way either way.
|
|
104
|
-
*
|
|
105
|
-
* A structured answer accompanies the prose one rather than replacing it — the same round
|
|
106
|
-
* produces both, so the conversation stays readable. On `ask_stream` the prose still streams
|
|
107
|
-
* on `text` events as it always has, and the object arrives whole on a single `object` event
|
|
108
|
-
* near the end.
|
|
109
|
-
*
|
|
110
|
-
* Every answering round carries an object, including one where the agent asks a clarifying
|
|
111
|
-
* question rather than answering. Shape the schema so it can say "not enough information"
|
|
112
|
-
* — a populated object is not on its own evidence of a confident answer.
|
|
113
|
-
*
|
|
114
|
-
* Two exceptions. A round that asks the user to *act* produces an action form from the
|
|
115
|
-
* action rather than from an answer, so it carries no object; the round that answers after
|
|
116
|
-
* the form is submitted does carry one. Leave the `FORMS` capability off if you need an
|
|
117
|
-
* object on every round.
|
|
118
|
-
*
|
|
119
|
-
* A round answered verbatim by a `STRICT_RETURN` charter also carries no object. That
|
|
120
|
-
* charter's manual is returned exactly as written without consulting the agent, so there is
|
|
121
|
-
* nothing to shape into the requested schema — the round returns the manual as `text` alone.
|
|
122
|
-
*/
|
|
123
|
-
textFormat?: MavenAGI.TextFormat;
|
|
124
|
-
/**
|
|
125
|
-
* The attachments to the message. Image attachments will be sent to the LLM as additional data.
|
|
126
|
-
* Non-image attachments can be stored and downloaded from the API but will not be sent to the LLM.
|
|
127
|
-
*/
|
|
128
|
-
attachments?: MavenAGI.AttachmentRequest[];
|
|
129
|
-
/** Transient data which the Maven platform will not persist. This data will only be forwarded to actions taken by this ask request. For example, one may put in user tokens as transient data. */
|
|
130
|
-
transientData?: Record<string, string>;
|
|
131
|
-
/** IANA timezone identifier (e.g. "America/New_York", "Europe/London") to be used for time-based operations in the conversation. */
|
|
132
|
-
timezone?: string;
|
|
133
|
-
/**
|
|
134
|
-
* Key-value metadata to persist on the user message created by this request. Unlike
|
|
135
|
-
* `transientData` (which is never persisted) this is stored and returned when the message
|
|
136
|
-
* is read back via the API or dashboard, and unlike user data it is not sent to the LLM.
|
|
137
|
-
* Applied only when the message is first created — if `conversationMessageId` already
|
|
138
|
-
* exists the message is reused and its metadata is not updated. Keys and values are strings
|
|
139
|
-
* with a maximum length of 500 characters each.
|
|
140
|
-
*/
|
|
141
|
-
appMetadata?: Record<string, string>;
|
|
142
81
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* An ask without the user who asks, for endpoints that take the user from the caller's credentials.
|
|
4
|
+
*/
|
|
5
|
+
export interface AskRequestBase {
|
|
6
|
+
/** Externally supplied ID to uniquely identify this message within the conversation. If a message with this ID already exists it will be reused and will not be updated. */
|
|
7
|
+
conversationMessageId: MavenAGI.EntityIdBase;
|
|
8
|
+
/**
|
|
9
|
+
* What prompts this assistant response. Omit (or send USER_MESSAGE) for a normal user
|
|
10
|
+
* question — this is the backwards-compatible default. Use WELCOME for an agent-authored
|
|
11
|
+
* opener, or PROACTIVE for a message the user did not prompt.
|
|
12
|
+
*/
|
|
13
|
+
type?: MavenAGI.AskType;
|
|
14
|
+
/**
|
|
15
|
+
* For USER_MESSAGE (the default) this is the user's message, in the user's own words, and
|
|
16
|
+
* is required. For WELCOME and PROACTIVE it is optional and, when provided, steers the
|
|
17
|
+
* agent's response (a directive to the agent, not the user's own words). (Changed from
|
|
18
|
+
* required to optional to support the non-user ask types — existing USER_MESSAGE callers
|
|
19
|
+
* are unaffected.)
|
|
20
|
+
*/
|
|
21
|
+
text?: string;
|
|
22
|
+
/**
|
|
23
|
+
* What form the answer takes. Omit it for prose, or send `jsonSchema` to additionally get a
|
|
24
|
+
* `BotObjectResponse` matching a schema you supply.
|
|
25
|
+
*
|
|
26
|
+
* Set per ask and independent of `type`, so one conversation can mix prose and structured
|
|
27
|
+
* rounds. Only the answer's form changes: knowledge, actions, charters and segments apply
|
|
28
|
+
* the same way either way.
|
|
29
|
+
*
|
|
30
|
+
* A structured answer accompanies the prose one rather than replacing it — the same round
|
|
31
|
+
* produces both, so the conversation stays readable. On `ask_stream` the prose still streams
|
|
32
|
+
* on `text` events as it always has, and the object arrives whole on a single `object` event
|
|
33
|
+
* near the end.
|
|
34
|
+
*
|
|
35
|
+
* Every answering round carries an object, including one where the agent asks a clarifying
|
|
36
|
+
* question rather than answering. Shape the schema so it can say "not enough information"
|
|
37
|
+
* — a populated object is not on its own evidence of a confident answer.
|
|
38
|
+
*
|
|
39
|
+
* Two exceptions. A round that asks the user to *act* produces an action form from the
|
|
40
|
+
* action rather than from an answer, so it carries no object; the round that answers after
|
|
41
|
+
* the form is submitted does carry one. Leave the `FORMS` capability off if you need an
|
|
42
|
+
* object on every round.
|
|
43
|
+
*
|
|
44
|
+
* A round answered verbatim by a `STRICT_RETURN` charter also carries no object. That
|
|
45
|
+
* charter's manual is returned exactly as written without consulting the agent, so there is
|
|
46
|
+
* nothing to shape into the requested schema — the round returns the manual as `text` alone.
|
|
47
|
+
*/
|
|
48
|
+
textFormat?: MavenAGI.TextFormat;
|
|
49
|
+
/**
|
|
50
|
+
* The attachments to the message. Image attachments will be sent to the LLM as additional data.
|
|
51
|
+
* Non-image attachments can be stored and downloaded from the API but will not be sent to the LLM.
|
|
52
|
+
*/
|
|
53
|
+
attachments?: MavenAGI.AttachmentRequest[];
|
|
54
|
+
/** Transient data which the Maven platform will not persist. This data will only be forwarded to actions taken by this ask request. For example, one may put in user tokens as transient data. */
|
|
55
|
+
transientData?: Record<string, string>;
|
|
56
|
+
/** IANA timezone identifier (e.g. "America/New_York", "Europe/London") to be used for time-based operations in the conversation. */
|
|
57
|
+
timezone?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Key-value metadata to persist on the user message created by this request. Unlike
|
|
60
|
+
* `transientData` (which is never persisted) this is stored and returned when the message
|
|
61
|
+
* is read back via the API or dashboard, and unlike user data it is not sent to the LLM.
|
|
62
|
+
* Applied only when the message is first created — if `conversationMessageId` already
|
|
63
|
+
* exists the message is reused and its metadata is not updated. Keys and values are strings
|
|
64
|
+
* with a maximum length of 500 characters each.
|
|
65
|
+
*/
|
|
66
|
+
appMetadata?: Record<string, string>;
|
|
67
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./ActionFormAttachment";
|
|
2
2
|
export * from "./ActionFormRequestParamValue";
|
|
3
3
|
export * from "./AskRequest";
|
|
4
|
+
export * from "./AskRequestBase";
|
|
4
5
|
export * from "./AskStreamActionEvent";
|
|
5
6
|
export * from "./AskStreamChartEvent";
|
|
6
7
|
export * from "./AskStreamEndEvent";
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./ActionFormAttachment"), exports);
|
|
18
18
|
__exportStar(require("./ActionFormRequestParamValue"), exports);
|
|
19
19
|
__exportStar(require("./AskRequest"), exports);
|
|
20
|
+
__exportStar(require("./AskRequestBase"), exports);
|
|
20
21
|
__exportStar(require("./AskStreamActionEvent"), exports);
|
|
21
22
|
__exportStar(require("./AskStreamChartEvent"), exports);
|
|
22
23
|
__exportStar(require("./AskStreamEndEvent"), exports);
|
|
@@ -20,6 +20,8 @@ export declare class ConversationKickoffsClient {
|
|
|
20
20
|
* that is already live. Use the capability APIs to activate it, and to read, search or delete
|
|
21
21
|
* it afterwards.
|
|
22
22
|
*
|
|
23
|
+
* <Note>**Required permission:** `edit:agents`</Note>
|
|
24
|
+
*
|
|
23
25
|
* @param {MavenAGI.CreateConversationKickoffRequest} request
|
|
24
26
|
* @param {ConversationKickoffsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
27
|
*
|
|
@@ -67,6 +67,8 @@ class ConversationKickoffsClient {
|
|
|
67
67
|
* that is already live. Use the capability APIs to activate it, and to read, search or delete
|
|
68
68
|
* it afterwards.
|
|
69
69
|
*
|
|
70
|
+
* <Note>**Required permission:** `edit:agents`</Note>
|
|
71
|
+
*
|
|
70
72
|
* @param {MavenAGI.CreateConversationKickoffRequest} request
|
|
71
73
|
* @param {ConversationKickoffsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
72
74
|
*
|
|
@@ -11,6 +11,14 @@ export declare class CustomersClient {
|
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<CustomersClient.Options>;
|
|
12
12
|
constructor(options: CustomersClient.Options);
|
|
13
13
|
/**
|
|
14
|
+
* Search customers of an agent.
|
|
15
|
+
*
|
|
16
|
+
* Pagination is limited to the first 10,000 matching customers: `(page + 1) * size` must not
|
|
17
|
+
* exceed 10,000, and a request beyond that is rejected with a 400. Narrow the filter to reach
|
|
18
|
+
* later results.
|
|
19
|
+
*
|
|
20
|
+
* <Note>**Required permission:** `read:agents`</Note>
|
|
21
|
+
*
|
|
14
22
|
* @param {MavenAGI.CustomersSearchRequest} request
|
|
15
23
|
* @param {CustomersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
16
24
|
*
|
|
@@ -30,6 +38,8 @@ export declare class CustomersClient {
|
|
|
30
38
|
/**
|
|
31
39
|
* Update a customer of an agent or create it if it doesn't exist. In case of an update, fields not provided (e.g., description, status) will be preserved.
|
|
32
40
|
*
|
|
41
|
+
* <Note>**Required permission:** `edit:agents`</Note>
|
|
42
|
+
*
|
|
33
43
|
* @param {MavenAGI.CustomerRequest} request
|
|
34
44
|
* @param {CustomersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
35
45
|
*
|
|
@@ -54,6 +64,8 @@ export declare class CustomersClient {
|
|
|
54
64
|
/**
|
|
55
65
|
* Get a customer by its supplied ID
|
|
56
66
|
*
|
|
67
|
+
* <Note>**Required permission:** `read:agents`</Note>
|
|
68
|
+
*
|
|
57
69
|
* @param {string} customerReferenceId - The reference ID of the customer to get. All other entity ID fields are inferred from the request.
|
|
58
70
|
* @param {MavenAGI.CustomerGetRequest} request
|
|
59
71
|
* @param {CustomersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -77,6 +89,8 @@ export declare class CustomersClient {
|
|
|
77
89
|
* The `appId` field can be provided to update a customer owned by a different app.
|
|
78
90
|
* All other fields will overwrite the existing value on the customer only if provided.
|
|
79
91
|
*
|
|
92
|
+
* <Note>**Required permission:** `edit:agents`</Note>
|
|
93
|
+
*
|
|
80
94
|
* @param {string} customerReferenceId - The reference ID of the customer to update. All other entity ID fields are inferred from the request.
|
|
81
95
|
* @param {MavenAGI.CustomerPatchRequest} request
|
|
82
96
|
* @param {CustomersClient.RequestOptions} requestOptions - Request-specific configuration.
|