{"_chain":"Rust #[derive(JsonSchema)] → cargo run --bin generate-schema → cad-schema.json","_generated":"This file is generated — do not edit directly. Re-generate: bun run build:truck","boundaries":{"modules":{"truck-geometry":{"crate":"truck-cad","exports":["add_cube","add_cylinder","add_sphere","add_torus","begin_sketch","boolean_intersect","boolean_subtract","boolean_union","clash_detect","clear","delete","deselect","duplicate","export_obj","export_scene","export_step","export_stl","get_bim_metadata","get_object_style","get_state","import_ifc","import_scene","import_step","pick_at","pick_mesh_stats","quick_rect_extrude","rename","rotate","scale","select","select_at","set_camera","set_color","set_style","sketch_add_constraint","sketch_add_edge","sketch_add_point","sketch_cancel","sketch_export","sketch_extrude","sketch_solve","translate"],"targets":["browser","cf-worker"]},"truck-sync":{"crate":"truck-sync","exports":["create_doc","apply_op","merge_docs","get_ops","set_op_enabled","set_group_enabled","rollback_to","export_ops_since","validate_op","get_replay_ops","get_name","set_name"],"targets":["browser","cf-worker"]}}},"commands":{"add_cube":{"description":"Add a cube primitive","domain":"geometry","ephemeral":false,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"size":{"default":1,"format":"double","maximum":1000,"minimum":0.001,"type":"number"}},"title":"AddCubeParams","type":"object"},"readonly":false,"returns":"objectId"},"add_cylinder":{"description":"Add a cylinder primitive","domain":"geometry","ephemeral":false,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"height":{"default":1,"format":"double","maximum":1000,"minimum":0.001,"type":"number"},"radius":{"default":0.5,"format":"double","maximum":1000,"minimum":0.001,"type":"number"}},"title":"AddCylinderParams","type":"object"},"readonly":false,"returns":"objectId"},"add_sphere":{"description":"Add a sphere primitive","domain":"geometry","ephemeral":false,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"radius":{"default":1,"format":"double","maximum":1000,"minimum":0.001,"type":"number"}},"title":"AddSphereParams","type":"object"},"readonly":false,"returns":"objectId"},"add_torus":{"description":"Add a torus primitive","domain":"geometry","ephemeral":false,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"majorRadius":{"default":1,"format":"double","maximum":1000,"minimum":0.001,"type":"number"},"minorRadius":{"default":0.3,"format":"double","maximum":999,"minimum":0.001,"type":"number"}},"title":"AddTorusParams","type":"object"},"readonly":false,"returns":"objectId"},"begin_sketch":{"description":"Start a new 2D sketch on a plane","domain":"sketch","ephemeral":true,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"plane":{"description":"Sketch plane: \"xy\", \"xz\", or \"yz\"","type":"string"}},"required":["plane"],"title":"BeginSketchParams","type":"object"},"readonly":false,"returns":"sketchId"},"boolean_intersect":{"description":"Intersect two objects (A & B)","domain":"booleans","ephemeral":false,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"idA":{"type":"string"},"idB":{"type":"string"}},"required":["idA","idB"],"title":"BooleanParams","type":"object"},"readonly":false,"returns":"objectId"},"boolean_subtract":{"description":"Subtract B from A","domain":"booleans","ephemeral":false,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"idA":{"type":"string"},"idB":{"type":"string"}},"required":["idA","idB"],"title":"BooleanParams","type":"object"},"readonly":false,"returns":"objectId"},"boolean_union":{"description":"Union two objects (A + B)","domain":"booleans","ephemeral":false,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"idA":{"type":"string"},"idB":{"type":"string"}},"required":["idA","idB"],"title":"BooleanParams","type":"object"},"readonly":false,"returns":"objectId"},"clash_detect":{"description":"Detect intersection between two objects","domain":"booleans","ephemeral":false,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"idA":{"type":"string"},"idB":{"type":"string"}},"required":["idA","idB"],"title":"BooleanParams","type":"object"},"readonly":true,"returns":"clash"},"clear":{"description":"Clear all objects from the scene","domain":"scene","ephemeral":false,"params":{"type":"object"},"readonly":false,"returns":"success"},"delete":{"description":"Delete an object by ID","domain":"scene","ephemeral":false,"params":{"$schema":"http://json-schema.org/draft-07/schema#","description":"Shared param for commands that take a single objectId.","properties":{"objectId":{"type":"string"}},"required":["objectId"],"title":"ObjectIdParam","type":"object"},"readonly":false,"returns":"success"},"deselect":{"description":"Clear selection","domain":"scene","ephemeral":true,"params":{"type":"object"},"readonly":false,"returns":"selectedId"},"duplicate":{"description":"Duplicate an object","domain":"geometry","ephemeral":false,"params":{"$schema":"http://json-schema.org/draft-07/schema#","description":"Shared param for commands that take a single objectId.","properties":{"objectId":{"type":"string"}},"required":["objectId"],"title":"ObjectIdParam","type":"object"},"readonly":false,"returns":"objectId"},"export_obj":{"description":"Export scene as OBJ string","domain":"scene","ephemeral":false,"params":{"type":"object"},"readonly":true,"returns":"obj"},"export_scene":{"description":"Export scene as JSON string","domain":"scene","ephemeral":false,"params":{"type":"object"},"readonly":true,"returns":"scene"},"export_step":{"description":"Export scene as STEP string","domain":"scene","ephemeral":false,"params":{"type":"object"},"readonly":true,"returns":"step"},"export_stl":{"description":"Export scene as STL string","domain":"scene","ephemeral":false,"params":{"type":"object"},"readonly":true,"returns":"stl"},"get_bim_metadata":{"description":"Get BIM metadata for an object","domain":"style","ephemeral":true,"params":{"$schema":"http://json-schema.org/draft-07/schema#","description":"Shared param for commands that take a single objectId.","properties":{"objectId":{"type":"string"}},"required":["objectId"],"title":"ObjectIdParam","type":"object"},"readonly":true,"returns":"bim"},"get_object_style":{"description":"Get object material style","domain":"style","ephemeral":true,"params":{"$schema":"http://json-schema.org/draft-07/schema#","description":"Shared param for commands that take a single objectId.","properties":{"objectId":{"type":"string"}},"required":["objectId"],"title":"ObjectIdParam","type":"object"},"readonly":true,"returns":"style"},"get_state":{"description":"Get full scene state","domain":"style","ephemeral":true,"params":{"type":"object"},"readonly":true,"returns":"state"},"import_ifc":{"description":"Import BIM data from IFC string","domain":"scene","ephemeral":false,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"data":{"type":"string"}},"required":["data"],"title":"ImportIfcParams","type":"object"},"readonly":false,"returns":"success"},"import_scene":{"description":"Import scene from JSON string","domain":"scene","ephemeral":false,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"json":{"type":"string"}},"required":["json"],"title":"ImportSceneParams","type":"object"},"readonly":false,"returns":"success"},"import_step":{"description":"Import B-Rep data from STEP string","domain":"scene","ephemeral":false,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"data":{"type":"string"}},"required":["data"],"title":"ImportStepParams","type":"object"},"readonly":false,"returns":"success"},"pick_at":{"description":"Ray-cast pick at NDC coords (read-only)","domain":"scene","ephemeral":true,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"ndcX":{"format":"double","type":"number"},"ndcY":{"format":"double","type":"number"}},"required":["ndcX","ndcY"],"title":"PickAtParams","type":"object"},"readonly":true,"returns":"pickedId"},"pick_mesh_stats":{"description":"Get pick mesh statistics","domain":"style","ephemeral":true,"params":{"type":"object"},"readonly":true,"returns":"stats"},"quick_rect_extrude":{"description":"Create a rectangular sketch and extrude it to 3D in one step","domain":"sketch","ephemeral":false,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"depth":{"format":"double","type":"number"},"height":{"format":"double","type":"number"},"plane":{"description":"Sketch plane: \"xy\", \"xz\", or \"yz\" (default: \"xy\")","type":["string","null"]},"width":{"format":"double","type":"number"}},"required":["depth","height","width"],"title":"QuickRectExtrudeParams","type":"object"},"readonly":false,"returns":"objectId"},"rename":{"description":"Rename an object","domain":"style","ephemeral":false,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"name":{"type":"string"},"objectId":{"type":"string"}},"required":["name","objectId"],"title":"RenameParams","type":"object"},"readonly":false,"returns":"success"},"rotate":{"description":"Rotate an object around an axis","domain":"geometry","ephemeral":false,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"angleDeg":{"default":0,"format":"double","type":"number"},"axisX":{"default":0,"format":"double","type":"number"},"axisY":{"default":1,"format":"double","type":"number"},"axisZ":{"default":0,"format":"double","type":"number"},"objectId":{"type":"string"}},"required":["objectId"],"title":"RotateParams","type":"object"},"readonly":false,"returns":"success"},"scale":{"description":"Scale an object by sx/sy/sz","domain":"geometry","ephemeral":false,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"objectId":{"type":"string"},"sx":{"default":1,"format":"double","type":"number"},"sy":{"default":1,"format":"double","type":"number"},"sz":{"default":1,"format":"double","type":"number"}},"required":["objectId"],"title":"ScaleParams","type":"object"},"readonly":false,"returns":"success"},"select":{"description":"Select an object by ID","domain":"scene","ephemeral":true,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"id":{"type":"string"}},"required":["id"],"title":"SelectParams","type":"object"},"readonly":false,"returns":"selectedId"},"select_at":{"description":"Pick + select at NDC coords","domain":"scene","ephemeral":true,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"ndcX":{"format":"double","type":"number"},"ndcY":{"format":"double","type":"number"}},"required":["ndcX","ndcY"],"title":"PickAtParams","type":"object"},"readonly":false,"returns":"selectedId"},"set_camera":{"description":"Set camera from JS (matrixWorld + projection)","domain":"style","ephemeral":true,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"far":{"default":100,"format":"double","type":"number"},"fovDeg":{"default":45,"description":"Vertical field-of-view in degrees (perspective only)","format":"double","type":"number"},"matrixWorld":{"description":"16 floats: column-major 4×4 camera-to-world matrix","items":{"format":"double","type":"number"},"type":"array"},"near":{"default":0.01,"format":"double","type":"number"}},"required":["matrixWorld"],"title":"SetCameraParams","type":"object"},"readonly":false,"returns":"success"},"set_color":{"description":"Set object color (RGBA)","domain":"style","ephemeral":false,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"a":{"default":1,"format":"double","type":"number"},"b":{"default":0,"format":"double","type":"number"},"g":{"default":0,"format":"double","type":"number"},"objectId":{"type":"string"},"r":{"default":1,"format":"double","type":"number"}},"required":["objectId"],"title":"SetColorParams","type":"object"},"readonly":false,"returns":"success"},"set_style":{"description":"Set object material style","domain":"style","ephemeral":false,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"objectId":{"type":"string"},"style":true},"required":["objectId","style"],"title":"SetStyleParams","type":"object"},"readonly":false,"returns":"success"},"sketch_add_constraint":{"description":"Add a constraint to the sketch","domain":"sketch","ephemeral":true,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"constraintType":{"description":"Constraint type: \"fixed\", \"horizontal\", \"vertical\", \"distance\", \"horizontal_distance\", \"vertical_distance\", \"coincident\", \"parallel\", \"perpendicular\", \"equal_length\", \"midpoint\"","type":"string"},"params":{"description":"JSON object with constraint-specific parameters","type":"string"}},"required":["constraintType","params"],"title":"SketchAddConstraintParams","type":"object"},"readonly":false,"returns":"constraintId"},"sketch_add_edge":{"description":"Add an edge between two sketch points","domain":"sketch","ephemeral":true,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"p0Id":{"description":"UUID of the first point","type":"string"},"p1Id":{"description":"UUID of the second point","type":"string"}},"required":["p0Id","p1Id"],"title":"SketchAddEdgeParams","type":"object"},"readonly":false,"returns":"edgeId"},"sketch_add_point":{"description":"Add a point to the active sketch","domain":"sketch","ephemeral":true,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"x":{"format":"double","type":"number"},"y":{"format":"double","type":"number"}},"required":["x","y"],"title":"SketchAddPointParams","type":"object"},"readonly":false,"returns":"pointId"},"sketch_cancel":{"description":"Cancel the active sketch","domain":"sketch","ephemeral":true,"params":{"type":"object"},"readonly":false,"returns":"success"},"sketch_export":{"description":"Export active sketch as JSON","domain":"sketch","ephemeral":true,"params":{"type":"object"},"readonly":true,"returns":"sketchJson"},"sketch_extrude":{"description":"Extrude a 2D sketch to 3D","domain":"sketch","ephemeral":false,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"height":{"format":"double","type":"number"},"sketchJson":{"type":"string"}},"required":["height","sketchJson"],"title":"SketchExtrudeParams","type":"object"},"readonly":false,"returns":"objectId"},"sketch_solve":{"description":"Solve sketch constraints and return solved positions","domain":"sketch","ephemeral":true,"params":{"type":"object"},"readonly":true,"returns":"solved"},"translate":{"description":"Move an object by dx/dy/dz","domain":"geometry","ephemeral":false,"params":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dx":{"default":0,"format":"double","type":"number"},"dy":{"default":0,"format":"double","type":"number"},"dz":{"default":0,"format":"double","type":"number"},"objectId":{"type":"string"}},"required":["objectId"],"title":"TranslateParams","type":"object"},"readonly":false,"returns":"success"}},"controlPlane":{"clear_data":{"description":"Wipe all local data (IndexedDB, localStorage). Requires user confirmation in GUI. Cannot be undone.","layer":"js","params":{"properties":{},"type":"object"},"returns":"success"},"create_model":{"description":"Create a new document, reset the scene","layer":"js","params":{"properties":{"name":{"description":"Optional model name","type":"string"}},"type":"object"},"returns":"modelId"},"delete_model":{"description":"Delete a model from cloud storage","layer":"js","params":{"properties":{"id":{"description":"Model ID to delete","type":"string"}},"required":["id"],"type":"object"},"returns":"success"},"get_status":{"description":"Get system status: mode, sync state, object count","layer":"js","params":{"properties":{},"type":"object"},"returns":"status"},"redo":{"description":"Redo the last undone operation","layer":"js","params":{"properties":{},"type":"object"},"returns":"success"},"save_cloud":{"description":"Save the current scene to cloud storage with thumbnail","layer":"js","params":{"properties":{"name":{"description":"Model name","type":"string"}},"required":["name"],"type":"object"},"returns":"success"},"set_automerge":{"description":"Enable or disable Automerge sync","layer":"js","params":{"properties":{"enabled":{"description":"Whether Automerge sync is enabled","type":"boolean"}},"required":["enabled"],"type":"object"},"returns":"success"},"set_mode":{"description":"Switch between local (offline) and online (Worker relay) mode","layer":"js","params":{"properties":{"mode":{"description":"Target mode","enum":["local","online"],"type":"string"}},"required":["mode"],"type":"object"},"returns":"mode"},"share_model":{"description":"Copy a shareable URL for the current model to clipboard","layer":"js","params":{"properties":{},"type":"object"},"returns":"url"},"undo":{"description":"Undo the last operation","layer":"js","params":{"properties":{},"type":"object"},"returns":"success"}},"module":"cad","version":"0.8.0"}