@snaptrude/plugin-core 0.0.0-bimsvg-20260928124803

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.
Files changed (383) hide show
  1. package/AGENTS.md +231 -0
  2. package/CHANGELOG.md +341 -0
  3. package/CLAUDE.md +11 -0
  4. package/api-manifest.json +9120 -0
  5. package/dist/api/analysis/daylight.d.ts +603 -0
  6. package/dist/api/analysis/daylight.d.ts.map +1 -0
  7. package/dist/api/analysis/heatmaps.d.ts +658 -0
  8. package/dist/api/analysis/heatmaps.d.ts.map +1 -0
  9. package/dist/api/analysis/illuminance.d.ts +145 -0
  10. package/dist/api/analysis/illuminance.d.ts.map +1 -0
  11. package/dist/api/analysis/index.d.ts +59 -0
  12. package/dist/api/analysis/index.d.ts.map +1 -0
  13. package/dist/api/analysis/shadows.d.ts +165 -0
  14. package/dist/api/analysis/shadows.d.ts.map +1 -0
  15. package/dist/api/analysis/solar.d.ts +249 -0
  16. package/dist/api/analysis/solar.d.ts.map +1 -0
  17. package/dist/api/analysis/sunlightHours.d.ts +208 -0
  18. package/dist/api/analysis/sunlightHours.d.ts.map +1 -0
  19. package/dist/api/analysis/sunpath.d.ts +80 -0
  20. package/dist/api/analysis/sunpath.d.ts.map +1 -0
  21. package/dist/api/analysis/weather.d.ts +193 -0
  22. package/dist/api/analysis/weather.d.ts.map +1 -0
  23. package/dist/api/core/buildings.d.ts +427 -0
  24. package/dist/api/core/buildings.d.ts.map +1 -0
  25. package/dist/api/core/camera/index.d.ts +261 -0
  26. package/dist/api/core/camera/index.d.ts.map +1 -0
  27. package/dist/api/core/comment/index.d.ts +333 -0
  28. package/dist/api/core/comment/index.d.ts.map +1 -0
  29. package/dist/api/core/geom/create/index.d.ts +1073 -0
  30. package/dist/api/core/geom/create/index.d.ts.map +1 -0
  31. package/dist/api/core/geom/delete/index.d.ts +78 -0
  32. package/dist/api/core/geom/delete/index.d.ts.map +1 -0
  33. package/dist/api/core/geom/index.d.ts +33 -0
  34. package/dist/api/core/geom/index.d.ts.map +1 -0
  35. package/dist/api/core/geom/query/arc.d.ts +169 -0
  36. package/dist/api/core/geom/query/arc.d.ts.map +1 -0
  37. package/dist/api/core/geom/query/brep.d.ts +514 -0
  38. package/dist/api/core/geom/query/brep.d.ts.map +1 -0
  39. package/dist/api/core/geom/query/circle.d.ts +378 -0
  40. package/dist/api/core/geom/query/circle.d.ts.map +1 -0
  41. package/dist/api/core/geom/query/contour.d.ts +450 -0
  42. package/dist/api/core/geom/query/contour.d.ts.map +1 -0
  43. package/dist/api/core/geom/query/curve.d.ts +918 -0
  44. package/dist/api/core/geom/query/curve.d.ts.map +1 -0
  45. package/dist/api/core/geom/query/edge.d.ts +128 -0
  46. package/dist/api/core/geom/query/edge.d.ts.map +1 -0
  47. package/dist/api/core/geom/query/face.d.ts +363 -0
  48. package/dist/api/core/geom/query/face.d.ts.map +1 -0
  49. package/dist/api/core/geom/query/halfedge.d.ts +206 -0
  50. package/dist/api/core/geom/query/halfedge.d.ts.map +1 -0
  51. package/dist/api/core/geom/query/index.d.ts +61 -0
  52. package/dist/api/core/geom/query/index.d.ts.map +1 -0
  53. package/dist/api/core/geom/query/profile.d.ts +410 -0
  54. package/dist/api/core/geom/query/profile.d.ts.map +1 -0
  55. package/dist/api/core/geom/query/vertex.d.ts +187 -0
  56. package/dist/api/core/geom/query/vertex.d.ts.map +1 -0
  57. package/dist/api/core/geom/update/contour.d.ts +272 -0
  58. package/dist/api/core/geom/update/contour.d.ts.map +1 -0
  59. package/dist/api/core/geom/update/curve.d.ts +180 -0
  60. package/dist/api/core/geom/update/curve.d.ts.map +1 -0
  61. package/dist/api/core/geom/update/index.d.ts +27 -0
  62. package/dist/api/core/geom/update/index.d.ts.map +1 -0
  63. package/dist/api/core/geom/update/profile.d.ts +329 -0
  64. package/dist/api/core/geom/update/profile.d.ts.map +1 -0
  65. package/dist/api/core/groups.d.ts +485 -0
  66. package/dist/api/core/groups.d.ts.map +1 -0
  67. package/dist/api/core/handles/index.d.ts +210 -0
  68. package/dist/api/core/handles/index.d.ts.map +1 -0
  69. package/dist/api/core/history/index.d.ts +78 -0
  70. package/dist/api/core/history/index.d.ts.map +1 -0
  71. package/dist/api/core/index.d.ts +97 -0
  72. package/dist/api/core/index.d.ts.map +1 -0
  73. package/dist/api/core/io/export/index.d.ts +134 -0
  74. package/dist/api/core/io/export/index.d.ts.map +1 -0
  75. package/dist/api/core/io/import/index.d.ts +455 -0
  76. package/dist/api/core/io/import/index.d.ts.map +1 -0
  77. package/dist/api/core/io/index.d.ts +40 -0
  78. package/dist/api/core/io/index.d.ts.map +1 -0
  79. package/dist/api/core/io/job/index.d.ts +139 -0
  80. package/dist/api/core/io/job/index.d.ts.map +1 -0
  81. package/dist/api/core/io/query/index.d.ts +74 -0
  82. package/dist/api/core/io/query/index.d.ts.map +1 -0
  83. package/dist/api/core/io/terrain/index.d.ts +341 -0
  84. package/dist/api/core/io/terrain/index.d.ts.map +1 -0
  85. package/dist/api/core/io/underlay/index.d.ts +805 -0
  86. package/dist/api/core/io/underlay/index.d.ts.map +1 -0
  87. package/dist/api/core/layers.d.ts +402 -0
  88. package/dist/api/core/layers.d.ts.map +1 -0
  89. package/dist/api/core/math/index.d.ts +18 -0
  90. package/dist/api/core/math/index.d.ts.map +1 -0
  91. package/dist/api/core/math/quat.d.ts +170 -0
  92. package/dist/api/core/math/quat.d.ts.map +1 -0
  93. package/dist/api/core/math/vec3.d.ts +174 -0
  94. package/dist/api/core/math/vec3.d.ts.map +1 -0
  95. package/dist/api/core/mode/index.d.ts +111 -0
  96. package/dist/api/core/mode/index.d.ts.map +1 -0
  97. package/dist/api/core/project/index.d.ts +466 -0
  98. package/dist/api/core/project/index.d.ts.map +1 -0
  99. package/dist/api/core/proposals/index.d.ts +531 -0
  100. package/dist/api/core/proposals/index.d.ts.map +1 -0
  101. package/dist/api/core/storeys/index.d.ts +265 -0
  102. package/dist/api/core/storeys/index.d.ts.map +1 -0
  103. package/dist/api/core/tags.d.ts +860 -0
  104. package/dist/api/core/tags.d.ts.map +1 -0
  105. package/dist/api/core/units/index.d.ts +175 -0
  106. package/dist/api/core/units/index.d.ts.map +1 -0
  107. package/dist/api/core/user.d.ts +44 -0
  108. package/dist/api/core/user.d.ts.map +1 -0
  109. package/dist/api/core/zoom/index.d.ts +49 -0
  110. package/dist/api/core/zoom/index.d.ts.map +1 -0
  111. package/dist/api/design/boolean/index.d.ts +168 -0
  112. package/dist/api/design/boolean/index.d.ts.map +1 -0
  113. package/dist/api/design/create/bulk-items.d.ts +185 -0
  114. package/dist/api/design/create/bulk-items.d.ts.map +1 -0
  115. package/dist/api/design/create/grids.d.ts +132 -0
  116. package/dist/api/design/create/grids.d.ts.map +1 -0
  117. package/dist/api/design/create/index.d.ts +1747 -0
  118. package/dist/api/design/create/index.d.ts.map +1 -0
  119. package/dist/api/design/create/opening-fields.d.ts +37 -0
  120. package/dist/api/design/create/opening-fields.d.ts.map +1 -0
  121. package/dist/api/design/delete/index.d.ts +70 -0
  122. package/dist/api/design/delete/index.d.ts.map +1 -0
  123. package/dist/api/design/dimensions.d.ts +427 -0
  124. package/dist/api/design/dimensions.d.ts.map +1 -0
  125. package/dist/api/design/doors/index.d.ts +470 -0
  126. package/dist/api/design/doors/index.d.ts.map +1 -0
  127. package/dist/api/design/edit/index.d.ts +49 -0
  128. package/dist/api/design/edit/index.d.ts.map +1 -0
  129. package/dist/api/design/erase/index.d.ts +160 -0
  130. package/dist/api/design/erase/index.d.ts.map +1 -0
  131. package/dist/api/design/family.d.ts +611 -0
  132. package/dist/api/design/family.d.ts.map +1 -0
  133. package/dist/api/design/furniture/index.d.ts +296 -0
  134. package/dist/api/design/furniture/index.d.ts.map +1 -0
  135. package/dist/api/design/grids.d.ts +237 -0
  136. package/dist/api/design/grids.d.ts.map +1 -0
  137. package/dist/api/design/index.d.ts +260 -0
  138. package/dist/api/design/index.d.ts.map +1 -0
  139. package/dist/api/design/lock.d.ts +67 -0
  140. package/dist/api/design/lock.d.ts.map +1 -0
  141. package/dist/api/design/materials/index.d.ts +551 -0
  142. package/dist/api/design/materials/index.d.ts.map +1 -0
  143. package/dist/api/design/query/geometry/index.d.ts +252 -0
  144. package/dist/api/design/query/geometry/index.d.ts.map +1 -0
  145. package/dist/api/design/query/grids.d.ts +287 -0
  146. package/dist/api/design/query/grids.d.ts.map +1 -0
  147. package/dist/api/design/query/index.d.ts +1318 -0
  148. package/dist/api/design/query/index.d.ts.map +1 -0
  149. package/dist/api/design/query/referenceLines.d.ts +45 -0
  150. package/dist/api/design/query/referenceLines.d.ts.map +1 -0
  151. package/dist/api/design/query/spaces.d.ts +394 -0
  152. package/dist/api/design/query/spaces.d.ts.map +1 -0
  153. package/dist/api/design/selection/index.d.ts +282 -0
  154. package/dist/api/design/selection/index.d.ts.map +1 -0
  155. package/dist/api/design/shared.d.ts +38 -0
  156. package/dist/api/design/shared.d.ts.map +1 -0
  157. package/dist/api/design/transform/index.d.ts +249 -0
  158. package/dist/api/design/transform/index.d.ts.map +1 -0
  159. package/dist/api/design/types/index.d.ts +181 -0
  160. package/dist/api/design/types/index.d.ts.map +1 -0
  161. package/dist/api/design/update/index.d.ts +803 -0
  162. package/dist/api/design/update/index.d.ts.map +1 -0
  163. package/dist/api/design/visibility.d.ts +126 -0
  164. package/dist/api/design/visibility.d.ts.map +1 -0
  165. package/dist/api/design/windows/index.d.ts +300 -0
  166. package/dist/api/design/windows/index.d.ts.map +1 -0
  167. package/dist/api/entity/buildableEnvelope.d.ts +265 -0
  168. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -0
  169. package/dist/api/entity/department.d.ts +1 -0
  170. package/dist/api/entity/department.d.ts.map +1 -0
  171. package/dist/api/entity/index.d.ts +28 -0
  172. package/dist/api/entity/index.d.ts.map +1 -0
  173. package/dist/api/entity/referenceLine.d.ts +210 -0
  174. package/dist/api/entity/referenceLine.d.ts.map +1 -0
  175. package/dist/api/entity/space.d.ts +846 -0
  176. package/dist/api/entity/space.d.ts.map +1 -0
  177. package/dist/api/entity/story.d.ts +476 -0
  178. package/dist/api/entity/story.d.ts.map +1 -0
  179. package/dist/api/index.d.ts +45 -0
  180. package/dist/api/index.d.ts.map +1 -0
  181. package/dist/api/presentation/aiInspiration.d.ts +2400 -0
  182. package/dist/api/presentation/aiInspiration.d.ts.map +1 -0
  183. package/dist/api/presentation/annotate.d.ts +483 -0
  184. package/dist/api/presentation/annotate.d.ts.map +1 -0
  185. package/dist/api/presentation/diagrams.d.ts +184 -0
  186. package/dist/api/presentation/diagrams.d.ts.map +1 -0
  187. package/dist/api/presentation/drawings.d.ts +2900 -0
  188. package/dist/api/presentation/drawings.d.ts.map +1 -0
  189. package/dist/api/presentation/export.d.ts +126 -0
  190. package/dist/api/presentation/export.d.ts.map +1 -0
  191. package/dist/api/presentation/import.d.ts +164 -0
  192. package/dist/api/presentation/import.d.ts.map +1 -0
  193. package/dist/api/presentation/index.d.ts +114 -0
  194. package/dist/api/presentation/index.d.ts.map +1 -0
  195. package/dist/api/presentation/placedViews.d.ts +1232 -0
  196. package/dist/api/presentation/placedViews.d.ts.map +1 -0
  197. package/dist/api/presentation/shapes.d.ts +481 -0
  198. package/dist/api/presentation/shapes.d.ts.map +1 -0
  199. package/dist/api/presentation/sheets.d.ts +643 -0
  200. package/dist/api/presentation/sheets.d.ts.map +1 -0
  201. package/dist/api/presentation/slideshow.d.ts +125 -0
  202. package/dist/api/presentation/slideshow.d.ts.map +1 -0
  203. package/dist/api/presentation/tables.d.ts +81 -0
  204. package/dist/api/presentation/tables.d.ts.map +1 -0
  205. package/dist/api/presentation/viewPresets.d.ts +70 -0
  206. package/dist/api/presentation/viewPresets.d.ts.map +1 -0
  207. package/dist/api/presentation/views.d.ts +741 -0
  208. package/dist/api/presentation/views.d.ts.map +1 -0
  209. package/dist/api/program/adjacency.d.ts +155 -0
  210. package/dist/api/program/adjacency.d.ts.map +1 -0
  211. package/dist/api/program/areas.d.ts +450 -0
  212. package/dist/api/program/areas.d.ts.map +1 -0
  213. package/dist/api/program/classification.d.ts +135 -0
  214. package/dist/api/program/classification.d.ts.map +1 -0
  215. package/dist/api/program/cores.d.ts +78 -0
  216. package/dist/api/program/cores.d.ts.map +1 -0
  217. package/dist/api/program/departments.d.ts +487 -0
  218. package/dist/api/program/departments.d.ts.map +1 -0
  219. package/dist/api/program/index.d.ts +71 -0
  220. package/dist/api/program/index.d.ts.map +1 -0
  221. package/dist/api/program/labels.d.ts +355 -0
  222. package/dist/api/program/labels.d.ts.map +1 -0
  223. package/dist/api/program/layout.d.ts +398 -0
  224. package/dist/api/program/layout.d.ts.map +1 -0
  225. package/dist/api/program/metadata.d.ts +328 -0
  226. package/dist/api/program/metadata.d.ts.map +1 -0
  227. package/dist/api/program/metrics.d.ts +108 -0
  228. package/dist/api/program/metrics.d.ts.map +1 -0
  229. package/dist/api/program/site.d.ts +823 -0
  230. package/dist/api/program/site.d.ts.map +1 -0
  231. package/dist/api/program/spreadsheet.d.ts +2628 -0
  232. package/dist/api/program/spreadsheet.d.ts.map +1 -0
  233. package/dist/api/workspace/index.d.ts +552 -0
  234. package/dist/api/workspace/index.d.ts.map +1 -0
  235. package/dist/errors/codes.d.ts +34 -0
  236. package/dist/errors/codes.d.ts.map +1 -0
  237. package/dist/errors/envelope.d.ts +56 -0
  238. package/dist/errors/envelope.d.ts.map +1 -0
  239. package/dist/errors/index.d.ts +6 -0
  240. package/dist/errors/index.d.ts.map +1 -0
  241. package/dist/errors/plugin-error.d.ts +69 -0
  242. package/dist/errors/plugin-error.d.ts.map +1 -0
  243. package/dist/handles.d.ts +229 -0
  244. package/dist/handles.d.ts.map +1 -0
  245. package/dist/host-utils.d.ts +47 -0
  246. package/dist/host-utils.d.ts.map +1 -0
  247. package/dist/index.cjs +8836 -0
  248. package/dist/index.cjs.map +1 -0
  249. package/dist/index.d.ts +6 -0
  250. package/dist/index.d.ts.map +1 -0
  251. package/dist/index.js +7568 -0
  252. package/dist/index.js.map +1 -0
  253. package/dist/types.d.ts +16 -0
  254. package/dist/types.d.ts.map +1 -0
  255. package/package.json +41 -0
  256. package/scripts/generate-manifest.mjs +238 -0
  257. package/scripts/generate-manifest.test.mjs +292 -0
  258. package/src/api/analysis/daylight.ts +470 -0
  259. package/src/api/analysis/heatmaps.ts +683 -0
  260. package/src/api/analysis/illuminance.ts +155 -0
  261. package/src/api/analysis/index.ts +61 -0
  262. package/src/api/analysis/shadows.ts +183 -0
  263. package/src/api/analysis/solar.ts +237 -0
  264. package/src/api/analysis/sunlightHours.ts +211 -0
  265. package/src/api/analysis/sunpath.ts +83 -0
  266. package/src/api/analysis/weather.ts +179 -0
  267. package/src/api/core/buildings.ts +485 -0
  268. package/src/api/core/camera/index.ts +268 -0
  269. package/src/api/core/comment/index.ts +376 -0
  270. package/src/api/core/geom/create/index.ts +1204 -0
  271. package/src/api/core/geom/delete/index.ts +84 -0
  272. package/src/api/core/geom/index.ts +35 -0
  273. package/src/api/core/geom/query/arc.ts +169 -0
  274. package/src/api/core/geom/query/brep.ts +563 -0
  275. package/src/api/core/geom/query/circle.ts +404 -0
  276. package/src/api/core/geom/query/contour.ts +540 -0
  277. package/src/api/core/geom/query/curve.ts +1078 -0
  278. package/src/api/core/geom/query/edge.ts +130 -0
  279. package/src/api/core/geom/query/face.ts +403 -0
  280. package/src/api/core/geom/query/halfedge.ts +210 -0
  281. package/src/api/core/geom/query/index.ts +63 -0
  282. package/src/api/core/geom/query/profile.ts +473 -0
  283. package/src/api/core/geom/query/vertex.ts +205 -0
  284. package/src/api/core/geom/update/contour.ts +315 -0
  285. package/src/api/core/geom/update/curve.ts +209 -0
  286. package/src/api/core/geom/update/index.ts +29 -0
  287. package/src/api/core/geom/update/profile.ts +377 -0
  288. package/src/api/core/groups.ts +521 -0
  289. package/src/api/core/handles/index.ts +233 -0
  290. package/src/api/core/history/index.ts +84 -0
  291. package/src/api/core/index.ts +99 -0
  292. package/src/api/core/io/export/index.ts +126 -0
  293. package/src/api/core/io/import/index.ts +504 -0
  294. package/src/api/core/io/index.ts +42 -0
  295. package/src/api/core/io/job/index.ts +140 -0
  296. package/src/api/core/io/query/index.ts +71 -0
  297. package/src/api/core/io/terrain/index.ts +360 -0
  298. package/src/api/core/io/underlay/index.ts +705 -0
  299. package/src/api/core/layers.ts +333 -0
  300. package/src/api/core/math/index.ts +20 -0
  301. package/src/api/core/math/quat.ts +172 -0
  302. package/src/api/core/math/vec3.ts +179 -0
  303. package/src/api/core/mode/index.ts +108 -0
  304. package/src/api/core/project/index.ts +479 -0
  305. package/src/api/core/proposals/index.ts +569 -0
  306. package/src/api/core/storeys/index.ts +294 -0
  307. package/src/api/core/tags.ts +911 -0
  308. package/src/api/core/units/index.ts +164 -0
  309. package/src/api/core/user.ts +46 -0
  310. package/src/api/core/zoom/index.ts +51 -0
  311. package/src/api/design/boolean/index.ts +179 -0
  312. package/src/api/design/create/bulk-items.ts +186 -0
  313. package/src/api/design/create/grids.ts +137 -0
  314. package/src/api/design/create/index.ts +1954 -0
  315. package/src/api/design/create/opening-fields.ts +37 -0
  316. package/src/api/design/delete/index.ts +74 -0
  317. package/src/api/design/dimensions.ts +453 -0
  318. package/src/api/design/doors/index.ts +500 -0
  319. package/src/api/design/edit/index.ts +54 -0
  320. package/src/api/design/erase/index.ts +151 -0
  321. package/src/api/design/family.ts +646 -0
  322. package/src/api/design/furniture/index.ts +319 -0
  323. package/src/api/design/grids.ts +237 -0
  324. package/src/api/design/index.ts +274 -0
  325. package/src/api/design/lock.ts +69 -0
  326. package/src/api/design/materials/index.ts +608 -0
  327. package/src/api/design/query/geometry/index.ts +288 -0
  328. package/src/api/design/query/grids.ts +197 -0
  329. package/src/api/design/query/index.ts +1176 -0
  330. package/src/api/design/query/referenceLines.ts +52 -0
  331. package/src/api/design/query/spaces.ts +275 -0
  332. package/src/api/design/selection/index.ts +273 -0
  333. package/src/api/design/shared.ts +40 -0
  334. package/src/api/design/transform/index.ts +254 -0
  335. package/src/api/design/types/index.ts +156 -0
  336. package/src/api/design/update/index.ts +798 -0
  337. package/src/api/design/visibility.ts +143 -0
  338. package/src/api/design/windows/index.ts +333 -0
  339. package/src/api/entity/buildableEnvelope.ts +322 -0
  340. package/src/api/entity/department.ts +0 -0
  341. package/src/api/entity/index.ts +30 -0
  342. package/src/api/entity/referenceLine.ts +235 -0
  343. package/src/api/entity/space.ts +612 -0
  344. package/src/api/entity/story.ts +517 -0
  345. package/src/api/index.ts +47 -0
  346. package/src/api/presentation/aiInspiration.ts +1116 -0
  347. package/src/api/presentation/annotate.ts +417 -0
  348. package/src/api/presentation/diagrams.ts +194 -0
  349. package/src/api/presentation/drawings.ts +529 -0
  350. package/src/api/presentation/export.ts +133 -0
  351. package/src/api/presentation/import.ts +159 -0
  352. package/src/api/presentation/index.ts +129 -0
  353. package/src/api/presentation/placedViews.ts +1203 -0
  354. package/src/api/presentation/shapes.ts +274 -0
  355. package/src/api/presentation/sheets.ts +616 -0
  356. package/src/api/presentation/slideshow.ts +134 -0
  357. package/src/api/presentation/tables.ts +84 -0
  358. package/src/api/presentation/viewPresets.ts +83 -0
  359. package/src/api/presentation/views.ts +698 -0
  360. package/src/api/program/adjacency.ts +164 -0
  361. package/src/api/program/areas.ts +408 -0
  362. package/src/api/program/classification.ts +138 -0
  363. package/src/api/program/cores.ts +83 -0
  364. package/src/api/program/departments.ts +517 -0
  365. package/src/api/program/index.ts +73 -0
  366. package/src/api/program/labels.ts +332 -0
  367. package/src/api/program/layout.ts +422 -0
  368. package/src/api/program/metadata.ts +364 -0
  369. package/src/api/program/metrics.ts +120 -0
  370. package/src/api/program/site.ts +748 -0
  371. package/src/api/program/spreadsheet.ts +2698 -0
  372. package/src/api/workspace/index.ts +612 -0
  373. package/src/errors/codes.ts +136 -0
  374. package/src/errors/envelope.ts +75 -0
  375. package/src/errors/index.ts +21 -0
  376. package/src/errors/plugin-error.ts +134 -0
  377. package/src/handles.ts +282 -0
  378. package/src/host-utils.ts +68 -0
  379. package/src/index.ts +5 -0
  380. package/src/types.ts +16 -0
  381. package/test/errors.test.mjs +184 -0
  382. package/tsconfig.json +22 -0
  383. package/tsup.config.ts +12 -0
