@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
@@ -0,0 +1,225 @@
1
+ /**
2
+ * Viewer Module TypeScript Definitions
3
+ * ViewerPortal, ViewerInputHandler, GalleryUI, CardBending,
4
+ * AudioReactivity, TradingCardExporter
5
+ */
6
+
7
+ // ============================================================================
8
+ // ViewerPortal
9
+ // ============================================================================
10
+
11
+ /** Portal display mode */
12
+ export type PortalMode = 'card' | 'fullscreen' | 'embedded' | 'pip';
13
+
14
+ /** Projection type for 4D→3D */
15
+ export type ProjectionType = 'perspective' | 'stereographic' | 'orthographic';
16
+
17
+ /** 6D rotation state */
18
+ export interface RotationState {
19
+ XY: number;
20
+ XZ: number;
21
+ YZ: number;
22
+ XW: number;
23
+ YW: number;
24
+ ZW: number;
25
+ }
26
+
27
+ export interface ViewerPortalOptions {
28
+ mode?: PortalMode;
29
+ projection?: ProjectionType;
30
+ enableMouse?: boolean;
31
+ enableOrientation?: boolean;
32
+ }
33
+
34
+ /**
35
+ * Viewer portal for displaying 4D visualizations.
36
+ * Supports multiple display modes, input handling, and export.
37
+ */
38
+ export declare class ViewerPortal {
39
+ mode: PortalMode;
40
+ projection: ProjectionType;
41
+ rotation: RotationState;
42
+
43
+ constructor(options?: ViewerPortalOptions);
44
+
45
+ /** Set display mode. */
46
+ setMode(mode: PortalMode): void;
47
+
48
+ /** Set projection type. */
49
+ setProjection(projection: ProjectionType): void;
50
+
51
+ /** Set rotation on a specific plane. */
52
+ setRotation(plane: string, angle: number): void;
53
+
54
+ /** Get all rotation values. */
55
+ getRotation(): RotationState;
56
+
57
+ /** Export current view as image data URL. */
58
+ exportImage(format?: string, quality?: number): string;
59
+
60
+ /** Destroy and clean up. */
61
+ destroy(): void;
62
+ }
63
+
64
+ // ============================================================================
65
+ // ViewerInputHandler
66
+ // ============================================================================
67
+
68
+ /** Input source type */
69
+ export type InputSource = 'keyboard' | 'mouse' | 'wheel' | 'touch' | 'orientation' | 'gamepad';
70
+
71
+ /** Input preset */
72
+ export type InputPreset = 'default' | 'gaming' | 'presentation' | 'accessibility';
73
+
74
+ /**
75
+ * Universal input handler for viewer interactions.
76
+ * Supports keyboard, mouse, wheel, touch, orientation, and gamepad.
77
+ */
78
+ export declare class ViewerInputHandler {
79
+ constructor(options?: { preset?: InputPreset });
80
+
81
+ /** Enable/disable an input source. */
82
+ setEnabled(source: InputSource, enabled: boolean): void;
83
+
84
+ /** Load an input preset. */
85
+ loadPreset(preset: InputPreset): void;
86
+
87
+ /** Get current input state. */
88
+ getState(): Record<string, any>;
89
+
90
+ /** Destroy all listeners. */
91
+ destroy(): void;
92
+ }
93
+
94
+ // ============================================================================
95
+ // GalleryUI
96
+ // ============================================================================
97
+
98
+ /** Gallery view mode */
99
+ export type GalleryViewMode = 'grid' | 'list' | 'carousel';
100
+
101
+ /** Gallery sort option */
102
+ export type GallerySortBy = 'date' | 'name' | 'system' | 'geometry';
103
+
104
+ /**
105
+ * Gallery UI for browsing and managing saved visualizations.
106
+ * Supports 100 variation slots per system with search, sort, and filter.
107
+ */
108
+ export declare class GalleryUI {
109
+ viewMode: GalleryViewMode;
110
+ sortBy: GallerySortBy;
111
+ searchQuery: string;
112
+ currentPage: number;
113
+
114
+ constructor(options?: { viewMode?: GalleryViewMode; sortBy?: GallerySortBy });
115
+
116
+ /** Set view mode. */
117
+ setViewMode(mode: GalleryViewMode): void;
118
+
119
+ /** Set sort order. */
120
+ setSortBy(sort: GallerySortBy): void;
121
+
122
+ /** Render the gallery. */
123
+ render(): void;
124
+
125
+ /** Destroy and clean up. */
126
+ destroy(): void;
127
+ }
128
+
129
+ // ============================================================================
130
+ // CardBending
131
+ // ============================================================================
132
+
133
+ /** Bend preset name */
134
+ export type BendPreset = 'flat' | 'gentle' | 'dramatic' | 'extreme' | 'wave' | 'twist';
135
+
136
+ /**
137
+ * Card bending system mapping physical bend to 6D rotation.
138
+ * Supports orientation input and parallax layer effects.
139
+ */
140
+ export declare class CardBending {
141
+ constructor();
142
+
143
+ /** Apply a bend preset. */
144
+ applyPreset(preset: BendPreset): void;
145
+
146
+ /** Get 6D rotation mapping from current bend state. */
147
+ getRotationMapping(): RotationState;
148
+
149
+ /** Serialize current state. */
150
+ serialize(): object;
151
+
152
+ /** Deserialize from saved state. */
153
+ deserialize(data: object): void;
154
+ }
155
+
156
+ // ============================================================================
157
+ // AudioReactivity (viewer)
158
+ // ============================================================================
159
+
160
+ /** Audio frequency band */
161
+ export type FrequencyBand = 'bass' | 'mid' | 'high' | 'sub' | 'presence';
162
+
163
+ /**
164
+ * Audio reactivity system for viewer.
165
+ * Maps frequency bands to rotation and visual parameter changes.
166
+ */
167
+ export declare class AudioReactivity {
168
+ constructor(options?: { bands?: FrequencyBand[] });
169
+
170
+ /** Get rotation mapping from audio data. */
171
+ getRotationMapping(): Partial<RotationState>;
172
+
173
+ /** Serialize configuration. */
174
+ serialize(): object;
175
+
176
+ /** Deserialize configuration. */
177
+ deserialize(data: object): void;
178
+ }
179
+
180
+ // ============================================================================
181
+ // TradingCardExporter
182
+ // ============================================================================
183
+
184
+ /** Card size (5:7 aspect ratio) */
185
+ export interface CardSize {
186
+ width: number;
187
+ height: number;
188
+ label: string;
189
+ }
190
+
191
+ /** Frame style for trading cards */
192
+ export type FrameStyle = 'none' | 'simple' | 'ornate' | 'holographic' | 'neon';
193
+
194
+ /** Rarity level */
195
+ export type RarityLevel = 'common' | 'uncommon' | 'rare' | 'epic' | 'legendary' | 'mythic';
196
+
197
+ /**
198
+ * Exports visualizations as trading card images.
199
+ * Supports multiple sizes, frame styles, rarity levels, and metadata.
200
+ */
201
+ export declare class TradingCardExporter {
202
+ constructor();
203
+
204
+ /** Get available card sizes (all 5:7 ratio). */
205
+ getCardSizes(): CardSize[];
206
+
207
+ /** Get available frame styles. */
208
+ getFrameStyles(): FrameStyle[];
209
+
210
+ /** Get available rarity levels. */
211
+ getRarityLevels(): RarityLevel[];
212
+
213
+ /** Export a trading card image. */
214
+ exportCard(options: {
215
+ canvas: HTMLCanvasElement;
216
+ size?: CardSize;
217
+ frame?: FrameStyle;
218
+ rarity?: RarityLevel;
219
+ title?: string;
220
+ metadata?: Record<string, string>;
221
+ }): Promise<Blob | null>;
222
+
223
+ /** Serialize exporter configuration. */
224
+ serialize(): object;
225
+ }
@@ -1,34 +0,0 @@
1
- # Blueprint execution plan (2026-01-07)
2
-
3
- This execution plan operationalizes the strategic blueprint and defines what each session should deliver. Each session should update `DOCS/SESSION_LOG_2026-01-07.md` with timestamped progress and keep the checklist current.
4
-
5
- ## Session cadence
6
- - **Start of session**: review this plan and the strategic blueprint.
7
- - **During session**: implement the next unchecked items, keep scope tight.
8
- - **End of session**: update the session log with timestamped outcomes and any blockers.
9
-
10
- ## Execution checklist
11
- ### Phase 1 — Mathematical foundation
12
- - [x] Add rotor/matrix utilities for the six rotation planes.
13
- - [x] Implement stereographic + perspective projection helpers.
14
- - [x] Add rotation drift/stability tests.
15
-
16
- ### Phase 2 — Rendering core consolidation
17
- - [x] Define renderer contracts and resource manager interfaces.
18
- - [ ] Unify visualization systems behind a shared scene graph.
19
- - [x] Document GPU disposal patterns and lifecycle hooks.
20
-
21
- ### Phase 3 — Agentic integration
22
- - [x] Define MCP tools for create/apply/render workflows.
23
- - [x] Emit structured telemetry spans and error schemas.
24
- - [x] Implement CLI JSON output and non-interactive modes.
25
-
26
- ### Phase 4 — Cross-platform execution
27
- - [x] Define WASM build target and shared math core strategy.
28
- - [x] Add Flutter bindings with a batched render command buffer.
29
- - [x] Prototype WebGPU backend behind feature flags.
30
-
31
- ### Phase 5 — Production hardening
32
- - [x] Draft licensing tiers and activation workflow.
33
- - [x] Add export formats with golden snapshot tests.
34
- - [x] Document XR integration benchmarks and performance targets.
@@ -1,77 +0,0 @@
1
- # Dev track analysis and next steps
2
-
3
- This document summarizes the current development track status, highlights gaps, and proposes the
4
- next execution steps. It should be updated after each multi-system delivery.
5
-
6
- **Last Updated:** 2026-01-30 (v2.0.0)
7
-
8
- ## Current status snapshot
9
- - **Math foundation:** rotation utilities, projection clamping, and stability tests are in place.
10
- - **Renderer lifecycle:** unified contract and lifecycle manager are defined with adapters for the
11
- core systems; resource tracking is centralized in the WebGL backend.
12
- - **Agentic tooling:** MCP/CLI response envelopes are standardized with schema validation.
13
- - **Docs/ops:** environment setup, CI testing, repo manifest, and project provisioning guides are
14
- documented.
15
- - **WebGPU scaffold:** experimental backend initializes device/context and supports clear-pass render frames.
16
- - **WebGPU status/testing:** documented current WebGPU state and validation requirements.
17
- - **v2.0.0 Core Fixes (Phase A):** Quantum color restored, Faceted saturation + audio wired, clickIntensity bug fixed, shader sync tool added.
18
- - **v2.0.0 SpatialInputSystem:** Universal spatial input with 8 source types, 6 profiles, integrated into VIB3Engine. Decouples "card tilting" from device orientation.
19
- - **v2.0.0 Creative Tooling (Phase B):** Color presets (22), transitions (14 easings), post-processing (14 effects), parameter timeline (BPM sync).
20
- - **v2.0.0 Platform Integrations (Phase C):** React, Vue, Svelte component wrappers; Figma plugin; Three.js ShaderMaterial; TouchDesigner GLSL export; OBS mode.
21
- - **v2.0.0 Advanced Features (Phase D):** WebXR renderer, WebGPU compute shaders, MIDI controller, AI preset generator, OffscreenCanvas worker.
22
-
23
- ## Completed phases
24
- | Phase | Status | Deliverables |
25
- |-------|--------|-------------|
26
- | Phase 1: Foundation | ✅ Complete | Math, geometry, parameters |
27
- | Phase 2: Rendering | ✅ Mostly Complete | Contracts, adapters, backends |
28
- | Phase 3: Agentic | ✅ Complete | MCP, CLI, Telemetry |
29
- | Phase 4: WebGPU | 🔄 In Progress | Scaffold exists |
30
- | Phase 5: Hardening | ✅ Complete | 694 tests, XSS prevention |
31
- | Phase A: Parity & Polish | ✅ Complete | Color/audio/saturation fixes |
32
- | Phase B: Creative Tooling | ✅ Complete | 4 modules, 3,837 lines |
33
- | Phase C: Platform Integrations | ✅ Complete | 7 modules, 4,693 lines |
34
- | Phase D: Advanced | ✅ Complete | 5 modules, 4,262 lines |
35
- | SpatialInputSystem | ✅ Complete | 1,783 lines, 8 sources, 6 profiles |
36
-
37
- ## Key gaps to close
38
- 1. **v2.0.0 module test coverage:**
39
- - Creative, integrations, and advanced modules need unit/integration tests.
40
- - SpatialInputSystem profiles need validation tests.
41
- 2. **WebGPU prototype (Phase 4):**
42
- - Confirm feature-flag gating and parity with WebGL backend entry points.
43
- - Establish a minimal shader/material pipeline that mirrors the WebGL contract.
44
- 3. **Platform integration validation:**
45
- - Test React/Vue/Svelte components with actual framework projects.
46
- - Validate Figma plugin with Figma Developer Console.
47
- - Test TouchDesigner GLSL export in actual TD environment.
48
- 4. **Cross-platform command buffers:**
49
- - Document and validate the render command buffer format for Flutter/WASM integration.
50
- - Ensure command buffer batching and lifecycle hooks align with `RendererContract`.
51
- 5. **Telemetry export hardening:**
52
- - Add validation for telemetry manifests and scene packs in CI.
53
- - Produce golden snapshot tests for core geometries.
54
-
55
- ## Recommended next steps
56
- 1. **Test coverage for v2.0.0 modules:**
57
- - Write Vitest unit tests for SpatialInputSystem (profile loading, input feeding, sensitivity).
58
- - Write tests for creative tooling (preset application, transition interpolation, timeline playback).
59
- - Add E2E tests for OBS mode and framework components.
60
- 2. **NPM publish preparation:**
61
- - Verify all package.json exports resolve correctly.
62
- - Test tree-shaking with the creative/integrations/advanced imports.
63
- - Run `npm pack --dry-run` to verify published file list.
64
- 3. **WebGPU spike (Phase 4):**
65
- - Build a feature-flagged WebGPU backend scaffold in `src/render/backends/`.
66
- - Add a minimal triangle pipeline with uniform updates and buffer management.
67
- 4. **Renderer diagnostics:**
68
- - Expand `RenderResourceRegistry` stats to include peak usage and per-frame deltas.
69
- 5. **Project automation:**
70
- - Provide a scripted `make setup` (or `pnpm setup`) that runs env + project setup steps.
71
-
72
- ## Risks and mitigation
73
- - **GPU resource churn:** ensure registry-based disposal is called during renderer swaps.
74
- - **Numerical drift:** keep normalization utilities and baseline tests running in CI.
75
- - **Cross-platform divergence:** ensure WebGL and WebGPU share material definitions.
76
- - **v2.0.0 module breadth:** 18 new files need test coverage before production use.
77
- - **Framework integration drift:** framework APIs evolve; pin versions in test fixtures.
@@ -1,42 +0,0 @@
1
- # Dev track plan (2026-01-07)
2
-
3
- This plan captures the staged work needed to deliver a production-ready agentic telemetry pipeline and export workflow. It is written as a living track plan so future sessions can append progress and maintain consistent architecture decisions.
4
-
5
- ## North-star goals
6
- 1. Agent-friendly CLI onboarding and help output.
7
- 2. Deterministic telemetry manifest exports with previews and asset hashing.
8
- 3. Clear documentation for automation, QA, and CI workflows.
9
-
10
- ## Architecture anchors
11
- - **Telemetry pipeline**: `tools/telemetry/manifestPipeline.js` is the single source of truth for manifest normalization and hashing.
12
- - **Preview generation**: `js/core/telemetry-director.js` generates previews (renderer-backed or placeholders) and passes them into manifests.
13
- - **Docs hub**: `DOCS/` is the canonical location for workflow documentation (onboarding, telemetry, control references).
14
-
15
- ## Planned track (phased)
16
- ### Phase 1 — Onboarding + documentation hardening
17
- - Publish an agentic CLI onboarding guide with tool requirements, commands, and telemetry workflow steps.
18
- - Update README references so new onboarding docs are discoverable.
19
- - Extend telemetry docs with explicit CLI integration guidance and export flow notes.
20
- - Add a lightweight knowledge-check template that validates geometry/control comprehension without blocking execution.
21
-
22
- ### Phase 2 — Agentic workflow hooks
23
- - Add CLI wrappers for telemetry export flows (pack selection, preview generation, manifest hashing).
24
- - Emit summaries designed for CI cache validation and diffing.
25
- - Provide optional validation hooks for manifest/preview consistency.
26
-
27
- ### Phase 3 — Quality and verification
28
- - Add lint/test targets for telemetry outputs if applicable.
29
- - Document CI steps for telemetry export validation.
30
- - Add golden snapshot routines for preview images when the pipeline stabilizes.
31
-
32
- ## Risks and mitigations
33
- - **Risk**: Hash drift due to unstable object serialization.
34
- **Mitigation**: Keep stable hashing in `manifestPipeline.js` and avoid non-deterministic fields.
35
- - **Risk**: Preview generation inconsistency across runtimes.
36
- **Mitigation**: Maintain browser-safe fallback encoding and ensure renderer contracts are documented.
37
-
38
- ## Deliverables checklist
39
- - [ ] CLI onboarding doc is complete and linked in README.
40
- - [ ] Telemetry docs include export integration steps.
41
- - [ ] Agentic CLI support documented or implemented.
42
- - [ ] CI guidance includes telemetry hashes and preview artifacts.
@@ -1,195 +0,0 @@
1
- # VIB3+ SDK - Session 014 Plan & Status
2
-
3
- **Date:** 2026-01-25
4
- **Branch:** `claude/phase-5-hardening-a4Wzn`
5
- **Session:** 014
6
-
7
- ---
8
-
9
- ## Executive Summary
10
-
11
- This session completed a comprehensive system review and implemented agent onboarding improvements. The VIB3+ SDK is a **general-purpose 4D rotation visualization SDK** for plugins, extensions, wearables, and agentic AI integration.
12
-
13
- ---
14
-
15
- ## System Architecture (Verified)
16
-
17
- ### Core Metrics
18
- | Component | Value |
19
- |-----------|-------|
20
- | **Active Systems** | 3 (Quantum, Faceted, Holographic) |
21
- | **Placeholder Systems** | 1 (Polychora - TBD) |
22
- | **Rotation Planes** | 6 (XY, XZ, YZ + XW, YW, ZW) |
23
- | **Base Geometries** | 8 |
24
- | **Core Warp Types** | 3 (Base, Hypersphere, Hypertetrahedron) |
25
- | **Total Geometries** | 24 (8 base × 3 cores) |
26
- | **Canvas Layers** | 5 per system |
27
- | **MCP Tools** | 14 |
28
- | **Tests Passing** | 693+ |
29
-
30
- ### Geometry Encoding Formula
31
- ```
32
- geometry_index = core_index * 8 + base_index
33
-
34
- Where:
35
- - core_index: 0 (Base), 1 (Hypersphere), 2 (Hypertetrahedron)
36
- - base_index: 0-7 (tetrahedron, hypercube, sphere, torus, klein, fractal, wave, crystal)
37
- ```
38
-
39
- ---
40
-
41
- ## Changes Made This Session
42
-
43
- ### 1. UI: Full 24 Geometry Support
44
- **File:** `sdk/index.html`
45
- - Added Core Type dropdown (Base, Hypersphere, Hypertetrahedron)
46
- - Implemented proper geometry encoding: `coreType * 8 + baseGeometry`
47
- - Updated geometry display to show "Geometry X / 24"
48
- - Fixed geometry buttons to work with core type selector
49
-
50
- ### 2. Documentation: System Inventory
51
- **File:** `DOCS/SYSTEM_INVENTORY.md`
52
- - Complete technical inventory
53
- - Architecture diagram
54
- - All 4 systems documented
55
- - 24 geometry encoding explained
56
- - 6D rotation system documented
57
- - MCP tools reference
58
- - Agent onboarding quiz
59
-
60
- ### 3. MCP: Agent Onboarding Tools
61
- **Files:** `src/agent/mcp/tools.js`, `src/agent/mcp/MCPServer.js`
62
-
63
- New tools added:
64
- - `get_sdk_context` - Returns essential SDK context on first connection
65
- - `verify_knowledge` - Multiple choice quiz to verify understanding
66
-
67
- Quiz format (answers: c, b, c, a, b, b):
68
- ```
69
- Q1: How many rotation planes? a)3 b)4 c)6 d)8
70
- Q2: Geometry formula? a)base*3+core b)core*8+base c)base+core d)core*base
71
- Q3: Canvas layers per system? a)3 b)4 c)5 d)6
72
- Q4: Which are the 3 ACTIVE systems? a)quantum,faceted,holographic b)quantum,faceted,polychora c)all four d)none
73
- Q5: How many base geometry types? a)6 b)8 c)10 d)24
74
- Q6: Core warp types? a)base,sphere,cube b)base,hypersphere,hypertetrahedron c)2D,3D,4D d)none
75
- ```
76
-
77
- ### 4. Polychora Marked as TBD
78
- - Polychora system marked as placeholder/TBD in MCP responses
79
- - Quiz updated to test knowledge that only 3 systems are ACTIVE
80
- - System exists but not production-ready
81
-
82
- ---
83
-
84
- ## Phase Status
85
-
86
- | Phase | Status | Notes |
87
- |-------|--------|-------|
88
- | **Phase 1: Foundation** | ✅ Complete | Math, geometry, parameters |
89
- | **Phase 2: Rendering** | ✅ Mostly Complete | Contracts exist, 4 adapters |
90
- | **Phase 3: Agentic** | ✅ Complete | MCP, CLI, Telemetry |
91
- | **Phase 4: WebGPU** | 🔄 Scaffold | Needs shader pipeline |
92
- | **Phase 5: Hardening** | 🔄 In Progress | 693 tests passing |
93
-
94
- ---
95
-
96
- ## Known Issues
97
-
98
- 1. **Polychora not production-ready** - Keep as TBD placeholder
99
- 2. **WebGPU backend incomplete** - Scaffold exists, needs shader pipeline
100
- 3. **Timing test flaky** - `withTiming` test sometimes fails by <1ms
101
- 4. **Playwright test config** - Browser tests don't run in vitest
102
-
103
- ---
104
-
105
- ## Planned Future Work
106
-
107
- ### Phase 2 Consolidation (Rendering)
108
- - [ ] Audit all 4 systems for RendererContract compliance
109
- - [ ] Extract shared scene graph code
110
- - [ ] Document lifecycle rules in code
111
- - [ ] Add contract compliance tests
112
-
113
- ### Phase 4 (WebGPU)
114
- - [ ] Complete WebGPU shader pipeline
115
- - [ ] Port shaders from WebGL to WGSL
116
- - [ ] Benchmark WebGL vs WebGPU
117
-
118
- ### Phase 5 (Hardening)
119
- - [ ] Fix flaky timing test
120
- - [ ] Separate Playwright tests from vitest
121
- - [ ] Add more integration tests
122
- - [ ] Browser rendering verification
123
-
124
- ### Documentation
125
- - [ ] Consolidate scattered docs
126
- - [ ] Archive outdated docs
127
- - [ ] Create "Start Here" guide for new agents
128
- - [ ] Add code examples to SYSTEM_INVENTORY.md
129
-
130
- ---
131
-
132
- ## File References
133
-
134
- ### Primary Documentation
135
- | File | Purpose |
136
- |------|---------|
137
- | `DOCS/SYSTEM_INVENTORY.md` | Complete system reference |
138
- | `DOCS/CLI_ONBOARDING.md` | Agent CLI setup |
139
- | `DOCS/CONTROL_REFERENCE.md` | UI parameters |
140
- | `24-GEOMETRY-6D-ROTATION-SUMMARY.md` | Geometry encoding |
141
-
142
- ### Core Source Files
143
- | File | Purpose |
144
- |------|---------|
145
- | `src/core/VIB3Engine.js` | Main unified engine |
146
- | `src/core/RendererContracts.js` | Shared interfaces |
147
- | `src/quantum/QuantumEngine.js` | Quantum system |
148
- | `src/faceted/FacetedSystem.js` | Faceted system |
149
- | `src/holograms/RealHolographicSystem.js` | Holographic system |
150
- | `src/core/PolychoraSystem.js` | Polychora (TBD) |
151
- | `src/agent/mcp/MCPServer.js` | MCP server |
152
- | `src/agent/mcp/tools.js` | MCP tool definitions |
153
- | `src/agent/cli/AgentCLI.js` | CLI interface |
154
-
155
- ---
156
-
157
- ## Git Commits This Session
158
-
159
- 1. `feat(ui): Add full 24 geometry support with core type selector`
160
- 2. `docs(sdk): Add comprehensive system inventory and agent onboarding tools`
161
- 3. (pending) `feat(mcp): Add multiple choice quiz and mark Polychora as TBD`
162
-
163
- ---
164
-
165
- ## Testing Commands
166
-
167
- ```bash
168
- # Run all tests
169
- npm test
170
-
171
- # Run specific test file
172
- npm test -- tests/agent/AgentCLI.test.js
173
-
174
- # Run with coverage
175
- npm test -- --coverage
176
-
177
- # Start dev server
178
- npm run dev:web
179
- ```
180
-
181
- ---
182
-
183
- ## Quiz Answers Reference
184
-
185
- For agent onboarding quiz (`verify_knowledge`):
186
- - Q1 (rotation planes): **c** (6)
187
- - Q2 (geometry formula): **b** (core*8+base)
188
- - Q3 (canvas layers): **c** (5)
189
- - Q4 (active systems): **a** (quantum, faceted, holographic)
190
- - Q5 (base geometries): **b** (8)
191
- - Q6 (core types): **b** (base, hypersphere, hypertetrahedron)
192
-
193
- ---
194
-
195
- *Document generated: Session 014, 2026-01-25*
@@ -1,56 +0,0 @@
1
- # Session log (2026-01-07)
2
-
3
- ## 18:40:40
4
- - Logged required tooling and onboarding plan for agentic CLI workflows.
5
- - Created a dated dev track plan to anchor upcoming work.
6
- - Documented telemetry export flow in the onboarding guide.
7
-
8
- ## 23:19:52
9
- - Added onboarding verification prompts to ensure agents can name geometry types and controls.
10
-
11
- ## 23:34:16
12
- - Clarified the onboarding knowledge check to allow continuation while pointing to the correct reference docs.
13
-
14
- ## 23:37:38
15
- - Added a copy/paste knowledge-check template and planned it in the dev track.
16
-
17
- ## 02:07:46
18
- - Captured the unified SDK strategic blueprint and linked it from the README.
19
-
20
- ## 02:10:12
21
- - Expanded the strategic blueprint into detailed actions and created an execution plan checklist.
22
-
23
- ## 02:42:14
24
- - Added 4D rotation matrices, projection helpers, and stability tests; checked off Phase 1 math foundation items.
25
-
26
- ## 02:42:36
27
- - Ran `pnpm test` to validate rotation and projection math helpers.
28
-
29
- ## 02:46:57
30
- - Added renderer and resource manager contracts and checked off the Phase 2 interface definition.
31
-
32
- ## 02:53:28
33
- - Implemented Phase 3 agentic integration: MCP tool definitions, telemetry spans/error schema, and agent CLI JSON/non-interactive export.
34
-
35
- ## 02:53:50
36
- - Added CLI error handling for invalid pack JSON with structured telemetry errors.
37
-
38
- ## 03:09:19
39
- - Completed Phase 4 cross-platform scaffolding: WASM target, Flutter render command buffer, and WebGPU feature flags.
40
-
41
- ## 03:13:25
42
- - Completed Phase 5 deliverables: licensing tiers, export formats with golden snapshot coverage, and XR benchmark docs.
43
-
44
- ## 03:13:48
45
- - Ran `pnpm test` to update export format snapshots and validate test coverage.
46
-
47
- ## 13:19:14
48
- - Added scene graph scaffolding and documented GPU disposal patterns for Phase 2.
49
-
50
- ## 2026-01-23 22:04 (Session 011)
51
- - Fixed rotation stability test precision tolerance (Float32Array drift over 2000 iterations).
52
- - Expanded LICENSING_TIERS.md with implementation details: key format, activation flow, token schema, offline validation, feature gating.
53
- - Expanded EXPORT_FORMATS.md with format specifications, golden snapshot test implementation, and CI integration.
54
- - Expanded XR_BENCHMARKS.md with metrics collection, benchmark runner, regression detection, and performance overlay.
55
- - Added CLI `validate` command for validating scene packs, manifests, and tool responses.
56
- - All 584 tests passing.