@iblai/iblai-js 2.43.0 → 2.45.1

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 (207) hide show
  1. package/dist/data-layer/playwright/edit-agent-category-helpers.d.ts +13 -0
  2. package/dist/data-layer/playwright/human-support-tab-helpers.d.ts +2 -2
  3. package/dist/data-layer/playwright/privacy-tab-helpers.d.ts +7 -4
  4. package/dist/data-layer/playwright/spend-limits-helpers.d.ts +7 -4
  5. package/dist/playwright/index.cjs +55 -15
  6. package/dist/playwright/index.cjs.map +1 -1
  7. package/dist/playwright/index.d.ts +16 -10
  8. package/dist/playwright/index.esm.js +55 -15
  9. package/dist/playwright/index.esm.js.map +1 -1
  10. package/dist/playwright/playwright/edit-agent-category-helpers.d.ts +13 -0
  11. package/dist/playwright/playwright/human-support-tab-helpers.d.ts +2 -2
  12. package/dist/playwright/playwright/privacy-tab-helpers.d.ts +7 -4
  13. package/dist/playwright/playwright/spend-limits-helpers.d.ts +7 -4
  14. package/dist/security/playwright/edit-agent-category-helpers.d.ts +13 -0
  15. package/dist/security/playwright/human-support-tab-helpers.d.ts +2 -2
  16. package/dist/security/playwright/privacy-tab-helpers.d.ts +7 -4
  17. package/dist/security/playwright/spend-limits-helpers.d.ts +7 -4
  18. package/dist/web-containers/playwright/edit-agent-category-helpers.d.ts +13 -0
  19. package/dist/web-containers/playwright/human-support-tab-helpers.d.ts +2 -2
  20. package/dist/web-containers/playwright/privacy-tab-helpers.d.ts +7 -4
  21. package/dist/web-containers/playwright/spend-limits-helpers.d.ts +7 -4
  22. package/dist/web-containers/source/admin/tabs/applications/applications-tab.js +5 -2
  23. package/dist/web-containers/source/admin/tabs/applications/applications-tab.js.map +1 -1
  24. package/dist/web-containers/source/applications/applications-tab.js +5 -2
  25. package/dist/web-containers/source/applications/applications-tab.js.map +1 -1
  26. package/dist/web-containers/source/applications-tab.js +5 -2
  27. package/dist/web-containers/source/applications-tab.js.map +1 -1
  28. package/dist/web-containers/source/approvals-mode-button.js +177 -0
  29. package/dist/web-containers/source/approvals-mode-button.js.map +1 -0
  30. package/dist/web-containers/source/capabilities-sub-tab.js +1 -1
  31. package/dist/web-containers/source/capabilities-sub-tab.js.map +1 -1
  32. package/dist/web-containers/source/chat/chat-host-context.js.map +1 -1
  33. package/dist/web-containers/source/chat/code-permission-card.js +39 -2
  34. package/dist/web-containers/source/chat/code-permission-card.js.map +1 -1
  35. package/dist/web-containers/source/chat-host-context.js.map +1 -1
  36. package/dist/web-containers/source/chat-input-form/approvals-mode-button.js +177 -0
  37. package/dist/web-containers/source/chat-input-form/approvals-mode-button.js.map +1 -0
  38. package/dist/web-containers/source/chat-input-form/composer-canvas-pill.js +30 -0
  39. package/dist/web-containers/source/chat-input-form/composer-canvas-pill.js.map +1 -0
  40. package/dist/web-containers/source/chat-input-form/composer-model-chip.js +23 -0
  41. package/dist/web-containers/source/chat-input-form/composer-model-chip.js.map +1 -0
  42. package/dist/web-containers/source/chat-input-form/composer-plus-menu.js +3 -3
  43. package/dist/web-containers/source/chat-input-form/composer-plus-menu.js.map +1 -1
  44. package/dist/web-containers/source/chat-input-form/composer-tool-row.js +91 -0
  45. package/dist/web-containers/source/chat-input-form/composer-tool-row.js.map +1 -0
  46. package/dist/web-containers/source/chat-input-form/cowork-control.js +7 -4
  47. package/dist/web-containers/source/chat-input-form/cowork-control.js.map +1 -1
  48. package/dist/web-containers/source/chat-input-form.js +8 -30
  49. package/dist/web-containers/source/chat-input-form.js.map +1 -1
  50. package/dist/web-containers/source/claw-sandbox/sandbox-config.js +1 -3
  51. package/dist/web-containers/source/claw-sandbox/sandbox-config.js.map +1 -1
  52. package/dist/web-containers/source/claw-sandbox/sandbox-kind-row.js +12 -0
  53. package/dist/web-containers/source/claw-sandbox/sandbox-kind-row.js.map +1 -0
  54. package/dist/web-containers/source/code-permission-card.js +39 -2
  55. package/dist/web-containers/source/code-permission-card.js.map +1 -1
  56. package/dist/web-containers/source/components/chat/chat-host-context.js.map +1 -1
  57. package/dist/web-containers/source/components/chat/code-permission-card.js +39 -2
  58. package/dist/web-containers/source/components/chat/code-permission-card.js.map +1 -1
  59. package/dist/web-containers/source/components/chat-input-form/approvals-mode-button.js +177 -0
  60. package/dist/web-containers/source/components/chat-input-form/approvals-mode-button.js.map +1 -0
  61. package/dist/web-containers/source/components/chat-input-form/composer-canvas-pill.js +30 -0
  62. package/dist/web-containers/source/components/chat-input-form/composer-canvas-pill.js.map +1 -0
  63. package/dist/web-containers/source/components/chat-input-form/composer-model-chip.js +23 -0
  64. package/dist/web-containers/source/components/chat-input-form/composer-model-chip.js.map +1 -0
  65. package/dist/web-containers/source/components/chat-input-form/composer-plus-menu.js +3 -3
  66. package/dist/web-containers/source/components/chat-input-form/composer-plus-menu.js.map +1 -1
  67. package/dist/web-containers/source/components/chat-input-form/composer-tool-row.js +91 -0
  68. package/dist/web-containers/source/components/chat-input-form/composer-tool-row.js.map +1 -0
  69. package/dist/web-containers/source/components/chat-input-form/cowork-control.js +7 -4
  70. package/dist/web-containers/source/components/chat-input-form/cowork-control.js.map +1 -1
  71. package/dist/web-containers/source/components/chat-input-form.js +8 -30
  72. package/dist/web-containers/source/components/chat-input-form.js.map +1 -1
  73. package/dist/web-containers/source/components/claw-sandbox/sandbox-config.js +1 -3
  74. package/dist/web-containers/source/components/claw-sandbox/sandbox-config.js.map +1 -1
  75. package/dist/web-containers/source/components/claw-sandbox/sandbox-kind-row.js +12 -0
  76. package/dist/web-containers/source/components/claw-sandbox/sandbox-kind-row.js.map +1 -0
  77. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/llm-tab/labels.js +12 -0
  78. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/llm-tab/labels.js.map +1 -1
  79. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/llm-tab/llm-provider-modal.js +46 -32
  80. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/llm-tab/llm-provider-modal.js.map +1 -1
  81. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/llm-tab.js +34 -6
  82. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/llm-tab.js.map +1 -1
  83. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/settings-tab/capabilities-sub-tab.js +1 -1
  84. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/settings-tab/capabilities-sub-tab.js.map +1 -1
  85. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/settings-tab/labels.js +1 -9
  86. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/settings-tab/labels.js.map +1 -1
  87. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/settings-tab/use-edit-mentor-settings.js +4 -8
  88. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/settings-tab/use-edit-mentor-settings.js.map +1 -1
  89. package/dist/web-containers/source/components/profile/admin/tabs/applications/applications-tab.js +5 -2
  90. package/dist/web-containers/source/components/profile/admin/tabs/applications/applications-tab.js.map +1 -1
  91. package/dist/web-containers/source/components/profile/users-models/index.js +192 -0
  92. package/dist/web-containers/source/components/profile/users-models/index.js.map +1 -0
  93. package/dist/web-containers/source/components/profile/users-models/llm-access.js +206 -0
  94. package/dist/web-containers/source/components/profile/users-models/llm-access.js.map +1 -0
  95. package/dist/web-containers/source/composer-canvas-pill.js +30 -0
  96. package/dist/web-containers/source/composer-canvas-pill.js.map +1 -0
  97. package/dist/web-containers/source/composer-model-chip.js +23 -0
  98. package/dist/web-containers/source/composer-model-chip.js.map +1 -0
  99. package/dist/web-containers/source/composer-plus-menu.js +3 -3
  100. package/dist/web-containers/source/composer-plus-menu.js.map +1 -1
  101. package/dist/web-containers/source/composer-tool-row.js +91 -0
  102. package/dist/web-containers/source/composer-tool-row.js.map +1 -0
  103. package/dist/web-containers/source/cowork-control.js +7 -4
  104. package/dist/web-containers/source/cowork-control.js.map +1 -1
  105. package/dist/web-containers/source/edit-mentor-modal/tabs/llm-tab/labels.js +12 -0
  106. package/dist/web-containers/source/edit-mentor-modal/tabs/llm-tab/labels.js.map +1 -1
  107. package/dist/web-containers/source/edit-mentor-modal/tabs/llm-tab/llm-provider-modal.js +46 -32
  108. package/dist/web-containers/source/edit-mentor-modal/tabs/llm-tab/llm-provider-modal.js.map +1 -1
  109. package/dist/web-containers/source/edit-mentor-modal/tabs/llm-tab.js +34 -6
  110. package/dist/web-containers/source/edit-mentor-modal/tabs/llm-tab.js.map +1 -1
  111. package/dist/web-containers/source/edit-mentor-modal/tabs/settings-tab/capabilities-sub-tab.js +1 -1
  112. package/dist/web-containers/source/edit-mentor-modal/tabs/settings-tab/capabilities-sub-tab.js.map +1 -1
  113. package/dist/web-containers/source/edit-mentor-modal/tabs/settings-tab/labels.js +1 -9
  114. package/dist/web-containers/source/edit-mentor-modal/tabs/settings-tab/labels.js.map +1 -1
  115. package/dist/web-containers/source/edit-mentor-modal/tabs/settings-tab/use-edit-mentor-settings.js +4 -8
  116. package/dist/web-containers/source/edit-mentor-modal/tabs/settings-tab/use-edit-mentor-settings.js.map +1 -1
  117. package/dist/web-containers/source/en.json.js +50 -9
  118. package/dist/web-containers/source/en.json.js.map +1 -1
  119. package/dist/web-containers/source/es.json.js +49 -8
  120. package/dist/web-containers/source/es.json.js.map +1 -1
  121. package/dist/web-containers/source/fr.json.js +49 -8
  122. package/dist/web-containers/source/fr.json.js.map +1 -1
  123. package/dist/web-containers/source/i18n/messages/en.json.js +50 -9
  124. package/dist/web-containers/source/i18n/messages/en.json.js.map +1 -1
  125. package/dist/web-containers/source/i18n/messages/es.json.js +49 -8
  126. package/dist/web-containers/source/i18n/messages/es.json.js.map +1 -1
  127. package/dist/web-containers/source/i18n/messages/fr.json.js +49 -8
  128. package/dist/web-containers/source/i18n/messages/fr.json.js.map +1 -1
  129. package/dist/web-containers/source/i18n/messages/zh.json.js +49 -8
  130. package/dist/web-containers/source/i18n/messages/zh.json.js.map +1 -1
  131. package/dist/web-containers/source/llm-access.js +206 -0
  132. package/dist/web-containers/source/llm-access.js.map +1 -0
  133. package/dist/web-containers/source/llm-provider-modal.js +46 -32
  134. package/dist/web-containers/source/llm-provider-modal.js.map +1 -1
  135. package/dist/web-containers/source/llm-tab/labels.js +12 -0
  136. package/dist/web-containers/source/llm-tab/labels.js.map +1 -1
  137. package/dist/web-containers/source/llm-tab/llm-provider-modal.js +46 -32
  138. package/dist/web-containers/source/llm-tab/llm-provider-modal.js.map +1 -1
  139. package/dist/web-containers/source/llm-tab.js +34 -6
  140. package/dist/web-containers/source/llm-tab.js.map +1 -1
  141. package/dist/web-containers/source/messages/en.json.js +50 -9
  142. package/dist/web-containers/source/messages/en.json.js.map +1 -1
  143. package/dist/web-containers/source/messages/es.json.js +49 -8
  144. package/dist/web-containers/source/messages/es.json.js.map +1 -1
  145. package/dist/web-containers/source/messages/fr.json.js +49 -8
  146. package/dist/web-containers/source/messages/fr.json.js.map +1 -1
  147. package/dist/web-containers/source/messages/zh.json.js +49 -8
  148. package/dist/web-containers/source/messages/zh.json.js.map +1 -1
  149. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/llm-tab/labels.js +12 -0
  150. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/llm-tab/labels.js.map +1 -1
  151. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/llm-tab/llm-provider-modal.js +46 -32
  152. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/llm-tab/llm-provider-modal.js.map +1 -1
  153. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/llm-tab.js +34 -6
  154. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/llm-tab.js.map +1 -1
  155. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/settings-tab/capabilities-sub-tab.js +1 -1
  156. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/settings-tab/capabilities-sub-tab.js.map +1 -1
  157. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/settings-tab/labels.js +1 -9
  158. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/settings-tab/labels.js.map +1 -1
  159. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/settings-tab/use-edit-mentor-settings.js +4 -8
  160. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/settings-tab/use-edit-mentor-settings.js.map +1 -1
  161. package/dist/web-containers/source/next/index.js +2 -0
  162. package/dist/web-containers/source/next/index.js.map +1 -1
  163. package/dist/web-containers/source/profile/admin/tabs/applications/applications-tab.js +5 -2
  164. package/dist/web-containers/source/profile/admin/tabs/applications/applications-tab.js.map +1 -1
  165. package/dist/web-containers/source/profile/users-models/index.js +192 -0
  166. package/dist/web-containers/source/profile/users-models/index.js.map +1 -0
  167. package/dist/web-containers/source/profile/users-models/llm-access.js +206 -0
  168. package/dist/web-containers/source/profile/users-models/llm-access.js.map +1 -0
  169. package/dist/web-containers/source/sandbox-config.js +1 -3
  170. package/dist/web-containers/source/sandbox-config.js.map +1 -1
  171. package/dist/web-containers/source/sandbox-kind-row.js +12 -0
  172. package/dist/web-containers/source/sandbox-kind-row.js.map +1 -0
  173. package/dist/web-containers/source/settings-tab/capabilities-sub-tab.js +1 -1
  174. package/dist/web-containers/source/settings-tab/capabilities-sub-tab.js.map +1 -1
  175. package/dist/web-containers/source/settings-tab/labels.js +1 -9
  176. package/dist/web-containers/source/settings-tab/labels.js.map +1 -1
  177. package/dist/web-containers/source/settings-tab/use-edit-mentor-settings.js +4 -8
  178. package/dist/web-containers/source/settings-tab/use-edit-mentor-settings.js.map +1 -1
  179. package/dist/web-containers/source/tabs/applications/applications-tab.js +5 -2
  180. package/dist/web-containers/source/tabs/applications/applications-tab.js.map +1 -1
  181. package/dist/web-containers/source/tabs/llm-tab/labels.js +12 -0
  182. package/dist/web-containers/source/tabs/llm-tab/labels.js.map +1 -1
  183. package/dist/web-containers/source/tabs/llm-tab/llm-provider-modal.js +46 -32
  184. package/dist/web-containers/source/tabs/llm-tab/llm-provider-modal.js.map +1 -1
  185. package/dist/web-containers/source/tabs/llm-tab.js +34 -6
  186. package/dist/web-containers/source/tabs/llm-tab.js.map +1 -1
  187. package/dist/web-containers/source/tabs/settings-tab/capabilities-sub-tab.js +1 -1
  188. package/dist/web-containers/source/tabs/settings-tab/capabilities-sub-tab.js.map +1 -1
  189. package/dist/web-containers/source/tabs/settings-tab/labels.js +1 -9
  190. package/dist/web-containers/source/tabs/settings-tab/labels.js.map +1 -1
  191. package/dist/web-containers/source/tabs/settings-tab/use-edit-mentor-settings.js +4 -8
  192. package/dist/web-containers/source/tabs/settings-tab/use-edit-mentor-settings.js.map +1 -1
  193. package/dist/web-containers/source/tsconfig.tsbuildinfo +1 -1
  194. package/dist/web-containers/source/use-edit-mentor-settings.js +4 -8
  195. package/dist/web-containers/source/use-edit-mentor-settings.js.map +1 -1
  196. package/dist/web-containers/source/users-models/index.js +192 -0
  197. package/dist/web-containers/source/users-models/index.js.map +1 -0
  198. package/dist/web-containers/source/users-models/llm-access.js +206 -0
  199. package/dist/web-containers/source/users-models/llm-access.js.map +1 -0
  200. package/dist/web-containers/source/web-containers/tsconfig.tsbuildinfo +1 -1
  201. package/dist/web-containers/source/zh.json.js +49 -8
  202. package/dist/web-containers/source/zh.json.js.map +1 -1
  203. package/dist/web-utils/playwright/edit-agent-category-helpers.d.ts +13 -0
  204. package/dist/web-utils/playwright/human-support-tab-helpers.d.ts +2 -2
  205. package/dist/web-utils/playwright/privacy-tab-helpers.d.ts +7 -4
  206. package/dist/web-utils/playwright/spend-limits-helpers.d.ts +7 -4
  207. package/package.json +5 -5
