@vib3code/sdk 2.0.1 → 2.0.3-canary.0a63e71

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.
Files changed (192) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/DOCS/AGENT_HARNESS_ARCHITECTURE.md +245 -0
  3. package/DOCS/ANDROID_DEPLOYMENT.md +59 -0
  4. package/DOCS/ARCHITECTURE.md +1 -0
  5. package/DOCS/CI_TESTING.md +2 -0
  6. package/DOCS/CLI_ONBOARDING.md +3 -1
  7. package/DOCS/CONTROL_REFERENCE.md +2 -0
  8. package/DOCS/CROSS_SITE_DESIGN_PATTERNS.md +119 -0
  9. package/DOCS/ENV_SETUP.md +2 -0
  10. package/DOCS/EPIC_SCROLL_EVENTS.md +775 -0
  11. package/DOCS/EXPANSION_DESIGN.md +979 -0
  12. package/DOCS/EXPANSION_DESIGN_ULTRA.md +389 -0
  13. package/DOCS/EXPORT_FORMATS.md +2 -0
  14. package/DOCS/GPU_DISPOSAL_GUIDE.md +2 -0
  15. package/DOCS/HANDOFF_LANDING_PAGE.md +156 -0
  16. package/DOCS/HANDOFF_SDK_DEVELOPMENT.md +495 -0
  17. package/DOCS/LICENSING_TIERS.md +2 -0
  18. package/DOCS/MASTER_PLAN_2026-01-31.md +4 -2
  19. package/DOCS/MULTIVIZ_CHOREOGRAPHY_PATTERNS.md +939 -0
  20. package/DOCS/OBS_SETUP_GUIDE.md +2 -0
  21. package/DOCS/OPTIMIZATION_PLAN_MATH.md +119 -0
  22. package/DOCS/PRODUCT_STRATEGY.md +65 -0
  23. package/DOCS/PROJECT_SETUP.md +2 -0
  24. package/DOCS/README.md +105 -0
  25. package/DOCS/REFERENCE_SCROLL_ANALYSIS.md +99 -0
  26. package/DOCS/RENDERER_LIFECYCLE.md +2 -0
  27. package/DOCS/REPO_MANIFEST.md +2 -0
  28. package/DOCS/ROADMAP.md +113 -0
  29. package/DOCS/SCROLL_TIMELINE_v3.md +271 -0
  30. package/DOCS/SITE_REFACTOR_PLAN.md +102 -0
  31. package/DOCS/STATUS.md +26 -0
  32. package/DOCS/SYSTEM_INVENTORY.md +37 -32
  33. package/DOCS/TELEMETRY_EXPORTS.md +2 -0
  34. package/DOCS/VISUAL_ANALYSIS_CLICKERSS.md +87 -0
  35. package/DOCS/VISUAL_ANALYSIS_FACETAD.md +135 -0
  36. package/DOCS/VISUAL_ANALYSIS_SIMONE.md +97 -0
  37. package/DOCS/VISUAL_ANALYSIS_TABLESIDE.md +88 -0
  38. package/DOCS/WEBGPU_STATUS.md +121 -38
  39. package/DOCS/XR_BENCHMARKS.md +2 -0
  40. package/DOCS/archive/BLUEPRINT_EXECUTION_PLAN_2026-01-07.md +1 -0
  41. package/DOCS/archive/DEV_TRACK_ANALYSIS.md +1 -0
  42. package/DOCS/archive/DEV_TRACK_PLAN_2026-01-07.md +1 -0
  43. package/DOCS/archive/SESSION_014_PLAN.md +1 -0
  44. package/DOCS/archive/SESSION_LOG_2026-01-07.md +1 -0
  45. package/DOCS/archive/STRATEGIC_BLUEPRINT_2026-01-07.md +1 -0
  46. package/DOCS/archive/SYSTEM_AUDIT_2026-01-30.md +1 -0
  47. package/DOCS/archive/WEBGPU_STATUS_2026-02-15_STALE.md +1 -0
  48. package/DOCS/{DEV_TRACK_SESSION_2026-01-31.md → dev-tracks/DEV_TRACK_SESSION_2026-01-31.md} +3 -1
  49. package/DOCS/dev-tracks/DEV_TRACK_SESSION_2026-02-06.md +233 -0
  50. package/DOCS/dev-tracks/DEV_TRACK_SESSION_2026-02-13.md +129 -0
  51. package/DOCS/dev-tracks/DEV_TRACK_SESSION_2026-02-15.md +144 -0
  52. package/DOCS/dev-tracks/DEV_TRACK_SESSION_2026-02-16.md +110 -0
  53. package/DOCS/dev-tracks/PERF_UPGRADE_2026-02-16.md +310 -0
  54. package/DOCS/dev-tracks/README.md +12 -0
  55. package/README.md +26 -13
  56. package/cpp/CMakeLists.txt +236 -0
  57. package/cpp/bindings/embind.cpp +269 -0
  58. package/cpp/build.sh +129 -0
  59. package/cpp/geometry/Crystal.cpp +103 -0
  60. package/cpp/geometry/Fractal.cpp +136 -0
  61. package/cpp/geometry/GeometryGenerator.cpp +262 -0
  62. package/cpp/geometry/KleinBottle.cpp +71 -0
  63. package/cpp/geometry/Sphere.cpp +134 -0
  64. package/cpp/geometry/Tesseract.cpp +94 -0
  65. package/cpp/geometry/Tetrahedron.cpp +83 -0
  66. package/cpp/geometry/Torus.cpp +65 -0
  67. package/cpp/geometry/WarpFunctions.cpp +238 -0
  68. package/cpp/geometry/Wave.cpp +85 -0
  69. package/cpp/include/vib3_ffi.h +238 -0
  70. package/cpp/math/Mat4x4.cpp +409 -0
  71. package/cpp/math/Mat4x4.hpp +209 -0
  72. package/cpp/math/Projection.cpp +142 -0
  73. package/cpp/math/Projection.hpp +148 -0
  74. package/cpp/math/Rotor4D.cpp +322 -0
  75. package/cpp/math/Rotor4D.hpp +204 -0
  76. package/cpp/math/Vec4.cpp +303 -0
  77. package/cpp/math/Vec4.hpp +225 -0
  78. package/cpp/src/vib3_ffi.cpp +607 -0
  79. package/cpp/tests/Geometry_test.cpp +213 -0
  80. package/cpp/tests/Mat4x4_test.cpp +494 -0
  81. package/cpp/tests/Projection_test.cpp +298 -0
  82. package/cpp/tests/Rotor4D_test.cpp +423 -0
  83. package/cpp/tests/Vec4_test.cpp +489 -0
  84. package/docs/webgpu-live.html +1 -1
  85. package/package.json +41 -30
  86. package/src/agent/index.js +1 -3
  87. package/src/agent/mcp/MCPServer.js +1220 -144
  88. package/src/agent/mcp/index.js +1 -1
  89. package/src/agent/mcp/stdio-server.js +264 -0
  90. package/src/agent/mcp/tools.js +498 -31
  91. package/src/cli/index.js +431 -47
  92. package/src/core/CanvasManager.js +97 -204
  93. package/src/core/ErrorReporter.js +1 -1
  94. package/src/core/Parameters.js +1 -1
  95. package/src/core/VIB3Engine.js +93 -4
  96. package/src/core/VitalitySystem.js +53 -0
  97. package/src/core/index.js +18 -0
  98. package/src/core/renderers/FacetedRendererAdapter.js +10 -9
  99. package/src/core/renderers/HolographicRendererAdapter.js +13 -9
  100. package/src/core/renderers/QuantumRendererAdapter.js +11 -7
  101. package/src/creative/AestheticMapper.js +628 -0
  102. package/src/creative/ChoreographyPlayer.js +481 -0
  103. package/src/creative/index.js +11 -0
  104. package/src/experimental/GameLoop.js +72 -0
  105. package/src/experimental/LatticePhysics.js +100 -0
  106. package/src/experimental/LiveDirector.js +143 -0
  107. package/src/experimental/PlayerController4D.js +154 -0
  108. package/src/experimental/VIB3Actor.js +138 -0
  109. package/src/experimental/VIB3Compositor.js +117 -0
  110. package/src/experimental/VIB3Link.js +122 -0
  111. package/src/experimental/VIB3Orchestrator.js +146 -0
  112. package/src/experimental/VIB3Universe.js +109 -0
  113. package/src/experimental/demos/CrystalLabyrinth.js +202 -0
  114. package/src/export/TradingCardManager.js +3 -4
  115. package/src/export/index.js +11 -1
  116. package/src/faceted/FacetedSystem.js +260 -394
  117. package/src/games/glyph-war/GlyphWarVisualizer.js +641 -0
  118. package/src/geometry/generators/Crystal.js +2 -2
  119. package/src/geometry/warp/HypersphereCore.js +53 -24
  120. package/src/holograms/HolographicVisualizer.js +84 -98
  121. package/src/holograms/RealHolographicSystem.js +194 -43
  122. package/src/math/Mat4x4.js +308 -105
  123. package/src/math/Rotor4D.js +124 -40
  124. package/src/math/Vec4.js +200 -103
  125. package/src/math/index.js +7 -7
  126. package/src/polychora/PolychoraSystem.js +77 -0
  127. package/src/quantum/QuantumEngine.js +103 -66
  128. package/src/quantum/QuantumVisualizer.js +31 -22
  129. package/src/reactivity/index.js +3 -5
  130. package/src/render/LayerPresetManager.js +372 -0
  131. package/src/render/LayerReactivityBridge.js +344 -0
  132. package/src/render/LayerRelationshipGraph.js +610 -0
  133. package/src/render/MultiCanvasBridge.js +148 -25
  134. package/src/render/ShaderLoader.js +38 -0
  135. package/src/render/ShaderProgram.js +4 -4
  136. package/src/render/UnifiedRenderBridge.js +4 -1
  137. package/src/render/backends/WebGPUBackend.js +8 -4
  138. package/src/render/index.js +27 -2
  139. package/src/scene/Node4D.js +74 -24
  140. package/src/scene/index.js +4 -4
  141. package/src/shaders/common/geometry24.glsl +65 -0
  142. package/src/shaders/common/geometry24.wgsl +54 -0
  143. package/src/shaders/common/rotation4d.glsl +4 -4
  144. package/src/shaders/common/rotation4d.wgsl +2 -2
  145. package/src/shaders/common/uniforms.wgsl +15 -8
  146. package/src/shaders/faceted/faceted.frag.glsl +220 -80
  147. package/src/shaders/faceted/faceted.frag.wgsl +144 -90
  148. package/src/shaders/holographic/holographic.frag.glsl +28 -9
  149. package/src/shaders/holographic/holographic.frag.wgsl +112 -41
  150. package/src/shaders/quantum/quantum.frag.glsl +1 -0
  151. package/src/shaders/quantum/quantum.frag.wgsl +6 -4
  152. package/src/testing/ParallelTestFramework.js +2 -2
  153. package/src/ui/adaptive/renderers/webgpu/WebGPURenderer.ts +2 -2
  154. package/src/viewer/GalleryUI.js +17 -0
  155. package/src/viewer/ViewerPortal.js +2 -2
  156. package/src/viewer/index.js +1 -1
  157. package/tools/headless-renderer.js +258 -0
  158. package/tools/shader-sync-verify.js +14 -8
  159. package/tools/site-analysis/all-reports.json +32 -0
  160. package/tools/site-analysis/combined-analysis.md +50 -0
  161. package/tools/site-analyzer.mjs +779 -0
  162. package/tools/visual-catalog/capture.js +276 -0
  163. package/tools/visual-catalog/composite.js +138 -0
  164. package/types/adaptive-sdk.d.ts +204 -5
  165. package/types/agent/cli.d.ts +78 -0
  166. package/types/agent/index.d.ts +18 -0
  167. package/types/agent/mcp.d.ts +87 -0
  168. package/types/agent/telemetry.d.ts +190 -0
  169. package/types/core/VIB3Engine.d.ts +26 -0
  170. package/types/core/index.d.ts +261 -0
  171. package/types/creative/AestheticMapper.d.ts +72 -0
  172. package/types/creative/ChoreographyPlayer.d.ts +96 -0
  173. package/types/creative/index.d.ts +17 -0
  174. package/types/export/index.d.ts +243 -0
  175. package/types/geometry/index.d.ts +164 -0
  176. package/types/math/index.d.ts +214 -0
  177. package/types/render/LayerPresetManager.d.ts +78 -0
  178. package/types/render/LayerReactivityBridge.d.ts +85 -0
  179. package/types/render/LayerRelationshipGraph.d.ts +174 -0
  180. package/types/render/index.d.ts +3 -0
  181. package/types/scene/index.d.ts +204 -0
  182. package/types/systems/index.d.ts +244 -0
  183. package/types/variations/index.d.ts +62 -0
  184. package/types/viewer/index.d.ts +225 -0
  185. package/DOCS/BLUEPRINT_EXECUTION_PLAN_2026-01-07.md +0 -34
  186. package/DOCS/DEV_TRACK_ANALYSIS.md +0 -77
  187. package/DOCS/DEV_TRACK_PLAN_2026-01-07.md +0 -42
  188. package/DOCS/SESSION_014_PLAN.md +0 -195
  189. package/DOCS/SESSION_LOG_2026-01-07.md +0 -56
  190. package/DOCS/STRATEGIC_BLUEPRINT_2026-01-07.md +0 -72
  191. package/DOCS/SYSTEM_AUDIT_2026-01-30.md +0 -738
  192. /package/src/viewer/{ReactivityManager.js → ViewerInputHandler.js} +0 -0
