@uipath/uipath-typescript 1.3.6 → 1.3.7

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 (44) hide show
  1. package/dist/assets/index.cjs +204 -2
  2. package/dist/assets/index.d.ts +112 -13
  3. package/dist/assets/index.mjs +204 -2
  4. package/dist/attachments/index.cjs +3 -2
  5. package/dist/attachments/index.d.ts +7 -0
  6. package/dist/attachments/index.mjs +3 -2
  7. package/dist/buckets/index.cjs +172 -2
  8. package/dist/buckets/index.d.ts +56 -12
  9. package/dist/buckets/index.mjs +172 -2
  10. package/dist/cases/index.cjs +3 -2
  11. package/dist/cases/index.d.ts +7 -0
  12. package/dist/cases/index.mjs +3 -2
  13. package/dist/conversational-agent/index.cjs +196 -81
  14. package/dist/conversational-agent/index.d.ts +326 -80
  15. package/dist/conversational-agent/index.mjs +195 -80
  16. package/dist/core/index.cjs +18 -6
  17. package/dist/core/index.d.ts +1 -1
  18. package/dist/core/index.mjs +18 -6
  19. package/dist/entities/index.cjs +35 -6
  20. package/dist/entities/index.d.ts +101 -11
  21. package/dist/entities/index.mjs +36 -7
  22. package/dist/feedback/index.cjs +3 -2
  23. package/dist/feedback/index.d.ts +7 -0
  24. package/dist/feedback/index.mjs +3 -2
  25. package/dist/index.cjs +286 -13
  26. package/dist/index.d.ts +475 -32
  27. package/dist/index.mjs +287 -14
  28. package/dist/index.umd.js +286 -13
  29. package/dist/jobs/index.cjs +172 -2
  30. package/dist/jobs/index.d.ts +67 -23
  31. package/dist/jobs/index.mjs +172 -2
  32. package/dist/maestro-processes/index.cjs +3 -2
  33. package/dist/maestro-processes/index.d.ts +7 -0
  34. package/dist/maestro-processes/index.mjs +3 -2
  35. package/dist/processes/index.cjs +240 -3
  36. package/dist/processes/index.d.ts +124 -2
  37. package/dist/processes/index.mjs +240 -3
  38. package/dist/queues/index.cjs +172 -2
  39. package/dist/queues/index.d.ts +56 -12
  40. package/dist/queues/index.mjs +172 -2
  41. package/dist/tasks/index.cjs +3 -2
  42. package/dist/tasks/index.d.ts +7 -0
  43. package/dist/tasks/index.mjs +3 -2
  44. package/package.json +1 -1
@@ -49,7 +49,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
49
49
  // Connection string placeholder that will be replaced during build
50
50
  const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
51
51
  // SDK Version placeholder
52
- const SDK_VERSION = "1.3.6";
52
+ const SDK_VERSION = "1.3.7";
53
53
  const VERSION = "Version";
54
54
  const SERVICE = "Service";
55
55
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -803,6 +803,21 @@ const RESPONSE_TYPES = {
803
803
  * in Conversational Agents Service)
804
804
  */
805
805
  const EXTERNAL_USER_ID = 'x-uipath-external-user-id';
806
+ /**
807
+ * Optional identifier used in UiPath logs to identify the implementing service
808
+ * of requests. External consumers do not need to set it; the server logs
809
+ * missing values as "unknown".
810
+ *
811
+ * @internal
812
+ */
813
+ const CONVERSATIONAL_SURFACE_NAME = 'x-uipath-conversational-surfacename';
814
+ /**
815
+ * Optional version of the implementing service of requests. Paired with
816
+ * `surfaceName` for internal telemetry.
817
+ *
818
+ * @internal
819
+ */
820
+ const CONVERSATIONAL_SURFACE_VERSION = 'x-uipath-conversational-surfaceversion';
806
821
  /**
807
822
  * Query parameter keys sent during WebSocket connection
808
823
  */
@@ -810,6 +825,8 @@ const WEBSOCKET_QUERY_PARAMS = {
810
825
  ORGANIZATION_ID: 'x-uipath-internal-accountid',
811
826
  TENANT_ID: 'x-uipath-internal-tenantid',
812
827
  EXTERNAL_USER_ID,
828
+ CONVERSATIONAL_SURFACE_NAME,
829
+ CONVERSATIONAL_SURFACE_VERSION,
813
830
  };
814
831
 