package/AGENTS.md ADDED
@@ -0,0 +1,231 @@
1
+ # Plugin Core — Agent Guide
2
+
3
+ This package is the **single source of truth** for all Snaptrude plugin API definitions.
4
+ Every change here has downstream ripple effects. Follow the checklist below **before
5
+ considering your work done**.
6
+
7
+ ## What this package contains
8
+
9
+ - Abstract API classes (`src/api/`) — define method signatures, JSDoc, and Zod schemas
10
+ - Shared types (`src/types.ts`) — `ComponentId`, `PluginApiReturn<T>`, etc.
11
+ - Host utilities (`src/host-utils.ts`) — `PluginApiMethodMap`, `PluginApiMethod`, RPC payload types
12
+
13
+ ## Transport model — Handle vs value
14
+
15
+ Every plugin API argument and return value crosses the worker↔host RPC boundary by one
16
+ of exactly **two transports**. Choose the transport per type **before** writing the
17
+ signature — it is a contract decision, not an implementation detail. Authoritative design
18
+ record: [`PLUGIN_HANDLE_MIGRATION_HLD.md`](../../PLUGIN_HANDLE_MIGRATION_HLD.md) §2–§6.
19
+ Handle types + Zod schemas live in `src/handles.ts`.
20
+
21
+ ### The decision rule (Handle or value)
22
+
23
+ > **Is the type a JS primitive (`number` / `string` / `boolean`) or a string enum?**
24
+ > **Yes → value. No (any structured type) → handle.** No third option: no value DTOs, no
25
+ > `{x,y,z}`-as-input objects, no converter layer.
26
+
27
+ - A `Vec3`, `Quat`, `Line`, `Arc`, `Curve`, `Circle`, `Profile`, `Contour`, a BREP
28
+ topology object, or any scene entity is **structured → always a handle** — even a vec3,
29
+ which is "just three numbers". We never send its components across as an input object.
30
+ - A distance in mm, a boolean flag, a count, a `"round" | "square"` enum → **value**.
31
+ - **Reads are the one exception:** a read returns a bare **primitive record** (e.g.
32
+ `{ x, y, z }`) by value. That is not a value transport for a structured *type*; it is the
33
+ irreducible read leaf. A read must never mint a handle per call (§3).
34
+
35
+ ### Value transport — rules
36
+
37
+ - Primitives and enums only. No object arg may stand in for a structured type.
38
+ - Validated for **shape** at the router (`validateRPCCall`); numbers use Zod `.finite()`
39
+ wherever a schema exists. Trusted for shape only — never for identity or existence.
40
+ - Stateless: no arena, no registry, no lifecycle, no `dispose`.
41
+
42
+ ### Handle transport — rules
43
+
44
+ A handle is an opaque, kind-tagged string `"<kind>_<token>"` (`Handle<K>`), engine-free
45
+ and structured-clone-safe. The three method shapes:
46
+
47
+ - **Construction** — primitives in → handle out, async: `vec3.new({x,y,z}): Promise<Vec3Handle>`.
48
+ - **Operations** — handles in → handle out, async (every op is a host round-trip):
49
+ `vec3.add({a,b}): Promise<Vec3Handle>`.
50
+ - **Reads** — handle in → **primitive record out** (never a handle, never a DTO):
51
+ `vec3.components({v}): Promise<{x,y,z}>`.
52
+
53
+ Crossing/security rules:
54
+
55
+ - **Validation**: `handleSchema(kind)` checks only the `"<kind>_"` prefix at the trust
56
+ boundary; existence + kind + ownership are enforced host-side on resolve, and any miss
57
+ throws one `HANDLE_INVALID` (anti-oracle). Never resolve a handle in plugin-core.
58
+ - **Host wiring**: add a `register*`/`resolve*` pair in `plugins/handles/valueResolvers.ts`
59
+ (the one handle↔object converter) for value/resource handles. Entity handles are **not**
60
+ registered — they resolve live via the scene index. Reads build the record inline
61
+ (`{ x: v.x, y: v.y, z: v.z }`), never via a converter.
62
+
63
+ #### Handle classes — pick by lifecycle
64
+
65
+ All three are handles; they differ only in storage + lifecycle. Choose per backing object:
66
+
67
+ | Class | Kinds | Token shape | Storage | Lifecycle |
68
+ | ------------ | ---------------------------------------------------------------------------------- | ---------------------------------------- | ---------------------------------------------------------- | --------------------------------------------------------------- |
69
+ | **Value** | `vec3`, `quat`, `line`, `arc`, `curve`, `circle` | `<kind>_<token>` | value arena (quota 100k) | immutable; freed on plugin teardown; **not** deduped |
70
+ | **Resource** | `profile`, `contour`, `brep`, `face`, `edge`, `halfedge`, `vertex` | `<kind>_<token>` | resource arena (quota 10k) | session-ephemeral; explicit `dispose` + teardown; dedup by identity |
71
+ | **Entity** | `component`/`mass`, `material`, `story`, `referenceLine`, `department`, `buildableEnvelope` | raw `Component.id` / `Material.name` (**no prefix**) | not stored — resolved live via `StructureCollection` / `getMaterialByName` | scene-owned; stable across undo/redo; persistable across sessions |
72
+
73
+ - **Value vs Resource**: a lightweight immutable math/geom value with high churn → value
74
+ arena (big quota, no dispose obligation). A heavier engine object a plugin holds then
75
+ releases → resource arena (small quota, must `dispose`; deduped by object identity).
76
+ - **Entity**: any live scene object with a stable `Component.id` → entity handle. No arena,
77
+ no quota, no `<kind>_` prefix — the token IS the id, so it round-trips with the ids the
78
+ host already hands out.
79
+
80
+ ## Quick commands
81
+
82
+ ```bash
83
+ pnpm check-types # typecheck (no emit)
84
+ pnpm build # tsup build (ESM + CJS)
85
+ pnpm dev # tsup watch mode
86
+ ```
87
+
88
+ ## Change propagation checklist
89
+
90
+ Any time you add, remove, rename, or change the signature of an API method or type in
91
+ this package, you **must** propagate changes to all downstream consumers. Use this
92
+ checklist:
93
+
94
+ ### 1. Client implementation — `packages/plugin-client/`
95
+
96
+ > See [`packages/plugin-client/AGENTS.md`](../../packages/plugin-client/AGENTS.md) for client-specific guidance.
97
+
98
+ Every abstract method in `plugin-core` is served to plugins by `plugin-client`, but the
99
+ client has **no per-method code**: every namespace is backed by a single generic RPC
100
+ proxy (`createRpcNamespace` in `src/rpc-proxy.ts`). All calls — including math and
101
+ geom — are forwarded to the host; structured values cross as opaque handles.
102
+
103
+ | plugin-core source | plugin-client counterpart |
104
+ | ------------------- | ------------------------------------------------------------------ |
105
+ | `src/api/core/**` | `createRpcNamespace<PluginCoreApi>("core")` in `src/api/index.ts` |
106
+ | `src/api/design/**` | `createRpcNamespace<PluginDesignApi>("design")` in the same file |
107
+ | `src/api/entity/**` | `createRpcNamespace<PluginEntityApi>("entity")` in the same file |
108
+ | `src/api/tools/**` | `createRpcNamespace<PluginToolsApi>("tools")` in the same file |
109
+
110
+ - **New / removed / renamed method or signature change**: No client code change — the
111
+ proxy is generic and the types flow from plugin-core. Rebuild plugin-core so the
112
+ client picks up the new signatures.
113
+ - **New nested API module** (e.g. a new file under `core/` or `design/`): No client change
114
+ - **New top-level namespace**: Add a `createRpcNamespace<PluginXApi>("x")` property to
115
+ `ClientPluginApi` in `src/api/index.ts`
116
+
117
+ ### 2. Host implementation — `apps/snaptrudereact/src/app/plugins/api/`
118
+
119
+ > See [`apps/snaptrudereact/src/app/plugins/AGENTS.md`](../../apps/snaptrudereact/src/app/plugins/AGENTS.md) for host-specific guidance.
120
+
121
+ The host mirrors this package's `src/api/` file structure 1:1. Host classes extend the
122
+ abstract classes from plugin-core and provide the actual Snaptrude-internal implementation.
123
+
124
+ - **New method**: Implement using Snaptrude internals. Use Zod `.parse()` for input validation.
125
+ - **Removed method**: Delete from host
126
+ - **Renamed/signature change**: Update the host method to match
127
+ - **New API module**: Create the host file, wire into barrel, and add to `SnaptrudePluginApi` in `api/index.ts`
128
+ - **New structured type**: Structured types cross as opaque handles (all-handle model) — there is no DTO converter layer. Add a `register*`/`resolve*` pair in the host's `plugins/handles/valueResolvers.ts` (the one handle ↔ live-object converter); reads return primitive records built inline via `handles/readRecords.ts`.
129
+
130
+ ### 3. JSDoc — keep it complete
131
+
132
+ All public methods and types **must** have JSDoc with:
133
+
134
+ - A brief description
135
+ - `@param` for each parameter (with type and description)
136
+ - `@returns` description
137
+ - `@example` where helpful (especially for entity/tools APIs)
138
+
139
+ JSDoc in this package is the source of truth for the API docs site.
140
+
141
+ ### 4. API documentation — `apps/snaptrudereact/api-docs/`
142
+
143
+ > See [`apps/snaptrudereact/api-docs/AGENTS.md`](../../apps/snaptrudereact/api-docs/AGENTS.md) for the full source-to-doc mapping and sync procedure.
144
+
145
+ In summary:
146
+
147
+ - **Changed method**: Update the corresponding `.md` doc page to match the new JSDoc
148
+ - **New API module**: Create a new doc page following the template in `AGENTS.md`, and add it to `.vitepress/sidebar.mts`
149
+ - **Removed API module**: Delete the doc page and remove from sidebar
150
+
151
+ ### 5. Console tests — `apps/snaptrudereact/src/app/plugins/apiConsoleTesting/`
152
+
153
+ > See [`apps/snaptrudereact/src/app/plugins/AGENTS.md`](../../apps/snaptrudereact/src/app/plugins/AGENTS.md) for test harness details.
154
+
155
+ These are in-browser integration tests that exercise the plugin API end-to-end.
156
+
157
+ | plugin-core API module | Test file |
158
+ | ------------------------------------------------- | ---------------------------- |
159
+ | `core/math/*` | `tests/math.ts` |
160
+ | `core/geom/*` (curve/arc/profile/contour) | `tests/geom.ts` |
161
+ | `core/geom/query/*` (brep/face/edge/vertex topology) | `tests/geomTopology.ts` |
162
+ | `core/units/*` | `tests/units.ts` |
163
+ | `core/history/*` | `tests/history.ts` |
164
+ | `core/zoom/*` | `tests/zoom.ts` |
165
+ | `core/project/*` | `tests/project.ts` |
166
+ | `core/comment/*` | `tests/comment.ts` |
167
+ | `design/boolean/*` | `tests/designBoolean.ts` |
168
+ | `design/create/*` | `tests/designCreate.ts` |
169
+ | `design/query/*` | `tests/designQuery.ts` |
170
+ | `design/selection/*` | `tests/designSelection.ts` |
171
+ | `design/lock.ts` | `tests/designLock.ts` |
172
+ | `design/delete/*` | `tests/delete.ts` |
173
+ | `design/erase/*` | `tests/erase.ts` |
174
+ | `design/doors/*` | `tests/doors.ts` |
175
+ | `design/windows/*` | `tests/windows.ts` |
176
+ | `design/furniture/*` | `tests/furniture.ts` |
177
+ | `design/materials/*` | `tests/materials.ts` |
178
+ | `entity/space.ts` | `tests/spaces.ts` |
179
+ | `entity/story.ts` | `tests/story.ts` |
180
+ | `entity/referenceLine.ts` | `tests/referenceLines.ts` |
181
+ | `entity/department.ts` | `tests/departments.ts` |
182
+ | `entity/buildableEnvelope.ts` | `tests/buildableEnvelope.ts` |
183
+ | `program/metadata.ts` | `tests/programMetadata.ts` |
184
+ | `program/labels.ts` | `tests/programLabels.ts` |
185
+ | `program/spreadsheet.ts` (custom sheets) | `tests/spreadsheetCustomSheets.ts` |
186
+ | `core/tags.ts` (`listForComponents`) | `tests/tagsBulk.ts` |
187
+ | `tools/selection.ts` | `tests/selection.ts` |
188
+ | `tools/transform.ts` | `tests/transform.ts` |
189
+ | `tools/copy.ts` | `tests/copy.ts` |
190
+ | `tools/offset.ts` | `tests/offset.ts` |
191
+
192
+ - **New method**: Add test cases covering the new method
193
+ - **Removed method**: Remove corresponding tests
194
+ - **Signature change**: Update test calls to match new signature
195
+ - **New API module**: Create a new test file under `tests/` and import it in `tests/index.ts`
196
+
197
+ ### 6. Host-side Jest unit tests
198
+
199
+ Some host implementations have co-located `.test.ts` files:
200
+
201
+ - `api/core/math/vec3.test.ts`, `quat.test.ts`
202
+
203
+ If your change affects pure math logic, update the corresponding Jest tests.
204
+
205
+ ### 7. Downstream consumers (breaking changes only)
206
+
207
+ If your change is **breaking** (removed method, renamed method, changed required args),
208
+ check **all** consumers of `@snaptrude/plugin-client` or `@snaptrude/plugin-core`:
209
+
210
+ - Internal plugins under `plugins/`
211
+ - Example plugins under `examples/` — these are consumer-facing templates used by
212
+ `create-snaptrude-plugin`, so they must compile and demonstrate correct API usage
213
+
214
+ Search these directories for usage of the changed API and update accordingly.
215
+
216
+ ## Adding a new API namespace (end-to-end)
217
+
218
+ When adding an entirely new namespace (e.g. `snaptrude.materials`):
219
+
220
+ 1. **plugin-core**: Create abstract class + Zod schemas + types in `src/api/<namespace>/`
221
+ 2. **plugin-core**: Export from `src/api/index.ts` and add as property on `PluginApi`
222
+ 3. **plugin-core**: Verify `host-utils.ts` types auto-infer the new methods (they should via `ExtractMethodPaths`)
223
+ 4. **plugin-client**: Only if it's a new **top-level** namespace, add a
224
+ `createRpcNamespace<PluginXApi>("x")` property to `ClientPluginApi` in
225
+ `src/api/index.ts` (nested namespaces need no client change)
226
+ 5. **host**: Create host implementation in `apps/snaptrudereact/src/app/plugins/api/<namespace>/`
227
+ 6. **host**: Add to `SnaptrudePluginApi` class in `api/index.ts`
228
+ 7. **docs**: Create doc pages, update sidebar, follow [`apps/snaptrudereact/api-docs/AGENTS.md`](../../apps/snaptrudereact/api-docs/AGENTS.md) template
229
+ 8. **tests**: Add console test file + Jest tests for pure logic
230
+ 9. **examples**: Update example plugins if they should showcase the new namespace
231
+ 10. **build**: Run `pnpm check-types` in plugin-core, plugin-client, and snaptrudereact
package/CHANGELOG.md ADDED
@@ -0,0 +1,341 @@
1
+ # @snaptrude/plugin-core
2
+
3
+ ## 0.0.0-bimsvg-20260928124803
4
+
5
+ ### Minor Changes
6
+
7
+ - 95fbff4: Add first-class drawing contracts, reusable view presets, drawing placement on sheets, and drawing-parented annotations.
8
+
9
+ ## 0.9.13
10
+
11
+ ### Patch Changes
12
+
13
+ - 6c85137: design.family: add `delete({ id, instances? })` — archives the library row; `instances: true` also deletes this project's placed instances undoably. `create` result gains `placed` and `hint`.
14
+
15
+ ## 0.9.12
16
+
17
+ ### Patch Changes
18
+
19
+ - 6e4a055: added param comps
20
+ - 8e37e1f: `design.family`: `prepare` and `flex` warnings gain the `proportion` code — parts thinner than 0.5 mm, parts or a family larger than 50 m, a family smaller than 10 mm, each naming the parts — and `flex` now returns `warnings`.
21
+ - 2a06dd9: `design.family`: `prepare`, `flex` and `getParameters` accept a `snapshot` option and return a `snapshot` block — an isolated offscreen picture of the family (iso, front, right, top tiles with a dimension line) as a PNG data URL, so an agent can look at what it built before reporting.
22
+
23
+ ## 0.9.11
24
+
25
+ ### Patch Changes
26
+
27
+ - 7fd374e: Add `hinge` to `design.create.door` / `window` (in `options`), `doors[]` / `windows[]` items and `opening`: a world point near the jamb the leaf is hinged on; the placed item is reflected along the wall when the catalog item's authored hinge side would land on the other jamb — one undo entry, no extra command.
28
+
29
+ **BEHAVIOUR FIX — `facing`.** The host placed the swing on the side OPPOSITE the `facing` point (the interactive tool's cursor convention) while the contract said "the room it opens into". The host now matches the contract: the leaf swings open toward `facing`. Callers that passed a point on the room side get the documented result; nothing in the contract changed shape.
30
+
31
+ `design.doors.getSwingDirection` is now derived from the placed mesh's orientation (hand as seen standing on the swing side facing the door); it previously read a scaling sign that placement never sets and reported `"left"` for every door. `mirror` axis docs now say what each axis does to a door (`'x'` swing side, `'z'` hinged jamb, `'y'` upside down); behaviour unchanged.
32
+
33
+ - e325bee: Add the structural-grids API surface: queries, creators, a sparse patch updater, structural line edits, and generic-family acceptance.
34
+ - **Query** — `design.query.listGrids(filter?)` (standard `PluginEntityFilter`; `"grid"` joins `PluginEntityType`, so `listByType("grid")` works) and the field-projected `design.query.grids.get(gridId, properties[])`: `angle` (degrees, CCW about +Y), `props`, `storeyVisibility`, `wings` (per-wing spacing/tagStart/span and per-line world-space `CurveHandle`, tag, visibility, effective + override props), `bounds`. Unknown ids throw `HANDLE_INVALID`.
35
+ - **Create** — `design.create.grid(linesX, linesY, spacingX, spacingY, options?)` (free 2-wing grid; optional `angle` in degrees and `center`, which defaults to the native viewport-centre behavior), `design.create.gridFromCurve(curve, options?)` (one wing/one line — line or arc), `design.create.gridsFromMasses(masses, spacingX, spacingY, options?)` (fitted, one group per footprint cluster, lenient skipping, ONE undo unit), and `design.create.columnsFromGrids(grids, width, depth)` (columns at every line intersection, ONE undo unit).
36
+ - **Update** — `design.update.grid(grid, patch)`: GROUP-LEVEL sparse patch — `props` (default styling), absolute `angle` in degrees, and `storeyVisibility`; each changed field commits its own undoable command through the panel's setters.
37
+ - **Grids family** — `design.grids.updateWings(grid, wings[])` (per-wing `spacing`/`count`/`spanMin`/`spanMax`; a `count` change re-indexes lines — re-query) and `design.grids.updateLines(grid, lines[])` (per-line `tag`/`distanceToPrevious`|`distanceToNext` (mutually exclusive)/`props`/`visible: false` (hide-only, product parity — show the GROUP to restore all lines); hiding every remaining visible line hides the GROUP instead — native last-line rule); plus `design.grids.addLine(grid, wing, position)` and `design.grids.removeLines(grid, lines, tagPolicy?)` (`"rewrite"` default | `"preserve"`; removing the group's last line throws `OPERATION_FAILED` — delete the group instead). Every update routes through the exact setters the native panel uses — one undoable command per changed field, identical to panel edits.
38
+ - **Generic families** — grid groups are accepted by `design.transform.move`/`rotate`, `design.visibility.hide`/`show`, `design.lock`/`unlock`, `design.delete.entities`, and `design.selection`; `transform.align` and `transform.mirror` throw `OPERATION_FAILED` for grids.
39
+
40
+ Grid lines have no stable identity: every line-level operation addresses them positionally as `{ wing, line }` index pairs into the `wings` arrays returned by `grids.get`; structural edits re-index lines, so re-query after mutating.
41
+
42
+ ## 0.9.10
43
+
44
+ ### Patch Changes
45
+
46
+ - `core.mode.set("program")` now opens the Program tab (the same path as the top bar's Program button) instead of refusing with `PRECONDITION_FAILED`; it resolves once the tab has connected, and waits for the user to confirm the editor's pop-up modal when the browser blocks the window.
47
+ - `workspace.openProgramMode()` / `closeProgramMode()` — the Program-tab counterpart of `openPresentMode` / `closePresentMode`: open (awaiting the tab's connection) and close the paired Program window.
48
+
49
+ ## 0.9.9
50
+
51
+ ### Patch Changes
52
+
53
+ - Program-mode additions requested by the healthcare programming pilot (all additive; no signature changes):
54
+ - `program.metadata` — the Program Data sheet's custom columns and per-space values: `listHeaders`, `createHeader` (reuse-by-name), `get`, `list`, `update`, `updateMany`. Writes are undoable and work with the Program tab closed.
55
+ - `program.labels` — the program rows (space types) with targets: `list`, `get`, `create` (optionally `createSpaces`), `setTargetArea`, `setTargetCount`. Covers "target area of non-departments": a space inherits its label's target; departments keep `program.departments.setTargetArea`.
56
+ - `program.spreadsheet` — custom program sheets with a group-by hierarchy: `createCustomSheet`, `updateCustomSheet`, `getCustomSheet`, `listCustomSheets`, `listCustomSheetProperties`.
57
+ - `core.tags.listForComponents(componentIds?)` — every space's tags + colors in one round-trip.
58
+ - `program.departments` — `targetCount` on the department record and `setTargetCount(departmentId, targetCount)`, the count twin of `setTargetArea` (the engine stores both on the department, like on labels).
59
+
60
+ ## 0.9.7
61
+
62
+ ### Patch Changes
63
+
64
+ - 6e60c61: Add bulk `design.create` creators — `wallRuns`, `floors`, `doors`, `windows`, `furnitureItems`: one host round-trip and one undo entry per batch.
65
+
66
+ Singular creators, fixes shipped alongside (behaviour changes for existing callers):
67
+ - `floor`, `slab`, `roof`, `ceiling`, `column`, `beam`: contour holes are now cut (holed contours previously failed or lost their holes).
68
+ - `floor`: the `position` offset is applied before the creation snapshot, so it survives redo and reload and drives storey assignment.
69
+ - `furniture`: `options.label` is now also the readable label (`design.query.getLabel`); `createNewSourceMesh` can no longer skip recording a source this call brought in (the host owns source persistence, recorded exactly once across concurrent calls); refuses with `PRECONDITION_FAILED` (`engineCode: "TOOL_ACTIVE"`) while the interactive furniture tool is active. The same refusal applies to `core.io.import.model` furniture placement.
70
+ - `door`, `window`: published as one save document instead of five; undo granularity unchanged.
71
+
72
+ - 2f10e6b: Add `design.dimensions` — dimension lines (Measuring Tape): `create`, `list`, `get`, `delete`, `hide`, `show`, plus the new `DimensionHandle`.
73
+
74
+ ## 0.9.6
75
+
76
+ ### Patch Changes
77
+
78
+ - Add five APIs the plugin agent repeatedly reached for but that did not exist.
79
+ - `core.project.getInfo()` — project id, display name, unit type, storey count (scoped to the active building), active storey, and site location in one call. Closes a genuine capability gap: nothing previously returned the current project's identity.
80
+ - `core.storeys.getActive()` — `setActive` had no getter, unlike `core.buildings`, `core.layers` and `core.proposals`.
81
+ - `core.camera.getMode()` — `setMode` had no getter, while `getProjection`/`setProjection` on the same class were paired.
82
+ - `design.visibility.show(components)` — `hide` previously had only `showAll` as its inverse, so specific components could not be revealed.
83
+ - `design.furniture.listCatalogGroups()` — matches `design.doors` and `design.windows`, so all three catalog surfaces are named alike. `design.furniture.listCategories()` is deprecated but still supported.
84
+
85
+ ## 0.9.4
86
+
87
+ ### Patch Changes
88
+
89
+ - 0008010: `brepFromLoft` auto-matches section edge counts (deterministic vertex insertion) and auto-aligns seams for straight-edge sections; `brepFromSweep` accepts closed (ring) paths and gains an optional taper scale law (`startScale`/`endScale` or per-point `scales`).
90
+ - f54ea17: `brepFromLoft` gains `options` (`compatibility: "strict" | "auto"`, `seamAlignment: "authored" | "auto"` — strict+authored restores pre-0.9.4 lofting); `brepFromSweep` options gain `transition` (`"miter"` default, `"round"` on open paths, `{ bevel }` chamfered corners on open and closed paths); new pure read `core.geom.query.brep.getEdgeCurve` returns exact line/arc/circle edge curve data.
91
+
92
+ ## 0.9.3
93
+
94
+ ### Patch Changes
95
+
96
+ - 3584bde: Expose configured BIM creation and Site Analysis sheet APIs: `design.create.opening` (catalog door/window with width/height/sillHeight), staircase `dimensions` overrides (strict-validated, quarter-turn rotation), and `program.site.getSiteAnalysis`/`updateSiteAnalysis` with merge/append semantics. `PluginSiteAnalysisUpdateOptions` accepts `null` as "no options".
97
+
98
+ ## 0.9.2
99
+
100
+ ### Patch Changes
101
+
102
+ - 5b91c7b: OCC geometry batch: new `core.geom.create` brep constructors — `brepFromFillet`, `brepFromChamfer`, `brepFromOffset`, `brepFromShell`, `brepsFromSplit`, `brepFromSweep`, `brepFromRevolution`; `brepFromLoft` widened with optional `intermediateContours` (multi-section lofts); new `core.geom.query.brep.getDistance` (minimum distance between two solids with witness points).
103
+
104
+ ## 0.9.1
105
+
106
+ ### Patch Changes
107
+
108
+ - Plugin API 0.9.1 — strictly additive: the terrain mesh lane and the Present-mode styling/canvas lane. No signatures changed, no behavior of existing methods changed; deployed plugins are unaffected (`versionGate` compares major.minor only).
109
+ - **`core.io.terrain.replaceMesh(positions, indices, units?, options?)`** — replace the site terrain surface with a caller-supplied triangle mesh. World-space flat arrays (the `getTriangulatedMeshes` frame, so read-modify-write round-trips); `units: "meters"` converts on the way in. Validated before any engine call (finiteness, index bounds, degenerate topology, scene-bound extents, **500k vertex/triangle caps** — the surface's first explicit payload ceiling); a predominantly down-facing mesh is auto-flipped with a warning. Datum, geolocation, opacity, lock state and the elevation/satellite toggles survive; the map texture is re-projected best-effort; cut/fill history resets by contract. One undo step restores the prior surface exactly (buffers, UVs, submesh layout, cut/fill data, volumes). The replacement **persists with the project**: the mesh uploads to bucket storage and reload applies it instead of the heightmap build. The optional `options` mirrors the requester's contract: `coordinateSpace`, `expectedTerrain` (session optimistic check), `expectedModelRevision` (session terrain-mesh revision, returned as `modelRevision` in the result), `baseline: "make-replacement-original"`, `preserve` opt-outs (`datum`/`satellite`/`material` have real opt-out behavior; `geolocation: false` rejects — always preserved), and `clientMutationId` (session-scoped idempotent replay). For projects without terrain, compose `core.io.import.terrain` + `replaceMesh` (a separate `createFromMesh` was deliberately not added).
110
+ - **`presentation.placedViews` — per-instance styling** (`getStyles` / `updateStyles` / `resetStyles` / `updateFontStyles`): the Present sidebar's full per-category styling surface — 7 line dash styles, line color, dash-length multiplier, **cut vs projection line weights in mm** (plus tree/parking weights), fills (`department`/`texture`/`monochrome`/`tag:<tagCategoryId>`), per-category opacity, category hide (cascades to labels), view-style restyles (block/rounded/bubble with radius + inset), Topography map/building sub-controls, and Text-tab typography per label type (font family incl. Google Fonts, weight, italic, px size, visible label types). Writes are host-validated (typed VALIDATION with the supported-setting list), land as **one undo step per call**, re-render immediately, and fan out across an auto-diagram sheet's set. `getStyles` returns fully-resolved values plus each category's supported setting ids.
111
+ - **`presentation.placedViews` — labels** (`listLabels` / `moveLabel` / `setLabelHidden`): a placed view's generated labels (space names, departments, areas, dimensions) as addressable shapes — read text/category/position, reposition them, hide/show individually (independent of category-level hides).
112
+ - **`presentation.placedViews` — generic canvas shapes** (`listShapes` / `getShape` / `moveShape` / `resizeShape` / `deleteShapes` / `setOpacity` / `setMask`): every top-level Present-canvas shape — AI-generated outputs, placed diagram images, plugin shapes, annotations — addressable by id with an `origin` classification. Previously `aiInspiration.generate` and `diagrams.place` returned shape ids nothing could act on. `deleteShapes` is atomic (any rejected id deletes nothing), protects sheets (use `sheets.delete`) and user-drawn annotations, and closes the placed-view no-delete gap. `setOpacity` is the whole-shape slider; `setMask` toggles context-building masking on views.
113
+ - **`presentation.sheets.setMargin(sheetId, margin)`** — set a sheet's print margin to one of the canonical unit-agnostic presets `0 | 0.25 | 0.5 | 0.75 | 1` (displayed None / 1/4″ / 1/2″ / 3/4″ / 1″ on imperial projects, None / 5mm / 10mm / 15mm / 20mm on metric) — the sheet header's margin dropdown; one undo step. Sheet reads (`list`/`get`) now report `margin` (`null` when absent/unrecognized).
114
+ - **`presentation.placedViews.setRotation(shapeId, rotation)`** — set a placed view's **absolute** rotation in radians (tldraw convention) about its bounds center (the UI rotation handle's pivot); one undo step. Angles are canonicalized into `[0, 2π)`, so the round-trip with the record's `rotation` read is exact only in that range (`setRotation(-0.1)` reads back `2π − 0.1`). **3D placed views only** — 2D/site-plan views cannot rotate (the canvas reverts any rotation applied to them) and are refused with a typed `PRECONDITION_FAILED`. Joins the absolute-setter family (`setScale`/`setCrop`/`setOpacity`/`setMask`).
115
+ - **`presentation.placedViews.rotateShape(shapeId, rotation)`** — the same absolute center-pivot rotation for any top-level Present-canvas shape (AI outputs, diagram images, plugin shapes, annotations — placed views too); targets and refusals mirror `moveShape`. Same `[0, 2π)` canonicalization (exact round-trip only in that range), and a placed view passed here falls under the same 3D-only rule — 2D/site-plan views refuse with a typed `PRECONDITION_FAILED`.
116
+ - **`presentation.tables.place(sheetId, { rows }, options?)`** — new `tables` namespace: place plain string rows as a table shape on a sheet (the same shape the Present canvas creates when a Program-mode / Google Sheets / Excel table is pasted). Rows may be ragged, capped at 10000 cells total; `options.position` is sheet-local like `annotate.*` (default: the paste flow's viewport-center auto-placement); returns the created shape as a canvas-shape record; one undo step.
117
+ - **`presentation.slideshow`** (`start` / `stop` / `getState`) — new namespace: run the Present-mode slideshow programmatically. The slideshow plays **all** sheets in order; `start` options only pick the opening slide (`startIndex` wins over a single-entry `sheetIds`, clamped into range). Browsers grant fullscreen only on a user gesture, so a plugin-triggered `start` typically runs **non-fullscreen** (the rejection is caught). `start`/`stop` are write-gated; `getState` is a never-throw read (`running` + current `index`, `null` when not running). No `next`/`prev`/`goTo` — slide navigation stays with the user.
118
+ - **`workspace.openPresentMode()` / `closePresentMode()`** — open/close the Present-mode documentation editor. `openPresentMode` resolves only once the Present canvas has mounted (up to ~15s, then a typed `PRECONDITION_FAILED`), so follow-up `presentation.*` calls find Present mode open; both are idempotent and **write-gated** (a mode switch under the user's feet is approval-controlled by design). Overlaps `core.mode.set("present")`/`set("design")` but adds the mount-await + idempotency contract.
119
+ - **`presentation.diagrams.generateSite(options?)`** — run the site-diagram auto-generation (location / streetview / climate sheets from the map terrain) and return the created `sheetIds`. `options.types` selects a subset (default all three); generation is tracked per-proposal — already-generated types are **skipped, not duplicated** (mount-time-flow semantics; existing site-diagram sheets are never replaced), so `sheetIds` can be empty. Requires Present mode and a map terrain.
120
+ - **`presentation.annotate.text` typography** — the existing text args gain optional `fontFamily` (system family or any Google Font, loaded automatically — the Present text panel's loader), `fontWeight` (numeric string like `"400"`/`"700"`, `-italic` suffix allowed; unavailable weights fall back to regular), and `fontSizePx` (exact pixel size overriding the `size` preset — `size` alone keeps working). Existing calls are unaffected.
121
+ - **`program.site.listEdges()`** — read each site parcel's boundary edges with their **front / side / rear** classification: the exact resolution the buildable-envelope setback pills show on canvas (user per-edge overrides win over the tangent heuristic; `roleSource` says which applied), so a plugin picks up the user's edge tagging without asking them to set it up again. Per edge: canonical `edgeIndex` (the envelope `edgeOverrides` index space), endpoints and length in **world meters** (`lengthUnit: "m"` — unlike `listPolygons`' Snaptrude-unit footprints), and the **effective base setback** (per-edge exception, else the role value; `null` for parcels with no zoning envelope — those still classify by heuristic). Entries also report the linked `buildableEnvelopeId` and whether stale index-misaligned overrides were dropped. Never throws; `"street"` resolves to `front`.
122
+
123
+ ## 0.9.0
124
+
125
+ ### Minor Changes
126
+
127
+ - Plugin API 0.9.0 — namespace reorganization (deprecate-in-place, nothing breaks), the analysis wave, and the spreadsheet data lane.
128
+ - **Namespace map** — `entity.*` retired via aliases (storeys → `core.storeys`, reference lines / buildable envelopes → `design.*`), `core.zoom` → `core.camera`, `core.tags.getTagsForComponent` → `core.tags.listForComponent`, new `workspace.*` (projects/teams) and `core.mode` top-levels. Every deprecated path still works and delegates to its canonical implementation.
129
+ - **Analysis wave** — `analysis.weather.getSeries` (hourly EPW rows + station metadata + quality flags), `analysis.solar.sampleGrid` (per-point GPU-raytraced visibility/shade/SVF/irradiance), `analysis.daylight.compute` (LM-83 numeric ASE + sDA with full provenance — see the sDA entry below), `program.site.getWeather`/`getTimezone`, `.epw` import + project weather override via `core.io.import`.
130
+ - **sDA (LM-83 Spatial Daylight Autonomy)** — `analysis.daylight` now computes real sDA300/50% with dynamic blind operation (LM-83 2% rule, 5% diffuse closed-blind default) via Radiance. Runs including `"sDA"` are asynchronous: `compute` returns `{ status: "running", runId }` and the new `analysis.daylight.poll({ runId, cursor? })` fetches results; ASE-only runs stay synchronous and unchanged. New optional `optics` arg overrides surface optics per material (keyed by Snaptrude material name) or per category, over LM-83/convention defaults (wall 0.5 / ceiling 0.7 / floor 0.2 / furniture 0.5 / glazing Tvis 0.65 / context 0.2); glazing takes visible transmittance (Tvis), converted to Radiance transmissivity backend-side. Sensor records gain `da300Percent`/`sdaPass`, aggregates gain `sdaPercent`, results gain `runId`, and the ASE fields (`directSunHoursAtOrAbove1000Lux`/`aseFail`/`asePercent`) are now optional — present when ASE is requested.
131
+ - **Heatmaps** — named overlays (up to 16, `analysis.heatmaps.overlays.*`), `renderField` arbitrary cell geometry, `renderSurfaceGrid` façade grids, discrete/threshold/categorical scales, hover tooltips.
132
+ - **Geometry reads** — `design.query.geometry.getTriangulatedMeshes` (world-space triangles, optional per-triangle `materialIds` and B-rep `faceIds`), `design.query.spaces.getEnclosure` (geometric v1).
133
+ - **Spreadsheet data lane** — `program.spreadsheet.datasets.{set, list}` (plugin datasets, upsert + auto-refresh of bound ranges), binding `source` widened to `{ dataset: "takeoff" } | { dataset: "plugin", name }` (takeoff unchanged), `addImage` (data-URI floating pictures, stable-name replace-on-rerun), `addChart` accepts the ratified `"column"`/`"bar"` enum on the wire.
134
+ - **Presentation** — `presentation.shapes` keyed shape lifecycle on Present sheets (`upsert`/`remove`/`removeAll`/`list`).
135
+ - **Constructive geometry (brep kernel)** — the full `core.geom.create.brepFrom*` constructor family minting `BrepHandle`s at authored coordinates: `brepFromFaces` (plain face-point loops; host validates welding, planarity, edge coherence and fixes global orientation), `brepFromExtrusion` (prisms along any direction, holes + arc profiles), `brepFromLoft` (tapered solids between two contours; lofts producing non-planar side faces are rejected), `brepFromMesh` (indexed vertex + face-index input), and the OpenCascade booleans `brepFromUnion` / `brepFromSubtraction` (`a` minus `b`) / `brepFromIntersection` (scene-derived `getBrep` handles accepted as read-only inputs; empty/disjoint results throw typed VALIDATION).
136
+ - **`design.create.massFromBrep(brep, label?)`** — commit a mass from any `core.geom.create` brep constructor's handle (scene-derived breps stay read-only): generic mass at authored coordinates, single undo step, collab-synced.
137
+ - **`presentation.placedViews`** — layout control over placed views (`list`/`get`/`move`/`scale`/`setScale`/`setCrop`): sheet-local position, size, architectural scale, rotation, crop and link state; uniform corner-drag-equivalent `scale`, Scale-dropdown `setScale` (2D only), native crop fractions with page-anchored visible region — crop survives `sheets.updatePlacedView` refreshes.
138
+
139
+ ## 0.8.0
140
+
141
+ ### Minor Changes
142
+
143
+ - More additions to the APIs, infra changes.
144
+ - Plugin API 0.8.0 — the 0.8 API wave, handle lifecycle, events, and geometry/data-integrity fixes.
145
+ - **The 0.8 API wave** — model/presentation **export** (`core.io.export`, `presentation.export`), **element editing** widenings on `design.update`/`design.edit`, **`core.camera.*`**, **storey management**, **`design.visibility.*`**, **dimensions**, **locale/user** reads (`core.user`), `design.types.list`, presentation annotate, plus completeness widenings across existing families. The discovery manifest grows from 423 to 595 method paths (including the new `core.handles.*` lifecycle below).
146
+ - **Events** — `model:changed` subscription contract: debounced model-change notifications delivered to the plugin worker for user and plugin edits alike (client API: `PluginWorker.subscribe`). `selection:changed`, `tool:activated`, `project:saved`, `view:changed` are reserved names, not yet emitted.
147
+ - **BREAKING — `program.site` footprints are world Snaptrude units.** Previously the only plan-geometry read scaled to scene metres (×0.254), so site parcels could not be overlaid on `planPoints`. Now the same world XZ plan space as every other plan read; areas and the geographic reads are unchanged.
148
+ - **BREAKING — real beam/column geometry.** `design.create.beam` with a horizontal direction (the documented canonical call) used to build a zero-height flat sheet; it now builds a true beam with tool-parity semantics (section X extent = width, Z extent = depth, body hangs below the authoring plane by its depth). `design.create.column` builds exactly the requested height (the silent slab-thickness deduction is gone). Degenerate extrusions (zero/diagonal/in-plane directions, zero height) throw VALIDATION errors instead of silently building corrupt solids; directions are normalized.
149
+ - **Data integrity** — `design.query.list*` no longer returns engine-internal shells (originals parked by instance copies, disposed phantoms), so one copy no longer doubles `listSpaces`/schedules; `design.delete.entities` orders instance copies before their source meshes so mixed batches cannot fail midway; `design.update.wall` documents that rebuilds replace the wall — re-bind from `affected[0]`.
150
+ - **Handle lifecycle (`core.handles.*`) + GC-backed `Handle` objects** — `Handle` is now a class wrapping the wire id (public type names unchanged): `handle.id`, `toString()` stays the bare id, `equals()` compares by id, and `toJSON()` emits the `{__h: id}` wire tag — `JSON.stringify` output containing handles changes shape. New namespace: `core.handles.release(handles[])` (batched, arena-agnostic, silent no-op on unknown/released ids), `core.handles.releaseAll(kind?)`, mint-recording scopes `beginScope()` / `endScope(scope, retain?)` (token-addressed, retain promotes to the enclosing scope), and `core.handles.stats()`. The client runs a FinalizationRegistry-backed auto-release queue, so unreferenced handles are reclaimed host-side without explicit code. `core.geom.delete.profile/contour` are retained as deprecated aliases of `core.handles.release`. Entity-style kinds (component/material/underlay/terrain/importJob) remain branded strings.
151
+
152
+ ## 0.7.1
153
+
154
+ ### Patch Changes
155
+
156
+ - 8f22cb7: Expand `presentation.aiInspiration` to the full AI Inspiration surface (18 methods) and make it a required member of `PluginPresentationApi` now that the host implementation lands.
157
+ - New methods: `getModelCapabilities`, `getSelection`, `getPresetCatalog`, `getJob`, `cancelJob`, `listJobs`, `getWorkflowForShape`, `getSelectedBranchRerunPlan`, `rerunSelectedBranch`, `extractRecipeFromShape`, `listRecipes`, `saveRecipe`, `deleteRecipe`, `runRecipe` (plus job/workflow/recipe Zod schemas).
158
+ - `generate`/`refine` (and `rerunSelectedBranch`/`runRecipe`) accept `runMode: "blocking" | "job"`; `PluginAIInspirationRunResult` is accordingly loosened to `{ jobId?, output?, outputs?, metadata? }` — job-mode calls resolve with a `jobId` instead of outputs.
159
+
160
+ ## 0.7.0
161
+
162
+ ### Minor Changes
163
+
164
+ - e1915e4: Plugin API 0.7.0 — new families and methods (supersedes the cancelled `design.update.setLabel` 0.6.1 patch, now folded in).
165
+ - **`core.proposals.*`** — design options as infrastructure: `list` / `get` / `getActive` / `listForComponent` / `isActive` (reads) plus `create` / `rename` / `setActive` / `delete` (non-undoable writes).
166
+ - **`program.layout.*`** — the space-solver promoted to a real async-job family: `arrange` / `pack` now start a backend job and return immediately, with `getState` (poll) and `cancel`.
167
+ - **Door & window catalogs + placement** — `design.doors.*` / `design.windows.*` gain `listCatalogGroups` / `listCatalog` / `getCatalogItem` / `exists` (shared catalog DTOs), and `design.create.door` / `design.create.window` place a catalog item into a host wall.
168
+ - **`design.create.smartLayout`** — clone an in-scene template cluster into one or more target spaces in a single undo batch.
169
+ - **Furniture categories** — `design.furniture.listCategories` plus a `category` filter on `listCatalog`, and `thumbnailUrl` on catalog items.
170
+ - **`design.transform.align`** — snap components' bounding-box edges (left/right/center/top/bottom/middle), optionally to a reference.
171
+ - **Per-face materials** — `design.materials.applyToFaces` / `resetFaces` / `getByFace` / `listByFace` (BREP faces by durable index, visual-only).
172
+ - **Staircase params** — `design.query.getStaircaseParams` (read) and `design.update.staircase` (sparse parametric write).
173
+ - **Footprint-area lock** — `design.lockArea` / `unlockArea` / `isAreaLocked` / `listAreaLocked` for Room/Department spaces.
174
+ - **`entity.story.duplicate`** — duplicate a storey (or a subset) up/down, auto-creating the target storey.
175
+ - **`presentation.import.svg`** — import a guaranteed-vector SVG onto the Present sheet.
176
+ - **View display settings** — `presentation.views.getSettings` / `updateSettings` (background, color mode, axis, edges, labels).
177
+ - **`design.update.setLabel`** — set any component's panel Label (write pair of `design.query.getLabel`); undoable, lock-aware, validated.
178
+ - **`program.areas`** — area members now report their `areaClass` (`NET` / `GROSS` / `EXCLUDED`), with net/gross documented as the plain-English synonyms for carpet/built-up.
179
+ - **Typed plugin API errors** — every host failure now crosses the wire as a structured envelope instead of a flattened `Execution error: <msg>` string: a stable `code` from the shared plugin-core error registry, the offending handle, an authored `hint`, and `retryAfterMs` / `didYouMean` enrichment where applicable. Zod validation failures forward the first 10 issues, each projected to `{path, code, message}` (full count in `details.issueCount`); internal faults are sanitized and host-logged under an `errorId`. Every handler across the API surface now throws typed codes, each doc page gained an Errors section, and a drift test pins thrown code literals to the registry.
180
+
181
+ ## 0.6.0
182
+
183
+ ### Minor Changes
184
+
185
+ - 934405e: New `analysis.heatmaps` family — render plugin-computed scalar data as a
186
+ heatmap: `renderSpaces` (flat colour per space top face), `renderGrid`
187
+ (coloured grid mesh from world-coordinate samples), `reset`, `isActive`.
188
+ Single active heatmap (a render replaces the previous one); values outside
189
+ `[min, max]` clamp to the end colours; ephemeral (auto-cleared on
190
+ scene-mutating edits, never persisted). The react host has landed, so all
191
+ members are required `abstract` and in the discovery manifest.
192
+ - a68e866: New top-level `analysis` namespace:
193
+ `analysis.sunpath` (enable/disable/isActive), `analysis.shadows`
194
+ (enable/disable/isEnabled/setDateTime/getDateTime — ISO date-time strings),
195
+ and the async heatmap job families `analysis.sunlightHours` and
196
+ `analysis.illuminance` (compute/get/cancel/reset; illuminance is Pro-gated).
197
+ Also extends `program.site` with `getLocation()` and `getNorthAngle()` geo
198
+ reads. The react host has landed, so all new members are required `abstract`
199
+ and in the discovery manifest; the plugin-client mounts the `analysis` RPC
200
+ namespace.
201
+ - New `core.io` namespace — file import, import jobs, and underlay/terrain
202
+ management:
203
+ - `core.io.import` — bring external files onto a storey: `image`, `pdf`
204
+ (page-selectable), `dwg`, `cadJson` (parsed CAD geometry as a sketch),
205
+ `model` (3D formats), and `terrain` (map snapshot at a lat/lng with
206
+ optional elevation). Slow formats return an `ImportJobHandle` instead of
207
+ blocking.
208
+ - `core.io.job` — poll those imports: `getStatus`, `isComplete`, `getResult`,
209
+ `getError`.
210
+ - `core.io.query` — pre-import inspection: `getPdfPageCount`,
211
+ `listCadLayers`.
212
+ - `core.io.underlay` — manage imported image/PDF/CAD underlays: `list`,
213
+ `getBounds`, `getScale`/`setScale`/`resetScale`, `getOpacity`/`setOpacity`,
214
+ `delete`.
215
+ - `core.io.terrain` — manage the imported map terrain: `exists`, `get`,
216
+ `getDatum` (current vertical position, world Y) / `setDatum` (relative
217
+ datum shift, not an absolute elevation), `delete`, `getReport`, elevation and satellite-imagery toggles
218
+ (`isElevationEnabled`/`enableElevation`/`disableElevation`,
219
+ `isSatelliteEnabled`/`enableSatellite`/`disableSatellite`), and
220
+ `getOpacity`/`setOpacity`.
221
+
222
+ - New `design.selection.setByFilter(filter)` — the programmatic equivalent of
223
+ the editor's **Story selection** and **Filter selection** menus. Replaces the
224
+ selection with every visible entity of the active building matching
225
+ `{ storeys?: number[], types?: PluginSelectionEntityType[] }` (fields AND,
226
+ values within a field OR; at least one field required — use `clear()` to
227
+ deselect). The new `PluginSelectionEntityType` vocabulary covers all 24 menu
228
+ kinds, including selection-only kinds the query surface can't reach (sites,
229
+ terrain, CAD/PDF/image imports, dimension lines, 3D models, neighborhood
230
+ buildings, program blocks). One-shot bulk select, not a persistent mode; not
231
+ undoable, like the other selection mutators.
232
+
233
+ ## 0.5.0
234
+
235
+ ### Minor Changes
236
+
237
+ - 7750aa3: Exposed more snaptrude APIs
238
+
239
+ ## 0.4.0
240
+
241
+ The Plugin API expose initiative. Pre-1.0, breaking changes ship as minor
242
+ version bumps.
243
+
244
+ ### Minor Changes
245
+
246
+ - **Breaking — positional arguments.** Every API method now takes positional
247
+ parameters, options-last (required first, then one optional `options`
248
+ object), replacing the single-args-object transport. Migrate by unwrapping
249
+ the object into positional args — `foo({ a, b, t })` → `foo(a, b, t)`. E.g.
250
+ `vec3.lerp(a, b, 0.5)`, `departments.assign(departmentId, spaceIds)`,
251
+ `design.query.spaces.get(space, ["area", "position"])`.
252
+ - **Breaking — handle-based boundary.** Only JS primitives and enum strings
253
+ cross the plugin ↔ host boundary by value. Every structured type (vector,
254
+ curve, profile, BREP topology, scene entity) is now an opaque, kind-tagged
255
+ string handle; scene-entity references use `ComponentHandle`. Migrate by
256
+ minting a handle instead of passing a raw object (`vec3.new(x, y, z)`, then
257
+ pass the handle) and reading values back with a query call
258
+ (`vec3.components(h)` → `{ x, y, z }`) — reads return primitive records,
259
+ never handles.
260
+ - **New namespaces.** Reorganized the surface into `core`, `design`, `entity`,
261
+ `program`, and `presentation`:
262
+ - `core`: `math` (`vec3`/`quat`), the `geom` geometry kernel, `history`
263
+ (undo/redo), `units`, `zoom`, `project`, `comment`, and the
264
+ `groups`/`buildings`/`layers`/`tags` organization families.
265
+ - `design`: `create`, `query` (+ `geom` query), `selection`, `doors`,
266
+ `windows`, `furniture`, `materials`, `boolean`, `erase`, `delete`,
267
+ `transform`, `edit`, `update`, plus top-level `lock`/`unlock`/`isLocked`/
268
+ `listLocked` verbs.
269
+ - `entity`: `story`, `referenceLine`, `buildableEnvelope`.
270
+ - `program`: `areas`, `departments`, `metrics`, `site`, `cores`,
271
+ `classification`, `adjacency`, and the `spreadsheet` reporting family.
272
+ - `presentation`: `views`, `sheets`, `diagrams`, `import`.
273
+ - Removed the legacy `entity.space.*` methods from the contract and
274
+ consolidated departments under `program.departments`. The selective space
275
+ property read is now `design.query.spaces.get`, and space adjacency is read
276
+ as an entity property via `design.query.getProperties().adjacency`. (The
277
+ host keeps a deprecated `entity.space.get` shim, but it is no longer part of
278
+ the published contract surface.)
279
+ - Added the `overlaps` entity filter to `design.query` list methods — matches
280
+ entities whose plan footprint has non-zero intersection area with a given
281
+ space's bottom-face footprint (fully-inside, boundary-nested, and overhanging
282
+ all match; edge-touching does not; holes respected). Hidden entities are
283
+ excluded unless `isHidden` is passed explicitly.
284
+ - Removed the never-shipped `computeAdjacencyMatrix`; renamed
285
+ `buildings.duplicate` → `buildings.copy`; folded `tags.createAndAssign` into
286
+ `tags.assign` (resolve-or-create, one atomic undo).
287
+
288
+ ## 0.2.8
289
+
290
+ ### Patch Changes
291
+
292
+ - 445e0b8: Add Present-mode AI Inspiration plugin APIs under `snaptrude.documentation.aiInspiration`.
293
+
294
+ ## 0.2.7
295
+
296
+ ### Patch Changes
297
+
298
+ - c5afd9a: added adjacecny
299
+
300
+ ## 0.2.6
301
+
302
+ ### Patch Changes
303
+
304
+ - c17d287: Add bulk space APIs: `space.bulkCreate`, `space.bulkUpdate`, and `space.bulkDelete`. Each batches its work into a single undo/redo step. All items are validated up front and the call throws if any item is invalid (nothing is applied), consistent with the single-item space methods. `bulkCreate` supports `spaceType`/`massType`/`departmentId` per item and returns `{ spaceIds }`; `bulkUpdate` takes geometry (`profile`+`extrudeHeight`) and/or nested `properties` per item and returns `{ spaces }` (one echoed result per item, like `update`); `bulkDelete` returns `{ deletedSpaceIds }`.
305
+ - 0683194: bulk apis
306
+
307
+ ## 0.2.5
308
+
309
+ ### Patch Changes
310
+
311
+ - Restore declaration files in published plugin packages.
312
+
313
+ ## 0.2.4
314
+
315
+ ### Patch Changes
316
+
317
+ - Add inner profile hole support to space creation from profiles.
318
+
319
+ ## 0.2.3
320
+
321
+ ### Patch Changes
322
+
323
+ - 647466b: fixed merge issues
324
+
325
+ ## 0.2.2
326
+
327
+ ### Patch Changes
328
+
329
+ - 064777a: buildable envelope apis
330
+
331
+ ## 0.2.1
332
+
333
+ ### Patch Changes
334
+
335
+ - 3b37f4a: added buildable envelop api
336
+
337
+ ## 0.2.0
338
+
339
+ ### Minor Changes
340
+
341
+ - 4d959a4: Exposed new offset and copy APIs for tools
package/CLAUDE.md ADDED
@@ -0,0 +1,11 @@
1
+ # CLAUDE.md
2
+
3
+ > **All coding standards, checks, and guidance live in [`AGENTS.md`](AGENTS.md).**
4
+ > `CLAUDE.md` is a pointer only — add all new rules, patterns, and instructions to `AGENTS.md`.
5
+
6
+ See [AGENTS.md](AGENTS.md) for:
7
+
8
+ - What this package contains and quick commands
9
+ - **Change propagation checklist** — the mandatory downstream sync steps for any API change
10
+ - File mappings to plugin-client, host implementation, docs, and tests
11
+ - End-to-end guide for adding a new API namespace