@webiny/mcp 6.0.0 → 6.1.0-beta.0
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/agents/claude.d.ts +2 -2
- package/agents/claude.js.map +1 -1
- package/agents/cline.d.ts +2 -2
- package/agents/cline.js.map +1 -1
- package/agents/copilot.d.ts +2 -2
- package/agents/copilot.js +1 -1
- package/agents/copilot.js.map +1 -1
- package/agents/cursor.d.ts +2 -2
- package/agents/cursor.js.map +1 -1
- package/agents/instructions.js +1 -1
- package/agents/instructions.js.map +1 -1
- package/agents/kiro.d.ts +15 -0
- package/agents/kiro.js +33 -0
- package/agents/kiro.js.map +1 -0
- package/agents/opencode.d.ts +22 -0
- package/agents/opencode.js +76 -0
- package/agents/opencode.js.map +1 -0
- package/agents/shared.d.ts +5 -5
- package/agents/shared.js +3 -3
- package/agents/shared.js.map +1 -1
- package/agents/windsurf.d.ts +2 -2
- package/agents/windsurf.js.map +1 -1
- package/bin.d.ts +2 -0
- package/bin.js +4 -0
- package/bin.js.map +1 -0
- package/cli/ConfigureMcp.d.ts +7 -14
- package/cli/ConfigureMcp.js +24 -52
- package/cli/ConfigureMcp.js.map +1 -1
- package/cli/McpServer.d.ts +3 -10
- package/cli/McpServer.js +83 -109
- package/cli/McpServer.js.map +1 -1
- package/cli.d.ts +1 -0
- package/cli.js +60 -0
- package/cli.js.map +1 -0
- package/index.d.ts +6 -1
- package/index.js +7 -1
- package/index.js.map +1 -1
- package/package.json +11 -23
- package/skills/admin/admin-architect/SKILL.md +389 -0
- package/skills/admin/ui-extensions/SKILL.md +268 -0
- package/skills/api/api-architect/SKILL.md +189 -0
- package/skills/api/custom-field-type/SKILL.md +263 -0
- package/skills/api/event-handler-pattern/SKILL.md +131 -0
- package/skills/{custom-graphql-api → api/graphql-api}/SKILL.md +3 -3
- package/skills/api/use-case-pattern/SKILL.md +102 -0
- package/skills/cli-extensions/SKILL.md +45 -47
- package/skills/configure-auth0/SKILL.md +4 -4
- package/skills/configure-okta/SKILL.md +3 -3
- package/skills/content-models/SKILL.md +197 -196
- package/skills/dependency-injection/SKILL.md +9 -219
- package/skills/full-stack-architect/SKILL.md +195 -0
- package/skills/generated/admin/SKILL.md +119 -0
- package/skills/generated/admin/aco/SKILL.md +28 -0
- package/skills/generated/admin/build-params/SKILL.md +33 -0
- package/skills/generated/admin/cms/SKILL.md +342 -0
- package/skills/generated/admin/configs/SKILL.md +23 -0
- package/skills/generated/admin/env-config/SKILL.md +30 -0
- package/skills/generated/admin/form/SKILL.md +88 -0
- package/skills/generated/admin/graphql-client/SKILL.md +23 -0
- package/skills/generated/admin/lexical/SKILL.md +105 -0
- package/skills/generated/admin/local-storage/SKILL.md +42 -0
- package/skills/generated/admin/router/SKILL.md +48 -0
- package/skills/generated/admin/security/SKILL.md +63 -0
- package/skills/generated/admin/tenancy/SKILL.md +64 -0
- package/skills/generated/admin/ui/SKILL.md +468 -0
- package/skills/generated/admin/website-builder/SKILL.md +318 -0
- package/skills/generated/api/SKILL.md +40 -0
- package/skills/generated/api/aco/SKILL.md +202 -0
- package/skills/generated/api/build-params/SKILL.md +31 -0
- package/skills/generated/api/cms/SKILL.md +646 -0
- package/skills/generated/api/event-publisher/SKILL.md +31 -0
- package/skills/generated/api/file-manager/SKILL.md +189 -0
- package/skills/generated/api/graphql/SKILL.md +61 -0
- package/skills/generated/api/key-value-store/SKILL.md +31 -0
- package/skills/generated/api/logger/SKILL.md +25 -0
- package/skills/generated/api/opensearch/SKILL.md +39 -0
- package/skills/generated/api/scheduler/SKILL.md +112 -0
- package/skills/generated/api/security/SKILL.md +317 -0
- package/skills/generated/api/system/SKILL.md +34 -0
- package/skills/generated/api/tasks/SKILL.md +31 -0
- package/skills/generated/api/tenancy/SKILL.md +124 -0
- package/skills/generated/api/tenant-manager/SKILL.md +34 -0
- package/skills/generated/api/website-builder/SKILL.md +356 -0
- package/skills/generated/cli/SKILL.md +28 -0
- package/skills/generated/cli/command/SKILL.md +24 -0
- package/skills/generated/extensions/SKILL.md +43 -0
- package/skills/generated/infra/SKILL.md +190 -0
- package/skills/infrastructure-extensions/SKILL.md +3 -2
- package/skills/local-development/SKILL.md +2 -28
- package/skills/project-structure/SKILL.md +78 -56
- package/skills/webiny-sdk/SKILL.md +77 -76
- package/skills/website-builder/SKILL.md +143 -149
- package/ui.d.ts +24 -0
- package/ui.js +31 -0
- package/ui.js.map +1 -0
- package/Extension.d.ts +0 -2
- package/Extension.js +0 -11
- package/Extension.js.map +0 -1
- package/skills/admin-ui-extensions/SKILL.md +0 -267
- package/skills/api-custom-feature/SKILL.md +0 -195
- package/skills/lifecycle-events/SKILL.md +0 -348
|
@@ -40,6 +40,7 @@ The Webiny Website Builder uses a unique architecture: the Admin editor loads yo
|
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
Key implications:
|
|
43
|
+
|
|
43
44
|
- **No style clashes** -- your components, your styles, full ownership
|
|
44
45
|
- **Genuine WYSIWYG** -- editors see your real app, not a simulation
|
|
45
46
|
- **Framework-owned code** -- all React components live in your Next.js repo
|
|
@@ -69,6 +70,7 @@ NEXT_PUBLIC_WEBSITE_BUILDER_API_TENANT=root
|
|
|
69
70
|
## Editor Components
|
|
70
71
|
|
|
71
72
|
An editor component has two parts:
|
|
73
|
+
|
|
72
74
|
1. **React component** -- renders the UI, receives configured values via `inputs` prop
|
|
73
75
|
2. **Manifest** -- metadata (name, label, group, inputs) that tells the editor about the component
|
|
74
76
|
|
|
@@ -80,25 +82,25 @@ import React from "react";
|
|
|
80
82
|
import { ComponentProps } from "@webiny/website-builder-nextjs";
|
|
81
83
|
|
|
82
84
|
interface BannerInputs {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
headline: string;
|
|
86
|
+
ctaLabel: string;
|
|
87
|
+
ctaUrl: string;
|
|
86
88
|
}
|
|
87
89
|
|
|
88
90
|
export function Banner({ inputs: { headline, ctaLabel, ctaUrl } }: ComponentProps<BannerInputs>) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
91
|
+
return (
|
|
92
|
+
<div className="bg-primary py-12 px-6 text-center text-white">
|
|
93
|
+
<h2 className="text-3xl font-bold mb-4">{headline}</h2>
|
|
94
|
+
{ctaLabel && ctaUrl && (
|
|
95
|
+
<a
|
|
96
|
+
href={ctaUrl}
|
|
97
|
+
className="inline-block bg-white text-primary font-semibold px-6 py-3 rounded-md"
|
|
98
|
+
>
|
|
99
|
+
{ctaLabel}
|
|
100
|
+
</a>
|
|
101
|
+
)}
|
|
102
|
+
</div>
|
|
103
|
+
);
|
|
102
104
|
}
|
|
103
105
|
```
|
|
104
106
|
|
|
@@ -113,29 +115,29 @@ import { createComponent, createTextInput } from "@webiny/website-builder-nextjs
|
|
|
113
115
|
import { Banner } from "./Banner";
|
|
114
116
|
|
|
115
117
|
export const editorComponents = [
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
118
|
+
createComponent(Banner, {
|
|
119
|
+
name: "Custom/Banner",
|
|
120
|
+
label: "Banner",
|
|
121
|
+
group: "custom",
|
|
122
|
+
inputs: [
|
|
123
|
+
createTextInput({
|
|
124
|
+
name: "headline",
|
|
125
|
+
label: "Headline",
|
|
126
|
+
description: "The main headline text.",
|
|
127
|
+
defaultValue: "Ready to get started?"
|
|
128
|
+
}),
|
|
129
|
+
createTextInput({
|
|
130
|
+
name: "ctaLabel",
|
|
131
|
+
label: "Button Label",
|
|
132
|
+
defaultValue: "Get started"
|
|
133
|
+
}),
|
|
134
|
+
createTextInput({
|
|
135
|
+
name: "ctaUrl",
|
|
136
|
+
label: "Button URL",
|
|
137
|
+
defaultValue: "/"
|
|
138
|
+
})
|
|
139
|
+
]
|
|
140
|
+
})
|
|
139
141
|
];
|
|
140
142
|
```
|
|
141
143
|
|
|
@@ -147,21 +149,21 @@ Use a namespaced string: `"YourNamespace/ComponentName"`. Component names are st
|
|
|
147
149
|
|
|
148
150
|
## Input Types
|
|
149
151
|
|
|
150
|
-
| Factory Function
|
|
151
|
-
|
|
152
|
-
| `createTextInput`
|
|
153
|
-
| `createLongTextInput` | Multi-line text
|
|
154
|
-
| `createNumberInput`
|
|
155
|
-
| `createBooleanInput`
|
|
156
|
-
| `createColorInput`
|
|
157
|
-
| `createDateInput`
|
|
158
|
-
| `createSelectInput`
|
|
159
|
-
| `createRadioInput`
|
|
160
|
-
| `createTagsInput`
|
|
161
|
-
| `createObjectInput`
|
|
162
|
-
| `createLexicalInput`
|
|
163
|
-
| `createFileInput`
|
|
164
|
-
| `createSlotInput`
|
|
152
|
+
| Factory Function | Use Case |
|
|
153
|
+
| --------------------- | ----------------------------------- |
|
|
154
|
+
| `createTextInput` | Single-line text, URLs, labels |
|
|
155
|
+
| `createLongTextInput` | Multi-line text |
|
|
156
|
+
| `createNumberInput` | Numeric values |
|
|
157
|
+
| `createBooleanInput` | Toggle / checkbox |
|
|
158
|
+
| `createColorInput` | Color picker |
|
|
159
|
+
| `createDateInput` | Date / date-time picker |
|
|
160
|
+
| `createSelectInput` | Dropdown with predefined options |
|
|
161
|
+
| `createRadioInput` | Radio button group |
|
|
162
|
+
| `createTagsInput` | List of tags |
|
|
163
|
+
| `createObjectInput` | Nested object (group of sub-inputs) |
|
|
164
|
+
| `createLexicalInput` | Rich text (Lexical editor) |
|
|
165
|
+
| `createFileInput` | File / media picker |
|
|
166
|
+
| `createSlotInput` | Slot for nesting other components |
|
|
165
167
|
|
|
166
168
|
Each factory accepts: `name`, `label`, `description`, `defaultValue`, and type-specific options.
|
|
167
169
|
|
|
@@ -174,17 +176,17 @@ Groups organize the editor's component palette:
|
|
|
174
176
|
import { registerComponentGroup, type ComponentManifest } from "@webiny/website-builder-nextjs";
|
|
175
177
|
|
|
176
178
|
export const registerComponentGroups = () => {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
179
|
+
registerComponentGroup({
|
|
180
|
+
name: "basic",
|
|
181
|
+
label: "Basic",
|
|
182
|
+
description: "Components for simple content creation"
|
|
183
|
+
});
|
|
184
|
+
registerComponentGroup({
|
|
185
|
+
name: "custom",
|
|
186
|
+
label: "Custom",
|
|
187
|
+
description: "Assorted custom components",
|
|
188
|
+
filter: (component: ComponentManifest) => !component.group
|
|
189
|
+
});
|
|
188
190
|
};
|
|
189
191
|
```
|
|
190
192
|
|
|
@@ -201,26 +203,26 @@ The theme system has three files that work together:
|
|
|
201
203
|
@import "@webiny/website-builder-nextjs/lexical.css";
|
|
202
204
|
|
|
203
205
|
:root {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
206
|
+
--wb-theme-color-primary: #4632f5;
|
|
207
|
+
--wb-theme-color-secondary: #00ccb0;
|
|
208
|
+
--wb-theme-color-background: #ffffff;
|
|
209
|
+
--wb-theme-color-surface: #f9f9f9;
|
|
210
|
+
--wb-theme-color-text-base: #0a0a0a;
|
|
211
|
+
--wb-theme-color-text-muted: #6b7280;
|
|
212
|
+
--wb-theme-color-border: #e5e7eb;
|
|
213
|
+
--wb-theme-font-family: "Inter", sans-serif;
|
|
212
214
|
}
|
|
213
215
|
|
|
214
216
|
.wb-heading-1 {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
217
|
+
font-weight: 700;
|
|
218
|
+
line-height: 1.2;
|
|
219
|
+
font-size: clamp(2rem, 1.5rem + 1.5vw, 3rem);
|
|
218
220
|
}
|
|
219
221
|
|
|
220
222
|
.wb-paragraph-1 {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
223
|
+
font-weight: 400;
|
|
224
|
+
line-height: 1.6;
|
|
225
|
+
font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1rem);
|
|
224
226
|
}
|
|
225
227
|
```
|
|
226
228
|
|
|
@@ -234,28 +236,20 @@ declare const __THEME_CSS__: string;
|
|
|
234
236
|
export const css = __THEME_CSS__;
|
|
235
237
|
|
|
236
238
|
export const theme = createTheme({
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
],
|
|
252
|
-
quotes: [
|
|
253
|
-
{ id: "quote", label: "Quote", tag: "blockquote", className: "wb-blockquote-1" }
|
|
254
|
-
],
|
|
255
|
-
lists: [
|
|
256
|
-
{ id: "list1", label: "List 1", tag: "ul", className: "wb-unordered-list-1" }
|
|
257
|
-
]
|
|
258
|
-
}
|
|
239
|
+
css,
|
|
240
|
+
fonts: ["https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap"],
|
|
241
|
+
colors: [
|
|
242
|
+
{ id: "color-primary", label: "Primary", value: "var(--wb-theme-color-primary)" },
|
|
243
|
+
{ id: "color-secondary", label: "Secondary", value: "var(--wb-theme-color-secondary)" },
|
|
244
|
+
{ id: "color-background", label: "Background", value: "var(--wb-theme-color-background)" },
|
|
245
|
+
{ id: "color-text-base", label: "Text", value: "var(--wb-theme-color-text-base)" }
|
|
246
|
+
],
|
|
247
|
+
typography: {
|
|
248
|
+
headings: [{ id: "heading1", label: "Heading 1", tag: "h1", className: "wb-heading-1" }],
|
|
249
|
+
paragraphs: [{ id: "paragraph1", label: "Paragraph 1", tag: "p", className: "wb-paragraph-1" }],
|
|
250
|
+
quotes: [{ id: "quote", label: "Quote", tag: "blockquote", className: "wb-blockquote-1" }],
|
|
251
|
+
lists: [{ id: "list1", label: "List 1", tag: "ul", className: "wb-unordered-list-1" }]
|
|
252
|
+
}
|
|
259
253
|
});
|
|
260
254
|
```
|
|
261
255
|
|
|
@@ -270,10 +264,10 @@ export const theme = createTheme({
|
|
|
270
264
|
@import "tailwindcss";
|
|
271
265
|
|
|
272
266
|
@theme inline {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
267
|
+
--font-sans: InterVariable, sans-serif;
|
|
268
|
+
--color-primary: var(--wb-theme-color-primary);
|
|
269
|
+
--color-secondary: var(--wb-theme-color-secondary);
|
|
270
|
+
--color-text-base: var(--wb-theme-color-text-base);
|
|
277
271
|
}
|
|
278
272
|
```
|
|
279
273
|
|
|
@@ -283,12 +277,12 @@ This bridges WB CSS variables to Tailwind tokens, enabling `bg-primary`, `text-p
|
|
|
283
277
|
|
|
284
278
|
When switching fonts, update all four places:
|
|
285
279
|
|
|
286
|
-
| File
|
|
287
|
-
|
|
288
|
-
| `src/app/layout.tsx`
|
|
289
|
-
| `src/theme/tailwind.css` | `--font-sans` token
|
|
290
|
-
| `src/theme/theme.css`
|
|
291
|
-
| `src/theme/theme.ts`
|
|
280
|
+
| File | What to Update |
|
|
281
|
+
| ------------------------ | ------------------------------------------------------------------------- |
|
|
282
|
+
| `src/app/layout.tsx` | Font import and config (e.g., `import { Geist } from "next/font/google"`) |
|
|
283
|
+
| `src/theme/tailwind.css` | `--font-sans` token |
|
|
284
|
+
| `src/theme/theme.css` | `--wb-theme-font-family` variable |
|
|
285
|
+
| `src/theme/theme.ts` | `fonts` array URL (must include same weight range as layout.tsx) |
|
|
292
286
|
|
|
293
287
|
## Server Components Fetching CMS Data
|
|
294
288
|
|
|
@@ -303,40 +297,40 @@ import type { Product } from "@/lib/types";
|
|
|
303
297
|
import type { CmsEntryData } from "@webiny/sdk";
|
|
304
298
|
|
|
305
299
|
interface ProductListingInputs {
|
|
306
|
-
|
|
307
|
-
|
|
300
|
+
heading: string;
|
|
301
|
+
limit: string;
|
|
308
302
|
}
|
|
309
303
|
|
|
310
304
|
export async function ProductListing({
|
|
311
|
-
|
|
305
|
+
inputs: { heading, limit }
|
|
312
306
|
}: ComponentProps<ProductListingInputs>) {
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
307
|
+
const parsedLimit = parseInt(limit, 10) || 6;
|
|
308
|
+
|
|
309
|
+
const result = await sdk.cms.listEntries<Product>({
|
|
310
|
+
modelId: "product",
|
|
311
|
+
limit: parsedLimit,
|
|
312
|
+
sort: ["values.name_ASC"]
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
if (!result.isOk()) {
|
|
316
|
+
return <div className="text-red-600">Failed to load products: {result.error.message}</div>;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
const products: CmsEntryData<Product>[] = result.value.data;
|
|
320
|
+
|
|
321
|
+
return (
|
|
322
|
+
<section className="py-12 px-6">
|
|
323
|
+
{heading && <h2 className="text-3xl font-bold text-center mb-8">{heading}</h2>}
|
|
324
|
+
<ul className="grid gap-6 sm:grid-cols-2 lg:grid-cols-3 max-w-5xl mx-auto">
|
|
325
|
+
{products.map(product => (
|
|
326
|
+
<li key={product.id} className="border rounded-lg p-6">
|
|
327
|
+
<h3 className="text-xl font-semibold">{product.values.name}</h3>
|
|
328
|
+
<p className="text-lg font-bold mt-2">${product.values.price.toFixed(2)}</p>
|
|
329
|
+
</li>
|
|
330
|
+
))}
|
|
331
|
+
</ul>
|
|
332
|
+
</section>
|
|
333
|
+
);
|
|
340
334
|
}
|
|
341
335
|
```
|
|
342
336
|
|
|
@@ -344,13 +338,13 @@ Register it (async Server Components work even though `index.tsx` is `"use clien
|
|
|
344
338
|
|
|
345
339
|
```tsx
|
|
346
340
|
createComponent(ProductListing, {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
})
|
|
341
|
+
name: "Custom/ProductListing",
|
|
342
|
+
label: "Product Listing",
|
|
343
|
+
inputs: [
|
|
344
|
+
createTextInput({ name: "heading", label: "Section Heading", defaultValue: "Our Products" }),
|
|
345
|
+
createTextInput({ name: "limit", label: "Number of products", defaultValue: "6" })
|
|
346
|
+
]
|
|
347
|
+
});
|
|
354
348
|
```
|
|
355
349
|
|
|
356
350
|
To use the Headless CMS SDK, initialize it in `src/lib/webiny.ts` with a **Read API** key (see the `webiny-sdk` skill).
|
|
@@ -381,4 +375,4 @@ Groups: registerComponentGroup({ name, label, description })
|
|
|
381
375
|
## Related Skills
|
|
382
376
|
|
|
383
377
|
- `webiny-sdk` -- Using the Headless CMS SDK inside Website Builder components
|
|
384
|
-
- `project-structure` -- Webiny project setup and extension registration
|
|
378
|
+
- `webiny-project-structure` -- Webiny project setup and extension registration
|
package/ui.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal UI interface for MCP output.
|
|
3
|
+
* This is a structural subtype of @webiny/cli-core's IUiService,
|
|
4
|
+
* so Webiny's Ui can be passed directly without an adapter.
|
|
5
|
+
*/
|
|
6
|
+
export interface IUi {
|
|
7
|
+
info(text: string, ...args: any[]): void;
|
|
8
|
+
success(text: string, ...args: any[]): void;
|
|
9
|
+
error(text: string, ...args: any[]): void;
|
|
10
|
+
warning(text: string, ...args: any[]): void;
|
|
11
|
+
text(text: string): void;
|
|
12
|
+
emptyLine(): void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Console-based Ui for standalone usage (no @webiny/cli-core needed).
|
|
16
|
+
*/
|
|
17
|
+
export declare class ConsoleUi implements IUi {
|
|
18
|
+
info(text: string, ...args: any[]): void;
|
|
19
|
+
success(text: string, ...args: any[]): void;
|
|
20
|
+
error(text: string, ...args: any[]): void;
|
|
21
|
+
warning(text: string, ...args: any[]): void;
|
|
22
|
+
text(text: string): void;
|
|
23
|
+
emptyLine(): void;
|
|
24
|
+
}
|
package/ui.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal UI interface for MCP output.
|
|
3
|
+
* This is a structural subtype of @webiny/cli-core's IUiService,
|
|
4
|
+
* so Webiny's Ui can be passed directly without an adapter.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Console-based Ui for standalone usage (no @webiny/cli-core needed).
|
|
9
|
+
*/
|
|
10
|
+
export class ConsoleUi {
|
|
11
|
+
info(text, ...args) {
|
|
12
|
+
console.log(text, ...args);
|
|
13
|
+
}
|
|
14
|
+
success(text, ...args) {
|
|
15
|
+
console.log(text, ...args);
|
|
16
|
+
}
|
|
17
|
+
error(text, ...args) {
|
|
18
|
+
console.error(text, ...args);
|
|
19
|
+
}
|
|
20
|
+
warning(text, ...args) {
|
|
21
|
+
console.warn(text, ...args);
|
|
22
|
+
}
|
|
23
|
+
text(text) {
|
|
24
|
+
console.log(text);
|
|
25
|
+
}
|
|
26
|
+
emptyLine() {
|
|
27
|
+
console.log();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=ui.js.map
|
package/ui.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ConsoleUi","info","text","args","console","log","success","error","warning","warn","emptyLine"],"sources":["ui.ts"],"sourcesContent":["/**\n * Minimal UI interface for MCP output.\n * This is a structural subtype of @webiny/cli-core's IUiService,\n * so Webiny's Ui can be passed directly without an adapter.\n */\nexport interface IUi {\n info(text: string, ...args: any[]): void;\n success(text: string, ...args: any[]): void;\n error(text: string, ...args: any[]): void;\n warning(text: string, ...args: any[]): void;\n text(text: string): void;\n emptyLine(): void;\n}\n\n/**\n * Console-based Ui for standalone usage (no @webiny/cli-core needed).\n */\nexport class ConsoleUi implements IUi {\n info(text: string, ...args: any[]): void {\n console.log(text, ...args);\n }\n\n success(text: string, ...args: any[]): void {\n console.log(text, ...args);\n }\n\n error(text: string, ...args: any[]): void {\n console.error(text, ...args);\n }\n\n warning(text: string, ...args: any[]): void {\n console.warn(text, ...args);\n }\n\n text(text: string): void {\n console.log(text);\n }\n\n emptyLine(): void {\n console.log();\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA,OAAO,MAAMA,SAAS,CAAgB;EAClCC,IAAIA,CAACC,IAAY,EAAE,GAAGC,IAAW,EAAQ;IACrCC,OAAO,CAACC,GAAG,CAACH,IAAI,EAAE,GAAGC,IAAI,CAAC;EAC9B;EAEAG,OAAOA,CAACJ,IAAY,EAAE,GAAGC,IAAW,EAAQ;IACxCC,OAAO,CAACC,GAAG,CAACH,IAAI,EAAE,GAAGC,IAAI,CAAC;EAC9B;EAEAI,KAAKA,CAACL,IAAY,EAAE,GAAGC,IAAW,EAAQ;IACtCC,OAAO,CAACG,KAAK,CAACL,IAAI,EAAE,GAAGC,IAAI,CAAC;EAChC;EAEAK,OAAOA,CAACN,IAAY,EAAE,GAAGC,IAAW,EAAQ;IACxCC,OAAO,CAACK,IAAI,CAACP,IAAI,EAAE,GAAGC,IAAI,CAAC;EAC/B;EAEAD,IAAIA,CAACA,IAAY,EAAQ;IACrBE,OAAO,CAACC,GAAG,CAACH,IAAI,CAAC;EACrB;EAEAQ,SAASA,CAAA,EAAS;IACdN,OAAO,CAACC,GAAG,CAAC,CAAC;EACjB;AACJ","ignoreList":[]}
|
package/Extension.d.ts
DELETED
package/Extension.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CliCommand } from "@webiny/cli-core/extensions/index.js";
|
|
3
|
-
export const McpExtension = () => {
|
|
4
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CliCommand, {
|
|
5
|
-
src: import.meta.dirname + "/cli/ConfigureMcp.js"
|
|
6
|
-
}), /*#__PURE__*/React.createElement(CliCommand, {
|
|
7
|
-
src: import.meta.dirname + "/cli/McpServer.js"
|
|
8
|
-
}));
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=Extension.js.map
|
package/Extension.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","CliCommand","McpExtension","createElement","Fragment","src","import","meta","dirname"],"sources":["Extension.tsx"],"sourcesContent":["import React from \"react\";\nimport { CliCommand } from \"@webiny/cli-core/extensions/index.js\";\n\nexport const McpExtension = () => {\n return (\n <>\n <CliCommand src={import.meta.dirname + \"/cli/ConfigureMcp.js\"} />\n <CliCommand src={import.meta.dirname + \"/cli/McpServer.js\"} />\n </>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,sCAAsC;AAEjE,OAAO,MAAMC,YAAY,GAAGA,CAAA,KAAM;EAC9B,oBACIF,KAAA,CAAAG,aAAA,CAAAH,KAAA,CAAAI,QAAA,qBACIJ,KAAA,CAAAG,aAAA,CAACF,UAAU;IAACI,GAAG,EAAEC,MAAM,CAACC,IAAI,CAACC,OAAO,GAAG;EAAuB,CAAE,CAAC,eACjER,KAAA,CAAAG,aAAA,CAACF,UAAU;IAACI,GAAG,EAAEC,MAAM,CAACC,IAAI,CAACC,OAAO,GAAG;EAAoB,CAAE,CAC/D,CAAC;AAEX,CAAC","ignoreList":[]}
|