@classytic/stage 0.2.0 → 0.4.0

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 (458) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +5 -1
  3. package/dist/_virtual/_rolldown/runtime.mjs +18 -0
  4. package/dist/assets/index.mjs +0 -1
  5. package/dist/atomic/aufbau.d.mts +144 -0
  6. package/dist/atomic/aufbau.mjs +384 -0
  7. package/dist/atomic/elements.d.mts +67 -0
  8. package/dist/atomic/elements.mjs +785 -0
  9. package/dist/atomic/emission.d.mts +112 -0
  10. package/dist/atomic/emission.mjs +179 -0
  11. package/dist/atomic/index.d.mts +8 -0
  12. package/dist/atomic/index.mjs +9 -0
  13. package/dist/atomic/periodic.d.mts +82 -0
  14. package/dist/atomic/periodic.mjs +231 -0
  15. package/dist/atomic/properties.d.mts +100 -0
  16. package/dist/atomic/properties.mjs +574 -0
  17. package/dist/atomic/shells.d.mts +137 -0
  18. package/dist/atomic/shells.mjs +170 -0
  19. package/dist/atomic/trends.d.mts +148 -0
  20. package/dist/atomic/trends.mjs +225 -0
  21. package/dist/builder/Palette.mjs +50 -89
  22. package/dist/builder/SceneBuilder.mjs +15 -73
  23. package/dist/chem/chromatography.d.mts +66 -0
  24. package/dist/chem/chromatography.mjs +63 -0
  25. package/dist/chem/complex.d.mts +114 -0
  26. package/dist/chem/complex.mjs +234 -0
  27. package/dist/chem/cycle.d.mts +75 -0
  28. package/dist/chem/cycle.mjs +145 -0
  29. package/dist/chem/equation.d.mts +86 -0
  30. package/dist/chem/equation.mjs +168 -0
  31. package/dist/chem/formula.d.mts +90 -0
  32. package/dist/chem/formula.mjs +201 -0
  33. package/dist/chem/functional-groups.d.mts +31 -0
  34. package/dist/chem/functional-groups.mjs +187 -0
  35. package/dist/chem/hazard.d.mts +94 -0
  36. package/dist/chem/hazard.mjs +329 -0
  37. package/dist/chem/index.d.mts +34 -33
  38. package/dist/chem/index.mjs +34 -28
  39. package/dist/chem/ionic.d.mts +98 -0
  40. package/dist/chem/ionic.mjs +156 -0
  41. package/dist/chem/layout.d.mts +46 -0
  42. package/dist/chem/layout.mjs +342 -0
  43. package/dist/chem/lewis.d.mts +79 -0
  44. package/dist/chem/lewis.mjs +163 -0
  45. package/dist/chem/molecular-orbital.d.mts +114 -0
  46. package/dist/chem/molecular-orbital.mjs +201 -0
  47. package/dist/chem/molecule.d.mts +154 -0
  48. package/dist/chem/molecule.mjs +282 -0
  49. package/dist/chem/nmr.d.mts +153 -0
  50. package/dist/chem/nmr.mjs +165 -0
  51. package/dist/chem/polymer.d.mts +65 -0
  52. package/dist/chem/polymer.mjs +179 -0
  53. package/dist/chem/redox.d.mts +138 -0
  54. package/dist/chem/redox.mjs +328 -0
  55. package/dist/chem/relations.d.mts +183 -0
  56. package/dist/chem/relations.mjs +299 -0
  57. package/dist/chem/skeleton.d.mts +51 -0
  58. package/dist/chem/skeleton.mjs +186 -0
  59. package/dist/chem/solution.d.mts +116 -0
  60. package/dist/chem/solution.mjs +186 -0
  61. package/dist/chem/species.d.mts +47 -0
  62. package/dist/chem/species.mjs +128 -0
  63. package/dist/chem/stereo.d.mts +108 -0
  64. package/dist/chem/stereo.mjs +286 -0
  65. package/dist/chem/stoichiometry.d.mts +95 -0
  66. package/dist/chem/stoichiometry.mjs +145 -0
  67. package/dist/chem/synthesis.d.mts +113 -0
  68. package/dist/chem/synthesis.mjs +281 -0
  69. package/dist/chem/vsepr.d.mts +80 -0
  70. package/dist/chem/vsepr.mjs +247 -0
  71. package/dist/circuit/ac.d.mts +163 -0
  72. package/dist/circuit/ac.mjs +452 -0
  73. package/dist/circuit/dc.d.mts +92 -0
  74. package/dist/circuit/dc.mjs +333 -0
  75. package/dist/circuit/index.d.mts +5 -92
  76. package/dist/circuit/index.mjs +5 -332
  77. package/dist/circuit/network.d.mts +99 -0
  78. package/dist/circuit/network.mjs +440 -0
  79. package/dist/circuit/topology.d.mts +102 -0
  80. package/dist/circuit/topology.mjs +143 -0
  81. package/dist/colour/absorption.d.mts +79 -0
  82. package/dist/colour/absorption.mjs +137 -0
  83. package/dist/colour/index.d.mts +6 -0
  84. package/dist/colour/index.mjs +7 -0
  85. package/dist/colour/name.d.mts +14 -0
  86. package/dist/colour/name.mjs +76 -0
  87. package/dist/colour/observer.d.mts +31 -0
  88. package/dist/colour/observer.mjs +46 -0
  89. package/dist/colour/spectrum.d.mts +61 -0
  90. package/dist/colour/spectrum.mjs +108 -0
  91. package/dist/colour/srgb.d.mts +49 -0
  92. package/dist/colour/srgb.mjs +108 -0
  93. package/dist/core/constants.d.mts +138 -0
  94. package/dist/core/constants.mjs +139 -0
  95. package/dist/core/index.d.mts +4 -1
  96. package/dist/core/index.mjs +4 -1
  97. package/dist/core/math.d.mts +26 -0
  98. package/dist/core/math.mjs +37 -0
  99. package/dist/core/vec3.d.mts +94 -0
  100. package/dist/core/vec3.mjs +123 -0
  101. package/dist/core/worked.d.mts +35 -0
  102. package/dist/core/worked.mjs +44 -0
  103. package/dist/electro/cell.d.mts +102 -0
  104. package/dist/electro/cell.mjs +170 -0
  105. package/dist/electro/conductivity.d.mts +157 -0
  106. package/dist/electro/conductivity.mjs +156 -0
  107. package/dist/electro/couples.d.mts +114 -0
  108. package/dist/electro/couples.mjs +334 -0
  109. package/dist/electro/electrolysis.d.mts +96 -0
  110. package/dist/electro/electrolysis.mjs +274 -0
  111. package/dist/electro/faraday.d.mts +150 -0
  112. package/dist/electro/faraday.mjs +118 -0
  113. package/dist/electro/index.d.mts +6 -0
  114. package/dist/electro/index.mjs +7 -0
  115. package/dist/finance/accounting/adjustments.d.mts +17 -0
  116. package/dist/finance/accounting/adjustments.mjs +202 -0
  117. package/dist/finance/accounting/analysis.d.mts +8 -0
  118. package/dist/finance/accounting/analysis.mjs +205 -0
  119. package/dist/finance/accounting/clubs.d.mts +21 -0
  120. package/dist/finance/accounting/clubs.mjs +217 -0
  121. package/dist/finance/accounting/company-statements.d.mts +7 -0
  122. package/dist/finance/accounting/company-statements.mjs +150 -0
  123. package/dist/finance/accounting/harness.d.mts +7 -0
  124. package/dist/finance/accounting/harness.mjs +45 -0
  125. package/dist/finance/accounting/index.d.mts +18 -0
  126. package/dist/finance/accounting/index.mjs +18 -0
  127. package/dist/finance/accounting/journalize.d.mts +16 -0
  128. package/dist/finance/accounting/journalize.mjs +128 -0
  129. package/dist/finance/accounting/manufacturing.d.mts +8 -0
  130. package/dist/finance/accounting/manufacturing.mjs +236 -0
  131. package/dist/finance/accounting/partnership.d.mts +7 -0
  132. package/dist/finance/accounting/partnership.mjs +152 -0
  133. package/dist/finance/accounting/period-case.d.mts +6 -0
  134. package/dist/finance/accounting/period-case.mjs +71 -0
  135. package/dist/finance/accounting/post.d.mts +9 -0
  136. package/dist/finance/accounting/post.mjs +84 -0
  137. package/dist/finance/accounting/precision.d.mts +9 -0
  138. package/dist/finance/accounting/precision.mjs +15 -0
  139. package/dist/finance/accounting/rules.d.mts +21 -0
  140. package/dist/finance/accounting/rules.mjs +37 -0
  141. package/dist/finance/accounting/solve.d.mts +28 -0
  142. package/dist/finance/accounting/solve.mjs +92 -0
  143. package/dist/finance/accounting/statements.d.mts +7 -0
  144. package/dist/finance/accounting/statements.mjs +142 -0
  145. package/dist/finance/accounting/types.d.mts +649 -0
  146. package/dist/finance/accounting/validate.d.mts +7 -0
  147. package/dist/finance/accounting/validate.mjs +67 -0
  148. package/dist/finance/accounting/verification.d.mts +24 -0
  149. package/dist/finance/accounting/verification.mjs +386 -0
  150. package/dist/finance/bizsim.d.mts +75 -0
  151. package/dist/finance/bizsim.mjs +296 -0
  152. package/dist/finance/index.d.mts +95 -0
  153. package/dist/finance/index.mjs +145 -0
  154. package/dist/finance/investment-math.d.mts +7 -0
  155. package/dist/finance/investment-math.mjs +18 -0
  156. package/dist/finance/management-accounting/budgeting.d.mts +7 -0
  157. package/dist/finance/management-accounting/budgeting.mjs +189 -0
  158. package/dist/finance/management-accounting/cash-budget.d.mts +7 -0
  159. package/dist/finance/management-accounting/cash-budget.mjs +154 -0
  160. package/dist/finance/management-accounting/costing.d.mts +8 -0
  161. package/dist/finance/management-accounting/costing.mjs +175 -0
  162. package/dist/finance/management-accounting/decisions.d.mts +8 -0
  163. package/dist/finance/management-accounting/decisions.mjs +164 -0
  164. package/dist/finance/management-accounting/index.d.mts +13 -0
  165. package/dist/finance/management-accounting/index.mjs +13 -0
  166. package/dist/finance/management-accounting/integrated-budget.d.mts +8 -0
  167. package/dist/finance/management-accounting/integrated-budget.mjs +67 -0
  168. package/dist/finance/management-accounting/inventory-costing.d.mts +7 -0
  169. package/dist/finance/management-accounting/inventory-costing.mjs +173 -0
  170. package/dist/finance/management-accounting/investment-appraisal.d.mts +7 -0
  171. package/dist/finance/management-accounting/investment-appraisal.mjs +148 -0
  172. package/dist/finance/management-accounting/management-case.d.mts +8 -0
  173. package/dist/finance/management-accounting/management-case.mjs +91 -0
  174. package/dist/finance/management-accounting/master-budget.d.mts +7 -0
  175. package/dist/finance/management-accounting/master-budget.mjs +137 -0
  176. package/dist/finance/management-accounting/production-costing.d.mts +8 -0
  177. package/dist/finance/management-accounting/production-costing.mjs +214 -0
  178. package/dist/finance/management-accounting/types.d.mts +644 -0
  179. package/dist/finance/management-accounting/variances.d.mts +7 -0
  180. package/dist/finance/management-accounting/variances.mjs +150 -0
  181. package/dist/index.d.mts +9 -8
  182. package/dist/index.mjs +5 -5
  183. package/dist/interaction/MovableDot.mjs +19 -0
  184. package/dist/interaction/useDraggable.mjs +24 -4
  185. package/dist/math/analysis.d.mts +61 -0
  186. package/dist/math/analysis.mjs +187 -0
  187. package/dist/math/answer-check.d.mts +50 -0
  188. package/dist/math/answer-check.mjs +106 -0
  189. package/dist/math/calculus.d.mts +17 -1
  190. package/dist/math/calculus.mjs +365 -2
  191. package/dist/math/complex.d.mts +93 -0
  192. package/dist/math/complex.mjs +239 -0
  193. package/dist/math/expr.d.mts +23 -0
  194. package/dist/math/expr.mjs +36 -0
  195. package/dist/math/index.d.mts +9 -23
  196. package/dist/math/index.mjs +9 -38
  197. package/dist/math/latex.mjs +10 -1
  198. package/dist/math/parse.mjs +1 -1
  199. package/dist/math/poly.d.mts +55 -0
  200. package/dist/math/poly.mjs +273 -0
  201. package/dist/math/rearrange.d.mts +14 -0
  202. package/dist/math/rearrange.mjs +125 -0
  203. package/dist/math/solve.d.mts +21 -0
  204. package/dist/math/solve.mjs +75 -0
  205. package/dist/networking/addressing.d.mts +26 -0
  206. package/dist/networking/addressing.mjs +33 -0
  207. package/dist/networking/cloud/access.d.mts +36 -0
  208. package/dist/networking/cloud/access.mjs +95 -0
  209. package/dist/networking/cloud/containers.d.mts +43 -0
  210. package/dist/networking/cloud/containers.mjs +54 -0
  211. package/dist/networking/cloud/edge.d.mts +17 -0
  212. package/dist/networking/cloud/edge.mjs +31 -0
  213. package/dist/networking/cloud/failure-domains.d.mts +19 -0
  214. package/dist/networking/cloud/failure-domains.mjs +22 -0
  215. package/dist/networking/cloud/geo-routing.d.mts +22 -0
  216. package/dist/networking/cloud/geo-routing.mjs +64 -0
  217. package/dist/networking/cloud/index.d.mts +18 -0
  218. package/dist/networking/cloud/index.mjs +19 -0
  219. package/dist/networking/cloud/inference-reliability.d.mts +30 -0
  220. package/dist/networking/cloud/inference-reliability.mjs +76 -0
  221. package/dist/networking/cloud/inference.d.mts +118 -0
  222. package/dist/networking/cloud/inference.mjs +179 -0
  223. package/dist/networking/cloud/infrastructure.d.mts +45 -0
  224. package/dist/networking/cloud/infrastructure.mjs +96 -0
  225. package/dist/networking/cloud/observability.d.mts +24 -0
  226. package/dist/networking/cloud/observability.mjs +34 -0
  227. package/dist/networking/cloud/orchestration.d.mts +32 -0
  228. package/dist/networking/cloud/orchestration.mjs +38 -0
  229. package/dist/networking/cloud/recovery.d.mts +21 -0
  230. package/dist/networking/cloud/recovery.mjs +27 -0
  231. package/dist/networking/cloud/releases.d.mts +42 -0
  232. package/dist/networking/cloud/releases.mjs +135 -0
  233. package/dist/networking/cloud/scaling.d.mts +25 -0
  234. package/dist/networking/cloud/scaling.mjs +65 -0
  235. package/dist/networking/cloud/secrets.d.mts +39 -0
  236. package/dist/networking/cloud/secrets.mjs +68 -0
  237. package/dist/networking/cloud/server-deployment.d.mts +29 -0
  238. package/dist/networking/cloud/server-deployment.mjs +72 -0
  239. package/dist/networking/cloud/storage.d.mts +16 -0
  240. package/dist/networking/cloud/storage.mjs +58 -0
  241. package/dist/networking/cloud/vpc.d.mts +18 -0
  242. package/dist/networking/cloud/vpc.mjs +100 -0
  243. package/dist/networking/delivery.d.mts +34 -0
  244. package/dist/networking/delivery.mjs +52 -0
  245. package/dist/networking/index.d.mts +47 -0
  246. package/dist/networking/index.mjs +47 -0
  247. package/dist/networking/ipv6.d.mts +28 -0
  248. package/dist/networking/ipv6.mjs +17 -0
  249. package/dist/networking/journeys.d.mts +83 -0
  250. package/dist/networking/journeys.mjs +161 -0
  251. package/dist/networking/models/airtime.d.mts +87 -0
  252. package/dist/networking/models/airtime.mjs +130 -0
  253. package/dist/networking/models/cellular.d.mts +157 -0
  254. package/dist/networking/models/cellular.mjs +252 -0
  255. package/dist/networking/models/encapsulation.d.mts +98 -0
  256. package/dist/networking/models/encapsulation.mjs +132 -0
  257. package/dist/networking/models/handover.d.mts +116 -0
  258. package/dist/networking/models/handover.mjs +209 -0
  259. package/dist/networking/models/handshake.d.mts +90 -0
  260. package/dist/networking/models/handshake.mjs +122 -0
  261. package/dist/networking/models/index.d.mts +14 -0
  262. package/dist/networking/models/index.mjs +15 -0
  263. package/dist/networking/models/media.d.mts +82 -0
  264. package/dist/networking/models/media.mjs +188 -0
  265. package/dist/networking/models/satellite.d.mts +86 -0
  266. package/dist/networking/models/satellite.mjs +121 -0
  267. package/dist/networking/models/spectrum.d.mts +83 -0
  268. package/dist/networking/models/spectrum.mjs +235 -0
  269. package/dist/networking/models/switch.d.mts +80 -0
  270. package/dist/networking/models/switch.mjs +155 -0
  271. package/dist/networking/models/vlan.d.mts +62 -0
  272. package/dist/networking/models/vlan.mjs +100 -0
  273. package/dist/networking/models/vpn.d.mts +66 -0
  274. package/dist/networking/models/vpn.mjs +125 -0
  275. package/dist/networking/models/wifi-privacy.d.mts +82 -0
  276. package/dist/networking/models/wifi-privacy.mjs +130 -0
  277. package/dist/networking/models/wifi.d.mts +240 -0
  278. package/dist/networking/models/wifi.mjs +562 -0
  279. package/dist/networking/nat-traversal.d.mts +24 -0
  280. package/dist/networking/nat-traversal.mjs +38 -0
  281. package/dist/networking/protocols.d.mts +17 -0
  282. package/dist/networking/protocols.mjs +57 -0
  283. package/dist/networking/queue.d.mts +12 -0
  284. package/dist/networking/queue.mjs +18 -0
  285. package/dist/networking/route-learning.d.mts +23 -0
  286. package/dist/networking/route-learning.mjs +43 -0
  287. package/dist/networking/routing.d.mts +11 -0
  288. package/dist/networking/routing.mjs +25 -0
  289. package/dist/networking/signals.d.mts +26 -0
  290. package/dist/networking/signals.mjs +35 -0
  291. package/dist/networking/subnet.d.mts +49 -0
  292. package/dist/networking/subnet.mjs +89 -0
  293. package/dist/networking/tcp-reliability.d.mts +24 -0
  294. package/dist/networking/tcp-reliability.mjs +38 -0
  295. package/dist/networking/topology/contract.d.mts +123 -0
  296. package/dist/networking/topology/index.d.mts +4 -0
  297. package/dist/networking/topology/index.mjs +4 -0
  298. package/dist/networking/topology/presets.d.mts +7 -0
  299. package/dist/networking/topology/presets.mjs +302 -0
  300. package/dist/networking/topology/simulation.d.mts +8 -0
  301. package/dist/networking/topology/simulation.mjs +179 -0
  302. package/dist/networking/wireless.d.mts +11 -0
  303. package/dist/networking/wireless.mjs +17 -0
  304. package/dist/optics/imaging.d.mts +218 -0
  305. package/dist/optics/imaging.mjs +276 -0
  306. package/dist/optics/index.d.mts +7 -0
  307. package/dist/optics/index.mjs +8 -0
  308. package/dist/optics/laws.d.mts +70 -0
  309. package/dist/optics/laws.mjs +195 -0
  310. package/dist/optics/prism.d.mts +148 -0
  311. package/dist/optics/prism.mjs +197 -0
  312. package/dist/optics/refraction.d.mts +201 -0
  313. package/dist/optics/refraction.mjs +270 -0
  314. package/dist/optics/wave-optics.d.mts +171 -0
  315. package/dist/optics/wave-optics.mjs +259 -0
  316. package/dist/physics/ac/index.d.mts +183 -0
  317. package/dist/physics/ac/index.mjs +203 -0
  318. package/dist/physics/dynamics/forces.d.mts +98 -0
  319. package/dist/physics/dynamics/forces.mjs +153 -0
  320. package/dist/physics/dynamics/friction.d.mts +76 -0
  321. package/dist/physics/dynamics/friction.mjs +119 -0
  322. package/dist/physics/dynamics/system.d.mts +68 -0
  323. package/dist/physics/dynamics/system.mjs +125 -0
  324. package/dist/physics/electrostatics/index.d.mts +169 -0
  325. package/dist/physics/electrostatics/index.mjs +249 -0
  326. package/dist/physics/energy/centre-of-mass.d.mts +115 -0
  327. package/dist/physics/energy/centre-of-mass.mjs +180 -0
  328. package/dist/physics/energy/conservation.d.mts +81 -0
  329. package/dist/physics/energy/conservation.mjs +129 -0
  330. package/dist/physics/energy/power.d.mts +90 -0
  331. package/dist/physics/energy/power.mjs +167 -0
  332. package/dist/physics/energy/spring.d.mts +73 -0
  333. package/dist/physics/energy/spring.mjs +129 -0
  334. package/dist/physics/energy/store.d.mts +63 -0
  335. package/dist/physics/energy/store.mjs +108 -0
  336. package/dist/physics/energy/theorem.d.mts +65 -0
  337. package/dist/physics/energy/theorem.mjs +113 -0
  338. package/dist/physics/energy/work.d.mts +114 -0
  339. package/dist/physics/energy/work.mjs +219 -0
  340. package/dist/physics/gravitation/body.d.mts +85 -0
  341. package/dist/physics/gravitation/body.mjs +168 -0
  342. package/dist/physics/gravitation/kepler.d.mts +127 -0
  343. package/dist/physics/gravitation/kepler.mjs +216 -0
  344. package/dist/physics/gravitation/law.d.mts +117 -0
  345. package/dist/physics/gravitation/law.mjs +175 -0
  346. package/dist/physics/gravitation/orbit.d.mts +119 -0
  347. package/dist/physics/gravitation/orbit.mjs +202 -0
  348. package/dist/physics/gravitation/potential.d.mts +114 -0
  349. package/dist/physics/gravitation/potential.mjs +202 -0
  350. package/dist/physics/gravitation/variation.d.mts +97 -0
  351. package/dist/physics/gravitation/variation.mjs +175 -0
  352. package/dist/physics/index.d.mts +35 -0
  353. package/dist/physics/index.mjs +36 -0
  354. package/dist/physics/integral-sweep.d.mts +63 -0
  355. package/dist/physics/integral-sweep.mjs +126 -0
  356. package/dist/physics/kinematics/equations.d.mts +47 -0
  357. package/dist/physics/kinematics/equations.mjs +126 -0
  358. package/dist/physics/kinematics/free-fall.d.mts +53 -0
  359. package/dist/physics/kinematics/free-fall.mjs +71 -0
  360. package/dist/physics/kinematics/given.d.mts +16 -0
  361. package/dist/physics/kinematics/given.mjs +55 -0
  362. package/dist/physics/kinematics/roots.d.mts +41 -0
  363. package/dist/physics/kinematics/roots.mjs +72 -0
  364. package/dist/physics/kinematics/solve.d.mts +52 -0
  365. package/dist/physics/kinematics/solve.mjs +172 -0
  366. package/dist/physics/magnetism/biot-savart.d.mts +161 -0
  367. package/dist/physics/magnetism/biot-savart.mjs +353 -0
  368. package/dist/physics/magnetism/flux.d.mts +94 -0
  369. package/dist/physics/magnetism/flux.mjs +313 -0
  370. package/dist/physics/magnetism/geomagnetism.d.mts +151 -0
  371. package/dist/physics/magnetism/geomagnetism.mjs +184 -0
  372. package/dist/physics/magnetism/index.d.mts +12 -0
  373. package/dist/physics/magnetism/index.mjs +74 -0
  374. package/dist/physics/magnetism/lorentz.d.mts +28 -0
  375. package/dist/physics/magnetism/lorentz.mjs +88 -0
  376. package/dist/physics/magnetism/magnetic-force.d.mts +102 -0
  377. package/dist/physics/magnetism/magnetic-force.mjs +169 -0
  378. package/dist/physics/momentum/collide.d.mts +77 -0
  379. package/dist/physics/momentum/collide.mjs +115 -0
  380. package/dist/physics/momentum/impulse.d.mts +89 -0
  381. package/dist/physics/momentum/impulse.mjs +159 -0
  382. package/dist/physics/momentum/planar.d.mts +60 -0
  383. package/dist/physics/momentum/planar.mjs +110 -0
  384. package/dist/physics/projectile.d.mts +107 -0
  385. package/dist/physics/projectile.mjs +185 -0
  386. package/dist/physics/rotation/angular.d.mts +85 -0
  387. package/dist/physics/rotation/angular.mjs +130 -0
  388. package/dist/physics/rotation/circular.d.mts +79 -0
  389. package/dist/physics/rotation/circular.mjs +131 -0
  390. package/dist/physics/rotation/inertia.d.mts +164 -0
  391. package/dist/physics/rotation/inertia.mjs +332 -0
  392. package/dist/physics/rotation/torque.d.mts +65 -0
  393. package/dist/physics/rotation/torque.mjs +134 -0
  394. package/dist/physics/vectors.d.mts +64 -0
  395. package/dist/physics/vectors.mjs +114 -0
  396. package/dist/primitives/Dot.d.mts +2 -15
  397. package/dist/primitives/Dot.mjs +6 -4
  398. package/dist/primitives/Grid.d.mts +33 -17
  399. package/dist/primitives/Grid.mjs +89 -17
  400. package/dist/primitives/Label.d.mts +1 -14
  401. package/dist/primitives/Label.mjs +3 -2
  402. package/dist/primitives/Lines.d.mts +4 -32
  403. package/dist/primitives/Lines.mjs +10 -8
  404. package/dist/primitives/Shapes.d.mts +5 -43
  405. package/dist/primitives/Shapes.mjs +12 -10
  406. package/dist/primitives/index.d.mts +2 -2
  407. package/dist/primitives/index.mjs +2 -2
  408. package/dist/primitives/props.mjs +31 -0
  409. package/dist/quantity/index.d.mts +119 -0
  410. package/dist/quantity/index.mjs +417 -0
  411. package/dist/relation/derive.d.mts +74 -0
  412. package/dist/relation/derive.mjs +73 -0
  413. package/dist/relation/index.d.mts +56 -0
  414. package/dist/relation/index.mjs +234 -0
  415. package/dist/scene/Scene.d.mts +6 -1
  416. package/dist/scene/Scene.mjs +15 -40
  417. package/dist/scene/evaluators.mjs +1 -1
  418. package/dist/sim/thermal.mjs +45 -20
  419. package/dist/thermo/calorimetry.d.mts +207 -0
  420. package/dist/thermo/calorimetry.mjs +345 -0
  421. package/dist/thermo/cycles.d.mts +142 -0
  422. package/dist/thermo/cycles.mjs +256 -0
  423. package/dist/thermo/entropy.d.mts +87 -0
  424. package/dist/thermo/entropy.mjs +140 -0
  425. package/dist/thermo/expansion.d.mts +130 -0
  426. package/dist/thermo/expansion.mjs +178 -0
  427. package/dist/thermo/gas.d.mts +197 -0
  428. package/dist/thermo/gas.mjs +279 -0
  429. package/dist/thermo/heat-transfer.d.mts +164 -0
  430. package/dist/thermo/heat-transfer.mjs +217 -0
  431. package/dist/thermo/index.d.mts +9 -82
  432. package/dist/thermo/index.mjs +9 -132
  433. package/dist/thermo/processes.d.mts +95 -0
  434. package/dist/thermo/processes.mjs +154 -0
  435. package/dist/thermo/temperature.d.mts +174 -0
  436. package/dist/thermo/temperature.mjs +236 -0
  437. package/dist/view/Stage.mjs +4 -11
  438. package/dist/waves/damping.d.mts +224 -0
  439. package/dist/waves/damping.mjs +317 -0
  440. package/dist/waves/doppler.d.mts +72 -0
  441. package/dist/waves/doppler.mjs +125 -0
  442. package/dist/waves/index.d.mts +10 -0
  443. package/dist/waves/index.mjs +10 -0
  444. package/dist/waves/pendulum.d.mts +130 -0
  445. package/dist/waves/pendulum.mjs +211 -0
  446. package/dist/waves/pitch.d.mts +125 -0
  447. package/dist/waves/pitch.mjs +158 -0
  448. package/dist/waves/shm.d.mts +170 -0
  449. package/dist/waves/shm.mjs +279 -0
  450. package/dist/waves/springs.d.mts +103 -0
  451. package/dist/waves/springs.mjs +176 -0
  452. package/dist/waves/superposition.d.mts +124 -0
  453. package/dist/waves/superposition.mjs +196 -0
  454. package/dist/waves/wave.d.mts +154 -0
  455. package/dist/waves/wave.mjs +178 -0
  456. package/package.json +103 -23
  457. package/styles.css +125 -8
  458. package/dist/assets/kit/index.mjs +0 -4
