@jetta/cargo-stabilizer 0.1.0-15 → 0.1.0-3

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 (270) hide show
  1. package/CHANGELOG.md +1 -35
  2. package/README.md +16 -62
  3. package/build/core/adapters/axle_adapter.d.ts +4 -5
  4. package/build/core/adapters/axle_adapter.d.ts.map +1 -1
  5. package/build/core/adapters/axle_adapter.js +23 -6
  6. package/build/core/adapters/coordinate_mapper.d.ts +5 -5
  7. package/build/core/adapters/coordinate_mapper.d.ts.map +1 -1
  8. package/build/core/adapters/coordinate_mapper.js +13 -13
  9. package/build/core/adapters/stability_adapter.d.ts +1 -1
  10. package/build/core/adapters/stability_adapter.d.ts.map +1 -1
  11. package/build/core/adapters/stability_adapter.js +1 -1
  12. package/build/core/candidates/build_candidate_context.d.ts +1 -1
  13. package/build/core/candidates/build_candidate_context.d.ts.map +1 -1
  14. package/build/core/candidates/build_candidate_context.js +1 -3
  15. package/build/core/candidates/candidate_context.d.ts +1 -4
  16. package/build/core/candidates/candidate_context.d.ts.map +1 -1
  17. package/build/core/candidates/candidate_generator.d.ts +1 -1
  18. package/build/core/candidates/candidate_generator.d.ts.map +1 -1
  19. package/build/core/candidates/candidate_generator.js +16 -33
  20. package/build/core/candidates/candidate_validation.d.ts +12 -0
  21. package/build/core/candidates/candidate_validation.d.ts.map +1 -1
  22. package/build/core/candidates/candidate_validation.js +26 -40
  23. package/build/core/candidates/rank_candidates.d.ts.map +1 -1
  24. package/build/core/candidates/rank_candidates.js +0 -3
  25. package/build/core/evaluation/evaluation_context.d.ts +1 -3
  26. package/build/core/evaluation/evaluation_context.d.ts.map +1 -1
  27. package/build/core/evaluation/state_evaluator.d.ts +10 -13
  28. package/build/core/evaluation/state_evaluator.d.ts.map +1 -1
  29. package/build/core/evaluation/state_evaluator.js +15 -19
  30. package/build/core/factory/read_stabilizer_config.d.ts +2 -5
  31. package/build/core/factory/read_stabilizer_config.d.ts.map +1 -1
  32. package/build/core/factory/read_stabilizer_config.js +25 -6
  33. package/build/core/filters/loose_item_filter.d.ts +2 -2
  34. package/build/core/filters/loose_item_filter.d.ts.map +1 -1
  35. package/build/core/filters/loose_item_filter.js +3 -3
  36. package/build/core/geometry/box_geometry.d.ts +1 -17
  37. package/build/core/geometry/box_geometry.d.ts.map +1 -1
  38. package/build/core/geometry/box_geometry.js +2 -67
  39. package/build/core/move/apply_move.d.ts +1 -3
  40. package/build/core/move/apply_move.d.ts.map +1 -1
  41. package/build/core/move/apply_move.js +1 -1
  42. package/build/core/orchestration/StabilizerFlow.d.ts +1 -2
  43. package/build/core/orchestration/StabilizerFlow.d.ts.map +1 -1
  44. package/build/core/orchestration/StabilizerFlow.js +1 -1
  45. package/build/core/orchestration/build_reorder_context.d.ts +1 -1
  46. package/build/core/orchestration/build_reorder_context.d.ts.map +1 -1
  47. package/build/core/orchestration/build_reorder_context.js +12 -10
  48. package/build/core/strategies/reorder/BeamSearchReorder.d.ts +1 -1
  49. package/build/core/strategies/reorder/BeamSearchReorder.d.ts.map +1 -1
  50. package/build/core/strategies/reorder/BeamSearchReorder.js +16 -15
  51. package/build/core/strategies/reorder/GeneticReorder.d.ts +1 -1
  52. package/build/core/strategies/reorder/GeneticReorder.d.ts.map +1 -1
  53. package/build/core/strategies/reorder/GeneticReorder.js +1 -2
  54. package/build/core/strategies/reorder/GravityCompaction.d.ts +1 -1
  55. package/build/core/strategies/reorder/GravityCompaction.d.ts.map +1 -1
  56. package/build/core/strategies/reorder/GravityCompaction.js +2 -2
  57. package/build/core/strategies/reorder/GreedyReorder.d.ts +1 -1
  58. package/build/core/strategies/reorder/GreedyReorder.d.ts.map +1 -1
  59. package/build/core/strategies/reorder/ReorderStrategy.d.ts +1 -3
  60. package/build/core/strategies/reorder/ReorderStrategy.d.ts.map +1 -1
  61. package/build/core/strategies/reorder/SimulatedAnnealingReorder.d.ts +1 -1
  62. package/build/core/strategies/reorder/SimulatedAnnealingReorder.d.ts.map +1 -1
  63. package/build/core/strategies/reorder/SimulatedAnnealingReorder.js +5 -14
  64. package/build/core/strategies/reorder/anneal_helpers.d.ts +1 -1
  65. package/build/core/strategies/reorder/anneal_helpers.d.ts.map +1 -1
  66. package/build/core/strategies/reorder/anneal_helpers.js +1 -1
  67. package/build/core/strategies/reorder/apply_if_gates_pass.d.ts +1 -1
  68. package/build/core/strategies/reorder/apply_if_gates_pass.d.ts.map +1 -1
  69. package/build/core/strategies/reorder/beam_context.d.ts +1 -2
  70. package/build/core/strategies/reorder/beam_context.d.ts.map +1 -1
  71. package/build/core/strategies/reorder/genetic/Chromosome.d.ts +1 -1
  72. package/build/core/strategies/reorder/genetic/Chromosome.d.ts.map +1 -1
  73. package/build/core/strategies/reorder/genetic/Chromosome.js +2 -2
  74. package/build/core/strategies/reorder/greedy_improvement.d.ts +1 -1
  75. package/build/core/strategies/reorder/greedy_improvement.d.ts.map +1 -1
  76. package/build/core/strategies/reorder/greedy_improvement.js +4 -5
  77. package/build/core/validation/parse_stabilizer_input.d.ts +8 -0
  78. package/build/core/validation/parse_stabilizer_input.d.ts.map +1 -0
  79. package/build/core/validation/parse_stabilizer_input.js +20 -0
  80. package/build/core/validation/schemas/stabilizer_config_schema.d.ts +2 -6
  81. package/build/core/validation/schemas/stabilizer_config_schema.d.ts.map +1 -1
  82. package/build/core/validation/schemas/stabilizer_config_schema.js +2 -6
  83. package/build/core/validation/schemas/stabilizer_input_schema.d.ts +110 -0
  84. package/build/core/validation/schemas/stabilizer_input_schema.d.ts.map +1 -0
  85. package/build/core/validation/schemas/stabilizer_input_schema.js +34 -0
  86. package/build/core/validation/schemas/stabilizer_output_schema.d.ts +13 -0
  87. package/build/core/validation/schemas/stabilizer_output_schema.d.ts.map +1 -0
  88. package/build/core/validation/schemas/stabilizer_output_schema.js +6 -0
  89. package/build/core/waypoint/build_waypoint_zones.d.ts +1 -1
  90. package/build/core/waypoint/build_waypoint_zones.d.ts.map +1 -1
  91. package/build/core/waypoint/build_waypoint_zones.js +2 -2
  92. package/build/core/waypoint/preserves_waypoint_order.d.ts +1 -1
  93. package/build/core/waypoint/preserves_waypoint_order.d.ts.map +1 -1
  94. package/build/core/waypoint/validate_waypoint_ids.d.ts +1 -1
  95. package/build/core/waypoint/validate_waypoint_ids.d.ts.map +1 -1
  96. package/build/index.d.ts +7 -15
  97. package/build/index.d.ts.map +1 -1
  98. package/build/index.js +11 -42
  99. package/package.json +10 -12
  100. package/build/core/adapters/axle_load_evaluation.d.ts +0 -8
  101. package/build/core/adapters/axle_load_evaluation.d.ts.map +0 -1
  102. package/build/core/adapters/axle_load_evaluation.js +0 -1
  103. package/build/core/adapters/build_axle_request.d.ts +0 -8
  104. package/build/core/adapters/build_axle_request.d.ts.map +0 -1
  105. package/build/core/adapters/build_axle_request.js +0 -67
  106. package/build/core/adapters/compute_axle_excess_kg.d.ts +0 -8
  107. package/build/core/adapters/compute_axle_excess_kg.d.ts.map +0 -1
  108. package/build/core/adapters/compute_axle_excess_kg.js +0 -19
  109. package/build/core/adapters/empty_space_adapter.d.ts +0 -10
  110. package/build/core/adapters/empty_space_adapter.d.ts.map +0 -1
  111. package/build/core/adapters/empty_space_adapter.js +0 -24
  112. package/build/core/adapters/evaluate_axle_load.d.ts +0 -10
  113. package/build/core/adapters/evaluate_axle_load.d.ts.map +0 -1
  114. package/build/core/adapters/evaluate_axle_load.js +0 -32
  115. package/build/core/adapters/map_item_to_positioned_cube.d.ts +0 -9
  116. package/build/core/adapters/map_item_to_positioned_cube.d.ts.map +0 -1
  117. package/build/core/adapters/map_item_to_positioned_cube.js +0 -16
  118. package/build/core/adapters/map_item_to_stacking_item.d.ts +0 -14
  119. package/build/core/adapters/map_item_to_stacking_item.d.ts.map +0 -1
  120. package/build/core/adapters/map_item_to_stacking_item.js +0 -40
  121. package/build/core/adapters/run_axle_calculator.d.ts +0 -16
  122. package/build/core/adapters/run_axle_calculator.d.ts.map +0 -1
  123. package/build/core/adapters/run_axle_calculator.js +0 -37
  124. package/build/core/candidates/collect_container_slots.d.ts +0 -16
  125. package/build/core/candidates/collect_container_slots.d.ts.map +0 -1
  126. package/build/core/candidates/collect_container_slots.js +0 -20
  127. package/build/core/candidates/enumerate_empty_space_slots.d.ts +0 -15
  128. package/build/core/candidates/enumerate_empty_space_slots.d.ts.map +0 -1
  129. package/build/core/candidates/enumerate_empty_space_slots.js +0 -44
  130. package/build/core/candidates/enumerate_supporter_top_slots.d.ts +0 -11
  131. package/build/core/candidates/enumerate_supporter_top_slots.d.ts.map +0 -1
  132. package/build/core/candidates/enumerate_supporter_top_slots.js +0 -36
  133. package/build/core/candidates/is_candidate_stacking_valid.d.ts +0 -14
  134. package/build/core/candidates/is_candidate_stacking_valid.d.ts.map +0 -1
  135. package/build/core/candidates/is_candidate_stacking_valid.js +0 -43
  136. package/build/core/candidates/is_elevated_on_supporter_origin.d.ts +0 -14
  137. package/build/core/candidates/is_elevated_on_supporter_origin.d.ts.map +0 -1
  138. package/build/core/candidates/is_elevated_on_supporter_origin.js +0 -28
  139. package/build/core/constants/TieRatioOrientation.d.ts +0 -6
  140. package/build/core/constants/TieRatioOrientation.d.ts.map +0 -1
  141. package/build/core/constants/TieRatioOrientation.js +0 -5
  142. package/build/core/evaluation/compare_search_states.d.ts +0 -12
  143. package/build/core/evaluation/compare_search_states.d.ts.map +0 -1
  144. package/build/core/evaluation/compare_search_states.js +0 -12
  145. package/build/core/evaluation/compute_reorder_objective.d.ts +0 -13
  146. package/build/core/evaluation/compute_reorder_objective.d.ts.map +0 -1
  147. package/build/core/evaluation/compute_reorder_objective.js +0 -13
  148. package/build/core/evaluation/evaluate_search_gates.d.ts +0 -18
  149. package/build/core/evaluation/evaluate_search_gates.d.ts.map +0 -1
  150. package/build/core/evaluation/evaluate_search_gates.js +0 -30
  151. package/build/core/evaluation/evaluation_result.d.ts +0 -15
  152. package/build/core/evaluation/evaluation_result.d.ts.map +0 -1
  153. package/build/core/evaluation/evaluation_result.js +0 -1
  154. package/build/core/evaluation/genetic_fitness.d.ts +0 -9
  155. package/build/core/evaluation/genetic_fitness.d.ts.map +0 -1
  156. package/build/core/evaluation/genetic_fitness.js +0 -16
  157. package/build/core/evaluation/is_non_axle_gates_pass.d.ts +0 -8
  158. package/build/core/evaluation/is_non_axle_gates_pass.d.ts.map +0 -1
  159. package/build/core/evaluation/is_non_axle_gates_pass.js +0 -8
  160. package/build/core/evaluation/is_search_trial_admissible.d.ts +0 -10
  161. package/build/core/evaluation/is_search_trial_admissible.d.ts.map +0 -1
  162. package/build/core/evaluation/is_search_trial_admissible.js +0 -17
  163. package/build/core/evaluation/is_waypoint_order_valid.d.ts +0 -10
  164. package/build/core/evaluation/is_waypoint_order_valid.d.ts.map +0 -1
  165. package/build/core/evaluation/is_waypoint_order_valid.js +0 -14
  166. package/build/core/exceptions/AxleCalculationError.d.ts +0 -4
  167. package/build/core/exceptions/AxleCalculationError.d.ts.map +0 -1
  168. package/build/core/exceptions/AxleCalculationError.js +0 -6
  169. package/build/core/exceptions/InvalidStabilizerOutputError.d.ts +0 -4
  170. package/build/core/exceptions/InvalidStabilizerOutputError.d.ts.map +0 -1
  171. package/build/core/exceptions/InvalidStabilizerOutputError.js +0 -6
  172. package/build/core/factory/read_stabilizer_config_helpers.d.ts +0 -32
  173. package/build/core/factory/read_stabilizer_config_helpers.d.ts.map +0 -1
  174. package/build/core/factory/read_stabilizer_config_helpers.js +0 -73
  175. package/build/core/filters/collect_movable_items.d.ts +0 -18
  176. package/build/core/filters/collect_movable_items.d.ts.map +0 -1
  177. package/build/core/filters/collect_movable_items.js +0 -53
  178. package/build/core/filters/collect_pinned_floor_tie_ratio_group_ids.d.ts +0 -8
  179. package/build/core/filters/collect_pinned_floor_tie_ratio_group_ids.d.ts.map +0 -1
  180. package/build/core/filters/collect_pinned_floor_tie_ratio_group_ids.js +0 -41
  181. package/build/core/filters/is_item_on_cm_floor.d.ts +0 -8
  182. package/build/core/filters/is_item_on_cm_floor.d.ts.map +0 -1
  183. package/build/core/filters/is_item_on_cm_floor.js +0 -9
  184. package/build/core/geometry/has_penetrating_overlap.d.ts +0 -9
  185. package/build/core/geometry/has_penetrating_overlap.d.ts.map +0 -1
  186. package/build/core/geometry/has_penetrating_overlap.js +0 -27
  187. package/build/core/orchestration/build_milkrun_bands_from_config.d.ts +0 -13
  188. package/build/core/orchestration/build_milkrun_bands_from_config.d.ts.map +0 -1
  189. package/build/core/orchestration/build_milkrun_bands_from_config.js +0 -14
  190. package/build/core/orchestration/read_primary_env.d.ts +0 -9
  191. package/build/core/orchestration/read_primary_env.d.ts.map +0 -1
  192. package/build/core/orchestration/read_primary_env.js +0 -13
  193. package/build/core/strategies/reorder/append_admitted_trial.d.ts +0 -11
  194. package/build/core/strategies/reorder/append_admitted_trial.d.ts.map +0 -1
  195. package/build/core/strategies/reorder/append_admitted_trial.js +0 -22
  196. package/build/core/strategies/reorder/is_improving_greedy_trial.d.ts +0 -10
  197. package/build/core/strategies/reorder/is_improving_greedy_trial.d.ts.map +0 -1
  198. package/build/core/strategies/reorder/is_improving_greedy_trial.js +0 -17
  199. package/build/core/strategies/reorder/select_beam_expansion_candidates.d.ts +0 -9
  200. package/build/core/strategies/reorder/select_beam_expansion_candidates.d.ts.map +0 -1
  201. package/build/core/strategies/reorder/select_beam_expansion_candidates.js +0 -28
  202. package/build/core/strategies/reorder/select_surviving_beam.d.ts +0 -11
  203. package/build/core/strategies/reorder/select_surviving_beam.d.ts.map +0 -1
  204. package/build/core/strategies/reorder/select_surviving_beam.js +0 -13
  205. package/build/core/validation/contract/cargo_movement_wire_field_map.d.ts +0 -71
  206. package/build/core/validation/contract/cargo_movement_wire_field_map.d.ts.map +0 -1
  207. package/build/core/validation/contract/cargo_movement_wire_field_map.js +0 -77
  208. package/build/core/validation/contract/cargo_movement_wire_mapper.d.ts +0 -14
  209. package/build/core/validation/contract/cargo_movement_wire_mapper.d.ts.map +0 -1
  210. package/build/core/validation/contract/cargo_movement_wire_mapper.js +0 -43
  211. package/build/core/validation/contract/format_zod_error.d.ts +0 -8
  212. package/build/core/validation/contract/format_zod_error.d.ts.map +0 -1
  213. package/build/core/validation/contract/format_zod_error.js +0 -11
  214. package/build/core/validation/contract/index.d.ts +0 -9
  215. package/build/core/validation/contract/index.d.ts.map +0 -1
  216. package/build/core/validation/contract/index.js +0 -8
  217. package/build/core/validation/contract/map_contract_to_wire_shape.d.ts +0 -3
  218. package/build/core/validation/contract/map_contract_to_wire_shape.d.ts.map +0 -1
  219. package/build/core/validation/contract/map_contract_to_wire_shape.js +0 -33
  220. package/build/core/validation/contract/map_input_config.d.ts +0 -9
  221. package/build/core/validation/contract/map_input_config.d.ts.map +0 -1
  222. package/build/core/validation/contract/map_input_config.js +0 -40
  223. package/build/core/validation/contract/map_wire_input_to_contract_shape.d.ts +0 -2
  224. package/build/core/validation/contract/map_wire_input_to_contract_shape.d.ts.map +0 -1
  225. package/build/core/validation/contract/map_wire_input_to_contract_shape.js +0 -66
  226. package/build/core/validation/contract/map_wire_item_stacking.d.ts +0 -7
  227. package/build/core/validation/contract/map_wire_item_stacking.d.ts.map +0 -1
  228. package/build/core/validation/contract/map_wire_item_stacking.js +0 -40
  229. package/build/core/validation/contract/map_wire_item_to_contract.d.ts +0 -8
  230. package/build/core/validation/contract/map_wire_item_to_contract.d.ts.map +0 -1
  231. package/build/core/validation/contract/map_wire_item_to_contract.js +0 -51
  232. package/build/core/validation/contract/parse_stabilizer_input.d.ts +0 -90
  233. package/build/core/validation/contract/parse_stabilizer_input.d.ts.map +0 -1
  234. package/build/core/validation/contract/parse_stabilizer_input.js +0 -28
  235. package/build/core/validation/contract/parse_stabilizer_output.d.ts +0 -79
  236. package/build/core/validation/contract/parse_stabilizer_output.d.ts.map +0 -1
  237. package/build/core/validation/contract/parse_stabilizer_output.js +0 -24
  238. package/build/core/validation/contract/reject_forbidden_input_fields.d.ts +0 -6
  239. package/build/core/validation/contract/reject_forbidden_input_fields.d.ts.map +0 -1
  240. package/build/core/validation/contract/reject_forbidden_input_fields.js +0 -53
  241. package/build/core/validation/contract/stabilizer_domain_schema.d.ts +0 -72
  242. package/build/core/validation/contract/stabilizer_domain_schema.d.ts.map +0 -1
  243. package/build/core/validation/contract/stabilizer_domain_schema.js +0 -42
  244. package/build/core/validation/contract/stabilizer_env_schema.d.ts +0 -112
  245. package/build/core/validation/contract/stabilizer_env_schema.d.ts.map +0 -1
  246. package/build/core/validation/contract/stabilizer_env_schema.js +0 -38
  247. package/build/core/validation/contract/stabilizer_input_schema.d.ts +0 -80
  248. package/build/core/validation/contract/stabilizer_input_schema.d.ts.map +0 -1
  249. package/build/core/validation/contract/stabilizer_input_schema.js +0 -11
  250. package/build/core/validation/contract/stabilizer_item_schema.d.ts +0 -25
  251. package/build/core/validation/contract/stabilizer_item_schema.d.ts.map +0 -1
  252. package/build/core/validation/contract/stabilizer_item_schema.js +0 -23
  253. package/build/core/validation/contract/stabilizer_output_schema.d.ts +0 -134
  254. package/build/core/validation/contract/stabilizer_output_schema.d.ts.map +0 -1
  255. package/build/core/validation/contract/stabilizer_output_schema.js +0 -16
  256. package/build/core/validation/contract/uniquify_contract_item_ids.d.ts +0 -14
  257. package/build/core/validation/contract/uniquify_contract_item_ids.d.ts.map +0 -1
  258. package/build/core/validation/contract/uniquify_contract_item_ids.js +0 -54
  259. package/build/core/validation/contract/wire_mapper_record_utils.d.ts +0 -34
  260. package/build/core/validation/contract/wire_mapper_record_utils.d.ts.map +0 -1
  261. package/build/core/validation/contract/wire_mapper_record_utils.js +0 -66
  262. package/build/core/waypoint/milkrun_wall_reservation.d.ts +0 -24
  263. package/build/core/waypoint/milkrun_wall_reservation.d.ts.map +0 -1
  264. package/build/core/waypoint/milkrun_wall_reservation.js +0 -57
  265. package/build/core/waypoint/milkrun_wall_reservation_helpers.d.ts +0 -15
  266. package/build/core/waypoint/milkrun_wall_reservation_helpers.d.ts.map +0 -1
  267. package/build/core/waypoint/milkrun_wall_reservation_helpers.js +0 -48
  268. package/build/core/waypoint/milkrun_wall_reservation_types.d.ts +0 -16
  269. package/build/core/waypoint/milkrun_wall_reservation_types.d.ts.map +0 -1
  270. package/build/core/waypoint/milkrun_wall_reservation_types.js +0 -1