@@ -0,0 +1,13 @@
1
+ import { Locator, Page } from '@playwright/test';
2
+ /**
3
+ * Best-effort switch to the Edit Agent modal's category pill (Setup /
4
+ * Policies / Integrations / Activity) that hosts a segment. The host mounts
5
+ * only the active category's segment triggers, so a tab lookup misses every
6
+ * segment outside it. The strip only renders when more than one category has
7
+ * items, so a missing pill is not an error — the segment is then already
8
+ * mounted in the single visible list.
9
+ *
10
+ * `scope` is the Edit Agent dialog when the caller holds one; with a `Page`
11
+ * the pill is looked up inside the open dialogs.
12
+ */
13
+ export declare function switchToEditAgentCategory(scope: Page | Locator, category: string): Promise<void>;
@@ -1,7 +1,7 @@
1
1
  import { Locator, Page } from '@playwright/test';
2
2
  /**
3
3
  * Support tab helpers — Playwright bindings for the `AgentHumanSupportTab`
4
- * component from `@iblai/web-containers` (Edit Agent modal → Runtime →
4
+ * component from `@iblai/web-containers` (Edit Agent modal → Activity →
5
5
  * Support).
6
6
  *
7
7
  * All UI strings below mirror `AGENT_HUMAN_SUPPORT_TAB_LABELS` from
@@ -20,7 +20,7 @@ export declare const SUPPORT_LABELS: {
20
20
  /** The host sidebar trigger's `aria-controls` panel id suffix. */
