import { commonSchemas } from '../../catalog/tool-definition-utils.js'; import type { ToolDefinition } from '../shared/tool-definition.js'; import { LIGHTING_ACTIONS, ENVIRONMENT_ACTIONS, RENDER_ACTIONS, SPLINE_ACTIONS } from '../shared/action-sets.js'; export const buildEnvironmentToolDefinition: ToolDefinition = { name: 'build_environment', category: 'world', description: 'Build environments: landscapes, foliage, procedural terrain/biomes, lighting setups, spline roads/rivers/fences, and world decoration.', inputSchema: { type: 'object', properties: { action: { type: 'string', enum: [ 'create_landscape', 'sculpt', 'sculpt_landscape', 'add_foliage', 'paint_foliage', 'create_procedural_terrain', 'create_procedural_foliage', 'add_foliage_instances', 'get_foliage_instances', 'remove_foliage', 'paint_landscape', 'paint_landscape_layer', 'modify_heightmap', 'set_landscape_material', 'create_landscape_grass_type', 'generate_lods', 'bake_lightmap', 'export_snapshot', 'import_snapshot', 'delete', 'create_sky_sphere', 'set_time_of_day', 'create_fog_volume' , ...ENVIRONMENT_ACTIONS, ...RENDER_ACTIONS, ...LIGHTING_ACTIONS, ...SPLINE_ACTIONS ], description: 'Action' }, name: commonSchemas.name, landscapeName: commonSchemas.stringProp, heightData: commonSchemas.arrayOfNumbers, minX: commonSchemas.numberProp, minY: commonSchemas.numberProp, maxX: commonSchemas.numberProp, maxY: commonSchemas.numberProp, updateNormals: commonSchemas.booleanProp, location: commonSchemas.location, rotation: commonSchemas.rotation, sizeX: commonSchemas.numberProp, sizeY: commonSchemas.numberProp, sectionSize: commonSchemas.numberProp, sectionsPerComponent: commonSchemas.numberProp, componentCount: commonSchemas.vector2, materialPath: commonSchemas.materialPath, tool: commonSchemas.stringProp, radius: commonSchemas.numberProp, strength: commonSchemas.numberProp, falloff: commonSchemas.numberProp, layerName: commonSchemas.stringProp, actorName: commonSchemas.actorName, foliageType: commonSchemas.stringProp, foliageTypePath: commonSchemas.assetPath, meshPath: commonSchemas.meshPath, density: commonSchemas.numberProp, minScale: commonSchemas.numberProp, maxScale: commonSchemas.numberProp, cullDistance: commonSchemas.numberProp, alignToNormal: commonSchemas.booleanProp, randomYaw: commonSchemas.booleanProp, removeAll: commonSchemas.booleanProp, locations: { type: 'array', items: commonSchemas.location }, transforms: { type: 'array', items: { type: 'object', properties: { location: commonSchemas.location, rotation: commonSchemas.rotation, scale: commonSchemas.scale } } }, position: commonSchemas.location, bounds: commonSchemas.objectProp, volumeName: commonSchemas.stringProp, seed: commonSchemas.numberProp, foliageTypes: commonSchemas.arrayOfObjects, points: commonSchemas.arrayOfObjects, // Additional handler-used params quadsPerSection: commonSchemas.numberProp, count: commonSchemas.numberProp, assets: commonSchemas.arrayOfStrings, numLODs: commonSchemas.numberProp, subdivisions: commonSchemas.numberProp, tileSize: commonSchemas.numberProp, quality: commonSchemas.stringProp, staticMesh: commonSchemas.meshPath, timeoutMs: commonSchemas.numberProp, path: commonSchemas.directoryPath, filename: commonSchemas.stringProp, assetPaths: commonSchemas.arrayOfStrings, heightmapPath: commonSchemas.stringProp, outputPath: commonSchemas.stringProp, landscapePath: commonSchemas.assetPath, landscapeActorPath: commonSchemas.stringProp, actorPath: commonSchemas.stringProp, directionalLightActorPath: commonSchemas.stringProp, skyLightActorPath: commonSchemas.stringProp, layerInfoPath: commonSchemas.assetPath, physicalMaterialPath: commonSchemas.assetPath, noWeightBlend: commonSchemas.booleanProp, hardness: commonSchemas.numberProp, waterBodyName: commonSchemas.actorName, targetActor: commonSchemas.actorName, particleSystemPath: commonSchemas.assetPath, curvePath: commonSchemas.assetPath, cubemapPath: commonSchemas.assetPath, settings: commonSchemas.objectProp, waveHeight: commonSchemas.numberProp, waveLength: commonSchemas.numberProp, amplitude: commonSchemas.numberProp, steepness: commonSchemas.numberProp, speed: commonSchemas.numberProp, direction: commonSchemas.rotation, azimuth: commonSchemas.numberProp, elevation: commonSchemas.numberProp, collisionEnabled: commonSchemas.booleanProp, // Additional params for C++ handler alignment (EnvironmentHandlers.cpp) names: commonSchemas.arrayOfStrings, time: commonSchemas.numberProp, spacing: commonSchemas.numberProp, heightScale: commonSchemas.numberProp, material: commonSchemas.materialPath, resolution: { oneOf: [commonSchemas.numberProp, commonSchemas.resolution], description: 'Capture or reflection resolution.' }, hour: commonSchemas.numberProp, intensity: commonSchemas.numberProp, skyLightIntensity: commonSchemas.numberProp, alignToSpline: commonSchemas.booleanProp, arriveTangent: commonSchemas.location, bClosedLoop: commonSchemas.booleanProp, blueprintPath: commonSchemas.blueprintPath, compensationValue: commonSchemas.numberProp, componentName: commonSchemas.componentName, enabled: commonSchemas.enabled, forwardAxis: commonSchemas.stringProp, initialPoints: commonSchemas.arrayOfObjects, leaveTangent: commonSchemas.location, lightType: commonSchemas.stringProp, materialIndex: commonSchemas.numberProp, maxBrightness: commonSchemas.numberProp, method: commonSchemas.stringProp, minBrightness: commonSchemas.numberProp, operation: commonSchemas.stringProp, pointIndex: commonSchemas.numberProp, pointRotation: commonSchemas.rotation, pointScale: commonSchemas.scale, pointType: commonSchemas.stringProp, propertyName: commonSchemas.propertyName, propertyValue: commonSchemas.value, randomOffsetRange: commonSchemas.numberProp, randomizeRotation: commonSchemas.booleanProp, randomizeScale: commonSchemas.booleanProp, channel: commonSchemas.numberProp, channels: commonSchemas.arrayOfNumbers, lutPath: commonSchemas.assetPath, captureOffset: commonSchemas.location, blendWeight: commonSchemas.numberProp, infiniteUnbound: commonSchemas.booleanProp, amount: commonSchemas.numberProp, threshold: commonSchemas.numberProp, aperture: commonSchemas.numberProp, distance: commonSchemas.numberProp, renderTargetPath: commonSchemas.stringProp, region: commonSchemas.objectProp, rotationRange: commonSchemas.rotation, save: commonSchemas.save, screenPercentage: commonSchemas.numberProp, skipFlush: commonSchemas.booleanProp, splineType: commonSchemas.stringProp, captureSource: commonSchemas.stringProp, useRandomOffset: commonSchemas.booleanProp, width: commonSchemas.numberProp }, required: ['action'] }, outputSchema: { type: 'object', properties: { ...commonSchemas.outputBase } } };