@aui.io/aui-client 1.2.33 → 1.2.35

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.
Files changed (221) hide show
  1. package/README.md +36 -50
  2. package/dist/cjs/Client.js +2 -2
  3. package/dist/cjs/api/resources/controllerApi/client/Client.d.ts +34 -2
  4. package/dist/cjs/api/resources/controllerApi/client/Client.js +141 -3
  5. package/dist/cjs/api/resources/controllerApi/client/requests/ExternalWidgetRenderRequest.d.ts +21 -0
  6. package/dist/cjs/api/resources/controllerApi/client/requests/ExternalWidgetRenderRequest.js +3 -0
  7. package/dist/cjs/api/resources/controllerApi/client/requests/SubmitMessageRequest.d.ts +5 -3
  8. package/dist/cjs/api/resources/controllerApi/client/requests/index.d.ts +1 -0
  9. package/dist/cjs/api/types/Card.d.ts +1 -0
  10. package/dist/cjs/api/types/EntityItemParameter.d.ts +2 -1
  11. package/dist/cjs/api/types/Message.d.ts +1 -0
  12. package/dist/cjs/api/types/TaskParameter.d.ts +1 -0
  13. package/dist/cjs/api/types/TracSelfReviewSubEntity.d.ts +4 -0
  14. package/dist/cjs/api/types/TracSelfReviewSubEntity.js +3 -0
  15. package/dist/cjs/api/types/TraceActiveTool.d.ts +5 -0
  16. package/dist/cjs/api/types/TraceActiveTool.js +3 -0
  17. package/dist/cjs/api/types/TraceActiveToolStatus.d.ts +6 -0
  18. package/dist/cjs/api/types/TraceActiveToolStatus.js +9 -0
  19. package/dist/cjs/api/types/TraceApiResponseSubEntity.d.ts +5 -0
  20. package/dist/cjs/api/types/TraceApiResponseSubEntity.js +3 -0
  21. package/dist/cjs/api/types/TraceContext.d.ts +8 -0
  22. package/dist/cjs/api/types/TraceContext.js +3 -0
  23. package/dist/cjs/api/types/TraceDecisionActivateSubTool.d.ts +8 -0
  24. package/dist/cjs/api/types/TraceDecisionActivateSubTool.js +3 -0
  25. package/dist/cjs/api/types/TraceDecisionActivateTool.d.ts +9 -0
  26. package/dist/cjs/api/types/TraceDecisionActivateTool.js +3 -0
  27. package/dist/cjs/api/types/TraceDecisionAskForConfirmation.d.ts +7 -0
  28. package/dist/cjs/api/types/TraceDecisionAskForConfirmation.js +3 -0
  29. package/dist/cjs/api/types/TraceDecisionCallIntegration.d.ts +10 -0
  30. package/dist/cjs/api/types/TraceDecisionCallIntegration.js +3 -0
  31. package/dist/cjs/api/types/TraceDecisionParamsCheck.d.ts +11 -0
  32. package/dist/cjs/api/types/TraceDecisionParamsCheck.js +3 -0
  33. package/dist/cjs/api/types/TraceDecisionRuleTriggered.d.ts +10 -0
  34. package/dist/cjs/api/types/TraceDecisionRuleTriggered.js +3 -0
  35. package/dist/cjs/api/types/TraceDecisionSelfReview.d.ts +7 -0
  36. package/dist/cjs/api/types/TraceDecisionSelfReview.js +3 -0
  37. package/dist/cjs/api/types/TraceDecisionToolTextResponse.d.ts +10 -0
  38. package/dist/cjs/api/types/TraceDecisionToolTextResponse.js +3 -0
  39. package/dist/cjs/api/types/TraceDecisionType.d.ts +15 -0
  40. package/dist/cjs/api/types/TraceDecisionType.js +18 -0
  41. package/dist/cjs/api/types/TraceEntity.d.ts +9 -0
  42. package/dist/cjs/api/types/TraceEntity.js +3 -0
  43. package/dist/cjs/api/types/TraceEntitySource.d.ts +7 -0
  44. package/dist/cjs/api/types/TraceEntitySource.js +10 -0
  45. package/dist/cjs/api/types/TraceGuardrails.d.ts +4 -0
  46. package/dist/cjs/api/types/TraceGuardrails.js +3 -0
  47. package/dist/cjs/api/types/TraceInfo.d.ts +17 -0
  48. package/dist/cjs/api/types/TraceInfo.js +3 -0
  49. package/dist/cjs/api/types/TraceInput.d.ts +6 -0
  50. package/dist/cjs/api/types/TraceInput.js +3 -0
  51. package/dist/cjs/api/types/TraceIntegrationRequest.d.ts +7 -0
  52. package/dist/cjs/api/types/TraceIntegrationRequest.js +3 -0
  53. package/dist/cjs/api/types/TraceIntegrationResponse.d.ts +5 -0
  54. package/dist/cjs/api/types/TraceIntegrationResponse.js +3 -0
  55. package/dist/cjs/api/types/TraceIntegrationResponseItem.d.ts +5 -0
  56. package/dist/cjs/api/types/TraceIntegrationResponseItem.js +3 -0
  57. package/dist/cjs/api/types/TraceIntegrationType.d.ts +10 -0
  58. package/dist/cjs/api/types/TraceIntegrationType.js +13 -0
  59. package/dist/cjs/api/types/TraceParamsCheckStatus.d.ts +9 -0
  60. package/dist/cjs/api/types/TraceParamsCheckStatus.js +12 -0
  61. package/dist/cjs/api/types/TraceQuestionReason.d.ts +7 -0
  62. package/dist/cjs/api/types/TraceQuestionReason.js +10 -0
  63. package/dist/cjs/api/types/TraceRagIntegration.d.ts +10 -0
  64. package/dist/cjs/api/types/TraceRagIntegration.js +3 -0
  65. package/dist/cjs/api/types/TraceRagRequest.d.ts +6 -0
  66. package/dist/cjs/api/types/TraceRagRequest.js +3 -0
  67. package/dist/cjs/api/types/TraceRagResource.d.ts +10 -0
  68. package/dist/cjs/api/types/TraceRagResource.js +3 -0
  69. package/dist/cjs/api/types/TraceRagResponse.d.ts +7 -0
  70. package/dist/cjs/api/types/TraceRagResponse.js +3 -0
  71. package/dist/cjs/api/types/TraceReferencedEntity.d.ts +6 -0
  72. package/dist/cjs/api/types/TraceReferencedEntity.js +3 -0
  73. package/dist/cjs/api/types/TraceResponse.d.ts +13 -0
  74. package/dist/cjs/api/types/TraceResponse.js +3 -0
  75. package/dist/cjs/api/types/TraceResponseType.d.ts +9 -0
  76. package/dist/cjs/api/types/TraceResponseType.js +12 -0
  77. package/dist/cjs/api/types/TraceRestIntegration.d.ts +15 -0
  78. package/dist/cjs/api/types/TraceRestIntegration.js +3 -0
  79. package/dist/cjs/api/types/TraceRuleAction.d.ts +12 -0
  80. package/dist/cjs/api/types/TraceRuleAction.js +15 -0
  81. package/dist/cjs/api/types/TraceRuleBase.d.ts +9 -0
  82. package/dist/cjs/api/types/TraceRuleBase.js +3 -0
  83. package/dist/cjs/api/types/TraceRuleMissingInfo.d.ts +10 -0
  84. package/dist/cjs/api/types/TraceRuleMissingInfo.js +3 -0
  85. package/dist/cjs/api/types/TraceRuleParamsMissing.d.ts +12 -0
  86. package/dist/cjs/api/types/TraceRuleParamsMissing.js +3 -0
  87. package/dist/cjs/api/types/TraceRuleType.d.ts +10 -0
  88. package/dist/cjs/api/types/TraceRuleType.js +13 -0
  89. package/dist/cjs/api/types/TraceSelfReviewEntity.d.ts +9 -0
  90. package/dist/cjs/api/types/TraceSelfReviewEntity.js +3 -0
  91. package/dist/cjs/api/types/TraceSelfReviewSection.d.ts +7 -0
  92. package/dist/cjs/api/types/TraceSelfReviewSection.js +3 -0
  93. package/dist/cjs/api/types/TraceSubEntity.d.ts +5 -0
  94. package/dist/cjs/api/types/TraceSubEntity.js +3 -0
  95. package/dist/cjs/api/types/TraceTrigger.d.ts +9 -0
  96. package/dist/cjs/api/types/TraceTrigger.js +3 -0
  97. package/dist/cjs/api/types/TraceTriggerType.d.ts +9 -0
  98. package/dist/cjs/api/types/TraceTriggerType.js +12 -0
  99. package/dist/cjs/api/types/TraceUnderstanding.d.ts +6 -0
  100. package/dist/cjs/api/types/TraceUnderstanding.js +3 -0
  101. package/dist/cjs/api/types/VectorSearchTaskInteractionQaAnswerScoreLabel.d.ts +5 -0
  102. package/dist/cjs/api/types/VectorSearchTaskInteractionQaAnswerScoreLabel.js +8 -0
  103. package/dist/cjs/api/types/WidgetRenderResponse.d.ts +3 -0
  104. package/dist/cjs/api/types/WidgetRenderResponse.js +3 -0
  105. package/dist/cjs/api/types/WorkflowCheckStatus.d.ts +7 -0
  106. package/dist/cjs/api/types/WorkflowCheckStatus.js +10 -0
  107. package/dist/cjs/api/types/index.d.ts +47 -0
  108. package/dist/cjs/api/types/index.js +47 -0
  109. package/dist/cjs/version.d.ts +1 -1
  110. package/dist/cjs/version.js +1 -1
  111. package/dist/esm/Client.mjs +2 -2
  112. package/dist/esm/api/resources/controllerApi/client/Client.d.mts +34 -2
  113. package/dist/esm/api/resources/controllerApi/client/Client.mjs +141 -3
  114. package/dist/esm/api/resources/controllerApi/client/requests/ExternalWidgetRenderRequest.d.mts +21 -0
  115. package/dist/esm/api/resources/controllerApi/client/requests/ExternalWidgetRenderRequest.mjs +2 -0
  116. package/dist/esm/api/resources/controllerApi/client/requests/SubmitMessageRequest.d.mts +5 -3
  117. package/dist/esm/api/resources/controllerApi/client/requests/index.d.mts +1 -0
  118. package/dist/esm/api/types/Card.d.mts +1 -0
  119. package/dist/esm/api/types/EntityItemParameter.d.mts +2 -1
  120. package/dist/esm/api/types/Message.d.mts +1 -0
  121. package/dist/esm/api/types/TaskParameter.d.mts +1 -0
  122. package/dist/esm/api/types/TracSelfReviewSubEntity.d.mts +4 -0
  123. package/dist/esm/api/types/TracSelfReviewSubEntity.mjs +2 -0
  124. package/dist/esm/api/types/TraceActiveTool.d.mts +5 -0
  125. package/dist/esm/api/types/TraceActiveTool.mjs +2 -0
  126. package/dist/esm/api/types/TraceActiveToolStatus.d.mts +6 -0
  127. package/dist/esm/api/types/TraceActiveToolStatus.mjs +6 -0
  128. package/dist/esm/api/types/TraceApiResponseSubEntity.d.mts +5 -0
  129. package/dist/esm/api/types/TraceApiResponseSubEntity.mjs +2 -0
  130. package/dist/esm/api/types/TraceContext.d.mts +8 -0
  131. package/dist/esm/api/types/TraceContext.mjs +2 -0
  132. package/dist/esm/api/types/TraceDecisionActivateSubTool.d.mts +8 -0
  133. package/dist/esm/api/types/TraceDecisionActivateSubTool.mjs +2 -0
  134. package/dist/esm/api/types/TraceDecisionActivateTool.d.mts +9 -0
  135. package/dist/esm/api/types/TraceDecisionActivateTool.mjs +2 -0
  136. package/dist/esm/api/types/TraceDecisionAskForConfirmation.d.mts +7 -0
  137. package/dist/esm/api/types/TraceDecisionAskForConfirmation.mjs +2 -0
  138. package/dist/esm/api/types/TraceDecisionCallIntegration.d.mts +10 -0
  139. package/dist/esm/api/types/TraceDecisionCallIntegration.mjs +2 -0
  140. package/dist/esm/api/types/TraceDecisionParamsCheck.d.mts +11 -0
  141. package/dist/esm/api/types/TraceDecisionParamsCheck.mjs +2 -0
  142. package/dist/esm/api/types/TraceDecisionRuleTriggered.d.mts +10 -0
  143. package/dist/esm/api/types/TraceDecisionRuleTriggered.mjs +2 -0
  144. package/dist/esm/api/types/TraceDecisionSelfReview.d.mts +7 -0
  145. package/dist/esm/api/types/TraceDecisionSelfReview.mjs +2 -0
  146. package/dist/esm/api/types/TraceDecisionToolTextResponse.d.mts +10 -0
  147. package/dist/esm/api/types/TraceDecisionToolTextResponse.mjs +2 -0
  148. package/dist/esm/api/types/TraceDecisionType.d.mts +15 -0
  149. package/dist/esm/api/types/TraceDecisionType.mjs +15 -0
  150. package/dist/esm/api/types/TraceEntity.d.mts +9 -0
  151. package/dist/esm/api/types/TraceEntity.mjs +2 -0
  152. package/dist/esm/api/types/TraceEntitySource.d.mts +7 -0
  153. package/dist/esm/api/types/TraceEntitySource.mjs +7 -0
  154. package/dist/esm/api/types/TraceGuardrails.d.mts +4 -0
  155. package/dist/esm/api/types/TraceGuardrails.mjs +2 -0
  156. package/dist/esm/api/types/TraceInfo.d.mts +17 -0
  157. package/dist/esm/api/types/TraceInfo.mjs +2 -0
  158. package/dist/esm/api/types/TraceInput.d.mts +6 -0
  159. package/dist/esm/api/types/TraceInput.mjs +2 -0
  160. package/dist/esm/api/types/TraceIntegrationRequest.d.mts +7 -0
  161. package/dist/esm/api/types/TraceIntegrationRequest.mjs +2 -0
  162. package/dist/esm/api/types/TraceIntegrationResponse.d.mts +5 -0
  163. package/dist/esm/api/types/TraceIntegrationResponse.mjs +2 -0
  164. package/dist/esm/api/types/TraceIntegrationResponseItem.d.mts +5 -0
  165. package/dist/esm/api/types/TraceIntegrationResponseItem.mjs +2 -0
  166. package/dist/esm/api/types/TraceIntegrationType.d.mts +10 -0
  167. package/dist/esm/api/types/TraceIntegrationType.mjs +10 -0
  168. package/dist/esm/api/types/TraceParamsCheckStatus.d.mts +9 -0
  169. package/dist/esm/api/types/TraceParamsCheckStatus.mjs +9 -0
  170. package/dist/esm/api/types/TraceQuestionReason.d.mts +7 -0
  171. package/dist/esm/api/types/TraceQuestionReason.mjs +7 -0
  172. package/dist/esm/api/types/TraceRagIntegration.d.mts +10 -0
  173. package/dist/esm/api/types/TraceRagIntegration.mjs +2 -0
  174. package/dist/esm/api/types/TraceRagRequest.d.mts +6 -0
  175. package/dist/esm/api/types/TraceRagRequest.mjs +2 -0
  176. package/dist/esm/api/types/TraceRagResource.d.mts +10 -0
  177. package/dist/esm/api/types/TraceRagResource.mjs +2 -0
  178. package/dist/esm/api/types/TraceRagResponse.d.mts +7 -0
  179. package/dist/esm/api/types/TraceRagResponse.mjs +2 -0
  180. package/dist/esm/api/types/TraceReferencedEntity.d.mts +6 -0
  181. package/dist/esm/api/types/TraceReferencedEntity.mjs +2 -0
  182. package/dist/esm/api/types/TraceResponse.d.mts +13 -0
  183. package/dist/esm/api/types/TraceResponse.mjs +2 -0
  184. package/dist/esm/api/types/TraceResponseType.d.mts +9 -0
  185. package/dist/esm/api/types/TraceResponseType.mjs +9 -0
  186. package/dist/esm/api/types/TraceRestIntegration.d.mts +15 -0
  187. package/dist/esm/api/types/TraceRestIntegration.mjs +2 -0
  188. package/dist/esm/api/types/TraceRuleAction.d.mts +12 -0
  189. package/dist/esm/api/types/TraceRuleAction.mjs +12 -0
  190. package/dist/esm/api/types/TraceRuleBase.d.mts +9 -0
  191. package/dist/esm/api/types/TraceRuleBase.mjs +2 -0
  192. package/dist/esm/api/types/TraceRuleMissingInfo.d.mts +10 -0
  193. package/dist/esm/api/types/TraceRuleMissingInfo.mjs +2 -0
  194. package/dist/esm/api/types/TraceRuleParamsMissing.d.mts +12 -0
  195. package/dist/esm/api/types/TraceRuleParamsMissing.mjs +2 -0
  196. package/dist/esm/api/types/TraceRuleType.d.mts +10 -0
  197. package/dist/esm/api/types/TraceRuleType.mjs +10 -0
  198. package/dist/esm/api/types/TraceSelfReviewEntity.d.mts +9 -0
  199. package/dist/esm/api/types/TraceSelfReviewEntity.mjs +2 -0
  200. package/dist/esm/api/types/TraceSelfReviewSection.d.mts +7 -0
  201. package/dist/esm/api/types/TraceSelfReviewSection.mjs +2 -0
  202. package/dist/esm/api/types/TraceSubEntity.d.mts +5 -0
  203. package/dist/esm/api/types/TraceSubEntity.mjs +2 -0
  204. package/dist/esm/api/types/TraceTrigger.d.mts +9 -0
  205. package/dist/esm/api/types/TraceTrigger.mjs +2 -0
  206. package/dist/esm/api/types/TraceTriggerType.d.mts +9 -0
  207. package/dist/esm/api/types/TraceTriggerType.mjs +9 -0
  208. package/dist/esm/api/types/TraceUnderstanding.d.mts +6 -0
  209. package/dist/esm/api/types/TraceUnderstanding.mjs +2 -0
  210. package/dist/esm/api/types/VectorSearchTaskInteractionQaAnswerScoreLabel.d.mts +5 -0
  211. package/dist/esm/api/types/VectorSearchTaskInteractionQaAnswerScoreLabel.mjs +5 -0
  212. package/dist/esm/api/types/WidgetRenderResponse.d.mts +3 -0
  213. package/dist/esm/api/types/WidgetRenderResponse.mjs +2 -0
  214. package/dist/esm/api/types/WorkflowCheckStatus.d.mts +7 -0
  215. package/dist/esm/api/types/WorkflowCheckStatus.mjs +7 -0
  216. package/dist/esm/api/types/index.d.mts +47 -0
  217. package/dist/esm/api/types/index.mjs +47 -0
  218. package/dist/esm/version.d.mts +1 -1
  219. package/dist/esm/version.mjs +1 -1
  220. package/package.json +1 -1
  221. package/reference.md +129 -2
