@aui.io/aui-client 1.2.37 → 1.2.39
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/README.md +18 -11
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/controllerApi/client/Client.d.ts +11 -6
- package/dist/cjs/api/resources/controllerApi/client/Client.js +38 -19
- package/dist/cjs/api/resources/controllerApi/client/requests/DirectFollowupSuggestionsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/controllerApi/client/requests/DirectFollowupSuggestionsRequest.js +3 -0
- package/dist/cjs/api/resources/controllerApi/client/requests/GetTraceInfoRequest.d.ts +13 -0
- package/dist/cjs/api/resources/controllerApi/client/requests/GetTraceInfoRequest.js +3 -0
- package/dist/cjs/api/resources/controllerApi/client/requests/SubmitMessageRequest.d.ts +6 -2
- package/dist/cjs/api/resources/controllerApi/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/types/RecordOriginType.d.ts +1 -0
- package/dist/cjs/api/types/RecordOriginType.js +1 -0
- package/dist/cjs/api/types/RecordScope.d.ts +8 -0
- package/dist/cjs/api/types/RecordScope.js +3 -0
- package/dist/cjs/api/types/RecordScopeType.d.ts +8 -0
- package/dist/cjs/api/types/RecordScopeType.js +11 -0
- package/dist/cjs/api/types/TraceDecisionCallIntegration.d.ts +1 -1
- package/dist/cjs/api/types/TraceInfo.d.ts +2 -2
- package/dist/cjs/api/types/TraceMcpIntegration.d.ts +11 -0
- package/dist/cjs/api/types/TraceMcpIntegration.js +3 -0
- package/dist/cjs/api/types/TraceMcpToolCall.d.ts +6 -0
- package/dist/cjs/api/types/TraceMcpToolCall.js +3 -0
- package/dist/cjs/api/types/TraceRuleAction.d.ts +1 -0
- package/dist/cjs/api/types/TraceRuleAction.js +1 -0
- package/dist/cjs/api/types/index.d.ts +4 -0
- package/dist/cjs/api/types/index.js +4 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/controllerApi/client/Client.d.mts +11 -6
- package/dist/esm/api/resources/controllerApi/client/Client.mjs +38 -19
- package/dist/esm/api/resources/controllerApi/client/requests/DirectFollowupSuggestionsRequest.d.mts +10 -0
- package/dist/esm/api/resources/controllerApi/client/requests/DirectFollowupSuggestionsRequest.mjs +2 -0
- package/dist/esm/api/resources/controllerApi/client/requests/GetTraceInfoRequest.d.mts +13 -0
- package/dist/esm/api/resources/controllerApi/client/requests/GetTraceInfoRequest.mjs +2 -0
- package/dist/esm/api/resources/controllerApi/client/requests/SubmitMessageRequest.d.mts +6 -2
- package/dist/esm/api/resources/controllerApi/client/requests/index.d.mts +2 -0
- package/dist/esm/api/types/RecordOriginType.d.mts +1 -0
- package/dist/esm/api/types/RecordOriginType.mjs +1 -0
- package/dist/esm/api/types/RecordScope.d.mts +8 -0
- package/dist/esm/api/types/RecordScope.mjs +2 -0
- package/dist/esm/api/types/RecordScopeType.d.mts +8 -0
- package/dist/esm/api/types/RecordScopeType.mjs +8 -0
- package/dist/esm/api/types/TraceDecisionCallIntegration.d.mts +1 -1
- package/dist/esm/api/types/TraceInfo.d.mts +2 -2
- package/dist/esm/api/types/TraceMcpIntegration.d.mts +11 -0
- package/dist/esm/api/types/TraceMcpIntegration.mjs +2 -0
- package/dist/esm/api/types/TraceMcpToolCall.d.mts +6 -0
- package/dist/esm/api/types/TraceMcpToolCall.mjs +2 -0
- package/dist/esm/api/types/TraceRuleAction.d.mts +1 -0
- package/dist/esm/api/types/TraceRuleAction.mjs +1 -0
- package/dist/esm/api/types/index.d.mts +4 -0
- package/dist/esm/api/types/index.mjs +4 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +18 -6
package/README.md
CHANGED
|
@@ -352,23 +352,29 @@ const traceInfo = await client.controllerApi.getTraceInfo('your-task-id', messag
|
|
|
352
352
|
console.log('Trace Info:', traceInfo);
|
|
353
353
|
```
|
|
354
354
|
|
|
355
|
-
#### `getDirectFollowupSuggestions(
|
|
356
|
-
Retrieve AI-generated followup suggestions
|
|
355
|
+
#### `getDirectFollowupSuggestions(request?)` - Get Direct Followup Suggestions
|
|
356
|
+
Retrieve AI-generated followup suggestions. Accepts optional `context` and `created_by` parameters.
|
|
357
357
|
|
|
358
358
|
```typescript
|
|
359
|
-
const response = await client.controllerApi.getDirectFollowupSuggestions(
|
|
359
|
+
const response = await client.controllerApi.getDirectFollowupSuggestions({
|
|
360
|
+
context?: Record<string, unknown>, // Optional: context data (e.g., { task_id: 'xxx' })
|
|
361
|
+
created_by?: string // Optional: user identifier
|
|
362
|
+
});
|
|
360
363
|
|
|
361
364
|
// Returns: DirectFollowupSuggestionsResponse
|
|
362
365
|
// {
|
|
363
366
|
// suggestions?: string[], // Array of suggested followup questions
|
|
364
|
-
// metadata_id?: string // Metadata ID for tracking/analytics
|
|
367
|
+
// metadata_id?: string // Metadata ID for tracking/analytics
|
|
365
368
|
// }
|
|
366
369
|
```
|
|
367
370
|
|
|
368
371
|
**Example:**
|
|
369
372
|
|
|
370
373
|
```typescript
|
|
371
|
-
const response = await client.controllerApi.getDirectFollowupSuggestions(
|
|
374
|
+
const response = await client.controllerApi.getDirectFollowupSuggestions({
|
|
375
|
+
context: { task_id: 'your-task-id' },
|
|
376
|
+
created_by: 'user123'
|
|
377
|
+
});
|
|
372
378
|
|
|
373
379
|
console.log('Metadata ID:', response.metadata_id);
|
|
374
380
|
console.log('Suggested followups:');
|
|
@@ -670,14 +676,15 @@ const client = new ApolloClient({
|
|
|
670
676
|
networkApiKey: 'API_KEY_YOUR_KEY_HERE'
|
|
671
677
|
});
|
|
672
678
|
|
|
673
|
-
async function getSuggestedQuestions(taskId: string) {
|
|
679
|
+
async function getSuggestedQuestions(taskId: string, userId: string) {
|
|
674
680
|
try {
|
|
675
|
-
// Get AI-generated followup suggestions
|
|
676
|
-
const response = await client.controllerApi.getDirectFollowupSuggestions(
|
|
681
|
+
// Get AI-generated followup suggestions with context and user info
|
|
682
|
+
const response = await client.controllerApi.getDirectFollowupSuggestions({
|
|
683
|
+
context: { task_id: taskId },
|
|
684
|
+
created_by: userId
|
|
685
|
+
});
|
|
677
686
|
|
|
678
|
-
// metadata_id can be used for tracking/analytics
|
|
679
687
|
console.log('Metadata ID:', response.metadata_id);
|
|
680
|
-
|
|
681
688
|
console.log('Suggested followup questions:');
|
|
682
689
|
response.suggestions?.forEach((suggestion, index) => {
|
|
683
690
|
console.log(` ${index + 1}. ${suggestion}`);
|
|
@@ -691,7 +698,7 @@ async function getSuggestedQuestions(taskId: string) {
|
|
|
691
698
|
}
|
|
692
699
|
|
|
693
700
|
// Example usage
|
|
694
|
-
getSuggestedQuestions('task-123');
|
|
701
|
+
getSuggestedQuestions('task-123', 'user-456');
|
|
695
702
|
// Output:
|
|
696
703
|
// Metadata ID: 69e4b4d4359671434fdff849
|
|
697
704
|
// Suggested followup questions:
|
package/dist/cjs/Client.js
CHANGED
|
@@ -45,8 +45,8 @@ class ApolloClient {
|
|
|
45
45
|
"x-network-api-key": _options === null || _options === void 0 ? void 0 : _options.networkApiKey,
|
|
46
46
|
"X-Fern-Language": "JavaScript",
|
|
47
47
|
"X-Fern-SDK-Name": "@aui.io/aui-client",
|
|
48
|
-
"X-Fern-SDK-Version": "1.2.
|
|
49
|
-
"User-Agent": "@aui.io/aui-client/1.2.
|
|
48
|
+
"X-Fern-SDK-Version": "1.2.39",
|
|
49
|
+
"User-Agent": "@aui.io/aui-client/1.2.39",
|
|
50
50
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
51
51
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
52
52
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -69,7 +69,8 @@ export declare class ControllerApi {
|
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
71
|
* await client.controllerApi.sendMessage({
|
|
72
|
-
*
|
|
72
|
+
* include_business_trace: true,
|
|
73
|
+
* include_context_trace: true,
|
|
73
74
|
* is_external_api: true,
|
|
74
75
|
* task_id: "task_id"
|
|
75
76
|
* })
|
|
@@ -103,27 +104,31 @@ export declare class ControllerApi {
|
|
|
103
104
|
getAgentContext(request: Record<string, unknown>, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.CreateTopicRequestBody>;
|
|
104
105
|
private __getAgentContext;
|
|
105
106
|
/**
|
|
106
|
-
* @param {
|
|
107
|
+
* @param {Apollo.DirectFollowupSuggestionsRequest} request
|
|
107
108
|
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
108
109
|
*
|
|
109
110
|
* @throws {@link Apollo.UnprocessableEntityError}
|
|
110
111
|
*
|
|
111
112
|
* @example
|
|
112
|
-
* await client.controllerApi.getDirectFollowupSuggestions(
|
|
113
|
+
* await client.controllerApi.getDirectFollowupSuggestions()
|
|
113
114
|
*/
|
|
114
|
-
getDirectFollowupSuggestions(
|
|
115
|
+
getDirectFollowupSuggestions(request?: Apollo.DirectFollowupSuggestionsRequest, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.DirectFollowupSuggestionsResponse>;
|
|
115
116
|
private __getDirectFollowupSuggestions;
|
|
116
117
|
/**
|
|
117
118
|
* @param {string} taskId
|
|
118
119
|
* @param {string} messageId
|
|
120
|
+
* @param {Apollo.GetTraceInfoRequest} request
|
|
119
121
|
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
120
122
|
*
|
|
121
123
|
* @throws {@link Apollo.UnprocessableEntityError}
|
|
122
124
|
*
|
|
123
125
|
* @example
|
|
124
|
-
* await client.controllerApi.getTraceInfo("task_id", "message_id"
|
|
126
|
+
* await client.controllerApi.getTraceInfo("task_id", "message_id", {
|
|
127
|
+
* include_business_logic: true,
|
|
128
|
+
* include_context_logic: true
|
|
129
|
+
* })
|
|
125
130
|
*/
|
|
126
|
-
getTraceInfo(taskId: string, messageId: string, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
|
|
131
|
+
getTraceInfo(taskId: string, messageId: string, request?: Apollo.GetTraceInfoRequest, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
|
|
127
132
|
private __getTraceInfo;
|
|
128
133
|
/**
|
|
129
134
|
* Start a text conversation (WhatsApp or SMS).
|
|
@@ -335,7 +335,8 @@ class ControllerApi {
|
|
|
335
335
|
*
|
|
336
336
|
* @example
|
|
337
337
|
* await client.controllerApi.sendMessage({
|
|
338
|
-
*
|
|
338
|
+
* include_business_trace: true,
|
|
339
|
+
* include_context_trace: true,
|
|
339
340
|
* is_external_api: true,
|
|
340
341
|
* task_id: "task_id"
|
|
341
342
|
* })
|
|
@@ -346,10 +347,13 @@ class ControllerApi {
|
|
|
346
347
|
__sendMessage(request, requestOptions) {
|
|
347
348
|
return __awaiter(this, void 0, void 0, function* () {
|
|
348
349
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
349
|
-
const {
|
|
350
|
+
const { include_business_trace: includeBusinessTrace, include_context_trace: includeContextTrace, is_external_api: isExternalApi } = request, _body = __rest(request, ["include_business_trace", "include_context_trace", "is_external_api"]);
|
|
350
351
|
const _queryParams = {};
|
|
351
|
-
if (
|
|
352
|
-
_queryParams.
|
|
352
|
+
if (includeBusinessTrace != null) {
|
|
353
|
+
_queryParams.include_business_trace = includeBusinessTrace.toString();
|
|
354
|
+
}
|
|
355
|
+
if (includeContextTrace != null) {
|
|
356
|
+
_queryParams.include_context_trace = includeContextTrace.toString();
|
|
353
357
|
}
|
|
354
358
|
if (isExternalApi != null) {
|
|
355
359
|
_queryParams.is_external_api = isExternalApi.toString();
|
|
@@ -536,28 +540,31 @@ class ControllerApi {
|
|
|
536
540
|
});
|
|
537
541
|
}
|
|
538
542
|
/**
|
|
539
|
-
* @param {
|
|
543
|
+
* @param {Apollo.DirectFollowupSuggestionsRequest} request
|
|
540
544
|
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
541
545
|
*
|
|
542
546
|
* @throws {@link Apollo.UnprocessableEntityError}
|
|
543
547
|
*
|
|
544
548
|
* @example
|
|
545
|
-
* await client.controllerApi.getDirectFollowupSuggestions(
|
|
549
|
+
* await client.controllerApi.getDirectFollowupSuggestions()
|
|
546
550
|
*/
|
|
547
|
-
getDirectFollowupSuggestions(
|
|
548
|
-
return core.HttpResponsePromise.fromPromise(this.__getDirectFollowupSuggestions(
|
|
551
|
+
getDirectFollowupSuggestions(request = {}, requestOptions) {
|
|
552
|
+
return core.HttpResponsePromise.fromPromise(this.__getDirectFollowupSuggestions(request, requestOptions));
|
|
549
553
|
}
|
|
550
|
-
__getDirectFollowupSuggestions(
|
|
551
|
-
return __awaiter(this,
|
|
554
|
+
__getDirectFollowupSuggestions() {
|
|
555
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
552
556
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
553
557
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
554
558
|
"x-network-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.networkApiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.networkApiKey,
|
|
555
559
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
556
560
|
const _response = yield core.fetcher({
|
|
557
|
-
url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : ((_e = (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ApolloEnvironment.Gcp).base,
|
|
558
|
-
method: "
|
|
561
|
+
url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : ((_e = (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ApolloEnvironment.Gcp).base, "api/v1/external/direct-followup-suggestions"),
|
|
562
|
+
method: "POST",
|
|
559
563
|
headers: _headers,
|
|
564
|
+
contentType: "application/json",
|
|
560
565
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
566
|
+
requestType: "json",
|
|
567
|
+
body: request,
|
|
561
568
|
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
562
569
|
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
563
570
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -590,7 +597,7 @@ class ControllerApi {
|
|
|
590
597
|
rawResponse: _response.rawResponse,
|
|
591
598
|
});
|
|
592
599
|
case "timeout":
|
|
593
|
-
throw new errors.ApolloTimeoutError("Timeout exceeded when calling
|
|
600
|
+
throw new errors.ApolloTimeoutError("Timeout exceeded when calling POST /api/v1/external/direct-followup-suggestions.");
|
|
594
601
|
case "unknown":
|
|
595
602
|
throw new errors.ApolloError({
|
|
596
603
|
message: _response.error.errorMessage,
|
|
@@ -602,19 +609,31 @@ class ControllerApi {
|
|
|
602
609
|
/**
|
|
603
610
|
* @param {string} taskId
|
|
604
611
|
* @param {string} messageId
|
|
612
|
+
* @param {Apollo.GetTraceInfoRequest} request
|
|
605
613
|
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
606
614
|
*
|
|
607
615
|
* @throws {@link Apollo.UnprocessableEntityError}
|
|
608
616
|
*
|
|
609
617
|
* @example
|
|
610
|
-
* await client.controllerApi.getTraceInfo("task_id", "message_id"
|
|
618
|
+
* await client.controllerApi.getTraceInfo("task_id", "message_id", {
|
|
619
|
+
* include_business_logic: true,
|
|
620
|
+
* include_context_logic: true
|
|
621
|
+
* })
|
|
611
622
|
*/
|
|
612
|
-
getTraceInfo(taskId, messageId, requestOptions) {
|
|
613
|
-
return core.HttpResponsePromise.fromPromise(this.__getTraceInfo(taskId, messageId, requestOptions));
|
|
623
|
+
getTraceInfo(taskId, messageId, request = {}, requestOptions) {
|
|
624
|
+
return core.HttpResponsePromise.fromPromise(this.__getTraceInfo(taskId, messageId, request, requestOptions));
|
|
614
625
|
}
|
|
615
|
-
__getTraceInfo(
|
|
616
|
-
return __awaiter(this,
|
|
626
|
+
__getTraceInfo(taskId_1, messageId_1) {
|
|
627
|
+
return __awaiter(this, arguments, void 0, function* (taskId, messageId, request = {}, requestOptions) {
|
|
617
628
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
629
|
+
const { include_business_logic: includeBusinessLogic, include_context_logic: includeContextLogic } = request;
|
|
630
|
+
const _queryParams = {};
|
|
631
|
+
if (includeBusinessLogic != null) {
|
|
632
|
+
_queryParams.include_business_logic = includeBusinessLogic.toString();
|
|
633
|
+
}
|
|
634
|
+
if (includeContextLogic != null) {
|
|
635
|
+
_queryParams.include_context_logic = includeContextLogic.toString();
|
|
636
|
+
}
|
|
618
637
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
619
638
|
"x-network-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.networkApiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.networkApiKey,
|
|
620
639
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -622,7 +641,7 @@ class ControllerApi {
|
|
|
622
641
|
url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : ((_e = (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ApolloEnvironment.Gcp).base, `api/v1/external/tasks/${core.url.encodePathParam(taskId)}/messages/${core.url.encodePathParam(messageId)}/trace-info`),
|
|
623
642
|
method: "GET",
|
|
624
643
|
headers: _headers,
|
|
625
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
644
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
626
645
|
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
627
646
|
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
628
647
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* include_business_logic: true,
|
|
5
|
+
* include_context_logic: true
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface GetTraceInfoRequest {
|
|
9
|
+
/** When false, omits NLU/understanding and business decisions (rules, tools, params, etc.); input and response stay populated. */
|
|
10
|
+
include_business_logic?: boolean;
|
|
11
|
+
/** When false, omits the context section and call_integration (REST/RAG/MCP) decisions. */
|
|
12
|
+
include_context_logic?: boolean;
|
|
13
|
+
}
|
|
@@ -2,13 +2,17 @@ import type * as Apollo from "../../../../index.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
|
-
*
|
|
5
|
+
* include_business_trace: true,
|
|
6
|
+
* include_context_trace: true,
|
|
6
7
|
* is_external_api: true,
|
|
7
8
|
* task_id: "task_id"
|
|
8
9
|
* }
|
|
9
10
|
*/
|
|
10
11
|
export interface SubmitMessageRequest {
|
|
11
|
-
|
|
12
|
+
/** When true, includes NLU/understanding and business decisions (rules, tools, params, etc.) in trace_info. */
|
|
13
|
+
include_business_trace?: boolean;
|
|
14
|
+
/** When true, includes the context section and call_integration (REST/RAG/MCP) decisions in trace_info. */
|
|
15
|
+
include_context_trace?: boolean;
|
|
12
16
|
is_external_api?: boolean;
|
|
13
17
|
task_id: string;
|
|
14
18
|
text?: string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export type { CreateTaskRequest } from "./CreateTaskRequest.js";
|
|
2
|
+
export type { DirectFollowupSuggestionsRequest } from "./DirectFollowupSuggestionsRequest.js";
|
|
2
3
|
export type { ExternalWidgetRenderRequest } from "./ExternalWidgetRenderRequest.js";
|
|
3
4
|
export type { GetProductMetadataRequest } from "./GetProductMetadataRequest.js";
|
|
5
|
+
export type { GetTraceInfoRequest } from "./GetTraceInfoRequest.js";
|
|
4
6
|
export type { ListUserTasksRequest } from "./ListUserTasksRequest.js";
|
|
5
7
|
export type { SubmitMessageRequest } from "./SubmitMessageRequest.js";
|
|
6
8
|
export type { TextConversationInitiateRequest } from "./TextConversationInitiateRequest.js";
|
|
@@ -5,5 +5,6 @@ export declare const RecordOriginType: {
|
|
|
5
5
|
readonly FeedbackPlayground: "feedback-playground";
|
|
6
6
|
readonly LlmManagement: "llm-management";
|
|
7
7
|
readonly ThirdParty: "third-party";
|
|
8
|
+
readonly AgentBuilder: "agent-builder";
|
|
8
9
|
};
|
|
9
10
|
export type RecordOriginType = (typeof RecordOriginType)[keyof typeof RecordOriginType];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const RecordScopeType: {
|
|
2
|
+
readonly Network: "NETWORK";
|
|
3
|
+
readonly Account: "ACCOUNT";
|
|
4
|
+
readonly Seed: "SEED";
|
|
5
|
+
readonly NetworkCategory: "NETWORK_CATEGORY";
|
|
6
|
+
readonly Global: "GLOBAL";
|
|
7
|
+
};
|
|
8
|
+
export type RecordScopeType = (typeof RecordScopeType)[keyof typeof RecordScopeType];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.RecordScopeType = void 0;
|
|
5
|
+
exports.RecordScopeType = {
|
|
6
|
+
Network: "NETWORK",
|
|
7
|
+
Account: "ACCOUNT",
|
|
8
|
+
Seed: "SEED",
|
|
9
|
+
NetworkCategory: "NETWORK_CATEGORY",
|
|
10
|
+
Global: "GLOBAL",
|
|
11
|
+
};
|
|
@@ -6,5 +6,5 @@ export interface TraceDecisionCallIntegration {
|
|
|
6
6
|
track_id?: string;
|
|
7
7
|
}
|
|
8
8
|
export declare namespace TraceDecisionCallIntegration {
|
|
9
|
-
type Integration = Apollo.TraceRestIntegration | Apollo.TraceRagIntegration;
|
|
9
|
+
type Integration = Apollo.TraceRestIntegration | Apollo.TraceRagIntegration | Apollo.TraceMcpIntegration;
|
|
10
10
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type * as Apollo from "../index.js";
|
|
2
2
|
/**
|
|
3
|
-
* Root trace.
|
|
3
|
+
* Root trace. input and response are always set; context and understanding may be omitted (None) when filtered.
|
|
4
4
|
*/
|
|
5
5
|
export interface TraceInfo {
|
|
6
6
|
input: Apollo.TraceInput;
|
|
7
7
|
context?: Apollo.TraceContext;
|
|
8
|
-
understanding
|
|
8
|
+
understanding?: Apollo.TraceUnderstanding;
|
|
9
9
|
decisions?: TraceInfo.Decisions.Item[];
|
|
10
10
|
response: Apollo.TraceResponse;
|
|
11
11
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as Apollo from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* MCP integration call details.
|
|
4
|
+
*/
|
|
5
|
+
export interface TraceMcpIntegration {
|
|
6
|
+
code: string;
|
|
7
|
+
type?: Apollo.TraceIntegrationType;
|
|
8
|
+
name: string;
|
|
9
|
+
completion: string;
|
|
10
|
+
tool_calls?: Apollo.TraceMcpToolCall[];
|
|
11
|
+
}
|
|
@@ -8,5 +8,6 @@ export declare const TraceRuleAction: {
|
|
|
8
8
|
readonly BlockAndActivateAnotherTool: "BLOCK_AND_ACTIVATE_ANOTHER_TOOL";
|
|
9
9
|
readonly ActivateSubTool: "ACTIVATE_SUB_TOOL";
|
|
10
10
|
readonly Integration: "INTEGRATION";
|
|
11
|
+
readonly ActivateAnotherTool: "ACTIVATE_ANOTHER_TOOL";
|
|
11
12
|
};
|
|
12
13
|
export type TraceRuleAction = (typeof TraceRuleAction)[keyof typeof TraceRuleAction];
|
|
@@ -24,6 +24,8 @@ export * from "./ParameterType.js";
|
|
|
24
24
|
export * from "./ProductCard.js";
|
|
25
25
|
export * from "./ProductParameter.js";
|
|
26
26
|
export * from "./RecordOriginType.js";
|
|
27
|
+
export * from "./RecordScope.js";
|
|
28
|
+
export * from "./RecordScopeType.js";
|
|
27
29
|
export * from "./Source.js";
|
|
28
30
|
export * from "./StreamingUpdatePayload.js";
|
|
29
31
|
export * from "./TaskInteractionFacetsTaskParametersMatchGroup.js";
|
|
@@ -60,6 +62,8 @@ export * from "./TraceIntegrationRequest.js";
|
|
|
60
62
|
export * from "./TraceIntegrationResponse.js";
|
|
61
63
|
export * from "./TraceIntegrationResponseItem.js";
|
|
62
64
|
export * from "./TraceIntegrationType.js";
|
|
65
|
+
export * from "./TraceMcpIntegration.js";
|
|
66
|
+
export * from "./TraceMcpToolCall.js";
|
|
63
67
|
export * from "./TraceParamsCheckStatus.js";
|
|
64
68
|
export * from "./TraceQuestionReason.js";
|
|
65
69
|
export * from "./TraceRagIntegration.js";
|
|
@@ -40,6 +40,8 @@ __exportStar(require("./ParameterType.js"), exports);
|
|
|
40
40
|
__exportStar(require("./ProductCard.js"), exports);
|
|
41
41
|
__exportStar(require("./ProductParameter.js"), exports);
|
|
42
42
|
__exportStar(require("./RecordOriginType.js"), exports);
|
|
43
|
+
__exportStar(require("./RecordScope.js"), exports);
|
|
44
|
+
__exportStar(require("./RecordScopeType.js"), exports);
|
|
43
45
|
__exportStar(require("./Source.js"), exports);
|
|
44
46
|
__exportStar(require("./StreamingUpdatePayload.js"), exports);
|
|
45
47
|
__exportStar(require("./TaskInteractionFacetsTaskParametersMatchGroup.js"), exports);
|
|
@@ -76,6 +78,8 @@ __exportStar(require("./TraceIntegrationRequest.js"), exports);
|
|
|
76
78
|
__exportStar(require("./TraceIntegrationResponse.js"), exports);
|
|
77
79
|
__exportStar(require("./TraceIntegrationResponseItem.js"), exports);
|
|
78
80
|
__exportStar(require("./TraceIntegrationType.js"), exports);
|
|
81
|
+
__exportStar(require("./TraceMcpIntegration.js"), exports);
|
|
82
|
+
__exportStar(require("./TraceMcpToolCall.js"), exports);
|
|
79
83
|
__exportStar(require("./TraceParamsCheckStatus.js"), exports);
|
|
80
84
|
__exportStar(require("./TraceQuestionReason.js"), exports);
|
|
81
85
|
__exportStar(require("./TraceRagIntegration.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.2.
|
|
1
|
+
export declare const SDK_VERSION = "1.2.39";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -9,8 +9,8 @@ export class ApolloClient {
|
|
|
9
9
|
"x-network-api-key": _options === null || _options === void 0 ? void 0 : _options.networkApiKey,
|
|
10
10
|
"X-Fern-Language": "JavaScript",
|
|
11
11
|
"X-Fern-SDK-Name": "@aui.io/aui-client",
|
|
12
|
-
"X-Fern-SDK-Version": "1.2.
|
|
13
|
-
"User-Agent": "@aui.io/aui-client/1.2.
|
|
12
|
+
"X-Fern-SDK-Version": "1.2.39",
|
|
13
|
+
"User-Agent": "@aui.io/aui-client/1.2.39",
|
|
14
14
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
15
15
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
16
16
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -69,7 +69,8 @@ export declare class ControllerApi {
|
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
71
|
* await client.controllerApi.sendMessage({
|
|
72
|
-
*
|
|
72
|
+
* include_business_trace: true,
|
|
73
|
+
* include_context_trace: true,
|
|
73
74
|
* is_external_api: true,
|
|
74
75
|
* task_id: "task_id"
|
|
75
76
|
* })
|
|
@@ -103,27 +104,31 @@ export declare class ControllerApi {
|
|
|
103
104
|
getAgentContext(request: Record<string, unknown>, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.CreateTopicRequestBody>;
|
|
104
105
|
private __getAgentContext;
|
|
105
106
|
/**
|
|
106
|
-
* @param {
|
|
107
|
+
* @param {Apollo.DirectFollowupSuggestionsRequest} request
|
|
107
108
|
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
108
109
|
*
|
|
109
110
|
* @throws {@link Apollo.UnprocessableEntityError}
|
|
110
111
|
*
|
|
111
112
|
* @example
|
|
112
|
-
* await client.controllerApi.getDirectFollowupSuggestions(
|
|
113
|
+
* await client.controllerApi.getDirectFollowupSuggestions()
|
|
113
114
|
*/
|
|
114
|
-
getDirectFollowupSuggestions(
|
|
115
|
+
getDirectFollowupSuggestions(request?: Apollo.DirectFollowupSuggestionsRequest, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.DirectFollowupSuggestionsResponse>;
|
|
115
116
|
private __getDirectFollowupSuggestions;
|
|
116
117
|
/**
|
|
117
118
|
* @param {string} taskId
|
|
118
119
|
* @param {string} messageId
|
|
120
|
+
* @param {Apollo.GetTraceInfoRequest} request
|
|
119
121
|
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
120
122
|
*
|
|
121
123
|
* @throws {@link Apollo.UnprocessableEntityError}
|
|
122
124
|
*
|
|
123
125
|
* @example
|
|
124
|
-
* await client.controllerApi.getTraceInfo("task_id", "message_id"
|
|
126
|
+
* await client.controllerApi.getTraceInfo("task_id", "message_id", {
|
|
127
|
+
* include_business_logic: true,
|
|
128
|
+
* include_context_logic: true
|
|
129
|
+
* })
|
|
125
130
|
*/
|
|
126
|
-
getTraceInfo(taskId: string, messageId: string, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
|
|
131
|
+
getTraceInfo(taskId: string, messageId: string, request?: Apollo.GetTraceInfoRequest, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
|
|
127
132
|
private __getTraceInfo;
|
|
128
133
|
/**
|
|
129
134
|
* Start a text conversation (WhatsApp or SMS).
|
|
@@ -299,7 +299,8 @@ export class ControllerApi {
|
|
|
299
299
|
*
|
|
300
300
|
* @example
|
|
301
301
|
* await client.controllerApi.sendMessage({
|
|
302
|
-
*
|
|
302
|
+
* include_business_trace: true,
|
|
303
|
+
* include_context_trace: true,
|
|
303
304
|
* is_external_api: true,
|
|
304
305
|
* task_id: "task_id"
|
|
305
306
|
* })
|
|
@@ -310,10 +311,13 @@ export class ControllerApi {
|
|
|
310
311
|
__sendMessage(request, requestOptions) {
|
|
311
312
|
return __awaiter(this, void 0, void 0, function* () {
|
|
312
313
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
313
|
-
const {
|
|
314
|
+
const { include_business_trace: includeBusinessTrace, include_context_trace: includeContextTrace, is_external_api: isExternalApi } = request, _body = __rest(request, ["include_business_trace", "include_context_trace", "is_external_api"]);
|
|
314
315
|
const _queryParams = {};
|
|
315
|
-
if (
|
|
316
|
-
_queryParams.
|
|
316
|
+
if (includeBusinessTrace != null) {
|
|
317
|
+
_queryParams.include_business_trace = includeBusinessTrace.toString();
|
|
318
|
+
}
|
|
319
|
+
if (includeContextTrace != null) {
|
|
320
|
+
_queryParams.include_context_trace = includeContextTrace.toString();
|
|
317
321
|
}
|
|
318
322
|
if (isExternalApi != null) {
|
|
319
323
|
_queryParams.is_external_api = isExternalApi.toString();
|
|
@@ -500,28 +504,31 @@ export class ControllerApi {
|
|
|
500
504
|
});
|
|
501
505
|
}
|
|
502
506
|
/**
|
|
503
|
-
* @param {
|
|
507
|
+
* @param {Apollo.DirectFollowupSuggestionsRequest} request
|
|
504
508
|
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
505
509
|
*
|
|
506
510
|
* @throws {@link Apollo.UnprocessableEntityError}
|
|
507
511
|
*
|
|
508
512
|
* @example
|
|
509
|
-
* await client.controllerApi.getDirectFollowupSuggestions(
|
|
513
|
+
* await client.controllerApi.getDirectFollowupSuggestions()
|
|
510
514
|
*/
|
|
511
|
-
getDirectFollowupSuggestions(
|
|
512
|
-
return core.HttpResponsePromise.fromPromise(this.__getDirectFollowupSuggestions(
|
|
515
|
+
getDirectFollowupSuggestions(request = {}, requestOptions) {
|
|
516
|
+
return core.HttpResponsePromise.fromPromise(this.__getDirectFollowupSuggestions(request, requestOptions));
|
|
513
517
|
}
|
|
514
|
-
__getDirectFollowupSuggestions(
|
|
515
|
-
return __awaiter(this,
|
|
518
|
+
__getDirectFollowupSuggestions() {
|
|
519
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
516
520
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
517
521
|
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
518
522
|
"x-network-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.networkApiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.networkApiKey,
|
|
519
523
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
520
524
|
const _response = yield core.fetcher({
|
|
521
|
-
url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : ((_e = (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ApolloEnvironment.Gcp).base,
|
|
522
|
-
method: "
|
|
525
|
+
url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : ((_e = (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ApolloEnvironment.Gcp).base, "api/v1/external/direct-followup-suggestions"),
|
|
526
|
+
method: "POST",
|
|
523
527
|
headers: _headers,
|
|
528
|
+
contentType: "application/json",
|
|
524
529
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
530
|
+
requestType: "json",
|
|
531
|
+
body: request,
|
|
525
532
|
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
526
533
|
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
527
534
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -554,7 +561,7 @@ export class ControllerApi {
|
|
|
554
561
|
rawResponse: _response.rawResponse,
|
|
555
562
|
});
|
|
556
563
|
case "timeout":
|
|
557
|
-
throw new errors.ApolloTimeoutError("Timeout exceeded when calling
|
|
564
|
+
throw new errors.ApolloTimeoutError("Timeout exceeded when calling POST /api/v1/external/direct-followup-suggestions.");
|
|
558
565
|
case "unknown":
|
|
559
566
|
throw new errors.ApolloError({
|
|
560
567
|
message: _response.error.errorMessage,
|
|
@@ -566,19 +573,31 @@ export class ControllerApi {
|
|
|
566
573
|
/**
|
|
567
574
|
* @param {string} taskId
|
|
568
575
|
* @param {string} messageId
|
|
576
|
+
* @param {Apollo.GetTraceInfoRequest} request
|
|
569
577
|
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
570
578
|
*
|
|
571
579
|
* @throws {@link Apollo.UnprocessableEntityError}
|
|
572
580
|
*
|
|
573
581
|
* @example
|
|
574
|
-
* await client.controllerApi.getTraceInfo("task_id", "message_id"
|
|
582
|
+
* await client.controllerApi.getTraceInfo("task_id", "message_id", {
|
|
583
|
+
* include_business_logic: true,
|
|
584
|
+
* include_context_logic: true
|
|
585
|
+
* })
|
|
575
586
|
*/
|
|
576
|
-
getTraceInfo(taskId, messageId, requestOptions) {
|
|
577
|
-
return core.HttpResponsePromise.fromPromise(this.__getTraceInfo(taskId, messageId, requestOptions));
|
|
587
|
+
getTraceInfo(taskId, messageId, request = {}, requestOptions) {
|
|
588
|
+
return core.HttpResponsePromise.fromPromise(this.__getTraceInfo(taskId, messageId, request, requestOptions));
|
|
578
589
|
}
|
|
579
|
-
__getTraceInfo(
|
|
580
|
-
return __awaiter(this,
|
|
590
|
+
__getTraceInfo(taskId_1, messageId_1) {
|
|
591
|
+
return __awaiter(this, arguments, void 0, function* (taskId, messageId, request = {}, requestOptions) {
|
|
581
592
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
593
|
+
const { include_business_logic: includeBusinessLogic, include_context_logic: includeContextLogic } = request;
|
|
594
|
+
const _queryParams = {};
|
|
595
|
+
if (includeBusinessLogic != null) {
|
|
596
|
+
_queryParams.include_business_logic = includeBusinessLogic.toString();
|
|
597
|
+
}
|
|
598
|
+
if (includeContextLogic != null) {
|
|
599
|
+
_queryParams.include_context_logic = includeContextLogic.toString();
|
|
600
|
+
}
|
|
582
601
|
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
583
602
|
"x-network-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.networkApiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.networkApiKey,
|
|
584
603
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -586,7 +605,7 @@ export class ControllerApi {
|
|
|
586
605
|
url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : ((_e = (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ApolloEnvironment.Gcp).base, `api/v1/external/tasks/${core.url.encodePathParam(taskId)}/messages/${core.url.encodePathParam(messageId)}/trace-info`),
|
|
587
606
|
method: "GET",
|
|
588
607
|
headers: _headers,
|
|
589
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
608
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
590
609
|
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
591
610
|
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
592
611
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* include_business_logic: true,
|
|
5
|
+
* include_context_logic: true
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface GetTraceInfoRequest {
|
|
9
|
+
/** When false, omits NLU/understanding and business decisions (rules, tools, params, etc.); input and response stay populated. */
|
|
10
|
+
include_business_logic?: boolean;
|
|
11
|
+
/** When false, omits the context section and call_integration (REST/RAG/MCP) decisions. */
|
|
12
|
+
include_context_logic?: boolean;
|
|
13
|
+
}
|
|
@@ -2,13 +2,17 @@ import type * as Apollo from "../../../../index.mjs";
|
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
|
-
*
|
|
5
|
+
* include_business_trace: true,
|
|
6
|
+
* include_context_trace: true,
|
|
6
7
|
* is_external_api: true,
|
|
7
8
|
* task_id: "task_id"
|
|
8
9
|
* }
|
|
9
10
|
*/
|
|
10
11
|
export interface SubmitMessageRequest {
|
|
11
|
-
|
|
12
|
+
/** When true, includes NLU/understanding and business decisions (rules, tools, params, etc.) in trace_info. */
|
|
13
|
+
include_business_trace?: boolean;
|
|
14
|
+
/** When true, includes the context section and call_integration (REST/RAG/MCP) decisions in trace_info. */
|
|
15
|
+
include_context_trace?: boolean;
|
|
12
16
|
is_external_api?: boolean;
|
|
13
17
|
task_id: string;
|
|
14
18
|
text?: string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export type { CreateTaskRequest } from "./CreateTaskRequest.mjs";
|
|
2
|
+
export type { DirectFollowupSuggestionsRequest } from "./DirectFollowupSuggestionsRequest.mjs";
|
|
2
3
|
export type { ExternalWidgetRenderRequest } from "./ExternalWidgetRenderRequest.mjs";
|
|
3
4
|
export type { GetProductMetadataRequest } from "./GetProductMetadataRequest.mjs";
|
|
5
|
+
export type { GetTraceInfoRequest } from "./GetTraceInfoRequest.mjs";
|
|
4
6
|
export type { ListUserTasksRequest } from "./ListUserTasksRequest.mjs";
|
|
5
7
|
export type { SubmitMessageRequest } from "./SubmitMessageRequest.mjs";
|
|
6
8
|
export type { TextConversationInitiateRequest } from "./TextConversationInitiateRequest.mjs";
|
|
@@ -5,5 +5,6 @@ export declare const RecordOriginType: {
|
|
|
5
5
|
readonly FeedbackPlayground: "feedback-playground";
|
|
6
6
|
readonly LlmManagement: "llm-management";
|
|
7
7
|
readonly ThirdParty: "third-party";
|
|
8
|
+
readonly AgentBuilder: "agent-builder";
|
|
8
9
|
};
|
|
9
10
|
export type RecordOriginType = (typeof RecordOriginType)[keyof typeof RecordOriginType];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const RecordScopeType: {
|
|
2
|
+
readonly Network: "NETWORK";
|
|
3
|
+
readonly Account: "ACCOUNT";
|
|
4
|
+
readonly Seed: "SEED";
|
|
5
|
+
readonly NetworkCategory: "NETWORK_CATEGORY";
|
|
6
|
+
readonly Global: "GLOBAL";
|
|
7
|
+
};
|
|
8
|
+
export type RecordScopeType = (typeof RecordScopeType)[keyof typeof RecordScopeType];
|
|
@@ -6,5 +6,5 @@ export interface TraceDecisionCallIntegration {
|
|
|
6
6
|
track_id?: string;
|
|
7
7
|
}
|
|
8
8
|
export declare namespace TraceDecisionCallIntegration {
|
|
9
|
-
type Integration = Apollo.TraceRestIntegration | Apollo.TraceRagIntegration;
|
|
9
|
+
type Integration = Apollo.TraceRestIntegration | Apollo.TraceRagIntegration | Apollo.TraceMcpIntegration;
|
|
10
10
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type * as Apollo from "../index.mjs";
|
|
2
2
|
/**
|
|
3
|
-
* Root trace.
|
|
3
|
+
* Root trace. input and response are always set; context and understanding may be omitted (None) when filtered.
|
|
4
4
|
*/
|
|
5
5
|
export interface TraceInfo {
|
|
6
6
|
input: Apollo.TraceInput;
|
|
7
7
|
context?: Apollo.TraceContext;
|
|
8
|
-
understanding
|
|
8
|
+
understanding?: Apollo.TraceUnderstanding;
|
|
9
9
|
decisions?: TraceInfo.Decisions.Item[];
|
|
10
10
|
response: Apollo.TraceResponse;
|
|
11
11
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as Apollo from "../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* MCP integration call details.
|
|
4
|
+
*/
|
|
5
|
+
export interface TraceMcpIntegration {
|
|
6
|
+
code: string;
|
|
7
|
+
type?: Apollo.TraceIntegrationType;
|
|
8
|
+
name: string;
|
|
9
|
+
completion: string;
|
|
10
|
+
tool_calls?: Apollo.TraceMcpToolCall[];
|
|
11
|
+
}
|
|
@@ -8,5 +8,6 @@ export declare const TraceRuleAction: {
|
|
|
8
8
|
readonly BlockAndActivateAnotherTool: "BLOCK_AND_ACTIVATE_ANOTHER_TOOL";
|
|
9
9
|
readonly ActivateSubTool: "ACTIVATE_SUB_TOOL";
|
|
10
10
|
readonly Integration: "INTEGRATION";
|
|
11
|
+
readonly ActivateAnotherTool: "ACTIVATE_ANOTHER_TOOL";
|
|
11
12
|
};
|
|
12
13
|
export type TraceRuleAction = (typeof TraceRuleAction)[keyof typeof TraceRuleAction];
|
|
@@ -24,6 +24,8 @@ export * from "./ParameterType.mjs";
|
|
|
24
24
|
export * from "./ProductCard.mjs";
|
|
25
25
|
export * from "./ProductParameter.mjs";
|
|
26
26
|
export * from "./RecordOriginType.mjs";
|
|
27
|
+
export * from "./RecordScope.mjs";
|
|
28
|
+
export * from "./RecordScopeType.mjs";
|
|
27
29
|
export * from "./Source.mjs";
|
|
28
30
|
export * from "./StreamingUpdatePayload.mjs";
|
|
29
31
|
export * from "./TaskInteractionFacetsTaskParametersMatchGroup.mjs";
|
|
@@ -60,6 +62,8 @@ export * from "./TraceIntegrationRequest.mjs";
|
|
|
60
62
|
export * from "./TraceIntegrationResponse.mjs";
|
|
61
63
|
export * from "./TraceIntegrationResponseItem.mjs";
|
|
62
64
|
export * from "./TraceIntegrationType.mjs";
|
|
65
|
+
export * from "./TraceMcpIntegration.mjs";
|
|
66
|
+
export * from "./TraceMcpToolCall.mjs";
|
|
63
67
|
export * from "./TraceParamsCheckStatus.mjs";
|
|
64
68
|
export * from "./TraceQuestionReason.mjs";
|
|
65
69
|
export * from "./TraceRagIntegration.mjs";
|
|
@@ -24,6 +24,8 @@ export * from "./ParameterType.mjs";
|
|
|
24
24
|
export * from "./ProductCard.mjs";
|
|
25
25
|
export * from "./ProductParameter.mjs";
|
|
26
26
|
export * from "./RecordOriginType.mjs";
|
|
27
|
+
export * from "./RecordScope.mjs";
|
|
28
|
+
export * from "./RecordScopeType.mjs";
|
|
27
29
|
export * from "./Source.mjs";
|
|
28
30
|
export * from "./StreamingUpdatePayload.mjs";
|
|
29
31
|
export * from "./TaskInteractionFacetsTaskParametersMatchGroup.mjs";
|
|
@@ -60,6 +62,8 @@ export * from "./TraceIntegrationRequest.mjs";
|
|
|
60
62
|
export * from "./TraceIntegrationResponse.mjs";
|
|
61
63
|
export * from "./TraceIntegrationResponseItem.mjs";
|
|
62
64
|
export * from "./TraceIntegrationType.mjs";
|
|
65
|
+
export * from "./TraceMcpIntegration.mjs";
|
|
66
|
+
export * from "./TraceMcpToolCall.mjs";
|
|
63
67
|
export * from "./TraceParamsCheckStatus.mjs";
|
|
64
68
|
export * from "./TraceQuestionReason.mjs";
|
|
65
69
|
export * from "./TraceRagIntegration.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.2.
|
|
1
|
+
export declare const SDK_VERSION = "1.2.39";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.2.
|
|
1
|
+
export const SDK_VERSION = "1.2.39";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -217,7 +217,8 @@ await client.controllerApi.getTaskMessages("task_id");
|
|
|
217
217
|
|
|
218
218
|
```typescript
|
|
219
219
|
await client.controllerApi.sendMessage({
|
|
220
|
-
|
|
220
|
+
include_business_trace: true,
|
|
221
|
+
include_context_trace: true,
|
|
221
222
|
is_external_api: true,
|
|
222
223
|
task_id: "task_id"
|
|
223
224
|
});
|
|
@@ -358,7 +359,7 @@ await client.controllerApi.getAgentContext({
|
|
|
358
359
|
</dl>
|
|
359
360
|
</details>
|
|
360
361
|
|
|
361
|
-
<details><summary><code>client.controllerApi.<a href="/src/api/resources/controllerApi/client/Client.ts">getDirectFollowupSuggestions</a>(
|
|
362
|
+
<details><summary><code>client.controllerApi.<a href="/src/api/resources/controllerApi/client/Client.ts">getDirectFollowupSuggestions</a>({ ...params }) -> Apollo.DirectFollowupSuggestionsResponse</code></summary>
|
|
362
363
|
<dl>
|
|
363
364
|
<dd>
|
|
364
365
|
|
|
@@ -371,7 +372,7 @@ await client.controllerApi.getAgentContext({
|
|
|
371
372
|
<dd>
|
|
372
373
|
|
|
373
374
|
```typescript
|
|
374
|
-
await client.controllerApi.getDirectFollowupSuggestions(
|
|
375
|
+
await client.controllerApi.getDirectFollowupSuggestions();
|
|
375
376
|
|
|
376
377
|
```
|
|
377
378
|
</dd>
|
|
@@ -387,7 +388,7 @@ await client.controllerApi.getDirectFollowupSuggestions("task_id");
|
|
|
387
388
|
<dl>
|
|
388
389
|
<dd>
|
|
389
390
|
|
|
390
|
-
**
|
|
391
|
+
**request:** `Apollo.DirectFollowupSuggestionsRequest`
|
|
391
392
|
|
|
392
393
|
</dd>
|
|
393
394
|
</dl>
|
|
@@ -407,7 +408,7 @@ await client.controllerApi.getDirectFollowupSuggestions("task_id");
|
|
|
407
408
|
</dl>
|
|
408
409
|
</details>
|
|
409
410
|
|
|
410
|
-
<details><summary><code>client.controllerApi.<a href="/src/api/resources/controllerApi/client/Client.ts">getTraceInfo</a>(taskId, messageId) -> Record<string, unknown></code></summary>
|
|
411
|
+
<details><summary><code>client.controllerApi.<a href="/src/api/resources/controllerApi/client/Client.ts">getTraceInfo</a>(taskId, messageId, { ...params }) -> Record<string, unknown></code></summary>
|
|
411
412
|
<dl>
|
|
412
413
|
<dd>
|
|
413
414
|
|
|
@@ -420,7 +421,10 @@ await client.controllerApi.getDirectFollowupSuggestions("task_id");
|
|
|
420
421
|
<dd>
|
|
421
422
|
|
|
422
423
|
```typescript
|
|
423
|
-
await client.controllerApi.getTraceInfo("task_id", "message_id"
|
|
424
|
+
await client.controllerApi.getTraceInfo("task_id", "message_id", {
|
|
425
|
+
include_business_logic: true,
|
|
426
|
+
include_context_logic: true
|
|
427
|
+
});
|
|
424
428
|
|
|
425
429
|
```
|
|
426
430
|
</dd>
|
|
@@ -452,6 +456,14 @@ await client.controllerApi.getTraceInfo("task_id", "message_id");
|
|
|
452
456
|
<dl>
|
|
453
457
|
<dd>
|
|
454
458
|
|
|
459
|
+
**request:** `Apollo.GetTraceInfoRequest`
|
|
460
|
+
|
|
461
|
+
</dd>
|
|
462
|
+
</dl>
|
|
463
|
+
|
|
464
|
+
<dl>
|
|
465
|
+
<dd>
|
|
466
|
+
|
|
455
467
|
**requestOptions:** `ControllerApi.RequestOptions`
|
|
456
468
|
|
|
457
469
|
</dd>
|