@iblai/iblai-js 2.3.10 → 2.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data-layer/playwright/agent-skills-helpers.d.ts +166 -0
- package/dist/data-layer/playwright/claw-sandbox-helpers.d.ts +0 -80
- package/dist/data-layer/playwright/index.d.ts +4 -2
- package/dist/playwright/index.cjs +413 -150
- package/dist/playwright/index.cjs.map +1 -1
- package/dist/playwright/index.d.ts +127 -41
- package/dist/playwright/index.esm.js +400 -151
- package/dist/playwright/index.esm.js.map +1 -1
- package/dist/playwright/playwright/agent-skills-helpers.d.ts +166 -0
- package/dist/playwright/playwright/claw-sandbox-helpers.d.ts +0 -80
- package/dist/playwright/playwright/index.d.ts +4 -2
- package/dist/security/playwright/agent-skills-helpers.d.ts +166 -0
- package/dist/security/playwright/claw-sandbox-helpers.d.ts +0 -80
- package/dist/security/playwright/index.d.ts +4 -2
- package/dist/web-containers/playwright/agent-skills-helpers.d.ts +166 -0
- package/dist/web-containers/playwright/claw-sandbox-helpers.d.ts +0 -80
- package/dist/web-containers/playwright/index.d.ts +4 -2
- package/dist/web-containers/source/index.esm.js +216 -96
- package/dist/web-containers/source/next/index.esm.js +223 -99
- package/dist/web-utils/playwright/agent-skills-helpers.d.ts +166 -0
- package/dist/web-utils/playwright/claw-sandbox-helpers.d.ts +0 -80
- package/dist/web-utils/playwright/index.d.ts +4 -2
- package/package.json +5 -5
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { Locator, Page } from '@playwright/test';
|
|
2
|
+
/**
|
|
3
|
+
* Switch to the Skills tab inside the edit-agent dialog and wait for the
|
|
4
|
+
* skills section to render.
|
|
5
|
+
*/
|
|
6
|
+
export declare function switchToSkillsTab(page: Page): Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* Verify the Skills section is loaded: the section container and its
|
|
9
|
+
* "Agent Skills" / "Available Skills" sub-tabs are visible.
|
|
10
|
+
*/
|
|
11
|
+
export declare function verifySkillsTabVisible(page: Page): Promise<void>;
|
|
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.
|
|
15
|
+
*/
|
|
16
|
+
export declare function switchToAgentSkillsSubTab(page: Page): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Switch to the "Available Skills" sub-tab (the platform catalog, paged
|
|
19
|
+
* server-side 10 per page) and wait for its panel to render past the
|
|
20
|
+
* loading spinner.
|
|
21
|
+
*/
|
|
22
|
+
export declare function switchToAvailableSkillsSubTab(page: Page): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Go to a page of the currently visible skills list via the numbered
|
|
25
|
+
* IblPagination buttons (the pagination renders nothing on a single page).
|
|
26
|
+
*/
|
|
27
|
+
export declare function goToSkillsListPage(page: Page, pageNumber: number): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Verify the "Available Skills" empty state ("No skills available for this
|
|
30
|
+
* platform…") is shown.
|
|
31
|
+
*/
|
|
32
|
+
export declare function verifySkillsEmptyState(page: Page): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Verify the "Agent Skills" empty state ("No skills enabled for this agent
|
|
35
|
+
* yet…") is shown.
|
|
36
|
+
*/
|
|
37
|
+
export declare function verifyAgentSkillsEmptyState(page: Page): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Count the skill rows on the "Agent Skills" sub-tab (max 10 per page).
|
|
40
|
+
*/
|
|
41
|
+
export declare function getSkillRowCount(page: Page): Promise<number>;
|
|
42
|
+
/**
|
|
43
|
+
* Verify that a specific skill row is visible on the "Agent Skills" sub-tab.
|
|
44
|
+
*/
|
|
45
|
+
export declare function verifySkillVisible(page: Page, skillName: string): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Attach a platform skill to the agent from the "Available Skills" sub-tab.
|
|
48
|
+
* Waits for the toast and for the row to flip to its "Added" chip.
|
|
49
|
+
*/
|
|
50
|
+
export declare function addSkillToAgent(page: Page, skillName: string): Promise<void>;
|
|
51
|
+
/**
|
|
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.
|
|
54
|
+
*/
|
|
55
|
+
export declare function verifySkillAdded(page: Page, skillName: string): Promise<void>;
|
|
56
|
+
/**
|
|
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.
|
|
59
|
+
*/
|
|
60
|
+
export declare function openSkillActionsMenu(page: Page, skillName: string): Promise<Locator>;
|
|
61
|
+
/**
|
|
62
|
+
* Detach a skill from the agent via its row menu ("Remove from Agent") on the
|
|
63
|
+
* "Agent Skills" sub-tab. Waits for the toast and for the row to disappear.
|
|
64
|
+
*/
|
|
65
|
+
export declare function removeSkillFromAgent(page: Page, skillName: string): Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Check if a specific skill is currently enabled (its row Switch state) on
|
|
68
|
+
* the "Agent Skills" sub-tab.
|
|
69
|
+
*/
|
|
70
|
+
export declare function isSkillEnabled(page: Page, skillName: string): Promise<boolean>;
|
|
71
|
+
/**
|
|
72
|
+
* Enable an attached skill by flipping its Switch on (PATCHes the assignment;
|
|
73
|
+
* attaching itself is `addSkillToAgent`). No-op if already enabled.
|
|
74
|
+
*/
|
|
75
|
+
export declare function enableSkill(page: Page, skillName: string): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Disable an attached skill by flipping its Switch off, without detaching it
|
|
78
|
+
* (detaching is `removeSkillFromAgent`). No-op if already disabled.
|
|
79
|
+
*/
|
|
80
|
+
export declare function disableSkill(page: Page, skillName: string): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* Toggle a skill's enabled state (flips whatever the current state is).
|
|
83
|
+
* Returns the new checked state.
|
|
84
|
+
*/
|
|
85
|
+
export declare function toggleSkill(page: Page, skillName: string): Promise<boolean>;
|
|
86
|
+
export interface SkillFormValues {
|
|
87
|
+
name: string;
|
|
88
|
+
slug: string;
|
|
89
|
+
description?: string;
|
|
90
|
+
version?: string;
|
|
91
|
+
category?: string;
|
|
92
|
+
instruction?: string;
|
|
93
|
+
/** Toggle "Only This Agent" (mentor-private skill). */
|
|
94
|
+
onlyThisAgent?: boolean;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Open the "New Skill" dialog from the Skills section. Returns the dialog
|
|
98
|
+
* locator — resolve every field from it (the dialog stacks over the
|
|
99
|
+
* edit-agent dialog, so page-level field queries would be ambiguous).
|
|
100
|
+
*/
|
|
101
|
+
export declare function openNewSkillDialog(page: Page): Promise<Locator>;
|
|
102
|
+
/**
|
|
103
|
+
* Create a new platform-level skill via the Skills section.
|
|
104
|
+
*/
|
|
105
|
+
export declare function createSkill(page: Page, values: SkillFormValues): Promise<void>;
|
|
106
|
+
/**
|
|
107
|
+
* Open the Edit Skill dialog for a row (lands on the General sub-tab).
|
|
108
|
+
* Returns the dialog locator — resolve fields and sub-tabs from it.
|
|
109
|
+
*/
|
|
110
|
+
export declare function openEditSkillDialog(page: Page, skillName: string): Promise<Locator>;
|
|
111
|
+
/**
|
|
112
|
+
* Edit an existing platform-level skill (General sub-tab fields).
|
|
113
|
+
*/
|
|
114
|
+
export declare function editSkill(page: Page, skillName: string, updates: Partial<SkillFormValues>): Promise<void>;
|
|
115
|
+
/**
|
|
116
|
+
* Delete a platform-level skill via its row menu, confirming the
|
|
117
|
+
* "Delete Skill" dialog.
|
|
118
|
+
*/
|
|
119
|
+
export declare function deleteSkill(page: Page, skillName: string): Promise<void>;
|
|
120
|
+
/**
|
|
121
|
+
* Open the delete confirmation for a skill and cancel it (no deletion).
|
|
122
|
+
*/
|
|
123
|
+
export declare function cancelDeleteSkill(page: Page, skillName: string): Promise<void>;
|
|
124
|
+
/**
|
|
125
|
+
* Switch the open Edit Skill dialog to its Resources sub-tab. Pass the
|
|
126
|
+
* dialog returned by `openEditSkillDialog`; returns the resources section
|
|
127
|
+
* locator to scope row lookups.
|
|
128
|
+
*/
|
|
129
|
+
export declare function switchToSkillResourcesSubTab(editSkillDialog: Locator): Promise<Locator>;
|
|
130
|
+
export interface TextResourceValues {
|
|
131
|
+
filename: string;
|
|
132
|
+
content: string;
|
|
133
|
+
/** "Reference" (default) or "Script". */
|
|
134
|
+
type?: 'Reference' | 'Script';
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Add a text resource (reference/script) via the "New Resource" dialog.
|
|
138
|
+
* The type Select's listbox portals inside the dialog panel, so options are
|
|
139
|
+
* resolved from the dialog too.
|
|
140
|
+
*/
|
|
141
|
+
export declare function addTextResource(page: Page, resourcesSection: Locator, { filename, content, type }: TextResourceValues): Promise<void>;
|
|
142
|
+
/**
|
|
143
|
+
* Upload a binary asset resource via the "New Resource" dialog. `filePath`
|
|
144
|
+
* is passed to Playwright's setInputFiles (absolute or test-relative).
|
|
145
|
+
*/
|
|
146
|
+
export declare function uploadAssetResource(page: Page, resourcesSection: Locator, filePath: string): Promise<void>;
|
|
147
|
+
/**
|
|
148
|
+
* Edit a text resource in place via its row menu ("Edit Resource" dialog).
|
|
149
|
+
*/
|
|
150
|
+
export declare function editTextResource(page: Page, resourcesSection: Locator, filename: string, updates: Partial<Pick<TextResourceValues, 'filename' | 'content'>>): Promise<void>;
|
|
151
|
+
/**
|
|
152
|
+
* Delete a resource row via its menu, confirming the "Delete Resource"
|
|
153
|
+
* dialog. Waits for the toast and for the row to disappear.
|
|
154
|
+
*/
|
|
155
|
+
export declare function deleteResource(page: Page, resourcesSection: Locator, filename: string): Promise<void>;
|
|
156
|
+
/**
|
|
157
|
+
* Type a `/` query into the chat composer and wait for the skill picker
|
|
158
|
+
* listbox to open (its lazy fetch may show a loading row first on cold
|
|
159
|
+
* cache — waiting on the listbox element covers both paths).
|
|
160
|
+
*/
|
|
161
|
+
export declare function openSlashSkillPicker(page: Page, query?: string): Promise<void>;
|
|
162
|
+
/**
|
|
163
|
+
* Pick a skill from the open `/` picker by its visible name. The picker
|
|
164
|
+
* closes and the composer is left holding the inserted `/slug ` invocation.
|
|
165
|
+
*/
|
|
166
|
+
export declare function selectSlashSkill(page: Page, skillName: string): Promise<void>;
|
|
@@ -9,10 +9,6 @@ export declare function isSandboxTabVisible(page: Page): Promise<boolean>;
|
|
|
9
9
|
* Assumes the modal is already open and the user has permission to see the tab.
|
|
10
10
|
*/
|
|
11
11
|
export declare function switchToSandboxTab(page: Page): Promise<void>;
|
|
12
|
-
/**
|
|
13
|
-
* Switch to the Skills tab inside the edit-mentor modal.
|
|
14
|
-
*/
|
|
15
|
-
export declare function switchToSkillsTab(page: Page): Promise<void>;
|
|
16
12
|
/**
|
|
17
13
|
* Verify the instance table is visible with all expected column headers.
|
|
18
14
|
* Should be called when the mentor has no connected sandbox instance.
|
|
@@ -172,82 +168,6 @@ export declare function openAgentPromptEditModal(page: Page, field: AgentPromptF
|
|
|
172
168
|
* Edit an agent prompt field (opens the modal, types content, saves).
|
|
173
169
|
*/
|
|
174
170
|
export declare function editAgentPrompt(page: Page, field: AgentPromptField, content: string): Promise<void>;
|
|
175
|
-
/**
|
|
176
|
-
* Verify the Skills tab content is loaded (either showing skill rows or the empty state).
|
|
177
|
-
*/
|
|
178
|
-
export declare function verifySkillsTabVisible(page: Page): Promise<void>;
|
|
179
|
-
/**
|
|
180
|
-
* Verify that the "No skills available" empty state is shown.
|
|
181
|
-
*/
|
|
182
|
-
export declare function verifySkillsEmptyState(page: Page): Promise<void>;
|
|
183
|
-
/**
|
|
184
|
-
* Count the number of skill rows rendered in the Skills tab.
|
|
185
|
-
* Each row represents an available (enabled) platform skill.
|
|
186
|
-
*/
|
|
187
|
-
export declare function getSkillRowCount(page: Page): Promise<number>;
|
|
188
|
-
/**
|
|
189
|
-
* Verify that a specific skill row is visible in the Skills tab.
|
|
190
|
-
*/
|
|
191
|
-
export declare function verifySkillVisible(page: Page, skillName: string): Promise<void>;
|
|
192
|
-
/**
|
|
193
|
-
* Check if a specific skill is currently enabled for the mentor.
|
|
194
|
-
*/
|
|
195
|
-
export declare function isSkillEnabled(page: Page, skillName: string): Promise<boolean>;
|
|
196
|
-
/**
|
|
197
|
-
* Enable a skill for the current mentor by toggling it on.
|
|
198
|
-
* No-op if already enabled. Waits for the success toast.
|
|
199
|
-
*/
|
|
200
|
-
export declare function enableSkill(page: Page, skillName: string): Promise<void>;
|
|
201
|
-
/**
|
|
202
|
-
* Disable a skill for the current mentor by toggling it off.
|
|
203
|
-
* No-op if already disabled. Waits for the success toast.
|
|
204
|
-
*/
|
|
205
|
-
export declare function disableSkill(page: Page, skillName: string): Promise<void>;
|
|
206
|
-
/**
|
|
207
|
-
* Toggle a skill's enabled state (flips whatever the current state is).
|
|
208
|
-
* Returns the new checked state.
|
|
209
|
-
*/
|
|
210
|
-
export declare function toggleSkill(page: Page, skillName: string): Promise<boolean>;
|
|
211
|
-
export interface SkillFormValues {
|
|
212
|
-
name: string;
|
|
213
|
-
slug: string;
|
|
214
|
-
description?: string;
|
|
215
|
-
version?: string;
|
|
216
|
-
instruction?: string;
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Open the "New Skill" dialog by clicking the New Skill button in the Skills tab.
|
|
220
|
-
* Returns the dialog locator.
|
|
221
|
-
*/
|
|
222
|
-
export declare function openNewSkillDialog(page: Page): Promise<Locator>;
|
|
223
|
-
/**
|
|
224
|
-
* Create a new platform-level skill via the Skills tab.
|
|
225
|
-
*/
|
|
226
|
-
export declare function createSkill(page: Page, values: SkillFormValues): Promise<void>;
|
|
227
|
-
/**
|
|
228
|
-
* Open the Actions dropdown for a specific skill row.
|
|
229
|
-
* Returns the dropdown menu locator.
|
|
230
|
-
*/
|
|
231
|
-
export declare function openSkillActionsMenu(page: Page, skillName: string): Promise<Locator>;
|
|
232
|
-
/**
|
|
233
|
-
* Open the Edit Skill dialog from the actions menu.
|
|
234
|
-
* Returns the dialog locator.
|
|
235
|
-
*/
|
|
236
|
-
export declare function openEditSkillDialog(page: Page, skillName: string): Promise<Locator>;
|
|
237
|
-
/**
|
|
238
|
-
* Edit an existing platform-level skill.
|
|
239
|
-
* @param skillName - The current name of the skill to edit
|
|
240
|
-
* @param updates - Fields to update on the skill
|
|
241
|
-
*/
|
|
242
|
-
export declare function editSkill(page: Page, skillName: string, updates: Partial<SkillFormValues>): Promise<void>;
|
|
243
|
-
/**
|
|
244
|
-
* Delete a platform-level skill, confirming the deletion dialog.
|
|
245
|
-
*/
|
|
246
|
-
export declare function deleteSkill(page: Page, skillName: string): Promise<void>;
|
|
247
|
-
/**
|
|
248
|
-
* Open the delete confirmation for a skill and cancel it (no deletion).
|
|
249
|
-
*/
|
|
250
|
-
export declare function cancelDeleteSkill(page: Page, skillName: string): Promise<void>;
|
|
251
171
|
/**
|
|
252
172
|
* Full workflow: open Sandbox tab, create a new instance, connect the mentor to it.
|
|
253
173
|
* Returns when the mentor is successfully connected.
|
|
@@ -16,8 +16,10 @@ export type { EnvConfig, AuthFlowType } from './env-config';
|
|
|
16
16
|
export { buildReportUrl, parseReportUrlParams, navigateToReportDownload, verifyPreparingPhase, verifyDownloadingPhase, verifyDonePhase, verifyErrorPhase, clickBackHome, clickDownloadAgain, clickManualDownloadLink, waitForReportDownload, } from './report-download';
|
|
17
17
|
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
|
-
export { isSandboxTabVisible, switchToSandboxTab,
|
|
20
|
-
export type { AgentPromptField
|
|
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
|
+
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';
|
|
22
|
+
export type { SkillFormValues, TextResourceValues } from './agent-skills-helpers';
|
|
21
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';
|
|
22
24
|
export { getCurrentTenantShowPaywall, creditBalanceTrigger, creditBalancePanel, creditBalancePlanBadge, expectCreditBalanceVisibilityForTenant, openCreditBalanceDropdown, waitForCreditBalanceLoaded, closeCreditBalanceDropdown, getCreditBalancePlanLabel, getCreditBalanceRemaining, expectCreditBalancePanelForFreePlan, expectCreditBalancePanelForTrialPlan, expectCreditBalancePanelForPremiumPlan, expectCreditBalanceForCurrentPlan, } from './credit-balance-helpers';
|
|
23
25
|
export type { CreditBalancePlan } from './credit-balance-helpers';
|