@iblai/mcp 1.1.0 → 1.1.4
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/README.md +95 -142
- package/dist/index.js +35 -9
- package/dist/index.js.map +1 -1
- package/dist/prompts/create-playwright-test.d.ts.map +1 -1
- package/dist/prompts/create-playwright-test.js +1 -5
- package/dist/prompts/create-playwright-test.js.map +1 -1
- package/dist/prompts/setup-new-app.d.ts.map +1 -1
- package/dist/prompts/setup-new-app.js.map +1 -1
- package/dist/resources/web-containers.d.ts.map +1 -1
- package/dist/resources/web-containers.js +60 -0
- package/dist/resources/web-containers.js.map +1 -1
- package/dist/resources/web-utils.d.ts.map +1 -1
- package/dist/resources/web-utils.js +37 -0
- package/dist/resources/web-utils.js.map +1 -1
- package/dist/tools/api-query-info.d.ts.map +1 -1
- package/dist/tools/api-query-info.js +0 -170
- package/dist/tools/api-query-info.js.map +1 -1
- package/dist/tools/component-info.d.ts.map +1 -1
- package/dist/tools/component-info.js +300 -5
- package/dist/tools/component-info.js.map +1 -1
- package/dist/tools/hook-info.d.ts.map +1 -1
- package/dist/tools/hook-info.js +132 -125
- package/dist/tools/hook-info.js.map +1 -1
- package/dist/tools/playwright-helper-info.d.ts.map +1 -1
- package/dist/tools/playwright-helper-info.js +157 -0
- package/dist/tools/playwright-helper-info.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,199 +1,152 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @iblai/mcp
|
|
2
2
|
|
|
3
|
-
An MCP (Model Context Protocol) server that provides comprehensive documentation
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
This MCP server helps AI assistants understand and work with:
|
|
8
|
-
|
|
9
|
-
- **@iblai/web-containers**: Shared React components built on Radix UI
|
|
10
|
-
- **@iblai/web-utils**: Authentication utilities, context providers, and hooks
|
|
11
|
-
- **@iblai/data-layer**: Redux store and RTK Query APIs
|
|
12
|
-
|
|
13
|
-
## Installation
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
cd packages/mcp-server
|
|
17
|
-
pnpm install
|
|
18
|
-
pnpm build
|
|
19
|
-
```
|
|
3
|
+
An MCP (Model Context Protocol) server that provides AI assistants with comprehensive documentation for the IBL frontend packages — components, hooks, API queries, provider setup patterns, and Playwright test helpers.
|
|
20
4
|
|
|
21
5
|
## Quick Start
|
|
22
6
|
|
|
23
|
-
|
|
24
|
-
# 1. Build the MCP server
|
|
25
|
-
cd packages/mcp-server
|
|
26
|
-
pnpm build
|
|
7
|
+
### With Claude Code
|
|
27
8
|
|
|
28
|
-
|
|
29
|
-
#
|
|
9
|
+
```bash
|
|
10
|
+
# No install needed — just add and go
|
|
11
|
+
claude mcp add --transport stdio iblai-js-mcp -- npx @iblai/mcp
|
|
30
12
|
```
|
|
31
13
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
## Configuration
|
|
35
|
-
|
|
36
|
-
The MCP server is pre-configured in `.claude/settings.json`:
|
|
14
|
+
Or share with your team by creating `.mcp.json` at your project root:
|
|
37
15
|
|
|
38
16
|
```json
|
|
39
17
|
{
|
|
40
18
|
"mcpServers": {
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"args": ["packages/mcp-server/dist/index.js"]
|
|
19
|
+
"iblai-js-mcp": {
|
|
20
|
+
"command": "npx",
|
|
21
|
+
"args": ["@iblai/mcp"]
|
|
45
22
|
}
|
|
46
23
|
}
|
|
47
24
|
}
|
|
48
25
|
```
|
|
49
26
|
|
|
50
|
-
|
|
27
|
+
> **pnpm projects:** If your project uses pnpm and has `@iblai/iblai-js` installed (which depends on `@iblai/mcp`), `npx` may find the transitive dependency locally but fail to link its binary. Use `pnpm dlx` instead:
|
|
28
|
+
>
|
|
29
|
+
> ```bash
|
|
30
|
+
> claude mcp add --transport stdio iblai-js-mcp -- pnpm dlx @iblai/mcp
|
|
31
|
+
> ```
|
|
32
|
+
>
|
|
33
|
+
> Or in `.mcp.json`:
|
|
34
|
+
>
|
|
35
|
+
> ```json
|
|
36
|
+
> {
|
|
37
|
+
> "mcpServers": {
|
|
38
|
+
> "iblai-js-mcp": {
|
|
39
|
+
> "command": "pnpm",
|
|
40
|
+
> "args": ["dlx", "@iblai/mcp"]
|
|
41
|
+
> }
|
|
42
|
+
> }
|
|
43
|
+
> }
|
|
44
|
+
> ```
|
|
45
|
+
|
|
46
|
+
### With Other MCP Clients
|
|
47
|
+
|
|
48
|
+
The server uses stdio transport and follows the [MCP specification](https://modelcontextprotocol.io):
|
|
51
49
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
├── src/
|
|
57
|
-
│ ├── index.ts # Main server entry point
|
|
58
|
-
│ ├── resources/ # Documentation resources
|
|
59
|
-
│ │ ├── index.ts # Resource exports
|
|
60
|
-
│ │ ├── packages-overview.ts
|
|
61
|
-
│ │ ├── web-containers.ts
|
|
62
|
-
│ │ ├── web-utils.ts
|
|
63
|
-
│ │ ├── data-layer.ts
|
|
64
|
-
│ │ ├── guides-layout.ts
|
|
65
|
-
│ │ ├── guides-rbac.ts
|
|
66
|
-
│ │ └── guides-theme.ts
|
|
67
|
-
│ └── tools/ # MCP tools
|
|
68
|
-
│ ├── index.ts # Tool exports
|
|
69
|
-
│ ├── component-info.ts
|
|
70
|
-
│ ├── hook-info.ts
|
|
71
|
-
│ ├── provider-setup.ts
|
|
72
|
-
│ ├── api-query-info.ts
|
|
73
|
-
│ └── page-template.ts
|
|
74
|
-
└── dist/ # Compiled output
|
|
50
|
+
```bash
|
|
51
|
+
npx @iblai/mcp
|
|
52
|
+
# or in pnpm projects:
|
|
53
|
+
pnpm dlx @iblai/mcp
|
|
75
54
|
```
|
|
76
55
|
|
|
77
|
-
##
|
|
56
|
+
## What It Provides
|
|
57
|
+
|
|
58
|
+
### Tools
|
|
78
59
|
|
|
79
|
-
|
|
60
|
+
| Tool | Description |
|
|
61
|
+
| --- | --- |
|
|
62
|
+
| `get_component_info` | Detailed props, usage examples, and category for any UI component |
|
|
63
|
+
| `get_hook_info` | Parameters, return types, and examples for React hooks |
|
|
64
|
+
| `get_api_query_info` | RTK Query endpoint details and usage patterns |
|
|
65
|
+
| `get_provider_setup` | Correct provider hierarchy for each app type (mentor, skills, auth) |
|
|
66
|
+
| `create_page_template` | Generate new pages following IBL patterns |
|
|
67
|
+
| `get_playwright_helper_info` | E2E test helper documentation |
|
|
68
|
+
|
|
69
|
+
### Resources
|
|
80
70
|
|
|
81
71
|
| Resource URI | Description |
|
|
82
|
-
|
|
72
|
+
| --- | --- |
|
|
83
73
|
| `ibl://packages/overview` | Overview of all IBL frontend packages |
|
|
84
74
|
| `ibl://packages/web-containers` | UI components documentation |
|
|
85
75
|
| `ibl://packages/web-utils` | Providers and hooks documentation |
|
|
86
76
|
| `ibl://packages/data-layer` | Redux and RTK Query documentation |
|
|
77
|
+
| `ibl://packages/playwright` | Playwright test utilities documentation |
|
|
87
78
|
| `ibl://guides/layout` | Layout rules and patterns |
|
|
88
79
|
| `ibl://guides/rbac` | RBAC (Role-Based Access Control) patterns |
|
|
89
80
|
| `ibl://guides/theme` | Theme configuration |
|
|
81
|
+
| `ibl://guides/playwright` | E2E testing setup guide |
|
|
90
82
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
### get_component_info
|
|
83
|
+
### Prompts
|
|
94
84
|
|
|
95
|
-
|
|
85
|
+
| Prompt | Description |
|
|
86
|
+
| --- | --- |
|
|
87
|
+
| `setup-new-app` | Step-by-step guide for setting up a new IBL app |
|
|
88
|
+
| `setup-e2e-testing` | Guide for setting up Playwright E2E tests |
|
|
89
|
+
| `create-playwright-test` | Template for writing a new Playwright test |
|
|
96
90
|
|
|
97
|
-
|
|
98
|
-
Component name: Button, Card, Dialog, Profile, NotificationDropdown, Input, Select, Tabs, etc.
|
|
99
|
-
```
|
|
91
|
+
## Packages Covered
|
|
100
92
|
|
|
101
|
-
|
|
93
|
+
- **@iblai/web-containers** — Shared React components (Radix UI primitives, feature components)
|
|
94
|
+
- **@iblai/web-utils** — Authentication, context providers, chat hooks, utilities
|
|
95
|
+
- **@iblai/data-layer** — Redux store, RTK Query API slices
|
|
96
|
+
- **@iblai/iblai-js/playwright** — Playwright test helpers, auth setup, config generation
|
|
102
97
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
Hook name: useAdvancedChat, useMentorSettings, useGetMentorsQuery, useTenantMetadata, etc.
|
|
107
|
-
```
|
|
98
|
+
## Alternative Installation
|
|
108
99
|
|
|
109
|
-
|
|
100
|
+
If you install `@iblai/iblai-js` globally, the MCP server is available as a binary:
|
|
110
101
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
App type: mentor, skills, auth, custom
|
|
115
|
-
Features: chat, analytics, notifications, rbac
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### get_api_query_info
|
|
119
|
-
|
|
120
|
-
Get information about an RTK Query API endpoint.
|
|
121
|
-
|
|
122
|
-
```
|
|
123
|
-
Query name: useGetMentorsQuery, useGetUserMetadataQuery, usePlatformUserGroupsQuery, etc.
|
|
102
|
+
```bash
|
|
103
|
+
npm install -g @iblai/iblai-js
|
|
104
|
+
claude mcp add --transport stdio iblai-js-mcp -- ibl-mcp-server
|
|
124
105
|
```
|
|
125
106
|
|
|
126
|
-
|
|
107
|
+
## Development (Monorepo Contributors)
|
|
127
108
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
```
|
|
131
|
-
Page name: Dashboard, Settings, etc.
|
|
132
|
-
Features: auth-required, rbac, analytics, sidebar, data-fetching
|
|
133
|
-
App type: mentor, skills
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
## Development
|
|
109
|
+
### Local Setup
|
|
137
110
|
|
|
138
111
|
```bash
|
|
139
|
-
|
|
140
|
-
pnpm
|
|
141
|
-
|
|
142
|
-
# Build
|
|
112
|
+
cd packages/mcp-server
|
|
113
|
+
pnpm install
|
|
143
114
|
pnpm build
|
|
144
|
-
|
|
145
|
-
# Run server directly
|
|
146
|
-
pnpm start
|
|
147
115
|
```
|
|
148
116
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
### Provider Hierarchy
|
|
117
|
+
The server is pre-configured in `.mcp.json` at the repo root to use the local build.
|
|
152
118
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
**Skills App:**
|
|
156
|
-
```
|
|
157
|
-
StoreProvider → AuthProvider → TenantProvider → ClientLayout
|
|
158
|
-
```
|
|
119
|
+
### Validating Documentation Coverage
|
|
159
120
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
StoreProvider → AuthProvider → TenantProvider → MentorProvider → AppProvider
|
|
121
|
+
```bash
|
|
122
|
+
pnpm --filter=@iblai/mcp run validate:exports
|
|
163
123
|
```
|
|
164
124
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
```typescript
|
|
168
|
-
// Data Layer
|
|
169
|
-
import { useGetMentorsQuery, mentorReducer } from '@iblai/data-layer';
|
|
125
|
+
This checks that MCP docs stay in sync with actual package exports. CI will fail on PRs that introduce drift. To allowlist intentionally undocumented exports, add them to `scripts/export-allowlist.json`.
|
|
170
126
|
|
|
171
|
-
|
|
172
|
-
import { Button, Card, Dialog } from '@iblai/web-containers';
|
|
127
|
+
### Project Structure
|
|
173
128
|
|
|
174
|
-
|
|
175
|
-
|
|
129
|
+
```
|
|
130
|
+
packages/mcp-server/
|
|
131
|
+
├── src/
|
|
132
|
+
│ ├── index.ts # Server entry point (McpServer API)
|
|
133
|
+
│ ├── resources/ # Documentation resources
|
|
134
|
+
│ ├── tools/ # MCP tools (component-info, hook-info, etc.)
|
|
135
|
+
│ └── prompts/ # MCP prompts (setup guides, templates)
|
|
136
|
+
├── scripts/
|
|
137
|
+
│ ├── validate-exports.ts # Export drift detection script
|
|
138
|
+
│ └── export-allowlist.json # Intentionally undocumented exports
|
|
139
|
+
└── dist/ # Compiled output
|
|
176
140
|
```
|
|
177
141
|
|
|
178
|
-
###
|
|
179
|
-
|
|
180
|
-
```typescript
|
|
181
|
-
import { WithPermissions } from '@/hoc/withPermissions';
|
|
142
|
+
### Adding Documentation
|
|
182
143
|
|
|
183
|
-
|
|
184
|
-
{({ hasPermission }) => hasPermission && <AnalyticsButton />}
|
|
185
|
-
</WithPermissions>
|
|
186
|
-
```
|
|
144
|
+
**New resource:** Create a file in `src/resources/`, export it from `src/resources/index.ts`, and register it in `src/index.ts`.
|
|
187
145
|
|
|
188
|
-
|
|
146
|
+
**New tool:** Create a file in `src/tools/`, export it from `src/tools/index.ts`, and register it in `src/index.ts`.
|
|
189
147
|
|
|
190
|
-
|
|
191
|
-
2. Export the resource object with `uri`, `name`, `description`, `mimeType`, and `content`
|
|
192
|
-
3. Import and add it to `src/resources/index.ts`
|
|
148
|
+
**New prompt:** Create a file in `src/prompts/`, export it from `src/prompts/index.ts`, and register it in `src/index.ts`.
|
|
193
149
|
|
|
194
|
-
##
|
|
150
|
+
## License
|
|
195
151
|
|
|
196
|
-
|
|
197
|
-
2. Export the tool definition and handler function
|
|
198
|
-
3. Import and add it to `src/tools/index.ts`
|
|
199
|
-
4. Add the case handler in `src/index.ts`
|
|
152
|
+
ISC
|
package/dist/index.js
CHANGED
|
@@ -38,13 +38,19 @@ for (const resource of Object.values(RESOURCES)) {
|
|
|
38
38
|
// ============================================================================
|
|
39
39
|
server.registerTool('get_component_info', {
|
|
40
40
|
description: 'Get detailed information about a specific UI component from web-containers',
|
|
41
|
-
inputSchema: {
|
|
41
|
+
inputSchema: {
|
|
42
|
+
componentName: z
|
|
43
|
+
.string()
|
|
44
|
+
.describe('Name of the component (e.g., Button, Card, Dialog, Profile, NotificationDropdown)'),
|
|
45
|
+
},
|
|
42
46
|
}, async ({ componentName }) => ({
|
|
43
47
|
content: [{ type: 'text', text: getComponentInfo(componentName) }],
|
|
44
48
|
}));
|
|
45
49
|
server.registerTool('get_hook_info', {
|
|
46
50
|
description: 'Get detailed information about a custom React hook from web-utils or data-layer',
|
|
47
|
-
inputSchema: {
|
|
51
|
+
inputSchema: {
|
|
52
|
+
hookName: z.string().describe('Name of the hook (e.g., useAdvancedChat, useMentorSettings)'),
|
|
53
|
+
},
|
|
48
54
|
}, async ({ hookName }) => ({
|
|
49
55
|
content: [{ type: 'text', text: getHookInfo(hookName) }],
|
|
50
56
|
}));
|
|
@@ -52,14 +58,21 @@ server.registerTool('get_provider_setup', {
|
|
|
52
58
|
description: 'Get provider setup code for an IBL app (AuthProvider, TenantProvider, etc.)',
|
|
53
59
|
inputSchema: {
|
|
54
60
|
appType: z.string().describe('Type of IBL app (e.g., mentor, skills, auth)'),
|
|
55
|
-
features: z
|
|
61
|
+
features: z
|
|
62
|
+
.array(z.string())
|
|
63
|
+
.optional()
|
|
64
|
+
.describe('Optional features to include (e.g., chat, analytics, rbac)'),
|
|
56
65
|
},
|
|
57
66
|
}, async ({ appType, features }) => ({
|
|
58
67
|
content: [{ type: 'text', text: getProviderSetup(appType, features || []) }],
|
|
59
68
|
}));
|
|
60
69
|
server.registerTool('get_api_query_info', {
|
|
61
70
|
description: 'Get detailed information about an RTK Query API hook from data-layer',
|
|
62
|
-
inputSchema: {
|
|
71
|
+
inputSchema: {
|
|
72
|
+
queryName: z
|
|
73
|
+
.string()
|
|
74
|
+
.describe('Name of the RTK Query API hook (e.g., useGetMentorSettingsQuery)'),
|
|
75
|
+
},
|
|
63
76
|
}, async ({ queryName }) => ({
|
|
64
77
|
content: [{ type: 'text', text: getApiQueryInfo(queryName) }],
|
|
65
78
|
}));
|
|
@@ -71,11 +84,17 @@ server.registerTool('create_page_template', {
|
|
|
71
84
|
features: z.array(z.string()).optional().describe('Optional features to include'),
|
|
72
85
|
},
|
|
73
86
|
}, async ({ pageName, appType, features }) => ({
|
|
74
|
-
content: [
|
|
87
|
+
content: [
|
|
88
|
+
{ type: 'text', text: createPageTemplate(pageName, appType, features || []) },
|
|
89
|
+
],
|
|
75
90
|
}));
|
|
76
91
|
server.registerTool('get_playwright_helper_info', {
|
|
77
92
|
description: 'Get detailed documentation for a specific Playwright test helper from @iblai/iblai-js/playwright',
|
|
78
|
-
inputSchema: {
|
|
93
|
+
inputSchema: {
|
|
94
|
+
helperName: z
|
|
95
|
+
.string()
|
|
96
|
+
.describe('Name of the Playwright helper (e.g., createPlaywrightConfig, reliableClick, safeWaitForURL, createAuthSetup)'),
|
|
97
|
+
},
|
|
79
98
|
}, async ({ helperName }) => ({
|
|
80
99
|
content: [{ type: 'text', text: getPlaywrightHelperInfo(helperName) }],
|
|
81
100
|
}));
|
|
@@ -85,7 +104,9 @@ server.registerTool('get_playwright_helper_info', {
|
|
|
85
104
|
server.registerPrompt('setup-e2e-testing', {
|
|
86
105
|
description: 'Generate instructions for setting up Playwright E2E testing in an IBL app',
|
|
87
106
|
argsSchema: {
|
|
88
|
-
appType: z
|
|
107
|
+
appType: z
|
|
108
|
+
.enum(['mentor', 'skills', 'auth', 'custom'])
|
|
109
|
+
.describe('Type of IBL app to set up E2E testing for'),
|
|
89
110
|
appName: z.string().optional().describe('Optional custom app name (defaults to appType)'),
|
|
90
111
|
},
|
|
91
112
|
}, async ({ appType, appName }) => ({
|
|
@@ -99,7 +120,9 @@ server.registerPrompt('setup-e2e-testing', {
|
|
|
99
120
|
server.registerPrompt('create-playwright-test', {
|
|
100
121
|
description: 'Generate a Playwright E2E test for a specific feature using IBL SDK conventions',
|
|
101
122
|
argsSchema: {
|
|
102
|
-
feature: z
|
|
123
|
+
feature: z
|
|
124
|
+
.string()
|
|
125
|
+
.describe('Feature to write a test for (e.g., login, mentor creation, chat)'),
|
|
103
126
|
appType: z.enum(['mentor', 'skills', 'auth', 'custom']).describe('Type of IBL app'),
|
|
104
127
|
},
|
|
105
128
|
}, async ({ feature, appType }) => ({
|
|
@@ -114,7 +137,10 @@ server.registerPrompt('setup-new-app', {
|
|
|
114
137
|
description: 'Generate comprehensive setup instructions for a new IBL app with providers, store, and E2E testing',
|
|
115
138
|
argsSchema: {
|
|
116
139
|
appType: z.enum(['mentor', 'skills', 'auth', 'custom']).describe('Type of IBL app to set up'),
|
|
117
|
-
features: z
|
|
140
|
+
features: z
|
|
141
|
+
.array(z.string())
|
|
142
|
+
.optional()
|
|
143
|
+
.describe('Optional features: rbac, analytics, chat, e2e'),
|
|
118
144
|
},
|
|
119
145
|
}, async ({ appType, features }) => ({
|
|
120
146
|
messages: [
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,eAAe;AACf,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,kBAAkB,CAAC;AAE1B,iBAAiB;AACjB,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAE5B,+EAA+E;AAC/E,0BAA0B;AAC1B,+EAA+E;AAC/E,wEAAwE;AACxE,qEAAqE;AACrE,6CAA6C;AAC7C,+EAA+E;AAE/E,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;IAC3B,IAAI,EAAE,kBAAkB;IACxB,OAAO,EAAE,OAAO;CACjB,CAAC,CAAC;AAEH,+EAA+E;AAC/E,YAAY;AACZ,+EAA+E;AAE/E,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;IAChD,MAAM,CAAC,gBAAgB,CACrB,QAAQ,CAAC,IAAI,EACb,QAAQ,CAAC,GAAG,EACZ,EAAE,WAAW,EAAE,QAAQ,CA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E,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;AAC5D,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-playwright-test.d.ts","sourceRoot":"","sources":["../../src/prompts/create-playwright-test.ts"],"names":[],"mappings":"AAAA,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"create-playwright-test.d.ts","sourceRoot":"","sources":["../../src/prompts/create-playwright-test.ts"],"names":[],"mappings":"AAAA,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAmGjF"}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
export function generateCreateTestPrompt(feature, appType) {
|
|
2
|
-
const hostVar = appType === 'mentor'
|
|
3
|
-
? 'MENTOR_NEXTJS_HOST'
|
|
4
|
-
: appType === 'skills'
|
|
5
|
-
? 'SKILLS_HOST'
|
|
6
|
-
: 'APP_HOST';
|
|
2
|
+
const hostVar = appType === 'mentor' ? 'MENTOR_NEXTJS_HOST' : appType === 'skills' ? 'SKILLS_HOST' : 'APP_HOST';
|
|
7
3
|
return `Write a Playwright E2E test for the "${feature}" feature in an IBL.ai ${appType} app.
|
|
8
4
|
|
|
9
5
|
## Conventions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-playwright-test.js","sourceRoot":"","sources":["../../src/prompts/create-playwright-test.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,wBAAwB,CAAC,OAAe,EAAE,OAAe;IACvE,MAAM,OAAO,GACX,OAAO,KAAK,QAAQ
|
|
1
|
+
{"version":3,"file":"create-playwright-test.js","sourceRoot":"","sources":["../../src/prompts/create-playwright-test.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,wBAAwB,CAAC,OAAe,EAAE,OAAe;IACvE,MAAM,OAAO,GACX,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC;IAElG,OAAO,wCAAwC,OAAO,0BAA0B,OAAO;;;;;;;;;;;;;;;;;;;;;;;WAuB9E,OAAO;;;;;;iBAMD,OAAO;;sBAEF,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BA+DH,OAAO,6IAA6I,CAAC;AAC/K,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-new-app.d.ts","sourceRoot":"","sources":["../../src/prompts/setup-new-app.ts"],"names":[],"mappings":"AAAA,wBAAgB,yBAAyB,
|
|
1
|
+
{"version":3,"file":"setup-new-app.d.ts","sourceRoot":"","sources":["../../src/prompts/setup-new-app.ts"],"names":[],"mappings":"AAAA,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAM,EAAO,GAAG,MAAM,CAwO1F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-new-app.js","sourceRoot":"","sources":["../../src/prompts/setup-new-app.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,yBAAyB,
|
|
1
|
+
{"version":3,"file":"setup-new-app.js","sourceRoot":"","sources":["../../src/prompts/setup-new-app.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,yBAAyB,CAAC,OAAe,EAAE,WAAqB,EAAE;IAChF,MAAM,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ,CA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AO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-containers.d.ts","sourceRoot":"","sources":["../../src/resources/web-containers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;
|
|
1
|
+
{"version":3,"file":"web-containers.d.ts","sourceRoot":"","sources":["../../src/resources/web-containers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;CAoLzB,CAAC"}
|
|
@@ -100,6 +100,66 @@ const className = cn('base-class', condition && 'conditional-class');
|
|
|
100
100
|
import { SsoLogin, ErrorPage, UserProfileDropdown } from '@iblai/iblai-js/web-containers/next';
|
|
101
101
|
\`\`\`
|
|
102
102
|
|
|
103
|
+
### AppSidebar
|
|
104
|
+
Collapsible sidebar for the Mentor app with configurable content and footer menu items.
|
|
105
|
+
|
|
106
|
+
\`\`\`typescript
|
|
107
|
+
import { AppSidebar } from '@iblai/iblai-js/web-containers/next';
|
|
108
|
+
|
|
109
|
+
<AppSidebar
|
|
110
|
+
logo={<img src="/logo.svg" alt="Logo" />}
|
|
111
|
+
contentItems={[
|
|
112
|
+
{ icon: MessageSquare, label: 'Chat', onClick: () => navigate('/chat') },
|
|
113
|
+
{ icon: Compass, label: 'Explore', onClick: () => navigate('/explore'), hasBorder: true },
|
|
114
|
+
]}
|
|
115
|
+
footerItems={[
|
|
116
|
+
{ icon: Settings, label: 'Settings', onClick: openSettings },
|
|
117
|
+
{ icon: LogOut, label: 'Logout', onClick: handleLogout },
|
|
118
|
+
]}
|
|
119
|
+
showProjects={false}
|
|
120
|
+
showPinnedMessages={false}
|
|
121
|
+
showRecentMessages={false}
|
|
122
|
+
/>
|
|
123
|
+
\`\`\`
|
|
124
|
+
|
|
125
|
+
### NavBar
|
|
126
|
+
Top navigation bar with user menu, new chat button, and optional mentor dropdown.
|
|
127
|
+
|
|
128
|
+
\`\`\`typescript
|
|
129
|
+
import { NavBar } from '@iblai/iblai-js/web-containers/next';
|
|
130
|
+
|
|
131
|
+
<NavBar
|
|
132
|
+
username={username}
|
|
133
|
+
isAuthenticated={true}
|
|
134
|
+
onNewChat={() => startNewChat()}
|
|
135
|
+
onSettings={() => openSettings()}
|
|
136
|
+
onLogout={() => handleLogout()}
|
|
137
|
+
onLogin={() => redirectToLogin()}
|
|
138
|
+
mentorName="My Mentor"
|
|
139
|
+
showMentorDropdown={false}
|
|
140
|
+
additionalMenuItems={[
|
|
141
|
+
{ icon: User, label: 'Profile', onClick: openProfile },
|
|
142
|
+
]}
|
|
143
|
+
/>
|
|
144
|
+
\`\`\`
|
|
145
|
+
|
|
146
|
+
### ConversationStarters
|
|
147
|
+
Displays guided prompt cards that users can click to start a chat session.
|
|
148
|
+
|
|
149
|
+
\`\`\`typescript
|
|
150
|
+
import { ConversationStarters } from '@iblai/iblai-js/web-containers/next';
|
|
151
|
+
|
|
152
|
+
<ConversationStarters
|
|
153
|
+
onTemplateSelect={(prompt) => sendMessage(prompt)}
|
|
154
|
+
guidedPrompts={[
|
|
155
|
+
{ prompt: 'Help me study for my exam', icon: 'book-open' },
|
|
156
|
+
{ prompt: 'Explain this concept', icon: 'lightbulb' },
|
|
157
|
+
]}
|
|
158
|
+
disabled={isStreaming}
|
|
159
|
+
className="mt-4"
|
|
160
|
+
/>
|
|
161
|
+
\`\`\`
|
|
162
|
+
|
|
103
163
|
## Styling / Theme
|
|
104
164
|
|
|
105
165
|
The package uses CSS custom properties for theming:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-containers.js","sourceRoot":"","sources":["../../src/resources/web-containers.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,GAAG,EAAE,+BAA+B;IACpC,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EAAE,2CAA2C;IACxD,QAAQ,EAAE,eAAe;IACzB,OAAO,EAAE
|
|
1
|
+
{"version":3,"file":"web-containers.js","sourceRoot":"","sources":["../../src/resources/web-containers.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,GAAG,EAAE,+BAA+B;IACpC,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EAAE,2CAA2C;IACxD,QAAQ,EAAE,eAAe;IACzB,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8KV;CACA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-utils.d.ts","sourceRoot":"","sources":["../../src/resources/web-utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;;;
|
|
1
|
+
{"version":3,"file":"web-utils.d.ts","sourceRoot":"","sources":["../../src/resources/web-utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;;;CAqPpB,CAAC"}
|
|
@@ -145,6 +145,43 @@ const {
|
|
|
145
145
|
} = useMentorSettings({ mentorId, tenantKey, username });
|
|
146
146
|
\`\`\`
|
|
147
147
|
|
|
148
|
+
## Tenant Metadata Hook
|
|
149
|
+
|
|
150
|
+
### useTenantMetadata
|
|
151
|
+
Fetches and provides tenant-level metadata configuration, including feature flags and platform settings.
|
|
152
|
+
|
|
153
|
+
\\\`\\\`\\\`typescript
|
|
154
|
+
import { useTenantMetadata } from '@iblai/iblai-js/web-utils';
|
|
155
|
+
|
|
156
|
+
const {
|
|
157
|
+
metadata,
|
|
158
|
+
platformName,
|
|
159
|
+
isLoading,
|
|
160
|
+
isError,
|
|
161
|
+
metadataLoaded,
|
|
162
|
+
isSkillsAssignmentsFeatureHidden,
|
|
163
|
+
isSkillsResumeFeatureHidden,
|
|
164
|
+
isMentorAIEnabled,
|
|
165
|
+
isSkillsLeaderBoardEnabled,
|
|
166
|
+
getEmbeddedMentorToUse,
|
|
167
|
+
isMentorInappropriateContentEnabled,
|
|
168
|
+
getAllMetadatas,
|
|
169
|
+
getSupportEmail,
|
|
170
|
+
} = useTenantMetadata({ org: tenantKey, spa: 'mentorAI' });
|
|
171
|
+
|
|
172
|
+
// Check if reporting inappropriate content is enabled (defaults to true)
|
|
173
|
+
if (isMentorInappropriateContentEnabled()) {
|
|
174
|
+
// Show report button
|
|
175
|
+
}
|
|
176
|
+
\\\`\\\`\\\`
|
|
177
|
+
|
|
178
|
+
**Tenant Metadata Config (MentorAI):**
|
|
179
|
+
- \\\`show_help\\\` (boolean, default: true) — Display help center link
|
|
180
|
+
- \\\`accessibility_menu\\\` (boolean, default: false) — Display accessibility menu
|
|
181
|
+
- \\\`mentor_include_community_mentors\\\` (boolean, default: true) — Allow community mentors
|
|
182
|
+
- \\\`mentor_report_inappropriate_content\\\` (boolean, default: true) — Allow users to report inappropriate content
|
|
183
|
+
- \\\`help_center_url\\\` (string, default: "https://docs.ibl.ai") — Help center URL
|
|
184
|
+
|
|
148
185
|
## Authentication Utilities
|
|
149
186
|
|
|
150
187
|
\`\`\`typescript
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-utils.js","sourceRoot":"","sources":["../../src/resources/web-utils.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,GAAG,EAAE,0BAA0B;IAC/B,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,8CAA8C;IAC3D,QAAQ,EAAE,eAAe;IACzB,OAAO,EAAE
|
|
1
|
+
{"version":3,"file":"web-utils.js","sourceRoot":"","sources":["../../src/resources/web-utils.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,GAAG,EAAE,0BAA0B;IAC/B,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,8CAA8C;IAC3D,QAAQ,EAAE,eAAe;IACzB,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+OV;CACA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-query-info.d.ts","sourceRoot":"","sources":["../../src/tools/api-query-info.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;CAa5B,CAAC;
|
|
1
|
+
{"version":3,"file":"api-query-info.d.ts","sourceRoot":"","sources":["../../src/tools/api-query-info.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;CAa5B,CAAC;AA+oEF,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAgKzD"}
|