@pinepaper.studio/mcp-server 1.4.2 → 1.5.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/README.md +213 -18
- package/dist/__tests__/fixtures/mock-generators.d.ts +147 -0
- package/dist/__tests__/fixtures/mock-generators.d.ts.map +1 -1
- package/dist/__tests__/fixtures/mock-generators.js +85 -0
- package/dist/__tests__/fixtures/mock-generators.js.map +1 -1
- package/dist/agent/export-manager.d.ts +77 -0
- package/dist/agent/export-manager.d.ts.map +1 -0
- package/dist/agent/export-manager.js +455 -0
- package/dist/agent/export-manager.js.map +1 -0
- package/dist/agent/index.d.ts +9 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +12 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/agent/session-manager.d.ts +109 -0
- package/dist/agent/session-manager.d.ts.map +1 -0
- package/dist/agent/session-manager.js +311 -0
- package/dist/agent/session-manager.js.map +1 -0
- package/dist/agent/types.d.ts +385 -0
- package/dist/agent/types.d.ts.map +1 -0
- package/dist/agent/types.js +141 -0
- package/dist/agent/types.js.map +1 -0
- package/dist/browser/index.d.ts +1 -1
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/puppeteer-controller.d.ts +89 -5
- package/dist/browser/puppeteer-controller.d.ts.map +1 -1
- package/dist/browser/puppeteer-controller.js +412 -11
- package/dist/browser/puppeteer-controller.js.map +1 -1
- package/dist/cli.js +3 -2
- package/dist/cli.js.map +1 -1
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +37 -0
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/base.d.ts.map +1 -1
- package/dist/i18n/locales/base.js +49 -0
- package/dist/i18n/locales/base.js.map +1 -1
- package/dist/i18n/locales/bn.d.ts.map +1 -1
- package/dist/i18n/locales/bn.js +10 -0
- package/dist/i18n/locales/bn.js.map +1 -1
- package/dist/i18n/locales/cs.d.ts.map +1 -1
- package/dist/i18n/locales/cs.js +10 -0
- package/dist/i18n/locales/cs.js.map +1 -1
- package/dist/i18n/locales/da.d.ts.map +1 -1
- package/dist/i18n/locales/da.js +10 -0
- package/dist/i18n/locales/da.js.map +1 -1
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +107 -0
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +10 -0
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +162 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +106 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fa.d.ts.map +1 -1
- package/dist/i18n/locales/fa.js +10 -0
- package/dist/i18n/locales/fa.js.map +1 -1
- package/dist/i18n/locales/fi.d.ts.map +1 -1
- package/dist/i18n/locales/fi.js +10 -0
- package/dist/i18n/locales/fi.js.map +1 -1
- package/dist/i18n/locales/fil.d.ts.map +1 -1
- package/dist/i18n/locales/fil.js +10 -0
- package/dist/i18n/locales/fil.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +37 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/gu.d.ts.map +1 -1
- package/dist/i18n/locales/gu.js +10 -0
- package/dist/i18n/locales/gu.js.map +1 -1
- package/dist/i18n/locales/he.d.ts.map +1 -1
- package/dist/i18n/locales/he.js +10 -0
- package/dist/i18n/locales/he.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +37 -0
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/hu.d.ts.map +1 -1
- package/dist/i18n/locales/hu.js +10 -0
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/id.d.ts.map +1 -1
- package/dist/i18n/locales/id.js +108 -0
- package/dist/i18n/locales/id.js.map +1 -1
- package/dist/i18n/locales/is.d.ts.map +1 -1
- package/dist/i18n/locales/is.js +10 -0
- package/dist/i18n/locales/is.js.map +1 -1
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +108 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +108 -0
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/kn.d.ts.map +1 -1
- package/dist/i18n/locales/kn.js +10 -0
- package/dist/i18n/locales/kn.js.map +1 -1
- package/dist/i18n/locales/ko.d.ts.map +1 -1
- package/dist/i18n/locales/ko.js +37 -0
- package/dist/i18n/locales/ko.js.map +1 -1
- package/dist/i18n/locales/ml.d.ts.map +1 -1
- package/dist/i18n/locales/ml.js +10 -0
- package/dist/i18n/locales/ml.js.map +1 -1
- package/dist/i18n/locales/mr.d.ts.map +1 -1
- package/dist/i18n/locales/mr.js +10 -0
- package/dist/i18n/locales/mr.js.map +1 -1
- package/dist/i18n/locales/ms.d.ts.map +1 -1
- package/dist/i18n/locales/ms.js +10 -0
- package/dist/i18n/locales/ms.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +108 -0
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/no.d.ts.map +1 -1
- package/dist/i18n/locales/no.js +10 -0
- package/dist/i18n/locales/no.js.map +1 -1
- package/dist/i18n/locales/pa.d.ts.map +1 -1
- package/dist/i18n/locales/pa.js +10 -0
- package/dist/i18n/locales/pa.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +108 -0
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt-BR.d.ts.map +1 -1
- package/dist/i18n/locales/pt-BR.js +108 -0
- package/dist/i18n/locales/pt-BR.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +10 -0
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +10 -0
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +108 -0
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +10 -0
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/ta.d.ts.map +1 -1
- package/dist/i18n/locales/ta.js +10 -0
- package/dist/i18n/locales/ta.js.map +1 -1
- package/dist/i18n/locales/te.d.ts.map +1 -1
- package/dist/i18n/locales/te.js +10 -0
- package/dist/i18n/locales/te.js.map +1 -1
- package/dist/i18n/locales/th.d.ts.map +1 -1
- package/dist/i18n/locales/th.js +108 -0
- package/dist/i18n/locales/th.js.map +1 -1
- package/dist/i18n/locales/tl.d.ts.map +1 -1
- package/dist/i18n/locales/tl.js +10 -0
- package/dist/i18n/locales/tl.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +108 -0
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/uk.d.ts.map +1 -1
- package/dist/i18n/locales/uk.js +108 -0
- package/dist/i18n/locales/uk.js.map +1 -1
- package/dist/i18n/locales/ur.d.ts.map +1 -1
- package/dist/i18n/locales/ur.js +10 -0
- package/dist/i18n/locales/ur.js.map +1 -1
- package/dist/i18n/locales/vi.d.ts.map +1 -1
- package/dist/i18n/locales/vi.js +108 -0
- package/dist/i18n/locales/vi.js.map +1 -1
- package/dist/i18n/locales/zh-CN.d.ts.map +1 -1
- package/dist/i18n/locales/zh-CN.js +108 -0
- package/dist/i18n/locales/zh-CN.js.map +1 -1
- package/dist/i18n/locales/zh-TW.d.ts.map +1 -1
- package/dist/i18n/locales/zh-TW.js +108 -0
- package/dist/i18n/locales/zh-TW.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2717 -147
- package/dist/index.js.map +1 -1
- package/dist/prompts/index.d.ts +39 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +254 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/tools/compact-descriptions.d.ts +9 -0
- package/dist/tools/compact-descriptions.d.ts.map +1 -0
- package/dist/tools/compact-descriptions.js +260 -0
- package/dist/tools/compact-descriptions.js.map +1 -0
- package/dist/tools/definitions.d.ts +12 -0
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/definitions.js +4921 -957
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/handlers.d.ts.map +1 -1
- package/dist/tools/handlers.js +985 -17
- package/dist/tools/handlers.js.map +1 -1
- package/dist/tools/index.d.ts +2 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/types/code-generator.d.ts +233 -1
- package/dist/types/code-generator.d.ts.map +1 -1
- package/dist/types/code-generator.js +2578 -26
- package/dist/types/code-generator.js.map +1 -1
- package/dist/types/schemas.d.ts +5438 -805
- package/dist/types/schemas.d.ts.map +1 -1
- package/dist/types/schemas.js +1135 -4
- package/dist/types/schemas.js.map +1 -1
- package/manifest.json +106 -2
- package/package.json +2 -2
package/dist/types/schemas.js
CHANGED
|
@@ -191,6 +191,15 @@ export const RelationTypeSchema = z.enum([
|
|
|
191
191
|
'parallax',
|
|
192
192
|
'bounds_to',
|
|
193
193
|
'animates',
|
|
194
|
+
// Manim-inspired animation relations
|
|
195
|
+
'grows_from',
|
|
196
|
+
'staggered_with',
|
|
197
|
+
'indicates',
|
|
198
|
+
'circumscribes',
|
|
199
|
+
'wave_through',
|
|
200
|
+
'camera_follows',
|
|
201
|
+
'camera_animates',
|
|
202
|
+
'morphs_to',
|
|
194
203
|
]).describe('Type of relationship between items');
|
|
195
204
|
// Relation parameter schemas
|
|
196
205
|
export const OrbitsParamsSchema = z.object({
|
|
@@ -233,10 +242,92 @@ export const AnimatesParamsSchema = z.object({
|
|
|
233
242
|
duration: z.number().describe('Total animation duration in seconds'),
|
|
234
243
|
loop: z.boolean().optional().default(false).describe('Whether to loop the animation'),
|
|
235
244
|
});
|
|
245
|
+
// Manim-inspired relation parameter schemas
|
|
246
|
+
export const GrowsFromParamsSchema = z.object({
|
|
247
|
+
origin: z.enum(['center', 'top', 'bottom', 'left', 'right', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight']).optional().default('center').describe('Growth origin point'),
|
|
248
|
+
duration: z.number().optional().default(1).describe('Growth duration in seconds'),
|
|
249
|
+
delay: z.number().optional().default(0).describe('Delay before starting'),
|
|
250
|
+
easing: z.string().optional().default('easeOutCubic').describe('Easing function'),
|
|
251
|
+
});
|
|
252
|
+
export const StaggeredWithParamsSchema = z.object({
|
|
253
|
+
index: z.number().describe('0-based position in the stagger sequence'),
|
|
254
|
+
stagger: z.number().optional().default(0.1).describe('Delay between items in seconds'),
|
|
255
|
+
effect: z.enum(['fadeIn', 'fadeOut', 'growIn', 'slideIn', 'popIn']).optional().default('fadeIn').describe('Stagger effect type'),
|
|
256
|
+
});
|
|
257
|
+
export const IndicatesParamsSchema = z.object({
|
|
258
|
+
scale: z.number().optional().default(1.3).describe('Max scale during indication'),
|
|
259
|
+
color: ColorSchema.optional().describe('Highlight color'),
|
|
260
|
+
duration: z.number().optional().default(0.5).describe('Indication duration in seconds'),
|
|
261
|
+
delay: z.number().optional().default(0).describe('Delay before starting'),
|
|
262
|
+
repeat: z.number().optional().default(1).describe('Number of indication cycles'),
|
|
263
|
+
});
|
|
264
|
+
export const CircumscribesParamsSchema = z.object({
|
|
265
|
+
shape: z.enum(['rectangle', 'circle', 'ellipse']).optional().default('rectangle').describe('Circumscribe shape'),
|
|
266
|
+
color: ColorSchema.optional().default('#ef4444').describe('Stroke color'),
|
|
267
|
+
strokeWidth: z.number().optional().default(2).describe('Stroke width'),
|
|
268
|
+
padding: z.number().optional().default(10).describe('Padding around target'),
|
|
269
|
+
duration: z.number().optional().default(1).describe('Draw duration in seconds'),
|
|
270
|
+
fadeOut: z.boolean().optional().default(true).describe('Fade out after drawing'),
|
|
271
|
+
});
|
|
272
|
+
export const WaveThroughParamsSchema = z.object({
|
|
273
|
+
amplitude: z.number().optional().default(20).describe('Wave amplitude in pixels'),
|
|
274
|
+
frequency: z.number().optional().default(2).describe('Number of wave cycles'),
|
|
275
|
+
direction: z.enum(['horizontal', 'vertical']).optional().default('horizontal').describe('Wave direction'),
|
|
276
|
+
duration: z.number().optional().default(1).describe('Wave duration in seconds'),
|
|
277
|
+
delay: z.number().optional().default(0).describe('Delay before starting'),
|
|
278
|
+
});
|
|
279
|
+
export const CameraFollowsParamsSchema = z.object({
|
|
280
|
+
smoothing: z.number().min(0).max(1).optional().default(0.1).describe('Camera movement smoothing'),
|
|
281
|
+
offset: PointArraySchema.optional().default([0, 0]).describe('Camera offset from target'),
|
|
282
|
+
zoom: z.number().optional().default(1).describe('Zoom level'),
|
|
283
|
+
deadzone: z.number().optional().default(50).describe('Deadzone radius in pixels'),
|
|
284
|
+
bounds: z.object({
|
|
285
|
+
minX: z.number().optional(),
|
|
286
|
+
maxX: z.number().optional(),
|
|
287
|
+
minY: z.number().optional(),
|
|
288
|
+
maxY: z.number().optional(),
|
|
289
|
+
}).optional().describe('Camera bounds'),
|
|
290
|
+
});
|
|
291
|
+
export const MorphsToParamsSchema = z.object({
|
|
292
|
+
duration: z.number().optional().default(1.5).describe('Morph duration in seconds'),
|
|
293
|
+
delay: z.number().optional().default(0).describe('Delay before starting'),
|
|
294
|
+
easing: z.string().optional().default('easeInOutCubic').describe('Easing function'),
|
|
295
|
+
morphColor: z.boolean().optional().default(true).describe('Also morph color'),
|
|
296
|
+
morphSize: z.boolean().optional().default(true).describe('Also morph size'),
|
|
297
|
+
});
|
|
298
|
+
// =============================================================================
|
|
299
|
+
// CUSTOM RELATION REGISTRATION
|
|
300
|
+
// =============================================================================
|
|
301
|
+
export const CustomRelationParamDefSchema = z.object({
|
|
302
|
+
type: z.enum(['number', 'string', 'boolean', 'array', 'object']).describe('Parameter type'),
|
|
303
|
+
default: z.any().optional().describe('Default value'),
|
|
304
|
+
description: z.string().optional().describe('Parameter description'),
|
|
305
|
+
options: z.array(z.string()).optional().describe('Valid options for string type'),
|
|
306
|
+
min: z.number().optional().describe('Minimum value for number type'),
|
|
307
|
+
max: z.number().optional().describe('Maximum value for number type'),
|
|
308
|
+
});
|
|
309
|
+
export const RegisterCustomRelationInputSchema = z.object({
|
|
310
|
+
name: z.string().describe('Unique relation type name'),
|
|
311
|
+
description: z.string().optional().describe('Human-readable description'),
|
|
312
|
+
params: z.record(z.string(), CustomRelationParamDefSchema).optional().describe('Parameter schema'),
|
|
313
|
+
computeFunction: z.string().describe('Compute function body (pure JS, receives ctx with fromPosition, toPosition, params, delta, time)'),
|
|
314
|
+
applyFunction: z.string().describe('Apply function body (can use Paper.js, receives item, target, computed, params)'),
|
|
315
|
+
templates: z.array(z.string()).optional().describe('Natural language templates for training data'),
|
|
316
|
+
continuous: z.boolean().optional().default(true).describe('Update every frame'),
|
|
317
|
+
priority: z.number().optional().default(0).describe('Execution order (lower = first)'),
|
|
318
|
+
}).describe('Register a custom relation type');
|
|
319
|
+
// =============================================================================
|
|
320
|
+
// EXECUTE CUSTOM CODE
|
|
321
|
+
// =============================================================================
|
|
322
|
+
export const ExecuteCustomCodeInputSchema = z.object({
|
|
323
|
+
code: z.string().describe('JavaScript code to execute in PinePaper context'),
|
|
324
|
+
description: z.string().optional().describe('Description of what the code does'),
|
|
325
|
+
}).describe('Execute custom JavaScript code');
|
|
236
326
|
// =============================================================================
|
|
237
327
|
// GENERATOR TYPES
|
|
238
328
|
// =============================================================================
|
|
239
329
|
export const GeneratorNameSchema = z.enum([
|
|
330
|
+
// Original generators (Phase 1 — enhanced)
|
|
240
331
|
'drawSunburst',
|
|
241
332
|
'drawSunsetScene',
|
|
242
333
|
'drawGrid',
|
|
@@ -244,13 +335,26 @@ export const GeneratorNameSchema = z.enum([
|
|
|
244
335
|
'drawCircuit',
|
|
245
336
|
'drawWaves',
|
|
246
337
|
'drawPattern',
|
|
338
|
+
// New generators (Phase 2)
|
|
339
|
+
'drawBokeh',
|
|
340
|
+
'drawGradientMesh',
|
|
341
|
+
'drawGeometricAbstract',
|
|
342
|
+
'drawWindField',
|
|
343
|
+
'drawFluidFlow',
|
|
344
|
+
'drawOrganicFlow',
|
|
345
|
+
'drawNoiseTexture',
|
|
247
346
|
]).describe('Background generator name');
|
|
248
|
-
//
|
|
347
|
+
// ---------------------------------------------------------------------------
|
|
348
|
+
// Generator parameter schemas — Phase 1 (enhanced existing)
|
|
349
|
+
// ---------------------------------------------------------------------------
|
|
249
350
|
export const SunburstParamsSchema = z.object({
|
|
250
351
|
rayCount: z.number().optional().default(16).describe('Number of rays'),
|
|
251
352
|
colors: z.array(ColorSchema).optional().default(['#FF6B6B', '#4ECDC4']).describe('Ray colors'),
|
|
252
353
|
bgColor: ColorSchema.optional().default('#1a1a2e').describe('Background color'),
|
|
253
354
|
animated: z.boolean().optional().default(true).describe('Enable rotation animation'),
|
|
355
|
+
opacity: z.number().min(0).max(1).optional().describe('Overall opacity'),
|
|
356
|
+
rayGap: z.number().optional().describe('Gap between rays in degrees'),
|
|
357
|
+
gradientRays: z.boolean().optional().describe('Radial gradient per ray'),
|
|
254
358
|
});
|
|
255
359
|
export const GridParamsSchema = z.object({
|
|
256
360
|
gridType: z.enum(['lines', 'dots', 'squares']).optional().default('lines'),
|
|
@@ -258,6 +362,12 @@ export const GridParamsSchema = z.object({
|
|
|
258
362
|
lineColor: ColorSchema.optional().default('#374151').describe('Line/dot color'),
|
|
259
363
|
bgColor: ColorSchema.optional().default('#1f2937').describe('Background color'),
|
|
260
364
|
lineWidth: z.number().optional().default(1).describe('Line thickness'),
|
|
365
|
+
opacity: z.number().min(0).max(1).optional().describe('Overall opacity'),
|
|
366
|
+
gap: z.number().optional().describe('Pixel gap between cells'),
|
|
367
|
+
randomRotation: z.boolean().optional().describe('Random rotation per cell'),
|
|
368
|
+
colorMode: z.enum(['checkerboard', 'gradient', 'random', 'rows', 'columns']).optional().describe('Cell coloring mode'),
|
|
369
|
+
strokeColor: ColorSchema.optional().describe('Cell stroke color'),
|
|
370
|
+
strokeWidth: z.number().optional().describe('Cell stroke width'),
|
|
261
371
|
});
|
|
262
372
|
export const WavesParamsSchema = z.object({
|
|
263
373
|
waveCount: z.number().optional().default(5).describe('Number of wave layers'),
|
|
@@ -266,6 +376,11 @@ export const WavesParamsSchema = z.object({
|
|
|
266
376
|
frequency: z.number().optional().default(2).describe('Wave frequency'),
|
|
267
377
|
bgColor: ColorSchema.optional().default('#0f172a').describe('Background color'),
|
|
268
378
|
animated: z.boolean().optional().default(true).describe('Animate waves'),
|
|
379
|
+
opacity: z.number().min(0).max(1).optional().describe('Overall opacity'),
|
|
380
|
+
fill: z.boolean().optional().describe('Fill between adjacent waves'),
|
|
381
|
+
fillOpacity: z.number().min(0).max(1).optional().describe('Fill opacity between waves'),
|
|
382
|
+
amplitudeVariation: z.number().optional().describe('Amplitude variation between waves'),
|
|
383
|
+
blendMode: z.string().optional().describe('CSS blend mode (e.g. screen, multiply)'),
|
|
269
384
|
});
|
|
270
385
|
export const CircuitParamsSchema = z.object({
|
|
271
386
|
lineColor: ColorSchema.optional().default('#60a5fa').describe('Circuit line color'),
|
|
@@ -274,6 +389,108 @@ export const CircuitParamsSchema = z.object({
|
|
|
274
389
|
density: z.number().min(0).max(1).optional().default(0.5).describe('Circuit complexity'),
|
|
275
390
|
animated: z.boolean().optional().default(true).describe('Enable bolt animation'),
|
|
276
391
|
boltColor: ColorSchema.optional().default('#fbbf24').describe('Animated bolt color'),
|
|
392
|
+
traceOpacity: z.number().min(0).max(1).optional().describe('Trace line opacity'),
|
|
393
|
+
nodeOpacity: z.number().min(0).max(1).optional().describe('Node opacity'),
|
|
394
|
+
diagonalPaths: z.boolean().optional().describe('Allow 45-degree trace paths'),
|
|
395
|
+
chipDensity: z.enum(['auto', 'none', 'low', 'medium', 'high']).optional().describe('IC chip density'),
|
|
396
|
+
});
|
|
397
|
+
export const StackedCirclesParamsSchema = z.object({
|
|
398
|
+
count: z.number().optional().default(8).describe('Number of circles'),
|
|
399
|
+
colors: z.array(ColorSchema).optional().describe('Circle colors'),
|
|
400
|
+
distribution: z.enum(['random', 'poisson', 'golden']).optional().default('random').describe('Circle distribution algorithm'),
|
|
401
|
+
opacityMin: z.number().min(0).max(1).optional().describe('Minimum per-circle opacity'),
|
|
402
|
+
opacityMax: z.number().min(0).max(1).optional().describe('Maximum per-circle opacity'),
|
|
403
|
+
blendMode: z.string().optional().describe('CSS blend mode (e.g. screen, multiply)'),
|
|
404
|
+
strokeWidth: z.number().optional().describe('Circle stroke width'),
|
|
405
|
+
strokeColor: ColorSchema.optional().describe('Circle stroke color'),
|
|
406
|
+
sizeGradient: z.boolean().optional().describe('Gradually decrease circle size'),
|
|
407
|
+
animationType: z.enum(['pulse', 'float', 'none']).optional().describe('Circle animation type'),
|
|
408
|
+
});
|
|
409
|
+
export const SunsetSceneParamsSchema = z.object({
|
|
410
|
+
sunColor: ColorSchema.optional().describe('Sun color'),
|
|
411
|
+
skyColors: z.array(ColorSchema).optional().describe('Sky gradient colors'),
|
|
412
|
+
cloudCount: z.number().optional().describe('Number of clouds'),
|
|
413
|
+
skyOpacity: z.number().min(0).max(1).optional().describe('Sky layer opacity'),
|
|
414
|
+
starCount: z.number().optional().describe('Number of stars'),
|
|
415
|
+
starColor: ColorSchema.optional().describe('Star color'),
|
|
416
|
+
reflectionEnabled: z.boolean().optional().describe('Enable water reflection'),
|
|
417
|
+
reflectionOpacity: z.number().min(0).max(1).optional().describe('Reflection opacity'),
|
|
418
|
+
});
|
|
419
|
+
export const PatternParamsSchema = z.object({
|
|
420
|
+
patternType: z.string().optional().describe('Pattern type (e.g. hexagon)'),
|
|
421
|
+
size: z.number().optional().describe('Pattern element size'),
|
|
422
|
+
color: ColorSchema.optional().describe('Pattern color'),
|
|
423
|
+
bgColor: ColorSchema.optional().describe('Background color'),
|
|
424
|
+
opacity: z.number().min(0).max(1).optional().describe('Overall opacity'),
|
|
425
|
+
blendMode: z.string().optional().describe('CSS blend mode'),
|
|
426
|
+
layers: z.number().min(1).max(5).optional().describe('Concentric orbit ring count (1-5)'),
|
|
427
|
+
layerScaleDecay: z.number().optional().describe('Scale decay factor between layers'),
|
|
428
|
+
});
|
|
429
|
+
// ---------------------------------------------------------------------------
|
|
430
|
+
// Generator parameter schemas — Phase 2 (new generators)
|
|
431
|
+
// ---------------------------------------------------------------------------
|
|
432
|
+
export const BokehParamsSchema = z.object({
|
|
433
|
+
count: z.number().optional().describe('Number of bokeh circles'),
|
|
434
|
+
colors: z.array(ColorSchema).optional().describe('Circle colors'),
|
|
435
|
+
bgColor: ColorSchema.optional().describe('Background color'),
|
|
436
|
+
minRadius: z.number().optional().describe('Minimum circle radius'),
|
|
437
|
+
maxRadius: z.number().optional().describe('Maximum circle radius'),
|
|
438
|
+
shadowBlur: z.number().optional().describe('Soft-focus blur amount'),
|
|
439
|
+
distribution: z.enum(['random', 'poisson']).optional().describe('Circle distribution'),
|
|
440
|
+
driftAnimation: z.boolean().optional().describe('Enable slow drift animation'),
|
|
441
|
+
opacity: z.number().min(0).max(1).optional().describe('Overall opacity'),
|
|
442
|
+
});
|
|
443
|
+
export const GradientMeshParamsSchema = z.object({
|
|
444
|
+
colors: z.array(ColorSchema).optional().describe('Gradient blob colors'),
|
|
445
|
+
bgColor: ColorSchema.optional().describe('Background color'),
|
|
446
|
+
blobCount: z.number().optional().describe('Number of gradient blobs'),
|
|
447
|
+
blendMode: z.string().optional().describe('CSS blend mode (default: screen)'),
|
|
448
|
+
drift: z.boolean().optional().describe('Enable slow drift animation'),
|
|
449
|
+
opacity: z.number().min(0).max(1).optional().describe('Overall opacity'),
|
|
450
|
+
});
|
|
451
|
+
export const GeometricAbstractParamsSchema = z.object({
|
|
452
|
+
colors: z.array(ColorSchema).optional().describe('Shape colors'),
|
|
453
|
+
bgColor: ColorSchema.optional().describe('Background color'),
|
|
454
|
+
shapeCount: z.number().optional().describe('Number of shapes'),
|
|
455
|
+
blendMode: z.string().optional().describe('CSS blend mode'),
|
|
456
|
+
rotation: z.boolean().optional().describe('Enable rotation animation'),
|
|
457
|
+
opacity: z.number().min(0).max(1).optional().describe('Overall opacity'),
|
|
458
|
+
});
|
|
459
|
+
export const WindFieldParamsSchema = z.object({
|
|
460
|
+
particleCount: z.number().optional().describe('Number of wind particles'),
|
|
461
|
+
colors: z.array(ColorSchema).optional().describe('Particle colors'),
|
|
462
|
+
bgColor: ColorSchema.optional().describe('Background color'),
|
|
463
|
+
direction: z.number().optional().describe('Wind direction in degrees'),
|
|
464
|
+
turbulence: z.number().optional().describe('Noise turbulence amount'),
|
|
465
|
+
trailLength: z.number().optional().describe('Particle trail length'),
|
|
466
|
+
speed: z.number().optional().describe('Particle speed'),
|
|
467
|
+
opacity: z.number().min(0).max(1).optional().describe('Overall opacity'),
|
|
468
|
+
});
|
|
469
|
+
export const FluidFlowParamsSchema = z.object({
|
|
470
|
+
streamCount: z.number().optional().describe('Number of fluid streams'),
|
|
471
|
+
colors: z.array(ColorSchema).optional().describe('Stream colors'),
|
|
472
|
+
bgColor: ColorSchema.optional().describe('Background color'),
|
|
473
|
+
depthLayers: z.number().optional().describe('Number of depth layers'),
|
|
474
|
+
speed: z.number().optional().describe('Flow animation speed'),
|
|
475
|
+
opacity: z.number().min(0).max(1).optional().describe('Overall opacity'),
|
|
476
|
+
});
|
|
477
|
+
export const OrganicFlowParamsSchema = z.object({
|
|
478
|
+
layerCount: z.number().optional().describe('Number of aurora/silk layers'),
|
|
479
|
+
colors: z.array(ColorSchema).optional().describe('Layer colors'),
|
|
480
|
+
bgColor: ColorSchema.optional().describe('Background color'),
|
|
481
|
+
blendMode: z.string().optional().describe('CSS blend mode (default: screen)'),
|
|
482
|
+
fillToBottom: z.boolean().optional().describe('Fill layers to bottom edge'),
|
|
483
|
+
animated: z.boolean().optional().describe('Enable flow animation'),
|
|
484
|
+
opacity: z.number().min(0).max(1).optional().describe('Overall opacity'),
|
|
485
|
+
});
|
|
486
|
+
export const NoiseTextureParamsSchema = z.object({
|
|
487
|
+
noiseType: z.enum(['perlin', 'grain', 'stipple']).optional().describe('Noise algorithm'),
|
|
488
|
+
colors: z.array(ColorSchema).optional().describe('Noise colors'),
|
|
489
|
+
bgColor: ColorSchema.optional().describe('Background color'),
|
|
490
|
+
scale: z.number().optional().describe('Noise scale'),
|
|
491
|
+
density: z.number().optional().describe('Noise density'),
|
|
492
|
+
animated: z.boolean().optional().describe('Enable animated opacity shift'),
|
|
493
|
+
opacity: z.number().min(0).max(1).optional().describe('Overall opacity'),
|
|
277
494
|
});
|
|
278
495
|
// =============================================================================
|
|
279
496
|
// EFFECT TYPES
|
|
@@ -375,7 +592,7 @@ export const DeleteItemInputSchema = z.object({
|
|
|
375
592
|
// Add Relation
|
|
376
593
|
export const AddRelationInputSchema = z.object({
|
|
377
594
|
sourceId: z.string().describe('Registry ID of the source item'),
|
|
378
|
-
targetId: z.string().describe('Registry ID of the target item'),
|
|
595
|
+
targetId: z.string().optional().describe('Registry ID of the target item (can be null for self-animations)'),
|
|
379
596
|
relationType: RelationTypeSchema,
|
|
380
597
|
params: z.record(z.unknown()).optional().default({}),
|
|
381
598
|
});
|
|
@@ -436,8 +653,8 @@ export const SetBackgroundColorInputSchema = z.object({
|
|
|
436
653
|
color: SolidColorSchema.describe('Background color to set (solid colors only)'),
|
|
437
654
|
});
|
|
438
655
|
export const SetCanvasSizeInputSchema = z.object({
|
|
439
|
-
width: z.number().describe('Canvas width'),
|
|
440
|
-
height: z.number().describe('Canvas height'),
|
|
656
|
+
width: z.number().min(100).max(4096).describe('Canvas width (100-4096)'),
|
|
657
|
+
height: z.number().min(100).max(4096).describe('Canvas height (100-4096)'),
|
|
441
658
|
preset: z.string().optional().describe('Optional preset name'),
|
|
442
659
|
});
|
|
443
660
|
// Export
|
|
@@ -566,6 +783,255 @@ export const CreateSceneInputSchema = z.object({
|
|
|
566
783
|
clearFirst: z.boolean().optional().describe('Clear canvas before creating scene (default: true)'),
|
|
567
784
|
});
|
|
568
785
|
// =============================================================================
|
|
786
|
+
// DIAGRAM SCHEMAS
|
|
787
|
+
// =============================================================================
|
|
788
|
+
/**
|
|
789
|
+
* Diagram shape types - available shapes for flowcharts, UML, network diagrams
|
|
790
|
+
*/
|
|
791
|
+
export const DiagramShapeTypeSchema = z.enum([
|
|
792
|
+
// Flowchart shapes
|
|
793
|
+
'process',
|
|
794
|
+
'decision',
|
|
795
|
+
'terminal',
|
|
796
|
+
'data',
|
|
797
|
+
'document',
|
|
798
|
+
'database',
|
|
799
|
+
'preparation',
|
|
800
|
+
// UML shapes
|
|
801
|
+
'uml-class',
|
|
802
|
+
'uml-usecase',
|
|
803
|
+
'uml-actor',
|
|
804
|
+
// Network shapes
|
|
805
|
+
'cloud',
|
|
806
|
+
'server',
|
|
807
|
+
// Basic shapes
|
|
808
|
+
'rectangle',
|
|
809
|
+
'circle',
|
|
810
|
+
'triangle',
|
|
811
|
+
'star',
|
|
812
|
+
]).describe('Type of diagram shape');
|
|
813
|
+
/**
|
|
814
|
+
* Connector routing styles
|
|
815
|
+
*/
|
|
816
|
+
export const ConnectorRoutingSchema = z.enum([
|
|
817
|
+
'direct',
|
|
818
|
+
'orthogonal',
|
|
819
|
+
'curved',
|
|
820
|
+
]).describe('Connector path routing style');
|
|
821
|
+
/**
|
|
822
|
+
* Connector line styles
|
|
823
|
+
*/
|
|
824
|
+
export const ConnectorLineStyleSchema = z.enum([
|
|
825
|
+
'solid',
|
|
826
|
+
'dashed',
|
|
827
|
+
'dotted',
|
|
828
|
+
]).describe('Connector line style');
|
|
829
|
+
/**
|
|
830
|
+
* Arrow head styles
|
|
831
|
+
*/
|
|
832
|
+
export const ArrowHeadStyleSchema = z.enum([
|
|
833
|
+
'classic',
|
|
834
|
+
'stealth',
|
|
835
|
+
'sharp',
|
|
836
|
+
'open',
|
|
837
|
+
'diamond',
|
|
838
|
+
'circle',
|
|
839
|
+
'none',
|
|
840
|
+
]).describe('Arrowhead style');
|
|
841
|
+
/**
|
|
842
|
+
* Port positions on items
|
|
843
|
+
*/
|
|
844
|
+
export const PortPositionSchema = z.enum([
|
|
845
|
+
'top',
|
|
846
|
+
'bottom',
|
|
847
|
+
'left',
|
|
848
|
+
'right',
|
|
849
|
+
'top-left',
|
|
850
|
+
'top-right',
|
|
851
|
+
'bottom-left',
|
|
852
|
+
'bottom-right',
|
|
853
|
+
'center',
|
|
854
|
+
'start',
|
|
855
|
+
'end',
|
|
856
|
+
]).describe('Port position on item');
|
|
857
|
+
/**
|
|
858
|
+
* Port types for connection direction control
|
|
859
|
+
*/
|
|
860
|
+
export const PortTypeSchema = z.enum([
|
|
861
|
+
'input',
|
|
862
|
+
'output',
|
|
863
|
+
'both',
|
|
864
|
+
]).describe('Port connection type');
|
|
865
|
+
/**
|
|
866
|
+
* Layout types for auto-layout
|
|
867
|
+
*/
|
|
868
|
+
export const LayoutTypeSchema = z.enum([
|
|
869
|
+
'hierarchical',
|
|
870
|
+
'force-directed',
|
|
871
|
+
'tree',
|
|
872
|
+
'radial',
|
|
873
|
+
'grid',
|
|
874
|
+
]).describe('Layout algorithm type');
|
|
875
|
+
/**
|
|
876
|
+
* Layout direction for hierarchical/tree layouts
|
|
877
|
+
*/
|
|
878
|
+
export const LayoutDirectionSchema = z.enum([
|
|
879
|
+
'TB',
|
|
880
|
+
'BT',
|
|
881
|
+
'LR',
|
|
882
|
+
'RL',
|
|
883
|
+
]).describe('Layout direction: TB=Top-Bottom, BT=Bottom-Top, LR=Left-Right, RL=Right-Left');
|
|
884
|
+
/**
|
|
885
|
+
* Diagram mode actions
|
|
886
|
+
*/
|
|
887
|
+
export const DiagramModeActionSchema = z.enum([
|
|
888
|
+
'activate',
|
|
889
|
+
'deactivate',
|
|
890
|
+
'toggle',
|
|
891
|
+
'setMode',
|
|
892
|
+
]).describe('Diagram mode action');
|
|
893
|
+
/**
|
|
894
|
+
* Diagram tool modes
|
|
895
|
+
*/
|
|
896
|
+
export const DiagramToolModeSchema = z.enum([
|
|
897
|
+
'select',
|
|
898
|
+
'connect',
|
|
899
|
+
'shape',
|
|
900
|
+
'pan',
|
|
901
|
+
]).describe('Diagram tool mode');
|
|
902
|
+
// =============================================================================
|
|
903
|
+
// DIAGRAM TOOL INPUT SCHEMAS
|
|
904
|
+
// =============================================================================
|
|
905
|
+
/**
|
|
906
|
+
* Create Diagram Shape input
|
|
907
|
+
*/
|
|
908
|
+
export const CreateDiagramShapeInputSchema = z.object({
|
|
909
|
+
shapeType: DiagramShapeTypeSchema,
|
|
910
|
+
position: PositionSchema.optional().default({ x: 400, y: 300 }),
|
|
911
|
+
width: z.number().optional().describe('Shape width in pixels'),
|
|
912
|
+
height: z.number().optional().describe('Shape height in pixels'),
|
|
913
|
+
label: z.string().optional().describe('Text label inside the shape'),
|
|
914
|
+
style: z.object({
|
|
915
|
+
fillColor: z.string().optional().describe('Fill color'),
|
|
916
|
+
strokeColor: z.string().optional().describe('Stroke color'),
|
|
917
|
+
strokeWidth: z.number().optional().describe('Stroke width'),
|
|
918
|
+
}).optional(),
|
|
919
|
+
});
|
|
920
|
+
/**
|
|
921
|
+
* Connect items input
|
|
922
|
+
*/
|
|
923
|
+
export const ConnectInputSchema = z.object({
|
|
924
|
+
sourceItemId: z.string().describe('Registry ID of source item'),
|
|
925
|
+
targetItemId: z.string().describe('Registry ID of target item'),
|
|
926
|
+
routing: ConnectorRoutingSchema.optional().default('orthogonal'),
|
|
927
|
+
lineColor: z.string().optional().describe('Connector line color'),
|
|
928
|
+
lineWidth: z.number().optional().describe('Line width in pixels'),
|
|
929
|
+
lineStyle: ConnectorLineStyleSchema.optional().default('solid'),
|
|
930
|
+
headStyle: ArrowHeadStyleSchema.optional().default('classic'),
|
|
931
|
+
tailStyle: ArrowHeadStyleSchema.optional().default('none'),
|
|
932
|
+
label: z.string().optional().describe('Label text on connector'),
|
|
933
|
+
curvature: z.number().min(0.1).max(1.0).optional().default(0.5).describe('Curve intensity for curved routing'),
|
|
934
|
+
boltEnabled: z.boolean().optional().default(true).describe('Enable animated bolt effect'),
|
|
935
|
+
boltColor: z.string().optional().default('#fbbf24').describe('Bolt animation color'),
|
|
936
|
+
});
|
|
937
|
+
/**
|
|
938
|
+
* Connect specific ports input
|
|
939
|
+
*/
|
|
940
|
+
export const ConnectPortsInputSchema = z.object({
|
|
941
|
+
sourceItemId: z.string().describe('Registry ID of source item'),
|
|
942
|
+
sourcePort: PortPositionSchema.describe('Port position on source'),
|
|
943
|
+
targetItemId: z.string().describe('Registry ID of target item'),
|
|
944
|
+
targetPort: PortPositionSchema.describe('Port position on target'),
|
|
945
|
+
config: z.object({
|
|
946
|
+
routing: ConnectorRoutingSchema.optional(),
|
|
947
|
+
lineColor: z.string().optional(),
|
|
948
|
+
lineWidth: z.number().optional(),
|
|
949
|
+
lineStyle: ConnectorLineStyleSchema.optional(),
|
|
950
|
+
headStyle: ArrowHeadStyleSchema.optional(),
|
|
951
|
+
tailStyle: ArrowHeadStyleSchema.optional(),
|
|
952
|
+
label: z.string().optional(),
|
|
953
|
+
curvature: z.number().min(0.1).max(1.0).optional(),
|
|
954
|
+
boltEnabled: z.boolean().optional(),
|
|
955
|
+
boltColor: z.string().optional(),
|
|
956
|
+
}).optional(),
|
|
957
|
+
});
|
|
958
|
+
/**
|
|
959
|
+
* Port configuration for custom ports
|
|
960
|
+
*/
|
|
961
|
+
export const PortConfigSchema = z.object({
|
|
962
|
+
position: PortPositionSchema,
|
|
963
|
+
type: PortTypeSchema.optional().default('both'),
|
|
964
|
+
});
|
|
965
|
+
/**
|
|
966
|
+
* Add ports input
|
|
967
|
+
*/
|
|
968
|
+
export const AddPortsInputSchema = z.object({
|
|
969
|
+
itemId: z.string().describe('Registry ID of the item'),
|
|
970
|
+
portType: z.enum(['standard', 'line', 'path', 'custom']).optional().default('standard'),
|
|
971
|
+
ports: z.array(PortConfigSchema).optional().describe('Custom port definitions'),
|
|
972
|
+
count: z.number().optional().describe('Number of ports for path type'),
|
|
973
|
+
});
|
|
974
|
+
/**
|
|
975
|
+
* Auto layout input
|
|
976
|
+
*/
|
|
977
|
+
export const AutoLayoutInputSchema = z.object({
|
|
978
|
+
layoutType: LayoutTypeSchema,
|
|
979
|
+
itemIds: z.array(z.string()).optional().describe('Items to include (default: all items with ports)'),
|
|
980
|
+
options: z.object({
|
|
981
|
+
direction: LayoutDirectionSchema.optional().default('TB'),
|
|
982
|
+
levelSpacing: z.number().optional().default(100),
|
|
983
|
+
nodeSpacing: z.number().optional().default(80),
|
|
984
|
+
iterations: z.number().optional().default(100),
|
|
985
|
+
attraction: z.number().optional().default(0.01),
|
|
986
|
+
repulsion: z.number().optional().default(1000),
|
|
987
|
+
columns: z.number().optional(),
|
|
988
|
+
cellWidth: z.number().optional().default(150),
|
|
989
|
+
cellHeight: z.number().optional().default(100),
|
|
990
|
+
centerX: z.number().optional(),
|
|
991
|
+
centerY: z.number().optional(),
|
|
992
|
+
startRadius: z.number().optional().default(100),
|
|
993
|
+
radiusStep: z.number().optional().default(80),
|
|
994
|
+
animate: z.boolean().optional().default(true),
|
|
995
|
+
animationDuration: z.number().optional().default(300),
|
|
996
|
+
}).optional(),
|
|
997
|
+
});
|
|
998
|
+
/**
|
|
999
|
+
* Get diagram shapes input
|
|
1000
|
+
*/
|
|
1001
|
+
export const GetDiagramShapesInputSchema = z.object({
|
|
1002
|
+
category: z.enum(['flowchart', 'uml', 'network', 'basic']).optional().describe('Filter by category'),
|
|
1003
|
+
});
|
|
1004
|
+
/**
|
|
1005
|
+
* Update connector input
|
|
1006
|
+
*/
|
|
1007
|
+
export const UpdateConnectorInputSchema = z.object({
|
|
1008
|
+
connectorId: z.string().describe('Connector ID to update'),
|
|
1009
|
+
style: z.object({
|
|
1010
|
+
lineColor: z.string().optional(),
|
|
1011
|
+
lineWidth: z.number().optional(),
|
|
1012
|
+
headStyle: ArrowHeadStyleSchema.optional(),
|
|
1013
|
+
tailStyle: ArrowHeadStyleSchema.optional(),
|
|
1014
|
+
routing: ConnectorRoutingSchema.optional(),
|
|
1015
|
+
lineStyle: ConnectorLineStyleSchema.optional(),
|
|
1016
|
+
}).optional(),
|
|
1017
|
+
label: z.string().optional().describe('Update connector label'),
|
|
1018
|
+
labelPosition: z.number().min(0).max(1).optional().describe('Label position along path (0-1)'),
|
|
1019
|
+
});
|
|
1020
|
+
/**
|
|
1021
|
+
* Remove connector input
|
|
1022
|
+
*/
|
|
1023
|
+
export const RemoveConnectorInputSchema = z.object({
|
|
1024
|
+
connectorId: z.string().describe('Connector ID to remove'),
|
|
1025
|
+
});
|
|
1026
|
+
/**
|
|
1027
|
+
* Diagram mode input
|
|
1028
|
+
*/
|
|
1029
|
+
export const DiagramModeInputSchema = z.object({
|
|
1030
|
+
action: DiagramModeActionSchema,
|
|
1031
|
+
mode: DiagramToolModeSchema.optional().describe('Tool mode for setMode action'),
|
|
1032
|
+
shapeType: DiagramShapeTypeSchema.optional().describe('Shape type for shape mode'),
|
|
1033
|
+
});
|
|
1034
|
+
// =============================================================================
|
|
569
1035
|
// ERROR CODES
|
|
570
1036
|
// =============================================================================
|
|
571
1037
|
export const ErrorCodes = {
|
|
@@ -576,5 +1042,670 @@ export const ErrorCodes = {
|
|
|
576
1042
|
EXPORT_FAILED: 'EXPORT_FAILED',
|
|
577
1043
|
EXECUTION_ERROR: 'EXECUTION_ERROR',
|
|
578
1044
|
VALIDATION_ERROR: 'VALIDATION_ERROR',
|
|
1045
|
+
AGENT_JOB_ERROR: 'AGENT_JOB_ERROR',
|
|
1046
|
+
BATCH_EXECUTION_ERROR: 'BATCH_EXECUTION_ERROR',
|
|
579
1047
|
};
|
|
1048
|
+
// =============================================================================
|
|
1049
|
+
// MASK TOOL SCHEMAS
|
|
1050
|
+
// =============================================================================
|
|
1051
|
+
export const MaskPresetSchema = z.enum([
|
|
1052
|
+
'wipeLeft', 'wipeRight', 'wipeUp', 'wipeDown',
|
|
1053
|
+
'iris', 'irisOut',
|
|
1054
|
+
'star', 'heart',
|
|
1055
|
+
'curtainHorizontal', 'curtainVertical', 'cinematic',
|
|
1056
|
+
'diagonalWipe',
|
|
1057
|
+
'revealUp', 'revealDown',
|
|
1058
|
+
]).describe('Mask animation preset');
|
|
1059
|
+
export const MaskTypeSchema = z.enum([
|
|
1060
|
+
'rectangle', 'circle', 'ellipse', 'star', 'triangle', 'hexagon', 'heart', 'rounded',
|
|
1061
|
+
]).describe('Mask shape type');
|
|
1062
|
+
export const MaskEasingSchema = z.enum([
|
|
1063
|
+
'linear', 'easeIn', 'easeOut', 'easeInOut', 'bounce', 'elastic',
|
|
1064
|
+
]).describe('Mask animation easing function');
|
|
1065
|
+
export const MaskKeyframePropertiesSchema = z.object({
|
|
1066
|
+
x: z.number().optional(),
|
|
1067
|
+
y: z.number().optional(),
|
|
1068
|
+
width: z.number().optional(),
|
|
1069
|
+
height: z.number().optional(),
|
|
1070
|
+
radius: z.number().optional(),
|
|
1071
|
+
radiusX: z.number().optional(),
|
|
1072
|
+
radiusY: z.number().optional(),
|
|
1073
|
+
scale: z.number().optional(),
|
|
1074
|
+
rotation: z.number().optional(),
|
|
1075
|
+
opacity: z.number().optional(),
|
|
1076
|
+
}).describe('Mask keyframe properties');
|
|
1077
|
+
export const MaskKeyframeSchema = z.object({
|
|
1078
|
+
time: z.number().min(0).max(1).describe('Normalized time (0-1)'),
|
|
1079
|
+
properties: MaskKeyframePropertiesSchema.describe('Mask properties at this keyframe'),
|
|
1080
|
+
easing: MaskEasingSchema.optional().describe('Easing function for this keyframe'),
|
|
1081
|
+
}).describe('Mask animation keyframe');
|
|
1082
|
+
export const MaskOptionsSchema = z.object({
|
|
1083
|
+
startTime: z.number().optional().default(0).describe('Start time in seconds'),
|
|
1084
|
+
duration: z.number().optional().default(0.8).describe('Duration in seconds'),
|
|
1085
|
+
easing: MaskEasingSchema.optional().default('easeOut').describe('Overall easing'),
|
|
1086
|
+
reversed: z.boolean().optional().default(false).describe('Reverse animation (hide instead of reveal)'),
|
|
1087
|
+
loop: z.boolean().optional().default(false).describe('Loop the animation'),
|
|
1088
|
+
}).describe('Mask animation options');
|
|
1089
|
+
export const MaskShapeOptionsSchema = z.object({
|
|
1090
|
+
points: z.number().optional().describe('Number of points (star mask)'),
|
|
1091
|
+
innerRadius: z.number().optional().describe('Inner radius ratio (star mask)'),
|
|
1092
|
+
}).describe('Mask shape-specific options');
|
|
1093
|
+
export const ApplyAnimatedMaskInputSchema = z.object({
|
|
1094
|
+
itemId: z.string().describe('Registry ID of the item to mask'),
|
|
1095
|
+
preset: MaskPresetSchema.optional().describe('Animation preset (Mode 1 & 3)'),
|
|
1096
|
+
maskType: MaskTypeSchema.optional().describe('Mask shape type (Mode 2)'),
|
|
1097
|
+
keyframes: z.array(MaskKeyframeSchema).optional().describe('Custom keyframes (Mode 2 & 3)'),
|
|
1098
|
+
options: MaskOptionsSchema.optional().describe('Animation options (Mode 1)'),
|
|
1099
|
+
maskOptions: MaskShapeOptionsSchema.optional().describe('Mask shape options'),
|
|
1100
|
+
}).describe('Apply animated mask input');
|
|
1101
|
+
export const ApplyCustomMaskInputSchema = z.object({
|
|
1102
|
+
itemId: z.string().describe('Registry ID of the item to mask'),
|
|
1103
|
+
maskType: MaskTypeSchema.describe('Mask shape type'),
|
|
1104
|
+
keyframes: z.array(MaskKeyframeSchema).describe('Keyframes defining the animation'),
|
|
1105
|
+
maskOptions: MaskShapeOptionsSchema.optional().describe('Mask shape options'),
|
|
1106
|
+
}).describe('Apply custom mask input');
|
|
1107
|
+
export const RemoveMaskInputSchema = z.object({
|
|
1108
|
+
itemId: z.string().describe('Registry ID of the masked item'),
|
|
1109
|
+
}).describe('Remove mask input');
|
|
1110
|
+
// =============================================================================
|
|
1111
|
+
// AGENT FLOW MODE SCHEMAS
|
|
1112
|
+
// =============================================================================
|
|
1113
|
+
/**
|
|
1114
|
+
* Platform presets for export
|
|
1115
|
+
*/
|
|
1116
|
+
export const AgentPlatformSchema = z.enum([
|
|
1117
|
+
'instagram',
|
|
1118
|
+
'instagram-story',
|
|
1119
|
+
'tiktok',
|
|
1120
|
+
'youtube',
|
|
1121
|
+
'youtube-thumbnail',
|
|
1122
|
+
'twitter',
|
|
1123
|
+
'linkedin',
|
|
1124
|
+
'web',
|
|
1125
|
+
'print-a4',
|
|
1126
|
+
'print-letter',
|
|
1127
|
+
]).describe('Target platform for export');
|
|
1128
|
+
/**
|
|
1129
|
+
* Export format types
|
|
1130
|
+
*/
|
|
1131
|
+
export const AgentExportFormatSchema = z.enum([
|
|
1132
|
+
'svg', 'png', 'gif', 'mp4', 'webm', 'pdf',
|
|
1133
|
+
]).describe('Export file format');
|
|
1134
|
+
/**
|
|
1135
|
+
* Screenshot policy for agent jobs
|
|
1136
|
+
*/
|
|
1137
|
+
export const AgentScreenshotPolicySchema = z.enum([
|
|
1138
|
+
'none', 'on_error', 'on_complete', 'on_request',
|
|
1139
|
+
]).describe('When to take screenshots during agent job');
|
|
1140
|
+
/**
|
|
1141
|
+
* Start job input schema
|
|
1142
|
+
*/
|
|
1143
|
+
export const AgentStartJobInputSchema = z.object({
|
|
1144
|
+
name: z.string().optional().describe('Optional job name for tracking'),
|
|
1145
|
+
headless: z.boolean().optional().default(true).describe('Run browser in headless mode'),
|
|
1146
|
+
screenshotPolicy: AgentScreenshotPolicySchema.optional().default('on_complete'),
|
|
1147
|
+
canvasPreset: AgentPlatformSchema.optional().describe('Canvas size preset to apply'),
|
|
1148
|
+
canvasSize: z.object({
|
|
1149
|
+
width: z.number().positive(),
|
|
1150
|
+
height: z.number().positive(),
|
|
1151
|
+
}).optional().describe('Custom canvas dimensions'),
|
|
1152
|
+
backgroundColor: z.string().optional().describe('Background color to set'),
|
|
1153
|
+
clearCanvas: z.boolean().optional().default(true).describe('Clear canvas when starting job'),
|
|
1154
|
+
}).describe('Options for starting an agent job');
|
|
1155
|
+
/**
|
|
1156
|
+
* End job input schema
|
|
1157
|
+
*/
|
|
1158
|
+
export const AgentEndJobInputSchema = z.object({
|
|
1159
|
+
takeScreenshot: z.boolean().optional().default(true).describe('Take final screenshot'),
|
|
1160
|
+
analyzeContent: z.boolean().optional().default(true).describe('Analyze content for export recommendations'),
|
|
1161
|
+
}).describe('Options for ending an agent job');
|
|
1162
|
+
/**
|
|
1163
|
+
* Reset input schema
|
|
1164
|
+
*/
|
|
1165
|
+
export const AgentResetInputSchema = z.object({
|
|
1166
|
+
preserveCanvasSize: z.boolean().optional().default(true).describe('Keep current canvas dimensions'),
|
|
1167
|
+
preserveBackground: z.boolean().optional().default(false).describe('Keep current background color'),
|
|
1168
|
+
canvasPreset: AgentPlatformSchema.optional().describe('New canvas preset to apply'),
|
|
1169
|
+
backgroundColor: z.string().optional().describe('New background color'),
|
|
1170
|
+
}).describe('Options for resetting canvas between jobs');
|
|
1171
|
+
/**
|
|
1172
|
+
* Batch operation type
|
|
1173
|
+
*/
|
|
1174
|
+
export const AgentBatchOperationTypeSchema = z.enum([
|
|
1175
|
+
'set_canvas_size', 'set_background', 'execute_generator',
|
|
1176
|
+
'create', 'modify', 'delete',
|
|
1177
|
+
'animate', 'keyframe_animate', 'relation',
|
|
1178
|
+
'apply_mask', 'apply_effect',
|
|
1179
|
+
'play_timeline',
|
|
1180
|
+
]).describe('Type of batch operation');
|
|
1181
|
+
/**
|
|
1182
|
+
* Single batch operation — all fields optional, used per operation type
|
|
1183
|
+
*/
|
|
1184
|
+
export const AgentBatchOperationSchema = z.object({
|
|
1185
|
+
type: AgentBatchOperationTypeSchema,
|
|
1186
|
+
// Create operation fields
|
|
1187
|
+
itemType: z.string().optional().describe('Item type for create operations'),
|
|
1188
|
+
position: z.object({
|
|
1189
|
+
x: z.number(),
|
|
1190
|
+
y: z.number(),
|
|
1191
|
+
}).optional().describe('Position for create operations'),
|
|
1192
|
+
properties: z.record(z.unknown()).optional().describe('Properties for create/modify operations'),
|
|
1193
|
+
// Modify/Animate/Delete/Keyframe/Mask/Effect target
|
|
1194
|
+
itemId: z.string().optional().describe('Target item ID or $N reference'),
|
|
1195
|
+
// Animate operation fields
|
|
1196
|
+
animationType: z.string().optional().describe('Animation type for animate operations'),
|
|
1197
|
+
animationOptions: z.record(z.unknown()).optional().describe('Animation options'),
|
|
1198
|
+
// Relation operation fields
|
|
1199
|
+
sourceId: z.string().optional().describe('Source item ID for relations'),
|
|
1200
|
+
targetId: z.string().optional().describe('Target item ID for relations'),
|
|
1201
|
+
relationType: z.string().optional().describe('Relation type'),
|
|
1202
|
+
relationOptions: z.record(z.unknown()).optional().describe('Relation options'),
|
|
1203
|
+
// Set background fields
|
|
1204
|
+
backgroundColor: z.string().optional().describe('Background color for set_background'),
|
|
1205
|
+
// Execute generator fields
|
|
1206
|
+
generatorName: z.string().optional().describe('Generator name for execute_generator'),
|
|
1207
|
+
generatorParams: z.record(z.unknown()).optional().describe('Generator parameters'),
|
|
1208
|
+
// Set canvas size fields
|
|
1209
|
+
width: z.number().min(100).max(4096).optional().describe('Canvas width for set_canvas_size (100-4096)'),
|
|
1210
|
+
height: z.number().min(100).max(4096).optional().describe('Canvas height for set_canvas_size (100-4096)'),
|
|
1211
|
+
preset: z.string().optional().describe('Canvas preset for set_canvas_size (e.g. instagram, youtube)'),
|
|
1212
|
+
// Keyframe animate fields
|
|
1213
|
+
keyframes: z.array(z.object({
|
|
1214
|
+
time: z.number(),
|
|
1215
|
+
properties: z.record(z.unknown()),
|
|
1216
|
+
easing: z.string().optional(),
|
|
1217
|
+
})).optional().describe('Keyframes for keyframe_animate [{time, properties, easing}]'),
|
|
1218
|
+
duration: z.number().optional().describe('Duration in seconds for keyframe_animate or play_timeline'),
|
|
1219
|
+
loop: z.boolean().optional().describe('Loop for keyframe_animate or play_timeline'),
|
|
1220
|
+
// Apply mask fields
|
|
1221
|
+
maskPreset: z.string().optional().describe('Mask preset for apply_mask (wipeLeft, wipeRight, wipeUp, wipeDown, iris, irisOut, star, heart, curtainHorizontal, curtainVertical, cinematic, diagonalWipe, revealUp, revealDown)'),
|
|
1222
|
+
maskType: z.string().optional().describe('Mask shape for apply_mask (rectangle, circle, ellipse, star, triangle, hexagon, heart, rounded)'),
|
|
1223
|
+
maskOptions: z.record(z.unknown()).optional().describe('Mask options'),
|
|
1224
|
+
// Apply effect fields
|
|
1225
|
+
effectType: z.string().optional().describe('Effect type for apply_effect (sparkle, blast)'),
|
|
1226
|
+
effectParams: z.record(z.unknown()).optional().describe('Effect parameters'),
|
|
1227
|
+
// Play timeline fields
|
|
1228
|
+
action: z.string().optional().describe('Timeline action for play_timeline (play, stop, seek)'),
|
|
1229
|
+
time: z.number().optional().describe('Seek time for play_timeline'),
|
|
1230
|
+
}).describe('Single batch operation');
|
|
1231
|
+
/**
|
|
1232
|
+
* Batch execute input schema
|
|
1233
|
+
*/
|
|
1234
|
+
export const AgentBatchExecuteInputSchema = z.object({
|
|
1235
|
+
operations: z.array(AgentBatchOperationSchema).min(1).describe('Array of operations to execute'),
|
|
1236
|
+
atomic: z.boolean().optional().default(true).describe('Rollback all operations on any failure'),
|
|
1237
|
+
}).describe('Batch execution input');
|
|
1238
|
+
/**
|
|
1239
|
+
* Smart export input schema
|
|
1240
|
+
*/
|
|
1241
|
+
export const AgentExportInputSchema = z.object({
|
|
1242
|
+
platform: z.union([AgentPlatformSchema, z.literal('auto')]).optional().default('auto').describe('Target platform'),
|
|
1243
|
+
format: z.union([AgentExportFormatSchema, z.literal('auto')]).optional().default('auto').describe('Export format'),
|
|
1244
|
+
quality: z.enum(['draft', 'standard', 'high']).optional().default('standard').describe('Export quality level'),
|
|
1245
|
+
includeRecommendations: z.boolean().optional().default(true).describe('Include alternative format recommendations'),
|
|
1246
|
+
}).describe('Smart export options');
|
|
1247
|
+
/**
|
|
1248
|
+
* Analyze content input schema
|
|
1249
|
+
*/
|
|
1250
|
+
export const AgentAnalyzeInputSchema = z.object({}).describe('Analyze current canvas content');
|
|
1251
|
+
// =============================================================================
|
|
1252
|
+
// INTERACTIVE / TRIGGER SCHEMAS
|
|
1253
|
+
// =============================================================================
|
|
1254
|
+
/**
|
|
1255
|
+
* Trigger event types
|
|
1256
|
+
*/
|
|
1257
|
+
export const TriggerEventSchema = z.enum([
|
|
1258
|
+
'click',
|
|
1259
|
+
'hover_enter',
|
|
1260
|
+
'hover_exit',
|
|
1261
|
+
'drag_start',
|
|
1262
|
+
'drag_move',
|
|
1263
|
+
'drag_end',
|
|
1264
|
+
'timeline',
|
|
1265
|
+
'scene_enter',
|
|
1266
|
+
'scene_exit',
|
|
1267
|
+
'animation_end',
|
|
1268
|
+
'quiz_answer',
|
|
1269
|
+
'score_change',
|
|
1270
|
+
]).describe('Event type that triggers an action');
|
|
1271
|
+
/**
|
|
1272
|
+
* Action types
|
|
1273
|
+
*/
|
|
1274
|
+
export const ActionTypeSchema = z.enum([
|
|
1275
|
+
'show',
|
|
1276
|
+
'hide',
|
|
1277
|
+
'toggle_visibility',
|
|
1278
|
+
'play_animation',
|
|
1279
|
+
'stop_animation',
|
|
1280
|
+
'navigate',
|
|
1281
|
+
'update_property',
|
|
1282
|
+
'set_variable',
|
|
1283
|
+
'play_sound',
|
|
1284
|
+
'emit_event',
|
|
1285
|
+
'add_class',
|
|
1286
|
+
'remove_class',
|
|
1287
|
+
'submit_answer',
|
|
1288
|
+
'increment_score',
|
|
1289
|
+
'reset_quiz',
|
|
1290
|
+
'call_function',
|
|
1291
|
+
]).describe('Type of action to perform');
|
|
1292
|
+
/**
|
|
1293
|
+
* Trigger condition
|
|
1294
|
+
*/
|
|
1295
|
+
export const TriggerConditionSchema = z.object({
|
|
1296
|
+
property: z.string().describe('Property to check'),
|
|
1297
|
+
operator: z.enum(['eq', 'neq', 'gt', 'gte', 'lt', 'lte', 'contains']),
|
|
1298
|
+
value: z.unknown().describe('Value to compare against'),
|
|
1299
|
+
}).describe('Condition for trigger');
|
|
1300
|
+
/**
|
|
1301
|
+
* Action definition
|
|
1302
|
+
*/
|
|
1303
|
+
export const TriggerActionSchema = z.object({
|
|
1304
|
+
type: ActionTypeSchema,
|
|
1305
|
+
targetItemId: z.string().optional().describe('Item to act upon'),
|
|
1306
|
+
property: z.string().optional().describe('Property to update'),
|
|
1307
|
+
value: z.unknown().optional().describe('New value'),
|
|
1308
|
+
animationType: z.string().optional().describe('Animation type to play'),
|
|
1309
|
+
duration: z.number().optional().describe('Action duration in ms'),
|
|
1310
|
+
easing: EasingSchema.optional(),
|
|
1311
|
+
sceneId: z.string().optional().describe('Scene to navigate to'),
|
|
1312
|
+
variableName: z.string().optional().describe('Variable name'),
|
|
1313
|
+
soundUrl: z.string().optional().describe('Audio URL'),
|
|
1314
|
+
answerId: z.string().optional().describe('Answer ID for quiz'),
|
|
1315
|
+
points: z.number().optional().describe('Points to add'),
|
|
1316
|
+
delay: z.number().optional().default(0).describe('Delay before action in ms'),
|
|
1317
|
+
}).describe('Action to execute');
|
|
1318
|
+
/**
|
|
1319
|
+
* Add trigger input
|
|
1320
|
+
*/
|
|
1321
|
+
export const AddTriggerInputSchema = z.object({
|
|
1322
|
+
itemId: z.string().describe('Registry ID of the item'),
|
|
1323
|
+
event: TriggerEventSchema,
|
|
1324
|
+
time: z.number().optional().describe('Time in seconds for timeline triggers'),
|
|
1325
|
+
timelineOffset: z.number().optional().describe('Time offset in ms for timeline triggers'),
|
|
1326
|
+
conditions: z.array(TriggerConditionSchema).optional().describe('Conditions that must be met'),
|
|
1327
|
+
condition: z.string().optional().describe('Optional condition expression (e.g., "$score > 10")'),
|
|
1328
|
+
actions: z.array(TriggerActionSchema).min(1).describe('Actions to execute'),
|
|
1329
|
+
once: z.boolean().optional().default(false).describe('Fire only once'),
|
|
1330
|
+
}).describe('Add trigger to item');
|
|
1331
|
+
/**
|
|
1332
|
+
* Remove trigger input
|
|
1333
|
+
*/
|
|
1334
|
+
export const RemoveTriggerInputSchema = z.object({
|
|
1335
|
+
itemId: z.string().describe('Registry ID of the item'),
|
|
1336
|
+
triggerId: z.string().optional().describe('Specific trigger ID to remove'),
|
|
1337
|
+
event: TriggerEventSchema.optional().describe('Remove all triggers of this event type'),
|
|
1338
|
+
removeAll: z.boolean().optional().describe('Remove all triggers from item'),
|
|
1339
|
+
}).describe('Remove triggers from item');
|
|
1340
|
+
/**
|
|
1341
|
+
* Query triggers input
|
|
1342
|
+
*/
|
|
1343
|
+
export const QueryTriggersInputSchema = z.object({
|
|
1344
|
+
itemId: z.string().optional().describe('Filter by item ID'),
|
|
1345
|
+
event: TriggerEventSchema.optional().describe('Filter by event type'),
|
|
1346
|
+
}).describe('Query triggers');
|
|
1347
|
+
// =============================================================================
|
|
1348
|
+
// QUIZ / LMS SCHEMAS
|
|
1349
|
+
// =============================================================================
|
|
1350
|
+
/**
|
|
1351
|
+
* Quiz question types
|
|
1352
|
+
*/
|
|
1353
|
+
export const QuizQuestionTypeSchema = z.enum([
|
|
1354
|
+
'multiple-choice',
|
|
1355
|
+
'multiple-select',
|
|
1356
|
+
'drag-drop',
|
|
1357
|
+
'matching',
|
|
1358
|
+
'sequencing',
|
|
1359
|
+
'hotspot',
|
|
1360
|
+
'fill-blank',
|
|
1361
|
+
'true-false',
|
|
1362
|
+
]).describe('Type of quiz question');
|
|
1363
|
+
/**
|
|
1364
|
+
* Quiz answer option
|
|
1365
|
+
*/
|
|
1366
|
+
export const QuizAnswerOptionSchema = z.object({
|
|
1367
|
+
id: z.string().describe('Unique answer ID'),
|
|
1368
|
+
itemId: z.string().optional().describe('Associated canvas item ID'),
|
|
1369
|
+
label: z.string().describe('Answer text'),
|
|
1370
|
+
isCorrect: z.boolean().describe('Is this the correct answer'),
|
|
1371
|
+
feedback: z.string().optional().describe('Feedback when selected'),
|
|
1372
|
+
points: z.number().optional().default(1).describe('Points for this answer'),
|
|
1373
|
+
}).describe('Quiz answer option');
|
|
1374
|
+
/**
|
|
1375
|
+
* Drop zone for drag-drop
|
|
1376
|
+
*/
|
|
1377
|
+
export const DropZoneSchema = z.object({
|
|
1378
|
+
id: z.string().describe('Zone ID'),
|
|
1379
|
+
itemId: z.string().describe('Canvas item that is the drop zone'),
|
|
1380
|
+
acceptsItems: z.array(z.string()).describe('Item IDs that can be dropped here'),
|
|
1381
|
+
label: z.string().optional(),
|
|
1382
|
+
}).describe('Drag-drop zone');
|
|
1383
|
+
/**
|
|
1384
|
+
* Quiz question definition
|
|
1385
|
+
*/
|
|
1386
|
+
export const QuizQuestionSchema = z.object({
|
|
1387
|
+
id: z.string().describe('Question ID'),
|
|
1388
|
+
type: QuizQuestionTypeSchema,
|
|
1389
|
+
prompt: z.string().describe('Question text'),
|
|
1390
|
+
promptItemId: z.string().optional().describe('Canvas item showing prompt'),
|
|
1391
|
+
options: z.array(QuizAnswerOptionSchema).optional(),
|
|
1392
|
+
maxSelections: z.number().optional().describe('Max selections for multi-select'),
|
|
1393
|
+
draggableItems: z.array(z.string()).optional().describe('Draggable item IDs'),
|
|
1394
|
+
dropZones: z.array(DropZoneSchema).optional(),
|
|
1395
|
+
correctSequence: z.array(z.string()).optional().describe('Correct order for sequencing'),
|
|
1396
|
+
points: z.number().optional().default(1).describe('Points for question'),
|
|
1397
|
+
partialCredit: z.boolean().optional().default(false),
|
|
1398
|
+
attempts: z.number().optional().describe('Max attempts'),
|
|
1399
|
+
correctFeedback: z.string().optional(),
|
|
1400
|
+
incorrectFeedback: z.string().optional(),
|
|
1401
|
+
onCorrectActions: z.array(TriggerActionSchema).optional(),
|
|
1402
|
+
onIncorrectActions: z.array(TriggerActionSchema).optional(),
|
|
1403
|
+
}).describe('Quiz question');
|
|
1404
|
+
/**
|
|
1405
|
+
* Create quiz input
|
|
1406
|
+
*/
|
|
1407
|
+
export const CreateQuizInputSchema = z.object({
|
|
1408
|
+
id: z.string().optional().describe('Quiz ID'),
|
|
1409
|
+
title: z.string().optional().describe('Quiz title'),
|
|
1410
|
+
questions: z.array(QuizQuestionSchema).min(1),
|
|
1411
|
+
shuffleQuestions: z.boolean().optional().default(false),
|
|
1412
|
+
shuffleOptions: z.boolean().optional().default(false),
|
|
1413
|
+
showFeedback: z.enum(['immediate', 'after-submit', 'never']).optional().default('immediate'),
|
|
1414
|
+
showScore: z.boolean().optional().default(true).describe('Display score during quiz'),
|
|
1415
|
+
passingScore: z.number().optional().describe('Minimum score to pass (percentage)'),
|
|
1416
|
+
allowRetry: z.boolean().optional().default(true),
|
|
1417
|
+
trackProgress: z.boolean().optional().default(true),
|
|
1418
|
+
}).describe('Create quiz input');
|
|
1419
|
+
/**
|
|
1420
|
+
* Get quiz state input
|
|
1421
|
+
*/
|
|
1422
|
+
export const GetQuizStateInputSchema = z.object({
|
|
1423
|
+
quizId: z.string().optional().describe('Quiz ID (uses active quiz if not specified)'),
|
|
1424
|
+
}).describe('Get quiz state');
|
|
1425
|
+
/**
|
|
1426
|
+
* Reset quiz input
|
|
1427
|
+
*/
|
|
1428
|
+
export const ResetQuizInputSchema = z.object({
|
|
1429
|
+
quizId: z.string().optional().describe('Quiz ID to reset (uses active quiz if not specified)'),
|
|
1430
|
+
}).describe('Reset quiz');
|
|
1431
|
+
// =============================================================================
|
|
1432
|
+
// WIDGET EXPORT SCHEMAS
|
|
1433
|
+
// =============================================================================
|
|
1434
|
+
/**
|
|
1435
|
+
* Widget export format
|
|
1436
|
+
*/
|
|
1437
|
+
export const WidgetExportFormatSchema = z.enum([
|
|
1438
|
+
'web-component',
|
|
1439
|
+
'standalone-html',
|
|
1440
|
+
'iframe-embed',
|
|
1441
|
+
'react-component',
|
|
1442
|
+
'vue-component',
|
|
1443
|
+
]).describe('Widget export format');
|
|
1444
|
+
/**
|
|
1445
|
+
* Widget sizing mode
|
|
1446
|
+
*/
|
|
1447
|
+
export const WidgetSizingSchema = z.enum([
|
|
1448
|
+
'fixed',
|
|
1449
|
+
'responsive',
|
|
1450
|
+
'fluid',
|
|
1451
|
+
]).describe('How widget sizes itself');
|
|
1452
|
+
/**
|
|
1453
|
+
* Widget interactivity level
|
|
1454
|
+
*/
|
|
1455
|
+
export const WidgetInteractivitySchema = z.enum([
|
|
1456
|
+
'none',
|
|
1457
|
+
'view',
|
|
1458
|
+
'full',
|
|
1459
|
+
]).describe('Interactivity level');
|
|
1460
|
+
/**
|
|
1461
|
+
* Export widget input
|
|
1462
|
+
*/
|
|
1463
|
+
export const ExportWidgetInputSchema = z.object({
|
|
1464
|
+
format: WidgetExportFormatSchema,
|
|
1465
|
+
sizing: WidgetSizingSchema.optional().default('responsive'),
|
|
1466
|
+
interactivity: WidgetInteractivitySchema.optional().default('full'),
|
|
1467
|
+
width: z.number().optional().describe('Fixed width in pixels'),
|
|
1468
|
+
height: z.number().optional().describe('Fixed height in pixels'),
|
|
1469
|
+
aspectRatio: z.string().optional().describe('Aspect ratio (e.g., "16:9")'),
|
|
1470
|
+
backgroundColor: z.string().optional().describe('Background color'),
|
|
1471
|
+
showControls: z.boolean().optional().default(true).describe('Show playback controls'),
|
|
1472
|
+
autoplay: z.boolean().optional().default(false),
|
|
1473
|
+
loop: z.boolean().optional().default(true),
|
|
1474
|
+
lazyLoad: z.boolean().optional().default(true).describe('Load assets lazily'),
|
|
1475
|
+
lmsEnabled: z.boolean().optional().default(false).describe('Enable LMS tracking'),
|
|
1476
|
+
allowedDomains: z.array(z.string()).optional().describe('Allowed embed domains'),
|
|
1477
|
+
}).describe('Export widget options');
|
|
1478
|
+
// =============================================================================
|
|
1479
|
+
// LETTER COLLAGE SCHEMAS
|
|
1480
|
+
// =============================================================================
|
|
1481
|
+
export const LetterCollageStyleSchema = z.enum([
|
|
1482
|
+
'tile',
|
|
1483
|
+
'magazine',
|
|
1484
|
+
'paperCut',
|
|
1485
|
+
'fold',
|
|
1486
|
+
'gradient',
|
|
1487
|
+
'image',
|
|
1488
|
+
]).describe('Style type for letter collage');
|
|
1489
|
+
export const TilePaletteSchema = z.enum([
|
|
1490
|
+
// Game
|
|
1491
|
+
'wordle', 'scrabble',
|
|
1492
|
+
// Vibrant
|
|
1493
|
+
'candy', 'neon', 'rainbow',
|
|
1494
|
+
// Soft
|
|
1495
|
+
'pastel', 'cotton',
|
|
1496
|
+
// Natural
|
|
1497
|
+
'earth', 'ocean', 'forest', 'sunset',
|
|
1498
|
+
// Professional
|
|
1499
|
+
'corporate', 'minimal', 'slate',
|
|
1500
|
+
// Seasonal
|
|
1501
|
+
'christmas', 'halloween', 'spring',
|
|
1502
|
+
// Magazine
|
|
1503
|
+
'magazine', 'newspaper', 'vintage',
|
|
1504
|
+
// Paper Craft
|
|
1505
|
+
'paperCraft', 'origami', 'craftPaper',
|
|
1506
|
+
]).describe('Color palette for tile style');
|
|
1507
|
+
export const GradientPaletteSchema = z.enum([
|
|
1508
|
+
'rainbow', 'sunset', 'ocean', 'fire', 'gold', 'rose', 'ice', 'cyberpunk', 'neonGlow', 'purplePink',
|
|
1509
|
+
]).describe('Gradient palette for gradient style');
|
|
1510
|
+
export const GradientDirectionSchema = z.enum([
|
|
1511
|
+
'vertical', 'horizontal', 'diagonal', 'radial',
|
|
1512
|
+
]).describe('Direction for gradient style');
|
|
1513
|
+
export const LetterCollageAnimationSchema = z.enum([
|
|
1514
|
+
'pulse', 'bounce', 'fade', 'wobble', 'rotate',
|
|
1515
|
+
]).describe('Animation type for letter collage');
|
|
1516
|
+
export const CreateLetterCollageInputSchema = z.object({
|
|
1517
|
+
text: z.string().min(1).describe('The text to stylize'),
|
|
1518
|
+
style: LetterCollageStyleSchema.optional().default('tile').describe('Style type for the letter collage'),
|
|
1519
|
+
palette: TilePaletteSchema.optional().describe('Color palette name for tile/magazine styles'),
|
|
1520
|
+
position: PositionSchema.optional().describe('Position on canvas (defaults to center)'),
|
|
1521
|
+
fontSize: z.number().optional().default(48).describe('Base font size in pixels'),
|
|
1522
|
+
fontFamily: z.string().optional().default('Inter, sans-serif').describe('Font family to use'),
|
|
1523
|
+
spacing: z.number().optional().default(1.1).describe('Letter spacing multiplier'),
|
|
1524
|
+
gradientPalette: GradientPaletteSchema.optional().describe('Gradient palette name (for style="gradient")'),
|
|
1525
|
+
gradientDirection: GradientDirectionSchema.optional().default('vertical').describe('Gradient direction (for style="gradient")'),
|
|
1526
|
+
cornerRadius: z.number().optional().default(4).describe('Corner radius for tile backgrounds'),
|
|
1527
|
+
shadowEnabled: z.boolean().optional().default(true).describe('Enable drop shadows'),
|
|
1528
|
+
}).describe('Create letter collage input');
|
|
1529
|
+
export const AnimateLetterCollageInputSchema = z.object({
|
|
1530
|
+
collageId: z.string().describe('Collage ID from create_letter_collage'),
|
|
1531
|
+
animationType: LetterCollageAnimationSchema.describe('Animation type to apply'),
|
|
1532
|
+
staggerDelay: z.number().optional().default(0.1).describe('Delay between each letter animation start (seconds)'),
|
|
1533
|
+
animationSpeed: z.number().optional().default(1).describe('Animation speed multiplier'),
|
|
1534
|
+
}).describe('Animate letter collage input');
|
|
1535
|
+
export const GetLetterCollageOptionsInputSchema = z.object({}).describe('Get letter collage options input (no parameters)');
|
|
1536
|
+
// =============================================================================
|
|
1537
|
+
// CANVAS PRESETS SCHEMA
|
|
1538
|
+
// =============================================================================
|
|
1539
|
+
export const GetCanvasPresetsInputSchema = z.object({}).describe('Get canvas presets input (no parameters)');
|
|
1540
|
+
// =============================================================================
|
|
1541
|
+
// MAP SCHEMAS
|
|
1542
|
+
// =============================================================================
|
|
1543
|
+
export const MapIdSchema = z.enum(['world', 'worldHighRes', 'usa']).describe('Available map types');
|
|
1544
|
+
export const MapProjectionSchema = z.enum([
|
|
1545
|
+
'mercator', 'equalEarth', 'naturalEarth', 'orthographic', 'albers', 'stereographic',
|
|
1546
|
+
]).describe('Map projection types');
|
|
1547
|
+
export const MapQualitySchema = z.enum(['fast', 'balanced', 'professional']).describe('Map rendering quality');
|
|
1548
|
+
export const ColorScaleSchema = z.enum([
|
|
1549
|
+
'blues', 'greens', 'reds', 'oranges', 'purples', 'heat',
|
|
1550
|
+
]).describe('Color scale for choropleth maps');
|
|
1551
|
+
export const LegendPositionSchema = z.enum([
|
|
1552
|
+
'top-left', 'top-right', 'bottom-left', 'bottom-right',
|
|
1553
|
+
]).describe('Legend position on map');
|
|
1554
|
+
export const MarkerShapeSchema = z.enum(['circle', 'pin', 'star']).describe('Marker shape types');
|
|
1555
|
+
export const LabelTypeSchema = z.enum(['name', 'code', 'value']).describe('Label content type');
|
|
1556
|
+
export const LoadMapInputSchema = z.object({
|
|
1557
|
+
mapId: MapIdSchema.describe('Map to load'),
|
|
1558
|
+
projection: MapProjectionSchema.optional().describe('Map projection type'),
|
|
1559
|
+
quality: MapQualitySchema.optional().describe('Rendering quality'),
|
|
1560
|
+
fillColor: z.string().optional().describe('Default fill color for regions'),
|
|
1561
|
+
strokeColor: z.string().optional().describe('Border color'),
|
|
1562
|
+
strokeWidth: z.number().optional().describe('Border width'),
|
|
1563
|
+
scale: z.number().optional().describe('Scale multiplier'),
|
|
1564
|
+
center: z.tuple([z.number(), z.number()]).optional().describe('Center coordinates [lon, lat]'),
|
|
1565
|
+
rotate: z.tuple([z.number(), z.number(), z.number()]).optional().describe('Rotation angles [x, y, z]'),
|
|
1566
|
+
enableHover: z.boolean().optional().describe('Enable hover effects'),
|
|
1567
|
+
enableClick: z.boolean().optional().describe('Enable click events'),
|
|
1568
|
+
hoverFill: z.string().optional().describe('Hover fill color'),
|
|
1569
|
+
hoverStroke: z.string().optional().describe('Hover stroke color'),
|
|
1570
|
+
}).describe('Load map input');
|
|
1571
|
+
export const HighlightRegionsInputSchema = z.object({
|
|
1572
|
+
regionIds: z.array(z.string()).describe('Array of region IDs to highlight'),
|
|
1573
|
+
options: z.object({
|
|
1574
|
+
fillColor: z.string().optional().describe('Highlight fill color'),
|
|
1575
|
+
strokeColor: z.string().optional().describe('Highlight stroke color'),
|
|
1576
|
+
strokeWidth: z.number().optional().describe('Highlight stroke width'),
|
|
1577
|
+
animate: z.boolean().optional().describe('Animate the highlight'),
|
|
1578
|
+
}).optional().describe('Highlight options'),
|
|
1579
|
+
}).describe('Highlight regions input');
|
|
1580
|
+
export const UnhighlightRegionsInputSchema = z.object({
|
|
1581
|
+
regionIds: z.union([
|
|
1582
|
+
z.array(z.string()),
|
|
1583
|
+
z.literal('all'),
|
|
1584
|
+
]).describe('Region IDs to unhighlight, or "all"'),
|
|
1585
|
+
}).describe('Unhighlight regions input');
|
|
1586
|
+
export const ApplyDataColorsInputSchema = z.object({
|
|
1587
|
+
data: z.record(z.string(), z.number()).describe('Object mapping region IDs to values'),
|
|
1588
|
+
options: z.object({
|
|
1589
|
+
colorScale: ColorScaleSchema.optional().describe('Color scale to use'),
|
|
1590
|
+
minValue: z.number().optional().describe('Minimum value for scale'),
|
|
1591
|
+
maxValue: z.number().optional().describe('Maximum value for scale'),
|
|
1592
|
+
showLegend: z.boolean().optional().describe('Display color legend'),
|
|
1593
|
+
legendPosition: LegendPositionSchema.optional().describe('Legend position'),
|
|
1594
|
+
legendTitle: z.string().optional().describe('Title for the legend'),
|
|
1595
|
+
}).optional().describe('Choropleth options'),
|
|
1596
|
+
}).describe('Apply data colors input');
|
|
1597
|
+
export const AddMarkerInputSchema = z.object({
|
|
1598
|
+
lat: z.number().describe('Latitude'),
|
|
1599
|
+
lon: z.number().describe('Longitude'),
|
|
1600
|
+
label: z.string().optional().describe('Marker label text'),
|
|
1601
|
+
color: z.string().optional().describe('Marker color'),
|
|
1602
|
+
size: z.number().optional().describe('Marker size in pixels'),
|
|
1603
|
+
pulse: z.boolean().optional().describe('Enable pulse animation'),
|
|
1604
|
+
shape: MarkerShapeSchema.optional().describe('Marker shape'),
|
|
1605
|
+
}).describe('Add marker input');
|
|
1606
|
+
export const AddMapLabelsInputSchema = z.object({
|
|
1607
|
+
regions: z.array(z.string()).optional().describe('Specific regions to label (null for all)'),
|
|
1608
|
+
options: z.object({
|
|
1609
|
+
fontSize: z.number().optional().describe('Label font size'),
|
|
1610
|
+
fontColor: z.string().optional().describe('Label text color'),
|
|
1611
|
+
labelType: LabelTypeSchema.optional().describe('Type of label content'),
|
|
1612
|
+
backgroundColor: z.string().optional().describe('Label background color'),
|
|
1613
|
+
}).optional().describe('Label options'),
|
|
1614
|
+
}).describe('Add map labels input');
|
|
1615
|
+
export const PanMapInputSchema = z.object({
|
|
1616
|
+
lat: z.number().describe('Target latitude'),
|
|
1617
|
+
lon: z.number().describe('Target longitude'),
|
|
1618
|
+
animate: z.boolean().optional().describe('Animate the pan'),
|
|
1619
|
+
duration: z.number().optional().describe('Animation duration in seconds'),
|
|
1620
|
+
}).describe('Pan map input');
|
|
1621
|
+
export const ZoomMapInputSchema = z.object({
|
|
1622
|
+
level: z.number().describe('Zoom level (1 = full view)'),
|
|
1623
|
+
animate: z.boolean().optional().describe('Animate the zoom'),
|
|
1624
|
+
duration: z.number().optional().describe('Animation duration in seconds'),
|
|
1625
|
+
}).describe('Zoom map input');
|
|
1626
|
+
export const ExportMapInputSchema = z.object({}).describe('Export map input (no parameters)');
|
|
1627
|
+
export const ImportCustomMapInputSchema = z.object({
|
|
1628
|
+
url: z.string().optional().describe('URL to GeoJSON/TopoJSON file'),
|
|
1629
|
+
geoJson: z.object({}).passthrough().optional().describe('GeoJSON object to import'),
|
|
1630
|
+
options: z.object({
|
|
1631
|
+
projection: MapProjectionSchema.optional().describe('Projection to use'),
|
|
1632
|
+
fillColor: z.string().optional().describe('Default fill color'),
|
|
1633
|
+
strokeColor: z.string().optional().describe('Default stroke color'),
|
|
1634
|
+
strokeWidth: z.number().optional().describe('Default stroke width'),
|
|
1635
|
+
}).optional().describe('Import options'),
|
|
1636
|
+
}).describe('Import custom map input');
|
|
1637
|
+
export const GetRegionAtPointInputSchema = z.object({
|
|
1638
|
+
x: z.number().describe('Canvas X coordinate'),
|
|
1639
|
+
y: z.number().describe('Canvas Y coordinate'),
|
|
1640
|
+
}).describe('Get region at point input');
|
|
1641
|
+
// Map Animation Schemas
|
|
1642
|
+
export const MapRegionKeyframeSchema = z.object({
|
|
1643
|
+
time: z.number().describe('Time in seconds'),
|
|
1644
|
+
fillColor: z.string().describe('Fill color at this keyframe'),
|
|
1645
|
+
strokeColor: z.string().optional().describe('Stroke color (optional)'),
|
|
1646
|
+
opacity: z.number().optional().describe('Opacity 0-1 (optional)'),
|
|
1647
|
+
}).describe('Map region keyframe');
|
|
1648
|
+
export const WaveDirectionSchema = z.enum(['horizontal', 'vertical', 'radial']).describe('Wave animation direction');
|
|
1649
|
+
export const AnimateMapRegionsInputSchema = z.object({
|
|
1650
|
+
duration: z.number().optional().default(5).describe('Total animation duration in seconds'),
|
|
1651
|
+
loop: z.boolean().optional().default(true).describe('Loop the animation'),
|
|
1652
|
+
regions: z.record(z.string(), z.array(MapRegionKeyframeSchema)).describe('Map of region IDs to keyframe arrays'),
|
|
1653
|
+
}).describe('Animate map regions input');
|
|
1654
|
+
export const AnimateMapWaveInputSchema = z.object({
|
|
1655
|
+
duration: z.number().optional().default(10).describe('Total wave duration in seconds'),
|
|
1656
|
+
loop: z.boolean().optional().default(true).describe('Loop the animation'),
|
|
1657
|
+
colors: z.array(z.string()).optional().describe('Array of colors for the wave'),
|
|
1658
|
+
waveDirection: WaveDirectionSchema.optional().default('horizontal').describe('Direction of wave effect'),
|
|
1659
|
+
}).describe('Animate map wave input');
|
|
1660
|
+
export const StopMapAnimationsInputSchema = z.object({
|
|
1661
|
+
regions: z.array(z.string()).optional().describe('Specific region IDs to stop (omit for all)'),
|
|
1662
|
+
resetColors: z.boolean().optional().default(true).describe('Reset regions to default colors'),
|
|
1663
|
+
}).describe('Stop map animations input');
|
|
1664
|
+
export const GetAnimatedMapRegionsInputSchema = z.object({}).describe('Get animated map regions input (no parameters)');
|
|
1665
|
+
// Map CSV Schemas
|
|
1666
|
+
export const ExportMapRegionCSVInputSchema = z.object({
|
|
1667
|
+
includeHighlighted: z.boolean().optional().default(true).describe('Include highlight status column'),
|
|
1668
|
+
includeSelected: z.boolean().optional().default(true).describe('Include selection status column'),
|
|
1669
|
+
includeColors: z.boolean().optional().default(true).describe('Include fill/stroke color columns'),
|
|
1670
|
+
download: z.boolean().optional().default(false).describe('Auto-download the CSV file'),
|
|
1671
|
+
filename: z.string().optional().default('map-regions.csv').describe('Filename for download'),
|
|
1672
|
+
}).describe('Export map region CSV input');
|
|
1673
|
+
export const ImportMapRegionCSVInputSchema = z.object({
|
|
1674
|
+
csvText: z.string().describe('CSV text content to import'),
|
|
1675
|
+
applyColors: z.boolean().optional().default(true).describe('Apply fill/stroke colors from CSV'),
|
|
1676
|
+
applyHighlight: z.boolean().optional().default(true).describe('Update highlight status from CSV'),
|
|
1677
|
+
applySelection: z.boolean().optional().default(true).describe('Update selection status from CSV'),
|
|
1678
|
+
}).describe('Import map region CSV input');
|
|
1679
|
+
// Map Selection Schemas
|
|
1680
|
+
export const SelectMapRegionsInputSchema = z.object({
|
|
1681
|
+
regionIds: z.array(z.string()).describe('Array of region IDs to select'),
|
|
1682
|
+
}).describe('Select map regions input');
|
|
1683
|
+
export const DeselectMapRegionsInputSchema = z.object({
|
|
1684
|
+
regionIds: z.array(z.string()).optional().describe('Array of region IDs to deselect (omit for all)'),
|
|
1685
|
+
}).describe('Deselect map regions input');
|
|
1686
|
+
export const GetHighlightedMapRegionsInputSchema = z.object({}).describe('Get highlighted map regions input (no parameters)');
|
|
1687
|
+
// =============================================================================
|
|
1688
|
+
// TEMPLATE SCHEMAS
|
|
1689
|
+
// =============================================================================
|
|
1690
|
+
export const TemplateCategorySchema = z.enum([
|
|
1691
|
+
'social-media', 'meme', 'business', 'education', 'creative',
|
|
1692
|
+
'tech', 'global', 'indigenous', 'seasonal', 'masking',
|
|
1693
|
+
'scenes', 'diagrams', 'maps',
|
|
1694
|
+
]).describe('Template category');
|
|
1695
|
+
export const ApplyTemplateInputSchema = z.object({
|
|
1696
|
+
templateId: z.string().optional().describe('Template ID to load (omit to list templates)'),
|
|
1697
|
+
category: TemplateCategorySchema.optional().describe('Filter templates by category'),
|
|
1698
|
+
listOnly: z.boolean().optional().default(false).describe('If true, only list available templates without loading'),
|
|
1699
|
+
}).describe('Apply template input');
|
|
1700
|
+
// =============================================================================
|
|
1701
|
+
// IMAGE IMPORT SCHEMAS
|
|
1702
|
+
// =============================================================================
|
|
1703
|
+
export const ImageMaskSchema = z.enum(['circle', 'rounded', 'hexagon', 'star']).describe('Mask shape to apply to imported image');
|
|
1704
|
+
export const ImportImageInputSchema = z.object({
|
|
1705
|
+
url: z.string().describe('URL of the image to import'),
|
|
1706
|
+
position: PositionSchema.optional().describe('Position on canvas (defaults to center)'),
|
|
1707
|
+
maxWidth: z.number().optional().describe('Maximum width constraint in pixels'),
|
|
1708
|
+
maxHeight: z.number().optional().describe('Maximum height constraint in pixels'),
|
|
1709
|
+
mask: ImageMaskSchema.optional().describe('Optional mask shape to apply to the image'),
|
|
1710
|
+
}).describe('Import image input');
|
|
580
1711
|
//# sourceMappingURL=schemas.js.map
|