21
21
  readonly panelValue: "human_support";
22
22
  /** Category strip pill that hosts the Support segment. */
23
- readonly navCategory: "Runtime";
23
+ readonly navCategory: "Activity";
24
24
  readonly header: {
25
25
  readonly title: "Support";
26
26
  readonly description: "Review and respond to support requests submitted for this agent.";
@@ -13,6 +13,8 @@ import { Locator, Page } from '@playwright/test';
13
13
  */
14
14
  export declare const PRIVACY_LABELS: {
15
15
  readonly tabName: "Privacy";
16
+ /** Category strip pill that hosts the Privacy segment. */
17
+ readonly navCategory: "Policies";
16
18
  readonly headerTitle: "Privacy";
17
19
  readonly actionLabel: "When PII is detected";
18
20
  readonly blockMessageLabel: "Block Message";
@@ -43,13 +45,14 @@ export declare const PRIVACY_LABELS: {
43
45
  export type PrivacyAction = keyof typeof PRIVACY_LABELS.actionOptions;
44
46
  export type PrivacyEntity = keyof typeof PRIVACY_LABELS.entityChips;
45
47
  /**
46
- * Check whether the Privacy tab is currently rendered in the Edit Mentor
47
- * dialog. Returns false instead of throwing so consumers can guard
48
- * conditionally rendered tabs.
48
+ * Check whether the Privacy tab is reachable in the Edit Mentor dialog
49
+ * (switches to the Policies category first). Returns false instead of
50
+ * throwing so consumers can guard conditionally rendered tabs.
49
51
  */
50
52
  export declare function isPrivacyTabVisible(page: Page): Promise<boolean>;
51
53
  /**
52
- * Switch to the Privacy tab. Assumes the Edit Mentor dialog is open.
54
+ * Switch to the Privacy tab (Policies category). Assumes the Edit Mentor
55
+ * dialog is open.
53
56
  *
54
57
  * The Privacy Router on/off toggle lives on the Settings tab — this tab
55
58
  * only shows dependent PII-handling fields when the router is enabled.
@@ -32,6 +32,8 @@ import { Locator, Page } from '@playwright/test';
32
32
  export declare const SPEND_LIMITS_LABELS: {
33
33
  /** Agent-settings modal tab name (host registries label it "Billing"). */
34
34
  readonly tabName: "Billing";
35
+ /** Category strip pill that hosts the Billing segment. */
36
+ readonly navCategory: "Policies";
35
37
  readonly subTabs: {
36
38
  readonly agent: "This Agent";
37
39
  readonly users: "Per User";
@@ -98,13 +100,14 @@ export declare function spendLimitsTabBody(page: Page, scope?: Locator): Locator
98
100
  /** A per-user table row for the given username. */
99
101
  export declare function userSpendLimitRow(page: Page, username: string, scope?: Locator): Locator;
100
102
  /**
101
- * Returns false if the Billing tab isn't currently rendered in the
102
- * edit-agent dialog (host didn't register it, or RBAC hid it).
103
+ * Returns false if the Billing tab isn't reachable in the edit-agent dialog
104
+ * (host didn't register it, or RBAC hid it). Switches to the Policies
105
+ * category first.
103
106
  */
104
107
  export declare function isSpendLimitsTabVisible(page: Page): Promise<boolean>;
105
108
  /**
106
- * Switch to the Billing top-level tab of the edit-agent dialog. Completion
107
- * is gated on the tab body's testid, not on timing.
109
+ * Switch to the Billing top-level tab (Policies category) of the edit-agent
110
+ * dialog. Completion is gated on the tab body's testid, not on timing.
108
111
  */
109
112
  export declare function switchToSpendLimitsTab(page: Page): Promise<void>;
110
113
  /**
@@ -3887,6 +3887,35 @@ async function expectCreditBalanceForCurrentPlan(page, options) {
3887
3887
  return plan;
3888
3888
  }
3889
3889
 
3890
+ /**
3891
+ * Best-effort switch to the Edit Agent modal's category pill (Setup /
3892
+ * Policies / Integrations / Activity) that hosts a segment. The host mounts
3893
+ * only the active category's segment triggers, so a tab lookup misses every
3894
+ * segment outside it. The strip only renders when more than one category has
3895
+ * items, so a missing pill is not an error — the segment is then already
3896
+ * mounted in the single visible list.
3897
+ *
3898
+ * `scope` is the Edit Agent dialog when the caller holds one; with a `Page`
3899
+ * the pill is looked up inside the open dialogs.
3900
+ */
3901
+ async function switchToEditAgentCategory(scope, category) {
3902
+ const dialog = 'page' in scope ? scope : scope.getByRole('dialog');
3903
+ const pill = dialog
3904
+ .getByRole('tab', { name: category, exact: true })
3905
+ .and(dialog.locator(':visible'))
3906
+ .first();
3907
+ const hasStrip = await pill
3908
+ .waitFor({ state: 'visible', timeout: 5000 })
3909
+ .then(() => true)
3910
+ .catch(() => false);
3911
+ if (!hasStrip)
3912
+ return;
3913
+ if ((await pill.getAttribute('data-state').catch(() => null)) !== 'active') {
3914
+ await pill.click();
3915
+ await test$1.expect(pill).toHaveAttribute('data-state', 'active', { timeout: 5000 });
3916
+ }
3917
+ }
3918
+
3890
3919
  /**
3891
3920
  * Privacy tab helpers — Playwright bindings for the `AgentPrivacyTab`
3892
3921
  * component from `@iblai/web-containers`.
@@ -3901,6 +3930,8 @@ async function expectCreditBalanceForCurrentPlan(page, options) {
3901
3930
  */
3902
3931
  const PRIVACY_LABELS = {
3903
3932
  tabName: 'Privacy',
3933
+ /** Category strip pill that hosts the Privacy segment. */
3934
+ navCategory: 'Policies',
3904
3935
  headerTitle: 'Privacy',
3905
3936
  actionLabel: 'When PII is detected',
3906
3937
  blockMessageLabel: 'Block Message',
@@ -3937,13 +3968,14 @@ function asPage$8(scope) {
3937
3968
  return 'page' in scope ? scope.page() : scope;
3938
3969
  }
3939
3970
  /**
3940
- * Check whether the Privacy tab is currently rendered in the Edit Mentor
3941
- * dialog. Returns false instead of throwing so consumers can guard
3942
- * conditionally rendered tabs.
3971
+ * Check whether the Privacy tab is reachable in the Edit Mentor dialog
3972
+ * (switches to the Policies category first). Returns false instead of
3973
+ * throwing so consumers can guard conditionally rendered tabs.
3943
3974
  */
3944
3975
  async function isPrivacyTabVisible(page) {
3945
3976
  const tab = page.getByRole('tab', { name: PRIVACY_LABELS.tabName, exact: true });
3946
3977
  try {
3978
+ await switchToEditAgentCategory(page, PRIVACY_LABELS.navCategory);
3947
3979
  await test$1.expect(tab).toBeVisible({ timeout: 5000 });
3948
3980
  return true;
3949
3981
  }
@@ -3952,7 +3984,8 @@ async function isPrivacyTabVisible(page) {
3952
3984
  }
3953
3985
  }
3954
3986
  /**
3955
- * Switch to the Privacy tab. Assumes the Edit Mentor dialog is open.
3987
+ * Switch to the Privacy tab (Policies category). Assumes the Edit Mentor
3988
+ * dialog is open.
3956
3989
  *
3957
3990
  * The Privacy Router on/off toggle lives on the Settings tab — this tab
3958
3991
  * only shows dependent PII-handling fields when the router is enabled.
@@ -3960,6 +3993,7 @@ async function isPrivacyTabVisible(page) {
3960
3993
  * since the field labels are conditional.
3961
3994
  */
3962
3995
  async function switchToPrivacyTab(page) {
3996
+ await switchToEditAgentCategory(page, PRIVACY_LABELS.navCategory);
3963
3997
  const tab = page.getByRole('tab', { name: PRIVACY_LABELS.tabName, exact: true });
3964
3998
  await test$1.expect(tab).toBeVisible({ timeout: 10000 });
3965
3999
  await tab.click();
@@ -5548,6 +5582,8 @@ async function clickBillingManageUsage(page) {
5548
5582
  const SPEND_LIMITS_LABELS = {
5549
5583
  /** Agent-settings modal tab name (host registries label it "Billing"). */
5550
5584
  tabName: 'Billing',
5585
+ /** Category strip pill that hosts the Billing segment. */
5586
+ navCategory: 'Policies',
5551
5587
  subTabs: {
5552
5588
  agent: 'This Agent',
5553
5589
  users: 'Per User',
@@ -5621,15 +5657,18 @@ function userSpendLimitRow(page, username, scope) {
5621
5657
  return userCapsSection(page, scope).getByTestId(`user-cap-row-${username}`);
5622
5658
  }
5623
5659
  /**
5624
- * Returns false if the Billing tab isn't currently rendered in the
5625
- * edit-agent dialog (host didn't register it, or RBAC hid it).
5660
+ * Returns false if the Billing tab isn't reachable in the edit-agent dialog
5661
+ * (host didn't register it, or RBAC hid it). Switches to the Policies
5662
+ * category first.
5626
5663
  */
5627
5664
  async function isSpendLimitsTabVisible(page) {
5628
- const tab = editAgentDialog(page).getByRole('tab', {
5665
+ const dialog = editAgentDialog(page);
5666
+ const tab = dialog.getByRole('tab', {
5629
5667
  name: SPEND_LIMITS_LABELS.tabName,
5630
5668
  exact: true,
5631
5669
  });
5632
5670
  try {
5671
+ await switchToEditAgentCategory(dialog, SPEND_LIMITS_LABELS.navCategory);
5633
5672
  await test$1.expect(tab).toBeVisible({ timeout: 5000 });
5634
5673
  return true;
5635
5674
  }
@@ -5638,11 +5677,12 @@ async function isSpendLimitsTabVisible(page) {
5638
5677
  }
5639
5678
  }
5640
5679
  /**
5641
- * Switch to the Billing top-level tab of the edit-agent dialog. Completion
5642
- * is gated on the tab body's testid, not on timing.
5680
+ * Switch to the Billing top-level tab (Policies category) of the edit-agent
5681
+ * dialog. Completion is gated on the tab body's testid, not on timing.
5643
5682
  */
5644
5683
  async function switchToSpendLimitsTab(page) {
5645
5684
  const dialog = editAgentDialog(page);
5685
+ await switchToEditAgentCategory(dialog, SPEND_LIMITS_LABELS.navCategory);
5646
5686
  const tab = dialog.getByRole('tab', { name: SPEND_LIMITS_LABELS.tabName, exact: true });
5647
5687
  await test$1.expect(tab).toBeVisible({ timeout: UI_TIMEOUT });
5648
5688
  await tab.click();
@@ -7873,7 +7913,7 @@ async function expectAllEndpointsVisible(scope) {
7873
7913
 
7874
7914
  /**
7875
7915
  * Support tab helpers — Playwright bindings for the `AgentHumanSupportTab`
7876
- * component from `@iblai/web-containers` (Edit Agent modal → Runtime →
7916
+ * component from `@iblai/web-containers` (Edit Agent modal → Activity →
7877
7917
  * Support).
7878
7918
  *
7879
7919
  * All UI strings below mirror `AGENT_HUMAN_SUPPORT_TAB_LABELS` from
@@ -7892,7 +7932,7 @@ const SUPPORT_LABELS = {
7892
7932
  /** The host sidebar trigger's `aria-controls` panel id suffix. */
7893
7933
  panelValue: 'human_support',
7894
7934
  /** Category strip pill that hosts the Support segment. */
7895
- navCategory: 'Runtime',
7935
+ navCategory: 'Activity',
7896
7936
  header: {
7897
7937
  title: 'Support',
7898
7938
  description: 'Review and respond to support requests submitted for this agent.',
@@ -7980,7 +8020,7 @@ function getEditAgentDialog(page, dialogTitle = 'Edit Agent') {
7980
8020
  async function isSupportTabVisible(page) {
7981
8021
  const dialog = getEditAgentDialog(page);
7982
8022
  try {
7983
- await switchToRuntimeCategory(dialog);
8023
+ await switchToActivityCategory(dialog);
7984
8024
  await test$1.expect(getSupportTabTrigger(dialog)).toBeVisible({ timeout: 5000 });
7985
8025
  return true;
7986
8026
  }
@@ -8000,12 +8040,12 @@ function getSupportTabTrigger(dialog) {
8000
8040
  .first();
8001
8041
  }
8002
8042
  /**
8003
- * Best-effort switch to the "Runtime" category strip that hosts the
8043
+ * Best-effort switch to the "Activity" category strip that hosts the
8004
8044
  * Support segment. The strip only renders when more than one category has
8005
8045
  * items, so a missing pill is not an error — the segment is then already
8006
8046
  * mounted in the single visible list.
8007
8047
  */
8008
- async function switchToRuntimeCategory(dialog) {
8048
+ async function switchToActivityCategory(dialog) {
8009
8049
  const pill = dialog
8010
8050
  .getByRole('tab', { name: SUPPORT_LABELS.navCategory, exact: true })
8011
8051
  .and(dialog.locator(':visible'))
@@ -8029,7 +8069,7 @@ async function switchToRuntimeCategory(dialog) {
8029
8069
  async function switchToSupportTab(page) {
8030
8070
  const dialog = getEditAgentDialog(page);
8031
8071
  await test$1.expect(dialog).toBeVisible({ timeout: 15000 });
8032
- await switchToRuntimeCategory(dialog);
8072
+ await switchToActivityCategory(dialog);
8033
8073
  const trigger = getSupportTabTrigger(dialog);
8034
8074
  await test$1.expect(trigger).toBeVisible({ timeout: 10000 });
8035
8075
  await trigger.click();