@vib3code/sdk 2.0.1 → 2.0.3-canary.91a95f3
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 +36 -0
- package/DOCS/AGENT_HARNESS_ARCHITECTURE.md +243 -0
- package/DOCS/CLI_ONBOARDING.md +1 -1
- package/DOCS/CROSS_SITE_DESIGN_PATTERNS.md +117 -0
- package/DOCS/EPIC_SCROLL_EVENTS.md +773 -0
- package/DOCS/HANDOFF_LANDING_PAGE.md +154 -0
- package/DOCS/HANDOFF_SDK_DEVELOPMENT.md +493 -0
- package/DOCS/MULTIVIZ_CHOREOGRAPHY_PATTERNS.md +937 -0
- package/DOCS/PRODUCT_STRATEGY.md +63 -0
- package/DOCS/README.md +103 -0
- package/DOCS/REFERENCE_SCROLL_ANALYSIS.md +97 -0
- package/DOCS/ROADMAP.md +111 -0
- package/DOCS/SCROLL_TIMELINE_v3.md +269 -0
- package/DOCS/SITE_REFACTOR_PLAN.md +100 -0
- package/DOCS/STATUS.md +24 -0
- package/DOCS/SYSTEM_INVENTORY.md +33 -30
- package/DOCS/VISUAL_ANALYSIS_CLICKERSS.md +85 -0
- package/DOCS/VISUAL_ANALYSIS_FACETAD.md +133 -0
- package/DOCS/VISUAL_ANALYSIS_SIMONE.md +95 -0
- package/DOCS/VISUAL_ANALYSIS_TABLESIDE.md +86 -0
- package/DOCS/{BLUEPRINT_EXECUTION_PLAN_2026-01-07.md → archive/BLUEPRINT_EXECUTION_PLAN_2026-01-07.md} +1 -1
- package/DOCS/{DEV_TRACK_ANALYSIS.md → archive/DEV_TRACK_ANALYSIS.md} +3 -0
- package/DOCS/{SYSTEM_AUDIT_2026-01-30.md → archive/SYSTEM_AUDIT_2026-01-30.md} +3 -0
- package/DOCS/{DEV_TRACK_SESSION_2026-01-31.md → dev-tracks/DEV_TRACK_SESSION_2026-01-31.md} +1 -1
- package/DOCS/dev-tracks/DEV_TRACK_SESSION_2026-02-06.md +231 -0
- package/DOCS/dev-tracks/DEV_TRACK_SESSION_2026-02-13.md +114 -0
- package/DOCS/dev-tracks/README.md +10 -0
- package/README.md +26 -13
- package/cpp/CMakeLists.txt +236 -0
- package/cpp/bindings/embind.cpp +269 -0
- package/cpp/build.sh +129 -0
- package/cpp/geometry/Crystal.cpp +103 -0
- package/cpp/geometry/Fractal.cpp +136 -0
- package/cpp/geometry/GeometryGenerator.cpp +262 -0
- package/cpp/geometry/KleinBottle.cpp +71 -0
- package/cpp/geometry/Sphere.cpp +134 -0
- package/cpp/geometry/Tesseract.cpp +94 -0
- package/cpp/geometry/Tetrahedron.cpp +83 -0
- package/cpp/geometry/Torus.cpp +65 -0
- package/cpp/geometry/WarpFunctions.cpp +238 -0
- package/cpp/geometry/Wave.cpp +85 -0
- package/cpp/include/vib3_ffi.h +238 -0
- package/cpp/math/Mat4x4.cpp +409 -0
- package/cpp/math/Mat4x4.hpp +209 -0
- package/cpp/math/Projection.cpp +142 -0
- package/cpp/math/Projection.hpp +148 -0
- package/cpp/math/Rotor4D.cpp +322 -0
- package/cpp/math/Rotor4D.hpp +204 -0
- package/cpp/math/Vec4.cpp +303 -0
- package/cpp/math/Vec4.hpp +225 -0
- package/cpp/src/vib3_ffi.cpp +607 -0
- package/cpp/tests/Geometry_test.cpp +213 -0
- package/cpp/tests/Mat4x4_test.cpp +494 -0
- package/cpp/tests/Projection_test.cpp +298 -0
- package/cpp/tests/Rotor4D_test.cpp +423 -0
- package/cpp/tests/Vec4_test.cpp +489 -0
- package/package.json +31 -27
- package/src/agent/mcp/MCPServer.js +722 -0
- package/src/agent/mcp/stdio-server.js +264 -0
- package/src/agent/mcp/tools.js +367 -0
- package/src/cli/index.js +0 -0
- package/src/core/CanvasManager.js +97 -204
- package/src/core/ErrorReporter.js +1 -1
- package/src/core/Parameters.js +1 -1
- package/src/core/VIB3Engine.js +38 -1
- package/src/core/VitalitySystem.js +53 -0
- package/src/core/renderers/HolographicRendererAdapter.js +2 -2
- package/src/creative/AestheticMapper.js +628 -0
- package/src/creative/ChoreographyPlayer.js +481 -0
- package/src/export/TradingCardManager.js +3 -4
- package/src/faceted/FacetedSystem.js +237 -388
- package/src/holograms/HolographicVisualizer.js +29 -12
- package/src/holograms/RealHolographicSystem.js +68 -12
- package/src/polychora/PolychoraSystem.js +77 -0
- package/src/quantum/QuantumEngine.js +103 -66
- package/src/quantum/QuantumVisualizer.js +7 -2
- package/src/render/UnifiedRenderBridge.js +3 -0
- package/src/shaders/faceted/faceted.frag.glsl +220 -80
- package/src/shaders/faceted/faceted.frag.wgsl +138 -97
- package/src/shaders/holographic/holographic.frag.glsl +28 -9
- package/src/shaders/holographic/holographic.frag.wgsl +107 -38
- package/src/shaders/quantum/quantum.frag.glsl +1 -0
- package/src/shaders/quantum/quantum.frag.wgsl +1 -1
- package/src/viewer/index.js +1 -1
- package/tools/headless-renderer.js +258 -0
- package/tools/shader-sync-verify.js +8 -4
- package/tools/site-analysis/all-reports.json +32 -0
- package/tools/site-analysis/combined-analysis.md +50 -0
- package/tools/site-analyzer.mjs +779 -0
- package/tools/visual-catalog/capture.js +276 -0
- package/tools/visual-catalog/composite.js +138 -0
- /package/DOCS/{DEV_TRACK_PLAN_2026-01-07.md → archive/DEV_TRACK_PLAN_2026-01-07.md} +0 -0
- /package/DOCS/{SESSION_014_PLAN.md → archive/SESSION_014_PLAN.md} +0 -0
- /package/DOCS/{SESSION_LOG_2026-01-07.md → archive/SESSION_LOG_2026-01-07.md} +0 -0
- /package/DOCS/{STRATEGIC_BLUEPRINT_2026-01-07.md → archive/STRATEGIC_BLUEPRINT_2026-01-07.md} +0 -0
- /package/src/viewer/{ReactivityManager.js → ViewerInputHandler.js} +0 -0
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* VIB3+ MCP Server — JSON-RPC 2.0 over stdio
|
|
4
|
+
*
|
|
5
|
+
* Implements the Model Context Protocol so any MCP client (Claude Desktop,
|
|
6
|
+
* Cursor, custom agents) can control VIB3+ programmatically.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* node src/agent/mcp/stdio-server.js
|
|
10
|
+
*
|
|
11
|
+
* Or via package.json bin:
|
|
12
|
+
* vib3-mcp
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { createInterface } from 'readline';
|
|
16
|
+
import { MCPServer } from './MCPServer.js';
|
|
17
|
+
import { getToolList } from './tools.js';
|
|
18
|
+
|
|
19
|
+
const SERVER_INFO = {
|
|
20
|
+
name: 'vib3-mcp',
|
|
21
|
+
version: '2.0.3',
|
|
22
|
+
description: 'VIB3+ 4D Visualization MCP Server — 3 systems, 24 geometries, 6D rotation'
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
// ── JSON-RPC helpers ──
|
|
26
|
+
|
|
27
|
+
function jsonrpc(id, result) {
|
|
28
|
+
return JSON.stringify({ jsonrpc: '2.0', id, result });
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function jsonrpcError(id, code, message, data) {
|
|
32
|
+
const err = { jsonrpc: '2.0', id, error: { code, message } };
|
|
33
|
+
if (data !== undefined) err.error.data = data;
|
|
34
|
+
return JSON.stringify(err);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function jsonrpcNotification(method, params) {
|
|
38
|
+
return JSON.stringify({ jsonrpc: '2.0', method, params });
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// ── MCP Protocol implementation ──
|
|
42
|
+
|
|
43
|
+
class VIB3StdioMCP {
|
|
44
|
+
constructor() {
|
|
45
|
+
this.server = new MCPServer();
|
|
46
|
+
this.initialized = false;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
async handleMessage(raw) {
|
|
50
|
+
let msg;
|
|
51
|
+
try {
|
|
52
|
+
msg = JSON.parse(raw);
|
|
53
|
+
} catch {
|
|
54
|
+
return jsonrpcError(null, -32700, 'Parse error');
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (msg.jsonrpc !== '2.0') {
|
|
58
|
+
return jsonrpcError(msg.id ?? null, -32600, 'Invalid Request: missing jsonrpc 2.0');
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const { id, method, params } = msg;
|
|
62
|
+
|
|
63
|
+
switch (method) {
|
|
64
|
+
case 'initialize':
|
|
65
|
+
return this.handleInitialize(id, params);
|
|
66
|
+
case 'initialized':
|
|
67
|
+
return null; // Notification, no response
|
|
68
|
+
case 'tools/list':
|
|
69
|
+
return this.handleToolsList(id);
|
|
70
|
+
case 'tools/call':
|
|
71
|
+
return await this.handleToolsCall(id, params);
|
|
72
|
+
case 'resources/list':
|
|
73
|
+
return this.handleResourcesList(id);
|
|
74
|
+
case 'resources/read':
|
|
75
|
+
return await this.handleResourcesRead(id, params);
|
|
76
|
+
case 'ping':
|
|
77
|
+
return jsonrpc(id, {});
|
|
78
|
+
default:
|
|
79
|
+
return jsonrpcError(id, -32601, `Method not found: ${method}`);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
handleInitialize(id, params) {
|
|
84
|
+
this.initialized = true;
|
|
85
|
+
|
|
86
|
+
return jsonrpc(id, {
|
|
87
|
+
protocolVersion: '2024-11-05',
|
|
88
|
+
capabilities: {
|
|
89
|
+
tools: {},
|
|
90
|
+
resources: { subscribe: false, listChanged: false }
|
|
91
|
+
},
|
|
92
|
+
serverInfo: SERVER_INFO
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
handleToolsList(id) {
|
|
97
|
+
const tools = getToolList().map(t => ({
|
|
98
|
+
name: t.name,
|
|
99
|
+
description: t.description,
|
|
100
|
+
inputSchema: t.inputSchema
|
|
101
|
+
}));
|
|
102
|
+
|
|
103
|
+
return jsonrpc(id, { tools });
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
async handleToolsCall(id, params) {
|
|
107
|
+
if (!params?.name) {
|
|
108
|
+
return jsonrpcError(id, -32602, 'Invalid params: missing tool name');
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const { name, arguments: args = {} } = params;
|
|
112
|
+
|
|
113
|
+
try {
|
|
114
|
+
const result = await this.server.handleToolCall(name, args);
|
|
115
|
+
|
|
116
|
+
return jsonrpc(id, {
|
|
117
|
+
content: [
|
|
118
|
+
{
|
|
119
|
+
type: 'text',
|
|
120
|
+
text: JSON.stringify(result, null, 2)
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
isError: !result.success
|
|
124
|
+
});
|
|
125
|
+
} catch (error) {
|
|
126
|
+
return jsonrpc(id, {
|
|
127
|
+
content: [
|
|
128
|
+
{
|
|
129
|
+
type: 'text',
|
|
130
|
+
text: JSON.stringify({
|
|
131
|
+
success: false,
|
|
132
|
+
error: error.message
|
|
133
|
+
})
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
isError: true
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
handleResourcesList(id) {
|
|
142
|
+
return jsonrpc(id, {
|
|
143
|
+
resources: [
|
|
144
|
+
{
|
|
145
|
+
uri: 'vib3://docs/claude-md',
|
|
146
|
+
name: 'CLAUDE.md',
|
|
147
|
+
description: 'Full VIB3+ SDK technical reference for AI agents',
|
|
148
|
+
mimeType: 'text/markdown'
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
uri: 'vib3://docs/geometry-summary',
|
|
152
|
+
name: '24 Geometry + 6D Rotation Summary',
|
|
153
|
+
description: 'Complete geometry encoding and rotation plane reference',
|
|
154
|
+
mimeType: 'text/markdown'
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
uri: 'vib3://docs/control-reference',
|
|
158
|
+
name: 'Control Reference',
|
|
159
|
+
description: 'Parameter ranges, keyboard shortcuts, API reference',
|
|
160
|
+
mimeType: 'text/markdown'
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
uri: 'vib3://state/current',
|
|
164
|
+
name: 'Current Engine State',
|
|
165
|
+
description: 'Live engine state (system, geometry, parameters, rotation)',
|
|
166
|
+
mimeType: 'application/json'
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
async handleResourcesRead(id, params) {
|
|
173
|
+
if (!params?.uri) {
|
|
174
|
+
return jsonrpcError(id, -32602, 'Invalid params: missing uri');
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const { uri } = params;
|
|
178
|
+
|
|
179
|
+
try {
|
|
180
|
+
let content;
|
|
181
|
+
let mimeType = 'text/markdown';
|
|
182
|
+
|
|
183
|
+
switch (uri) {
|
|
184
|
+
case 'vib3://docs/claude-md':
|
|
185
|
+
content = await this._readFile('CLAUDE.md');
|
|
186
|
+
break;
|
|
187
|
+
case 'vib3://docs/geometry-summary':
|
|
188
|
+
content = await this._readFile('24-GEOMETRY-6D-ROTATION-SUMMARY.md');
|
|
189
|
+
break;
|
|
190
|
+
case 'vib3://docs/control-reference':
|
|
191
|
+
content = await this._readFile('DOCS/CONTROL_REFERENCE.md');
|
|
192
|
+
break;
|
|
193
|
+
case 'vib3://state/current':
|
|
194
|
+
content = JSON.stringify(this.server.getState(), null, 2);
|
|
195
|
+
mimeType = 'application/json';
|
|
196
|
+
break;
|
|
197
|
+
default:
|
|
198
|
+
return jsonrpcError(id, -32602, `Unknown resource: ${uri}`);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return jsonrpc(id, {
|
|
202
|
+
contents: [{ uri, mimeType, text: content }]
|
|
203
|
+
});
|
|
204
|
+
} catch (error) {
|
|
205
|
+
return jsonrpcError(id, -32603, `Resource read failed: ${error.message}`);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
async _readFile(relativePath) {
|
|
210
|
+
const { readFile } = await import('fs/promises');
|
|
211
|
+
const { resolve, dirname } = await import('path');
|
|
212
|
+
const { fileURLToPath } = await import('url');
|
|
213
|
+
|
|
214
|
+
// Resolve relative to project root (3 levels up from src/agent/mcp/)
|
|
215
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
216
|
+
const projectRoot = resolve(__dirname, '..', '..', '..');
|
|
217
|
+
const filePath = resolve(projectRoot, relativePath);
|
|
218
|
+
|
|
219
|
+
return readFile(filePath, 'utf-8');
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// ── Main: stdio transport ──
|
|
224
|
+
|
|
225
|
+
async function main() {
|
|
226
|
+
const mcp = new VIB3StdioMCP();
|
|
227
|
+
|
|
228
|
+
const rl = createInterface({
|
|
229
|
+
input: process.stdin,
|
|
230
|
+
terminal: false
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
// Log to stderr so stdout stays clean for JSON-RPC
|
|
234
|
+
const log = (msg) => process.stderr.write(`[vib3-mcp] ${msg}\n`);
|
|
235
|
+
|
|
236
|
+
log(`VIB3+ MCP Server v${SERVER_INFO.version} starting on stdio`);
|
|
237
|
+
|
|
238
|
+
rl.on('line', async (line) => {
|
|
239
|
+
const trimmed = line.trim();
|
|
240
|
+
if (!trimmed) return;
|
|
241
|
+
|
|
242
|
+
try {
|
|
243
|
+
const response = await mcp.handleMessage(trimmed);
|
|
244
|
+
if (response !== null) {
|
|
245
|
+
process.stdout.write(response + '\n');
|
|
246
|
+
}
|
|
247
|
+
} catch (error) {
|
|
248
|
+
log(`Error: ${error.message}`);
|
|
249
|
+
process.stdout.write(
|
|
250
|
+
jsonrpcError(null, -32603, `Internal error: ${error.message}`) + '\n'
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
rl.on('close', () => {
|
|
256
|
+
log('stdin closed, shutting down');
|
|
257
|
+
process.exit(0);
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
main().catch((err) => {
|
|
262
|
+
process.stderr.write(`[vib3-mcp] Fatal: ${err.message}\n`);
|
|
263
|
+
process.exit(1);
|
|
264
|
+
});
|
package/src/agent/mcp/tools.js
CHANGED
|
@@ -395,6 +395,373 @@ export const toolDefinitions = {
|
|
|
395
395
|
type: 'object',
|
|
396
396
|
properties: {}
|
|
397
397
|
}
|
|
398
|
+
},
|
|
399
|
+
|
|
400
|
+
// ===== AGENT-POWER TOOLS (Phase 7 — Agent Harness) =====
|
|
401
|
+
|
|
402
|
+
describe_visual_state: {
|
|
403
|
+
name: 'describe_visual_state',
|
|
404
|
+
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.',
|
|
405
|
+
inputSchema: {
|
|
406
|
+
type: 'object',
|
|
407
|
+
properties: {}
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
|
|
411
|
+
batch_set_parameters: {
|
|
412
|
+
name: 'batch_set_parameters',
|
|
413
|
+
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.',
|
|
414
|
+
inputSchema: {
|
|
415
|
+
type: 'object',
|
|
416
|
+
properties: {
|
|
417
|
+
system: {
|
|
418
|
+
type: 'string',
|
|
419
|
+
enum: ['quantum', 'faceted', 'holographic'],
|
|
420
|
+
description: 'Optional: switch system first'
|
|
421
|
+
},
|
|
422
|
+
geometry: {
|
|
423
|
+
type: 'integer',
|
|
424
|
+
minimum: 0,
|
|
425
|
+
maximum: 23,
|
|
426
|
+
description: 'Geometry index'
|
|
427
|
+
},
|
|
428
|
+
rotation: {
|
|
429
|
+
type: 'object',
|
|
430
|
+
description: '6D rotation angles (all optional)',
|
|
431
|
+
properties: {
|
|
432
|
+
XY: { type: 'number', minimum: -6.28, maximum: 6.28 },
|
|
433
|
+
XZ: { type: 'number', minimum: -6.28, maximum: 6.28 },
|
|
434
|
+
YZ: { type: 'number', minimum: -6.28, maximum: 6.28 },
|
|
435
|
+
XW: { type: 'number', minimum: -6.28, maximum: 6.28 },
|
|
436
|
+
YW: { type: 'number', minimum: -6.28, maximum: 6.28 },
|
|
437
|
+
ZW: { type: 'number', minimum: -6.28, maximum: 6.28 }
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
visual: {
|
|
441
|
+
type: 'object',
|
|
442
|
+
description: 'Visual parameters (all optional)',
|
|
443
|
+
properties: {
|
|
444
|
+
hue: { type: 'integer', minimum: 0, maximum: 360 },
|
|
445
|
+
saturation: { type: 'number', minimum: 0, maximum: 1 },
|
|
446
|
+
intensity: { type: 'number', minimum: 0, maximum: 1 },
|
|
447
|
+
speed: { type: 'number', minimum: 0.1, maximum: 3 },
|
|
448
|
+
chaos: { type: 'number', minimum: 0, maximum: 1 },
|
|
449
|
+
morphFactor: { type: 'number', minimum: 0, maximum: 2 },
|
|
450
|
+
gridDensity: { type: 'number', minimum: 4, maximum: 100 },
|
|
451
|
+
dimension: { type: 'number', minimum: 3.0, maximum: 4.5 }
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
preset: {
|
|
455
|
+
type: 'string',
|
|
456
|
+
enum: ['ambient', 'reactive', 'immersive', 'energetic', 'calm', 'cinematic'],
|
|
457
|
+
description: 'Optional: apply behavior preset after setting params'
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
|
|
463
|
+
create_timeline: {
|
|
464
|
+
name: 'create_timeline',
|
|
465
|
+
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.',
|
|
466
|
+
inputSchema: {
|
|
467
|
+
type: 'object',
|
|
468
|
+
properties: {
|
|
469
|
+
name: { type: 'string', description: 'Timeline name' },
|
|
470
|
+
duration_ms: { type: 'integer', minimum: 100, maximum: 600000, description: 'Total duration in milliseconds' },
|
|
471
|
+
bpm: { type: 'number', minimum: 20, maximum: 300, description: 'Optional BPM for beat-sync quantization' },
|
|
472
|
+
loop_mode: {
|
|
473
|
+
type: 'string',
|
|
474
|
+
enum: ['loop', 'bounce', 'once'],
|
|
475
|
+
default: 'once',
|
|
476
|
+
description: 'Playback loop mode'
|
|
477
|
+
},
|
|
478
|
+
tracks: {
|
|
479
|
+
type: 'object',
|
|
480
|
+
description: 'Parameter tracks. Each key is a parameter name, value is array of keyframes [{time, value, easing}]',
|
|
481
|
+
additionalProperties: {
|
|
482
|
+
type: 'array',
|
|
483
|
+
items: {
|
|
484
|
+
type: 'object',
|
|
485
|
+
properties: {
|
|
486
|
+
time: { type: 'number', description: 'Time in ms from start' },
|
|
487
|
+
value: { type: 'number', description: 'Parameter value at this keyframe' },
|
|
488
|
+
easing: {
|
|
489
|
+
type: 'string',
|
|
490
|
+
enum: ['linear', 'easeIn', 'easeOut', 'easeInOut', 'quadIn', 'quadOut', 'cubicIn', 'cubicOut', 'elastic', 'bounce', 'spring', 'overshoot', 'sine', 'exponential'],
|
|
491
|
+
default: 'easeInOut',
|
|
492
|
+
description: 'Easing function for interpolation TO this keyframe'
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
required: ['time', 'value']
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
required: ['duration_ms', 'tracks']
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
|
|
504
|
+
play_transition: {
|
|
505
|
+
name: 'play_transition',
|
|
506
|
+
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.',
|
|
507
|
+
inputSchema: {
|
|
508
|
+
type: 'object',
|
|
509
|
+
properties: {
|
|
510
|
+
sequence: {
|
|
511
|
+
type: 'array',
|
|
512
|
+
description: 'Array of transition steps. Each step smoothly animates to target params.',
|
|
513
|
+
items: {
|
|
514
|
+
type: 'object',
|
|
515
|
+
properties: {
|
|
516
|
+
params: {
|
|
517
|
+
type: 'object',
|
|
518
|
+
description: 'Target parameter values (any VIB3+ parameter)',
|
|
519
|
+
additionalProperties: { type: 'number' }
|
|
520
|
+
},
|
|
521
|
+
duration: { type: 'integer', minimum: 50, maximum: 30000, default: 1000, description: 'Step duration in ms' },
|
|
522
|
+
easing: {
|
|
523
|
+
type: 'string',
|
|
524
|
+
enum: ['linear', 'easeIn', 'easeOut', 'easeInOut', 'quadIn', 'quadOut', 'cubicIn', 'cubicOut', 'elastic', 'bounce', 'spring', 'overshoot', 'sine', 'exponential'],
|
|
525
|
+
default: 'easeInOut'
|
|
526
|
+
},
|
|
527
|
+
delay: { type: 'integer', minimum: 0, default: 0, description: 'Delay before this step starts (ms)' }
|
|
528
|
+
},
|
|
529
|
+
required: ['params']
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
required: ['sequence']
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
|
|
537
|
+
apply_color_preset: {
|
|
538
|
+
name: 'apply_color_preset',
|
|
539
|
+
description: 'Applies one of 22 themed color presets that set hue, saturation, intensity, and optionally post-processing to create a cohesive visual theme.',
|
|
540
|
+
inputSchema: {
|
|
541
|
+
type: 'object',
|
|
542
|
+
properties: {
|
|
543
|
+
preset: {
|
|
544
|
+
type: 'string',
|
|
545
|
+
enum: ['Ocean', 'Lava', 'Neon', 'Monochrome', 'Sunset', 'Aurora', 'Cyberpunk', 'Forest', 'Desert', 'Galaxy', 'Ice', 'Fire', 'Toxic', 'Royal', 'Pastel', 'Retro', 'Midnight', 'Tropical', 'Ethereal', 'Volcanic', 'Holographic', 'Vaporwave'],
|
|
546
|
+
description: 'Color preset name'
|
|
547
|
+
}
|
|
548
|
+
},
|
|
549
|
+
required: ['preset']
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
|
|
553
|
+
set_post_processing: {
|
|
554
|
+
name: 'set_post_processing',
|
|
555
|
+
description: 'Configures post-processing effects pipeline. Supports 14 composable effects and 7 preset chains. Effects are applied in order.',
|
|
556
|
+
inputSchema: {
|
|
557
|
+
type: 'object',
|
|
558
|
+
properties: {
|
|
559
|
+
effects: {
|
|
560
|
+
type: 'array',
|
|
561
|
+
description: 'Ordered list of effects to apply',
|
|
562
|
+
items: {
|
|
563
|
+
type: 'object',
|
|
564
|
+
properties: {
|
|
565
|
+
name: {
|
|
566
|
+
type: 'string',
|
|
567
|
+
enum: ['bloom', 'chromaticAberration', 'vignette', 'filmGrain', 'scanlines', 'pixelate', 'blur', 'sharpen', 'colorGrade', 'noise', 'distort', 'glitch', 'rgbShift', 'feedback'],
|
|
568
|
+
description: 'Effect name'
|
|
569
|
+
},
|
|
570
|
+
intensity: { type: 'number', minimum: 0, maximum: 1, default: 0.5, description: 'Effect strength' },
|
|
571
|
+
enabled: { type: 'boolean', default: true }
|
|
572
|
+
},
|
|
573
|
+
required: ['name']
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
chain_preset: {
|
|
577
|
+
type: 'string',
|
|
578
|
+
description: 'Alternative: apply a named preset chain instead of individual effects'
|
|
579
|
+
},
|
|
580
|
+
clear_first: {
|
|
581
|
+
type: 'boolean',
|
|
582
|
+
default: true,
|
|
583
|
+
description: 'Clear existing effects before applying new ones'
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
},
|
|
588
|
+
|
|
589
|
+
create_choreography: {
|
|
590
|
+
name: 'create_choreography',
|
|
591
|
+
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.',
|
|
592
|
+
inputSchema: {
|
|
593
|
+
type: 'object',
|
|
594
|
+
properties: {
|
|
595
|
+
name: { type: 'string', description: 'Choreography name' },
|
|
596
|
+
duration_ms: { type: 'integer', minimum: 1000, description: 'Total choreography duration' },
|
|
597
|
+
bpm: { type: 'number', minimum: 20, maximum: 300, description: 'Optional BPM for beat sync' },
|
|
598
|
+
scenes: {
|
|
599
|
+
type: 'array',
|
|
600
|
+
description: 'Ordered scene definitions. Each scene has a time range, system/geometry, and parameter timeline.',
|
|
601
|
+
items: {
|
|
602
|
+
type: 'object',
|
|
603
|
+
properties: {
|
|
604
|
+
time_start: { type: 'integer', minimum: 0, description: 'Scene start time (ms)' },
|
|
605
|
+
time_end: { type: 'integer', description: 'Scene end time (ms)' },
|
|
606
|
+
system: { type: 'string', enum: ['quantum', 'faceted', 'holographic'] },
|
|
607
|
+
geometry: { type: 'integer', minimum: 0, maximum: 23 },
|
|
608
|
+
transition_in: {
|
|
609
|
+
type: 'object',
|
|
610
|
+
description: 'How this scene enters (crossfade, cut, etc.)',
|
|
611
|
+
properties: {
|
|
612
|
+
type: { type: 'string', enum: ['cut', 'crossfade', 'wipe', 'dissolve', 'zoom'] },
|
|
613
|
+
duration: { type: 'integer', minimum: 0 }
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
tracks: {
|
|
617
|
+
type: 'object',
|
|
618
|
+
description: 'Parameter timeline tracks for this scene (same format as create_timeline)',
|
|
619
|
+
additionalProperties: {
|
|
620
|
+
type: 'array',
|
|
621
|
+
items: {
|
|
622
|
+
type: 'object',
|
|
623
|
+
properties: {
|
|
624
|
+
time: { type: 'number' },
|
|
625
|
+
value: { type: 'number' },
|
|
626
|
+
easing: { type: 'string' }
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
},
|
|
631
|
+
color_preset: { type: 'string', description: 'Color preset for this scene' },
|
|
632
|
+
post_processing: {
|
|
633
|
+
type: 'array',
|
|
634
|
+
items: { type: 'string' },
|
|
635
|
+
description: 'Post-processing effects active during this scene'
|
|
636
|
+
},
|
|
637
|
+
audio: {
|
|
638
|
+
type: 'object',
|
|
639
|
+
description: 'Audio reactivity config for this scene'
|
|
640
|
+
}
|
|
641
|
+
},
|
|
642
|
+
required: ['time_start', 'time_end', 'system']
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
},
|
|
646
|
+
required: ['name', 'duration_ms', 'scenes']
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
|
|
650
|
+
// ===== VISUAL FEEDBACK TOOLS (Phase 7.1 — Agent Harness) =====
|
|
651
|
+
|
|
652
|
+
capture_screenshot: {
|
|
653
|
+
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.',
|
|
655
|
+
inputSchema: {
|
|
656
|
+
type: 'object',
|
|
657
|
+
properties: {
|
|
658
|
+
width: { type: 'integer', minimum: 64, maximum: 2048, default: 512, description: 'Output image width' },
|
|
659
|
+
height: { type: 'integer', minimum: 64, maximum: 2048, default: 512, description: 'Output image height' },
|
|
660
|
+
format: {
|
|
661
|
+
type: 'string',
|
|
662
|
+
enum: ['png', 'jpeg', 'webp'],
|
|
663
|
+
default: 'png',
|
|
664
|
+
description: 'Image format'
|
|
665
|
+
},
|
|
666
|
+
quality: { type: 'number', minimum: 0.1, maximum: 1.0, default: 0.92, description: 'JPEG/WebP quality' }
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
},
|
|
670
|
+
|
|
671
|
+
design_from_description: {
|
|
672
|
+
name: 'design_from_description',
|
|
673
|
+
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.',
|
|
674
|
+
inputSchema: {
|
|
675
|
+
type: 'object',
|
|
676
|
+
properties: {
|
|
677
|
+
description: {
|
|
678
|
+
type: 'string',
|
|
679
|
+
description: 'Space-separated aesthetic descriptors. Examples: "serene ocean deep minimal", "energetic neon geometric", "mysterious galaxy intricate hypnotic"'
|
|
680
|
+
},
|
|
681
|
+
apply: {
|
|
682
|
+
type: 'boolean',
|
|
683
|
+
default: false,
|
|
684
|
+
description: 'If true, immediately apply the resolved parameters to the engine'
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
required: ['description']
|
|
688
|
+
}
|
|
689
|
+
},
|
|
690
|
+
|
|
691
|
+
get_aesthetic_vocabulary: {
|
|
692
|
+
name: 'get_aesthetic_vocabulary',
|
|
693
|
+
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.',
|
|
694
|
+
inputSchema: {
|
|
695
|
+
type: 'object',
|
|
696
|
+
properties: {}
|
|
697
|
+
}
|
|
698
|
+
},
|
|
699
|
+
|
|
700
|
+
play_choreography: {
|
|
701
|
+
name: 'play_choreography',
|
|
702
|
+
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.',
|
|
703
|
+
inputSchema: {
|
|
704
|
+
type: 'object',
|
|
705
|
+
properties: {
|
|
706
|
+
choreography: {
|
|
707
|
+
type: 'object',
|
|
708
|
+
description: 'Full choreography spec (from create_choreography output). Provide this OR choreography_id.'
|
|
709
|
+
},
|
|
710
|
+
choreography_id: {
|
|
711
|
+
type: 'string',
|
|
712
|
+
description: 'ID of a previously created choreography (from create_choreography)'
|
|
713
|
+
},
|
|
714
|
+
action: {
|
|
715
|
+
type: 'string',
|
|
716
|
+
enum: ['play', 'pause', 'stop', 'seek'],
|
|
717
|
+
default: 'play',
|
|
718
|
+
description: 'Playback action'
|
|
719
|
+
},
|
|
720
|
+
seek_percent: {
|
|
721
|
+
type: 'number',
|
|
722
|
+
minimum: 0,
|
|
723
|
+
maximum: 1,
|
|
724
|
+
description: 'For seek action: position as 0-1 percentage'
|
|
725
|
+
},
|
|
726
|
+
loop: {
|
|
727
|
+
type: 'boolean',
|
|
728
|
+
default: false,
|
|
729
|
+
description: 'Loop the choreography'
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
|
|
735
|
+
control_timeline: {
|
|
736
|
+
name: 'control_timeline',
|
|
737
|
+
description: 'Controls playback of a previously created timeline (from create_timeline). Actions: play, pause, stop, seek, set_speed.',
|
|
738
|
+
inputSchema: {
|
|
739
|
+
type: 'object',
|
|
740
|
+
properties: {
|
|
741
|
+
timeline_id: {
|
|
742
|
+
type: 'string',
|
|
743
|
+
description: 'ID of the timeline to control'
|
|
744
|
+
},
|
|
745
|
+
action: {
|
|
746
|
+
type: 'string',
|
|
747
|
+
enum: ['play', 'pause', 'stop', 'seek', 'set_speed'],
|
|
748
|
+
description: 'Playback control action'
|
|
749
|
+
},
|
|
750
|
+
seek_percent: {
|
|
751
|
+
type: 'number',
|
|
752
|
+
minimum: 0,
|
|
753
|
+
maximum: 1,
|
|
754
|
+
description: 'For seek: position as 0-1 percentage'
|
|
755
|
+
},
|
|
756
|
+
speed: {
|
|
757
|
+
type: 'number',
|
|
758
|
+
minimum: 0.1,
|
|
759
|
+
maximum: 10,
|
|
760
|
+
description: 'For set_speed: playback speed multiplier'
|
|
761
|
+
}
|
|
762
|
+
},
|
|
763
|
+
required: ['timeline_id', 'action']
|
|
764
|
+
}
|
|
398
765
|
}
|
|
399
766
|
};
|
|
400
767
|
|
package/src/cli/index.js
CHANGED
|
File without changes
|