@iblai/iblai-js 2.4.3 → 2.4.5

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.
@@ -10,8 +10,9 @@ export declare function switchToSkillsTab(page: Page): Promise<void>;
10
10
  */
11
11
  export declare function verifySkillsTabVisible(page: Page): Promise<void>;
12
12
  /**
13
- * Switch to the "Agent Skills" sub-tab (the agent's own skills, with enable
14
- * toggles; the default sub-tab) and wait for its panel to render.
13
+ * Switch to the "Agent Skills" sub-tab (the agent's assigned skills with
14
+ * enable toggles, paged server-side 10 per page; the default sub-tab) and
15
+ * wait for its panel to render.
15
16
  */
16
17
  export declare function switchToAgentSkillsSubTab(page: Page): Promise<void>;
17
18
  /**
@@ -49,13 +50,15 @@ export declare function verifySkillVisible(page: Page, skillName: string): Promi
49
50
  */
50
51
  export declare function addSkillToAgent(page: Page, skillName: string): Promise<void>;
51
52
  /**
52
- * Verify a catalog row shows the "Added" chip (already on the agent, or
53
- * shadowed by a same-slug private skill) and offers no Add button.
53
+ * Verify a catalog row shows the "Added" chip (the skill is assigned to the
54
+ * agent) and offers no Add button.
54
55
  */
55
56
  export declare function verifySkillAdded(page: Page, skillName: string): Promise<void>;
56
57
  /**
57
- * Open the three-dots actions menu for a skill row. The menu content portals
58
- * to document.body, so the returned locator is page-level by design.
58
+ * Open the three-dots actions menu for a skill row on the active sub-tab.
59
+ * Agent-tab rows offer "Remove from Agent" only; catalog rows offer
60
+ * Edit/Delete (for editable skills). The menu content portals to
61
+ * document.body, so the returned locator is page-level by design.
59
62
  */
60
63
  export declare function openSkillActionsMenu(page: Page, skillName: string): Promise<Locator>;
61
64
  /**
@@ -83,6 +86,13 @@ export declare function disableSkill(page: Page, skillName: string): Promise<voi
83
86
  * Returns the new checked state.
84
87
  */
85
88
  export declare function toggleSkill(page: Page, skillName: string): Promise<boolean>;
