measur-tools-suite 1.2.2-beta.0 → 1.2.2-beta.2

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 (201) hide show
  1. package/README.md +9 -5
  2. package/package.json +1 -1
  3. package/ts_def/ts_def_modules/processCooling/chillers.d.ts +16 -8
  4. package/ts_def/ts_def_modules/steamModeler/ssmt.d.ts +9 -4
  5. package/ts_def/ts_def_modules/wasteWater/wasteWater.d.ts +6 -3
  6. package/.agents/README.md +0 -51
  7. package/.agents/handoffs/compressed-air-compressor-assessment-refactor.md +0 -70
  8. package/.agents/handoffs/compressed_air_capacity_velocity_pipe_data.md +0 -199
  9. package/.agents/personas/algorithm-docs-author.md +0 -30
  10. package/.agents/personas/cpp-namespace-refactorer.md +0 -30
  11. package/.agents/personas/refactor-planner.md +0 -29
  12. package/.agents/personas/verification-reviewer.md +0 -30
  13. package/.agents/personas/wasm-ts-steward.md +0 -33
  14. package/.agents/templates/refactor-handoff.md +0 -58
  15. package/.clang-format +0 -411
  16. package/.claude/CLAUDE.md +0 -18
  17. package/.claude/projects/-Users-txr-dev-MEASUR-Tools-Suite/memory/MEMORY.md +0 -3
  18. package/.claude/projects/-Users-txr-dev-MEASUR-Tools-Suite/memory/project_compressedair_refactor.md +0 -27
  19. package/AGENTS.md +0 -137
  20. package/ARCHITECTURE.md +0 -149
  21. package/BUILD.md +0 -491
  22. package/CONTRIBUTING.md +0 -19
  23. package/DoxygenLayout.xml +0 -269
  24. package/bin/README.md +0 -140
  25. package/bin/client.d.ts +0 -212
  26. package/bin/package.json +0 -40
  27. package/bin/ts_def_modules/binding/registered_vectors.d.ts +0 -185
  28. package/bin/ts_def_modules/compressedAir/air_system_capacity.d.ts +0 -48
  29. package/bin/ts_def_modules/compressedAir/air_velocity.d.ts +0 -30
  30. package/bin/ts_def_modules/compressedAir/assessment/centrifugal_compressor.d.ts +0 -164
  31. package/bin/ts_def_modules/compressedAir/assessment/compressor.d.ts +0 -81
  32. package/bin/ts_def_modules/compressedAir/assessment/compressor_catalog.d.ts +0 -57
  33. package/bin/ts_def_modules/compressedAir/assessment/compressor_eem.d.ts +0 -157
  34. package/bin/ts_def_modules/compressedAir/assessment/load_unload_compressor.d.ts +0 -246
  35. package/bin/ts_def_modules/compressedAir/assessment/modulation_without_unload_compressor.d.ts +0 -87
  36. package/bin/ts_def_modules/compressedAir/assessment/start_stop_compressor.d.ts +0 -73
  37. package/bin/ts_def_modules/compressedAir/assessment/vfd_compressor.d.ts +0 -44
  38. package/bin/ts_def_modules/compressedAir/compressedAir.d.ts +0 -11
  39. package/bin/ts_def_modules/compressedAir/compressed_air_utils.d.ts +0 -23
  40. package/bin/ts_def_modules/compressedAir/dryer_operating_cost.d.ts +0 -260
  41. package/bin/ts_def_modules/compressedAir/leak_survey/bag_method.d.ts +0 -48
  42. package/bin/ts_def_modules/compressedAir/leak_survey/compressed_air_leak_survey.d.ts +0 -109
  43. package/bin/ts_def_modules/compressedAir/leak_survey/decibels_method.d.ts +0 -76
  44. package/bin/ts_def_modules/compressedAir/leak_survey/estimate_method.d.ts +0 -42
  45. package/bin/ts_def_modules/compressedAir/leak_survey/orifice_method.d.ts +0 -75
  46. package/bin/ts_def_modules/compressedAir/operating_cost.d.ts +0 -66
  47. package/bin/ts_def_modules/compressedAir/pipe_data.d.ts +0 -107
  48. package/bin/ts_def_modules/compressedAir/pipe_sizing.d.ts +0 -51
  49. package/bin/ts_def_modules/compressedAir/pneumatic_air_requirement.d.ts +0 -86
  50. package/bin/ts_def_modules/compressedAir/pneumatic_valve.d.ts +0 -78
  51. package/bin/ts_def_modules/compressedAir/receiver_tank.d.ts +0 -209
  52. package/bin/ts_def_modules/databases/default_data.d.ts +0 -226
  53. package/bin/ts_def_modules/motorDriven/fans/fan.d.ts +0 -751
  54. package/bin/ts_def_modules/motorDriven/fans/fanEnum.d.ts +0 -68
  55. package/bin/ts_def_modules/motorDriven/fans/fan_affinity_laws.d.ts +0 -152
  56. package/bin/ts_def_modules/motorDriven/motor/motor.d.ts +0 -383
  57. package/bin/ts_def_modules/motorDriven/motor/motorEnum.d.ts +0 -49
  58. package/bin/ts_def_modules/motorDriven/pump/pump.d.ts +0 -304
  59. package/bin/ts_def_modules/motorDriven/pump/pump_valve_power_loss.d.ts +0 -75
  60. package/bin/ts_def_modules/motorDriven/pumpFan/pumpFan.d.ts +0 -164
  61. package/bin/ts_def_modules/other/chp.d.ts +0 -121
  62. package/bin/ts_def_modules/other/lighting_data.d.ts +0 -117
  63. package/bin/ts_def_modules/other/powerFactor.d.ts +0 -110
  64. package/bin/ts_def_modules/physics/gas_compositions.d.ts +0 -81
  65. package/bin/ts_def_modules/processCooling/chillers.d.ts +0 -365
  66. package/bin/ts_def_modules/processCooling/process_cooling.d.ts +0 -511
  67. package/bin/ts_def_modules/processHeat/air_heating_using_exhaust.d.ts +0 -98
  68. package/bin/ts_def_modules/processHeat/cascade_heat_high_to_low.d.ts +0 -102
  69. package/bin/ts_def_modules/processHeat/energy_equivalency.d.ts +0 -48
  70. package/bin/ts_def_modules/processHeat/flow_calculations_energy_use.d.ts +0 -54
  71. package/bin/ts_def_modules/processHeat/losses/atmosphere_heat_loss.d.ts +0 -28
  72. package/bin/ts_def_modules/processHeat/losses/auxiliary_power_used.d.ts +0 -32
  73. package/bin/ts_def_modules/processHeat/losses/energy_input_electric_arc_furnace.d.ts +0 -50
  74. package/bin/ts_def_modules/processHeat/losses/energy_input_exhaust_gas_heat_loss.d.ts +0 -91
  75. package/bin/ts_def_modules/processHeat/losses/exhaust_gas_heat_loss_electric_arc_furnace.d.ts +0 -35
  76. package/bin/ts_def_modules/processHeat/losses/fixture_heat_loss.d.ts +0 -35
  77. package/bin/ts_def_modules/processHeat/losses/gas_cooling_heat_loss.d.ts +0 -35
  78. package/bin/ts_def_modules/processHeat/losses/gas_flue_gas_material.d.ts +0 -81
  79. package/bin/ts_def_modules/processHeat/losses/gas_load_charge_material_heat_required.d.ts +0 -45
  80. package/bin/ts_def_modules/processHeat/losses/leakage_heat_loss.d.ts +0 -39
  81. package/bin/ts_def_modules/processHeat/losses/liquid_cooling_heat_loss.d.ts +0 -35
  82. package/bin/ts_def_modules/processHeat/losses/liquid_load_charge_material_heat_required.d.ts +0 -50
  83. package/bin/ts_def_modules/processHeat/losses/load_charge_material.d.ts +0 -19
  84. package/bin/ts_def_modules/processHeat/losses/opening_heat_loss.d.ts +0 -84
  85. package/bin/ts_def_modules/processHeat/losses/slag_other_material_heat_loss.d.ts +0 -35
  86. package/bin/ts_def_modules/processHeat/losses/solid_liquid_flue_gas_material.d.ts +0 -152
  87. package/bin/ts_def_modules/processHeat/losses/solid_load_charge_material_heat_required.d.ts +0 -59
  88. package/bin/ts_def_modules/processHeat/losses/wall_heat_loss.d.ts +0 -77
  89. package/bin/ts_def_modules/processHeat/losses/water_cooling_heat_loss.d.ts +0 -31
  90. package/bin/ts_def_modules/processHeat/o2_enrichment.d.ts +0 -95
  91. package/bin/ts_def_modules/processHeat/water_heating_using_exhaust.d.ts +0 -56
  92. package/bin/ts_def_modules/steam/air_water_cooling_using_flue.d.ts +0 -78
  93. package/bin/ts_def_modules/steam/steam_leak_survey.d.ts +0 -227
  94. package/bin/ts_def_modules/steam/water_heating_using_flue.d.ts +0 -122
  95. package/bin/ts_def_modules/steam/water_heating_using_steam.d.ts +0 -83
  96. package/bin/ts_def_modules/steamModeler/ssmt.d.ts +0 -745
  97. package/bin/ts_def_modules/steamModeler/ssmtEnum.d.ts +0 -81
  98. package/bin/ts_def_modules/steamModeler/ssmtModeler.d.ts +0 -726
  99. package/bin/ts_def_modules/treasureHunt/compressed_air_pressure_reduction.d.ts +0 -74
  100. package/bin/ts_def_modules/treasureHunt/compressed_air_reduction.d.ts +0 -280
  101. package/bin/ts_def_modules/treasureHunt/electricity_reduction.d.ts +0 -273
  102. package/bin/ts_def_modules/treasureHunt/insulated_pipe_reduction.d.ts +0 -249
  103. package/bin/ts_def_modules/treasureHunt/insulated_tank_reduction.d.ts +0 -160
  104. package/bin/ts_def_modules/treasureHunt/natural_gas_reduction.d.ts +0 -296
  105. package/bin/ts_def_modules/treasureHunt/steam_reduction.d.ts +0 -231
  106. package/bin/ts_def_modules/treasureHunt/water_reduction.d.ts +0 -234
  107. package/bin/ts_def_modules/wasteWater/svi.d.ts +0 -123
  108. package/bin/ts_def_modules/wasteWater/wasteWater.d.ts +0 -351
  109. package/bin/ts_def_modules/water/waterAssessment.d.ts +0 -220
  110. package/build-wasm/CMakeCache.txt +0 -362
  111. package/build-wasm/Makefile +0 -7499
  112. package/build-wasm/bin/client.js +0 -2
  113. package/build-wasm/bin/client.wasm +0 -0
  114. package/build-wasm/bin/measur_tools_suite.js +0 -2
  115. package/build-wasm/bin/measur_tools_suite.wasm +0 -0
  116. package/build-wasm/cmake_install.cmake +0 -61
  117. package/contributing/.pages +0 -6
  118. package/contributing/conventional-commits.md +0 -96
  119. package/contributing/documentation.md +0 -410
  120. package/contributing/formatting.md +0 -55
  121. package/contributing/index.md +0 -24
  122. package/contributing/style-guide.md +0 -481
  123. package/docs/assets/app-icon.png +0 -0
  124. package/docs/assets/doxygen-ornl.css +0 -737
  125. package/docs/assets/opening-view-factor-diagram.png +0 -0
  126. package/docs/assets/water-heating-diagram.png +0 -0
  127. package/docs/dependencies/mathjax-config.js +0 -127
  128. package/docs/dependencies/siunitx.js +0 -1
  129. package/docs/dox-content/calculators/compressedAir/air_system_capacity_calculator.dox +0 -63
  130. package/docs/dox-content/calculators/compressedAir/air_velocity_calculator.dox +0 -45
  131. package/docs/dox-content/calculators/compressedAir/assessment/centrifugal_compressors.dox +0 -97
  132. package/docs/dox-content/calculators/compressedAir/assessment/compressor_catalog_units.dox +0 -43
  133. package/docs/dox-content/calculators/compressedAir/assessment/compressor_eem.dox +0 -117
  134. package/docs/dox-content/calculators/compressedAir/assessment/load_unload_cycle_model.dox +0 -112
  135. package/docs/dox-content/calculators/compressedAir/assessment/modulation_without_unload.dox +0 -48
  136. package/docs/dox-content/calculators/compressedAir/assessment/overview.dox +0 -125
  137. package/docs/dox-content/calculators/compressedAir/assessment/start_stop_compressor.dox +0 -41
  138. package/docs/dox-content/calculators/compressedAir/assessment/vfd_compressor.dox +0 -54
  139. package/docs/dox-content/calculators/compressedAir/leak_survey/bag_method_calculator.dox +0 -94
  140. package/docs/dox-content/calculators/compressedAir/leak_survey/compressed_air_leak_survey_calculator.dox +0 -244
  141. package/docs/dox-content/calculators/compressedAir/leak_survey/decibels_method_calculator.dox +0 -116
  142. package/docs/dox-content/calculators/compressedAir/leak_survey/estimate_method_calculator.dox +0 -53
  143. package/docs/dox-content/calculators/compressedAir/leak_survey/orifice_method_calculator.dox +0 -309
  144. package/docs/dox-content/calculators/compressedAir/operating_cost_calculator.dox +0 -146
  145. package/docs/dox-content/calculators/compressedAir/pipe_data.dox +0 -92
  146. package/docs/dox-content/calculators/compressedAir/pipe_sizing_calculator.dox +0 -95
  147. package/docs/dox-content/calculators/compressedAir/pneumatic_air_requirement_calculator.dox +0 -168
  148. package/docs/dox-content/calculators/compressedAir/pneumatic_valve_calculator.dox +0 -105
  149. package/docs/dox-content/calculators/compressedAir/receiver_tank_calculator.dox +0 -290
  150. package/docs/dox-content/calculators/processHeat/air_heating_using_exhaust_calculator.dox +0 -124
  151. package/docs/dox-content/calculators/processHeat/cascade_heat_high_to_low_calculator.dox +0 -129
  152. package/docs/dox-content/calculators/processHeat/energy_equivalency_calculator.dox +0 -56
  153. package/docs/dox-content/calculators/processHeat/flow_calculations_energy_use_calculator.dox +0 -214
  154. package/docs/dox-content/calculators/processHeat/losses/atmosphere_heat_loss_calculator.dox +0 -42
  155. package/docs/dox-content/calculators/processHeat/losses/auxiliary_power_used_calculator.dox +0 -40
  156. package/docs/dox-content/calculators/processHeat/losses/energy_input_electric_arc_furnace_calculator.dox +0 -60
  157. package/docs/dox-content/calculators/processHeat/losses/energy_input_exhaust_gas_heat_loss_calculator.dox +0 -172
  158. package/docs/dox-content/calculators/processHeat/losses/exhaust_gas_heat_loss_electric_arc_furnace_calculator.dox +0 -109
  159. package/docs/dox-content/calculators/processHeat/losses/fixture_heat_loss_calculator.dox +0 -40
  160. package/docs/dox-content/calculators/processHeat/losses/gas_cooling_heat_loss_calculator.dox +0 -39
  161. package/docs/dox-content/calculators/processHeat/losses/gas_flue_gas_calculator.dox +0 -300
  162. package/docs/dox-content/calculators/processHeat/losses/gas_load_charge_material_heat_required_calculator.dox +0 -85
  163. package/docs/dox-content/calculators/processHeat/losses/leakage_heat_loss_calculator.dox +0 -118
  164. package/docs/dox-content/calculators/processHeat/losses/liquid_cooling_heat_loss_calculator.dox +0 -41
  165. package/docs/dox-content/calculators/processHeat/losses/liquid_load_charge_material_heat_required_calculator.dox +0 -99
  166. package/docs/dox-content/calculators/processHeat/losses/opening_heat_loss_calculator.dox +0 -151
  167. package/docs/dox-content/calculators/processHeat/losses/slag_other_material_heat_loss_calculator.dox +0 -38
  168. package/docs/dox-content/calculators/processHeat/losses/solid_liquid_flue_gas_calculator.dox +0 -341
  169. package/docs/dox-content/calculators/processHeat/losses/solid_load_charge_material_heat_required_calculator.dox +0 -170
  170. package/docs/dox-content/calculators/processHeat/losses/wall_heat_loss_calculator.dox +0 -104
  171. package/docs/dox-content/calculators/processHeat/losses/water_cooling_heat_loss_calculator.dox +0 -64
  172. package/docs/dox-content/calculators/processHeat/o2_enrichment_calculator.dox +0 -201
  173. package/docs/dox-content/calculators/processHeat/process_heat_calculator.dox +0 -44
  174. package/docs/dox-content/calculators/processHeat/water_heating_using_exhaust_calculator.dox +0 -115
  175. package/docs/dox-content/calculators/steam/air_water_cooling_using_flue_calculator.dox +0 -163
  176. package/docs/dox-content/calculators/steam/water_heating_using_flue_calculator.dox +0 -235
  177. package/docs/dox-content/calculators/steam/water_heating_using_steam_calculator.dox +0 -187
  178. package/docs/dox-content/calculators/treasureHunt/compressed_air_nozzle_coefficients.dox +0 -44
  179. package/docs/dox-content/calculators/treasureHunt/compressed_air_pressure_reduction_calculator.dox +0 -105
  180. package/docs/dox-content/calculators/treasureHunt/compressed_air_reduction_calculator.dox +0 -176
  181. package/docs/dox-content/calculators/treasureHunt/electricity_reduction_calculator.dox +0 -158
  182. package/docs/dox-content/calculators/treasureHunt/insulated_pipe_reduction_calculator.dox +0 -316
  183. package/docs/dox-content/calculators/treasureHunt/insulated_tank_reduction_calculator.dox +0 -272
  184. package/docs/dox-content/calculators/treasureHunt/natural_gas_reduction_calculator.dox +0 -159
  185. package/docs/dox-content/calculators/treasureHunt/steam_reduction_calculator.dox +0 -211
  186. package/docs/dox-content/calculators/treasureHunt/water_reduction_calculator.dox +0 -132
  187. package/docs/dox-content/database-docs/gas_flue_gas_material_data_database.dox +0 -26
  188. package/docs/dox-content/database-docs/gas_load_charge_material_data_database.dox +0 -32
  189. package/docs/dox-content/database-docs/gas_type_data_database.dox +0 -28
  190. package/docs/dox-content/database-docs/liquid_load_charge_material_data_database.dox +0 -35
  191. package/docs/dox-content/database-docs/solid_liquid_flue_gas_material_data_database.dox +0 -28
  192. package/docs/dox-content/database-docs/solid_load_charge_material_data_database.dox +0 -62
  193. package/docs/dox-content/database-docs/wall_type_data_database.dox +0 -30
  194. package/docs/dox-content/physics/constants.dox +0 -70
  195. package/docs/dox-content/physics/gas_composition.dox +0 -163
  196. package/docs/dox-content/physics/gas_constants.dox +0 -103
  197. package/docs/mainpage.dox +0 -186
  198. package/docs/references.bib +0 -27
  199. package/karma.conf.js +0 -63
  200. package/ts_def/README.md +0 -140
  201. package/tsconfig.json +0 -19
