@vib3code/sdk 2.0.1
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/CHANGELOG.md +118 -0
- package/DOCS/BLUEPRINT_EXECUTION_PLAN_2026-01-07.md +34 -0
- package/DOCS/CI_TESTING.md +38 -0
- package/DOCS/CLI_ONBOARDING.md +75 -0
- package/DOCS/CONTROL_REFERENCE.md +64 -0
- package/DOCS/DEV_TRACK_ANALYSIS.md +77 -0
- package/DOCS/DEV_TRACK_PLAN_2026-01-07.md +42 -0
- package/DOCS/DEV_TRACK_SESSION_2026-01-31.md +220 -0
- package/DOCS/ENV_SETUP.md +189 -0
- package/DOCS/EXPORT_FORMATS.md +417 -0
- package/DOCS/GPU_DISPOSAL_GUIDE.md +21 -0
- package/DOCS/LICENSING_TIERS.md +275 -0
- package/DOCS/MASTER_PLAN_2026-01-31.md +570 -0
- package/DOCS/OBS_SETUP_GUIDE.md +98 -0
- package/DOCS/PROJECT_SETUP.md +66 -0
- package/DOCS/RENDERER_LIFECYCLE.md +40 -0
- package/DOCS/REPO_MANIFEST.md +121 -0
- package/DOCS/SESSION_014_PLAN.md +195 -0
- package/DOCS/SESSION_LOG_2026-01-07.md +56 -0
- package/DOCS/STRATEGIC_BLUEPRINT_2026-01-07.md +72 -0
- package/DOCS/SYSTEM_AUDIT_2026-01-30.md +738 -0
- package/DOCS/SYSTEM_INVENTORY.md +520 -0
- package/DOCS/TELEMETRY_EXPORTS.md +34 -0
- package/DOCS/WEBGPU_STATUS.md +38 -0
- package/DOCS/XR_BENCHMARKS.md +608 -0
- package/LICENSE +21 -0
- package/README.md +426 -0
- package/docs/.nojekyll +0 -0
- package/docs/01-dissolution_of_euclidean_hegemony.html +346 -0
- package/docs/02-hyperspatial_ego_death.html +346 -0
- package/docs/03-post_cartesian_sublime.html +346 -0
- package/docs/04-crystalline_void_meditation.html +346 -0
- package/docs/05-quantum_decoherence_ballet.html +346 -0
- package/docs/06-dissolution_of_euclidean_hegemony.html +346 -0
- package/docs/07-hyperspatial_ego_death.html +346 -0
- package/docs/08-post_cartesian_sublime.html +346 -0
- package/docs/09-crystalline_void_meditation.html +346 -0
- package/docs/10-quantum_decoherence_ballet.html +346 -0
- package/docs/11-dissolution_of_euclidean_hegemony.html +346 -0
- package/docs/12-hyperspatial_ego_death.html +346 -0
- package/docs/13-post_cartesian_sublime.html +346 -0
- package/docs/index.html +794 -0
- package/docs/test-hub.html +441 -0
- package/docs/url-state.js +102 -0
- package/docs/vib3-exports/01-quantum-quantum-tetrahedron-lattice.html +489 -0
- package/docs/vib3-exports/02-quantum-quantum-hypersphere-matrix.html +489 -0
- package/docs/vib3-exports/03-quantum-quantum-hypertetra-fractal.html +489 -0
- package/docs/vib3-exports/04-faceted-faceted-crystal-structure.html +407 -0
- package/docs/vib3-exports/05-faceted-faceted-klein-bottle.html +407 -0
- package/docs/vib3-exports/06-faceted-faceted-hypertetra-torus.html +407 -0
- package/docs/vib3-exports/07-holographic-holographic-wave-field.html +457 -0
- package/docs/vib3-exports/08-holographic-holographic-hypersphere-sphere.html +457 -0
- package/docs/vib3-exports/09-holographic-holographic-hypertetra-crystal.html +457 -0
- package/docs/vib3-exports/index.html +238 -0
- package/docs/webgpu-live.html +702 -0
- package/package.json +367 -0
- package/src/advanced/AIPresetGenerator.js +777 -0
- package/src/advanced/MIDIController.js +703 -0
- package/src/advanced/OffscreenWorker.js +1051 -0
- package/src/advanced/WebGPUCompute.js +1051 -0
- package/src/advanced/WebXRRenderer.js +680 -0
- package/src/agent/cli/AgentCLI.js +615 -0
- package/src/agent/cli/index.js +14 -0
- package/src/agent/index.js +73 -0
- package/src/agent/mcp/MCPServer.js +950 -0
- package/src/agent/mcp/index.js +9 -0
- package/src/agent/mcp/tools.js +548 -0
- package/src/agent/telemetry/EventStream.js +669 -0
- package/src/agent/telemetry/Instrumentation.js +618 -0
- package/src/agent/telemetry/TelemetryExporters.js +427 -0
- package/src/agent/telemetry/TelemetryService.js +464 -0
- package/src/agent/telemetry/index.js +52 -0
- package/src/benchmarks/BenchmarkRunner.js +381 -0
- package/src/benchmarks/MetricsCollector.js +299 -0
- package/src/benchmarks/index.js +9 -0
- package/src/benchmarks/scenes.js +259 -0
- package/src/cli/index.js +675 -0
- package/src/config/ApiConfig.js +88 -0
- package/src/core/CanvasManager.js +217 -0
- package/src/core/ErrorReporter.js +117 -0
- package/src/core/ParameterMapper.js +333 -0
- package/src/core/Parameters.js +396 -0
- package/src/core/RendererContracts.js +200 -0
- package/src/core/UnifiedResourceManager.js +370 -0
- package/src/core/VIB3Engine.js +636 -0
- package/src/core/renderers/FacetedRendererAdapter.js +32 -0
- package/src/core/renderers/HolographicRendererAdapter.js +29 -0
- package/src/core/renderers/QuantumRendererAdapter.js +29 -0
- package/src/core/renderers/RendererLifecycleManager.js +63 -0
- package/src/creative/ColorPresetsSystem.js +980 -0
- package/src/creative/ParameterTimeline.js +1061 -0
- package/src/creative/PostProcessingPipeline.js +1113 -0
- package/src/creative/TransitionAnimator.js +683 -0
- package/src/export/CSSExporter.js +226 -0
- package/src/export/CardGeneratorBase.js +279 -0
- package/src/export/ExportManager.js +580 -0
- package/src/export/FacetedCardGenerator.js +279 -0
- package/src/export/HolographicCardGenerator.js +543 -0
- package/src/export/LottieExporter.js +552 -0
- package/src/export/QuantumCardGenerator.js +315 -0
- package/src/export/SVGExporter.js +519 -0
- package/src/export/ShaderExporter.js +903 -0
- package/src/export/TradingCardGenerator.js +3055 -0
- package/src/export/TradingCardManager.js +181 -0
- package/src/export/VIB3PackageExporter.js +559 -0
- package/src/export/index.js +14 -0
- package/src/export/systems/TradingCardSystemFaceted.js +494 -0
- package/src/export/systems/TradingCardSystemHolographic.js +452 -0
- package/src/export/systems/TradingCardSystemQuantum.js +411 -0
- package/src/faceted/FacetedSystem.js +963 -0
- package/src/features/CollectionManager.js +433 -0
- package/src/gallery/CollectionManager.js +240 -0
- package/src/gallery/GallerySystem.js +485 -0
- package/src/geometry/GeometryFactory.js +314 -0
- package/src/geometry/GeometryLibrary.js +72 -0
- package/src/geometry/buffers/BufferBuilder.js +338 -0
- package/src/geometry/buffers/index.js +18 -0
- package/src/geometry/generators/Crystal.js +420 -0
- package/src/geometry/generators/Fractal.js +298 -0
- package/src/geometry/generators/KleinBottle.js +197 -0
- package/src/geometry/generators/Sphere.js +192 -0
- package/src/geometry/generators/Tesseract.js +160 -0
- package/src/geometry/generators/Tetrahedron.js +225 -0
- package/src/geometry/generators/Torus.js +304 -0
- package/src/geometry/generators/Wave.js +341 -0
- package/src/geometry/index.js +142 -0
- package/src/geometry/warp/HypersphereCore.js +211 -0
- package/src/geometry/warp/HypertetraCore.js +386 -0
- package/src/geometry/warp/index.js +57 -0
- package/src/holograms/HolographicVisualizer.js +1073 -0
- package/src/holograms/RealHolographicSystem.js +966 -0
- package/src/holograms/variantRegistry.js +69 -0
- package/src/integrations/FigmaPlugin.js +854 -0
- package/src/integrations/OBSMode.js +754 -0
- package/src/integrations/ThreeJsPackage.js +660 -0
- package/src/integrations/TouchDesignerExport.js +552 -0
- package/src/integrations/frameworks/Vib3React.js +591 -0
- package/src/integrations/frameworks/Vib3Svelte.js +654 -0
- package/src/integrations/frameworks/Vib3Vue.js +628 -0
- package/src/llm/LLMParameterInterface.js +240 -0
- package/src/llm/LLMParameterUI.js +577 -0
- package/src/math/Mat4x4.js +708 -0
- package/src/math/Projection.js +341 -0
- package/src/math/Rotor4D.js +637 -0
- package/src/math/Vec4.js +476 -0
- package/src/math/constants.js +164 -0
- package/src/math/index.js +68 -0
- package/src/math/projections.js +54 -0
- package/src/math/rotations.js +196 -0
- package/src/quantum/QuantumEngine.js +906 -0
- package/src/quantum/QuantumVisualizer.js +1103 -0
- package/src/reactivity/ReactivityConfig.js +499 -0
- package/src/reactivity/ReactivityManager.js +586 -0
- package/src/reactivity/SpatialInputSystem.js +1783 -0
- package/src/reactivity/index.js +93 -0
- package/src/render/CommandBuffer.js +465 -0
- package/src/render/MultiCanvasBridge.js +340 -0
- package/src/render/RenderCommand.js +514 -0
- package/src/render/RenderResourceRegistry.js +523 -0
- package/src/render/RenderState.js +552 -0
- package/src/render/RenderTarget.js +512 -0
- package/src/render/ShaderLoader.js +253 -0
- package/src/render/ShaderProgram.js +599 -0
- package/src/render/UnifiedRenderBridge.js +496 -0
- package/src/render/backends/WebGLBackend.js +1108 -0
- package/src/render/backends/WebGPUBackend.js +1409 -0
- package/src/render/commands/CommandBufferExecutor.js +607 -0
- package/src/render/commands/RenderCommandBuffer.js +661 -0
- package/src/render/commands/index.js +17 -0
- package/src/render/index.js +367 -0
- package/src/scene/Disposable.js +498 -0
- package/src/scene/MemoryPool.js +618 -0
- package/src/scene/Node4D.js +697 -0
- package/src/scene/ResourceManager.js +599 -0
- package/src/scene/Scene4D.js +540 -0
- package/src/scene/index.js +98 -0
- package/src/schemas/error.schema.json +84 -0
- package/src/schemas/extension.schema.json +88 -0
- package/src/schemas/index.js +214 -0
- package/src/schemas/parameters.schema.json +142 -0
- package/src/schemas/tool-pack.schema.json +44 -0
- package/src/schemas/tool-response.schema.json +127 -0
- package/src/shaders/common/fullscreen.vert.glsl +5 -0
- package/src/shaders/common/fullscreen.vert.wgsl +17 -0
- package/src/shaders/common/geometry24.glsl +65 -0
- package/src/shaders/common/geometry24.wgsl +54 -0
- package/src/shaders/common/rotation4d.glsl +85 -0
- package/src/shaders/common/rotation4d.wgsl +86 -0
- package/src/shaders/common/uniforms.glsl +44 -0
- package/src/shaders/common/uniforms.wgsl +48 -0
- package/src/shaders/faceted/faceted.frag.glsl +129 -0
- package/src/shaders/faceted/faceted.frag.wgsl +164 -0
- package/src/shaders/holographic/holographic.frag.glsl +406 -0
- package/src/shaders/holographic/holographic.frag.wgsl +185 -0
- package/src/shaders/quantum/quantum.frag.glsl +513 -0
- package/src/shaders/quantum/quantum.frag.wgsl +361 -0
- package/src/testing/ParallelTestFramework.js +519 -0
- package/src/testing/__snapshots__/exportFormats.test.js.snap +24 -0
- package/src/testing/exportFormats.test.js +8 -0
- package/src/testing/projections.test.js +14 -0
- package/src/testing/rotations.test.js +37 -0
- package/src/ui/InteractivityMenu.js +516 -0
- package/src/ui/StatusManager.js +96 -0
- package/src/ui/adaptive/renderers/webgpu/BufferLayout.ts +252 -0
- package/src/ui/adaptive/renderers/webgpu/PolytopeInstanceBuffer.ts +144 -0
- package/src/ui/adaptive/renderers/webgpu/TripleBufferedUniform.ts +170 -0
- package/src/ui/adaptive/renderers/webgpu/WebGPURenderer.ts +735 -0
- package/src/ui/adaptive/renderers/webgpu/index.ts +112 -0
- package/src/variations/VariationManager.js +431 -0
- package/src/viewer/AudioReactivity.js +505 -0
- package/src/viewer/CardBending.js +481 -0
- package/src/viewer/GalleryUI.js +832 -0
- package/src/viewer/ReactivityManager.js +590 -0
- package/src/viewer/TradingCardExporter.js +600 -0
- package/src/viewer/ViewerPortal.js +374 -0
- package/src/viewer/index.js +12 -0
- package/src/wasm/WasmLoader.js +296 -0
- package/src/wasm/index.js +132 -0
- package/tools/agentic/mcpTools.js +88 -0
- package/tools/cli/agent-cli.js +92 -0
- package/tools/export/formats.js +24 -0
- package/tools/math/rotation-baseline.mjs +64 -0
- package/tools/shader-sync-verify.js +937 -0
- package/tools/telemetry/manifestPipeline.js +141 -0
- package/tools/telemetry/telemetryEvents.js +35 -0
- package/types/adaptive-sdk.d.ts +185 -0
- package/types/advanced/AIPresetGenerator.d.ts +81 -0
- package/types/advanced/MIDIController.d.ts +100 -0
- package/types/advanced/OffscreenWorker.d.ts +82 -0
- package/types/advanced/WebGPUCompute.d.ts +52 -0
- package/types/advanced/WebXRRenderer.d.ts +77 -0
- package/types/advanced/index.d.ts +46 -0
- package/types/core/ErrorReporter.d.ts +50 -0
- package/types/core/VIB3Engine.d.ts +204 -0
- package/types/creative/ColorPresetsSystem.d.ts +91 -0
- package/types/creative/ParameterTimeline.d.ts +74 -0
- package/types/creative/PostProcessingPipeline.d.ts +109 -0
- package/types/creative/TransitionAnimator.d.ts +71 -0
- package/types/creative/index.d.ts +35 -0
- package/types/integrations/FigmaPlugin.d.ts +46 -0
- package/types/integrations/OBSMode.d.ts +74 -0
- package/types/integrations/ThreeJsPackage.d.ts +62 -0
- package/types/integrations/TouchDesignerExport.d.ts +36 -0
- package/types/integrations/Vib3React.d.ts +74 -0
- package/types/integrations/Vib3Svelte.d.ts +63 -0
- package/types/integrations/Vib3Vue.d.ts +55 -0
- package/types/integrations/index.d.ts +52 -0
- package/types/reactivity/SpatialInputSystem.d.ts +173 -0
- package/types/reactivity/index.d.ts +394 -0
- package/types/render/CommandBuffer.d.ts +169 -0
- package/types/render/RenderCommand.d.ts +312 -0
- package/types/render/RenderState.d.ts +279 -0
- package/types/render/RenderTarget.d.ts +254 -0
- package/types/render/ShaderProgram.d.ts +277 -0
- package/types/render/UnifiedRenderBridge.d.ts +143 -0
- package/types/render/WebGLBackend.d.ts +168 -0
- package/types/render/WebGPUBackend.d.ts +186 -0
- package/types/render/index.d.ts +141 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VIB3+ MCP Module
|
|
3
|
+
* Re-exports MCP server and tools
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export { MCPServer, mcpServer } from './MCPServer.js';
|
|
7
|
+
export { toolDefinitions, getToolList, getToolNames, getTool, validateToolInput } from './tools.js';
|
|
8
|
+
|
|
9
|
+
export default mcpServer from './MCPServer.js';
|
|
@@ -0,0 +1,548 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VIB3+ MCP Tool Definitions
|
|
3
|
+
* Workflow-oriented tools for agentic API consumption
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { schemaRegistry } from '../../schemas/index.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Tool definitions following MCP specification
|
|
10
|
+
* Granularity matches workflows, not individual API endpoints
|
|
11
|
+
*/
|
|
12
|
+
export const toolDefinitions = {
|
|
13
|
+
// Scene Management
|
|
14
|
+
create_4d_visualization: {
|
|
15
|
+
name: 'create_4d_visualization',
|
|
16
|
+
description: 'Creates a complete 4D visualization scene with specified geometry and projection. Returns scene ID and metadata for subsequent operations.',
|
|
17
|
+
inputSchema: {
|
|
18
|
+
type: 'object',
|
|
19
|
+
properties: {
|
|
20
|
+
system: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
enum: ['quantum', 'faceted', 'holographic'],
|
|
23
|
+
description: 'Visualization system to use'
|
|
24
|
+
},
|
|
25
|
+
geometry_index: {
|
|
26
|
+
type: 'integer',
|
|
27
|
+
minimum: 0,
|
|
28
|
+
maximum: 23,
|
|
29
|
+
description: 'Geometry index: 0-7 base, 8-15 hypersphere core, 16-23 hypertetrahedron core'
|
|
30
|
+
},
|
|
31
|
+
projection: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
enum: ['perspective', 'stereographic', 'orthographic'],
|
|
34
|
+
default: 'perspective',
|
|
35
|
+
description: 'Projection method for 4D to 3D mapping'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
required: ['system']
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
set_rotation: {
|
|
43
|
+
name: 'set_rotation',
|
|
44
|
+
description: 'Sets 6D rotation angles across all six rotation planes. XY/XZ/YZ are 3D rotations, XW/YW/ZW are 4D hyperspace rotations that create inside-out effects.',
|
|
45
|
+
inputSchema: {
|
|
46
|
+
type: 'object',
|
|
47
|
+
properties: {
|
|
48
|
+
XY: { type: 'number', minimum: -6.28, maximum: 6.28, description: 'X-Y plane rotation (radians)' },
|
|
49
|
+
XZ: { type: 'number', minimum: -6.28, maximum: 6.28, description: 'X-Z plane rotation (radians)' },
|
|
50
|
+
YZ: { type: 'number', minimum: -6.28, maximum: 6.28, description: 'Y-Z plane rotation (radians)' },
|
|
51
|
+
XW: { type: 'number', minimum: -6.28, maximum: 6.28, description: 'X-W hyperplane rotation (radians)' },
|
|
52
|
+
YW: { type: 'number', minimum: -6.28, maximum: 6.28, description: 'Y-W hyperplane rotation (radians)' },
|
|
53
|
+
ZW: { type: 'number', minimum: -6.28, maximum: 6.28, description: 'Z-W hyperplane rotation (radians)' }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
set_visual_parameters: {
|
|
59
|
+
name: 'set_visual_parameters',
|
|
60
|
+
description: 'Adjusts visual rendering parameters like color, speed, chaos, and morphing. Returns updated state.',
|
|
61
|
+
inputSchema: {
|
|
62
|
+
type: 'object',
|
|
63
|
+
properties: {
|
|
64
|
+
hue: { type: 'integer', minimum: 0, maximum: 360, description: 'Base color hue in degrees' },
|
|
65
|
+
saturation: { type: 'number', minimum: 0, maximum: 1, description: 'Color saturation' },
|
|
66
|
+
intensity: { type: 'number', minimum: 0, maximum: 1, description: 'Brightness/intensity' },
|
|
67
|
+
speed: { type: 'number', minimum: 0.1, maximum: 3, description: 'Animation speed multiplier' },
|
|
68
|
+
chaos: { type: 'number', minimum: 0, maximum: 1, description: 'Randomization/turbulence' },
|
|
69
|
+
morphFactor: { type: 'number', minimum: 0, maximum: 2, description: 'Shape transformation factor' },
|
|
70
|
+
gridDensity: { type: 'number', minimum: 4, maximum: 100, description: 'Geometric detail level' },
|
|
71
|
+
dimension: { type: 'number', minimum: 3.0, maximum: 4.5, description: 'Dimensional interpolation' }
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
switch_system: {
|
|
77
|
+
name: 'switch_system',
|
|
78
|
+
description: 'Switches between visualization systems (quantum, faceted, holographic). Destroys old system and creates new one.',
|
|
79
|
+
inputSchema: {
|
|
80
|
+
type: 'object',
|
|
81
|
+
properties: {
|
|
82
|
+
system: {
|
|
83
|
+
type: 'string',
|
|
84
|
+
enum: ['quantum', 'faceted', 'holographic'],
|
|
85
|
+
description: 'Target visualization system'
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
required: ['system']
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
change_geometry: {
|
|
93
|
+
name: 'change_geometry',
|
|
94
|
+
description: 'Changes the active geometry type. Supports 24 geometries: 8 base types x 3 core modes (base, hypersphere, hypertetrahedron).',
|
|
95
|
+
inputSchema: {
|
|
96
|
+
type: 'object',
|
|
97
|
+
properties: {
|
|
98
|
+
geometry_index: {
|
|
99
|
+
type: 'integer',
|
|
100
|
+
minimum: 0,
|
|
101
|
+
maximum: 23,
|
|
102
|
+
description: 'Geometry index (0-7: base, 8-15: hypersphere core, 16-23: hypertetrahedron core)'
|
|
103
|
+
},
|
|
104
|
+
base_type: {
|
|
105
|
+
type: 'string',
|
|
106
|
+
enum: ['tetrahedron', 'hypercube', 'sphere', 'torus', 'klein_bottle', 'fractal', 'wave', 'crystal'],
|
|
107
|
+
description: 'Alternative: specify base geometry by name'
|
|
108
|
+
},
|
|
109
|
+
core_type: {
|
|
110
|
+
type: 'string',
|
|
111
|
+
enum: ['base', 'hypersphere', 'hypertetrahedron'],
|
|
112
|
+
default: 'base',
|
|
113
|
+
description: 'Core transformation to apply'
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
get_state: {
|
|
120
|
+
name: 'get_state',
|
|
121
|
+
description: 'Returns complete current state including system, geometry, all parameters, and render info.',
|
|
122
|
+
inputSchema: {
|
|
123
|
+
type: 'object',
|
|
124
|
+
properties: {}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
randomize_parameters: {
|
|
129
|
+
name: 'randomize_parameters',
|
|
130
|
+
description: 'Randomizes all parameters for creative exploration. Returns new state.',
|
|
131
|
+
inputSchema: {
|
|
132
|
+
type: 'object',
|
|
133
|
+
properties: {
|
|
134
|
+
preserve_system: {
|
|
135
|
+
type: 'boolean',
|
|
136
|
+
default: true,
|
|
137
|
+
description: 'Keep current system, only randomize visual params'
|
|
138
|
+
},
|
|
139
|
+
preserve_geometry: {
|
|
140
|
+
type: 'boolean',
|
|
141
|
+
default: false,
|
|
142
|
+
description: 'Keep current geometry, only randomize other params'
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
reset_parameters: {
|
|
149
|
+
name: 'reset_parameters',
|
|
150
|
+
description: 'Resets all parameters to default values.',
|
|
151
|
+
inputSchema: {
|
|
152
|
+
type: 'object',
|
|
153
|
+
properties: {}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
|
|
157
|
+
// Gallery Operations
|
|
158
|
+
save_to_gallery: {
|
|
159
|
+
name: 'save_to_gallery',
|
|
160
|
+
description: 'Saves current state to a gallery slot (0-99). Slots 0-29 are defaults, 30-99 are custom.',
|
|
161
|
+
inputSchema: {
|
|
162
|
+
type: 'object',
|
|
163
|
+
properties: {
|
|
164
|
+
slot: {
|
|
165
|
+
type: 'integer',
|
|
166
|
+
minimum: 30,
|
|
167
|
+
maximum: 99,
|
|
168
|
+
description: 'Gallery slot to save to (30-99 for custom)'
|
|
169
|
+
},
|
|
170
|
+
name: {
|
|
171
|
+
type: 'string',
|
|
172
|
+
description: 'Optional name for the variation'
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
required: ['slot']
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
|
|
179
|
+
load_from_gallery: {
|
|
180
|
+
name: 'load_from_gallery',
|
|
181
|
+
description: 'Loads a saved variation from gallery slot.',
|
|
182
|
+
inputSchema: {
|
|
183
|
+
type: 'object',
|
|
184
|
+
properties: {
|
|
185
|
+
slot: {
|
|
186
|
+
type: 'integer',
|
|
187
|
+
minimum: 0,
|
|
188
|
+
maximum: 99,
|
|
189
|
+
description: 'Gallery slot to load from'
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
required: ['slot']
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
|
|
196
|
+
// Query Tools
|
|
197
|
+
search_geometries: {
|
|
198
|
+
name: 'search_geometries',
|
|
199
|
+
description: 'Returns list of available geometries with their properties. Use to discover geometry options.',
|
|
200
|
+
inputSchema: {
|
|
201
|
+
type: 'object',
|
|
202
|
+
properties: {
|
|
203
|
+
core_type: {
|
|
204
|
+
type: 'string',
|
|
205
|
+
enum: ['base', 'hypersphere', 'hypertetrahedron', 'all'],
|
|
206
|
+
default: 'all',
|
|
207
|
+
description: 'Filter by core type'
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
|
|
213
|
+
get_parameter_schema: {
|
|
214
|
+
name: 'get_parameter_schema',
|
|
215
|
+
description: 'Returns full JSON schema for parameters with valid ranges and descriptions.',
|
|
216
|
+
inputSchema: {
|
|
217
|
+
type: 'object',
|
|
218
|
+
properties: {}
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
|
|
222
|
+
// Onboarding Tools
|
|
223
|
+
get_sdk_context: {
|
|
224
|
+
name: 'get_sdk_context',
|
|
225
|
+
description: 'Returns essential SDK context for agent onboarding. Call this first to understand the system.',
|
|
226
|
+
inputSchema: {
|
|
227
|
+
type: 'object',
|
|
228
|
+
properties: {}
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
|
|
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).',
|
|
235
|
+
inputSchema: {
|
|
236
|
+
type: 'object',
|
|
237
|
+
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: {
|
|
244
|
+
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: {
|
|
254
|
+
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'
|
|
257
|
+
},
|
|
258
|
+
q5_base_geometries: {
|
|
259
|
+
type: 'string',
|
|
260
|
+
enum: ['a', 'b', 'c', 'd'],
|
|
261
|
+
description: 'Q5: How many base geometry types? a)6 b)8 c)10 d)24'
|
|
262
|
+
},
|
|
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
|
+
}
|
|
268
|
+
},
|
|
269
|
+
required: ['q1_rotation_planes', 'q2_geometry_formula', 'q3_canvas_layers']
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
|
|
273
|
+
// ===== REACTIVITY TOOLS (Phase 6.5) =====
|
|
274
|
+
|
|
275
|
+
set_reactivity_config: {
|
|
276
|
+
name: 'set_reactivity_config',
|
|
277
|
+
description: 'Set complete reactivity configuration for audio/tilt/interaction behavior. This controls how the visualization responds to audio input, device motion, and user interaction.',
|
|
278
|
+
inputSchema: {
|
|
279
|
+
type: 'object',
|
|
280
|
+
properties: {
|
|
281
|
+
audio: {
|
|
282
|
+
type: 'object',
|
|
283
|
+
description: 'Audio reactivity configuration',
|
|
284
|
+
properties: {
|
|
285
|
+
enabled: { type: 'boolean', description: 'Enable audio reactivity' },
|
|
286
|
+
globalSensitivity: { type: 'number', minimum: 0.1, maximum: 3.0, description: 'Overall audio sensitivity' }
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
tilt: {
|
|
290
|
+
type: 'object',
|
|
291
|
+
description: 'Device tilt configuration',
|
|
292
|
+
properties: {
|
|
293
|
+
enabled: { type: 'boolean', description: 'Enable tilt reactivity' },
|
|
294
|
+
sensitivity: { type: 'number', minimum: 0.1, maximum: 3.0, description: 'Tilt sensitivity' },
|
|
295
|
+
dramaticMode: { type: 'boolean', description: 'Enable dramatic (8x) mode' }
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
interaction: {
|
|
299
|
+
type: 'object',
|
|
300
|
+
description: 'Mouse/touch interaction configuration',
|
|
301
|
+
properties: {
|
|
302
|
+
enabled: { type: 'boolean', description: 'Enable interaction' },
|
|
303
|
+
mouseMode: { type: 'string', enum: ['rotation', 'velocity', 'shimmer', 'attract', 'repel', 'none'] },
|
|
304
|
+
clickMode: { type: 'string', enum: ['burst', 'blast', 'ripple', 'pulse', 'none'] },
|
|
305
|
+
scrollMode: { type: 'string', enum: ['cycle', 'wave', 'sweep', 'zoom', 'morph', 'none'] }
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
|
|
312
|
+
get_reactivity_config: {
|
|
313
|
+
name: 'get_reactivity_config',
|
|
314
|
+
description: 'Get current reactivity configuration including audio, tilt, and interaction settings.',
|
|
315
|
+
inputSchema: {
|
|
316
|
+
type: 'object',
|
|
317
|
+
properties: {}
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
|
|
321
|
+
configure_audio_band: {
|
|
322
|
+
name: 'configure_audio_band',
|
|
323
|
+
description: 'Configure a single audio frequency band (bass, mid, or high) with target parameter mappings.',
|
|
324
|
+
inputSchema: {
|
|
325
|
+
type: 'object',
|
|
326
|
+
properties: {
|
|
327
|
+
band: {
|
|
328
|
+
type: 'string',
|
|
329
|
+
enum: ['bass', 'mid', 'high'],
|
|
330
|
+
description: 'Frequency band to configure'
|
|
331
|
+
},
|
|
332
|
+
enabled: { type: 'boolean', description: 'Enable this band' },
|
|
333
|
+
sensitivity: { type: 'number', minimum: 0.1, maximum: 3.0, description: 'Band sensitivity' },
|
|
334
|
+
targets: {
|
|
335
|
+
type: 'array',
|
|
336
|
+
description: 'Parameter targets for this band',
|
|
337
|
+
items: {
|
|
338
|
+
type: 'object',
|
|
339
|
+
properties: {
|
|
340
|
+
param: { type: 'string', description: 'Target parameter name (e.g., morphFactor, chaos, speed)' },
|
|
341
|
+
weight: { type: 'number', description: 'Effect weight/strength' },
|
|
342
|
+
mode: { type: 'string', enum: ['add', 'multiply', 'replace', 'max', 'min'], default: 'add' }
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
required: ['band']
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
|
|
351
|
+
// ===== EXPORT TOOLS (Phase 6.5) =====
|
|
352
|
+
|
|
353
|
+
export_package: {
|
|
354
|
+
name: 'export_package',
|
|
355
|
+
description: 'Export complete VIB3Package with visual state, reactivity config, and embed code. The package is self-contained and portable.',
|
|
356
|
+
inputSchema: {
|
|
357
|
+
type: 'object',
|
|
358
|
+
properties: {
|
|
359
|
+
name: { type: 'string', description: 'Package name' },
|
|
360
|
+
description: { type: 'string', description: 'Package description' },
|
|
361
|
+
includeReactivity: { type: 'boolean', default: true, description: 'Include reactivity configuration' },
|
|
362
|
+
includeEmbed: { type: 'boolean', default: true, description: 'Include embed code (HTML/JS/CSS)' },
|
|
363
|
+
format: {
|
|
364
|
+
type: 'string',
|
|
365
|
+
enum: ['json', 'html', 'webcomponent'],
|
|
366
|
+
default: 'json',
|
|
367
|
+
description: 'Export format'
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
|
|
373
|
+
// ===== PRESET TOOLS (Phase 6.6) =====
|
|
374
|
+
|
|
375
|
+
apply_behavior_preset: {
|
|
376
|
+
name: 'apply_behavior_preset',
|
|
377
|
+
description: 'Apply a named behavior preset that configures reactivity for common use cases.',
|
|
378
|
+
inputSchema: {
|
|
379
|
+
type: 'object',
|
|
380
|
+
properties: {
|
|
381
|
+
preset: {
|
|
382
|
+
type: 'string',
|
|
383
|
+
enum: ['ambient', 'reactive', 'immersive', 'energetic', 'calm', 'cinematic'],
|
|
384
|
+
description: 'Preset name: ambient (minimal), reactive (audio-driven), immersive (full tilt), energetic (high speed), calm (slow/smooth), cinematic (dramatic rotations)'
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
required: ['preset']
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
|
|
391
|
+
list_behavior_presets: {
|
|
392
|
+
name: 'list_behavior_presets',
|
|
393
|
+
description: 'List all available behavior presets with descriptions.',
|
|
394
|
+
inputSchema: {
|
|
395
|
+
type: 'object',
|
|
396
|
+
properties: {}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Get all tool definitions as array for MCP registration
|
|
403
|
+
*/
|
|
404
|
+
export function getToolList() {
|
|
405
|
+
return Object.values(toolDefinitions);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Get tool names only (for progressive disclosure)
|
|
410
|
+
*/
|
|
411
|
+
export function getToolNames() {
|
|
412
|
+
return Object.keys(toolDefinitions);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Get single tool definition by name
|
|
417
|
+
*/
|
|
418
|
+
export function getTool(name) {
|
|
419
|
+
return toolDefinitions[name] || null;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Validate tool input against schema
|
|
424
|
+
*/
|
|
425
|
+
export function validateToolInput(toolName, input) {
|
|
426
|
+
const tool = toolDefinitions[toolName];
|
|
427
|
+
if (!tool) {
|
|
428
|
+
return {
|
|
429
|
+
valid: false,
|
|
430
|
+
error: {
|
|
431
|
+
type: 'NotFoundError',
|
|
432
|
+
code: 'TOOL_NOT_FOUND',
|
|
433
|
+
message: `Tool '${toolName}' not found`,
|
|
434
|
+
valid_options: Object.keys(toolDefinitions),
|
|
435
|
+
suggestion: 'Use get_parameter_schema or search_geometries to discover available tools'
|
|
436
|
+
}
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
if (!input || typeof input !== 'object') {
|
|
441
|
+
return {
|
|
442
|
+
valid: false,
|
|
443
|
+
error: {
|
|
444
|
+
type: 'ValidationError',
|
|
445
|
+
code: 'INVALID_INPUT',
|
|
446
|
+
message: 'Input must be a non-null object',
|
|
447
|
+
suggestion: 'Provide a valid JSON object as input'
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
// Check required fields
|
|
453
|
+
const required = tool.inputSchema.required || [];
|
|
454
|
+
for (const field of required) {
|
|
455
|
+
if (!(field in input)) {
|
|
456
|
+
return {
|
|
457
|
+
valid: false,
|
|
458
|
+
error: {
|
|
459
|
+
type: 'ValidationError',
|
|
460
|
+
code: 'MISSING_REQUIRED_FIELD',
|
|
461
|
+
message: `Missing required field: ${field}`,
|
|
462
|
+
parameter: field,
|
|
463
|
+
suggestion: `Provide the '${field}' parameter`
|
|
464
|
+
}
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
// Reject excessively large input payloads (> 64 KB serialized)
|
|
470
|
+
try {
|
|
471
|
+
if (JSON.stringify(input).length > 64 * 1024) {
|
|
472
|
+
return {
|
|
473
|
+
valid: false,
|
|
474
|
+
error: {
|
|
475
|
+
type: 'ValidationError',
|
|
476
|
+
code: 'INPUT_TOO_LARGE',
|
|
477
|
+
message: 'Input payload exceeds 64 KB size limit',
|
|
478
|
+
suggestion: 'Reduce the size of the input data'
|
|
479
|
+
}
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
} catch {
|
|
483
|
+
return {
|
|
484
|
+
valid: false,
|
|
485
|
+
error: {
|
|
486
|
+
type: 'ValidationError',
|
|
487
|
+
code: 'INVALID_INPUT',
|
|
488
|
+
message: 'Input is not serializable',
|
|
489
|
+
suggestion: 'Provide a valid JSON object as input'
|
|
490
|
+
}
|
|
491
|
+
};
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
// Validate property types and ranges against schema
|
|
495
|
+
const MAX_STRING_LENGTH = 1024;
|
|
496
|
+
const properties = tool.inputSchema.properties || {};
|
|
497
|
+
const errors = [];
|
|
498
|
+
for (const [key, value] of Object.entries(input)) {
|
|
499
|
+
const propSchema = properties[key];
|
|
500
|
+
if (!propSchema) continue; // Skip unknown properties
|
|
501
|
+
|
|
502
|
+
if (propSchema.type === 'number' || propSchema.type === 'integer') {
|
|
503
|
+
const num = Number(value);
|
|
504
|
+
if (!Number.isFinite(num)) {
|
|
505
|
+
errors.push(`${key}: must be a finite number`);
|
|
506
|
+
continue;
|
|
507
|
+
}
|
|
508
|
+
if (propSchema.minimum !== undefined && num < propSchema.minimum) {
|
|
509
|
+
errors.push(`${key}: ${num} is below minimum ${propSchema.minimum}`);
|
|
510
|
+
}
|
|
511
|
+
if (propSchema.maximum !== undefined && num > propSchema.maximum) {
|
|
512
|
+
errors.push(`${key}: ${num} exceeds maximum ${propSchema.maximum}`);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
if (propSchema.type === 'string') {
|
|
516
|
+
if (typeof value !== 'string') {
|
|
517
|
+
errors.push(`${key}: must be a string`);
|
|
518
|
+
continue;
|
|
519
|
+
}
|
|
520
|
+
if (value.length > MAX_STRING_LENGTH) {
|
|
521
|
+
errors.push(`${key}: string exceeds maximum length of ${MAX_STRING_LENGTH}`);
|
|
522
|
+
continue;
|
|
523
|
+
}
|
|
524
|
+
if (propSchema.enum && !propSchema.enum.includes(value)) {
|
|
525
|
+
errors.push(`${key}: '${value}' is not one of [${propSchema.enum.join(', ')}]`);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
if (propSchema.type === 'boolean' && typeof value !== 'boolean') {
|
|
529
|
+
errors.push(`${key}: must be a boolean`);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
if (errors.length > 0) {
|
|
534
|
+
return {
|
|
535
|
+
valid: false,
|
|
536
|
+
error: {
|
|
537
|
+
type: 'ValidationError',
|
|
538
|
+
code: 'INVALID_PARAMETERS',
|
|
539
|
+
message: errors.join('; '),
|
|
540
|
+
suggestion: 'Use get_parameter_schema to see valid ranges'
|
|
541
|
+
}
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
return { valid: true };
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
export default toolDefinitions;
|