package/README.md CHANGED
@@ -271,15 +271,16 @@ Submit a new message to an existing task (non-streaming).
271
271
 
272
272
  ```typescript
273
273
  const messageResponse = await client.controllerApi.sendMessage({
274
- task_id: string, // Task identifier
275
- text: string, // Message text
276
- is_external_api?: boolean, // Optional: mark as external API call
277
- context?: { // Optional: additional context
274
+ task_id: string, // Task identifier
275
+ text: string, // Message text
276
+ is_external_api?: boolean, // Optional: mark as external API call
277
+ include_trace_info?: boolean, // Optional: include trace/debug info in response (NEW)
278
+ context?: { // Optional: additional context
278
279
  url?: string,
279
280
  lead_details?: Record<string, any>,
280
281
  welcome_message?: string
281
282
  },
282
- agent_variables?: Record<string, unknown> // Optional: custom agent variables (NEW in v1.2.28)
283
+ agent_variables?: Record<string, unknown> // Optional: custom agent variables
283
284
  });
284
285
 
285
286
  // Returns: Message - Complete agent response with optional product cards
@@ -325,35 +326,29 @@ const metadata = await client.controllerApi.getProductMetadata({
325
326
  // Returns: Record<string, any> - Product metadata object
326
327
  ```
327
328
 