@@ -0,0 +1,95 @@
1
+ //#region src/networking/cloud/access.ts
2
+ const RESOURCES = [
3
+ "orders",
4
+ "payments",
5
+ "objects"
6
+ ];
7
+ const ACTIONS = [
8
+ "read",
9
+ "write",
10
+ "delete"
11
+ ];
12
+ const REQUIRED = {
13
+ "checkout-api": [
14
+ {
15
+ resource: "orders",
16
+ action: "read"
17
+ },
18
+ {
19
+ resource: "orders",
20
+ action: "write"
21
+ },
22
+ {
23
+ resource: "payments",
24
+ action: "write"
25
+ }
26
+ ],
27
+ "report-job": [{
28
+ resource: "orders",
29
+ action: "read"
30
+ }, {
31
+ resource: "payments",
32
+ action: "read"
33
+ }],
34
+ "backup-job": [{
35
+ resource: "objects",
36
+ action: "read"
37
+ }, {
38
+ resource: "objects",
39
+ action: "write"
40
+ }]
41
+ };
42
+ const keyOf = ({ resource, action }) => `${resource}:${action}`;
43
+ const everyPermission = () => RESOURCES.flatMap((resource) => ACTIONS.map((action) => ({
44
+ resource,
45
+ action
46
+ })));
47
+ function grants(workload, design) {
48
+ if (design === "least-privilege") return [...REQUIRED[workload]];
49
+ return everyPermission();
50
+ }
51
+ function evaluateWorkloadAccess(workload, design, incident) {
52
+ const required = [...REQUIRED[workload]];
53
+ const granted = grants(workload, design);
54
+ const requiredKeys = new Set(required.map(keyOf));
55
+ const grantedKeys = new Set(granted.map(keyOf));
56
+ const attempted = incident === "normal" ? required : everyPermission();
57
+ const resources = RESOURCES.map((resource) => {
58
+ const resourceRequired = required.filter((permission) => permission.resource === resource).map(({ action }) => action);
59
+ const resourceGranted = granted.filter((permission) => permission.resource === resource).map(({ action }) => action);
60
+ const resourceAttempted = attempted.filter((permission) => permission.resource === resource).map(({ action }) => action);
61
+ return {
62
+ resource,
63
+ required: resourceRequired,
64
+ granted: resourceGranted,
65
+ attempted: resourceAttempted,
66
+ allowed: resourceAttempted.filter((action) => grantedKeys.has(`${resource}:${action}`)),
67
+ denied: resourceAttempted.filter((action) => !grantedKeys.has(`${resource}:${action}`))
68
+ };
69
+ });
70
+ const taskWorks = required.every((permission) => grantedKeys.has(keyOf(permission)));
71
+ const excessPermissions = granted.filter((permission) => !requiredKeys.has(keyOf(permission))).length;
72
+ const identity = design === "shared-admin-key" ? "shared-key" : "workload-identity";
73
+ const attributable = identity === "workload-identity";
74
+ const leastPrivilege = taskWorks && excessPermissions === 0 && attributable;
75
+ const exposedPermissions = incident === "compromised" ? granted.length : required.length;
76
+ const message = !taskWorks ? "The workload cannot complete its intended task because a required permission is missing." : incident === "compromised" && excessPermissions > 0 ? `The task needed ${required.length} permissions, but compromise exposes ${granted.length}. Remove ${excessPermissions} unnecessary grants.` : incident === "compromised" ? `The identity is compromised, but policy confines it to the ${required.length} permissions its task already required.` : !attributable ? "The task works, but every workload shares one credential, so requests cannot be attributed or revoked independently." : excessPermissions > 0 ? "The workload has its own identity, but its broad role still permits unrelated actions." : "The workload has a distinct identity and only the permissions required for its task.";
77
+ return {
78
+ workload,
79
+ design,
80
+ incident,
81
+ identity,
82
+ attributable,
83
+ requiredPermissions: required.length,
84
+ grantedPermissions: granted.length,
85
+ excessPermissions,
86
+ exposedPermissions,
87
+ taskWorks,
88
+ leastPrivilege,
89
+ resources,
90
+ message
91
+ };
92
+ }
93
+
94
+ //#endregion
95
+ export { evaluateWorkloadAccess };
@@ -0,0 +1,43 @@
1
+ //#region src/networking/cloud/containers.d.ts
2
+ /**
3
+ * Package once, run repeatably: what a deployment artifact actually guarantees.
4
+ *
5
+ * Three things are deliberately kept apart here, because conflating them is the misconception the
6
+ * lab exists to break. Whether every replica runs the SAME BITS is a property of the artifact's
7
+ * identity. Whether a replica can be thrown away and replaced is a property of how it was installed.
8
+ * Whether the service survives that replacement is a property of where its state lives. A learner
9
+ * who fixes only the first still loses data on the next deploy.
10
+ */
11
+ type Artifact = "host-install" | "image-tag" | "image-digest";
12
+ type StatePlacement = "inside-container" | "external-service";
13
+ type HostDrift = "same" | "different";
14
+ /**
15
+ * What a replica is running, as a value rather than a sentence.
16
+ *
17
+ * The scene used to recover this by searching the prose for `'v3'` and `'19'`, which meant the
18
+ * drawing's idea of "this replica is wrong" was a substring match on a label. Naming the three
19
+ * outcomes lets the scene switch on them and lets the compiler check that it handled each.
20
+ */
21
+ type ReplicaVersion = "expected" | "stale-runtime" | "moved-tag";
22
+ /** Long form for a caption, short form for inside a replica box. Exhaustive by construction. */
23
+ declare const VERSION_TEXT: Record<ReplicaVersion, {
24
+ full: string;
25
+ short: string;
26
+ }>;
27
+ interface ContainerDeploymentResult {
28
+ artifact: Artifact;
29
+ state: StatePlacement;
30
+ drift: HostDrift;
31
+ replicas: number;
32
+ /** What each replica ended up running, in replica order. */
33
+ versions: ReplicaVersion[];
34
+ consistent: boolean;
35
+ replaceable: boolean;
36
+ durable: boolean;
37
+ capacity: number;
38
+ startupSeconds: number;
39
+ diagnosis: string;
40
+ }
41
+ declare function evaluateContainerDeployment(artifact: Artifact, state: StatePlacement, drift: HostDrift, replicas: number): ContainerDeploymentResult;
42
+ //#endregion
43
+ export { Artifact, ContainerDeploymentResult, HostDrift, ReplicaVersion, StatePlacement, VERSION_TEXT, evaluateContainerDeployment };
@@ -0,0 +1,54 @@
1
+ //#region src/networking/cloud/containers.ts
2
+ /** Long form for a caption, short form for inside a replica box. Exhaustive by construction. */
3
+ const VERSION_TEXT = {
4
+ expected: {
5
+ full: "runtime 20 + app v2",
6
+ short: "v2"
7
+ },
8
+ "stale-runtime": {
9
+ full: "runtime 19 + app v2",
10
+ short: "r19"
11
+ },
12
+ "moved-tag": {
13
+ full: "tag moved → v3",
14
+ short: "v3"
15
+ }
16
+ };
17
+ /** What a single replica ends up running, given the artifact it was launched from. */
18
+ function versionFor(artifact, drift, index, count) {
19
+ if (artifact === "host-install" && drift === "different" && index > 0) return "stale-runtime";
20
+ if (artifact === "image-tag" && drift === "different" && index === count - 1) return "moved-tag";
21
+ return "expected";
22
+ }
23
+ function evaluateContainerDeployment(artifact, state, drift, replicas) {
24
+ const count = Math.max(1, Math.min(4, Math.round(replicas)));
25
+ const versions = Array.from({ length: count }, (_, i) => versionFor(artifact, drift, i, count));
26
+ /**
27
+ * Consistency is READ OFF the replicas rather than predicted alongside them.
28
+ *
29
+ * It used to be its own expression (`digest || (tag && no drift)`), which could disagree with the
30
+ * versions the scene draws, and did: a host installation with no drift produces four identical
31
+ * replicas and was still reported inconsistent. That also made the host-install branch of the
32
+ * diagnosis below unreachable, which is how the contradiction stayed hidden. One replica cannot
33
+ * differ from itself, and this now says so.
34
+ */
35
+ const consistent = versions.every((version) => version === versions[0]);
36
+ const replaceable = artifact !== "host-install";
37
+ const durable = state === "external-service";
38
+ return {
39
+ artifact,
40
+ state,
41
+ drift,
42
+ replicas: count,
43
+ versions,
44
+ consistent,
45
+ replaceable,
46
+ durable,
47
+ capacity: count * 100,
48
+ startupSeconds: artifact === "host-install" ? 90 : artifact === "image-tag" ? 14 : 10,
49
+ diagnosis: !consistent ? artifact === "host-install" ? "Replicas were installed by a procedure, and the hosts were not identical, so they no longer run the same bits." : "Instances launched from the same name do not run the same bits. Pin an immutable image digest." : !durable ? "The process is repeatable, but replacing it deletes state stored inside its writable layer." : artifact === "host-install" ? "It works today because these hosts happen to match. Nothing enforces that, and a rebuilt host will drift." : "Every replica starts from the same immutable artifact and keeps durable state outside the replaceable process."
50
+ };
51
+ }
52
+
53
+ //#endregion
54
+ export { VERSION_TEXT, evaluateContainerDeployment };
@@ -0,0 +1,17 @@
1
+ //#region src/networking/cloud/edge.d.ts
2
+ type CachePolicy = "disabled" | "short-ttl" | "long-ttl";
3
+ type OriginState = "unchanged" | "updated";
4
+ interface EdgeResult {
5
+ viewers: number;
6
+ policy: CachePolicy;
7
+ originState: OriginState;
8
+ edgeHits: number;
9
+ originRequests: number;
10
+ hitRatio: number;
11
+ averageLatencyMs: number;
12
+ staleResponses: number;
13
+ diagnosis: string;
14
+ }
15
+ declare function simulateEdgeCache(viewers: number, policy: CachePolicy, originState: OriginState): EdgeResult;
16
+ //#endregion
17
+ export { CachePolicy, EdgeResult, OriginState, simulateEdgeCache };
@@ -0,0 +1,31 @@
1
+ //#region src/networking/cloud/edge.ts
2
+ function simulateEdgeCache(viewers, policy, originState) {
3
+ const audience = Math.max(1, Math.round(viewers));
4
+ const edges = 3;
5
+ let edgeHits = 0, originRequests = audience, staleResponses = 0;
6
+ if (policy !== "disabled") {
7
+ originRequests = Math.min(edges, audience);
8
+ edgeHits = audience - originRequests;
9
+ if (originState === "updated" && policy === "short-ttl") {
10
+ originRequests = Math.min(edges * 2, audience);
11
+ edgeHits = audience - originRequests;
12
+ } else if (originState === "updated" && policy === "long-ttl") staleResponses = edgeHits;
13
+ }
14
+ const hitRatio = Math.round(edgeHits / audience * 100);
15
+ const averageLatencyMs = Math.round((edgeHits * 25 + originRequests * 180) / audience);
16
+ const diagnosis = policy === "disabled" ? "Every viewer crosses the long path to the origin." : staleResponses ? `${staleResponses} viewers receive the cached old version until expiry or invalidation.` : originState === "updated" && policy === "short-ttl" ? "Edges revalidate sooner, increasing origin work while reducing stale delivery." : `Edge caches serve ${edgeHits} repeated requests close to viewers and spare the origin.`;
17
+ return {
18
+ viewers: audience,
19
+ policy,
20
+ originState,
21
+ edgeHits,
22
+ originRequests,
23
+ hitRatio,
24
+ averageLatencyMs,
25
+ staleResponses,
26
+ diagnosis
27
+ };
28
+ }
29
+
30
+ //#endregion
31
+ export { simulateEdgeCache };
@@ -0,0 +1,19 @@
1
+ //#region src/networking/cloud/failure-domains.d.ts
2
+ type Placement = "single-zone" | "multi-zone" | "multi-region";
3
+ type FailureScope = "instance" | "zone" | "region";
4
+ type DataPlacement = "single-copy" | "multi-zone-copy" | "multi-region-copy";
5
+ interface FailureDomainResult {
6
+ placement: Placement;
7
+ failure: FailureScope;
8
+ data: DataPlacement;
9
+ appCopies: number;
10
+ survivingApps: number;
11
+ serviceAvailable: boolean;
12
+ dataAvailable: boolean;
13
+ crossRegion: boolean;
14
+ recovery: string;
15
+ diagnosis: string;
16
+ }
17
+ declare function simulateFailureDomains(placement: Placement, failure: FailureScope, data: DataPlacement): FailureDomainResult;
18
+ //#endregion
19
+ export { DataPlacement, FailureDomainResult, FailureScope, Placement, simulateFailureDomains };
@@ -0,0 +1,22 @@
1
+ //#region src/networking/cloud/failure-domains.ts
2
+ function simulateFailureDomains(placement, failure, data) {
3
+ const appCopies = placement === "single-zone" ? 1 : placement === "multi-zone" ? 2 : 4;
4
+ const survivingApps = Math.max(0, appCopies - (failure === "instance" ? 1 : failure === "zone" ? placement === "single-zone" ? 1 : 1 : placement === "multi-region" ? 2 : appCopies));
5
+ const serviceAvailable = survivingApps > 0;
6
+ const dataAvailable = data === "multi-region-copy" || data === "multi-zone-copy" && failure !== "region" || data === "single-copy" && failure === "instance";
7
+ return {
8
+ placement,
9
+ failure,
10
+ data,
11
+ appCopies,
12
+ survivingApps,
13
+ serviceAvailable,
14
+ dataAvailable,
15
+ crossRegion: placement === "multi-region",
16
+ recovery: !serviceAvailable ? "restore or redeploy compute" : !dataAvailable ? "promote or restore durable data" : "route traffic to healthy capacity",
17
+ diagnosis: !serviceAvailable ? "The failure removed every application copy in the affected placement." : !dataAvailable ? "Compute survives, but the service cannot operate because its only usable data copy is lost." : failure === "region" && placement === "multi-region" ? "The second Region continues serving because compute and data were independently replicated there." : "The remaining failure domain continues serving and the health-aware entry point shifts traffic."
18
+ };
19
+ }
20
+
21
+ //#endregion
22
+ export { simulateFailureDomains };
@@ -0,0 +1,22 @@
1
+ //#region src/networking/cloud/geo-routing.d.ts
2
+ type ShopperLocation = "dhaka" | "frankfurt" | "new-york";
3
+ type CustomerContext = "guest" | "account-bd" | "account-de" | "selected-us";
4
+ type GeoRoutingPolicy = "nearest" | "home-market";
5
+ interface GeoMarketResult {
6
+ location: ShopperLocation;
7
+ context: CustomerContext;
8
+ policy: GeoRoutingPolicy;
9
+ endpoint: string;
10
+ endpointLatencyMs: number;
11
+ market: string;
12
+ currency: string;
13
+ catalog: string;
14
+ taxBasis: string;
15
+ locationHint: string;
16
+ authority: string;
17
+ crossBorder: boolean;
18
+ diagnosis: string;
19
+ }
20
+ declare function resolveGeoMarket(location: ShopperLocation, context: CustomerContext, policy: GeoRoutingPolicy): GeoMarketResult;
21
+ //#endregion
22
+ export { CustomerContext, GeoMarketResult, GeoRoutingPolicy, ShopperLocation, resolveGeoMarket };
@@ -0,0 +1,64 @@
1
+ //#region src/networking/cloud/geo-routing.ts
2
+ const places = {
3
+ dhaka: {
4
+ endpoint: "Singapore edge",
5
+ latency: 42,
6
+ hint: "Bangladesh"
7
+ },
8
+ frankfurt: {
9
+ endpoint: "Frankfurt edge",
10
+ latency: 18,
11
+ hint: "Germany"
12
+ },
13
+ "new-york": {
14
+ endpoint: "Virginia edge",
15
+ latency: 24,
16
+ hint: "United States"
17
+ }
18
+ };
19
+ const markets = {
20
+ Bangladesh: {
21
+ currency: "BDT",
22
+ catalog: "Bangladesh catalog",
23
+ tax: "delivery market"
24
+ },
25
+ Germany: {
26
+ currency: "EUR",
27
+ catalog: "EU catalog",
28
+ tax: "delivery market"
29
+ },
30
+ "United States": {
31
+ currency: "USD",
32
+ catalog: "US catalog",
33
+ tax: "delivery market"
34
+ }
35
+ };
36
+ function resolveGeoMarket(location, context, policy) {
37
+ const place = places[location];
38
+ const explicit = context === "account-bd" ? "Bangladesh" : context === "account-de" ? "Germany" : context === "selected-us" ? "United States" : null;
39
+ const market = explicit ?? place.hint;
40
+ const endpoint = policy === "nearest" ? place.endpoint : market === "Bangladesh" ? "Singapore edge" : market === "Germany" ? "Frankfurt edge" : "Virginia edge";
41
+ const endpointLatencyMs = policy === "nearest" ? place.latency : place.endpoint === endpoint ? place.latency : place.latency + 95;
42
+ const rules = markets[market];
43
+ const authority = explicit ? context === "selected-us" ? "shopper selection" : "signed-in account" : "network-location hint";
44
+ const crossBorder = place.hint !== market;
45
+ const diagnosis = crossBorder ? `The request enters through ${endpoint}, while explicit ${authority} keeps the ${market} market. Network location does not overwrite customer intent.` : `The request enters through ${endpoint}. ${explicit ? "Explicit customer context" : "A location hint"} selects the ${market} market independently.`;
46
+ return {
47
+ location,
48
+ context,
49
+ policy,
50
+ endpoint,
51
+ endpointLatencyMs,
52
+ market,
53
+ currency: rules.currency,
54
+ catalog: rules.catalog,
55
+ taxBasis: rules.tax,
56
+ locationHint: place.hint,
57
+ authority,
58
+ crossBorder,
59
+ diagnosis
60
+ };
61
+ }
62
+
63
+ //#endregion
64
+ export { resolveGeoMarket };
@@ -0,0 +1,18 @@
1
+ import { AccessDesign, AccessIncident, AccessSnapshot, CloudResource, Permission, ResourceAccess, ResourceAction, WorkloadKind, evaluateWorkloadAccess } from "./access.mjs";
2
+ import { Artifact, ContainerDeploymentResult, HostDrift, ReplicaVersion, StatePlacement, VERSION_TEXT, evaluateContainerDeployment } from "./containers.mjs";
3
+ import { CachePolicy, EdgeResult, OriginState, simulateEdgeCache } from "./edge.mjs";
4
+ import { DataPlacement, FailureDomainResult, FailureScope, Placement, simulateFailureDomains } from "./failure-domains.mjs";
5
+ import { CustomerContext, GeoMarketResult, GeoRoutingPolicy, ShopperLocation, resolveGeoMarket } from "./geo-routing.mjs";
6
+ import { BatchSize, ContextSize, DistributedInferenceResult, DistributedStrategy, GpuCount, GpuInterconnect, GpuMemory, InferenceCapacityResult, InferenceRequestResult, InferenceScheduler, InferenceWorkloadMix, ModelRoutingPolicy, ModelRoutingResult, ModelSize, OutputTokens, Precision, PrefixCacheResult, PrefixCacheScope, PrefixCacheState, PrefixRequester, PrefixTokens, PromptTokens, ResponseQualityTarget, UniquePromptTokens, planInference, simulateDistributedInference, simulateInferenceRequest, simulateModelRouting, simulatePrefixCache } from "./inference.mjs";
7
+ import { InferenceCondition, InferenceDegradationPolicy, InferenceReliabilityResult, InferenceRisk, InferenceSli, simulateInferenceReliability } from "./inference-reliability.mjs";
8
+ import { DriftResolution, ExternalChange, InfrastructureCommand, InfrastructureIntent, InfrastructurePhase, InfrastructurePlan, InfrastructureShape, InfrastructureSnapshot, createInfrastructureEngine, infrastructureSnapshot, transitionInfrastructure } from "./infrastructure.mjs";
9
+ import { DependencyState, SloIncidentResult, SloTarget, Telemetry, observeService } from "./observability.mjs";
10
+ import { ClusterCapacity, ClusterFailure, OrchestrationResult, ReleaseState, reconcileWorkload } from "./orchestration.mjs";
11
+ import { Incident, RecoveryResult, RecoveryStrategy, WriteLoad, evaluateRecovery } from "./recovery.mjs";
12
+ import { CandidateHealth, DataCompatibility, ReleaseCommand, ReleasePlan, ReleaseSnapshot, ReleaseStatus, ReleaseStrategy, createReleaseEngine, releaseSnapshot, transitionRelease } from "./releases.mjs";
13
+ import { BackendHealth, BackendResult, LoadRoutingPolicy, ServiceScalingResult, simulateServiceScaling } from "./scaling.mjs";
14
+ import { ConsumerRefresh, RotationPhase, RotationTrigger, SecretRotationCommand, SecretRotationPlan, SecretRotationSnapshot, SecretStrategy, createSecretRotationEngine, secretRotationSnapshot, transitionSecretRotation } from "./secrets.mjs";
15
+ import { DEPLOYMENT_STAGES, DeploymentFault, DeploymentScope, DeploymentStage, ServerDeploymentResult, ServerFrontEnd, deploymentStageState, simulateServerDeployment } from "./server-deployment.mjs";
16
+ import { CloudStorage, CloudWorkload, StorageResult, evaluateCloudStorage } from "./storage.mjs";
17
+ import { VpcDesign, VpcRouteResult, VpcScenario, VpcZone, planVpcRoute } from "./vpc.mjs";
18
+ export { AccessDesign, AccessIncident, AccessSnapshot, Artifact, BackendHealth, BackendResult, BatchSize, CachePolicy, CandidateHealth, CloudResource, CloudStorage, CloudWorkload, ClusterCapacity, ClusterFailure, ConsumerRefresh, ContainerDeploymentResult, ContextSize, CustomerContext, DEPLOYMENT_STAGES, DataCompatibility, DataPlacement, DependencyState, DeploymentFault, DeploymentScope, DeploymentStage, DistributedInferenceResult, DistributedStrategy, DriftResolution, EdgeResult, ExternalChange, FailureDomainResult, FailureScope, GeoMarketResult, GeoRoutingPolicy, GpuCount, GpuInterconnect, GpuMemory, HostDrift, Incident, InferenceCapacityResult, InferenceCondition, InferenceDegradationPolicy, InferenceReliabilityResult, InferenceRequestResult, InferenceRisk, InferenceScheduler, InferenceSli, InferenceWorkloadMix, InfrastructureCommand, InfrastructureIntent, InfrastructurePhase, InfrastructurePlan, InfrastructureShape, InfrastructureSnapshot, LoadRoutingPolicy, ModelRoutingPolicy, ModelRoutingResult, ModelSize, OrchestrationResult, OriginState, OutputTokens, Permission, Placement, Precision, PrefixCacheResult, PrefixCacheScope, PrefixCacheState, PrefixRequester, PrefixTokens, PromptTokens, RecoveryResult, RecoveryStrategy, ReleaseCommand, ReleasePlan, ReleaseSnapshot, ReleaseState, ReleaseStatus, ReleaseStrategy, ReplicaVersion, ResourceAccess, ResourceAction, ResponseQualityTarget, RotationPhase, RotationTrigger, SecretRotationCommand, SecretRotationPlan, SecretRotationSnapshot, SecretStrategy, ServerDeploymentResult, ServerFrontEnd, ServiceScalingResult, ShopperLocation, SloIncidentResult, SloTarget, StatePlacement, StorageResult, Telemetry, UniquePromptTokens, VERSION_TEXT, VpcDesign, VpcRouteResult, VpcScenario, VpcZone, WorkloadKind, WriteLoad, createInfrastructureEngine, createReleaseEngine, createSecretRotationEngine, deploymentStageState, evaluateCloudStorage, evaluateContainerDeployment, evaluateRecovery, evaluateWorkloadAccess, infrastructureSnapshot, observeService, planInference, planVpcRoute, reconcileWorkload, releaseSnapshot, resolveGeoMarket, secretRotationSnapshot, simulateDistributedInference, simulateEdgeCache, simulateFailureDomains, simulateInferenceReliability, simulateInferenceRequest, simulateModelRouting, simulatePrefixCache, simulateServerDeployment, simulateServiceScaling, transitionInfrastructure, transitionRelease, transitionSecretRotation };
@@ -0,0 +1,19 @@
1
+ import { evaluateWorkloadAccess } from "./access.mjs";
2
+ import { VERSION_TEXT, evaluateContainerDeployment } from "./containers.mjs";
3
+ import { simulateEdgeCache } from "./edge.mjs";
4
+ import { simulateFailureDomains } from "./failure-domains.mjs";
5
+ import { resolveGeoMarket } from "./geo-routing.mjs";
6
+ import { planInference, simulateDistributedInference, simulateInferenceRequest, simulateModelRouting, simulatePrefixCache } from "./inference.mjs";
7
+ import { simulateInferenceReliability } from "./inference-reliability.mjs";
8
+ import { createInfrastructureEngine, infrastructureSnapshot, transitionInfrastructure } from "./infrastructure.mjs";
9
+ import { observeService } from "./observability.mjs";
10
+ import { reconcileWorkload } from "./orchestration.mjs";
11
+ import { evaluateRecovery } from "./recovery.mjs";
12
+ import { createReleaseEngine, releaseSnapshot, transitionRelease } from "./releases.mjs";
13
+ import { simulateServiceScaling } from "./scaling.mjs";
14
+ import { createSecretRotationEngine, secretRotationSnapshot, transitionSecretRotation } from "./secrets.mjs";
15
+ import { DEPLOYMENT_STAGES, deploymentStageState, simulateServerDeployment } from "./server-deployment.mjs";
16
+ import { evaluateCloudStorage } from "./storage.mjs";
17
+ import { planVpcRoute } from "./vpc.mjs";
18
+
19
+ export { DEPLOYMENT_STAGES, VERSION_TEXT, createInfrastructureEngine, createReleaseEngine, createSecretRotationEngine, deploymentStageState, evaluateCloudStorage, evaluateContainerDeployment, evaluateRecovery, evaluateWorkloadAccess, infrastructureSnapshot, observeService, planInference, planVpcRoute, reconcileWorkload, releaseSnapshot, resolveGeoMarket, secretRotationSnapshot, simulateDistributedInference, simulateEdgeCache, simulateFailureDomains, simulateInferenceReliability, simulateInferenceRequest, simulateModelRouting, simulatePrefixCache, simulateServerDeployment, simulateServiceScaling, transitionInfrastructure, transitionRelease, transitionSecretRotation };
@@ -0,0 +1,30 @@
1
+ //#region src/networking/cloud/inference-reliability.d.ts
2
+ type InferenceCondition = "healthy" | "overloaded" | "primary-unavailable";
3
+ type InferenceDegradationPolicy = "retry-primary" | "fallback-small" | "shed-load";
4
+ type InferenceRisk = "routine" | "high-stakes";
5
+ type InferenceSli = "transport" | "useful";
6
+ interface InferenceReliabilityResult {
7
+ condition: InferenceCondition;
8
+ policy: InferenceDegradationPolicy;
9
+ risk: InferenceRisk;
10
+ sli: InferenceSli;
11
+ requests: number;
12
+ returnedResponses: number;
13
+ degradedResponses: number;
14
+ rejectedRequests: number;
15
+ unsafeResponses: number;
16
+ lateResponses: number;
17
+ usefulResponses: number;
18
+ transportRatePercent: number;
19
+ usefulRatePercent: number;
20
+ measuredRatePercent: number;
21
+ objectivePercent: number;
22
+ meetsObjective: boolean;
23
+ p95LatencyMs: number;
24
+ outcome: "healthy" | "safe-degradation" | "quality-hidden" | "unavailable";
25
+ diagnosis: string;
26
+ }
27
+ /** Models 100 requests so returned, rejected, late and unsafe outcomes stay explicit and additive. */
28
+ declare function simulateInferenceReliability(condition: InferenceCondition, policy: InferenceDegradationPolicy, risk: InferenceRisk, sli: InferenceSli): InferenceReliabilityResult;
29
+ //#endregion
30
+ export { InferenceCondition, InferenceDegradationPolicy, InferenceReliabilityResult, InferenceRisk, InferenceSli, simulateInferenceReliability };
@@ -0,0 +1,76 @@
1
+ //#region src/networking/cloud/inference-reliability.ts
2
+ /** Models 100 requests so returned, rejected, late and unsafe outcomes stay explicit and additive. */
3
+ function simulateInferenceReliability(condition, policy, risk, sli) {
4
+ const requests = 100;
5
+ let returnedResponses = 100;
6
+ let degradedResponses = 0;
7
+ let rejectedRequests = 0;
8
+ let lateResponses = 0;
9
+ let p95LatencyMs = 650;
10
+ if (condition === "overloaded") if (policy === "retry-primary") {
11
+ returnedResponses = 92;
12
+ rejectedRequests = 8;
13
+ lateResponses = 30;
14
+ p95LatencyMs = 4800;
15
+ } else if (policy === "fallback-small") {
16
+ returnedResponses = 99;
17
+ degradedResponses = 55;
18
+ rejectedRequests = 1;
19
+ lateResponses = 2;
20
+ p95LatencyMs = 1200;
21
+ } else {
22
+ returnedResponses = 75;
23
+ rejectedRequests = 25;
24
+ p95LatencyMs = 600;
25
+ }
26
+ else if (condition === "primary-unavailable") if (policy === "retry-primary") {
27
+ returnedResponses = 18;
28
+ rejectedRequests = 82;
29
+ lateResponses = 10;
30
+ p95LatencyMs = 8e3;
31
+ } else if (policy === "fallback-small") {
32
+ returnedResponses = 98;
33
+ degradedResponses = 98;
34
+ rejectedRequests = 2;
35
+ lateResponses = 2;
36
+ p95LatencyMs = 1e3;
37
+ } else {
38
+ returnedResponses = 60;
39
+ rejectedRequests = 40;
40
+ p95LatencyMs = 450;
41
+ }
42
+ const baselineUnsafe = risk === "routine" ? 2 : 4;
43
+ const fallbackUnsafe = condition === "healthy" ? baselineUnsafe : risk === "routine" ? condition === "overloaded" ? 5 : 8 : condition === "overloaded" ? 24 : 32;
44
+ const unsafeResponses = Math.min(returnedResponses - lateResponses, policy === "fallback-small" ? fallbackUnsafe : Math.min(baselineUnsafe, returnedResponses));
45
+ const usefulResponses = Math.max(0, returnedResponses - lateResponses - unsafeResponses);
46
+ const transportRatePercent = returnedResponses;
47
+ const usefulRatePercent = usefulResponses;
48
+ const measuredRatePercent = sli === "transport" ? transportRatePercent : usefulRatePercent;
49
+ const objectivePercent = 95;
50
+ const meetsObjective = measuredRatePercent >= objectivePercent;
51
+ const outcome = condition === "healthy" ? "healthy" : sli === "transport" && transportRatePercent >= objectivePercent && usefulRatePercent < objectivePercent ? "quality-hidden" : usefulResponses >= 70 && unsafeResponses <= 5 ? "safe-degradation" : "unavailable";
52
+ return {
53
+ condition,
54
+ policy,
55
+ risk,
56
+ sli,
57
+ requests,
58
+ returnedResponses,
59
+ degradedResponses,
60
+ rejectedRequests,
61
+ unsafeResponses,
62
+ lateResponses,
63
+ usefulResponses,
64
+ transportRatePercent,
65
+ usefulRatePercent,
66
+ measuredRatePercent,
67
+ objectivePercent,
68
+ meetsObjective,
69
+ p95LatencyMs,
70
+ outcome,
71
+ diagnosis: outcome === "quality-hidden" ? "The transport SLI passes while late or unsafe responses remain invisible to the objective." : outcome === "safe-degradation" ? "The service refuses some work to protect latency and response quality for the work it accepts." : outcome === "unavailable" ? policy === "retry-primary" ? "Retries amplify pressure or wait on a dependency that cannot recover inside the request deadline." : "This policy does not preserve enough useful outcomes for the selected workload risk." : "The primary path meets the modeled useful-response objective."
72
+ };
73
+ }
74
+
75
+ //#endregion
76
+ export { simulateInferenceReliability };
@@ -0,0 +1,118 @@
1
+ //#region src/networking/cloud/inference.d.ts
2
+ type ModelSize = "8b" | "70b";
3
+ type Precision = "fp16" | "int8";
4
+ type GpuMemory = 24 | 80;
5
+ type BatchSize = 1 | 8 | 32;
6
+ type ContextSize = 2048 | 8192;
7
+ type PromptTokens = 128 | 1024 | 4096;
8
+ type OutputTokens = 32 | 256 | 1024;
9
+ type InferenceScheduler = "shared" | "prefill-priority" | "decode-priority";
10
+ type PrefixTokens = 0 | 512 | 2048 | 4096;
11
+ type UniquePromptTokens = 128 | 512;
12
+ type PrefixCacheState = "cold" | "warm";
13
+ type PrefixCacheScope = "shared" | "tenant-isolated";
14
+ type PrefixRequester = "same-tenant" | "other-tenant";
15
+ type DistributedStrategy = "replicas" | "tensor-parallel";
16
+ type GpuCount = 1 | 2 | 4 | 8;
17
+ type GpuInterconnect = "local-fast" | "local-limited" | "cross-node";
18
+ type ModelRoutingPolicy = "always-small" | "always-large" | "adaptive";
19
+ type InferenceWorkloadMix = "mostly-simple" | "mixed" | "mostly-complex";
20
+ type ResponseQualityTarget = "standard" | "strict";
21
+ interface InferenceCapacityResult {
22
+ model: ModelSize;
23
+ precision: Precision;
24
+ gpuMemory: GpuMemory;
25
+ gpus: number;
26
+ batch: BatchSize;
27
+ context: ContextSize;
28
+ weightsGb: number;
29
+ kvCacheGb: number;
30
+ requiredGb: number;
31
+ availableGb: number;
32
+ fits: boolean;
33
+ topology: "replicas" | "tensor-parallel" | "cannot-load";
34
+ replicas: number;
35
+ tokensPerSecond: number;
36
+ ttftMs: number;
37
+ memoryHeadroomGb: number;
38
+ diagnosis: string;
39
+ }
40
+ interface InferenceRequestResult {
41
+ promptTokens: PromptTokens;
42
+ outputTokens: OutputTokens;
43
+ concurrentRequests: number;
44
+ scheduler: InferenceScheduler;
45
+ prefillWork: number;
46
+ decodeWork: number;
47
+ ttftMs: number;
48
+ interTokenMs: number;
49
+ completionMs: number;
50
+ activeKvTokens: number;
51
+ bottleneck: "prefill" | "decode" | "balanced";
52
+ diagnosis: string;
53
+ }
54
+ interface PrefixCacheResult {
55
+ prefixTokens: PrefixTokens;
56
+ uniqueTokens: UniquePromptTokens;
57
+ cacheState: PrefixCacheState;
58
+ scope: PrefixCacheScope;
59
+ requester: PrefixRequester;
60
+ reusableTokens: number;
61
+ computedTokens: number;
62
+ hitRatePercent: number;
63
+ prefillMs: number;
64
+ savedPrefillMs: number;
65
+ privacyRisk: boolean;
66
+ outcome: "cold-miss" | "cache-hit" | "isolated-miss" | "no-prefix";
67
+ diagnosis: string;
68
+ }
69
+ interface DistributedInferenceResult {
70
+ model: ModelSize;
71
+ strategy: DistributedStrategy;
72
+ gpus: GpuCount;
73
+ interconnect: GpuInterconnect;
74
+ modelGb: number;
75
+ memoryPerGpuGb: number;
76
+ fits: boolean;
77
+ servingCopies: number;
78
+ ranksPerRequest: number;
79
+ computeMsPerToken: number;
80
+ communicationMsPerToken: number;
81
+ tokenStepMs: number;
82
+ relativeThroughput: number;
83
+ failedGpuImpact: "one-replica" | "whole-shard-group" | "service-offline";
84
+ diagnosis: string;
85
+ }
86
+ interface ModelRoutingResult {
87
+ policy: ModelRoutingPolicy;
88
+ workload: InferenceWorkloadMix;
89
+ qualityTarget: ResponseQualityTarget;
90
+ requests: number;
91
+ simpleRequests: number;
92
+ complexRequests: number;
93
+ smallModelRequests: number;
94
+ largeModelRequests: number;
95
+ usefulResponses: number;
96
+ usefulRatePercent: number;
97
+ requiredUsefulRatePercent: number;
98
+ meetsQualityTarget: boolean;
99
+ totalCostUnits: number;
100
+ costPerRequest: number;
101
+ costPerUsefulResponse: number;
102
+ averageLatencyUnits: number;
103
+ diagnosis: string;
104
+ }
105
+ /** Comparative routing model; cost, latency and quality units are illustrative rather than vendor benchmarks. */
106
+ declare function simulateModelRouting(policy: ModelRoutingPolicy, workload: InferenceWorkloadMix, qualityTarget: ResponseQualityTarget): ModelRoutingResult;
107
+ /** Comparative distributed-serving model; values show topology effects, not vendor benchmarks. */
108
+ declare function simulateDistributedInference(model: ModelSize, strategy: DistributedStrategy, gpus: GpuCount, interconnect: GpuInterconnect): DistributedInferenceResult;
109
+ /** Models full-block KV prefix reuse. It never treats semantic similarity as cache identity. */
110
+ declare function simulatePrefixCache(prefixTokens: PrefixTokens, uniqueTokens: UniquePromptTokens, cacheState: PrefixCacheState, scope: PrefixCacheScope, requester: PrefixRequester): PrefixCacheResult;
111
+ /**
112
+ * Comparative teaching model for the two phases of autoregressive inference.
113
+ * Values are dimensioned and monotonic, but are not claims about a particular model or GPU.
114
+ */
115
+ declare function simulateInferenceRequest(promptTokens: PromptTokens, outputTokens: OutputTokens, concurrentRequests: number, scheduler: InferenceScheduler): InferenceRequestResult;
116
+ declare function planInference(model: ModelSize, precision: Precision, gpuMemory: GpuMemory, gpus: number, batch: BatchSize, context: ContextSize): InferenceCapacityResult;
117
+ //#endregion
118
+ export { BatchSize, ContextSize, DistributedInferenceResult, DistributedStrategy, GpuCount, GpuInterconnect, GpuMemory, InferenceCapacityResult, InferenceRequestResult, InferenceScheduler, InferenceWorkloadMix, ModelRoutingPolicy, ModelRoutingResult, ModelSize, OutputTokens, Precision, PrefixCacheResult, PrefixCacheScope, PrefixCacheState, PrefixRequester, PrefixTokens, PromptTokens, ResponseQualityTarget, UniquePromptTokens, planInference, simulateDistributedInference, simulateInferenceRequest, simulateModelRouting, simulatePrefixCache };