@vib3code/sdk 2.0.3-canary.6f35b4c → 2.0.3-canary.74aebb4

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 (89) hide show
  1. package/DOCS/EXPANSION_DESIGN.md +977 -0
  2. package/DOCS/EXPANSION_DESIGN_ULTRA.md +387 -0
  3. package/DOCS/MASTER_PLAN_2026-01-31.md +2 -2
  4. package/DOCS/OPTIMIZATION_PLAN_MATH.md +118 -0
  5. package/DOCS/SYSTEM_INVENTORY.md +2 -2
  6. package/DOCS/WEBGPU_STATUS.md +119 -38
  7. package/DOCS/archive/WEBGPU_STATUS_2026-02-15_STALE.md +38 -0
  8. package/DOCS/dev-tracks/DEV_TRACK_SESSION_2026-02-15.md +142 -0
  9. package/DOCS/dev-tracks/DEV_TRACK_SESSION_2026-02-16.md +108 -0
  10. package/DOCS/dev-tracks/PERF_UPGRADE_2026-02-16.md +308 -0
  11. package/docs/webgpu-live.html +1 -1
  12. package/package.json +10 -1
  13. package/src/agent/index.js +1 -3
  14. package/src/agent/mcp/MCPServer.js +542 -188
  15. package/src/agent/mcp/index.js +1 -1
  16. package/src/agent/mcp/tools.js +132 -32
  17. package/src/cli/index.js +374 -44
  18. package/src/core/VIB3Engine.js +55 -3
  19. package/src/core/index.js +18 -0
  20. package/src/core/renderers/FacetedRendererAdapter.js +10 -9
  21. package/src/core/renderers/HolographicRendererAdapter.js +11 -7
  22. package/src/core/renderers/QuantumRendererAdapter.js +11 -7
  23. package/src/creative/index.js +11 -0
  24. package/src/experimental/GameLoop.js +72 -0
  25. package/src/experimental/LatticePhysics.js +100 -0
  26. package/src/experimental/LiveDirector.js +143 -0
  27. package/src/experimental/PlayerController4D.js +154 -0
  28. package/src/experimental/VIB3Actor.js +138 -0
  29. package/src/experimental/VIB3Compositor.js +117 -0
  30. package/src/experimental/VIB3Link.js +122 -0
  31. package/src/experimental/VIB3Orchestrator.js +146 -0
  32. package/src/experimental/VIB3Universe.js +109 -0
  33. package/src/experimental/demos/CrystalLabyrinth.js +202 -0
  34. package/src/export/index.js +11 -1
  35. package/src/faceted/FacetedSystem.js +27 -10
  36. package/src/games/glyph-war/GlyphWarVisualizer.js +641 -0
  37. package/src/geometry/generators/Crystal.js +2 -2
  38. package/src/holograms/HolographicVisualizer.js +58 -89
  39. package/src/holograms/RealHolographicSystem.js +126 -31
  40. package/src/math/Mat4x4.js +192 -19
  41. package/src/math/Rotor4D.js +93 -39
  42. package/src/math/Vec4.js +119 -78
  43. package/src/math/index.js +7 -7
  44. package/src/quantum/QuantumVisualizer.js +24 -20
  45. package/src/reactivity/index.js +3 -5
  46. package/src/render/LayerPresetManager.js +372 -0
  47. package/src/render/LayerReactivityBridge.js +344 -0
  48. package/src/render/LayerRelationshipGraph.js +610 -0
  49. package/src/render/MultiCanvasBridge.js +148 -25
  50. package/src/render/ShaderLoader.js +38 -0
  51. package/src/render/ShaderProgram.js +4 -4
  52. package/src/render/UnifiedRenderBridge.js +1 -1
  53. package/src/render/backends/WebGPUBackend.js +8 -4
  54. package/src/render/index.js +27 -2
  55. package/src/scene/index.js +4 -4
  56. package/src/shaders/common/geometry24.glsl +65 -0
  57. package/src/shaders/common/geometry24.wgsl +54 -0
  58. package/src/shaders/common/rotation4d.glsl +4 -4
  59. package/src/shaders/common/rotation4d.wgsl +2 -2
  60. package/src/shaders/common/uniforms.wgsl +15 -8
  61. package/src/shaders/faceted/faceted.frag.wgsl +19 -6
  62. package/src/shaders/holographic/holographic.frag.wgsl +7 -5
  63. package/src/shaders/quantum/quantum.frag.wgsl +7 -5
  64. package/src/testing/ParallelTestFramework.js +2 -2
  65. package/src/ui/adaptive/renderers/webgpu/WebGPURenderer.ts +2 -2
  66. package/src/viewer/GalleryUI.js +17 -0
  67. package/src/viewer/ViewerPortal.js +2 -2
  68. package/tools/shader-sync-verify.js +6 -4
  69. package/types/adaptive-sdk.d.ts +204 -5
  70. package/types/agent/cli.d.ts +78 -0
  71. package/types/agent/index.d.ts +18 -0
  72. package/types/agent/mcp.d.ts +87 -0
  73. package/types/agent/telemetry.d.ts +190 -0
  74. package/types/core/VIB3Engine.d.ts +26 -0
  75. package/types/core/index.d.ts +261 -0
  76. package/types/creative/AestheticMapper.d.ts +72 -0
  77. package/types/creative/ChoreographyPlayer.d.ts +96 -0
  78. package/types/creative/index.d.ts +17 -0
  79. package/types/export/index.d.ts +243 -0
  80. package/types/geometry/index.d.ts +164 -0
  81. package/types/math/index.d.ts +214 -0
  82. package/types/render/LayerPresetManager.d.ts +78 -0
  83. package/types/render/LayerReactivityBridge.d.ts +85 -0
  84. package/types/render/LayerRelationshipGraph.d.ts +174 -0
  85. package/types/render/index.d.ts +3 -0
  86. package/types/scene/index.d.ts +204 -0
  87. package/types/systems/index.d.ts +244 -0
  88. package/types/variations/index.d.ts +62 -0
  89. package/types/viewer/index.d.ts +225 -0
@@ -6,4 +6,4 @@
6
6
  export { MCPServer, mcpServer } from './MCPServer.js';
7
7
  export { toolDefinitions, getToolList, getToolNames, getTool, validateToolInput } from './tools.js';
8
8
 
9
- export default mcpServer from './MCPServer.js';
9
+ export { mcpServer as default } from './MCPServer.js';
@@ -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: {
249
+ layer: {
239
250
  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: {
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
 
@@ -651,7 +664,7 @@ export const toolDefinitions = {
651
664
 
652
665
  capture_screenshot: {
653
666
  name: 'capture_screenshot',
654
- description: 'Captures the current visualization as a base64-encoded PNG image by compositing all 5 canvas layers. Only works in browser context. Returns image data that multimodal agents can analyze for visual feedback.',
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.',
655
668
  inputSchema: {
656
669
  type: 'object',
657
670
  properties: {
@@ -762,6 +775,93 @@ export const toolDefinitions = {
762
775
  },
763
776
  required: ['timeline_id', 'action']
764
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
+ }
765
865
  }
766
866
  };
767
867