328
- #### `getAgentContext(request)` - Get Agent Context (NEW in v1.2.28)
329
- Retrieve the agent's context configuration including parameters, entities, and static context.
329
+ #### `getTraceInfo(taskId, messageId)` - Get Trace Info (NEW)
330
+ Retrieve trace/debug information for a specific message. Useful for debugging agent responses and understanding the processing pipeline.
330
331
 
331
332
  ```typescript
332
- const agentContext = await client.controllerApi.getAgentContext({
333
- task_id: 'your-task-id',
334
- query: 'test context'
335
- });
333
+ const traceInfo = await client.controllerApi.getTraceInfo('your-task-id', 'your-message-id');
336
334
 
337
- // Returns: CreateTopicRequestBody - Agent context with:
338
- // - title: string
339
- // - params: TaskParameter[]
340
- // - entities: TaskTopicEntity[]
341
- // - static_context: string
335
+ // Returns: Record<string, any> - Trace information object
342
336
  ```
343
337
 
344
338
  **Example:**
345
339
 
346
340
  ```typescript
347
- // Get agent context to understand available parameters
348
- const context = await client.controllerApi.getAgentContext({
341
+ // First, send a message with trace info enabled
342
+ const message = await client.controllerApi.sendMessage({
349
343
  task_id: 'your-task-id',
350
- query: 'test context'
344
+ text: 'What products do you recommend?',
345
+ is_external_api: true,
346
+ include_trace_info: true
351
347
  });
352
348
 
353
- console.log('Agent Title:', context.title);
354
- console.log('Available Parameters:', context.params?.length);
355
- console.log('Entities:', context.entities?.length);
356
- console.log('Static Context:', context.static_context);
349
+ // Then retrieve the full trace info for that message
350
+ const traceInfo = await client.controllerApi.getTraceInfo('your-task-id', message.id);
351
+ console.log('Trace Info:', traceInfo);
357
352
  ```