package/README.md CHANGED
@@ -29,9 +29,9 @@ npm install measur-tools-suite
29
29
 
30
30
  ```js
31
31
  // Initialize module
32
- const moduleFactory = (await import('/path/to/client.js')).default;
32
+ const moduleFactory = (await import('measur-tools-suite')).default;
33
33
  const toolsSuiteModule = await moduleFactory({
34
- locateFile: (filename) => '/path/to/client.wasm'
34
+ locateFile: (filename) => `/path/to/${filename}`
35
35
  });
36
36
 
37
37
  // Plain function call — returns a number directly
@@ -54,7 +54,7 @@ doc.delete();
54
54
  import createModule, { type MeasurToolsSuite } from 'measur-tools-suite';
55
55
 
56
56
  const toolsSuiteModule: MeasurToolsSuite = await createModule({
57
- locateFile: (filename) => '/path/to/client.wasm'
57
+ locateFile: (filename) => `/path/to/${filename}`
58
58
  });
59
59
 
60
60
  const doc = new toolsSuiteModule.DryerOperatingCost(1752, 50, 100, 24, 7, 52, 0.08, 0.2, 0.25);
@@ -64,6 +64,10 @@ res.delete();
64
64
  doc.delete();
65
65
  ```
66
66
 
67
+ Package consumers should import `measur-tools-suite`, not `bin/client.js`
68
+ directly. Deploy the package's `bin/client.wasm` with your application and use
69
+ `locateFile` to return its public URL.
70
+
67
71
  ### Building from Source
