@vib3code/sdk 2.0.3-canary.0e9a1ac → 2.0.3-canary.45332e3

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.
@@ -222,51 +222,64 @@ export const toolDefinitions = {
222
222
  // Onboarding Tools
223
223
  get_sdk_context: {
224
224
  name: 'get_sdk_context',
225
- description: 'Returns essential SDK context for agent onboarding. Call this first to understand the system.',
225
+ description: 'Returns a compact capability manifest: what systems exist, what tools are available, what parameter ranges are valid, and what the current engine state is. Designed for injection into agent context call once at session start, not repeatedly.',
226
226
  inputSchema: {
227
227
  type: 'object',
228
- properties: {}
228
+ properties: {
229
+ include_state: {
230
+ type: 'boolean',
231
+ default: true,
232
+ description: 'Include current engine state in response'
233
+ },
234
+ include_tools: {
235
+ type: 'boolean',
236
+ default: false,
237
+ description: 'Include tool summary list (names + one-line descriptions)'
238
+ }
239
+ }
229
240
  }
230
241
  },
231
242
 
232
- verify_knowledge: {
233
- name: 'verify_knowledge',
234
- description: 'Verifies agent has absorbed SDK context. Multiple choice quiz - submit letter answers (a/b/c/d).',
243
+ inspect_layers: {
244
+ name: 'inspect_layers',
245
+ description: 'Returns the current state of all holographic canvas layers with per-layer metadata: role, opacity, blend mode, reactivity multiplier, role-specific parameters, and enabled state. Only meaningful when holographic system is active.',
235
246
  inputSchema: {
236
247
  type: 'object',
237
248
  properties: {
238
- q1_rotation_planes: {
239
- type: 'string',
240
- enum: ['a', 'b', 'c', 'd'],
241
- description: 'Q1: How many rotation planes? a)3 b)4 c)6 d)8'
242
- },
243
- q2_geometry_formula: {
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
+ layer: {
249
250
  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: {
@@ -160,10 +160,16 @@ const FRAGMENT_SHADER_GLSL = `
160
160
  int geomType = int(clamp(floor(baseGeomFloat + 0.5), 0.0, totalBase - 1.0));
161
161
 
162
162
  if (geomType == 0) {
163
- // Tetrahedron lattice
164
- vec4 pos = fract(p * u_gridDensity * 0.08);
165
- vec4 dist = min(pos, 1.0 - pos);
166
- return min(min(dist.x, dist.y), min(dist.z, dist.w)) * u_morphFactor;
163
+ // Tetrahedron lattice — tetrahedral symmetry planes
164
+ float d = u_gridDensity * 0.08;
165
+ vec3 c1 = normalize(vec3(1.0, 1.0, 1.0));
166
+ vec3 c2 = normalize(vec3(-1.0, -1.0, 1.0));
167
+ vec3 c3 = normalize(vec3(-1.0, 1.0, -1.0));
168
+ vec3 c4 = normalize(vec3(1.0, -1.0, -1.0));
169
+ vec3 q = fract(p.xyz * d + 0.5) - 0.5;
170
+ float minPlane = min(min(abs(dot(q, c1)), abs(dot(q, c2))),
171
+ min(abs(dot(q, c3)), abs(dot(q, c4))));
172
+ return (1.0 - smoothstep(0.0, 0.05, minPlane)) * u_morphFactor;
167
173
  }
168
174
  else if (geomType == 1) {
169
175
  // Hypercube lattice
@@ -429,8 +435,15 @@ fn geometryFunction_w(p: vec4<f32>) -> f32 {
429
435
  let gt = i32(clamp(floor(baseFloat + 0.5), 0.0, 7.0));
430
436
  let d = u.gridDensity * 0.08;
431
437
  if (gt == 0) {
432
- let pos = fract(p * d); let dist = min(pos, 1.0 - pos);
433
- return min(min(dist.x, dist.y), min(dist.z, dist.w)) * u.morphFactor;
438
+ // Tetrahedron tetrahedral symmetry planes
439
+ let c1 = normalize(vec3<f32>(1.0, 1.0, 1.0));
440
+ let c2 = normalize(vec3<f32>(-1.0, -1.0, 1.0));
441
+ let c3 = normalize(vec3<f32>(-1.0, 1.0, -1.0));
442
+ let c4 = normalize(vec3<f32>(1.0, -1.0, -1.0));
443
+ let q = fract(p.xyz * d + 0.5) - 0.5;
444
+ let minPlane = min(min(abs(dot(q, c1)), abs(dot(q, c2))),
445
+ min(abs(dot(q, c3)), abs(dot(q, c4))));
446
+ return (1.0 - smoothstep(0.0, 0.05, minPlane)) * u.morphFactor;
434
447
  } else if (gt == 1) {
435
448
  let pos = fract(p * d); let dist = min(pos, 1.0 - pos);
436
449
  return min(min(dist.x, dist.y), min(dist.z, dist.w)) * u.morphFactor;