358
353
 
359
354
  #### `getDirectFollowupSuggestions(taskId)` - Get Direct Followup Suggestions (NEW in v1.2.28)
@@ -626,7 +621,7 @@ sendContextualMessage('task-123', 'What do you recommend?', {
626
621
  });
627
622
  ```
628
623
 
629
- ### Get Agent Context (NEW in v1.2.28)
624
+ ### Get Trace Info (NEW)
630
625
 
631
626
  ```typescript
632
627
  import { ApolloClient } from '@aui.io/aui-client';
@@ -635,39 +630,30 @@ const client = new ApolloClient({
635
630
  networkApiKey: 'API_KEY_YOUR_KEY_HERE'
636
631
  });
637
632
 
638
- async function exploreAgentCapabilities() {
633
+ async function debugAgentResponse(taskId: string) {
639
634
  try {
640
- // Get the agent's context configuration
641
- const context = await client.controllerApi.getAgentContext({
642
- task_id: 'your-task-id',
643
- query: 'test context'
635
+ // Send a message with trace info enabled
636
+ const message = await client.controllerApi.sendMessage({
637
+ task_id: taskId,
638
+ text: 'What products do you recommend?',
639
+ is_external_api: true,
640
+ include_trace_info: true
644
641
  });
645
-
646
- console.log('Agent Configuration:');
647
- console.log(' Title:', context.title);
648
- console.log(' Static Context:', context.static_context);
649
-
650
- // Explore available parameters
651
- if (context.params && context.params.length > 0) {
652
- console.log('\nAvailable Parameters:');
653
- context.params.forEach(param => {
654
- console.log(` - ${param.title}: ${param.param}`);
655
- });
656
- }
657
-
658
- // Explore entities
659
- if (context.entities && context.entities.length > 0) {
660
- console.log('\nConfigured Entities:', context.entities.length);
661
- }
662
-
663
- return context;
642
+
643
+ console.log('Agent Response:', message.text);
644
+
645
+ // Retrieve the full trace info for debugging
646
+ const traceInfo = await client.controllerApi.getTraceInfo(taskId, message.id);
647
+ console.log('Trace Info:', traceInfo);
648
+
649
+ return traceInfo;
664
650
  } catch (error) {
665
- console.error('Error getting agent context:', error);
651
+ console.error('Error getting trace info:', error);
666
652
  throw error;
667
653
  }
668
654
  }
669
655
 
670
- exploreAgentCapabilities();
656
+ debugAgentResponse('task-123');
671
657
  ```
672
658
 
673
659
  ### Get Direct Followup Suggestions (NEW in v1.2.28)
@@ -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.33",
49
- "User-Agent": "@aui.io/aui-client/1.2.33",
48
+ "X-Fern-SDK-Version": "1.2.35",
49
+ "User-Agent": "@aui.io/aui-client/1.2.35",
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,9 +69,9 @@ export declare class ControllerApi {
69
69
  *
70
70
  * @example
71
71
  * await client.controllerApi.sendMessage({
72
+ * include_trace_info: true,
72
73
  * is_external_api: true,
73
- * task_id: "task_id",
74
- * text: "text"
74
+ * task_id: "task_id"
75
75
  * })
76
76
  */
77
77
  sendMessage(request: Apollo.SubmitMessageRequest, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.Message>;
@@ -126,6 +126,18 @@ export declare class ControllerApi {
126
126
  */
127
127
  getWorkflowsMetadata(requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.WorkflowsMetadataResponse>;
128
128
  private __getWorkflowsMetadata;
129
+ /**
130
+ * @param {string} taskId
131
+ * @param {string} messageId
132
+ * @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
133
+ *
134
+ * @throws {@link Apollo.UnprocessableEntityError}
135
+ *
136
+ * @example
137
+ * await client.controllerApi.getTraceInfo("task_id", "message_id")
138
+ */
139
+ getTraceInfo(taskId: string, messageId: string, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
140
+ private __getTraceInfo;
129
141
  /**
130
142
  * Start a text conversation (WhatsApp or SMS).
131
143
  *
@@ -144,4 +156,24 @@ export declare class ControllerApi {
144
156
  */
145
157
  startTextConversation(request: Apollo.TextConversationInitiateRequest, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.TextConversationInitiateResponse>;
146
158
  private __startTextConversation;
159
+ /**
160
+ * Render a widget card from integration data. Authenticates via network API key.
161
+ *
162
+ * @param {Apollo.ExternalWidgetRenderRequest} request
163
+ * @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
164
+ *
165
+ * @throws {@link Apollo.UnprocessableEntityError}
166
+ *
167
+ * @example
168
+ * await client.controllerApi.renderWidget({
169
+ * task_id: "task_id",
170
+ * integration_code: "integration_code",
171
+ * card_template_code: "card_template_code",
172
+ * variables: {
173
+ * "key": "value"
174
+ * }
175
+ * })
176
+ */
177
+ renderWidget(request: Apollo.ExternalWidgetRenderRequest, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.WidgetRenderResponse>;
178
+ private __renderWidget;
147
179
  }
@@ -335,9 +335,9 @@ class ControllerApi {
335
335
  *
336
336
  * @example
337
337
  * await client.controllerApi.sendMessage({
338
+ * include_trace_info: true,
338
339
  * is_external_api: true,
339
- * task_id: "task_id",
340
- * text: "text"
340
+ * task_id: "task_id"
341
341
  * })
342
342
  */
343
343
  sendMessage(request, requestOptions) {
@@ -346,8 +346,11 @@ class ControllerApi {
346
346
  __sendMessage(request, requestOptions) {
347
347
  return __awaiter(this, void 0, void 0, function* () {
348
348
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
349
- const { is_external_api: isExternalApi } = request, _body = __rest(request, ["is_external_api"]);
349
+ const { include_trace_info: includeTraceInfo, is_external_api: isExternalApi } = request, _body = __rest(request, ["include_trace_info", "is_external_api"]);
350
350
  const _queryParams = {};
351
+ if (includeTraceInfo != null) {
352
+ _queryParams.include_trace_info = includeTraceInfo.toString();
353
+ }
351
354
  if (isExternalApi != null) {
352
355
  _queryParams.is_external_api = isExternalApi.toString();
353
356
  }
@@ -659,6 +662,68 @@ class ControllerApi {
659
662
  }
660
663
  });
661
664
  }
665
+ /**
666
+ * @param {string} taskId
667
+ * @param {string} messageId
668
+ * @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
669
+ *
670
+ * @throws {@link Apollo.UnprocessableEntityError}
671
+ *
672
+ * @example
673
+ * await client.controllerApi.getTraceInfo("task_id", "message_id")
674
+ */
675
+ getTraceInfo(taskId, messageId, requestOptions) {
676
+ return core.HttpResponsePromise.fromPromise(this.__getTraceInfo(taskId, messageId, requestOptions));
677
+ }
678
+ __getTraceInfo(taskId, messageId, requestOptions) {
679
+ return __awaiter(this, void 0, void 0, function* () {
680
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
681
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
682
+ "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,
683
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
684
+ const _response = yield core.fetcher({
685
+ 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`),
686
+ method: "GET",
687
+ headers: _headers,
688
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
689
+ 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,
690
+ 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,
691
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
692
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
693
+ logging: this._options.logging,
694
+ });
695
+ if (_response.ok) {
696
+ return { data: _response.body, rawResponse: _response.rawResponse };
697
+ }
698
+ if (_response.error.reason === "status-code") {
699
+ switch (_response.error.statusCode) {
700
+ case 422:
701
+ throw new Apollo.UnprocessableEntityError(_response.error.body, _response.rawResponse);
702
+ default:
703
+ throw new errors.ApolloError({
704
+ statusCode: _response.error.statusCode,
705
+ body: _response.error.body,
706
+ rawResponse: _response.rawResponse,
707
+ });
708
+ }
709
+ }
710
+ switch (_response.error.reason) {
711
+ case "non-json":
712
+ throw new errors.ApolloError({
713
+ statusCode: _response.error.statusCode,
714
+ body: _response.error.rawBody,
715
+ rawResponse: _response.rawResponse,
716
+ });
717
+ case "timeout":
718
+ throw new errors.ApolloTimeoutError("Timeout exceeded when calling GET /api/v1/external/tasks/{task_id}/messages/{message_id}/trace-info.");
719
+ case "unknown":
720
+ throw new errors.ApolloError({
721
+ message: _response.error.errorMessage,
722
+ rawResponse: _response.rawResponse,
723
+ });
724
+ }
725
+ });
726
+ }
662
727
  /**
663
728
  * Start a text conversation (WhatsApp or SMS).
664
729
  *
@@ -733,5 +798,78 @@ class ControllerApi {
733
798
  }
734
799
  });
735
800
  }
801
+ /**
802
+ * Render a widget card from integration data. Authenticates via network API key.
803
+ *
804
+ * @param {Apollo.ExternalWidgetRenderRequest} request
805
+ * @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
806
+ *
807
+ * @throws {@link Apollo.UnprocessableEntityError}
808
+ *
809
+ * @example
810
+ * await client.controllerApi.renderWidget({
811
+ * task_id: "task_id",
812
+ * integration_code: "integration_code",
813
+ * card_template_code: "card_template_code",
814
+ * variables: {
815
+ * "key": "value"
816
+ * }
817
+ * })
818
+ */
819
+ renderWidget(request, requestOptions) {
820
+ return core.HttpResponsePromise.fromPromise(this.__renderWidget(request, requestOptions));
821
+ }
822
+ __renderWidget(request, requestOptions) {
823
+ return __awaiter(this, void 0, void 0, function* () {
824
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
825
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
826
+ "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,
827
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
828
+ const _response = yield core.fetcher({
829
+ 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/widgets"),
830
+ method: "POST",
831
+ headers: _headers,
832
+ contentType: "application/json",
833
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
834
+ requestType: "json",
835
+ body: request,
836
+ 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,
837
+ 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,
838
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
839
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
840
+ logging: this._options.logging,
841
+ });
842
+ if (_response.ok) {
843
+ return { data: _response.body, rawResponse: _response.rawResponse };
844
+ }
845
+ if (_response.error.reason === "status-code") {
846
+ switch (_response.error.statusCode) {
847
+ case 422:
848
+ throw new Apollo.UnprocessableEntityError(_response.error.body, _response.rawResponse);
849
+ default:
850
+ throw new errors.ApolloError({
851
+ statusCode: _response.error.statusCode,
852
+ body: _response.error.body,
853
+ rawResponse: _response.rawResponse,
854
+ });
855
+ }
856
+ }
857
+ switch (_response.error.reason) {
858
+ case "non-json":
859
+ throw new errors.ApolloError({
860
+ statusCode: _response.error.statusCode,
861
+ body: _response.error.rawBody,
862
+ rawResponse: _response.rawResponse,
863
+ });
864
+ case "timeout":
865
+ throw new errors.ApolloTimeoutError("Timeout exceeded when calling POST /api/v1/external/widgets.");
866
+ case "unknown":
867
+ throw new errors.ApolloError({
868
+ message: _response.error.errorMessage,
869
+ rawResponse: _response.rawResponse,
870
+ });
871
+ }
872
+ });
873
+ }
736
874
  }