89
+ /**
90
+ * Set a skill's platform-wide enabled flag via its "Available Skills"
91
+ * catalog row Switch (skill-level PATCH — the agent-tab switches PATCH the
92
+ * assignment instead). No-op when already in the requested state; waits for
93
+ * the success toast otherwise. Read-only featured rows have no switch.
94
+ */
95
+ export declare function setCatalogSkillEnabled(page: Page, skillName: string, enabled: boolean): Promise<void>;
86
96
  export interface SkillFormValues {
87
97
  name: string;
88
98
  slug: string;
@@ -104,17 +114,20 @@ export declare function openNewSkillDialog(page: Page): Promise<Locator>;
104
114
  */
105
115
  export declare function createSkill(page: Page, values: SkillFormValues): Promise<void>;
106
116
  /**
107
- * Open the Edit Skill dialog for a row (lands on the General sub-tab).
117
+ * Open the Edit Skill dialog for a catalog row (lands on the General
118
+ * sub-tab). Skill edit/delete actions live on the "Available Skills"
119
+ * sub-tab — switch there first (`switchToAvailableSkillsSubTab`).
108
120
  * Returns the dialog locator — resolve fields and sub-tabs from it.
109
121
  */
110
122
  export declare function openEditSkillDialog(page: Page, skillName: string): Promise<Locator>;
111
123
  /**
112
- * Edit an existing platform-level skill (General sub-tab fields).
124
+ * Edit an existing platform-level skill (General sub-tab fields) from its
125
+ * catalog row — switch to the "Available Skills" sub-tab first.
113
126
  */
114
127
  export declare function editSkill(page: Page, skillName: string, updates: Partial<SkillFormValues>): Promise<void>;
115
128
  /**
116
- * Delete a platform-level skill via its row menu, confirming the
117
- * "Delete Skill" dialog.
129
+ * Delete a platform-level skill via its catalog row menu (switch to the
130
+ * "Available Skills" sub-tab first), confirming the "Delete Skill" dialog.
118
131
  */
119
132
  export declare function deleteSkill(page: Page, skillName: string): Promise<void>;
120
133
  /**
@@ -18,7 +18,7 @@ export type { ReportDownloadOptions } from './report-download';
18
18
  export { isMemoryTabVisible, switchToMemoryTab, verifyMemoryTabSettings, verifyMemoryTabMemoriesList, openAddMemoryDialog, toggleMemorySwitch, addMemory, deleteFirstMemory, deleteMemoryByContent, archiveFirstMemory, archiveMemoryByContent, getMemoryCount, verifyMemoryExists, verifyMemoryNotExists, } from './memory-test-helpers';
19
19
  export { isSandboxTabVisible, switchToSandboxTab, verifyInstanceTableVisible, getInstanceRowCount, verifyInstanceTableEmpty, searchInstances, clearInstanceSearch, openInstanceActionsMenu, openNewInstanceDialog, createInstance, cancelNewInstanceDialog, openEditInstanceDialog, editInstance, deleteInstance, cancelDeleteInstance, connectToInstance, disconnectInstance, cancelDisconnectInstance, runInstanceChecks, runConnectedInstanceChecks, getInstanceHealthLabel, getInstanceStatusLabel, verifyConnectDisabledForUnhealthy, verifyConnectedInstanceCard, toggleAutoPush, pushConfiguration, openLLMProviderPicker, selectLLMModel, getCurrentModel, verifyAgentConfigPromptsVisible, openAgentPromptEditModal, editAgentPrompt, setupSandboxInstance, teardownSandboxInstance, } from './claw-sandbox-helpers';
20
20
  export type { AgentPromptField } from './claw-sandbox-helpers';
21
- export { switchToSkillsTab, verifySkillsTabVisible, switchToAgentSkillsSubTab, switchToAvailableSkillsSubTab, goToSkillsListPage, verifySkillsEmptyState, verifyAgentSkillsEmptyState, getSkillRowCount, verifySkillVisible, addSkillToAgent, verifySkillAdded, removeSkillFromAgent, isSkillEnabled, enableSkill, disableSkill, toggleSkill, openNewSkillDialog, createSkill, openSkillActionsMenu, openEditSkillDialog, editSkill, deleteSkill, cancelDeleteSkill, switchToSkillResourcesSubTab, addTextResource, uploadAssetResource, editTextResource, deleteResource, openSlashSkillPicker, selectSlashSkill, } from './agent-skills-helpers';
21
+ export { switchToSkillsTab, verifySkillsTabVisible, switchToAgentSkillsSubTab, switchToAvailableSkillsSubTab, goToSkillsListPage, verifySkillsEmptyState, verifyAgentSkillsEmptyState, getSkillRowCount, verifySkillVisible, addSkillToAgent, verifySkillAdded, removeSkillFromAgent, isSkillEnabled, enableSkill, disableSkill, toggleSkill, setCatalogSkillEnabled, openNewSkillDialog, createSkill, openSkillActionsMenu, openEditSkillDialog, editSkill, deleteSkill, cancelDeleteSkill, switchToSkillResourcesSubTab, addTextResource, uploadAssetResource, editTextResource, deleteResource, openSlashSkillPicker, selectSlashSkill, } from './agent-skills-helpers';
22
22
  export type { SkillFormValues, TextResourceValues } from './agent-skills-helpers';
23
23
  export { navigateToAuditLog, verifyAuditLogTableVisible, getAuditLogRowCount, verifyAuditLogEntryStructure, verifyAuditLogEmptyState, verifyAuditLogPermissionError, verifyAuditLogGenericError, verifyAuditLogLoading, waitForAuditLogDataLoaded, filterByAction, filterByActor, getAvailableActors, filterByDateRange, clearDateRangeFilter, getPaginationInfo, goToNextPage, goToPreviousPage, goToFirstPage, goToLastPage, goToPage, verifyCurrentPage, isOnLastPage, isOnFirstPage, navigateToAuditLogAndWaitForData, filterByActionAndVerify, filterByActorAndVerify, } from './audit-log-helpers';
24
24
  export { getCurrentTenantShowPaywall, creditBalanceTrigger, creditBalancePanel, creditBalancePlanBadge, expectCreditBalanceVisibilityForTenant, openCreditBalanceDropdown, waitForCreditBalanceLoaded, closeCreditBalanceDropdown, getCreditBalancePlanLabel, getCreditBalanceRemaining, expectCreditBalancePanelForFreePlan, expectCreditBalancePanelForTrialPlan, expectCreditBalancePanelForPremiumPlan, expectCreditBalanceForCurrentPlan, } from './credit-balance-helpers';
@@ -35,6 +35,8 @@ export { graderTabBody, isGraderTabVisible, switchToGraderTab, switchToGraderSub
35
35
  export type { GraderCriterionInput, GraderGradingMode, GraderFeedbackMode, GraderSubTab, } from './grader-tab-helpers';
36
36
  export { billingPlanSection, billingCreditsSection, billingAutoRechargeSection, getBillingPlanLabel, getBillingAutoRechargeStatus, waitForBillingTabReady, expectBillingPlanSection, expectBillingCreditsSection, expectBillingAutoRechargeSection, expectBillingTabForFreePlan, expectBillingTabForTrialPlan, expectBillingTabForPremiumPlan, expectBillingTabForCurrentPlan, clickBillingUpgrade, clickBillingAddCredits, clickBillingManageBilling, clickBillingManageUsage, } from './billing-tab-helpers';
37
37
  export type { BillingAutoRechargeStatus } from './billing-tab-helpers';
38
+ export { SPEND_LIMITS_LABELS, spendLimitsTabBody, userSpendLimitRow, isSpendLimitsTabVisible, switchToSpendLimitsTab, switchToSpendLimitsSubTab, setAgentSpendLimit, deleteAgentSpendLimit, addUserSpendLimit, editUserSpendLimit, setUserSpendLimitEnabled, deleteUserSpendLimit, workspaceSpendLimitSection, switchToWorkspaceSpendLimits, switchToPlanAndCredits, setWorkspaceSpendLimit, deleteWorkspaceSpendLimit, expectWorkspaceSpendStats, expectWorkspaceActualSpendStats, agentLimitsSection, agentLimitsRow, switchToAgentLimits, filterAgentLimits, clearAgentLimitsFilter, openAgentLimitsManage, clickSetSpendLimitForFilteredAgent, closeAgentLimitsPopup, setAgentLimitsRowEnabled, expectAgentLimitsRowContent, createAgentSpendLimitViaFilter, setAgentSpendLimitFromTenantBilling, deleteAgentSpendLimitFromTenantBilling, addUserSpendLimitFromTenantBilling, } from './spend-limits-helpers';
39
+ export type { SpendLimitSubTab, SpendLimitInterval, SpendLimitEnforcement, SpendLimitInput, UserSpendLimitInput, } from './spend-limits-helpers';
38
40
  export { TASKS_LABELS, isTasksTabVisible, switchToTasksTab, getScheduleTaskButton, getSearchInput, getTaskRow, expectTotalTasks, expectCompletedTasks, expectFailedTasks, expectTasksEmpty, expectTaskInList, expectTaskNotInList, selectTaskInList, expectTaskStatus, searchTasks, openScheduleTaskDialog, scheduleTask, expectScheduleStartTimeInPastError, deleteTask, expectLogsForTask, expectNoLogsForSelectedTask, openFirstLogDetails, expectLogDetailsStatus, } from './tasks-tab-helpers';
39
41
  export type { TaskRepeat, TaskStatus } from './tasks-tab-helpers';
40
42
  export * from './evaluation-tab-helpers';
@@ -0,0 +1,275 @@
1
+ import { Locator, Page } from '@playwright/test';
2
+ /**
3
+ * Spend limits ("Billing") helpers — Playwright bindings for the LLM
4
+ * spend-cap admin UI from `@iblai/web-containers`:
5
+ *
6
+ * - the **agent settings Billing tab** (`AgentSpendCapsTab`) with its
7
+ * "This Agent" / "Per User" sub-tabs, the per-user table with a
8
+ * three-dots row menu, and the add/edit user-limit modal (email-based
9
+ * user picker), and
10
+ * - the **tenant settings Billing tab** with its "Plan & Credits" /
11
+ * "Spend Limits" tabs and the workspace-wide limit section
12
+ * (`SpendLimitsSection` inside `BillingTab`).
13
+ *
14
+ * Selector policy (flakiness-proof by construction):
15
+ * - Dialog-first scoping: every modal is resolved into a Locator variable
16
+ * first (`user-cap-modal`, the delete dialogs, the edit-agent dialog, the
17
+ * Agent Limits manage popup) and all sub-elements are queried from that
18
+ * variable — never a bare page-wide match that could hit same-named
19
+ * elements in nested portals.
20
+ * - Nested dialogs: the tenant Agent Limits tab opens the agent Billing
21
+ * editor in a popup *on top of* the tenant settings dialog, so several
22
+ * dialogs with tablists can be open at once. Every agent-scope helper
23
+ * accepts an optional `scope` Locator (the host dialog) for that case;
24
+ * `openAgentLimitsManage` returns the popup Locator to pass as `scope`.
25
+ * - Stable hooks only: `data-testid`, role + accessible name (aria-labels).
26
+ * No CSS class or structural selectors.
27
+ * - No `waitForTimeout` / `networkidle`. Progress is gated on UI state that
28
+ * only exists after the awaited transition: a section testid rendering, a
29
+ * modal closing after its mutation resolves, a table row
30
+ * appearing/disappearing after the list refetch, a success toast.
31
+ */
32
+ export declare const SPEND_LIMITS_LABELS: {
33
+ /** Agent-settings modal tab name (host registries label it "Billing"). */
34
+ readonly tabName: "Billing";
35
+ readonly subTabs: {
36
+ readonly agent: "This Agent";
37
+ readonly users: "Per User";
38
+ };
39
+ readonly tenantTabs: {
40
+ readonly planAndCredits: "Plan & Credits";
41
+ readonly spendLimits: "Spend Limits";
42
+ readonly agentLimits: "Agent Limits";
43
+ };
44
+ /** aria-label of the tenant Billing tab's tablist. */
45
+ readonly tenantTablistAria: "Billing sections";
46
+ readonly addUserLimitButton: "Add User Limit";
47
+ readonly menu: {
48
+ /**
49
+ * aria-label template for a table row's three-dots trigger. Takes the
50
+ * DISPLAYED name — the user's email when the API provides one, username
51
+ * only as fallback. Helpers locate the trigger by its username-keyed
52
+ * testid instead (`user-cap-actions-<username>`), which is immune to
53
+ * that distinction; prefer the testid in new code.
54
+ */
55
+ readonly actionsAria: (displayName: string) => string;
56
+ readonly edit: "Edit";
57
+ readonly delete: "Delete";
58
+ };
59
+ readonly toasts: {
60
+ readonly saved: "Spend limit saved";
61
+ readonly deleted: "Spend limit deleted";
62
+ };
63
+ readonly intervalOptions: {
64
+ readonly day: "Day";
65
+ readonly week: "Week";
66
+ readonly month: "Month";
67
+ readonly year: "Year";
68
+ };
69
+ readonly enforcementOptions: {
70
+ readonly block: "Block Requests";
71
+ readonly alert_only: "Alert Only";
72
+ };
73
+ };
74
+ export type SpendLimitSubTab = keyof typeof SPEND_LIMITS_LABELS.subTabs;
75
+ export type SpendLimitInterval = keyof typeof SPEND_LIMITS_LABELS.intervalOptions;
76
+ export type SpendLimitEnforcement = keyof typeof SPEND_LIMITS_LABELS.enforcementOptions;
77
+ export interface SpendLimitInput {
78
+ /** Limit in USD, e.g. 250 or '250.00'. */
79
+ limitUsd?: number | string;
80
+ interval?: SpendLimitInterval;
81
+ enforcement?: SpendLimitEnforcement;
82
+ /** Comma-separated percentages, e.g. '80, 95'. Empty string clears them. */
83
+ alertThresholds?: string;
84
+ enabled?: boolean;
85
+ }
86
+ export interface UserSpendLimitInput extends SpendLimitInput {
87
+ /** Email typed into the picker and clicked in the results (email-only UI). */
88
+ email: string;
89
+ /** Username the backend keys the cap by — used for the table-row gate. */
90
+ username: string;
91
+ }
92
+ /**
93
+ * The agent Billing tab's body. `scope` is the dialog hosting the editor
94
+ * (e.g. the Locator returned by `openAgentLimitsManage`); defaults to the
95
+ * topmost settings dialog.
96
+ */
97
+ export declare function spendLimitsTabBody(page: Page, scope?: Locator): Locator;
98
+ /** A per-user table row for the given username. */
99
+ export declare function userSpendLimitRow(page: Page, username: string, scope?: Locator): Locator;
100
+ /**
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
+ */
104
+ export declare function isSpendLimitsTabVisible(page: Page): Promise<boolean>;
105
+ /**
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.
108
+ */
109
+ export declare function switchToSpendLimitsTab(page: Page): Promise<void>;
110
+ /**
111
+ * Switch between the Billing tab's two sub-tabs. Completion is gated on the
112
+ * sub-tab's content rendering: the agent limit form (or its loading/denied
113
+ * states) for "agent", the per-user section (or its spinner) for "users".
114
+ * `scope` is the dialog hosting the editor (see `spendLimitsTabBody`).
115
+ */
116
+ export declare function switchToSpendLimitsSubTab(page: Page, subTab: SpendLimitSubTab, scope?: Locator): Promise<void>;
117
+ /**
118
+ * Create or update the agent-scoped spend limit (switches to the "This
119
+ * agent" sub-tab first). Completion is gated on the saved toast and the
120
+ * usage strip rendering (it only exists once a cap is persisted).
121
+ */
122
+ export declare function setAgentSpendLimit(page: Page, values: SpendLimitInput, scope?: Locator): Promise<void>;
123
+ /**
124
+ * Delete the agent-scoped spend limit via the form's Delete button →
125
+ * confirmation dialog. Completion is gated on the dialog closing, the
126
+ * deleted toast, and the form returning to create mode (no-cap hint).
127
+ */
128
+ export declare function deleteAgentSpendLimit(page: Page, scope?: Locator): Promise<void>;
129
+ /**
130
+ * Add a per-user spend limit through the modal (switches to the "Per User"
131
+ * sub-tab first): opens the modal, searches the user by email, clicks the
132
+ * email in the results (the picker is email-only by design), fills the
133
+ * form, saves. Completion is gated on the modal closing and the user's
134
+ * table row rendering after the list refetch.
135
+ */
136
+ export declare function addUserSpendLimit(page: Page, values: UserSpendLimitInput, scope?: Locator): Promise<void>;
137
+ /**
138
+ * Edit an existing per-user limit via its row's three-dots menu → Edit
139
+ * modal. Completion is gated on the modal closing after the upsert.
140
+ */
141
+ export declare function editUserSpendLimit(page: Page, username: string, values: SpendLimitInput, scope?: Locator): Promise<void>;
142
+ /**
143
+ * Idempotently flip a per-user limit's Status toggle (the switch in the
144
+ * table's Status column — datasets-table pattern, saves immediately).
145
+ * Completion is gated on the saved toast and the switch reflecting the new
146
+ * state after the row refetch.
147
+ */
148
+ export declare function setUserSpendLimitEnabled(page: Page, username: string, enabled: boolean, scope?: Locator): Promise<void>;
149
+ /**
150
+ * Delete a per-user limit via its row's three-dots menu → confirmation
151
+ * dialog. Completion is gated on the dialog closing, the deleted toast and
152
+ * the row disappearing after the list refetch.
153
+ */
154
+ export declare function deleteUserSpendLimit(page: Page, username: string, scope?: Locator): Promise<void>;
155
+ /** The workspace spend limit section card in the tenant Billing tab. */
156
+ export declare function workspaceSpendLimitSection(page: Page): Locator;
157
+ /**
158
+ * Switch the tenant Billing tab to "Spend Limits". Assumes the tenant
159
+ * settings Billing tab is already open (see `waitForBillingTabReady`).
160
+ * Completion is gated on the workspace section rendering.
161
+ */
162
+ export declare function switchToWorkspaceSpendLimits(page: Page): Promise<void>;
163
+ /**
164
+ * Switch the tenant Billing tab back to "Plan & Credits". Completion is
165
+ * gated on the Plan section rendering.
166
+ */
167
+ export declare function switchToPlanAndCredits(page: Page): Promise<void>;
168
+ /**
169
+ * Create or update the workspace-wide spend limit (switches to the Spend
170
+ * Limits tab first). Completion is gated on the saved toast and the
171
+ * usage strip rendering (it only exists once a cap is persisted).
172
+ */
173
+ export declare function setWorkspaceSpendLimit(page: Page, values: SpendLimitInput): Promise<void>;
174
+ /**
175
+ * Delete the workspace-wide spend limit. Completion is gated on the dialog
176
+ * closing, the deleted toast, and the usage strip disappearing.
177
+ */
178
+ export declare function deleteWorkspaceSpendLimit(page: Page): Promise<void>;
179
+ /**
180
+ * Assert the workspace usage strip (the same one the agent editor shows) is
181
+ * visible, optionally matching formatted dollar values like '$30.50' inside
182
+ * its "Spent: …" / "Remaining: …" texts.
183
+ */
184
+ export declare function expectWorkspaceSpendStats(page: Page, values?: {
185
+ spent?: string;
186
+ remaining?: string;
187
+ }): Promise<void>;
188
+ /**
189
+ * Assert the "actual spend" stats (financial analytics) shown while no
190
+ * workspace cap is configured yet.
191
+ */
192
+ export declare function expectWorkspaceActualSpendStats(page: Page): Promise<void>;
193
+ /** The Agent Limits section card in the tenant Billing tab. */
194
+ export declare function agentLimitsSection(page: Page): Locator;
195
+ /** An Agent Limits table row for the given agent unique_id. */
196
+ export declare function agentLimitsRow(page: Page, mentorUniqueId: string): Locator;
197
+ /**
198
+ * Switch the tenant Billing tab to "Agent Limits". Assumes the tenant
199
+ * Billing tab is already open. Completion is gated on the section rendering.
200
+ */
201
+ export declare function switchToAgentLimits(page: Page): Promise<void>;
202
+ /**
203
+ * Filter the Agent Limits table to one agent via the autocomplete: types the
204
+ * name, clicks the matching option, and gates on the selected chip.
205
+ */
206
+ export declare function filterAgentLimits(page: Page, agentName: string): Promise<void>;
207
+ /** Clear the Agent Limits autocomplete filter (back to the full caps list). */
208
+ export declare function clearAgentLimitsFilter(page: Page): Promise<void>;
209
+ /**
210
+ * Open the manage popup for a capped agent's row and return the popup's
211
+ * Locator. The popup hosts the same `AgentSpendCapsTab` editor as the
212
+ * agent's own settings and stacks ON TOP of the tenant settings dialog, so
213
+ * pass the returned Locator as the `scope` argument of the agent-scope
214
+ * helpers (`setAgentSpendLimit`, `addUserSpendLimit`, …) — that pins every
215
+ * query to the popup instead of the dialog underneath.
216
+ */
217
+ export declare function openAgentLimitsManage(page: Page, mentorUniqueId: string): Promise<Locator>;
218
+ /**
219
+ * With the filter set to an agent that has no cap yet, click the empty
220
+ * state's "Set Spend Limit" button and return the opened popup's Locator
221
+ * (pass it as `scope` to the agent-scope helpers, see
222
+ * `openAgentLimitsManage`).
223
+ */
224
+ export declare function clickSetSpendLimitForFilteredAgent(page: Page): Promise<Locator>;
225
+ /** Close the Agent Limits manage popup (Escape) and gate on it disappearing. */
226
+ export declare function closeAgentLimitsPopup(page: Page): Promise<void>;
227
+ /**
228
+ * Idempotently flip an agent cap's Status toggle in the Agent Limits table
229
+ * (saves immediately). Gates on the saved toast and the switch reflecting
230
+ * the new state after the list refetch.
231
+ */
232
+ export declare function setAgentLimitsRowEnabled(page: Page, mentorUniqueId: string, enabled: boolean): Promise<void>;
233
+ /**
234
+ * Assert an Agent Limits row is visible, optionally checking its formatted
235
+ * cell contents, e.g. `{ name: 'Math Tutor', limit: '$250.00', spent: '$30.50' }`.
236
+ * Text matching is substring-based so a limit can be checked with or without
237
+ * its "/ Month" interval suffix.
238
+ */
239
+ export declare function expectAgentLimitsRowContent(page: Page, mentorUniqueId: string, texts?: {
240
+ name?: string;
241
+ limit?: string;
242
+ spent?: string;
243
+ remaining?: string;
244
+ }): Promise<void>;
245
+ /**
246
+ * End to end from the tenant Agent Limits tab, for an agent with NO cap yet:
247
+ * filter to the agent by name, open the popup from the empty state's "Set
248
+ * Spend Limit" button, save the agent-scoped limit inside the popup, close
249
+ * it, and gate on the agent's row rendering after the list refetch.
250
+ */
251
+ export declare function createAgentSpendLimitViaFilter(page: Page, agent: {
252
+ name: string;
253
+ mentorUniqueId: string;
254
+ }, values: SpendLimitInput): Promise<void>;
255
+ /**
256
+ * End to end from the tenant Agent Limits tab: open a capped agent's manage
257
+ * popup, save the agent-scoped limit inside it, close the popup, and gate on
258
+ * the row still rendering after the list refetch.
259
+ */
260
+ export declare function setAgentSpendLimitFromTenantBilling(page: Page, mentorUniqueId: string, values: SpendLimitInput): Promise<void>;
261
+ /**
262
+ * End to end from the tenant Agent Limits tab: open the agent's manage popup
263
+ * and delete its agent-scoped limit through the confirmation dialog. Closing
264
+ * the popup afterwards gates on the agent's row disappearing from the table
265
+ * (the tenant-wide list only holds configured caps).
266
+ */
267
+ export declare function deleteAgentSpendLimitFromTenantBilling(page: Page, mentorUniqueId: string): Promise<void>;
268
+ /**
269
+ * End to end per-user limit from the tenant Agent Limits tab: open the
270
+ * agent's manage popup, add the user limit through its "Per User" sub-tab
271
+ * (nested user-cap modal inside the popup), then close the popup. Completion
272
+ * is gated inside `addUserSpendLimit` on the modal closing and the user's
273
+ * row rendering in the popup's table.
274
+ */
275
+ export declare function addUserSpendLimitFromTenantBilling(page: Page, mentorUniqueId: string, values: UserSpendLimitInput): Promise<void>;