@@ -1,34 +0,0 @@
1
- /**
2
- * @param value - Unknown value.
3
- * @returns True when value is a plain object record.
4
- */
5
- export declare function is_record(value: unknown): value is Record<string, unknown>;
6
- /**
7
- * Renames object keys using a wire-to-contract map, preserving unmapped keys.
8
- * @param source - Source record.
9
- * @param key_map - Key rename map.
10
- * @returns Record with renamed keys.
11
- */
12
- export declare function rename_keys(source: Record<string, unknown>, key_map: Record<string, string>): Record<string, unknown>;
13
- /**
14
- * Picks only allowed keys from a record.
15
- * @param source - Source record.
16
- * @param allowed_keys - Keys to retain.
17
- * @returns Filtered record.
18
- */
19
- export declare function pick_keys(source: Record<string, unknown>, allowed_keys: string[]): Record<string, unknown>;
20
- /**
21
- * Reads the value of the first candidate key present on the record.
22
- * @param source - Source record.
23
- * @param candidate_keys - Candidate keys in precedence order.
24
- * @returns Value of the first present key, or undefined when none is present.
25
- */
26
- export declare function read_first_present(source: Record<string, unknown>, candidate_keys: readonly string[]): unknown;
27
- /**
28
- * Keeps every defined key except the excluded ones.
29
- * @param source - Source record.
30
- * @param excluded_keys - Keys to drop.
31
- * @returns Filtered record.
32
- */
33
- export declare function omit_keys(source: Record<string, unknown>, excluded_keys: string[]): Record<string, unknown>;
34
- //# sourceMappingURL=wire_mapper_record_utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wire_mapper_record_utils.d.ts","sourceRoot":"","sources":["../../../../src/core/validation/contract/wire_mapper_record_utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAG1E;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACvB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASzB;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CACrB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,YAAY,EAAE,MAAM,EAAE,GACvB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAWzB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,cAAc,EAAE,SAAS,MAAM,EAAE,GAClC,OAAO,CAUT;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CACrB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,aAAa,EAAE,MAAM,EAAE,GACxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAYzB"}
@@ -1,66 +0,0 @@
1
- /**
2
- * @param value - Unknown value.
3
- * @returns True when value is a plain object record.
4
- */
5
- export function is_record(value) {
6
- return typeof value === 'object' && value !== null && !Array.isArray(value);
7
- }
8
- /**
9
- * Renames object keys using a wire-to-contract map, preserving unmapped keys.
10
- * @param source - Source record.
11
- * @param key_map - Key rename map.
12
- * @returns Record with renamed keys.
13
- */
14
- export function rename_keys(source, key_map) {
15
- const target = {};
16
- for (const [key, value] of Object.entries(source)) {
17
- const contract_key = key_map[key] ?? key;
18
- target[contract_key] = value;
19
- }
20
- return target;
21
- }
22
- /**
23
- * Picks only allowed keys from a record.
24
- * @param source - Source record.
25
- * @param allowed_keys - Keys to retain.
26
- * @returns Filtered record.
27
- */
28
- export function pick_keys(source, allowed_keys) {
29
- const picked = {};
30
- for (const key of allowed_keys) {
31
- if (source[key] !== undefined) {
32
- picked[key] = source[key];
33
- }
34
- }
35
- return picked;
36
- }
37
- /**
38
- * Reads the value of the first candidate key present on the record.
39
- * @param source - Source record.
40
- * @param candidate_keys - Candidate keys in precedence order.
41
- * @returns Value of the first present key, or undefined when none is present.
42
- */
43
- export function read_first_present(source, candidate_keys) {
44
- for (const key of candidate_keys) {
45
- if (Object.hasOwn(source, key)) {
46
- return source[key];
47
- }
48
- }
49
- return undefined;
50
- }
51
- /**
52
- * Keeps every defined key except the excluded ones.
53
- * @param source - Source record.
54
- * @param excluded_keys - Keys to drop.
55
- * @returns Filtered record.
56
- */
57
- export function omit_keys(source, excluded_keys) {
58
- const kept = {};
59
- for (const [key, value] of Object.entries(source)) {
60
- if (excluded_keys.includes(key) || value === undefined) {
61
- continue;
62
- }
63
- kept[key] = value;
64
- }
65
- return kept;
66
- }
@@ -1,24 +0,0 @@
1
- import type { StabilizerContainer } from '../validation/contract/stabilizer_domain_schema.js';
2
- import type { WaypointMode } from './WaypointMode.js';
3
- import type { MilkrunPositionCheck, MilkrunReservedBand } from './milkrun_wall_reservation_types.js';
4
- export type { MilkrunPositionCheck, MilkrunReservedBand } from './milkrun_wall_reservation_types.js';
5
- /**
6
- * Builds reserved Z bands for the last N waypoints' compound walls per container.
7
- * @param containers - Baseline container layout.
8
- * @param mode - Waypoint mode.
9
- * @param wall_count - Number of trailing waypoints to reserve.
10
- * @returns Reserved Z bands (empty when wall_count is zero or single-waypoint mode).
11
- */
12
- export declare function build_milkrun_reserved_z_bands(containers: StabilizerContainer[], mode: WaypointMode, wall_count: number): MilkrunReservedBand[];
13
- /**
14
- * @param request - Reserved bands and candidate placement.
15
- * @returns True when candidate overlaps a reserved band.
16
- */
17
- export declare function is_position_in_milkrun_reserved_band(request: MilkrunPositionCheck): boolean;
18
- /**
19
- * @param containers - Layout to validate.
20
- * @param bands - Reserved milkrun Z bands.
21
- * @returns True when no loose item overlaps a reserved band.
22
- */
23
- export declare function is_layout_milkrun_valid(containers: StabilizerContainer[], bands: MilkrunReservedBand[]): boolean;
24
- //# sourceMappingURL=milkrun_wall_reservation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"milkrun_wall_reservation.d.ts","sourceRoot":"","sources":["../../../src/core/waypoint/milkrun_wall_reservation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAkB,MAAM,oDAAoD,CAAA;AAC7G,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAGrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAEpG,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAEpG;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAC1C,UAAU,EAAE,mBAAmB,EAAE,EACjC,IAAI,EAAE,YAAY,EAClB,UAAU,EAAE,MAAM,GACnB,mBAAmB,EAAE,CAiBvB;AAED;;;GAGG;AACH,wBAAgB,oCAAoC,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAS3F;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACnC,UAAU,EAAE,mBAAmB,EAAE,EACjC,KAAK,EAAE,mBAAmB,EAAE,GAC7B,OAAO,CAUT"}
@@ -1,57 +0,0 @@
1
- import { is_loose_item } from '../filters/loose_item_filter.js';
2
- import { build_container_milkrun_band } from './milkrun_wall_reservation_helpers.js';
3
- /**
4
- * Builds reserved Z bands for the last N waypoints' compound walls per container.
5
- * @param containers - Baseline container layout.
6
- * @param mode - Waypoint mode.
7
- * @param wall_count - Number of trailing waypoints to reserve.
8
- * @returns Reserved Z bands (empty when wall_count is zero or single-waypoint mode).
9
- */
10
- export function build_milkrun_reserved_z_bands(containers, mode, wall_count) {
11
- if (wall_count <= 0 || mode.kind === 'SINGLE_WAYPOINT') {
12
- return [];
13
- }
14
- return containers.flatMap((container, container_index) => {
15
- const band = build_container_milkrun_band({
16
- container,
17
- mode,
18
- wall_count,
19
- container_index
20
- });
21
- return band ? [band] : [];
22
- });
23
- }
24
- /**
25
- * @param request - Reserved bands and candidate placement.
26
- * @returns True when candidate overlaps a reserved band.
27
- */
28
- export function is_position_in_milkrun_reserved_band(request) {
29
- const item_z_min = request.position.z;
30
- const item_z_max = request.position.z + request.item.depth;
31
- return request.bands.some(band => band.container_index === request.container_index &&
32
- item_z_min < band.z_max &&
33
- item_z_max > band.z_min);
34
- }
35
- /**
36
- * @param containers - Layout to validate.
37
- * @param bands - Reserved milkrun Z bands.
38
- * @returns True when no loose item overlaps a reserved band.
39
- */
40
- export function is_layout_milkrun_valid(containers, bands) {
41
- if (bands.length === 0) {
42
- return true;
43
- }
44
- return containers.every((container, container_index) => container.items.every(item => is_loose_item_position_valid(item, bands, container_index)));
45
- }
46
- function is_loose_item_position_valid(item, bands, container_index) {
47
- if (!is_loose_item(item)) {
48
- return true;
49
- }
50
- const overlaps = is_position_in_milkrun_reserved_band({
51
- bands,
52
- container_index,
53
- item,
54
- position: { z: item.z }
55
- });
56
- return !overlaps;
57
- }
@@ -1,15 +0,0 @@
1
- import type { StabilizerContainer } from '../validation/contract/stabilizer_domain_schema.js';
2
- import type { WaypointMode } from './WaypointMode.js';
3
- import type { MilkrunReservedBand } from './milkrun_wall_reservation_types.js';
4
- export interface ContainerMilkrunBandRequest {
5
- container: StabilizerContainer;
6
- mode: WaypointMode;
7
- wall_count: number;
8
- container_index: number;
9
- }
10
- /**
11
- * @param request - Container milkrun band request.
12
- * @returns Reserved Z band for one container.
13
- */
14
- export declare function build_container_milkrun_band(request: ContainerMilkrunBandRequest): MilkrunReservedBand | undefined;
15
- //# sourceMappingURL=milkrun_wall_reservation_helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"milkrun_wall_reservation_helpers.d.ts","sourceRoot":"","sources":["../../../src/core/waypoint/milkrun_wall_reservation_helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAA;AAC7F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAGrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAE9E,MAAM,WAAW,2BAA2B;IAExC,SAAS,EAAE,mBAAmB,CAAA;IAC9B,IAAI,EAAE,YAAY,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,EAAE,MAAM,CAAA;CAC1B;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CACxC,OAAO,EAAE,2BAA2B,GACrC,mBAAmB,GAAG,SAAS,CAwBjC"}
@@ -1,48 +0,0 @@
1
- import { is_loose_item } from '../filters/loose_item_filter.js';
2
- import { resolve_item_waypoint_id } from './validate_waypoint_ids.js';
3
- /**
4
- * @param request - Container milkrun band request.
5
- * @returns Reserved Z band for one container.
6
- */
7
- export function build_container_milkrun_band(request) {
8
- const order = build_compound_waypoint_order(request.container.items, request.mode);
9
- const reserved_waypoints = order.slice(-request.wall_count);
10
- if (reserved_waypoints.length === 0) {
11
- return undefined;
12
- }
13
- const z_values = collect_compound_z_extents(request.container.items, request.mode, reserved_waypoints);
14
- if (z_values.length === 0) {
15
- return undefined;
16
- }
17
- return {
18
- container_index: request.container_index,
19
- z_min: Math.min(...z_values),
20
- z_max: Math.max(...z_values)
21
- };
22
- }
23
- function build_compound_waypoint_order(items, mode) {
24
- const compound_items = items.filter(item => !is_loose_item(item));
25
- const sorted = [...compound_items].sort((left, right) => left.z - right.z);
26
- const vector = [];
27
- for (const item of sorted) {
28
- const waypoint_id = resolve_item_waypoint_id(item, mode);
29
- if (vector.length === 0 || vector[vector.length - 1] !== waypoint_id) {
30
- vector.push(waypoint_id);
31
- }
32
- }
33
- return vector;
34
- }
35
- function collect_compound_z_extents(items, mode, reserved_waypoints) {
36
- const z_values = [];
37
- for (const item of items) {
38
- if (is_loose_item(item)) {
39
- continue;
40
- }
41
- const waypoint_id = resolve_item_waypoint_id(item, mode);
42
- if (!reserved_waypoints.includes(waypoint_id)) {
43
- continue;
44
- }
45
- z_values.push(item.z, item.z + item.depth);
46
- }
47
- return z_values;
48
- }
@@ -1,16 +0,0 @@
1
- export interface MilkrunReservedBand {
2
- container_index: number;
3
- z_min: number;
4
- z_max: number;
5
- }
6
- export interface MilkrunPositionCheck {
7
- bands: MilkrunReservedBand[];
8
- container_index: number;
9
- item: {
10
- depth: number;
11
- };
12
- position: {
13
- z: number;
14
- };
15
- }
16
- //# sourceMappingURL=milkrun_wall_reservation_types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"milkrun_wall_reservation_types.d.ts","sourceRoot":"","sources":["../../../src/core/waypoint/milkrun_wall_reservation_types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAEhC,eAAe,EAAE,MAAM,CAAA;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,oBAAoB;IAEjC,KAAK,EAAE,mBAAmB,EAAE,CAAA;IAC5B,eAAe,EAAE,MAAM,CAAA;IACvB,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IACvB,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAC1B"}
@@ -1 +0,0 @@
1
- export {};