Skip to content

armgit / kiln

Public Imported from GitHub
0

Build and revise procedural 3D assets with your coding agent. Local MCP server, CLI and TypeScript engine with rendered review, editable source and GLB export.

1.0 KB
Raw Blame
import { expect, test } from 'bun:test';
import { discoveryIntents, discoveryTokens } from './intents';
import { listHelperSpecs } from './helper-specs';

test('tokenization handles identifiers and ordinary inflections without losing axes or negation', () => {
  expect(discoveryTokens('Please arrayRadial the supports, pipes and windows.')).toEqual([
    'array',
    'radial',
    'support',
    'pipe',
    'window',
  ]);
  expect(discoveryTokens('not X Y Z 3 mm')).toEqual(['not', 'x', 'y', 'z', '3', 'mm']);
  expect(discoveryTokens('WHEEL')).toEqual(['wheel']);
  expect(discoveryTokens('MeshGeo UVProject')).toEqual(['mesh', 'geo', 'uv', 'project']);
});

test('all curated intent metadata belongs to existing current helpers', () => {
  const names = new Set(listHelperSpecs().map((entry) => entry.name));
  for (const [name, intents] of Object.entries(discoveryIntents)) {
    expect(names.has(name)).toBe(true);
    expect(intents.length).toBeGreaterThan(0);
  }
  expect(discoveryIntents.cloneGeometry).toBeUndefined();
});