737
875
  exports.ControllerApi = ControllerApi;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * task_id: "task_id",
5
+ * integration_code: "integration_code",
6
+ * card_template_code: "card_template_code",
7
+ * variables: {
8
+ * "key": "value"
9
+ * }
10
+ * }
11
+ */
12
+ export interface ExternalWidgetRenderRequest {
13
+ /** Task ID for looking up stored interaction data */
14
+ task_id: string;
15
+ /** Integration name/code (e.g., INVENTORY_SEARCH) */
16
+ integration_code: string;
17
+ /** Card template name for direct lookup */
18
+ card_template_code: string;
19
+ /** Key-value pairs matching integration settings.variables[].key */
20
+ variables: Record<string, unknown>;
21
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,15 +2,17 @@ import type * as Apollo from "../../../../index.js";
2
2
  /**
3
3
  * @example
4
4
  * {
5
+ * include_trace_info: true,
5
6
  * is_external_api: true,
6
- * task_id: "task_id",
7
- * text: "text"
7
+ * task_id: "task_id"
8
8
  * }
9
9
  */
10
10
  export interface SubmitMessageRequest {
11
+ include_trace_info?: boolean;
11
12
  is_external_api?: boolean;
12
13
  task_id: string;
13
- text: string;
14
+ text?: string;
14
15
  context?: Apollo.Context;
15
16
  agent_variables?: Record<string, unknown>;
17
+ static_context?: Record<string, unknown>;
16
18
  }
@@ -1,4 +1,5 @@
1
1
  export type { CreateTaskRequest } from "./CreateTaskRequest.js";
2
+ export type { ExternalWidgetRenderRequest } from "./ExternalWidgetRenderRequest.js";
2
3
  export type { GetProductMetadataRequest } from "./GetProductMetadataRequest.js";
3
4
  export type { ListUserTasksRequest } from "./ListUserTasksRequest.js";
4
5
  export type { SubmitMessageRequest } from "./SubmitMessageRequest.js";
@@ -8,4 +8,5 @@ export interface Card {
8
8
  sub_entities?: Apollo.MessageCardSubEntity[];
9
9
  self_review?: Apollo.TaskInteractionOptionSelfReview;
10
10
  is_recommended: boolean;
11
+ rendered_jsx?: string;
11
12
  }
@@ -1,11 +1,12 @@
1
1
  import type * as Apollo from "../index.js";
2
2
  export interface EntityItemParameter {
3
3
  param: string;
4
- title: string;
4
+ title?: string;
5
5
  name?: string;
6
6
  value?: unknown;
7
7
  type?: Apollo.ParameterType;
8
8
  show?: boolean;
9
9
  populateToUserProfile?: boolean;
10
10
  excludeFromContext?: boolean;
11
+ code?: string;
11
12
  }
@@ -10,4 +10,5 @@ export interface Message {
10
10
  followup_suggestions: string[];
11
11
  executed_workflows?: string[];
12
12
  url?: string;
13
+ trace_info?: Apollo.TraceInfo;
13
14
  }
@@ -11,6 +11,7 @@ export interface TaskParameter {
11
11
  is_value_filled?: boolean;
12
12
  is_visible?: boolean;
13
13
  param_type?: Apollo.ParameterType;
14
+ code?: string;
14
15
  }
15
16
  export declare namespace TaskParameter {
16
17
  type Value = Apollo.TaskParameterValue | Apollo.TaskParameterRangeValue | Apollo.TaskParameterObjectValue;
@@ -0,0 +1,4 @@
1
+ export interface TracSelfReviewSubEntity {
2
+ entity: string;
3
+ reference?: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceActiveTool {
3
+ tool: string;
4
+ status: Apollo.TraceActiveToolStatus;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ /** Schema: awaiting_params | awaiting_confirmation. */
2
+ export declare const TraceActiveToolStatus: {
3
+ readonly AwaitingParams: "awaiting_params";
4
+ readonly AwaitingConfirmation: "awaiting_confirmation";
5
+ };
6
+ export type TraceActiveToolStatus = (typeof TraceActiveToolStatus)[keyof typeof TraceActiveToolStatus];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TraceActiveToolStatus = void 0;
5
+ /** Schema: awaiting_params | awaiting_confirmation. */
6
+ exports.TraceActiveToolStatus = {
7
+ AwaitingParams: "awaiting_params",
8
+ AwaitingConfirmation: "awaiting_confirmation",
9
+ };
@@ -0,0 +1,5 @@
1
+ export interface TraceApiResponseSubEntity {
2
+ entity: string;
3
+ params?: Record<string, unknown>;
4
+ reference?: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceContext {
3
+ active_tools?: Apollo.TraceActiveTool[];
4
+ entities?: Apollo.TraceEntity[];
5
+ static_context?: Record<string, unknown>[];
6
+ message_params?: Record<string, unknown>;
7
+ response_params?: Record<string, unknown>;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceDecisionActivateSubTool {
3
+ type?: Apollo.TraceDecisionType;
4
+ tool: string;
5
+ parent_tool: string;
6
+ trigger: Apollo.TraceTrigger;
7
+ track_id?: string;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceDecisionActivateTool {
3
+ type?: Apollo.TraceDecisionType;
4
+ tool: string;
5
+ trigger: Apollo.TraceTrigger;
6
+ track_id?: string;
7
+ referenced_entities?: Apollo.TraceReferencedEntity[];
8
+ check_status?: Apollo.WorkflowCheckStatus;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceDecisionAskForConfirmation {
3
+ type?: Apollo.TraceDecisionType;
4
+ tool: string;
5
+ confirmation_preview?: Record<string, unknown>[];
6
+ track_id?: string;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceDecisionCallIntegration {
3
+ type?: Apollo.TraceDecisionType;
4
+ tool: string;
5
+ integration: TraceDecisionCallIntegration.Integration;
6
+ track_id?: string;
7
+ }
8
+ export declare namespace TraceDecisionCallIntegration {
9
+ type Integration = Apollo.TraceRestIntegration | Apollo.TraceRagIntegration;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceDecisionParamsCheck {
3
+ type?: Apollo.TraceDecisionType;
4
+ tool: string;
5
+ status: Apollo.TraceParamsCheckStatus;
6
+ /** Per mandatory (required) group; inner list = unfilled param codes for that group. */
7
+ required_missing_params_by_group?: string[][];
8
+ /** Per optional group; inner list = unfilled param codes for that group. */
9
+ optional_missing_params_by_group?: string[][];
10
+ track_id?: string;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceDecisionRuleTriggered {
3
+ type?: Apollo.TraceDecisionType;
4
+ tool: string;
5
+ rule: TraceDecisionRuleTriggered.Rule;
6
+ track_id?: string;
7
+ }
8
+ export declare namespace TraceDecisionRuleTriggered {
9
+ type Rule = Apollo.TraceRuleBase | Apollo.TraceRuleParamsMissing | Apollo.TraceRuleMissingInfo;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceDecisionSelfReview {
3
+ type?: Apollo.TraceDecisionType;
4
+ tool: string;
5
+ track_id?: string;
6
+ entities?: Apollo.TraceSelfReviewEntity[];
7
+ }