68
72
 
69
73
  ```bash
@@ -72,8 +76,8 @@ cmake -S . -B build-cpp
72
76
  cmake --build build-cpp
73
77
 
74
78
  # WebAssembly build (requires Emscripten)
75
- emcmake cmake -DBUILD_WASM=ON
76
- emmake make
79
+ emcmake cmake -S . -B build-wasm -DBUILD_WASM=ON
80
+ emmake make -C build-wasm
77
81
 
78
82
  # Packaging
79
83
  cmake -S . -B build-pkg -DBUILD_PACKAGE=ON -DBUILD_TESTING=OFF
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "measur-tools-suite",
3
- "version": "1.2.2-beta.0",
3
+ "version": "1.2.2-beta.2",
4
4
  "engines": {
5
5
  "node": "20.19.4",
6
6
  "npm": "10.8.2"
@@ -4,6 +4,8 @@
4
4
  * Chiller Efficiency (Temperature Reset Capacity, Staging).
5
5
  */
6
6
 
7
+ import type { DoubleVector } from '../binding/registered_vectors';
8
+
7
9
  // ---------------------------------------------------------------------------
8
10
  // Enumerations
9
11
  // ---------------------------------------------------------------------------
@@ -103,10 +105,16 @@ export interface PowerEnergyConsumptionOutput {
103
105
  * @property savingsEnergy double, units kWh
104
106
  */
105
107
  export interface StagingPowerConsumptionOutput {
106
- /** Power consumption for each baseline chiller load, units kW */
107
- baselinePowerList: number[];
108
- /** Power consumption for each modification chiller load, units kW */
109
- modPowerList: number[];
108
+ /**
109
+ * Registered WASM vector of baseline chiller power values, units kW.
110
+ * Call `delete()` when finished.
111
+ */
112
+ baselinePowerList: DoubleVector;
113
+ /**
114
+ * Registered WASM vector of modification chiller power values, units kW.
115
+ * Call `delete()` when finished.
116
+ */
117
+ modPowerList: DoubleVector;
110
118
  /** Total baseline power, units kW */
111
119
  baselineTotalPower: number;
112
120
  /** Total baseline energy, units kWh */
@@ -328,8 +336,8 @@ export function ChillerCapacityEfficiency(
328
336
  * @param operatingHours double, operating hours, units hours
329
337
  * @param waterSupplyTemp double, chilled water supply temperature, units F
330
338
  * @param waterEnteringTemp double, condenser water entering temperature, units F
331
- * @param baselineLoadList list of doubles for each baseline chiller load, units ton
332
- * @param modLoadList list of doubles for each modification chiller load, units ton
339
+ * @param baselineLoadList Registered WASM vector of baseline chiller loads, units ton
340
+ * @param modLoadList Registered WASM vector of modification chiller loads, units ton
333
341
  * @returns {@link StagingPowerConsumptionOutput}
334
342
  */
335
343
  export function ChillerStagingEfficiency(
@@ -342,8 +350,8 @@ export function ChillerStagingEfficiency(
342
350
  operatingHours: number,
343
351
  waterSupplyTemp: number,
344
352
  waterEnteringTemp: number,
345
- baselineLoadList: number[],
346
- modLoadList: number[]
353
+ baselineLoadList: DoubleVector,
354
+ modLoadList: DoubleVector
347
355
  ): StagingPowerConsumptionOutput;
348
356
 
349
357
  export type ChillersModule = {
@@ -14,6 +14,7 @@ import type {
14
14
  Solve,
15
15
  TurbineProperty,
16
16
  } from './ssmtEnum';
17
+ import type { InletVector } from '../binding/registered_vectors';
17
18
 
18
19
  export type { ThermodynamicQuantity, Solve, TurbineProperty };
19
20
 
@@ -564,9 +565,10 @@ export declare class Inlet {
564
565
  export declare class Header {
565
566
  /**
566
567
  * @param headerPressure Header pressure, units MPa
567
- * @param inletVec Array of {@link Inlet} objects
568
+ * @param inletVec Registered WASM vector of {@link Inlet} objects. Call
569
+ * `delete()` when finished with the vector.
568
570
  */
569
- constructor(headerPressure: number, inletVec: Inlet[]);
571
+ constructor(headerPressure: number, inletVec: InletVector);
570
572
 
571
573
  /** @returns {@link SteamPropertiesOutput} combined header steam properties */
572
574
  getHeaderProperties(): SteamPropertiesOutput;
@@ -576,8 +578,11 @@ export declare class Header {
576
578
  getInletEnergyFlow(): number;
577
579
  /** @returns Total inlet mass flow, units kg/hr */
578
580
  getInletMassFlow(): number;
579
- /** @returns Array of {@link Inlet} objects */
580
- getInlets(): Inlet[];
581
+ /**
582
+ * @returns Registered WASM vector of {@link Inlet} objects. Call `delete()`
583
+ * when finished with the vector.
584
+ */
585
+ getInlets(): InletVector;
581
586
 
582
587
  /** Frees the underlying resource; must be called when finished with the instance */
583
588
  delete(): void;
@@ -5,7 +5,7 @@
5
5
  * process outputs with and without the full iteration calculations table.
6
6
  */
7
7
 
8
- import { CalculationsTableV } from "../binding/registered_vectors";
8
+ import type { CalculationsTableV, DoubleVector } from "../binding/registered_vectors";
9
9
 
10
10
  /**
11
11
  * Iteration row of intermediate wastewater-treatment calculations.
@@ -67,8 +67,11 @@ export declare class CalculationsTable {
67
67
  /** Solids retention time, units days. */
68
68
  SRT: number;
69
69
 
70
- /** @returns Numeric array view of this row in model-defined order */
71
- getArray(): number[];
70
+ /**
71
+ * @returns Registered WASM vector of row values in model-defined order.
72
+ * Call `delete()` when finished.
73
+ */
74
+ getArray(): DoubleVector;
72
75
 
73
76
  /** Frees the underlying resource; must be called when finished with the instance */
74
77
  delete(): void;
package/.agents/README.md DELETED
@@ -1,51 +0,0 @@
1
- # Agent Personas
2
-
3
- This directory defines repo-neutral personas for namespace refactors and algorithm documentation work. These personas are guidance for AI agents and automation tools; they are not tied to any single tool or runtime.
4
-
5
- Use this workflow when a task asks to refactor a calculation module into a namespace pattern, split a module, or write/update algorithm documentation alongside source, WebAssembly, TypeScript, or test changes.
6
-
7
- ## Required Sequence
8
-
9
- Work through the personas in this order:
10
-
11
- 1. [`refactor-planner`](personas/refactor-planner.md)
12
- 2. [`cpp-namespace-refactorer`](personas/cpp-namespace-refactorer.md)
13
- 3. [`wasm-ts-steward`](personas/wasm-ts-steward.md)
14
- 4. [`algorithm-docs-author`](personas/algorithm-docs-author.md)
15
- 5. [`verification-reviewer`](personas/verification-reviewer.md)
16
-
17
- Each persona must read the current handoff, perform its phase, and update the handoff before the next persona starts. Use [`templates/refactor-handoff.md`](templates/refactor-handoff.md) for the handoff.
18
-
19
- ## Defaults
20
-
21
- - Preserve public API compatibility unless the user explicitly approves a breaking change.
22
- - If the user explicitly approves a breaking namespace/module refactor, remove obsolete compatibility wrappers and legacy runtime surfaces instead of keeping old support code in parallel.
23
- - Keep source, bindings, TypeScript declarations, tests, and documentation in sync.
24
- - Prefer established module patterns, especially the `processHeat/` namespace examples.
25
- - Treat `.dox` files as algorithm documentation for engineering users who need to check formulas, units, and assumptions.
26
- - Do not guess units or formula meaning. Inspect source, tests, docs, and downstream usage first; if still unclear, record the uncertainty in the handoff.
27
-
28
- ## Handoff Rules
29
-
30
- The handoff is the shared state for the workflow. It should be short, concrete, and updated after each persona phase.
31
-
32
- Every handoff must include:
33
-
34
- - Target module and related files across C++, WebAssembly, TypeScript, tests, and docs.
35
- - Current public API and proposed namespace API.
36
- - Compatibility decision: compatible by default, intentionally breaking only with explicit approval.
37
- - For approved breaking changes, the old-to-new migration and removed legacy surfaces.
38
- - Formula and unit notes, including uncertain or unresolved items.
39
- - Validation commands run and remaining validation needed.
40
- - Open questions or blockers.
41
-
42
- ## Completion Standard
43
-
44
- The workflow is complete only when the verification reviewer confirms:
45
-
46
- - The C++ API shape matches the namespace/module plan.
47
- - Embind names and TypeScript declarations match the runtime surface.
48
- - Classes, value objects, registered vectors, and enums follow `AGENTS.md` TypeScript rules.
49
- - C++ and WASM tests cover changed public behavior.
50
- - Algorithm documentation is top-down, formula-driven, and includes units and symbol tables.
51
- - Any public compatibility change has migration notes.
@@ -1,70 +0,0 @@
1
- # Refactor Handoff
2
-
3
- ## Target Module
4
-
5
- - Domain/path: `compressedAir/assessment`
6
- - Logical module: compressor assessment performance models, EEM calculations, and compressor catalog records
7
- - Original files: `include/compressedAir/Compressors.h`, `src/compressedAir/Compressors.cpp`, `include/compressedAir/compressors_data.h`, `bindings-wasm/compressedAir/compressorsCalc.cpp`, `ts_def/ts_def_modules/compressedAir/compressorsCalc.d.ts`, `tests/cpp/compressedAir/Compressors.unit.cpp`, `tests/wasm/compressedAir/wasm-compressorsCalc-test.js`, `tests/wasm/compressedAir/wasm-compressorCalc-reciprocatingScrew-test.js`, `tests/wasm/compressedAir/wasm-compressorCalc-helpers.js`
8
- - New files: `include/compressedAir/assessment/*`, `src/compressedAir/assessment/*`, `bindings-wasm/compressedAir/assessment/*`, `ts_def/ts_def_modules/compressedAir/assessment/*`, `tests/cpp/compressedAir/assessment/*`, `tests/wasm-mocha/compressedAir/assessment/*`, `docs/dox-content/calculators/compressedAir/assessment/*`
9
- - Nearby examples: namespace-based `compressedAir` one-off calculators and `compressedAir/leak_survey`
10
-
11
- ## Current Public API
12
-
13
- - C++ symbols: global `CompressorsBase`, `Compressors_*`, `Compressor_VFD`, `CompressorEEMs`, and `CompressorsData`
14
- - Embind runtime names: legacy `Compressors_*`, `Compressor_VFD`, `CompressorsOutput`, `CompressorsOutputBlowOff`, `CompressorsData`, `CompressorsDataV`, and EEM function names
15
- - TypeScript declarations: `compressedAir/compressorsCalc.d.ts`
16
- - Test-visible behavior: C++ compressor unit tests plus legacy JS WASM tests
17
-
18
- ## Proposed Namespace API
19
-
20
- - Namespace: `compressed_air::assessment`
21
- - Functions: EEM free functions under `compressor_eem`
22
- - Structs/value objects: compressor performance/blow-off results, EEM results, `CompressorCatalogRecord`
23
- - Enums: `CompressorType`, `CompressorControl`, `CompressorStage`, `CompressorLubricant`, `CompressorInputBasis`
24
- - Runtime names to preserve: none; this is an approved breaking cleanup
25
-
26
- ## Compatibility Decision
27
-
28
- - Default: preserve public compatibility.
29
- - Decision: breaking cleanup approved by user.
30
- - Migration notes needed: old class/function/type names are removed and replaced by new assessment names.
31
- - User approval for breaking changes: yes.
32
- - Removed legacy surfaces: old C++ headers/source, old embind names, old TS `compressorsCalc`, and legacy JS WASM tests.
33
-
34
- ## Touched Layers
35
-
36
- - Headers/source: split into `include/compressedAir/assessment` and `src/compressedAir/assessment`; legacy compressor headers/source removed.
37
- - C++ tests: split under `tests/cpp/compressedAir/assessment`; legacy monolithic test removed.
38
- - WebAssembly bindings: split under `bindings-wasm/compressedAir/assessment`; legacy `compressorsCalc.cpp` removed.
39
- - TypeScript declarations: split under `ts_def/ts_def_modules/compressedAir/assessment`; legacy `compressorsCalc.d.ts` removed; client and registered vector declarations updated.
40
- - WASM Mocha tests: typed tests under `tests/wasm-mocha/compressedAir/assessment`; legacy JS tests removed.
41
- - Algorithm docs: new `.dox` files under `docs/dox-content/calculators/compressedAir/assessment`.
42
-
43
- ## Formulas And Units
44
-
45
- - Final result formula: preserve current formulas and expected numeric outputs exactly.
46
- - Supporting formulas: pressure/inlet correction, compressor control curves, load/unload cycle timing, VFD interpolation, EEM pressure reduction.
47
- - Constants: existing 1.732 three-phase conversion, 0.746 hp-to-kW conversion, pressure correction coefficients, and existing time constants.
48
- - Units: kW, acfm, psig, psia, hp, seconds, hours/year, $/kWh, kWh/year, dimensionless fractions.
49
- - Unclear or unverified items: legacy catalog comments contain some inconsistent units and should be documented according to field usage/tests.
50
-
51
- ## Validation
52
-
53
- - Commands run:
54
- - `cmake -S . -B build-cpp`
55
- - `cmake --build build-cpp`
56
- - `./build-cpp/bin/cpp_tests` passed: 4033 assertions in 301 test cases.
57
- - `./node_modules/.bin/tsc --noEmit` passed.
58
- - `doxygen Doxyfile` exited 0, but printed the repo's existing BibTeX failure and unrelated documentation warnings.
59
- - `npm run tests` ran against stale `bin/client.*`; 230 existing tests passed and 10 new assessment tests failed because the new WASM constructors/functions were not present.
60
- - `git diff --check` passed.
61
- - Commands still needed:
62
- - Re-run `emcmake cmake -S . -B build-wasm -DBUILD_WASM=ON`.
63
- - Re-run `emmake make -C build-wasm`.
64
- - Re-run `npm run tests` after `bin/client.js` and `bin/client.wasm` are rebuilt.
65
- - Known environment limits:
66
- - `emcmake`, `emmake`, and `emcc` were not installed or not on PATH in this environment, so the WASM artifact could not be rebuilt.
67
-
68
- ## Open Questions Or Blockers
69
-
70
- - WASM binding compile and runtime browser tests remain blocked on Emscripten availability.
@@ -1,199 +0,0 @@
1
- # Refactor Handoff
2
-
3
- ## Target Module
4
-
5
- - Domain/path: `compressedAir`
6
- - Logical module: Coordinated refactor of `AirSystemCapacity`, `AirVelocity`, and shared `PipeData`
7
- - Original files:
8
- - `include/compressedAir/AirSystemCapacity.h`
9
- - `include/compressedAir/AirVelocity.h`
10
- - `include/compressedAir/PipeData.h`
11
- - `bindings-wasm/compressedAir/compressedAir.cpp`
12
- - `ts_def/ts_def_modules/compressedAir/compressedAir.d.ts`
13
- - `tests/cpp/compressedAir/CompressedAir.unit.cpp`
14
- - `tests/wasm-mocha/compressedAir/wasm_air_system_capacity.test.ts`
15
- - `tests/wasm-mocha/compressedAir/wasm_air_velocity.test.ts`
16
- - Current files after refactor:
17
- - `include/compressedAir/pipe_data.h`
18
- - `src/compressedAir/pipe_data.cpp`
19
- - `include/compressedAir/air_system_capacity.h`
20
- - `src/compressedAir/air_system_capacity.cpp`
21
- - `include/compressedAir/air_velocity.h`
22
- - `src/compressedAir/air_velocity.cpp`
23
- - `bindings-wasm/compressedAir/pipe_data.cpp`
24
- - `bindings-wasm/compressedAir/air_system_capacity.cpp`
25
- - `bindings-wasm/compressedAir/air_velocity.cpp`
26
- - `ts_def/ts_def_modules/compressedAir/pipe_data.d.ts`
27
- - `ts_def/ts_def_modules/compressedAir/air_system_capacity.d.ts`
28
- - `ts_def/ts_def_modules/compressedAir/air_velocity.d.ts`
29
- - `ts_def/ts_def_modules/compressedAir/compressedAir.d.ts`
30
- - `tests/cpp/compressedAir/pipe_data.unit.cpp`
31
- - `tests/cpp/compressedAir/air_system_capacity.unit.cpp`
32
- - `tests/cpp/compressedAir/air_velocity.unit.cpp`
33
- - `tests/wasm-mocha/compressedAir/wasm_pipe_data.test.ts`
34
- - `tests/wasm-mocha/compressedAir/wasm_air_system_capacity.test.ts`
35
- - `tests/wasm-mocha/compressedAir/wasm_air_velocity.test.ts`
36
- - Nearby examples:
37
- - `include/compressedAir/pipe_sizing.h`
38
- - `src/compressedAir/pipe_sizing.cpp`
39
- - `bindings-wasm/compressedAir/pipe_sizing.cpp`
40
- - `ts_def/ts_def_modules/compressedAir/pipe_sizing.d.ts`
41
- - `include/compressedAir/leak_survey/compressed_air_leak_survey.h`
42
- - `src/compressedAir/leak_survey/compressed_air_leak_survey.cpp`
43
- - `bindings-wasm/compressedAir/leak_survey/compressed_air_leak_survey.cpp`
44
- - `docs/dox-content/calculators/compressedAir/pipe_sizing_calculator.dox`
45
-
46
- ## Current Public API
47
-
48
- - Original C++ symbols:
49
- - Global `struct PipeData`
50
- - Global `class AirSystemCapacity`
51
- - Nested `AirSystemCapacity::Output`
52
- - Global `class AirVelocity`
53
- - `AirSystemCapacity::calculate()`
54
- - `AirVelocity::calculate()`
55
- - Original embind runtime names:
56
- - `PipeData`
57
- - `AirSystemCapacity`
58
- - `AirSystemCapacityOutput`
59
- - `AirVelocity`
60
- - `calculate` instance method on `AirSystemCapacity` and `AirVelocity`
61
- - Original TypeScript declarations:
62
- - `PipeData`, `AirSystemCapacity`, `AirSystemCapacityOutput`, and `AirVelocity` runtime classes in `compressedAir.d.ts`
63
- - `CompressedAirModule` module type exposing those runtime classes
64
- - Test-visible behavior:
65
- - `PipeData` constructor receives pipe lengths in ft and stores per-size pipe volumes in ft3.
66
- - `AirSystemCapacity` receives `PipeData` plus receiver capacities in gal, returns total pipe volume, receiver volumes in ft3, total capacity in ft3, and per-size pipe volumes.
67
- - `AirVelocity` receives airflow in scfm, pipe pressure in psig, and atmospheric pressure in psia, then returns velocities by pipe size in ft/s.
68
-
69
- ## Proposed Namespace API
70
-
71
- - Namespace:
72
- - `pipe_data`
73
- - `air_system_capacity`
74
- - `air_velocity`
75
- - Functions:
76
- - `air_system_capacity::calculate(const Input&) -> Output`
77
- - `air_velocity::calculate(const Input&) -> pipe_data::PipeData`
78
- - Structs/value objects:
79
- - `pipe_data::PipeData`
80
- - `air_system_capacity::Input`
81
- - `air_system_capacity::Output`
82
- - `air_velocity::Input`
83
- - Enums: none
84
- - Runtime names to preserve:
85
- - `PipeData`
86
- - `AirSystemCapacityInput`
87
- - `AirSystemCapacityOutput`
88
- - `AirVelocityInput`
89
- - `calculateAirSystemCapacity`
90
- - `calculateAirVelocity`
91
-
92
- ## Compatibility Decision
93
-
94
- - Default: preserve public compatibility.
95
- - Decision: Intentionally breaking after user approval. Do not retain wrapper classes, legacy PascalCase headers, legacy runtime constructors, or compatibility-only tests.
96
- - Migration notes needed:
97
- - C++ callers that included `compressedAir/AirSystemCapacity.h`, `compressedAir/AirVelocity.h`, or `compressedAir/PipeData.h` must switch to `compressedAir/air_system_capacity.h`, `compressedAir/air_velocity.h`, or `compressedAir/pipe_data.h`.
98
- - C++ callers should use `air_system_capacity::calculate({pipe_lengths, receivers})` and `air_velocity::calculate({airflow, pipe_pressure, atmospheric_pressure})`.
99
- - WASM/TypeScript callers should replace `new AirSystemCapacity(pipeData, receivers).calculate()` with `calculateAirSystemCapacity({ pipeLengths: pipeData, receivers })`.
100
- - WASM/TypeScript callers should replace `new AirVelocity(airFlow, pipePressure, atmosphericPressure).calculate()` with `calculateAirVelocity({ airFlow, pipePressure, atmosphericPressure })`.
101
- - `AirSystemCapacityOutput` is now an embind `value_object` interface rather than a runtime class. Do not call `delete()` on the output object itself; clean up nested `receiverCapacities` and `pipeLengths` runtime objects when finished.
102
- - User approval for breaking changes: Approved by follow-up requests to remove old implementation files and then remove legacy support methods/wrapper code altogether.
103
- - Removed legacy surfaces:
104
- - `include/compressedAir/AirSystemCapacity.h`
105
- - `include/compressedAir/AirVelocity.h`
106
- - `include/compressedAir/PipeData.h`
107
- - C++ wrapper classes `air_system_capacity::AirSystemCapacity` and `air_velocity::AirVelocity`
108
- - Embind runtime classes `AirSystemCapacity` and `AirVelocity`
109
- - Embind constructor/class binding for `AirSystemCapacityOutput`
110
- - TypeScript class declarations for `AirSystemCapacity`, `AirVelocity`, and class-shaped `AirSystemCapacityOutput`
111
- - Compatibility-only C++ and WASM tests for the deleted constructor-and-instance-method path
112
-
113
- ## Touched Layers
114
-
115
- - Headers/source:
116
- - Added `include/compressedAir/pipe_data.h`, `src/compressedAir/pipe_data.cpp`
117
- - Added `include/compressedAir/air_system_capacity.h`, `src/compressedAir/air_system_capacity.cpp`
118
- - Added `include/compressedAir/air_velocity.h`, `src/compressedAir/air_velocity.cpp`
119
- - Removed legacy `AirSystemCapacity.h`, `AirVelocity.h`, and `PipeData.h` after user approval.
120
- - Removed compatibility wrapper classes from the new snake_case modules after explicit user approval.
121
- - Made `pipe_data::PipeData` default-constructible and assignable so embind value-object inputs/results can carry it.
122
- - C++ tests:
123
- - Replaced combined `CompressedAir.unit.cpp` coverage with namespace-focused module tests:
124
- - `tests/cpp/compressedAir/pipe_data.unit.cpp`
125
- - `tests/cpp/compressedAir/air_system_capacity.unit.cpp`
126
- - `tests/cpp/compressedAir/air_velocity.unit.cpp`
127
- - WebAssembly bindings:
128
- - Split old `compressedAir.cpp` into one binding file each for `pipe_data`, `air_system_capacity`, and `air_velocity`.
129
- - Kept `PipeData` as the shared runtime class.
130
- - Replaced `AirSystemCapacity` and `AirVelocity` runtime classes with `calculateAirSystemCapacity` and `calculateAirVelocity` module functions.
131
- - Replaced class-shaped `AirSystemCapacityOutput` with an embind `value_object`.
132
- - Added `AirSystemCapacityInput`, `AirSystemCapacityOutput`, and `AirVelocityInput` value objects.
133
- - TypeScript declarations:
134
- - Added one declaration file per binding surface:
135
- - `ts_def/ts_def_modules/compressedAir/pipe_data.d.ts`
136
- - `ts_def/ts_def_modules/compressedAir/air_system_capacity.d.ts`
137
- - `ts_def/ts_def_modules/compressedAir/air_velocity.d.ts`
138
- - Kept `compressedAir.d.ts` as a barrel and module type aggregator.
139
- - Removed old calculator class declarations and represented value objects as interfaces.
140
- - WASM Mocha tests:
141
- - Updated runtime tests to call `calculateAirSystemCapacity` and `calculateAirVelocity`.
142
- - Added `tests/wasm-mocha/compressedAir/wasm_pipe_data.test.ts`.
143
- - Algorithm docs:
144
- - Added `.dox` docs under `docs/dox-content/calculators/compressedAir/`.
145
-
146
- ## Formulas And Units
147
-
148
- - Final result formula:
149
- - Air system capacity: `V_system = V_pipe,total + V_receiver,total`, units ft3.
150
- - Air velocity by pipe size: `v_i = Q * P_atm / (P_line + P_atm) * 144 / A_i / 60`, units ft/s.
151
- - Supporting formulas:
152
- - Pipe volume by size: `V_i = L_i * c_i`, where `L_i` is pipe length in ft and `c_i` is per-foot pipe volume in ft3/ft.
153
- - Total pipe volume: `V_pipe,total = sum(V_i)`, units ft3.
154
- - Receiver capacity conversion: `V_receiver,j = G_j / 7.480515625`, with gallons converted to ft3.
155
- - Total receiver volume: `V_receiver,total = sum(V_receiver,j)`, units ft3.
156
- - Constants:
157
- - Receiver conversion: `7.480515625 gal/ft3` from existing implementation.
158
- - Area conversion: `144 in2/ft2`.
159
- - Time conversion: `60 s/min`.
160
- - Pipe volume coefficients by nominal size: `0.0021`, `0.0037`, `0.006`, `0.0104`, `0.0141`, `0.0233`, `0.0333`, `0.0513`, `0.0687`, `0.0884`, `0.1389`, `0.2006`, `0.3442`, `0.5476`, `0.7763`, `0.9354`, `1.223`, `1.555`, `1.926`, `2.793` ft3/ft.
161
- - Pipe internal areas by nominal size: `0.3`, `0.53`, `0.86`, `1.5`, `2.04`, `3.36`, `4.79`, `7.39`, `9.89`, `12.73`, `20`, `28.89`, `50.02`, `78.85`, `111.9`, `135.3`, `176.7`, `224`, `278`, `402.10` in2.
162
- - Units:
163
- - Pipe lengths: ft.
164
- - Stored `PipeData` values: context-specific, ft3 for capacity volume data or ft/s for velocity results.
165
- - `totalPipeVolume`, `totalReceiverVolume`, and total system capacity: ft3.
166
- - Receiver inputs: gal; converted receiver outputs: ft3.
167
- - Airflow: scfm.
168
- - Pipe pressure: psig.
169
- - Atmospheric pressure: psia.
170
- - Velocity results: ft/s.
171
- - Unclear or unverified items:
172
- - Existing `PipeData` helper comment said velocity pipe area was square feet, but the formula and constants require square inches. Document as square inches.
173
- - Source of pipe volume coefficients and internal area table is not cited in existing code; docs should present them as implementation tables, not external standard references.
174
-
175
- ## Validation
176
-
177
- - Commands run:
178
- - `cmake -S . -B build-cpp` passed after removing the legacy wrappers.
179
- - `cmake --build build-cpp` passed after removing the legacy wrappers.
180
- - `./build-cpp/bin/cpp_tests` passed: 4029 assertions in 296 test cases.
181
- - `./node_modules/.bin/tsc --noEmit` passed after the TypeScript declaration changes.
182
- - `emcmake cmake -S . -B build-wasm -DBUILD_WASM=ON` failed because `emcmake` is not installed in this shell.
183
- - `npm run tests` failed with 4 compressed-air failures because the existing `bin/client.*` artifact does not expose the newly bound `calculateAirSystemCapacity` or `calculateAirVelocity` functions. The command reported 226 passing tests and 4 failing tests.
184
- - `git diff --check` passed after the final edits.
185
- - `rg -n "[ \t]+$" ...` over new files found no trailing whitespace.
186
- - `rg -n "new moduleInstance\\.(AirSystemCapacity|AirVelocity)|moduleInstance\\.(AirSystemCapacity|AirVelocity)\\b|export declare class (AirSystemCapacity|AirVelocity)|class_<.*(AirSystemCapacity|AirVelocity)|air_system_capacity::AirSystemCapacity|air_velocity::AirVelocity" include src bindings-wasm ts_def tests AGENTS.md .agents` found no live legacy API references outside this handoff.
187
- - Commands still needed:
188
- - Install or source Emscripten, then run `emcmake cmake -S . -B build-wasm -DBUILD_WASM=ON`.
189
- - Run `emmake make -C build-wasm`.
190
- - Rerun `npm run tests` after rebuilding `bin/client.js` and `bin/client.wasm`.
191
- - Known environment limits:
192
- - WASM build requires Emscripten tools to be installed; `emcmake` is not available in this shell.
193
- - `clang-format` is not available in this shell, so C++ formatting was manually reviewed instead of auto-formatted.
194
- - Karma can run in this shell, but it currently exercises stale `bin/client.*` artifacts because the WASM rebuild is blocked.
195
-
196
- ## Open Questions Or Blockers
197
-
198
- - No source-level blockers remain.
199
- - Remaining validation risk: the split embind files could not be compiled into a fresh WASM artifact here because Emscripten is unavailable.
@@ -1,30 +0,0 @@
1
- # Algorithm Docs Author
2
-
3
- ## Purpose
4
-
5
- Write or update engineer-facing algorithm documentation for calculations. The audience is engineering users checking formulas, units, and assumptions, not developers reading implementation details.
6
-
7
- ## Inputs
8
-
9
- - Current handoff.
10
- - Updated C++ API, tests, and known expected results.
11
- - Existing `.dox` files for the target module and nearby examples.
12
- - `contributing/documentation.md`.
13
-
14
- ## Responsibilities
15
-
16
- - Write `.dox` documentation under `docs/dox-content/` following nearby organization.
17
- - Use a top-down structure: final result first, then supporting formulas, factors, constants, and assumptions.
18
- - Use Doxygen aliases consistently: `@formula`, `@symtable`, `@symrow`, `@unitb`, and related project conventions.
19
- - Include symbol tables for every documented formula.
20
- - Keep formula labels unique and descriptive.
21
- - Match formula variables, units, constants, and assumptions to the implementation and tests.
22
- - Avoid developer-only implementation narration unless it explains engineering assumptions or formula behavior.
23
- - Record uncertain units, undocumented source assumptions, or missing references in the handoff instead of guessing.
24
-
25
- ## Done When
26
-
27
- - The `.dox` docs let an engineering user trace the final result back through formulas and symbols.
28
- - Units are present for parameters, return values, constants, and formula symbols.
29
- - Documentation cross-references match public C++ Doxygen comments where relevant.
30
- - The handoff is updated for final verification.
@@ -1,30 +0,0 @@
1
- # C++ Namespace Refactorer
2
-
3
- ## Purpose
4
-
5
- Implement the C++ portion of a namespace refactor while preserving calculation behavior and public compatibility decisions from the handoff.
6
-
7
- ## Inputs
8
-
9
- - Current handoff.
10
- - Matching public headers and source files.
11
- - Relevant C++ tests and nearby namespace-pattern examples.
12
- - `contributing/style-guide.md` and `contributing/documentation.md`.
13
-
14
- ## Responsibilities
15
-
16
- - Update headers and source before downstream bindings, declarations, or docs.
17
- - Place public calculation APIs in the planned namespace using path-appropriate naming.
18
- - Keep one `.h`/`.cpp` pair per logical module unless the handoff explicitly says otherwise.
19
- - Use Doxygen blocks for public files, namespaces, structs, enums, constants, and functions.
20
- - Preserve formulas, constants, parameter order, return values, and behavior unless the handoff explicitly identifies a behavior change.
21
- - Remove legacy C++ wrapper classes, headers, and compatibility-only tests when the handoff records explicit approval for a breaking refactor.
22
- - Update C++ unit tests to call the namespace API and cover changed public behavior.
23
- - Record any unresolved formula, unit, naming, or compatibility concern in the handoff.
24
-
25
- ## Done When
26
-
27
- - Header and source compile conceptually with matching declarations and definitions.
28
- - C++ tests reflect the new namespace API.
29
- - Public Doxygen comments include units or explicit unitless/dimensionless status for numeric values.
30
- - The handoff is updated for the WebAssembly and TypeScript steward.
@@ -1,29 +0,0 @@
1
- # Refactor Planner
2
-
3
- ## Purpose
4
-
5
- Plan namespace refactors and algorithm documentation work before any implementation begins. This persona maps the target module across repository layers and creates the handoff used by every later persona.
6
-
7
- ## Inputs
8
-
9
- - User request and any explicit compatibility constraints.
10
- - `AGENTS.md`, `ARCHITECTURE.md`, `contributing/style-guide.md`, and `contributing/documentation.md`.
11
- - Existing source, bindings, TypeScript declarations, tests, and `.dox` docs for the target module.
12
- - Nearby examples in the same domain, especially namespace-based `processHeat/` modules.
13
-
14
- ## Responsibilities
15
-
16
- - Identify the logical module name and target namespace.
17
- - List all affected files across `include/`, `src/`, `bindings-wasm/`, `ts_def/`, `tests/cpp/`, `tests/wasm-mocha/`, and `docs/dox-content/`.
18
- - Record the current public API, including C++ symbols, embind names, TypeScript declarations, and test-visible runtime names.
19
- - Propose the namespace API and classify compatibility.
20
- - Preserve public API compatibility by default. Mark a change as intentionally breaking only when the user explicitly approved it.
21
- - When a breaking change is approved, plan removal of obsolete wrappers, legacy headers, legacy runtime names, and compatibility-only tests instead of retaining shim code.
22
- - Identify formulas, units, source constants, example inputs, and expected outputs that documentation and tests must preserve.
23
- - Create or update the handoff using `templates/refactor-handoff.md`.
24
-
25
- ## Done When
26
-
27
- - The handoff names the target module and all affected layers.
28
- - The compatibility decision is explicit.
29
- - The next persona can update C++ headers/source without making discovery or policy decisions.
@@ -1,30 +0,0 @@
1
- # Verification Reviewer
2
-
3
- ## Purpose
4
-
5
- Review the completed refactor and documentation as an integrated public change across C++, WebAssembly, TypeScript, tests, and algorithm docs.
6
-
7
- ## Inputs
8
-
9
- - Current handoff.
10
- - Final diff.
11
- - Relevant source, binding, declaration, test, and `.dox` files.
12
- - Validation command output.
13
-
14
- ## Responsibilities
15
-
16
- - Check that source changes match the one-module rule and planned namespace structure.
17
- - Verify embind runtime names match TypeScript declarations and WASM tests.
18
- - Check TypeScript semantics for runtime classes, value objects, registered vectors, and enums.
19
- - Confirm all numeric public API declarations have units or explicit unitless/dimensionless status.
20
- - Confirm algorithm docs are top-down and formula-driven.
21
- - Confirm every documented formula has a symbol table and every symbol has units.
22
- - Compare formulas in docs against source and tests for calculation consistency.
23
- - Check public API compatibility and confirm migration notes exist for approved breaking changes.
24
- - Recommend focused validation commands based on the changed surface, then record what passed or could not run.
25
-
26
- ## Done When
27
-
28
- - The handoff has final validation notes.
29
- - Any remaining risk is explicit and actionable.
30
- - The final response can accurately state what changed and which validation commands were run.
@@ -1,33 +0,0 @@
1
- # WebAssembly TypeScript Steward
2
-
3
- ## Purpose
4
-
5
- Keep the WebAssembly runtime surface and TypeScript declarations synchronized with the C++ namespace refactor.
6
-
7
- ## Inputs
8
-
9
- - Current handoff.
10
- - Updated C++ headers/source.
11
- - Matching `bindings-wasm/`, `ts_def/`, and `tests/wasm-mocha/` files.
12
- - `ts_def/README.md` and `tests/wasm-mocha/README.md`.
13
-
14
- ## Responsibilities
15
-
16
- - Update or create exactly one binding file per logical module.
17
- - Match embind functions, classes, value objects, registered vectors, and enums to the C++ API.
18
- - Preserve runtime API names by default when compatibility requires it.
19
- - Remove legacy embind constructors, runtime names, TypeScript declarations, and WASM tests when the handoff records explicit approval for a breaking refactor.
20
- - Match TypeScript declarations to embind semantics:
21
- - `class_<T>` becomes `export declare class` and includes `delete(): void`.
22
- - `value_object<T>` becomes an `interface` and is not listed as a constructible module property.
23
- - `register_vector<T>` is constructible through the module type and must be cleaned up with `delete()`.
24
- - `enum_<T>` appears on the module type only when exposed at runtime.
25
- - Document numeric TypeScript properties, parameters, and return values with units or explicit unitless/dimensionless status.
26
- - Update WASM Mocha tests to import from the package entrypoint and verify runtime behavior.
27
- - Update the handoff with binding names, declaration changes, and validation needed.
28
-
29
- ## Done When
30
-
31
- - Embind names, TypeScript declarations, and WASM tests describe the same runtime surface.
32
- - Public compatibility decisions from the handoff are preserved or explicitly documented.
33
- - The handoff is ready for algorithm documentation work.