815
832
  class ApiClient {
@@ -1731,8 +1748,9 @@ class BaseService {
1731
1748
  constructor(instance, headers) {
1732
1749
  // Private field - not visible via Object.keys() or any reflection
1733
1750
  _BaseService_apiClient.set(this, void 0);
1734
- const { config, context, tokenManager } = SDKInternalsRegistry.get(instance);
1751
+ const { config, context, tokenManager, folderKey } = SDKInternalsRegistry.get(instance);
1735
1752
  __classPrivateFieldSet(this, _BaseService_apiClient, new ApiClient(config, context, tokenManager, headers ? { headers } : {}), "f");
1753
+ this.config = { folderKey };
1736
1754
  }
1737
1755
  /**
1738
1756
  * Gets a valid authentication token, refreshing if necessary.
@@ -2178,7 +2196,7 @@ const AgentMap = {
2178
2196
  };
2179
2197
 
2180
2198
  /**
2181
- * Constants for User Service
2199
+ * Constants for User Settings Service
2182
2200
  */
2183
2201
  /**
2184
2202
  * Maps fields for User Settings entities to ensure consistent SDK naming
@@ -2948,6 +2966,7 @@ class ToolCallEventHelper extends ConversationEventHelperBase {
2948
2966
  this.toolCallId = toolCallId;
2949
2967
  this.startEventMaybe = startEventMaybe;
2950
2968
  this._endHandlers = new Array();
2969
+ this._confirmHandlers = new Array();
2951
2970
  this.addStartEventTimestamp(startEventMaybe);
2952
2971
  }
2953
2972
  /**
@@ -3009,6 +3028,29 @@ class ToolCallEventHelper extends ConversationEventHelperBase {
3009
3028
  onEndToolCall(cb) {
3010
3029
  this.onToolCallEnd(cb);
3011
3030
  }
3031
+ /**
3032
+ * Registers a handler for tool call confirmation events. Fired when the
3033
+ * peer responds to a tool call that was emitted with `requireConfirmation`.
3034
+ * @returns Cleanup function to remove the handler.
3035
+ */
3036
+ onToolCallConfirm(callback) {
3037
+ this._confirmHandlers.push(callback);
3038
+ return () => {
3039
+ const index = this._confirmHandlers.indexOf(callback);
3040
+ if (index >= 0)
3041
+ this._confirmHandlers.splice(index, 1);
3042
+ };
3043
+ }
3044
+ /**
3045
+ * Sends a tool call confirmation (approve/reject) for a tool call that was
3046
+ * emitted with `requireConfirmation: true`. Replaces the legacy
3047
+ * `sendInterruptEnd` flow for tool call confirmation.
3048
+ * @throws Error if tool call has already ended.
3049
+ */
3050
+ sendToolCallConfirm(confirmToolCall) {
3051
+ this.assertNotEnded();
3052
+ this.emit({ confirmToolCall });
3053
+ }
3012
3054
  /**
3013
3055
  * Sends an error start event for this tool call.
3014
3056
  */
@@ -3084,6 +3126,10 @@ class ToolCallEventHelperImpl extends ToolCallEventHelper {
3084
3126
  if (toolCallEvent.toolCallError?.endError) {
3085
3127
  this.dispatchErrorEnd(toolCallEvent.toolCallError.errorId, toolCallEvent.toolCallError.endError);
3086
3128
  }
3129
+ if (toolCallEvent.confirmToolCall) {
3130
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
3131
+ this._confirmHandlers.forEach(cb => cb(toolCallEvent.confirmToolCall));
3132
+ }
3087
3133
  if (toolCallEvent.endToolCall) {
3088
3134
  this.setEnded();
3089
3135
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
@@ -3127,6 +3173,7 @@ class MessageEventHelper extends ConversationEventHelperBase {
3127
3173
  this._toolCallMap = new Map();
3128
3174
  this._interruptStartHandlers = new Array();
3129
3175
  this._interruptEndHandlers = new Array();
3176
+ this._toolCallConfirmHandlers = new Array();
3130
3177
  this.addStartEventTimestamp(startEventMaybe);
3131
3178
  }
3132
3179
  /**
@@ -3365,6 +3412,25 @@ class MessageEventHelper extends ConversationEventHelperBase {
3365
3412
  this._interruptEndHandlers.splice(index, 1);
3366
3413
  };
3367
3414
  }
3415
+ /**
3416
+ * Registers a handler for tool-call confirmation events. Fired when a peer
3417
+ * responds to a tool call that was emitted with `requireConfirmation: true`.
3418
+ *
3419
+ * Fires at the message level before the event is delegated to the per-tool-call
3420
+ * helper, so this handler runs even when no `ToolCallEventHelper` exists for the
3421
+ * confirmed tool call (e.g. on the agent side after the originating helper has
3422
+ * been cleaned up, or on the client side if no `onToolCallStart` is registered).
3423
+ *
3424
+ * @returns Cleanup function to remove the handler.
3425
+ */
3426
+ onToolCallConfirm(callback) {
3427
+ this._toolCallConfirmHandlers.push(callback);
3428
+ return () => {
3429
+ const index = this._toolCallConfirmHandlers.indexOf(callback);
3430
+ if (index >= 0)
3431
+ this._toolCallConfirmHandlers.splice(index, 1);
3432
+ };
3433
+ }
3368
3434
  /**
3369
3435
  * Sends an interrupt start event.
3370
3436
  */
@@ -3492,6 +3558,16 @@ class MessageEventHelperImpl extends MessageEventHelper {
3492
3558
  contentPartHelper.dispatch(messageEvent.contentPart);
3493
3559
  }
3494
3560
  if (messageEvent.toolCall) {
3561
+ // Dispatch confirmToolCall at the message level (flat dispatch) before delegating
3562
+ // to the per-tool-call helper. Needed because the tool-call helper may not exist
3563
+ // for this id on the receiving side.
3564
+ if (messageEvent.toolCall.confirmToolCall) {
3565
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
3566
+ this._toolCallConfirmHandlers.forEach(cb => cb({
3567
+ toolCallId: messageEvent.toolCall.toolCallId,
3568
+ confirmEvent: messageEvent.toolCall.confirmToolCall
3569
+ }));
3570
+ }
3495
3571
  let toolCallHelper = this._toolCallMap.get(messageEvent.toolCall.toolCallId);
3496
3572
  if (!toolCallHelper && this._toolCallStartHandlers.length > 0) {
3497
3573
  toolCallHelper = new ToolCallEventHelperImpl(this, messageEvent.toolCall.toolCallId, messageEvent.toolCall.startToolCall);
@@ -4992,6 +5068,27 @@ function transformMessage(message) {
4992
5068
  };
4993
5069
  }
4994
5070
 
5071
+ /**
5072
+ * Header builder for Conversational Agent Services
5073
+ *
5074
+ * Builds the default request headers shared across the Conversational Agent
5075
+ * service constructors (`ConversationalAgentService`, `ConversationService`,
5076
+ * `ExchangeService`, `MessageService`) from a single set of options.
5077
+ */
5078
+ /**
5079
+ * Builds the default request headers for Conversational Agent service calls
5080
+ * from the provided options. Returns `undefined` when no headers apply, so
5081
+ * the SDK does not pass an empty `headers` bag down to the HTTP layer.
5082
+ */
5083
+ function buildConversationalAgentHeaders(options) {
5084
+ const headers = createHeaders({
5085
+ [EXTERNAL_USER_ID]: options?.externalUserId,
5086
+ [CONVERSATIONAL_SURFACE_NAME]: options?.surfaceName,
5087
+ [CONVERSATIONAL_SURFACE_VERSION]: options?.surfaceVersion,
5088
+ });
5089
+ return Object.keys(headers).length > 0 ? headers : undefined;
5090
+ }
5091
+
4995
5092
  /**
4996
5093
  * ExchangeService - Exchange operations for Conversations
4997
5094
  *
@@ -5031,7 +5128,7 @@ class ExchangeService extends BaseService {
5031
5128
  * @param options - Optional configuration (e.g. externalUserId for external app auth)
5032
5129
  */
5033
5130
  constructor(instance, options) {
5034
- super(instance, options?.externalUserId ? { [EXTERNAL_USER_ID]: options.externalUserId } : undefined);
5131
+ super(instance, buildConversationalAgentHeaders(options));
5035
5132
  }
5036
5133
  /**
5037
5134
  * Gets all exchanges for a conversation with optional filtering and pagination
@@ -5694,6 +5791,8 @@ class WebSocketSession extends BaseWebSocket {
5694
5791
  logLevel: options?.logLevel
5695
5792
  }, context, tokenManager, WEBSOCKET_LOGGER_PREFIX);
5696
5793
  this._externalUserId = options?.externalUserId;
5794
+ this._surfaceName = options?.surfaceName;
5795
+ this._surfaceVersion = options?.surfaceVersion;
5697
5796
  }
5698
5797
  /**
5699
5798
  * Connects to WebSocket with organization and tenant headers
@@ -5712,6 +5811,12 @@ class WebSocketSession extends BaseWebSocket {
5712
5811
  if (this._externalUserId) {
5713
5812
  query[WEBSOCKET_QUERY_PARAMS.EXTERNAL_USER_ID] = this._externalUserId;
5714
5813
  }
5814
+ if (this._surfaceName) {
5815
+ query[WEBSOCKET_QUERY_PARAMS.CONVERSATIONAL_SURFACE_NAME] = this._surfaceName;
5816
+ }
5817
+ if (this._surfaceVersion) {
5818
+ query[WEBSOCKET_QUERY_PARAMS.CONVERSATIONAL_SURFACE_VERSION] = this._surfaceVersion;
5819
+ }
5715
5820
  this.connectWithOptions({ query });
5716
5821
  }
5717
5822
  /**
@@ -6008,7 +6113,7 @@ class ConversationService extends BaseService {
6008
6113
  * @param options - Optional configuration (e.g. externalUserId for external app auth)
6009
6114
  */
6010
6115
  constructor(instance, options) {
6011
- super(instance, options?.externalUserId ? { [EXTERNAL_USER_ID]: options.externalUserId } : undefined);
6116
+ super(instance, buildConversationalAgentHeaders(options));
6012
6117
  /** Event helper for conversation events */
6013
6118
  this._eventHelper = null;
6014
6119
  this._sessionManager = new SessionManager(instance, options);
@@ -6419,7 +6524,7 @@ class MessageService extends BaseService {
6419
6524
  * @param options - Optional configuration (e.g. externalUserId for external app auth)
6420
6525
  */
6421
6526
  constructor(instance, options) {
6422
- super(instance, options?.externalUserId ? { [EXTERNAL_USER_ID]: options.externalUserId } : undefined);
6527
+ super(instance, buildConversationalAgentHeaders(options));
6423
6528
  }
6424
6529
  /**
6425
6530
  * Gets a message by ID
@@ -6480,6 +6585,87 @@ __decorate([
6480
6585
  track('ConversationalAgent.Messages.GetContentPartById')
6481
6586
  ], MessageService.prototype, "getContentPartById", null);
6482
6587
 
6588
+ /**
6589
+ * UserSettingsService - Service for managing user profile and context settings
6590
+ */
6591
+ /**
6592
+ * Service for reading and updating the current user's profile and context settings.
6593
+ *
6594
+ * User settings are user-supplied profile fields (name, email, role, department, company,
6595
+ * country, timezone) that the SDK passes to a UiPath Conversational Agent on every conversation
6596
+ * so the agent can personalize its responses.
6597
+ */
6598
+ class UserSettingsService extends BaseService {
6599
+ /**
6600
+ * Creates an instance of the UserSettingsService.
6601
+ *
6602
+ * @param instance - UiPath SDK instance providing authentication and configuration
6603
+ * @param options - Optional configuration (e.g. externalUserId for external app auth)
6604
+ */
6605
+ constructor(instance, options) {
6606
+ super(instance, options?.externalUserId ? { [EXTERNAL_USER_ID]: options.externalUserId } : undefined);
6607
+ }
6608
+ /**
6609
+ * Gets the current user's profile and context settings.
6610
+ *
6611
+ * Returns the full user settings record — profile fields the agent uses for personalization
6612
+ * (name, email, role, department, company, country, timezone) plus identifiers and timestamps.
6613
+ * Fields the user has not set are returned as `null`.
6614
+ *
6615
+ * @returns Promise resolving to the current user's settings
6616
+ * {@link UserSettingsGetResponse}
6617
+ *
6618
+ * @example
6619
+ * ```typescript
6620
+ * const settings = await conversationalAgent.user.getSettings();
6621
+ * console.log(settings.name); // e.g. 'John Doe' or null
6622
+ * console.log(settings.email); // e.g. 'john@example.com' or null
6623
+ * console.log(settings.timezone); // e.g. 'America/New_York' or null
6624
+ * ```
6625
+ */
6626
+ async getSettings() {
6627
+ const response = await this.get(USER_ENDPOINTS.SETTINGS);
6628
+ return transformData(response.data, UserSettingsMap);
6629
+ }
6630
+ /**
6631
+ * Updates the current user's profile and context settings.
6632
+ *
6633
+ * Accepts a partial payload — only fields included in `options` are changed. Pass `null` to
6634
+ * explicitly clear a field. Omitting a field leaves it unchanged. Returns the full updated
6635
+ * settings record.
6636
+ *
6637
+ * @param options - Fields to update; omit fields to leave them unchanged, set to `null` to clear
6638
+ * @returns Promise resolving to the updated user settings
6639
+ * {@link UserSettingsUpdateResponse}
6640
+ *
6641
+ * @example Partial update
6642
+ * ```typescript
6643
+ * const updated = await conversationalAgent.user.updateSettings({
6644
+ * name: 'John Doe',
6645
+ * timezone: 'America/New_York'
6646
+ * });
6647
+ * ```
6648
+ *
6649
+ * @example Clear fields by setting to null
6650
+ * ```typescript
6651
+ * await conversationalAgent.user.updateSettings({
6652
+ * role: null,
6653
+ * department: null
6654
+ * });
6655
+ * ```
6656
+ */
6657
+ async updateSettings(options) {
6658
+ const response = await this.patch(USER_ENDPOINTS.SETTINGS, options);
6659
+ return transformData(response.data, UserSettingsMap);
6660
+ }
6661
+ }
6662
+ __decorate([
6663
+ track('ConversationalAgent.UserSettings.GetSettings')
6664
+ ], UserSettingsService.prototype, "getSettings", null);
6665
+ __decorate([
6666
+ track('ConversationalAgent.UserSettings.UpdateSettings')
6667
+ ], UserSettingsService.prototype, "updateSettings", null);
6668
+
6483
6669
  /**
6484
6670
  * ConversationalAgentService - Main entry point for Conversational Agent functionality
6485
6671
  */
@@ -6494,9 +6680,10 @@ class ConversationalAgentService extends BaseService {
6494
6680
  * @param options - Optional configuration (e.g. externalUserId for external app auth)
6495
6681
  */
6496
6682
  constructor(instance, options) {
6497
- super(instance, options?.externalUserId ? { [EXTERNAL_USER_ID]: options.externalUserId } : undefined);
6683
+ super(instance, buildConversationalAgentHeaders(options));
6498
6684
  // Create conversation service with WebSocket support
6499
6685
  this.conversations = new ConversationService(instance, options);
6686
+ this.user = new UserSettingsService(instance, options);
6500
6687
  }
6501
6688
  /**
6502
6689
  * Registers a handler that is called whenever the WebSocket connection status changes.
@@ -6582,76 +6769,4 @@ __decorate([
6582
6769
  track('ConversationalAgent.GetById')
6583
6770
  ], ConversationalAgentService.prototype, "getById", null);
6584
6771
 
6585
- /**
6586
- * UserService - Service for managing user profile and context settings
6587
- */
6588
- /**
6589
- * Service for managing user profile and context settings
6590
- *
6591
- * User settings are passed to the agent for all conversations
6592
- * to provide user context (name, email, role, timezone, etc.).
6593
- *
6594
- * @internal
6595
- */
6596
- class UserService extends BaseService {
6597
- /**
6598
- * Gets the current user's profile and context settings
6599
- *
6600
- * @returns Promise resolving to user settings object containing profile information
6601
- *
6602
- * @example
6603
- * ```typescript
6604
- * const userSettings = await userService.getSettings();
6605
- * console.log(userSettings.name); // User's name
6606
- * console.log(userSettings.email); // User's email
6607
- * console.log(userSettings.timezone); // User's timezone
6608
- * ```
6609
- */
6610
- async getSettings() {
6611
- const response = await this.get(USER_ENDPOINTS.SETTINGS);
6612
- return transformData(response.data, UserSettingsMap);
6613
- }
6614
- /**
6615
- * Updates the current user's profile and context settings
6616
- *
6617
- * All fields are optional - only send the fields you want to change.
6618
- * Set fields to `null` to explicitly clear them.
6619
- * Omitting fields means no change.
6620
- *
6621
- * @param options - Fields to update
6622
- * @returns Promise resolving to updated user settings object
6623
- *
6624
- * @example
6625
- * ```typescript
6626
- * // Update specific fields
6627
- * const updatedUserSettings = await userService.updateSettings({
6628
- * name: 'John Doe',
6629
- * email: 'john@example.com',
6630
- * timezone: 'America/New_York'
6631
- * });
6632
- *
6633
- * // Partial update - only change timezone
6634
- * await userService.updateSettings({
6635
- * timezone: 'Europe/London'
6636
- * });
6637
- *
6638
- * // Clear fields by setting to null
6639
- * await userService.updateSettings({
6640
- * role: null,
6641
- * department: null
6642
- * });
6643
- * ```
6644
- */
6645
- async updateSettings(options) {
6646
- const response = await this.patch(USER_ENDPOINTS.SETTINGS, options);
6647
- return transformData(response.data, UserSettingsMap);
6648
- }
6649
- }
6650
- __decorate([
6651
- track('ConversationalAgent.User.GetSettings')
6652
- ], UserService.prototype, "getSettings", null);
6653
- __decorate([
6654
- track('ConversationalAgent.User.UpdateSettings')
6655
- ], UserService.prototype, "updateSettings", null);
6656
-
6657
- export { AgentMap, AsyncInputStreamEventHelper, AsyncInputStreamEventHelperImpl, AsyncToolCallEventHelper, AsyncToolCallEventHelperImpl, CitationErrorType, ContentPartEventHelper, ContentPartEventHelperImpl, ContentPartHelper, ConversationEventHelperBase, ConversationEventHelperManager, ConversationEventHelperManagerImpl, ConversationEventInvalidOperationError, ConversationEventValidationError, ConversationMap, ConversationalAgentService as ConversationalAgent, ConversationalAgentService, EventErrorId, ExchangeEventHelper, ExchangeEventHelperImpl, ExchangeMap, ExchangeService, ExchangeService as Exchanges, FeedbackRating, InputStreamSpeechSensitivity, InterruptType, LogLevel, MessageEventHelper, MessageEventHelperImpl, MessageMap, MessageRole, MessageService, MessageService as Messages, SessionEventHelper, SessionEventHelperImpl, SortOrder, ToolCallEventHelper, ToolCallEventHelperImpl, UserService as User, UserService, UserSettingsMap, assertCitationSourceMedia, assertCitationSourceUrl, assertExternalValue, assertInlineValue, createAgentWithMethods, createConversationWithMethods, isCitationSourceMedia, isCitationSourceUrl, isExternalValue, isInlineValue, transformExchange, transformExchanges, transformMessage };
6772
+ export { AgentMap, AsyncInputStreamEventHelper, AsyncInputStreamEventHelperImpl, AsyncToolCallEventHelper, AsyncToolCallEventHelperImpl, CitationErrorType, ContentPartEventHelper, ContentPartEventHelperImpl, ContentPartHelper, ConversationEventHelperBase, ConversationEventHelperManager, ConversationEventHelperManagerImpl, ConversationEventInvalidOperationError, ConversationEventValidationError, ConversationMap, ConversationalAgentService as ConversationalAgent, ConversationalAgentService, EventErrorId, ExchangeEventHelper, ExchangeEventHelperImpl, ExchangeMap, ExchangeService, ExchangeService as Exchanges, FeedbackRating, InputStreamSpeechSensitivity, InterruptType, LogLevel, MessageEventHelper, MessageEventHelperImpl, MessageMap, MessageRole, MessageService, MessageService as Messages, SessionEventHelper, SessionEventHelperImpl, SortOrder, ToolCallEventHelper, ToolCallEventHelperImpl, UserSettingsService as UserSettings, UserSettingsMap, UserSettingsService, assertCitationSourceMedia, assertCitationSourceUrl, assertExternalValue, assertInlineValue, createAgentWithMethods, createConversationWithMethods, isCitationSourceMedia, isCitationSourceUrl, isExternalValue, isInlineValue, transformExchange, transformExchanges, transformMessage };
@@ -5307,7 +5307,7 @@ function normalizeBaseUrl(url) {
5307
5307
  // Connection string placeholder that will be replaced during build
5308
5308
  const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
5309
5309
  // SDK Version placeholder
5310
- const SDK_VERSION = "1.3.6";
5310
+ const SDK_VERSION = "1.3.7";
5311
5311
  const VERSION = "Version";
5312
5312
  const SERVICE = "Service";
5313
5313
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -5654,6 +5654,8 @@ var UiPathMetaTags;
5654
5654
  // Asset resolution and routing
5655
5655
  UiPathMetaTags["CDN_BASE"] = "uipath:cdn-base";
5656
5656
  UiPathMetaTags["APP_BASE"] = "uipath:app-base";
5657
+ // Folder context (injected during coded-app deployment)
5658
+ UiPathMetaTags["FOLDER_KEY"] = "uipath:folder-key";
5657
5659
  })(UiPathMetaTags || (UiPathMetaTags = {}));
5658
5660
 
5659
5661
  /**
@@ -5682,12 +5684,13 @@ function loadFromMetaTags() {
5682
5684
  tenantName: getMetaTagContent(UiPathMetaTags.TENANT_NAME),
5683
5685
  baseUrl: getMetaTagContent(UiPathMetaTags.BASE_URL),
5684
5686
  redirectUri: getMetaTagContent(UiPathMetaTags.REDIRECT_URI),
5687
+ folderKey: getMetaTagContent(UiPathMetaTags.FOLDER_KEY),
5685
5688
  };
5686
5689
  const hasAnyValue = Object.values(config).some(Boolean);
5687
5690
  return hasAnyValue ? config : null;
5688
5691
  }
5689
5692
 
5690
- var _UiPath_instances, _UiPath_config, _UiPath_authService, _UiPath_initialized, _UiPath_partialConfig, _UiPath_multiLogin, _UiPath_initializeWithConfig, _UiPath_loadConfig;
5693
+ var _UiPath_instances, _UiPath_config, _UiPath_authService, _UiPath_initialized, _UiPath_partialConfig, _UiPath_multiLogin, _UiPath_metaFolderKey, _UiPath_initializeWithConfig, _UiPath_loadConfig;
5691
5694
  /**
5692
5695
  * UiPath - Core SDK class for authentication and configuration management.
5693
5696
  *
@@ -5728,8 +5731,13 @@ class UiPath {
5728
5731
  _UiPath_initialized.set(this, false);
5729
5732
  _UiPath_partialConfig.set(this, void 0);
5730
5733
  _UiPath_multiLogin.set(this, false);
5734
+ // Folder key sourced only from `<meta name="uipath:folder-key">` (coded-app
5735
+ // deployments). Not accepted via the public constructor; lives here so the
5736
+ // SDK can flow it through to BaseService.config without polluting BaseConfig.
5737
+ _UiPath_metaFolderKey.set(this, void 0);
5731
5738
  // Load configuration from meta tags
5732
5739
  const configFromMetaTags = loadFromMetaTags();
5740
+ __classPrivateFieldSet(this, _UiPath_metaFolderKey, configFromMetaTags?.folderKey, "f");
5733
5741
  // Merge configuration: constructor config overrides meta tags
5734
5742
  const mergedConfig = config ? { ...configFromMetaTags, ...config } : configFromMetaTags;
5735
5743
  if (mergedConfig && isCompleteConfig(mergedConfig)) {
@@ -5858,7 +5866,7 @@ class UiPath {
5858
5866
  __classPrivateFieldGet(this, _UiPath_authService, "f")?.updateToken(tokenInfo);
5859
5867
  }
5860
5868
  }
5861
- _UiPath_config = new WeakMap(), _UiPath_authService = new WeakMap(), _UiPath_initialized = new WeakMap(), _UiPath_partialConfig = new WeakMap(), _UiPath_multiLogin = new WeakMap(), _UiPath_instances = new WeakSet(), _UiPath_initializeWithConfig = function _UiPath_initializeWithConfig(config) {
5869
+ _UiPath_config = new WeakMap(), _UiPath_authService = new WeakMap(), _UiPath_initialized = new WeakMap(), _UiPath_partialConfig = new WeakMap(), _UiPath_multiLogin = new WeakMap(), _UiPath_metaFolderKey = new WeakMap(), _UiPath_instances = new WeakSet(), _UiPath_initializeWithConfig = function _UiPath_initializeWithConfig(config) {
5862
5870
  // Validate and normalize the configuration
5863
5871
  validateConfig(config);
5864
5872
  const hasSecretAuth = hasSecretConfig(config);
@@ -5871,7 +5879,7 @@ _UiPath_config = new WeakMap(), _UiPath_authService = new WeakMap(), _UiPath_ini
5871
5879
  secret: hasSecretAuth ? config.secret : undefined,
5872
5880
  clientId: hasOAuthAuth ? config.clientId : undefined,
5873
5881
  redirectUri: hasOAuthAuth ? config.redirectUri : undefined,
5874
- scope: hasOAuthAuth ? config.scope : undefined
5882
+ scope: hasOAuthAuth ? config.scope : undefined,
5875
5883
  });
5876
5884
  const executionContext = new ExecutionContext();
5877
5885
  __classPrivateFieldSet(this, _UiPath_authService, new AuthService(internalConfig, executionContext), "f");
@@ -5879,11 +5887,14 @@ _UiPath_config = new WeakMap(), _UiPath_authService = new WeakMap(), _UiPath_ini
5879
5887
  __classPrivateFieldGet(this, _UiPath_authService, "f").setMultiLogin();
5880
5888
  }
5881
5889
  __classPrivateFieldSet(this, _UiPath_config, internalConfig, "f");
5882
- // Store internals in SDKInternalsRegistry (not visible on instance)
5890
+ // Store internals in SDKInternalsRegistry (not visible on instance).
5891
+ // `folderKey` is meta-tag-only — kept off `UiPathConfig` (which mirrors
5892
+ // user-passed values) and lives here on the runtime registry instead.
5883
5893
  SDKInternalsRegistry.set(this, {
5884
5894
  config: internalConfig,
5885
5895
  context: executionContext,
5886
- tokenManager: __classPrivateFieldGet(this, _UiPath_authService, "f").getTokenManager()
5896
+ tokenManager: __classPrivateFieldGet(this, _UiPath_authService, "f").getTokenManager(),
5897
+ folderKey: __classPrivateFieldGet(this, _UiPath_metaFolderKey, "f"),
5887
5898
  });
5888
5899
  // Expose read-only config for user convenience
5889
5900
  this.config = {
@@ -5911,6 +5922,7 @@ _UiPath_config = new WeakMap(), _UiPath_authService = new WeakMap(), _UiPath_ini
5911
5922
  }, _UiPath_loadConfig = function _UiPath_loadConfig() {
5912
5923
  // Load from meta tags
5913
5924
  const metaConfig = loadFromMetaTags();
5925
+ __classPrivateFieldSet(this, _UiPath_metaFolderKey, metaConfig?.folderKey, "f");
5914
5926
  // Merge with any partial config from constructor (constructor overrides meta tags)
5915
5927
  const merged = { ...metaConfig, ...__classPrivateFieldGet(this, _UiPath_partialConfig, "f") };
5916
5928
  if (!isCompleteConfig(merged)) {
@@ -529,7 +529,7 @@ declare const telemetryClient: TelemetryClient;
529
529
  * SDK Telemetry constants
530
530
  */
531
531
  declare const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
532
- declare const SDK_VERSION = "1.3.6";
532
+ declare const SDK_VERSION = "1.3.7";
533
533
  declare const VERSION = "Version";
534
534
  declare const SERVICE = "Service";
535
535
  declare const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -5305,7 +5305,7 @@ function normalizeBaseUrl(url) {
5305
5305
  // Connection string placeholder that will be replaced during build
5306
5306
  const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
5307
5307
  // SDK Version placeholder
5308
- const SDK_VERSION = "1.3.6";
5308
+ const SDK_VERSION = "1.3.7";
5309
5309
  const VERSION = "Version";
5310
5310
  const SERVICE = "Service";
5311
5311
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -5652,6 +5652,8 @@ var UiPathMetaTags;
5652
5652
  // Asset resolution and routing
5653
5653
  UiPathMetaTags["CDN_BASE"] = "uipath:cdn-base";
5654
5654
  UiPathMetaTags["APP_BASE"] = "uipath:app-base";
5655
+ // Folder context (injected during coded-app deployment)
5656
+ UiPathMetaTags["FOLDER_KEY"] = "uipath:folder-key";
5655
5657
  })(UiPathMetaTags || (UiPathMetaTags = {}));
5656
5658
 
5657
5659
  /**
@@ -5680,12 +5682,13 @@ function loadFromMetaTags() {
5680
5682
  tenantName: getMetaTagContent(UiPathMetaTags.TENANT_NAME),
5681
5683
  baseUrl: getMetaTagContent(UiPathMetaTags.BASE_URL),
5682
5684
  redirectUri: getMetaTagContent(UiPathMetaTags.REDIRECT_URI),
5685
+ folderKey: getMetaTagContent(UiPathMetaTags.FOLDER_KEY),
5683
5686
  };
5684
5687
  const hasAnyValue = Object.values(config).some(Boolean);
5685
5688
  return hasAnyValue ? config : null;
5686
5689
  }
5687
5690
 
5688
- var _UiPath_instances, _UiPath_config, _UiPath_authService, _UiPath_initialized, _UiPath_partialConfig, _UiPath_multiLogin, _UiPath_initializeWithConfig, _UiPath_loadConfig;
5691
+ var _UiPath_instances, _UiPath_config, _UiPath_authService, _UiPath_initialized, _UiPath_partialConfig, _UiPath_multiLogin, _UiPath_metaFolderKey, _UiPath_initializeWithConfig, _UiPath_loadConfig;
5689
5692
  /**
5690
5693
  * UiPath - Core SDK class for authentication and configuration management.
5691
5694
  *
@@ -5726,8 +5729,13 @@ class UiPath {
5726
5729
  _UiPath_initialized.set(this, false);
5727
5730
  _UiPath_partialConfig.set(this, void 0);
5728
5731
  _UiPath_multiLogin.set(this, false);
5732
+ // Folder key sourced only from `<meta name="uipath:folder-key">` (coded-app
5733
+ // deployments). Not accepted via the public constructor; lives here so the
5734
+ // SDK can flow it through to BaseService.config without polluting BaseConfig.
5735
+ _UiPath_metaFolderKey.set(this, void 0);
5729
5736
  // Load configuration from meta tags
5730
5737
  const configFromMetaTags = loadFromMetaTags();
5738
+ __classPrivateFieldSet(this, _UiPath_metaFolderKey, configFromMetaTags?.folderKey, "f");
5731
5739
  // Merge configuration: constructor config overrides meta tags
5732
5740
  const mergedConfig = config ? { ...configFromMetaTags, ...config } : configFromMetaTags;
5733
5741
  if (mergedConfig && isCompleteConfig(mergedConfig)) {
@@ -5856,7 +5864,7 @@ class UiPath {
5856
5864
  __classPrivateFieldGet(this, _UiPath_authService, "f")?.updateToken(tokenInfo);
5857
5865
  }
5858
5866
  }
5859
- _UiPath_config = new WeakMap(), _UiPath_authService = new WeakMap(), _UiPath_initialized = new WeakMap(), _UiPath_partialConfig = new WeakMap(), _UiPath_multiLogin = new WeakMap(), _UiPath_instances = new WeakSet(), _UiPath_initializeWithConfig = function _UiPath_initializeWithConfig(config) {
5867
+ _UiPath_config = new WeakMap(), _UiPath_authService = new WeakMap(), _UiPath_initialized = new WeakMap(), _UiPath_partialConfig = new WeakMap(), _UiPath_multiLogin = new WeakMap(), _UiPath_metaFolderKey = new WeakMap(), _UiPath_instances = new WeakSet(), _UiPath_initializeWithConfig = function _UiPath_initializeWithConfig(config) {
5860
5868
  // Validate and normalize the configuration
5861
5869
  validateConfig(config);
5862
5870
  const hasSecretAuth = hasSecretConfig(config);
@@ -5869,7 +5877,7 @@ _UiPath_config = new WeakMap(), _UiPath_authService = new WeakMap(), _UiPath_ini
5869
5877
  secret: hasSecretAuth ? config.secret : undefined,
5870
5878
  clientId: hasOAuthAuth ? config.clientId : undefined,
5871
5879
  redirectUri: hasOAuthAuth ? config.redirectUri : undefined,
5872
- scope: hasOAuthAuth ? config.scope : undefined
5880
+ scope: hasOAuthAuth ? config.scope : undefined,
5873
5881
  });
5874
5882
  const executionContext = new ExecutionContext();
5875
5883
  __classPrivateFieldSet(this, _UiPath_authService, new AuthService(internalConfig, executionContext), "f");
@@ -5877,11 +5885,14 @@ _UiPath_config = new WeakMap(), _UiPath_authService = new WeakMap(), _UiPath_ini
5877
5885
  __classPrivateFieldGet(this, _UiPath_authService, "f").setMultiLogin();
5878
5886
  }
5879
5887
  __classPrivateFieldSet(this, _UiPath_config, internalConfig, "f");
5880
- // Store internals in SDKInternalsRegistry (not visible on instance)
5888
+ // Store internals in SDKInternalsRegistry (not visible on instance).
5889
+ // `folderKey` is meta-tag-only — kept off `UiPathConfig` (which mirrors
5890
+ // user-passed values) and lives here on the runtime registry instead.
5881
5891
  SDKInternalsRegistry.set(this, {
5882
5892
  config: internalConfig,
5883
5893
  context: executionContext,
5884
- tokenManager: __classPrivateFieldGet(this, _UiPath_authService, "f").getTokenManager()
5894
+ tokenManager: __classPrivateFieldGet(this, _UiPath_authService, "f").getTokenManager(),
5895
+ folderKey: __classPrivateFieldGet(this, _UiPath_metaFolderKey, "f"),
5885
5896
  });
5886
5897
  // Expose read-only config for user convenience
5887
5898
  this.config = {
@@ -5909,6 +5920,7 @@ _UiPath_config = new WeakMap(), _UiPath_authService = new WeakMap(), _UiPath_ini
5909
5920
  }, _UiPath_loadConfig = function _UiPath_loadConfig() {
5910
5921
  // Load from meta tags
5911
5922
  const metaConfig = loadFromMetaTags();
5923
+ __classPrivateFieldSet(this, _UiPath_metaFolderKey, metaConfig?.folderKey, "f");
5912
5924
  // Merge with any partial config from constructor (constructor overrides meta tags)
5913
5925
  const merged = { ...metaConfig, ...__classPrivateFieldGet(this, _UiPath_partialConfig, "f") };
5914
5926
  if (!isCompleteConfig(merged)) {