@@ -222,51 +222,64 @@ export const toolDefinitions = {
222
222
  // Onboarding Tools
223
223
  get_sdk_context: {
224
224
  name: 'get_sdk_context',
225
- description: 'Returns essential SDK context for agent onboarding. Call this first to understand the system.',
225
+ description: 'Returns a compact capability manifest: what systems exist, what tools are available, what parameter ranges are valid, and what the current engine state is. Designed for injection into agent context call once at session start, not repeatedly.',
226
226
  inputSchema: {
227
227
  type: 'object',
228
- properties: {}
228
+ properties: {
229
+ include_state: {
230
+ type: 'boolean',
231
+ default: true,
232
+ description: 'Include current engine state in response'
233
+ },
234
+ include_tools: {
235
+ type: 'boolean',
236
+ default: false,
237
+ description: 'Include tool summary list (names + one-line descriptions)'
238
+ }
239
+ }
229
240
  }
230
241
  },
231
242
 
232
- verify_knowledge: {
233
- name: 'verify_knowledge',
234
- description: 'Verifies agent has absorbed SDK context. Multiple choice quiz - submit letter answers (a/b/c/d).',
243
+ inspect_layers: {
244
+ name: 'inspect_layers',
245
+ description: 'Returns the current state of all holographic canvas layers with per-layer metadata: role, opacity, blend mode, reactivity multiplier, role-specific parameters, and enabled state. Only meaningful when holographic system is active.',
235
246
  inputSchema: {
236
247
  type: 'object',
237
248
  properties: {
238
- q1_rotation_planes: {
239
- type: 'string',
240
- enum: ['a', 'b', 'c', 'd'],
241
- description: 'Q1: How many rotation planes? a)3 b)4 c)6 d)8'
242
- },
243
- q2_geometry_formula: {
249
+ layer: {
244
250
  type: 'string',
245
- enum: ['a', 'b', 'c', 'd'],
246
- description: 'Q2: Geometry encoding formula? a)base*3+core b)core*8+base c)base+core d)core*base'
247
- },
248
- q3_canvas_layers: {
249
- type: 'string',
250
- enum: ['a', 'b', 'c', 'd'],
251
- description: 'Q3: Canvas layers per system? a)3 b)4 c)5 d)6'
252
- },
253
- q4_active_systems: {
251
+ enum: ['background', 'shadow', 'content', 'highlight', 'accent', 'all'],
252
+ default: 'all',
253
+ description: 'Inspect a specific layer or all layers'
254
+ }
255
+ }
256
+ }
257
+ },
258
+
259
+ set_holographic_layer: {
260
+ name: 'set_holographic_layer',
261
+ description: 'Controls individual holographic layer properties. Set opacity, blend mode, enable/disable, or override role parameters for any of the 5 layers (background, shadow, content, highlight, accent). Only works when holographic system is active.',
262
+ inputSchema: {
263
+ type: 'object',
264
+ properties: {
265
+ layer: {
254
266
  type: 'string',
255
- enum: ['a', 'b', 'c', 'd'],
256
- description: 'Q4: Which are the 3 ACTIVE systems? a)quantum,faceted,holographic b)quantum,faceted,polychora c)faceted,holographic,polychora d)all four'
267
+ enum: ['background', 'shadow', 'content', 'highlight', 'accent'],
268
+ description: 'Target layer role name'
257
269
  },
258
- q5_base_geometries: {
270
+ opacity: { type: 'number', minimum: 0, maximum: 1, description: 'Layer opacity (0=invisible, 1=full)' },
271
+ blendMode: {
259
272
  type: 'string',
260
- enum: ['a', 'b', 'c', 'd'],
261
- description: 'Q5: How many base geometry types? a)6 b)8 c)10 d)24'
273
+ enum: ['normal', 'screen', 'multiply', 'add', 'overlay'],
274
+ description: 'CSS blend mode for this layer'
262
275
  },
263
- q6_core_types: {
264
- type: 'string',
265
- enum: ['a', 'b', 'c', 'd'],
266
- description: 'Q6: Core warp types? a)base,sphere,cube b)base,hypersphere,hypertetrahedron c)none,partial,full d)2D,3D,4D'
267
- }
276
+ enabled: { type: 'boolean', description: 'Show/hide this layer' },
277
+ colorShift: { type: 'number', minimum: 0, maximum: 360, description: 'Hue offset for this layer' },
278
+ densityMult: { type: 'number', minimum: 0.1, maximum: 5, description: 'Grid density multiplier' },
279
+ speedMult: { type: 'number', minimum: 0, maximum: 3, description: 'Animation speed multiplier' },
280
+ reactivity: { type: 'number', minimum: 0, maximum: 3, description: 'Mouse/touch reactivity multiplier' }
268
281
  },
269
- required: ['q1_rotation_planes', 'q2_geometry_formula', 'q3_canvas_layers']
282
+ required: ['layer']
270
283
  }
271
284
  },
272
285
 
@@ -395,6 +408,460 @@ export const toolDefinitions = {
395
408
  type: 'object',
396
409
  properties: {}
397
410
  }
411
+ },
412
+
413
+ // ===== AGENT-POWER TOOLS (Phase 7 — Agent Harness) =====
414
+
415
+ describe_visual_state: {
416
+ name: 'describe_visual_state',
417
+ description: 'Returns a structured natural-language description of the current visualization state. Useful for multimodal agents to understand what the visualization looks like without a screenshot. Includes system, geometry, color mood, motion character, and complexity assessment.',
418
+ inputSchema: {
419
+ type: 'object',
420
+ properties: {}
421
+ }
422
+ },
423
+
424
+ batch_set_parameters: {
425
+ name: 'batch_set_parameters',
426
+ description: 'Atomically sets multiple parameters including rotation, visual, and system in one call. Prevents intermediate render states. More efficient than calling set_rotation + set_visual_parameters separately.',
427
+ inputSchema: {
428
+ type: 'object',
429
+ properties: {
430
+ system: {
431
+ type: 'string',
432
+ enum: ['quantum', 'faceted', 'holographic'],
433
+ description: 'Optional: switch system first'
434
+ },
435
+ geometry: {
436
+ type: 'integer',
437
+ minimum: 0,
438
+ maximum: 23,
439
+ description: 'Geometry index'
440
+ },
441
+ rotation: {
442
+ type: 'object',
443
+ description: '6D rotation angles (all optional)',
444
+ properties: {
445
+ XY: { type: 'number', minimum: -6.28, maximum: 6.28 },
446
+ XZ: { type: 'number', minimum: -6.28, maximum: 6.28 },
447
+ YZ: { type: 'number', minimum: -6.28, maximum: 6.28 },
448
+ XW: { type: 'number', minimum: -6.28, maximum: 6.28 },
449
+ YW: { type: 'number', minimum: -6.28, maximum: 6.28 },
450
+ ZW: { type: 'number', minimum: -6.28, maximum: 6.28 }
451
+ }
452
+ },
453
+ visual: {
454
+ type: 'object',
455
+ description: 'Visual parameters (all optional)',
456
+ properties: {
457
+ hue: { type: 'integer', minimum: 0, maximum: 360 },
458
+ saturation: { type: 'number', minimum: 0, maximum: 1 },
459
+ intensity: { type: 'number', minimum: 0, maximum: 1 },
460
+ speed: { type: 'number', minimum: 0.1, maximum: 3 },
461
+ chaos: { type: 'number', minimum: 0, maximum: 1 },
462
+ morphFactor: { type: 'number', minimum: 0, maximum: 2 },
463
+ gridDensity: { type: 'number', minimum: 4, maximum: 100 },
464
+ dimension: { type: 'number', minimum: 3.0, maximum: 4.5 }
465
+ }
466
+ },
467
+ preset: {
468
+ type: 'string',
469
+ enum: ['ambient', 'reactive', 'immersive', 'energetic', 'calm', 'cinematic'],
470
+ description: 'Optional: apply behavior preset after setting params'
471
+ }
472
+ }
473
+ }
474
+ },
475
+
476
+ create_timeline: {
477
+ name: 'create_timeline',
478
+ description: 'Creates a ParameterTimeline animation from a track specification. Supports multi-parameter keyframe animation with per-keyframe easing, BPM sync, and loop modes. Returns timeline ID for playback control.',
479
+ inputSchema: {
480
+ type: 'object',
481
+ properties: {
482
+ name: { type: 'string', description: 'Timeline name' },
483
+ duration_ms: { type: 'integer', minimum: 100, maximum: 600000, description: 'Total duration in milliseconds' },
484
+ bpm: { type: 'number', minimum: 20, maximum: 300, description: 'Optional BPM for beat-sync quantization' },
485
+ loop_mode: {
486
+ type: 'string',
487
+ enum: ['loop', 'bounce', 'once'],
488
+ default: 'once',
489
+ description: 'Playback loop mode'
490
+ },
491
+ tracks: {
492
+ type: 'object',
493
+ description: 'Parameter tracks. Each key is a parameter name, value is array of keyframes [{time, value, easing}]',
494
+ additionalProperties: {
495
+ type: 'array',
496
+ items: {
497
+ type: 'object',
498
+ properties: {
499
+ time: { type: 'number', description: 'Time in ms from start' },
500
+ value: { type: 'number', description: 'Parameter value at this keyframe' },
501
+ easing: {
502
+ type: 'string',
503
+ enum: ['linear', 'easeIn', 'easeOut', 'easeInOut', 'quadIn', 'quadOut', 'cubicIn', 'cubicOut', 'elastic', 'bounce', 'spring', 'overshoot', 'sine', 'exponential'],
504
+ default: 'easeInOut',
505
+ description: 'Easing function for interpolation TO this keyframe'
506
+ }
507
+ },
508
+ required: ['time', 'value']
509
+ }
510
+ }
511
+ }
512
+ },
513
+ required: ['duration_ms', 'tracks']
514
+ }
515
+ },
516
+
517
+ play_transition: {
518
+ name: 'play_transition',
519
+ description: 'Plays a smooth animated transition from current parameter values to target values, or a sequence of transitions. Uses the TransitionAnimator system with configurable easing.',
520
+ inputSchema: {
521
+ type: 'object',
522
+ properties: {
523
+ sequence: {
524
+ type: 'array',
525
+ description: 'Array of transition steps. Each step smoothly animates to target params.',
526
+ items: {
527
+ type: 'object',
528
+ properties: {
529
+ params: {
530
+ type: 'object',
531
+ description: 'Target parameter values (any VIB3+ parameter)',
532
+ additionalProperties: { type: 'number' }
533
+ },
534
+ duration: { type: 'integer', minimum: 50, maximum: 30000, default: 1000, description: 'Step duration in ms' },
535
+ easing: {
536
+ type: 'string',
537
+ enum: ['linear', 'easeIn', 'easeOut', 'easeInOut', 'quadIn', 'quadOut', 'cubicIn', 'cubicOut', 'elastic', 'bounce', 'spring', 'overshoot', 'sine', 'exponential'],
538
+ default: 'easeInOut'
539
+ },
540
+ delay: { type: 'integer', minimum: 0, default: 0, description: 'Delay before this step starts (ms)' }
541
+ },
542
+ required: ['params']
543
+ }
544
+ }
545
+ },
546
+ required: ['sequence']
547
+ }
548
+ },
549
+
550
+ apply_color_preset: {
551
+ name: 'apply_color_preset',
552
+ description: 'Applies one of 22 themed color presets that set hue, saturation, intensity, and optionally post-processing to create a cohesive visual theme.',
553
+ inputSchema: {
554
+ type: 'object',
555
+ properties: {
556
+ preset: {
557
+ type: 'string',
558
+ enum: ['Ocean', 'Lava', 'Neon', 'Monochrome', 'Sunset', 'Aurora', 'Cyberpunk', 'Forest', 'Desert', 'Galaxy', 'Ice', 'Fire', 'Toxic', 'Royal', 'Pastel', 'Retro', 'Midnight', 'Tropical', 'Ethereal', 'Volcanic', 'Holographic', 'Vaporwave'],
559
+ description: 'Color preset name'
560
+ }
561
+ },
562
+ required: ['preset']
563
+ }
564
+ },
565
+
566
+ set_post_processing: {
567
+ name: 'set_post_processing',
568
+ description: 'Configures post-processing effects pipeline. Supports 14 composable effects and 7 preset chains. Effects are applied in order.',
569
+ inputSchema: {
570
+ type: 'object',
571
+ properties: {
572
+ effects: {
573
+ type: 'array',
574
+ description: 'Ordered list of effects to apply',
575
+ items: {
576
+ type: 'object',
577
+ properties: {
578
+ name: {
579
+ type: 'string',
580
+ enum: ['bloom', 'chromaticAberration', 'vignette', 'filmGrain', 'scanlines', 'pixelate', 'blur', 'sharpen', 'colorGrade', 'noise', 'distort', 'glitch', 'rgbShift', 'feedback'],
581
+ description: 'Effect name'
582
+ },
583
+ intensity: { type: 'number', minimum: 0, maximum: 1, default: 0.5, description: 'Effect strength' },
584
+ enabled: { type: 'boolean', default: true }
585
+ },
586
+ required: ['name']
587
+ }
588
+ },
589
+ chain_preset: {
590
+ type: 'string',
591
+ description: 'Alternative: apply a named preset chain instead of individual effects'
592
+ },
593
+ clear_first: {
594
+ type: 'boolean',
595
+ default: true,
596
+ description: 'Clear existing effects before applying new ones'
597
+ }
598
+ }
599
+ }
600
+ },
601
+
602
+ create_choreography: {
603
+ name: 'create_choreography',
604
+ description: 'Creates a multi-scene choreography specification with system transitions, timelines, audio config, and post-processing per scene. This is the most powerful agent tool — it allows designing complete synchronized visual performances that would be extremely difficult to create manually.',
605
+ inputSchema: {
606
+ type: 'object',
607
+ properties: {
608
+ name: { type: 'string', description: 'Choreography name' },
609
+ duration_ms: { type: 'integer', minimum: 1000, description: 'Total choreography duration' },
610
+ bpm: { type: 'number', minimum: 20, maximum: 300, description: 'Optional BPM for beat sync' },
611
+ scenes: {
612
+ type: 'array',
613
+ description: 'Ordered scene definitions. Each scene has a time range, system/geometry, and parameter timeline.',
614
+ items: {
615
+ type: 'object',
616
+ properties: {
617
+ time_start: { type: 'integer', minimum: 0, description: 'Scene start time (ms)' },
618
+ time_end: { type: 'integer', description: 'Scene end time (ms)' },
619
+ system: { type: 'string', enum: ['quantum', 'faceted', 'holographic'] },
620
+ geometry: { type: 'integer', minimum: 0, maximum: 23 },
621
+ transition_in: {
622
+ type: 'object',
623
+ description: 'How this scene enters (crossfade, cut, etc.)',
624
+ properties: {
625
+ type: { type: 'string', enum: ['cut', 'crossfade', 'wipe', 'dissolve', 'zoom'] },
626
+ duration: { type: 'integer', minimum: 0 }
627
+ }
628
+ },
629
+ tracks: {
630
+ type: 'object',
631
+ description: 'Parameter timeline tracks for this scene (same format as create_timeline)',
632
+ additionalProperties: {
633
+ type: 'array',
634
+ items: {
635
+ type: 'object',
636
+ properties: {
637
+ time: { type: 'number' },
638
+ value: { type: 'number' },
639
+ easing: { type: 'string' }
640
+ }
641
+ }
642
+ }
643
+ },
644
+ color_preset: { type: 'string', description: 'Color preset for this scene' },
645
+ post_processing: {
646
+ type: 'array',
647
+ items: { type: 'string' },
648
+ description: 'Post-processing effects active during this scene'
649
+ },
650
+ audio: {
651
+ type: 'object',
652
+ description: 'Audio reactivity config for this scene'
653
+ }
654
+ },
655
+ required: ['time_start', 'time_end', 'system']
656
+ }
657
+ }
658
+ },
659
+ required: ['name', 'duration_ms', 'scenes']
660
+ }
661
+ },
662
+
663
+ // ===== VISUAL FEEDBACK TOOLS (Phase 7.1 — Agent Harness) =====
664
+
665
+ capture_screenshot: {
666
+ name: 'capture_screenshot',
667
+ description: 'Captures current visualization as a base64-encoded PNG by compositing canvas layers. BROWSER-ONLY: returns an EnvironmentError with capability report in headless/Node contexts. When available, returns data_url for multimodal analysis. Use describe_visual_state as a text-based alternative in non-browser environments.',
668
+ inputSchema: {
669
+ type: 'object',
670
+ properties: {
671
+ width: { type: 'integer', minimum: 64, maximum: 2048, default: 512, description: 'Output image width' },
672
+ height: { type: 'integer', minimum: 64, maximum: 2048, default: 512, description: 'Output image height' },
673
+ format: {
674
+ type: 'string',
675
+ enum: ['png', 'jpeg', 'webp'],
676
+ default: 'png',
677
+ description: 'Image format'
678
+ },
679
+ quality: { type: 'number', minimum: 0.1, maximum: 1.0, default: 0.92, description: 'JPEG/WebP quality' }
680
+ }
681
+ }
682
+ },
683
+
684
+ design_from_description: {
685
+ name: 'design_from_description',
686
+ description: 'Maps a natural-language aesthetic description to VIB3+ parameters. Understands emotions (serene, energetic, mysterious), styles (minimal, intricate, organic), colors (ocean, neon, cyberpunk), motion (flowing, pulsing, hypnotic), depth (deep, flat), and geometry (spherical, fractal, crystal). Combine multiple words for precise targeting.',
687
+ inputSchema: {
688
+ type: 'object',
689
+ properties: {
690
+ description: {
691
+ type: 'string',
692
+ description: 'Space-separated aesthetic descriptors. Examples: "serene ocean deep minimal", "energetic neon geometric", "mysterious galaxy intricate hypnotic"'
693
+ },
694
+ apply: {
695
+ type: 'boolean',
696
+ default: false,
697
+ description: 'If true, immediately apply the resolved parameters to the engine'
698
+ }
699
+ },
700
+ required: ['description']
701
+ }
702
+ },
703
+
704
+ get_aesthetic_vocabulary: {
705
+ name: 'get_aesthetic_vocabulary',
706
+ description: 'Returns the full vocabulary of aesthetic descriptor words organized by category (emotions, styles, colors, motion, depth, geometry). Use this to discover what descriptions the system understands.',
707
+ inputSchema: {
708
+ type: 'object',
709
+ properties: {}
710
+ }
711
+ },
712
+
713
+ play_choreography: {
714
+ name: 'play_choreography',
715
+ description: 'Loads and plays a choreography specification on the engine. Requires a choreography spec (from create_choreography) or a stored choreography ID. Controls: play, pause, stop, seek.',
716
+ inputSchema: {
717
+ type: 'object',
718
+ properties: {
719
+ choreography: {
720
+ type: 'object',
721
+ description: 'Full choreography spec (from create_choreography output). Provide this OR choreography_id.'
722
+ },
723
+ choreography_id: {
724
+ type: 'string',
725
+ description: 'ID of a previously created choreography (from create_choreography)'
726
+ },
727
+ action: {
728
+ type: 'string',
729
+ enum: ['play', 'pause', 'stop', 'seek'],
730
+ default: 'play',
731
+ description: 'Playback action'
732
+ },
733
+ seek_percent: {
734
+ type: 'number',
735
+ minimum: 0,
736
+ maximum: 1,
737
+ description: 'For seek action: position as 0-1 percentage'
738
+ },
739
+ loop: {
740
+ type: 'boolean',
741
+ default: false,
742
+ description: 'Loop the choreography'
743
+ }
744
+ }
745
+ }
746
+ },
747
+
748
+ control_timeline: {
749
+ name: 'control_timeline',
750
+ description: 'Controls playback of a previously created timeline (from create_timeline). Actions: play, pause, stop, seek, set_speed.',
751
+ inputSchema: {
752
+ type: 'object',
753
+ properties: {
754
+ timeline_id: {
755
+ type: 'string',
756
+ description: 'ID of the timeline to control'
757
+ },
758
+ action: {
759
+ type: 'string',
760
+ enum: ['play', 'pause', 'stop', 'seek', 'set_speed'],
761
+ description: 'Playback control action'
762
+ },
763
+ seek_percent: {
764
+ type: 'number',
765
+ minimum: 0,
766
+ maximum: 1,
767
+ description: 'For seek: position as 0-1 percentage'
768
+ },
769
+ speed: {
770
+ type: 'number',
771
+ minimum: 0.1,
772
+ maximum: 10,
773
+ description: 'For set_speed: playback speed multiplier'
774
+ }
775
+ },
776
+ required: ['timeline_id', 'action']
777
+ }
778
+ },
779
+
780
+ // Layer Relationship Tools (Phase 8)
781
+ set_layer_profile: {
782
+ name: 'set_layer_profile',
783
+ description: 'Loads a named layer relationship profile that configures how the 5 canvas layers relate to each other. Profiles: holographic (default), symmetry, chord, storm, legacy (original static behavior).',
784
+ inputSchema: {
785
+ type: 'object',
786
+ properties: {
787
+ profile: {
788
+ type: 'string',
789
+ enum: ['holographic', 'symmetry', 'chord', 'storm', 'legacy'],
790
+ description: 'Named profile to load'
791
+ }
792
+ },
793
+ required: ['profile']
794
+ }
795
+ },
796
+
797
+ set_layer_relationship: {
798
+ name: 'set_layer_relationship',
799
+ description: 'Sets the relationship type for a specific layer relative to the keystone. Available relationships: echo (attenuated follower), mirror (inverted rotation/hue), complement (color opposite), harmonic (musical intervals), reactive (amplifies changes), chase (delayed follower).',
800
+ inputSchema: {
801
+ type: 'object',
802
+ properties: {
803
+ layer: {
804
+ type: 'string',
805
+ enum: ['background', 'shadow', 'content', 'highlight', 'accent'],
806
+ description: 'Target layer name'
807
+ },
808
+ relationship: {
809
+ type: 'string',
810
+ enum: ['echo', 'mirror', 'complement', 'harmonic', 'reactive', 'chase'],
811
+ description: 'Relationship preset name'
812
+ },
813
+ config: {
814
+ type: 'object',
815
+ description: 'Optional config overrides for the relationship (e.g., { opacity: 0.5, gain: 3 })'
816
+ }
817
+ },
818
+ required: ['layer', 'relationship']
819
+ }
820
+ },
821
+
822
+ set_layer_keystone: {
823
+ name: 'set_layer_keystone',
824
+ description: 'Changes which layer acts as the keystone (driver) for the layer relationship graph. Other layers derive their parameters from the keystone through relationship functions.',
825
+ inputSchema: {
826
+ type: 'object',
827
+ properties: {
828
+ layer: {
829
+ type: 'string',
830
+ enum: ['background', 'shadow', 'content', 'highlight', 'accent'],
831
+ description: 'Layer to designate as keystone'
832
+ }
833
+ },
834
+ required: ['layer']
835
+ }
836
+ },
837
+
838
+ get_layer_config: {
839
+ name: 'get_layer_config',
840
+ description: 'Returns the current layer relationship configuration including keystone, profile, and per-layer relationships with their config parameters.',
841
+ inputSchema: {
842
+ type: 'object',
843
+ properties: {}
844
+ }
845
+ },
846
+
847
+ tune_layer_relationship: {
848
+ name: 'tune_layer_relationship',
849
+ description: 'Hot-patches a layer relationship config without replacing the full graph. Merges provided config values into the existing relationship (e.g., increase reactive gain, shift harmonic hue angle).',
850
+ inputSchema: {
851
+ type: 'object',
852
+ properties: {
853
+ layer: {
854
+ type: 'string',
855
+ enum: ['background', 'shadow', 'content', 'highlight', 'accent'],
856
+ description: 'Layer to tune'
857
+ },
858
+ config: {
859
+ type: 'object',
860
+ description: 'Config values to merge (e.g., { opacity: 0.6, gain: 3.0, hueAngle: 120 })'
861
+ }
862
+ },
863
+ required: ['layer', 'config']
864
+ }
398
865
  }
399
866
  };
400
867