quantum-spherifier 1.0.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 (747) hide show
  1. package/.env.example +37 -0
  2. package/LICENSE +21 -0
  3. package/README.md +738 -0
  4. package/config/default.json +83 -0
  5. package/config/production.json +31 -0
  6. package/docker/Dockerfile +37 -0
  7. package/docker/docker-compose.yml +25 -0
  8. package/docs/architecture.md +160 -0
  9. package/docs/qspherifier.jpg +0 -0
  10. package/package.json +128 -0
  11. package/plugins/example-plugin.js +44 -0
  12. package/research/INDEX.md +37 -0
  13. package/research/cross_refs/.gitkeep +0 -0
  14. package/research/designs/.gitkeep +0 -0
  15. package/research/hypotheses/.gitkeep +0 -0
  16. package/research/hypotheses/new_qubit_modalities/doc_0035ce8c/main.md +60 -0
  17. package/research/hypotheses/new_qubit_modalities/doc_0035ce8c/manifest.json +139 -0
  18. package/research/hypotheses/new_qubit_modalities/doc_005f1a09/main.md +63 -0
  19. package/research/hypotheses/new_qubit_modalities/doc_005f1a09/manifest.json +143 -0
  20. package/research/hypotheses/new_qubit_modalities/doc_05f0ed46/main.md +61 -0
  21. package/research/hypotheses/new_qubit_modalities/doc_05f0ed46/manifest.json +136 -0
  22. package/research/hypotheses/new_qubit_modalities/doc_05fd0eb1/main.md +60 -0
  23. package/research/hypotheses/new_qubit_modalities/doc_05fd0eb1/manifest.json +139 -0
  24. package/research/hypotheses/new_qubit_modalities/doc_0705eed0/main.md +60 -0
  25. package/research/hypotheses/new_qubit_modalities/doc_0705eed0/manifest.json +139 -0
  26. package/research/hypotheses/new_qubit_modalities/doc_07aff3d1/main.md +59 -0
  27. package/research/hypotheses/new_qubit_modalities/doc_07aff3d1/manifest.json +128 -0
  28. package/research/hypotheses/new_qubit_modalities/doc_0894efe7/main.md +60 -0
  29. package/research/hypotheses/new_qubit_modalities/doc_0894efe7/manifest.json +139 -0
  30. package/research/hypotheses/new_qubit_modalities/doc_08e086ad/main.md +59 -0
  31. package/research/hypotheses/new_qubit_modalities/doc_08e086ad/manifest.json +128 -0
  32. package/research/hypotheses/new_qubit_modalities/doc_0929ce83/main.md +60 -0
  33. package/research/hypotheses/new_qubit_modalities/doc_0929ce83/manifest.json +119 -0
  34. package/research/hypotheses/new_qubit_modalities/doc_0b51b472/main.md +61 -0
  35. package/research/hypotheses/new_qubit_modalities/doc_0b51b472/manifest.json +131 -0
  36. package/research/hypotheses/new_qubit_modalities/doc_0cfcfcbe/main.md +60 -0
  37. package/research/hypotheses/new_qubit_modalities/doc_0cfcfcbe/manifest.json +139 -0
  38. package/research/hypotheses/new_qubit_modalities/doc_0d9f04a2/main.md +60 -0
  39. package/research/hypotheses/new_qubit_modalities/doc_0d9f04a2/manifest.json +139 -0
  40. package/research/hypotheses/new_qubit_modalities/doc_0f665487/main.md +62 -0
  41. package/research/hypotheses/new_qubit_modalities/doc_0f665487/manifest.json +146 -0
  42. package/research/hypotheses/new_qubit_modalities/doc_11a00531/main.md +61 -0
  43. package/research/hypotheses/new_qubit_modalities/doc_11a00531/manifest.json +136 -0
  44. package/research/hypotheses/new_qubit_modalities/doc_12507df9/main.md +62 -0
  45. package/research/hypotheses/new_qubit_modalities/doc_12507df9/manifest.json +146 -0
  46. package/research/hypotheses/new_qubit_modalities/doc_14edc7a7/main.md +61 -0
  47. package/research/hypotheses/new_qubit_modalities/doc_14edc7a7/manifest.json +136 -0
  48. package/research/hypotheses/new_qubit_modalities/doc_17dce1f5/main.md +60 -0
  49. package/research/hypotheses/new_qubit_modalities/doc_17dce1f5/manifest.json +139 -0
  50. package/research/hypotheses/new_qubit_modalities/doc_18a79edc/main.md +59 -0
  51. package/research/hypotheses/new_qubit_modalities/doc_18a79edc/manifest.json +133 -0
  52. package/research/hypotheses/new_qubit_modalities/doc_18b76f8b/main.md +59 -0
  53. package/research/hypotheses/new_qubit_modalities/doc_18b76f8b/manifest.json +133 -0
  54. package/research/hypotheses/new_qubit_modalities/doc_1d8b27dd/main.md +59 -0
  55. package/research/hypotheses/new_qubit_modalities/doc_1d8b27dd/manifest.json +133 -0
  56. package/research/hypotheses/new_qubit_modalities/doc_1e746572/main.md +60 -0
  57. package/research/hypotheses/new_qubit_modalities/doc_1e746572/manifest.json +139 -0
  58. package/research/hypotheses/new_qubit_modalities/doc_1f409f63/main.md +60 -0
  59. package/research/hypotheses/new_qubit_modalities/doc_1f409f63/manifest.json +139 -0
  60. package/research/hypotheses/new_qubit_modalities/doc_1fb93b3c/main.md +59 -0
  61. package/research/hypotheses/new_qubit_modalities/doc_1fb93b3c/manifest.json +118 -0
  62. package/research/hypotheses/new_qubit_modalities/doc_2014700e/main.md +59 -0
  63. package/research/hypotheses/new_qubit_modalities/doc_2014700e/manifest.json +118 -0
  64. package/research/hypotheses/new_qubit_modalities/doc_21d9499b/main.md +59 -0
  65. package/research/hypotheses/new_qubit_modalities/doc_21d9499b/manifest.json +133 -0
  66. package/research/hypotheses/new_qubit_modalities/doc_22744a09/main.md +60 -0
  67. package/research/hypotheses/new_qubit_modalities/doc_22744a09/manifest.json +139 -0
  68. package/research/hypotheses/new_qubit_modalities/doc_25a11cb2/main.md +59 -0
  69. package/research/hypotheses/new_qubit_modalities/doc_25a11cb2/manifest.json +128 -0
  70. package/research/hypotheses/new_qubit_modalities/doc_26180f52/main.md +60 -0
  71. package/research/hypotheses/new_qubit_modalities/doc_26180f52/manifest.json +139 -0
  72. package/research/hypotheses/new_qubit_modalities/doc_264f31a7/main.md +59 -0
  73. package/research/hypotheses/new_qubit_modalities/doc_264f31a7/manifest.json +133 -0
  74. package/research/hypotheses/new_qubit_modalities/doc_273d88b1/main.md +61 -0
  75. package/research/hypotheses/new_qubit_modalities/doc_273d88b1/manifest.json +140 -0
  76. package/research/hypotheses/new_qubit_modalities/doc_27b9d2bc/main.md +61 -0
  77. package/research/hypotheses/new_qubit_modalities/doc_27b9d2bc/manifest.json +136 -0
  78. package/research/hypotheses/new_qubit_modalities/doc_2942ef20/main.md +59 -0
  79. package/research/hypotheses/new_qubit_modalities/doc_2942ef20/manifest.json +133 -0
  80. package/research/hypotheses/new_qubit_modalities/doc_2babdd5a/main.md +62 -0
  81. package/research/hypotheses/new_qubit_modalities/doc_2babdd5a/manifest.json +146 -0
  82. package/research/hypotheses/new_qubit_modalities/doc_2bb39428/main.md +59 -0
  83. package/research/hypotheses/new_qubit_modalities/doc_2bb39428/manifest.json +128 -0
  84. package/research/hypotheses/new_qubit_modalities/doc_2e1771dc/main.md +60 -0
  85. package/research/hypotheses/new_qubit_modalities/doc_2e1771dc/manifest.json +139 -0
  86. package/research/hypotheses/new_qubit_modalities/doc_2f6e27eb/main.md +60 -0
  87. package/research/hypotheses/new_qubit_modalities/doc_2f6e27eb/manifest.json +139 -0
  88. package/research/hypotheses/new_qubit_modalities/doc_2ff8c87a/main.md +59 -0
  89. package/research/hypotheses/new_qubit_modalities/doc_2ff8c87a/manifest.json +133 -0
  90. package/research/hypotheses/new_qubit_modalities/doc_311003a4/main.md +59 -0
  91. package/research/hypotheses/new_qubit_modalities/doc_311003a4/manifest.json +133 -0
  92. package/research/hypotheses/new_qubit_modalities/doc_329910b6/main.md +59 -0
  93. package/research/hypotheses/new_qubit_modalities/doc_329910b6/manifest.json +128 -0
  94. package/research/hypotheses/new_qubit_modalities/doc_32b3ea58/main.md +61 -0
  95. package/research/hypotheses/new_qubit_modalities/doc_32b3ea58/manifest.json +136 -0
  96. package/research/hypotheses/new_qubit_modalities/doc_354b23cb/main.md +59 -0
  97. package/research/hypotheses/new_qubit_modalities/doc_354b23cb/manifest.json +128 -0
  98. package/research/hypotheses/new_qubit_modalities/doc_3630eed6/main.md +60 -0
  99. package/research/hypotheses/new_qubit_modalities/doc_3630eed6/manifest.json +113 -0
  100. package/research/hypotheses/new_qubit_modalities/doc_37ca8f04/main.md +60 -0
  101. package/research/hypotheses/new_qubit_modalities/doc_37ca8f04/manifest.json +139 -0
  102. package/research/hypotheses/new_qubit_modalities/doc_3a8f0c5e/main.md +59 -0
  103. package/research/hypotheses/new_qubit_modalities/doc_3a8f0c5e/manifest.json +133 -0
  104. package/research/hypotheses/new_qubit_modalities/doc_3d55724e/main.md +59 -0
  105. package/research/hypotheses/new_qubit_modalities/doc_3d55724e/manifest.json +128 -0
  106. package/research/hypotheses/new_qubit_modalities/doc_3e27ad06/main.md +59 -0
  107. package/research/hypotheses/new_qubit_modalities/doc_3e27ad06/manifest.json +108 -0
  108. package/research/hypotheses/new_qubit_modalities/doc_401a8bad/main.md +59 -0
  109. package/research/hypotheses/new_qubit_modalities/doc_401a8bad/manifest.json +128 -0
  110. package/research/hypotheses/new_qubit_modalities/doc_40f8352b/main.md +60 -0
  111. package/research/hypotheses/new_qubit_modalities/doc_40f8352b/manifest.json +139 -0
  112. package/research/hypotheses/new_qubit_modalities/doc_4331dcfd/main.md +60 -0
  113. package/research/hypotheses/new_qubit_modalities/doc_4331dcfd/manifest.json +139 -0
  114. package/research/hypotheses/new_qubit_modalities/doc_4337cbdc/main.md +59 -0
  115. package/research/hypotheses/new_qubit_modalities/doc_4337cbdc/manifest.json +133 -0
  116. package/research/hypotheses/new_qubit_modalities/doc_45d2acc5/main.md +60 -0
  117. package/research/hypotheses/new_qubit_modalities/doc_45d2acc5/manifest.json +139 -0
  118. package/research/hypotheses/new_qubit_modalities/doc_45d39a5f/main.md +60 -0
  119. package/research/hypotheses/new_qubit_modalities/doc_45d39a5f/manifest.json +139 -0
  120. package/research/hypotheses/new_qubit_modalities/doc_4ed900da/main.md +59 -0
  121. package/research/hypotheses/new_qubit_modalities/doc_4ed900da/manifest.json +133 -0
  122. package/research/hypotheses/new_qubit_modalities/doc_525bf00e/main.md +59 -0
  123. package/research/hypotheses/new_qubit_modalities/doc_525bf00e/manifest.json +128 -0
  124. package/research/hypotheses/new_qubit_modalities/doc_54035ce1/main.md +61 -0
  125. package/research/hypotheses/new_qubit_modalities/doc_54035ce1/manifest.json +136 -0
  126. package/research/hypotheses/new_qubit_modalities/doc_552565a2/main.md +60 -0
  127. package/research/hypotheses/new_qubit_modalities/doc_552565a2/manifest.json +139 -0
  128. package/research/hypotheses/new_qubit_modalities/doc_5652c681/main.md +59 -0
  129. package/research/hypotheses/new_qubit_modalities/doc_5652c681/manifest.json +128 -0
  130. package/research/hypotheses/new_qubit_modalities/doc_59b3863c/main.md +61 -0
  131. package/research/hypotheses/new_qubit_modalities/doc_59b3863c/manifest.json +136 -0
  132. package/research/hypotheses/new_qubit_modalities/doc_5cd7ecd5/main.md +60 -0
  133. package/research/hypotheses/new_qubit_modalities/doc_5cd7ecd5/manifest.json +139 -0
  134. package/research/hypotheses/new_qubit_modalities/doc_5dec51b1/main.md +60 -0
  135. package/research/hypotheses/new_qubit_modalities/doc_5dec51b1/manifest.json +139 -0
  136. package/research/hypotheses/new_qubit_modalities/doc_5e6dc9c1/main.md +60 -0
  137. package/research/hypotheses/new_qubit_modalities/doc_5e6dc9c1/manifest.json +139 -0
  138. package/research/hypotheses/new_qubit_modalities/doc_60cdeb68/main.md +59 -0
  139. package/research/hypotheses/new_qubit_modalities/doc_60cdeb68/manifest.json +128 -0
  140. package/research/hypotheses/new_qubit_modalities/doc_637c1a32/main.md +59 -0
  141. package/research/hypotheses/new_qubit_modalities/doc_637c1a32/manifest.json +128 -0
  142. package/research/hypotheses/new_qubit_modalities/doc_659be8e8/main.md +59 -0
  143. package/research/hypotheses/new_qubit_modalities/doc_659be8e8/manifest.json +128 -0
  144. package/research/hypotheses/new_qubit_modalities/doc_69f47a99/main.md +61 -0
  145. package/research/hypotheses/new_qubit_modalities/doc_69f47a99/manifest.json +136 -0
  146. package/research/hypotheses/new_qubit_modalities/doc_6a06ee6e/main.md +59 -0
  147. package/research/hypotheses/new_qubit_modalities/doc_6a06ee6e/manifest.json +133 -0
  148. package/research/hypotheses/new_qubit_modalities/doc_6c383667/main.md +59 -0
  149. package/research/hypotheses/new_qubit_modalities/doc_6c383667/manifest.json +123 -0
  150. package/research/hypotheses/new_qubit_modalities/doc_788cc9f1/main.md +60 -0
  151. package/research/hypotheses/new_qubit_modalities/doc_788cc9f1/manifest.json +139 -0
  152. package/research/hypotheses/new_qubit_modalities/doc_85cd549d/main.md +60 -0
  153. package/research/hypotheses/new_qubit_modalities/doc_85cd549d/manifest.json +139 -0
  154. package/research/hypotheses/new_qubit_modalities/doc_86023f9a/main.md +59 -0
  155. package/research/hypotheses/new_qubit_modalities/doc_86023f9a/manifest.json +128 -0
  156. package/research/hypotheses/new_qubit_modalities/doc_86c37a8e/main.md +59 -0
  157. package/research/hypotheses/new_qubit_modalities/doc_86c37a8e/manifest.json +128 -0
  158. package/research/hypotheses/new_qubit_modalities/doc_875cb066/main.md +59 -0
  159. package/research/hypotheses/new_qubit_modalities/doc_875cb066/manifest.json +128 -0
  160. package/research/hypotheses/new_qubit_modalities/doc_8a7a0b27/main.md +60 -0
  161. package/research/hypotheses/new_qubit_modalities/doc_8a7a0b27/manifest.json +139 -0
  162. package/research/hypotheses/new_qubit_modalities/doc_8b8c723e/main.md +60 -0
  163. package/research/hypotheses/new_qubit_modalities/doc_8b8c723e/manifest.json +139 -0
  164. package/research/hypotheses/new_qubit_modalities/doc_8c881657/main.md +60 -0
  165. package/research/hypotheses/new_qubit_modalities/doc_8c881657/manifest.json +139 -0
  166. package/research/hypotheses/new_qubit_modalities/doc_8d3bbca1/main.md +59 -0
  167. package/research/hypotheses/new_qubit_modalities/doc_8d3bbca1/manifest.json +128 -0
  168. package/research/hypotheses/new_qubit_modalities/doc_8d45fa02/main.md +60 -0
  169. package/research/hypotheses/new_qubit_modalities/doc_8d45fa02/manifest.json +139 -0
  170. package/research/hypotheses/new_qubit_modalities/doc_8d5389e6/main.md +60 -0
  171. package/research/hypotheses/new_qubit_modalities/doc_8d5389e6/manifest.json +139 -0
  172. package/research/hypotheses/new_qubit_modalities/doc_9288e51d/main.md +59 -0
  173. package/research/hypotheses/new_qubit_modalities/doc_9288e51d/manifest.json +128 -0
  174. package/research/hypotheses/new_qubit_modalities/doc_9bd195fd/main.md +61 -0
  175. package/research/hypotheses/new_qubit_modalities/doc_9bd195fd/manifest.json +136 -0
  176. package/research/hypotheses/new_qubit_modalities/doc_9c000140/main.md +61 -0
  177. package/research/hypotheses/new_qubit_modalities/doc_9c000140/manifest.json +136 -0
  178. package/research/hypotheses/new_qubit_modalities/doc_9c1775b8/main.md +60 -0
  179. package/research/hypotheses/new_qubit_modalities/doc_9c1775b8/manifest.json +139 -0
  180. package/research/hypotheses/new_qubit_modalities/doc_9ea9fbaa/main.md +59 -0
  181. package/research/hypotheses/new_qubit_modalities/doc_9ea9fbaa/manifest.json +128 -0
  182. package/research/hypotheses/new_qubit_modalities/doc_9f34ca4b/main.md +61 -0
  183. package/research/hypotheses/new_qubit_modalities/doc_9f34ca4b/manifest.json +136 -0
  184. package/research/hypotheses/new_qubit_modalities/doc_9fe95a15/main.md +60 -0
  185. package/research/hypotheses/new_qubit_modalities/doc_9fe95a15/manifest.json +139 -0
  186. package/research/hypotheses/new_qubit_modalities/doc_a0b6a004/main.md +59 -0
  187. package/research/hypotheses/new_qubit_modalities/doc_a0b6a004/manifest.json +128 -0
  188. package/research/hypotheses/new_qubit_modalities/doc_a11472f7/main.md +60 -0
  189. package/research/hypotheses/new_qubit_modalities/doc_a11472f7/manifest.json +139 -0
  190. package/research/hypotheses/new_qubit_modalities/doc_a226de32/main.md +60 -0
  191. package/research/hypotheses/new_qubit_modalities/doc_a226de32/manifest.json +139 -0
  192. package/research/hypotheses/new_qubit_modalities/doc_a3ed0beb/main.md +60 -0
  193. package/research/hypotheses/new_qubit_modalities/doc_a3ed0beb/manifest.json +139 -0
  194. package/research/hypotheses/new_qubit_modalities/doc_a49aeac3/main.md +63 -0
  195. package/research/hypotheses/new_qubit_modalities/doc_a49aeac3/manifest.json +143 -0
  196. package/research/hypotheses/new_qubit_modalities/doc_a548aead/main.md +61 -0
  197. package/research/hypotheses/new_qubit_modalities/doc_a548aead/manifest.json +136 -0
  198. package/research/hypotheses/new_qubit_modalities/doc_a94c6b43/main.md +60 -0
  199. package/research/hypotheses/new_qubit_modalities/doc_a94c6b43/manifest.json +139 -0
  200. package/research/hypotheses/new_qubit_modalities/doc_ab2c416b/main.md +61 -0
  201. package/research/hypotheses/new_qubit_modalities/doc_ab2c416b/manifest.json +136 -0
  202. package/research/hypotheses/new_qubit_modalities/doc_ad5b545f/main.md +59 -0
  203. package/research/hypotheses/new_qubit_modalities/doc_ad5b545f/manifest.json +128 -0
  204. package/research/hypotheses/new_qubit_modalities/doc_ae0d0b6f/main.md +61 -0
  205. package/research/hypotheses/new_qubit_modalities/doc_ae0d0b6f/manifest.json +136 -0
  206. package/research/hypotheses/new_qubit_modalities/doc_aeb039af/main.md +59 -0
  207. package/research/hypotheses/new_qubit_modalities/doc_aeb039af/manifest.json +128 -0
  208. package/research/hypotheses/new_qubit_modalities/doc_b5569c01/main.md +59 -0
  209. package/research/hypotheses/new_qubit_modalities/doc_b5569c01/manifest.json +133 -0
  210. package/research/hypotheses/new_qubit_modalities/doc_ba323435/main.md +59 -0
  211. package/research/hypotheses/new_qubit_modalities/doc_ba323435/manifest.json +133 -0
  212. package/research/hypotheses/new_qubit_modalities/doc_be91ffb6/main.md +61 -0
  213. package/research/hypotheses/new_qubit_modalities/doc_be91ffb6/manifest.json +121 -0
  214. package/research/hypotheses/new_qubit_modalities/doc_bfc11573/main.md +61 -0
  215. package/research/hypotheses/new_qubit_modalities/doc_bfc11573/manifest.json +136 -0
  216. package/research/hypotheses/new_qubit_modalities/doc_c01dda61/main.md +61 -0
  217. package/research/hypotheses/new_qubit_modalities/doc_c01dda61/manifest.json +140 -0
  218. package/research/hypotheses/new_qubit_modalities/doc_c40b6bac/main.md +59 -0
  219. package/research/hypotheses/new_qubit_modalities/doc_c40b6bac/manifest.json +133 -0
  220. package/research/hypotheses/new_qubit_modalities/doc_c449abfd/main.md +60 -0
  221. package/research/hypotheses/new_qubit_modalities/doc_c449abfd/manifest.json +139 -0
  222. package/research/hypotheses/new_qubit_modalities/doc_c5286a95/main.md +59 -0
  223. package/research/hypotheses/new_qubit_modalities/doc_c5286a95/manifest.json +123 -0
  224. package/research/hypotheses/new_qubit_modalities/doc_c6232031/main.md +59 -0
  225. package/research/hypotheses/new_qubit_modalities/doc_c6232031/manifest.json +133 -0
  226. package/research/hypotheses/new_qubit_modalities/doc_c8567a48/main.md +59 -0
  227. package/research/hypotheses/new_qubit_modalities/doc_c8567a48/manifest.json +128 -0
  228. package/research/hypotheses/new_qubit_modalities/doc_ca23e08b/main.md +59 -0
  229. package/research/hypotheses/new_qubit_modalities/doc_ca23e08b/manifest.json +128 -0
  230. package/research/hypotheses/new_qubit_modalities/doc_caf7e9d3/main.md +60 -0
  231. package/research/hypotheses/new_qubit_modalities/doc_caf7e9d3/manifest.json +139 -0
  232. package/research/hypotheses/new_qubit_modalities/doc_cbb77c2d/main.md +61 -0
  233. package/research/hypotheses/new_qubit_modalities/doc_cbb77c2d/manifest.json +110 -0
  234. package/research/hypotheses/new_qubit_modalities/doc_cc601d30/main.md +61 -0
  235. package/research/hypotheses/new_qubit_modalities/doc_cc601d30/manifest.json +136 -0
  236. package/research/hypotheses/new_qubit_modalities/doc_ccdd3f14/main.md +61 -0
  237. package/research/hypotheses/new_qubit_modalities/doc_ccdd3f14/manifest.json +136 -0
  238. package/research/hypotheses/new_qubit_modalities/doc_cde08d2e/main.md +60 -0
  239. package/research/hypotheses/new_qubit_modalities/doc_cde08d2e/manifest.json +139 -0
  240. package/research/hypotheses/new_qubit_modalities/doc_ce6a235a/main.md +60 -0
  241. package/research/hypotheses/new_qubit_modalities/doc_ce6a235a/manifest.json +139 -0
  242. package/research/hypotheses/new_qubit_modalities/doc_d093b9ad/main.md +60 -0
  243. package/research/hypotheses/new_qubit_modalities/doc_d093b9ad/manifest.json +139 -0
  244. package/research/hypotheses/new_qubit_modalities/doc_d17719c6/main.md +60 -0
  245. package/research/hypotheses/new_qubit_modalities/doc_d17719c6/manifest.json +139 -0
  246. package/research/hypotheses/new_qubit_modalities/doc_d399eea3/main.md +63 -0
  247. package/research/hypotheses/new_qubit_modalities/doc_d399eea3/manifest.json +143 -0
  248. package/research/hypotheses/new_qubit_modalities/doc_d3d90e51/main.md +60 -0
  249. package/research/hypotheses/new_qubit_modalities/doc_d3d90e51/manifest.json +139 -0
  250. package/research/hypotheses/new_qubit_modalities/doc_d874dc7e/main.md +59 -0
  251. package/research/hypotheses/new_qubit_modalities/doc_d874dc7e/manifest.json +133 -0
  252. package/research/hypotheses/new_qubit_modalities/doc_db98a164/main.md +60 -0
  253. package/research/hypotheses/new_qubit_modalities/doc_db98a164/manifest.json +139 -0
  254. package/research/hypotheses/new_qubit_modalities/doc_dbe2ca8c/main.md +60 -0
  255. package/research/hypotheses/new_qubit_modalities/doc_dbe2ca8c/manifest.json +139 -0
  256. package/research/hypotheses/new_qubit_modalities/doc_dc21205e/main.md +60 -0
  257. package/research/hypotheses/new_qubit_modalities/doc_dc21205e/manifest.json +139 -0
  258. package/research/hypotheses/new_qubit_modalities/doc_e13ae515/main.md +61 -0
  259. package/research/hypotheses/new_qubit_modalities/doc_e13ae515/manifest.json +136 -0
  260. package/research/hypotheses/new_qubit_modalities/doc_e14a007d/main.md +59 -0
  261. package/research/hypotheses/new_qubit_modalities/doc_e14a007d/manifest.json +133 -0
  262. package/research/hypotheses/new_qubit_modalities/doc_e15ccaf5/main.md +61 -0
  263. package/research/hypotheses/new_qubit_modalities/doc_e15ccaf5/manifest.json +116 -0
  264. package/research/hypotheses/new_qubit_modalities/doc_e2d250b7/main.md +60 -0
  265. package/research/hypotheses/new_qubit_modalities/doc_e2d250b7/manifest.json +139 -0
  266. package/research/hypotheses/new_qubit_modalities/doc_e32df689/main.md +59 -0
  267. package/research/hypotheses/new_qubit_modalities/doc_e32df689/manifest.json +133 -0
  268. package/research/hypotheses/new_qubit_modalities/doc_e5b4bedb/main.md +60 -0
  269. package/research/hypotheses/new_qubit_modalities/doc_e5b4bedb/manifest.json +134 -0
  270. package/research/hypotheses/new_qubit_modalities/doc_e72263b3/main.md +60 -0
  271. package/research/hypotheses/new_qubit_modalities/doc_e72263b3/manifest.json +139 -0
  272. package/research/hypotheses/new_qubit_modalities/doc_e855d210/main.md +60 -0
  273. package/research/hypotheses/new_qubit_modalities/doc_e855d210/manifest.json +139 -0
  274. package/research/hypotheses/new_qubit_modalities/doc_ecf6f682/main.md +59 -0
  275. package/research/hypotheses/new_qubit_modalities/doc_ecf6f682/manifest.json +133 -0
  276. package/research/hypotheses/new_qubit_modalities/doc_ed1d25a4/main.md +59 -0
  277. package/research/hypotheses/new_qubit_modalities/doc_ed1d25a4/manifest.json +128 -0
  278. package/research/hypotheses/new_qubit_modalities/doc_f07aa6d9/main.md +62 -0
  279. package/research/hypotheses/new_qubit_modalities/doc_f07aa6d9/manifest.json +146 -0
  280. package/research/hypotheses/new_qubit_modalities/doc_f257c4ba/main.md +59 -0
  281. package/research/hypotheses/new_qubit_modalities/doc_f257c4ba/manifest.json +128 -0
  282. package/research/hypotheses/new_qubit_modalities/doc_f2e20da6/main.md +60 -0
  283. package/research/hypotheses/new_qubit_modalities/doc_f2e20da6/manifest.json +139 -0
  284. package/research/hypotheses/new_qubit_modalities/doc_f34857aa/main.md +60 -0
  285. package/research/hypotheses/new_qubit_modalities/doc_f34857aa/manifest.json +139 -0
  286. package/research/hypotheses/new_qubit_modalities/doc_fae0902f/main.md +62 -0
  287. package/research/hypotheses/new_qubit_modalities/doc_fae0902f/manifest.json +146 -0
  288. package/research/hypotheses/new_qubit_modalities/doc_fbbb63bb/main.md +60 -0
  289. package/research/hypotheses/new_qubit_modalities/doc_fbbb63bb/manifest.json +139 -0
  290. package/research/hypotheses/new_qubit_modalities/doc_fd4cec3b/main.md +61 -0
  291. package/research/hypotheses/new_qubit_modalities/doc_fd4cec3b/manifest.json +136 -0
  292. package/research/hypotheses/new_qubit_modalities/doc_fe713bc9/main.md +59 -0
  293. package/research/hypotheses/new_qubit_modalities/doc_fe713bc9/manifest.json +133 -0
  294. package/research/hypotheses/quantum_algorithms/doc_479d7cf8/main.md +62 -0
  295. package/research/hypotheses/quantum_algorithms/doc_479d7cf8/manifest.json +146 -0
  296. package/research/hypotheses/quantum_algorithms/doc_6dbdd005/main.md +63 -0
  297. package/research/hypotheses/quantum_algorithms/doc_6dbdd005/manifest.json +143 -0
  298. package/research/hypotheses/quantum_algorithms/doc_b862fc72/main.md +61 -0
  299. package/research/hypotheses/quantum_algorithms/doc_b862fc72/manifest.json +140 -0
  300. package/research/hypotheses/quantum_algorithms/doc_cdf33ced/main.md +63 -0
  301. package/research/hypotheses/quantum_algorithms/doc_cdf33ced/manifest.json +143 -0
  302. package/research/hypotheses/quantum_error_correction/doc_3986910a/main.md +61 -0
  303. package/research/hypotheses/quantum_error_correction/doc_3986910a/manifest.json +140 -0
  304. package/research/hypotheses/quantum_error_correction/doc_460e1a25/main.md +61 -0
  305. package/research/hypotheses/quantum_error_correction/doc_460e1a25/manifest.json +140 -0
  306. package/research/hypotheses/quantum_error_correction/doc_4cdf3487/main.md +62 -0
  307. package/research/hypotheses/quantum_error_correction/doc_4cdf3487/manifest.json +131 -0
  308. package/research/hypotheses/quantum_error_correction/doc_55457312/main.md +63 -0
  309. package/research/hypotheses/quantum_error_correction/doc_55457312/manifest.json +143 -0
  310. package/research/hypotheses/quantum_error_correction/doc_562627d3/main.md +62 -0
  311. package/research/hypotheses/quantum_error_correction/doc_562627d3/manifest.json +146 -0
  312. package/research/hypotheses/quantum_error_correction/doc_60af027e/main.md +62 -0
  313. package/research/hypotheses/quantum_error_correction/doc_60af027e/manifest.json +146 -0
  314. package/research/hypotheses/quantum_error_correction/doc_83a8579f/main.md +63 -0
  315. package/research/hypotheses/quantum_error_correction/doc_83a8579f/manifest.json +143 -0
  316. package/research/hypotheses/quantum_error_correction/doc_8ec38dbd/main.md +62 -0
  317. package/research/hypotheses/quantum_error_correction/doc_8ec38dbd/manifest.json +146 -0
  318. package/research/hypotheses/quantum_error_correction/doc_90cb416e/main.md +61 -0
  319. package/research/hypotheses/quantum_error_correction/doc_90cb416e/manifest.json +140 -0
  320. package/research/hypotheses/quantum_error_correction/doc_a40b574c/main.md +62 -0
  321. package/research/hypotheses/quantum_error_correction/doc_a40b574c/manifest.json +146 -0
  322. package/research/hypotheses/quantum_error_correction/doc_b4efacc8/main.md +63 -0
  323. package/research/hypotheses/quantum_error_correction/doc_b4efacc8/manifest.json +143 -0
  324. package/research/hypotheses/quantum_error_correction/doc_ca0d6569/main.md +62 -0
  325. package/research/hypotheses/quantum_error_correction/doc_ca0d6569/manifest.json +146 -0
  326. package/research/hypotheses/quantum_error_correction/doc_d1eb8740/main.md +61 -0
  327. package/research/hypotheses/quantum_error_correction/doc_d1eb8740/manifest.json +140 -0
  328. package/research/hypotheses/quantum_error_correction/doc_e55fcdcf/main.md +62 -0
  329. package/research/hypotheses/quantum_error_correction/doc_e55fcdcf/manifest.json +120 -0
  330. package/research/hypotheses/quantum_error_correction/doc_f227b165/main.md +63 -0
  331. package/research/hypotheses/quantum_error_correction/doc_f227b165/manifest.json +133 -0
  332. package/research/hypotheses/quantum_error_correction/doc_f5f78884/main.md +61 -0
  333. package/research/hypotheses/quantum_error_correction/doc_f5f78884/manifest.json +140 -0
  334. package/research/hypotheses/quantum_error_correction/doc_fdbcc4b0/main.md +61 -0
  335. package/research/hypotheses/quantum_error_correction/doc_fdbcc4b0/manifest.json +140 -0
  336. package/research/indices/patent_queue.md +124 -0
  337. package/research/patents/.gitkeep +0 -0
  338. package/research/patents/new_qubit_modalities/doc_083cce20/main.md +64 -0
  339. package/research/patents/new_qubit_modalities/doc_083cce20/main.tex +68 -0
  340. package/research/patents/new_qubit_modalities/doc_083cce20/manifest.json +144 -0
  341. package/research/patents/new_qubit_modalities/doc_096ccdfa/main.md +64 -0
  342. package/research/patents/new_qubit_modalities/doc_096ccdfa/main.tex +68 -0
  343. package/research/patents/new_qubit_modalities/doc_096ccdfa/manifest.json +145 -0
  344. package/research/patents/new_qubit_modalities/doc_099071ac/main.md +64 -0
  345. package/research/patents/new_qubit_modalities/doc_099071ac/main.tex +68 -0
  346. package/research/patents/new_qubit_modalities/doc_099071ac/manifest.json +145 -0
  347. package/research/patents/new_qubit_modalities/doc_0adeaec6/main.md +64 -0
  348. package/research/patents/new_qubit_modalities/doc_0adeaec6/main.tex +68 -0
  349. package/research/patents/new_qubit_modalities/doc_0adeaec6/manifest.json +145 -0
  350. package/research/patents/new_qubit_modalities/doc_0e4132a8/main.md +64 -0
  351. package/research/patents/new_qubit_modalities/doc_0e4132a8/main.tex +68 -0
  352. package/research/patents/new_qubit_modalities/doc_0e4132a8/manifest.json +145 -0
  353. package/research/patents/new_qubit_modalities/doc_10af60fa/main.md +64 -0
  354. package/research/patents/new_qubit_modalities/doc_10af60fa/main.tex +68 -0
  355. package/research/patents/new_qubit_modalities/doc_10af60fa/manifest.json +145 -0
  356. package/research/patents/new_qubit_modalities/doc_10afe71a/main.md +64 -0
  357. package/research/patents/new_qubit_modalities/doc_10afe71a/main.tex +68 -0
  358. package/research/patents/new_qubit_modalities/doc_10afe71a/manifest.json +145 -0
  359. package/research/patents/new_qubit_modalities/doc_1339dcfa/main.md +64 -0
  360. package/research/patents/new_qubit_modalities/doc_1339dcfa/main.tex +68 -0
  361. package/research/patents/new_qubit_modalities/doc_1339dcfa/manifest.json +145 -0
  362. package/research/patents/new_qubit_modalities/doc_15222e50/main.md +64 -0
  363. package/research/patents/new_qubit_modalities/doc_15222e50/main.tex +68 -0
  364. package/research/patents/new_qubit_modalities/doc_15222e50/manifest.json +145 -0
  365. package/research/patents/new_qubit_modalities/doc_19e3f8ad/main.md +64 -0
  366. package/research/patents/new_qubit_modalities/doc_19e3f8ad/main.tex +68 -0
  367. package/research/patents/new_qubit_modalities/doc_19e3f8ad/manifest.json +144 -0
  368. package/research/patents/new_qubit_modalities/doc_1a5d01f8/main.md +64 -0
  369. package/research/patents/new_qubit_modalities/doc_1a5d01f8/main.tex +68 -0
  370. package/research/patents/new_qubit_modalities/doc_1a5d01f8/manifest.json +145 -0
  371. package/research/patents/new_qubit_modalities/doc_1bd8bb3b/main.md +64 -0
  372. package/research/patents/new_qubit_modalities/doc_1bd8bb3b/main.tex +68 -0
  373. package/research/patents/new_qubit_modalities/doc_1bd8bb3b/manifest.json +145 -0
  374. package/research/patents/new_qubit_modalities/doc_1c7b4dc1/main.md +64 -0
  375. package/research/patents/new_qubit_modalities/doc_1c7b4dc1/main.tex +68 -0
  376. package/research/patents/new_qubit_modalities/doc_1c7b4dc1/manifest.json +145 -0
  377. package/research/patents/new_qubit_modalities/doc_1ce08a7e/main.md +64 -0
  378. package/research/patents/new_qubit_modalities/doc_1ce08a7e/main.tex +68 -0
  379. package/research/patents/new_qubit_modalities/doc_1ce08a7e/manifest.json +130 -0
  380. package/research/patents/new_qubit_modalities/doc_1cecf1a6/main.md +64 -0
  381. package/research/patents/new_qubit_modalities/doc_1cecf1a6/main.tex +68 -0
  382. package/research/patents/new_qubit_modalities/doc_1cecf1a6/manifest.json +145 -0
  383. package/research/patents/new_qubit_modalities/doc_1d9ad900/main.md +64 -0
  384. package/research/patents/new_qubit_modalities/doc_1d9ad900/main.tex +68 -0
  385. package/research/patents/new_qubit_modalities/doc_1d9ad900/manifest.json +144 -0
  386. package/research/patents/new_qubit_modalities/doc_1ec2eda5/main.md +64 -0
  387. package/research/patents/new_qubit_modalities/doc_1ec2eda5/main.tex +68 -0
  388. package/research/patents/new_qubit_modalities/doc_1ec2eda5/manifest.json +145 -0
  389. package/research/patents/new_qubit_modalities/doc_24b05ff7/main.md +64 -0
  390. package/research/patents/new_qubit_modalities/doc_24b05ff7/main.tex +68 -0
  391. package/research/patents/new_qubit_modalities/doc_24b05ff7/manifest.json +145 -0
  392. package/research/patents/new_qubit_modalities/doc_31c650c7/main.md +64 -0
  393. package/research/patents/new_qubit_modalities/doc_31c650c7/main.tex +68 -0
  394. package/research/patents/new_qubit_modalities/doc_31c650c7/manifest.json +144 -0
  395. package/research/patents/new_qubit_modalities/doc_32f4c6cd/main.md +64 -0
  396. package/research/patents/new_qubit_modalities/doc_32f4c6cd/main.tex +68 -0
  397. package/research/patents/new_qubit_modalities/doc_32f4c6cd/manifest.json +145 -0
  398. package/research/patents/new_qubit_modalities/doc_35a33533/main.md +64 -0
  399. package/research/patents/new_qubit_modalities/doc_35a33533/main.tex +68 -0
  400. package/research/patents/new_qubit_modalities/doc_35a33533/manifest.json +145 -0
  401. package/research/patents/new_qubit_modalities/doc_37d39074/main.md +64 -0
  402. package/research/patents/new_qubit_modalities/doc_37d39074/main.tex +68 -0
  403. package/research/patents/new_qubit_modalities/doc_37d39074/manifest.json +144 -0
  404. package/research/patents/new_qubit_modalities/doc_3bf9f16d/main.md +64 -0
  405. package/research/patents/new_qubit_modalities/doc_3bf9f16d/main.tex +68 -0
  406. package/research/patents/new_qubit_modalities/doc_3bf9f16d/manifest.json +145 -0
  407. package/research/patents/new_qubit_modalities/doc_4440d9d5/main.md +64 -0
  408. package/research/patents/new_qubit_modalities/doc_4440d9d5/main.tex +68 -0
  409. package/research/patents/new_qubit_modalities/doc_4440d9d5/manifest.json +130 -0
  410. package/research/patents/new_qubit_modalities/doc_46620281/main.md +64 -0
  411. package/research/patents/new_qubit_modalities/doc_46620281/main.tex +68 -0
  412. package/research/patents/new_qubit_modalities/doc_46620281/manifest.json +145 -0
  413. package/research/patents/new_qubit_modalities/doc_48532723/main.md +64 -0
  414. package/research/patents/new_qubit_modalities/doc_48532723/main.tex +68 -0
  415. package/research/patents/new_qubit_modalities/doc_48532723/manifest.json +145 -0
  416. package/research/patents/new_qubit_modalities/doc_496df511/main.md +64 -0
  417. package/research/patents/new_qubit_modalities/doc_496df511/main.tex +68 -0
  418. package/research/patents/new_qubit_modalities/doc_496df511/manifest.json +145 -0
  419. package/research/patents/new_qubit_modalities/doc_4c89560e/main.md +64 -0
  420. package/research/patents/new_qubit_modalities/doc_4c89560e/main.tex +68 -0
  421. package/research/patents/new_qubit_modalities/doc_4c89560e/manifest.json +145 -0
  422. package/research/patents/new_qubit_modalities/doc_4cea899d/main.md +64 -0
  423. package/research/patents/new_qubit_modalities/doc_4cea899d/main.tex +68 -0
  424. package/research/patents/new_qubit_modalities/doc_4cea899d/manifest.json +145 -0
  425. package/research/patents/new_qubit_modalities/doc_4d2078d6/main.md +64 -0
  426. package/research/patents/new_qubit_modalities/doc_4d2078d6/main.tex +68 -0
  427. package/research/patents/new_qubit_modalities/doc_4d2078d6/manifest.json +145 -0
  428. package/research/patents/new_qubit_modalities/doc_567d30eb/main.md +64 -0
  429. package/research/patents/new_qubit_modalities/doc_567d30eb/main.tex +68 -0
  430. package/research/patents/new_qubit_modalities/doc_567d30eb/manifest.json +144 -0
  431. package/research/patents/new_qubit_modalities/doc_58bc6d20/main.md +64 -0
  432. package/research/patents/new_qubit_modalities/doc_58bc6d20/main.tex +68 -0
  433. package/research/patents/new_qubit_modalities/doc_58bc6d20/manifest.json +145 -0
  434. package/research/patents/new_qubit_modalities/doc_59084437/main.md +64 -0
  435. package/research/patents/new_qubit_modalities/doc_59084437/main.tex +68 -0
  436. package/research/patents/new_qubit_modalities/doc_59084437/manifest.json +144 -0
  437. package/research/patents/new_qubit_modalities/doc_5b665385/main.md +64 -0
  438. package/research/patents/new_qubit_modalities/doc_5b665385/main.tex +68 -0
  439. package/research/patents/new_qubit_modalities/doc_5b665385/manifest.json +144 -0
  440. package/research/patents/new_qubit_modalities/doc_5f6eb22e/main.md +64 -0
  441. package/research/patents/new_qubit_modalities/doc_5f6eb22e/main.tex +68 -0
  442. package/research/patents/new_qubit_modalities/doc_5f6eb22e/manifest.json +144 -0
  443. package/research/patents/new_qubit_modalities/doc_61841835/main.md +64 -0
  444. package/research/patents/new_qubit_modalities/doc_61841835/main.tex +68 -0
  445. package/research/patents/new_qubit_modalities/doc_61841835/manifest.json +145 -0
  446. package/research/patents/new_qubit_modalities/doc_652f3497/main.md +64 -0
  447. package/research/patents/new_qubit_modalities/doc_652f3497/main.tex +68 -0
  448. package/research/patents/new_qubit_modalities/doc_652f3497/manifest.json +145 -0
  449. package/research/patents/new_qubit_modalities/doc_65e31048/main.md +64 -0
  450. package/research/patents/new_qubit_modalities/doc_65e31048/main.tex +68 -0
  451. package/research/patents/new_qubit_modalities/doc_65e31048/manifest.json +145 -0
  452. package/research/patents/new_qubit_modalities/doc_6906c32e/main.md +64 -0
  453. package/research/patents/new_qubit_modalities/doc_6906c32e/main.tex +68 -0
  454. package/research/patents/new_qubit_modalities/doc_6906c32e/manifest.json +144 -0
  455. package/research/patents/new_qubit_modalities/doc_69b6b7f2/main.md +64 -0
  456. package/research/patents/new_qubit_modalities/doc_69b6b7f2/main.tex +68 -0
  457. package/research/patents/new_qubit_modalities/doc_69b6b7f2/manifest.json +146 -0
  458. package/research/patents/new_qubit_modalities/doc_6c2088b8/main.md +64 -0
  459. package/research/patents/new_qubit_modalities/doc_6c2088b8/main.tex +68 -0
  460. package/research/patents/new_qubit_modalities/doc_6c2088b8/manifest.json +145 -0
  461. package/research/patents/new_qubit_modalities/doc_6f269347/main.md +64 -0
  462. package/research/patents/new_qubit_modalities/doc_6f269347/main.tex +68 -0
  463. package/research/patents/new_qubit_modalities/doc_6f269347/manifest.json +144 -0
  464. package/research/patents/new_qubit_modalities/doc_72bb1059/main.md +64 -0
  465. package/research/patents/new_qubit_modalities/doc_72bb1059/main.tex +68 -0
  466. package/research/patents/new_qubit_modalities/doc_72bb1059/manifest.json +134 -0
  467. package/research/patents/new_qubit_modalities/doc_7302b617/main.md +64 -0
  468. package/research/patents/new_qubit_modalities/doc_7302b617/main.tex +68 -0
  469. package/research/patents/new_qubit_modalities/doc_7302b617/manifest.json +144 -0
  470. package/research/patents/new_qubit_modalities/doc_73419bbf/main.md +64 -0
  471. package/research/patents/new_qubit_modalities/doc_73419bbf/main.tex +68 -0
  472. package/research/patents/new_qubit_modalities/doc_73419bbf/manifest.json +139 -0
  473. package/research/patents/new_qubit_modalities/doc_7403ead0/main.md +64 -0
  474. package/research/patents/new_qubit_modalities/doc_7403ead0/main.tex +68 -0
  475. package/research/patents/new_qubit_modalities/doc_7403ead0/manifest.json +145 -0
  476. package/research/patents/new_qubit_modalities/doc_7541d2ca/main.md +64 -0
  477. package/research/patents/new_qubit_modalities/doc_7541d2ca/main.tex +68 -0
  478. package/research/patents/new_qubit_modalities/doc_7541d2ca/manifest.json +145 -0
  479. package/research/patents/new_qubit_modalities/doc_7680aa01/main.md +64 -0
  480. package/research/patents/new_qubit_modalities/doc_7680aa01/main.tex +68 -0
  481. package/research/patents/new_qubit_modalities/doc_7680aa01/manifest.json +144 -0
  482. package/research/patents/new_qubit_modalities/doc_7c687253/main.md +64 -0
  483. package/research/patents/new_qubit_modalities/doc_7c687253/main.tex +68 -0
  484. package/research/patents/new_qubit_modalities/doc_7c687253/manifest.json +145 -0
  485. package/research/patents/new_qubit_modalities/doc_7e9ac677/main.md +64 -0
  486. package/research/patents/new_qubit_modalities/doc_7e9ac677/main.tex +68 -0
  487. package/research/patents/new_qubit_modalities/doc_7e9ac677/manifest.json +144 -0
  488. package/research/patents/new_qubit_modalities/doc_80d1269d/main.md +64 -0
  489. package/research/patents/new_qubit_modalities/doc_80d1269d/main.tex +68 -0
  490. package/research/patents/new_qubit_modalities/doc_80d1269d/manifest.json +145 -0
  491. package/research/patents/new_qubit_modalities/doc_8415653b/main.md +64 -0
  492. package/research/patents/new_qubit_modalities/doc_8415653b/main.tex +68 -0
  493. package/research/patents/new_qubit_modalities/doc_8415653b/manifest.json +145 -0
  494. package/research/patents/new_qubit_modalities/doc_86c2029b/main.md +64 -0
  495. package/research/patents/new_qubit_modalities/doc_86c2029b/main.tex +68 -0
  496. package/research/patents/new_qubit_modalities/doc_86c2029b/manifest.json +145 -0
  497. package/research/patents/new_qubit_modalities/doc_88f8f770/main.md +64 -0
  498. package/research/patents/new_qubit_modalities/doc_88f8f770/main.tex +68 -0
  499. package/research/patents/new_qubit_modalities/doc_88f8f770/manifest.json +145 -0
  500. package/research/patents/new_qubit_modalities/doc_8b820b6d/main.md +64 -0
  501. package/research/patents/new_qubit_modalities/doc_8b820b6d/main.tex +68 -0
  502. package/research/patents/new_qubit_modalities/doc_8b820b6d/manifest.json +144 -0
  503. package/research/patents/new_qubit_modalities/doc_8de83b3b/main.md +64 -0
  504. package/research/patents/new_qubit_modalities/doc_8de83b3b/main.tex +68 -0
  505. package/research/patents/new_qubit_modalities/doc_8de83b3b/manifest.json +144 -0
  506. package/research/patents/new_qubit_modalities/doc_8f3c09b2/main.md +64 -0
  507. package/research/patents/new_qubit_modalities/doc_8f3c09b2/main.tex +68 -0
  508. package/research/patents/new_qubit_modalities/doc_8f3c09b2/manifest.json +145 -0
  509. package/research/patents/new_qubit_modalities/doc_8f84e761/main.md +64 -0
  510. package/research/patents/new_qubit_modalities/doc_8f84e761/main.tex +68 -0
  511. package/research/patents/new_qubit_modalities/doc_8f84e761/manifest.json +145 -0
  512. package/research/patents/new_qubit_modalities/doc_900ee19f/main.md +64 -0
  513. package/research/patents/new_qubit_modalities/doc_900ee19f/main.tex +68 -0
  514. package/research/patents/new_qubit_modalities/doc_900ee19f/manifest.json +144 -0
  515. package/research/patents/new_qubit_modalities/doc_908b0523/main.md +64 -0
  516. package/research/patents/new_qubit_modalities/doc_908b0523/main.tex +68 -0
  517. package/research/patents/new_qubit_modalities/doc_908b0523/manifest.json +145 -0
  518. package/research/patents/new_qubit_modalities/doc_931099a3/main.md +64 -0
  519. package/research/patents/new_qubit_modalities/doc_931099a3/main.tex +68 -0
  520. package/research/patents/new_qubit_modalities/doc_931099a3/manifest.json +145 -0
  521. package/research/patents/new_qubit_modalities/doc_93ee5d51/main.md +64 -0
  522. package/research/patents/new_qubit_modalities/doc_93ee5d51/main.tex +68 -0
  523. package/research/patents/new_qubit_modalities/doc_93ee5d51/manifest.json +144 -0
  524. package/research/patents/new_qubit_modalities/doc_98121789/main.md +64 -0
  525. package/research/patents/new_qubit_modalities/doc_98121789/main.tex +68 -0
  526. package/research/patents/new_qubit_modalities/doc_98121789/manifest.json +144 -0
  527. package/research/patents/new_qubit_modalities/doc_99fa1dbf/main.md +64 -0
  528. package/research/patents/new_qubit_modalities/doc_99fa1dbf/main.tex +68 -0
  529. package/research/patents/new_qubit_modalities/doc_99fa1dbf/manifest.json +145 -0
  530. package/research/patents/new_qubit_modalities/doc_9abf5f6a/main.md +64 -0
  531. package/research/patents/new_qubit_modalities/doc_9abf5f6a/main.tex +68 -0
  532. package/research/patents/new_qubit_modalities/doc_9abf5f6a/manifest.json +145 -0
  533. package/research/patents/new_qubit_modalities/doc_9cff9f3f/main.md +64 -0
  534. package/research/patents/new_qubit_modalities/doc_9cff9f3f/main.tex +68 -0
  535. package/research/patents/new_qubit_modalities/doc_9cff9f3f/manifest.json +145 -0
  536. package/research/patents/new_qubit_modalities/doc_9fed647b/main.md +64 -0
  537. package/research/patents/new_qubit_modalities/doc_9fed647b/main.tex +68 -0
  538. package/research/patents/new_qubit_modalities/doc_9fed647b/manifest.json +144 -0
  539. package/research/patents/new_qubit_modalities/doc_a3f62d60/main.md +64 -0
  540. package/research/patents/new_qubit_modalities/doc_a3f62d60/main.tex +68 -0
  541. package/research/patents/new_qubit_modalities/doc_a3f62d60/manifest.json +145 -0
  542. package/research/patents/new_qubit_modalities/doc_a788a20b/main.md +64 -0
  543. package/research/patents/new_qubit_modalities/doc_a788a20b/main.tex +68 -0
  544. package/research/patents/new_qubit_modalities/doc_a788a20b/manifest.json +145 -0
  545. package/research/patents/new_qubit_modalities/doc_a9b5116c/main.md +64 -0
  546. package/research/patents/new_qubit_modalities/doc_a9b5116c/main.tex +68 -0
  547. package/research/patents/new_qubit_modalities/doc_a9b5116c/manifest.json +145 -0
  548. package/research/patents/new_qubit_modalities/doc_aaa731aa/main.md +64 -0
  549. package/research/patents/new_qubit_modalities/doc_aaa731aa/main.tex +68 -0
  550. package/research/patents/new_qubit_modalities/doc_aaa731aa/manifest.json +145 -0
  551. package/research/patents/new_qubit_modalities/doc_afa469c3/main.md +64 -0
  552. package/research/patents/new_qubit_modalities/doc_afa469c3/main.tex +68 -0
  553. package/research/patents/new_qubit_modalities/doc_afa469c3/manifest.json +145 -0
  554. package/research/patents/new_qubit_modalities/doc_b19b53e2/main.md +64 -0
  555. package/research/patents/new_qubit_modalities/doc_b19b53e2/main.tex +68 -0
  556. package/research/patents/new_qubit_modalities/doc_b19b53e2/manifest.json +145 -0
  557. package/research/patents/new_qubit_modalities/doc_b64d1987/main.md +64 -0
  558. package/research/patents/new_qubit_modalities/doc_b64d1987/main.tex +68 -0
  559. package/research/patents/new_qubit_modalities/doc_b64d1987/manifest.json +145 -0
  560. package/research/patents/new_qubit_modalities/doc_b68e9075/main.md +64 -0
  561. package/research/patents/new_qubit_modalities/doc_b68e9075/main.tex +68 -0
  562. package/research/patents/new_qubit_modalities/doc_b68e9075/manifest.json +146 -0
  563. package/research/patents/new_qubit_modalities/doc_b6b86c9e/main.md +64 -0
  564. package/research/patents/new_qubit_modalities/doc_b6b86c9e/main.tex +68 -0
  565. package/research/patents/new_qubit_modalities/doc_b6b86c9e/manifest.json +146 -0
  566. package/research/patents/new_qubit_modalities/doc_b7240f70/main.md +64 -0
  567. package/research/patents/new_qubit_modalities/doc_b7240f70/main.tex +68 -0
  568. package/research/patents/new_qubit_modalities/doc_b7240f70/manifest.json +145 -0
  569. package/research/patents/new_qubit_modalities/doc_b7b42d51/main.md +64 -0
  570. package/research/patents/new_qubit_modalities/doc_b7b42d51/main.tex +68 -0
  571. package/research/patents/new_qubit_modalities/doc_b7b42d51/manifest.json +145 -0
  572. package/research/patents/new_qubit_modalities/doc_b83f6b8a/main.md +64 -0
  573. package/research/patents/new_qubit_modalities/doc_b83f6b8a/main.tex +68 -0
  574. package/research/patents/new_qubit_modalities/doc_b83f6b8a/manifest.json +145 -0
  575. package/research/patents/new_qubit_modalities/doc_b8f7e1bb/main.md +64 -0
  576. package/research/patents/new_qubit_modalities/doc_b8f7e1bb/main.tex +68 -0
  577. package/research/patents/new_qubit_modalities/doc_b8f7e1bb/manifest.json +144 -0
  578. package/research/patents/new_qubit_modalities/doc_bc5321b9/main.md +64 -0
  579. package/research/patents/new_qubit_modalities/doc_bc5321b9/main.tex +68 -0
  580. package/research/patents/new_qubit_modalities/doc_bc5321b9/manifest.json +144 -0
  581. package/research/patents/new_qubit_modalities/doc_c361e73b/main.md +64 -0
  582. package/research/patents/new_qubit_modalities/doc_c361e73b/main.tex +68 -0
  583. package/research/patents/new_qubit_modalities/doc_c361e73b/manifest.json +135 -0
  584. package/research/patents/new_qubit_modalities/doc_cb9b6a6e/main.md +64 -0
  585. package/research/patents/new_qubit_modalities/doc_cb9b6a6e/main.tex +68 -0
  586. package/research/patents/new_qubit_modalities/doc_cb9b6a6e/manifest.json +144 -0
  587. package/research/patents/new_qubit_modalities/doc_cf3eeb26/main.md +64 -0
  588. package/research/patents/new_qubit_modalities/doc_cf3eeb26/main.tex +68 -0
  589. package/research/patents/new_qubit_modalities/doc_cf3eeb26/manifest.json +144 -0
  590. package/research/patents/new_qubit_modalities/doc_cfbeb808/main.md +64 -0
  591. package/research/patents/new_qubit_modalities/doc_cfbeb808/main.tex +68 -0
  592. package/research/patents/new_qubit_modalities/doc_cfbeb808/manifest.json +144 -0
  593. package/research/patents/new_qubit_modalities/doc_cffd04a6/main.md +64 -0
  594. package/research/patents/new_qubit_modalities/doc_cffd04a6/main.tex +68 -0
  595. package/research/patents/new_qubit_modalities/doc_cffd04a6/manifest.json +144 -0
  596. package/research/patents/new_qubit_modalities/doc_d416b00f/main.md +64 -0
  597. package/research/patents/new_qubit_modalities/doc_d416b00f/main.tex +68 -0
  598. package/research/patents/new_qubit_modalities/doc_d416b00f/manifest.json +145 -0
  599. package/research/patents/new_qubit_modalities/doc_d557dc44/main.md +64 -0
  600. package/research/patents/new_qubit_modalities/doc_d557dc44/main.tex +68 -0
  601. package/research/patents/new_qubit_modalities/doc_d557dc44/manifest.json +145 -0
  602. package/research/patents/new_qubit_modalities/doc_d80f7790/main.md +64 -0
  603. package/research/patents/new_qubit_modalities/doc_d80f7790/main.tex +68 -0
  604. package/research/patents/new_qubit_modalities/doc_d80f7790/manifest.json +145 -0
  605. package/research/patents/new_qubit_modalities/doc_d8aadbce/main.md +64 -0
  606. package/research/patents/new_qubit_modalities/doc_d8aadbce/main.tex +68 -0
  607. package/research/patents/new_qubit_modalities/doc_d8aadbce/manifest.json +144 -0
  608. package/research/patents/new_qubit_modalities/doc_da88d4e8/main.md +64 -0
  609. package/research/patents/new_qubit_modalities/doc_da88d4e8/main.tex +68 -0
  610. package/research/patents/new_qubit_modalities/doc_da88d4e8/manifest.json +144 -0
  611. package/research/patents/new_qubit_modalities/doc_de3d7026/main.md +64 -0
  612. package/research/patents/new_qubit_modalities/doc_de3d7026/main.tex +68 -0
  613. package/research/patents/new_qubit_modalities/doc_de3d7026/manifest.json +144 -0
  614. package/research/patents/new_qubit_modalities/doc_e14c8177/main.md +64 -0
  615. package/research/patents/new_qubit_modalities/doc_e14c8177/main.tex +68 -0
  616. package/research/patents/new_qubit_modalities/doc_e14c8177/manifest.json +145 -0
  617. package/research/patents/new_qubit_modalities/doc_e1d1a39d/main.md +64 -0
  618. package/research/patents/new_qubit_modalities/doc_e1d1a39d/main.tex +68 -0
  619. package/research/patents/new_qubit_modalities/doc_e1d1a39d/manifest.json +146 -0
  620. package/research/patents/new_qubit_modalities/doc_e4e26a47/main.md +64 -0
  621. package/research/patents/new_qubit_modalities/doc_e4e26a47/main.tex +68 -0
  622. package/research/patents/new_qubit_modalities/doc_e4e26a47/manifest.json +145 -0
  623. package/research/patents/new_qubit_modalities/doc_e6cb751e/main.md +64 -0
  624. package/research/patents/new_qubit_modalities/doc_e6cb751e/main.tex +68 -0
  625. package/research/patents/new_qubit_modalities/doc_e6cb751e/manifest.json +144 -0
  626. package/research/patents/new_qubit_modalities/doc_e77f22ca/main.md +64 -0
  627. package/research/patents/new_qubit_modalities/doc_e77f22ca/main.tex +68 -0
  628. package/research/patents/new_qubit_modalities/doc_e77f22ca/manifest.json +145 -0
  629. package/research/patents/new_qubit_modalities/doc_e907e2a8/main.md +64 -0
  630. package/research/patents/new_qubit_modalities/doc_e907e2a8/main.tex +68 -0
  631. package/research/patents/new_qubit_modalities/doc_e907e2a8/manifest.json +144 -0
  632. package/research/patents/new_qubit_modalities/doc_f5f85ca6/main.md +64 -0
  633. package/research/patents/new_qubit_modalities/doc_f5f85ca6/main.tex +68 -0
  634. package/research/patents/new_qubit_modalities/doc_f5f85ca6/manifest.json +125 -0
  635. package/research/patents/new_qubit_modalities/doc_f6a9e5b3/main.md +64 -0
  636. package/research/patents/new_qubit_modalities/doc_f6a9e5b3/main.tex +68 -0
  637. package/research/patents/new_qubit_modalities/doc_f6a9e5b3/manifest.json +144 -0
  638. package/research/patents/new_qubit_modalities/doc_f83f92f0/main.md +64 -0
  639. package/research/patents/new_qubit_modalities/doc_f83f92f0/main.tex +68 -0
  640. package/research/patents/new_qubit_modalities/doc_f83f92f0/manifest.json +145 -0
  641. package/research/patents/new_qubit_modalities/doc_f99fe94b/main.md +64 -0
  642. package/research/patents/new_qubit_modalities/doc_f99fe94b/main.tex +68 -0
  643. package/research/patents/new_qubit_modalities/doc_f99fe94b/manifest.json +145 -0
  644. package/research/patents/new_qubit_modalities/doc_f9d8235b/main.md +64 -0
  645. package/research/patents/new_qubit_modalities/doc_f9d8235b/main.tex +68 -0
  646. package/research/patents/new_qubit_modalities/doc_f9d8235b/manifest.json +144 -0
  647. package/research/patents/new_qubit_modalities/doc_fe0561b4/main.md +64 -0
  648. package/research/patents/new_qubit_modalities/doc_fe0561b4/main.tex +68 -0
  649. package/research/patents/new_qubit_modalities/doc_fe0561b4/manifest.json +145 -0
  650. package/research/patents/new_qubit_modalities/doc_ff47a428/main.md +64 -0
  651. package/research/patents/new_qubit_modalities/doc_ff47a428/main.tex +68 -0
  652. package/research/patents/new_qubit_modalities/doc_ff47a428/manifest.json +145 -0
  653. package/research/patents/quantum_algorithms/doc_af0d56c9/main.md +64 -0
  654. package/research/patents/quantum_algorithms/doc_af0d56c9/main.tex +68 -0
  655. package/research/patents/quantum_algorithms/doc_af0d56c9/manifest.json +146 -0
  656. package/research/patents/quantum_error_correction/doc_0a24b8af/main.md +64 -0
  657. package/research/patents/quantum_error_correction/doc_0a24b8af/main.tex +68 -0
  658. package/research/patents/quantum_error_correction/doc_0a24b8af/manifest.json +141 -0
  659. package/research/patents/quantum_error_correction/doc_0a6aee57/main.md +64 -0
  660. package/research/patents/quantum_error_correction/doc_0a6aee57/main.tex +68 -0
  661. package/research/patents/quantum_error_correction/doc_0a6aee57/manifest.json +146 -0
  662. package/research/patents/quantum_error_correction/doc_20a67ec2/main.md +64 -0
  663. package/research/patents/quantum_error_correction/doc_20a67ec2/main.tex +68 -0
  664. package/research/patents/quantum_error_correction/doc_20a67ec2/manifest.json +146 -0
  665. package/research/patents/quantum_error_correction/doc_458e5def/main.md +64 -0
  666. package/research/patents/quantum_error_correction/doc_458e5def/main.tex +68 -0
  667. package/research/patents/quantum_error_correction/doc_458e5def/manifest.json +146 -0
  668. package/research/patents/quantum_error_correction/doc_475ce69d/main.md +64 -0
  669. package/research/patents/quantum_error_correction/doc_475ce69d/main.tex +68 -0
  670. package/research/patents/quantum_error_correction/doc_475ce69d/manifest.json +135 -0
  671. package/research/patents/quantum_error_correction/doc_6c43b9d3/main.md +64 -0
  672. package/research/patents/quantum_error_correction/doc_6c43b9d3/main.tex +68 -0
  673. package/research/patents/quantum_error_correction/doc_6c43b9d3/manifest.json +145 -0
  674. package/research/patents/quantum_error_correction/doc_837d0cbb/main.md +64 -0
  675. package/research/patents/quantum_error_correction/doc_837d0cbb/main.tex +68 -0
  676. package/research/patents/quantum_error_correction/doc_837d0cbb/manifest.json +146 -0
  677. package/research/patents/quantum_error_correction/doc_89199c22/main.md +64 -0
  678. package/research/patents/quantum_error_correction/doc_89199c22/main.tex +68 -0
  679. package/research/patents/quantum_error_correction/doc_89199c22/manifest.json +145 -0
  680. package/research/patents/quantum_error_correction/doc_aaee59e8/main.md +64 -0
  681. package/research/patents/quantum_error_correction/doc_aaee59e8/main.tex +68 -0
  682. package/research/patents/quantum_error_correction/doc_aaee59e8/manifest.json +146 -0
  683. package/research/patents/quantum_error_correction/doc_cf5f172b/main.md +64 -0
  684. package/research/patents/quantum_error_correction/doc_cf5f172b/main.tex +68 -0
  685. package/research/patents/quantum_error_correction/doc_cf5f172b/manifest.json +146 -0
  686. package/research/patents/quantum_error_correction/doc_d5f8a4ee/main.md +64 -0
  687. package/research/patents/quantum_error_correction/doc_d5f8a4ee/main.tex +68 -0
  688. package/research/patents/quantum_error_correction/doc_d5f8a4ee/manifest.json +146 -0
  689. package/research/patents/quantum_error_correction/doc_df16f521/main.md +64 -0
  690. package/research/patents/quantum_error_correction/doc_df16f521/main.tex +68 -0
  691. package/research/patents/quantum_error_correction/doc_df16f521/manifest.json +145 -0
  692. package/research/simulations/.gitkeep +0 -0
  693. package/research/topics/algorithms/seed_qsvt_2026/main.tex +93 -0
  694. package/research/topics/algorithms/seed_qsvt_2026/manifest.json +19 -0
  695. package/research/topics/molecular_simulation/seed_femoco_2026/main.tex +119 -0
  696. package/research/topics/molecular_simulation/seed_femoco_2026/manifest.json +20 -0
  697. package/research/topics/qec/seed_surface_code_2026/main.tex +89 -0
  698. package/research/topics/qec/seed_surface_code_2026/manifest.json +20 -0
  699. package/research/topics/qubits/seed_neutral_atom_2026/main.tex +98 -0
  700. package/research/topics/qubits/seed_neutral_atom_2026/manifest.json +19 -0
  701. package/scripts/benchmark.js +56 -0
  702. package/scripts/cli.js +237 -0
  703. package/src/core/ANNPsi.js +266 -0
  704. package/src/core/ArtificialJunkyNeuron.js +439 -0
  705. package/src/core/QSpherifierAgent.js +620 -0
  706. package/src/core/StateSerializer.js +74 -0
  707. package/src/index.js +178 -0
  708. package/src/layers/AJNLayer.js +248 -0
  709. package/src/layers/TransformerBlock.js +201 -0
  710. package/src/llm/AnthropicAdapter.js +76 -0
  711. package/src/llm/DeepSeekAdapter.js +78 -0
  712. package/src/llm/GoogleAdapter.js +78 -0
  713. package/src/llm/LLMAdapter.js +64 -0
  714. package/src/llm/LLMRouter.js +107 -0
  715. package/src/llm/LocalLLMAdapter.js +72 -0
  716. package/src/llm/OpenAIAdapter.js +78 -0
  717. package/src/llm/ZAIAdapter.js +99 -0
  718. package/src/modules/CascadeMonitor.js +84 -0
  719. package/src/modules/CitationGraph.js +119 -0
  720. package/src/modules/DocumentArchivist.js +326 -0
  721. package/src/modules/HierarchicalCommandInterpreter.js +220 -0
  722. package/src/modules/HypothesisGenerator.js +421 -0
  723. package/src/modules/MemorySystem.js +210 -0
  724. package/src/modules/MetricsCollector.js +139 -0
  725. package/src/modules/PatentClusterManager.js +199 -0
  726. package/src/modules/PatentDraftAssistant.js +221 -0
  727. package/src/modules/PluginManager.js +92 -0
  728. package/src/modules/QuantumKnowledgeGraph.js +888 -0
  729. package/src/modules/ResearchLineRouter.js +187 -0
  730. package/src/modules/ResourceFeasibilityChecker.js +494 -0
  731. package/src/modules/SafetyGuardrails.js +139 -0
  732. package/src/modules/TokenEnergyArbitrator.js +129 -0
  733. package/src/tools/BibliographyTool.js +74 -0
  734. package/src/tools/FileSystemTool.js +91 -0
  735. package/src/tools/LaTeXDocumentTool.js +94 -0
  736. package/src/tools/QuantumPhysicsTool.js +219 -0
  737. package/src/tools/Tool.js +30 -0
  738. package/src/tools/ToolRegistry.js +40 -0
  739. package/src/tools/WebSearchTool.js +50 -0
  740. package/src/training/TrainingPipeline.js +52 -0
  741. package/tests/run.js +200 -0
  742. package/web/public/css/dashboard.css +431 -0
  743. package/web/public/favicon.png +0 -0
  744. package/web/public/index.html +170 -0
  745. package/web/public/js/dashboard.js +431 -0
  746. package/web/public/qspherifier.png +0 -0
  747. package/web/server.js +306 -0
@@ -0,0 +1,620 @@
1
+ /**
2
+ * QSpherifierAgent.js — quantum-spherifier (v1.0)
3
+ * ─────────────────────────────────────────────────────────────────────────────
4
+ * Main orchestrator. Extends the predator-jungle-agent v2.0 architecture
5
+ * with a quantum-computing-specialised scientific research loop spanning
6
+ * four research lines.
7
+ *
8
+ * MISSION: Build quantum computers capable of solving problems impossible
9
+ * for current (and short/mid-term) classical computers, across four lines:
10
+ * 1. Quantum Error Correction (QEC)
11
+ * 2. New qubit modalities
12
+ * 3. Quantum algorithms
13
+ * 4. Molecular simulation
14
+ *
15
+ * KEY BEHAVIOUR (AJN "addiction" property):
16
+ * - On launch, immediately begins autonomous research (does NOT wait
17
+ * for an owner directive — this is the AJN addiction property inherited
18
+ * from predator-jungle-agent).
19
+ * - Each research cycle:
20
+ * 1. ResearchLineRouter dispatches to a line (or cross-links two)
21
+ * 2. Interpret owner directive (or pick under-explored topic autonomously)
22
+ * 3. Generate hypothesis via HypothesisGenerator (cross-linked to KG)
23
+ * 4. Assess feasibility via ResourceFeasibilityChecker (real hardware anchors)
24
+ * 5. If feasible: draft design and patent application
25
+ * 6. Archive all artifacts under /research/<category>/<topic>/<id>/
26
+ * 7. Update KG and CitationGraph with cross-links
27
+ * 8. Periodically rebuild patent clusters
28
+ * 9. Push progress events to WebSocket subscribers
29
+ * - Owner can guide the agent at any time via the web UI or CLI:
30
+ * `node scripts/cli.js guide "Focus on surface code distance 11 with neutral atoms"`
31
+ *
32
+ * PRINCIPLE: Everything progresses robustly, linking scientific and
33
+ * technological advances together so nothing stays isolated from reality
34
+ * and short/mid-term possibility.
35
+ * ─────────────────────────────────────────────────────────────────────────────
36
+ */
37
+
38
+ import { EventEmitter } from 'eventemitter3';
39
+ import { v4 as uuidv4 } from 'uuid';
40
+
41
+ import { ANNPsi, QUANTUM_STIMULUS_CLASSES } from './ANNPsi.js';
42
+ import { HierarchicalCommandInterpreter } from '../modules/HierarchicalCommandInterpreter.js';
43
+ import {
44
+ TokenEnergyArbitrator,
45
+ PraxicStreamExecutor,
46
+ } from '../modules/TokenEnergyArbitrator.js';
47
+ import { CascadeMonitor } from '../modules/CascadeMonitor.js';
48
+ import { MemorySystem } from '../modules/MemorySystem.js';
49
+ import { SafetyGuardrails } from '../modules/SafetyGuardrails.js';
50
+ import { MetricsCollector } from '../modules/MetricsCollector.js';
51
+ import { PluginManager } from '../modules/PluginManager.js';
52
+ import { QuantumKnowledgeGraph } from '../modules/QuantumKnowledgeGraph.js';
53
+ import { CitationGraph } from '../modules/CitationGraph.js';
54
+ import { HypothesisGenerator } from '../modules/HypothesisGenerator.js';
55
+ import { ResourceFeasibilityChecker } from '../modules/ResourceFeasibilityChecker.js';
56
+ import { DocumentArchivist } from '../modules/DocumentArchivist.js';
57
+ import { PatentDraftAssistant } from '../modules/PatentDraftAssistant.js';
58
+ import { PatentClusterManager } from '../modules/PatentClusterManager.js';
59
+ import { ResearchLineRouter, RESEARCH_LINES } from '../modules/ResearchLineRouter.js';
60
+
61
+ import { ToolRegistry } from '../tools/ToolRegistry.js';
62
+ import { FileSystemTool } from '../tools/FileSystemTool.js';
63
+ import { LaTeXDocumentTool } from '../tools/LaTeXDocumentTool.js';
64
+ import { QuantumPhysicsTool } from '../tools/QuantumPhysicsTool.js';
65
+ import { WebSearchTool } from '../tools/WebSearchTool.js';
66
+ import { BibliographyTool } from '../tools/BibliographyTool.js';
67
+
68
+ const DEFAULT_MAX_CYCLES = 50;
69
+ const CYCLE_INTERVAL_MS = 8_000; // 8 seconds between cycles when idle
70
+
71
+ export class QSpherifierAgent extends EventEmitter {
72
+ constructor(opts = {}) {
73
+ super();
74
+ this.id = opts.id ?? uuidv4();
75
+ this.maxCycles = opts.maxCycles ?? DEFAULT_MAX_CYCLES;
76
+ this.cycleIntervalMs = opts.cycleIntervalMs ?? CYCLE_INTERVAL_MS;
77
+ this.autonomousMode = opts.autonomousMode ?? true;
78
+ this.ownerDirective = null;
79
+
80
+ // Core backbone (14-layer ANN-Psi with AJN + Transformer)
81
+ this.annPsi = new ANNPsi({
82
+ dModel: opts.dModel ?? 256,
83
+ nHeads: opts.nHeads ?? 8,
84
+ dFF: opts.dFF ?? 1024,
85
+ maxSteps: opts.maxSteps ?? 200,
86
+ });
87
+
88
+ // LLM (router with task routing)
89
+ this.llm = opts.llm ?? null;
90
+
91
+ // Modules
92
+ this.memory = new MemorySystem({ llm: this.llm, ...opts.memory });
93
+ this.safety = new SafetyGuardrails({ safetyLevel: opts.safetyLevel ?? 'standard' });
94
+ this.metrics = new MetricsCollector({ enableConsole: opts.metricsConsole ?? false });
95
+ this.plugins = new PluginManager();
96
+ this.kg = new QuantumKnowledgeGraph({});
97
+ this.citations = new CitationGraph({});
98
+ this.archivist = new DocumentArchivist({ rootDir: opts.researchDir ?? './research' });
99
+ this.feasibility = new ResourceFeasibilityChecker({ kg: this.kg });
100
+ this.hypothesisGen = new HypothesisGenerator({
101
+ kg: this.kg, llm: this.llm, feasibilityChecker: this.feasibility,
102
+ });
103
+ this.patentAssistant = new PatentDraftAssistant({
104
+ llm: this.llm, feasibilityChecker: this.feasibility,
105
+ });
106
+ this.clusterManager = new PatentClusterManager({
107
+ archivist: this.archivist, kg: this.kg, llm: this.llm,
108
+ });
109
+ this.router = new ResearchLineRouter({ kg: this.kg });
110
+ this.hci = new HierarchicalCommandInterpreter({
111
+ llm: this.llm, kg: this.kg,
112
+ });
113
+ this.tea = new TokenEnergyArbitrator({});
114
+ this.pse = new PraxicStreamExecutor({ maxRetries: 3 });
115
+ this.cascade = new CascadeMonitor({});
116
+
117
+ // Tool registry
118
+ this.tools = new ToolRegistry();
119
+ this.tools.registerMany([
120
+ new FileSystemTool({ sandbox: opts.researchDir ?? './research' }),
121
+ new LaTeXDocumentTool(),
122
+ new QuantumPhysicsTool(),
123
+ new WebSearchTool(),
124
+ new BibliographyTool(),
125
+ ]);
126
+ this.pse.registry = this.tools;
127
+
128
+ // State
129
+ this.currentCycle = 0;
130
+ this.isRunning = false;
131
+ this._timer = null;
132
+ this.history = [];
133
+ }
134
+
135
+ // ── Lifecycle ──────────────────────────────────────────────────────────────
136
+
137
+ async init() {
138
+ await this.memory.init();
139
+ await this.kg.init();
140
+ await this.citations.init();
141
+ this.archivist.ensureLayout();
142
+ this.metrics.start();
143
+ this.emit('ready', { id: this.id, kg: this.kg.stats() });
144
+
145
+ // AUTONOMOUS ACTIVATION: do NOT wait for an owner directive.
146
+ // This is the AJN "addiction" property — the agent starts working
147
+ // in its field immediately upon launch.
148
+ if (this.autonomousMode) {
149
+ this._scheduleNextCycle(0);
150
+ }
151
+ }
152
+
153
+ async shutdown() {
154
+ this.emit('shutdown:start');
155
+ this.isRunning = false;
156
+ if (this._timer) clearTimeout(this._timer);
157
+ await this.kg.persist();
158
+ await this.citations.persist();
159
+ this.archivist.rebuildIndices();
160
+ this.clusterManager.rebuildClusters();
161
+ this.metrics.stop();
162
+ this.emit('shutdown:complete');
163
+ }
164
+
165
+ // ── Owner guidance ─────────────────────────────────────────────────────────
166
+
167
+ async guide(directive) {
168
+ this.ownerDirective = directive;
169
+ this.emit('owner:directive', { directive });
170
+ // Force-start a new cycle immediately
171
+ if (!this.isRunning) this._scheduleNextCycle(0);
172
+ return { accepted: true, directive };
173
+ }
174
+
175
+ // ── Research cycle ─────────────────────────────────────────────────────────
176
+
177
+ _scheduleNextCycle(delay = this.cycleIntervalMs) {
178
+ if (this._timer) clearTimeout(this._timer);
179
+ this._timer = setTimeout(() => this._runCycle().catch(err => {
180
+ this.emit('cycle:error', { error: err.message });
181
+ this._scheduleNextCycle();
182
+ }), delay);
183
+ }
184
+
185
+ async _runCycle() {
186
+ if (this.currentCycle >= this.maxCycles) {
187
+ this.emit('cycles:exhausted', { count: this.currentCycle });
188
+ return;
189
+ }
190
+ this.isRunning = true;
191
+ this.currentCycle++;
192
+ const cycleId = `cycle_${this.currentCycle}_${Date.now()}`;
193
+ this.emit('cycle:start', { cycleId, count: this.currentCycle });
194
+
195
+ try {
196
+ // 1. Safety check before any work
197
+ const safetyCheck = this.safety.check({
198
+ type: 'research_cycle',
199
+ payload: { directive: this.ownerDirective },
200
+ });
201
+ if (!safetyCheck.allowed) {
202
+ this.emit('safety:blocked', safetyCheck);
203
+ this.isRunning = false;
204
+ this._scheduleNextCycle();
205
+ return;
206
+ }
207
+
208
+ // 2. Route to a research line (or cross-link)
209
+ const routing = this.router.route(this.ownerDirective);
210
+ this.emit('routed', routing);
211
+ const lineDesc = this.router.describe(routing.line);
212
+
213
+ // 3. Interpret owner directive (or autonomous plan)
214
+ const plan = await this.hci.interpret(this.ownerDirective);
215
+ if (plan.researchLine && !routing.crossLink) {
216
+ routing.line = plan.researchLine;
217
+ }
218
+ this.emit('plan:interpreted', { ...plan, researchLine: routing.line, crossLink: routing.crossLink });
219
+
220
+ // 4. Forward pass through ANN-Psi
221
+ const stimulus = {
222
+ intensity: 0.6 + Math.random() * 0.4,
223
+ topic: plan.topic ?? routing.seedTopic,
224
+ researchLine: routing.line,
225
+ parameters: plan.parameters,
226
+ };
227
+ const annResult = this.annPsi.forward(stimulus);
228
+ this.emit('annPsi:forward', annResult);
229
+
230
+ // 5. Generate hypothesis (cross-linked to KG — nothing isolated)
231
+ const hypotheses = await this.hypothesisGen.generate({
232
+ count: 1,
233
+ researchLine: routing.line,
234
+ seedTopic: plan.topic ?? routing.seedTopic,
235
+ ownerDirective: this.ownerDirective,
236
+ crossLink: routing.crossLink,
237
+ pairedLine: routing.pairedLine,
238
+ });
239
+ const hypothesis = hypotheses[0];
240
+ this.emit('hypothesis:generated', hypothesis);
241
+ this.metrics.incrementCounter('hypotheses_generated');
242
+ this.metrics.incrementCounter(`hypotheses_${routing.line}`);
243
+
244
+ // 6. Archive the hypothesis document
245
+ const hypRecord = this.archivist.archive({
246
+ category: 'hypotheses',
247
+ title: hypothesis.statement?.slice(0, 100) ?? `Hypothesis ${hypothesis.id}`,
248
+ topic: routing.line,
249
+ researchLine: routing.line,
250
+ markdownSource: this._hypothesisToMarkdown(hypothesis, lineDesc),
251
+ tags: this._tagsForHypothesis(hypothesis, routing),
252
+ references: hypothesis.supportingConcepts ?? [],
253
+ crossLinks: this._findCrossLinks(hypothesis),
254
+ patent: {
255
+ eligible: hypothesis.feasibility?.patentEligible ?? false,
256
+ claims: hypothesis.candidatePatentClaims ?? [],
257
+ },
258
+ extra: { hypothesis, routing },
259
+ });
260
+ this.emit('document:archived', hypRecord);
261
+ this.metrics.incrementCounter('documents_produced');
262
+
263
+ // 7. Update KG with new concepts from the hypothesis
264
+ this._updateKGFromHypothesis(hypothesis, routing);
265
+
266
+ // 8. If feasibility is OK, draft a patent application
267
+ if (hypothesis.feasibility?.tier && hypothesis.feasibility.tier !== 'speculative') {
268
+ const patentDraft = await this.patentAssistant.draft({
269
+ hypothesis,
270
+ parameters: plan.parameters,
271
+ researchLine: routing.line,
272
+ });
273
+ this.emit('patent:drafted', patentDraft);
274
+ this.metrics.incrementCounter('patents_drafted');
275
+
276
+ const patentRecord = this.archivist.archive({
277
+ category: 'patents',
278
+ title: patentDraft.title,
279
+ topic: routing.line,
280
+ researchLine: routing.line,
281
+ markdownSource: this._patentToMarkdown(patentDraft),
282
+ latexSource: this._patentToLatex(patentDraft),
283
+ tags: hypothesis.feasibility?.tier === 'near_term' || hypothesis.feasibility?.tier === 'current'
284
+ ? ['patent_ready', 'final_result', this._lineTag(routing.line)]
285
+ : ['patent_pending', 'intermediate_result', this._lineTag(routing.line)],
286
+ references: hypothesis.supportingConcepts ?? [],
287
+ crossLinks: this._findCrossLinks(hypothesis),
288
+ patent: {
289
+ eligible: true,
290
+ claims: patentDraft.claims?.map(c => c.text) ?? [],
291
+ },
292
+ extra: { patentDraft, hypothesisId: hypothesis.id },
293
+ });
294
+ this.emit('document:archived', patentRecord);
295
+ this.metrics.incrementCounter('documents_produced');
296
+ }
297
+
298
+ // 9. Memory + metrics update
299
+ await this.memory.store(`cycle_${this.currentCycle}`, {
300
+ hypothesis: hypothesis.id,
301
+ plan,
302
+ routing,
303
+ feasibility: hypothesis.feasibility,
304
+ });
305
+ this.metrics.observeHistogram('average_quality',
306
+ hypothesis.rewardComponents?.quality ?? 0.5);
307
+ this.metrics.observeHistogram('average_feasibility',
308
+ hypothesis.feasibility?.confidence ?? 0.5);
309
+ this.metrics.observeHistogram('average_patentability',
310
+ hypothesis.patentabilityHint === 'YES' ? 1.0
311
+ : hypothesis.patentabilityHint === 'MAYBE' ? 0.5 : 0.0);
312
+ this.metrics.setGauge('current_cycle', this.currentCycle);
313
+ this.metrics.setGauge('kg_nodes', this.kg.nodes.size);
314
+ this.metrics.setGauge('kg_edges', this.kg.edges.size);
315
+
316
+ // 10. Plugin hooks
317
+ await this.plugins.runHook('afterStep', { cycleId, hypothesis, routing });
318
+
319
+ // 11. Rebuild indices and clusters periodically
320
+ if (this.currentCycle % 5 === 0) {
321
+ this.archivist.rebuildIndices();
322
+ const clusters = this.clusterManager.rebuildClusters();
323
+ this.emit('clusters:rebuilt', this.clusterManager.stats());
324
+ if (clusters.some(c => c.filingReady)) {
325
+ this.emit('clusters:filing_ready', this.clusterManager.filingReadyClusters());
326
+ }
327
+ }
328
+
329
+ this.history.push({ cycleId, plan, routing, hypothesis, timestamp: Date.now() });
330
+ this.emit('cycle:complete', { cycleId, hypothesis, routing });
331
+ } catch (err) {
332
+ this.emit('cycle:error', { cycleId, error: err.message });
333
+ this.cascade.record({ type: 'error', error: err.message });
334
+ }
335
+
336
+ this.isRunning = false;
337
+ this._scheduleNextCycle();
338
+ }
339
+
340
+ // ── Cross-linking helpers ──────────────────────────────────────────────────
341
+
342
+ _findCrossLinks(hypothesis) {
343
+ // Find existing documents that share KG concepts with this hypothesis
344
+ const concepts = new Set(hypothesis.supportingConcepts ?? []);
345
+ if (concepts.size === 0) return [];
346
+ const all = this.archivist.list();
347
+ return all
348
+ .filter(r => r.manifest.id !== hypothesis.id)
349
+ .map(r => {
350
+ const otherConcepts = new Set(r.manifest.extra?.hypothesis?.supportingConcepts ?? []);
351
+ const shared = [...concepts].filter(c => otherConcepts.has(c));
352
+ return { id: r.manifest.id, shared: shared.length, relationship: shared.length >= 2 ? 'builds_on' : 'related' };
353
+ })
354
+ .filter(x => x.shared > 0)
355
+ .slice(0, 5);
356
+ }
357
+
358
+ _updateKGFromHypothesis(hypothesis, routing) {
359
+ // Ensure all supporting concepts exist as KG nodes; add cross-link edges
360
+ const concepts = hypothesis.supportingConcepts ?? [];
361
+ for (let i = 0; i < concepts.length; i++) {
362
+ const c = concepts[i];
363
+ if (!this.kg.nodes.has(c)) continue;
364
+ for (let j = i + 1; j < concepts.length; j++) {
365
+ const c2 = concepts[j];
366
+ if (!this.kg.nodes.has(c2)) continue;
367
+ // Check if edge already exists
368
+ let exists = false;
369
+ for (const edge of this.kg.edges.values()) {
370
+ if ((edge.from === c && edge.to === c2) || (edge.from === c2 && edge.to === c)) {
371
+ exists = true;
372
+ break;
373
+ }
374
+ }
375
+ if (!exists) {
376
+ try {
377
+ this.kg.addEdge({ from: c, to: c2, type: 'cross_links', weight: 0.5,
378
+ evidence: [`Linked by hypothesis ${hypothesis.id}`] });
379
+ } catch {}
380
+ }
381
+ }
382
+ }
383
+ }
384
+
385
+ _tagsForHypothesis(hypothesis, routing) {
386
+ const tags = [this._lineTag(routing.line)];
387
+ if (routing.crossLink) tags.push('cross_linked');
388
+ if (hypothesis.feasibility?.tier === 'near_term' || hypothesis.feasibility?.tier === 'current') {
389
+ tags.push('patent_ready', 'final_result');
390
+ } else {
391
+ tags.push('intermediate_result');
392
+ }
393
+ if (this.ownerDirective) tags.push('human_directed');
394
+ return tags;
395
+ }
396
+
397
+ _lineTag(line) {
398
+ return {
399
+ quantum_error_correction: 'qec',
400
+ new_qubit_modalities: 'qubits',
401
+ quantum_algorithms: 'algorithms',
402
+ molecular_simulation: 'molecular_simulation',
403
+ }[line] ?? 'cross_cutting';
404
+ }
405
+
406
+ // ── Document renderers ─────────────────────────────────────────────────────
407
+
408
+ _hypothesisToMarkdown(h, lineDesc) {
409
+ return [
410
+ `# ${h.statement?.slice(0, 120) ?? 'Hypothesis'}`,
411
+ '',
412
+ `**ID:** ${h.id}`,
413
+ `**Research Line:** ${h.researchLine ?? 'unknown'}${h.crossLink ? ` (cross-linking with ${h.pairedLine})` : ''}`,
414
+ `**Source:** ${h.source ?? 'unknown'}`,
415
+ `**Created:** ${new Date(h.createdAt ?? Date.now()).toISOString()}`,
416
+ '',
417
+ `## Research Line: ${lineDesc?.label ?? h.researchLine}`,
418
+ '',
419
+ lineDesc?.goal ?? '',
420
+ '',
421
+ '## Statement',
422
+ '',
423
+ h.statement ?? '',
424
+ '',
425
+ '## Rationale',
426
+ '',
427
+ h.rationale ?? '',
428
+ '',
429
+ '## Supporting Concepts (Cross-Links)',
430
+ '',
431
+ '> quantum-spherifier principle: every hypothesis must cross-link to the KG — nothing stays isolated.',
432
+ '',
433
+ ...(h.supportingConcepts ?? []).map(c => `- ${c}`),
434
+ '',
435
+ '## Predicted Impact',
436
+ '',
437
+ h.predictedImpact
438
+ ? `Metric: **${h.predictedImpact.metric}** — ${h.predictedImpact.direction} by ${h.predictedImpact.magnitude}`
439
+ : '_not specified_',
440
+ '',
441
+ '## Feasibility Assessment',
442
+ '',
443
+ h.feasibility
444
+ ? [
445
+ `Tier: **${h.feasibility.tier}** (confidence ${h.feasibility.confidence ?? 'n/a'})`,
446
+ '',
447
+ '### Resource Anchors',
448
+ '',
449
+ ...(h.feasibility.anchors ?? []).map(a => `- ${a.label}`),
450
+ '',
451
+ '### Identified Gaps',
452
+ '',
453
+ ...(h.feasibility.gaps ?? []).map(g => `- ${g}`),
454
+ '',
455
+ '### Resource Profile',
456
+ '',
457
+ `Physical qubits: ${h.feasibility.resourceProfile?.physicalQubits ?? '—'}`,
458
+ `Logical qubits: ${h.feasibility.resourceProfile?.logicalQubits ?? '—'}`,
459
+ `Code distance: ${h.feasibility.resourceProfile?.codeDistance ?? '—'}`,
460
+ `Modality: ${h.feasibility.resourceProfile?.modality ?? '—'}`,
461
+ `Operating temp: ${h.feasibility.resourceProfile?.operatingTemp ?? '—'}`,
462
+ '',
463
+ '### Cross-Link Verification',
464
+ '',
465
+ h.feasibility.crossLinks?.sufficient
466
+ ? `✓ Solution is cross-linked to ${h.feasibility.crossLinks.linkedConcepts} KG concept(s).`
467
+ : `⚠ WARNING: solution may be isolated — only ${h.feasibility.crossLinks?.linkedConcepts ?? 0} KG concept(s) referenced.`,
468
+ ].join('\n')
469
+ : '_not yet assessed_',
470
+ '',
471
+ '## Proposed Experiments',
472
+ '',
473
+ ...(h.proposedExperiments ?? []).map(e => `- ${e}`),
474
+ '',
475
+ '## Candidate Patent Claims',
476
+ '',
477
+ ...(h.candidatePatentClaims ?? []).map((c, i) => `${i + 1}. ${c}`),
478
+ '',
479
+ ].join('\n');
480
+ }
481
+
482
+ _patentToMarkdown(p) {
483
+ return [
484
+ `# ${p.title}`,
485
+ '',
486
+ `**Patent Draft ID:** ${p.id}`,
487
+ `**Research Line:** ${p.researchLine ?? 'unknown'}`,
488
+ `**Source:** ${p.source ?? 'unknown'}${p.llmAdapter ? ` (${p.llmAdapter})` : ''}`,
489
+ `**Created:** ${new Date(p.createdAt ?? Date.now()).toISOString()}`,
490
+ '',
491
+ '## Abstract',
492
+ '',
493
+ p.abstract ?? '',
494
+ '',
495
+ '## Field of the Invention',
496
+ '',
497
+ p.field ?? '',
498
+ '',
499
+ '## Background',
500
+ '',
501
+ p.background ?? '',
502
+ '',
503
+ '## Summary',
504
+ '',
505
+ p.summary ?? '',
506
+ '',
507
+ '## Brief Description of Drawings',
508
+ '',
509
+ ...(p.drawings ?? []).map(d => `- ${d}`),
510
+ '',
511
+ '## Detailed Description',
512
+ '',
513
+ '```',
514
+ p.detailedDescription ?? '',
515
+ '```',
516
+ '',
517
+ '## Claims',
518
+ '',
519
+ ...(p.claims ?? []).map(c => `**Claim ${c.number}** (${c.kind}): ${c.text}`),
520
+ '',
521
+ ].join('\n');
522
+ }
523
+
524
+ _patentToLatex(p) {
525
+ const claims = (p.claims ?? [])
526
+ .map(c => `\\item[${c.kind}] ${c.text.replace(/\n/g, ' ')}`)
527
+ .join('\n');
528
+ return [
529
+ '\\documentclass[11pt]{article}',
530
+ '\\usepackage[utf8]{inputenc}',
531
+ '\\usepackage{hyperref}',
532
+ '\\usepackage{amsmath}',
533
+ '\\usepackage{amssymb}',
534
+ '\\title{' + (p.title ?? 'Untitled') + '}',
535
+ '\\author{quantum-spherifier Autonomous Patent Drafter}',
536
+ '\\date{\\today}',
537
+ '\\begin{document}',
538
+ '\\maketitle',
539
+ '',
540
+ '\\begin{abstract}',
541
+ p.abstract ?? '',
542
+ '\\end{abstract}',
543
+ '',
544
+ '\\section{Field of the Invention}',
545
+ p.field ?? '',
546
+ '',
547
+ '\\section{Background}',
548
+ p.background ?? '',
549
+ '',
550
+ '\\section{Summary}',
551
+ p.summary ?? '',
552
+ '',
553
+ '\\section{Brief Description of Drawings}',
554
+ '\\begin{itemize}',
555
+ ...(p.drawings ?? []).map(d => ` \\item ${d}`),
556
+ '\\end{itemize}',
557
+ '',
558
+ '\\section{Detailed Description}',
559
+ '\\begin{verbatim}',
560
+ p.detailedDescription ?? '',
561
+ '\\end{verbatim}',
562
+ '',
563
+ '\\section{Claims}',
564
+ '\\begin{enumerate}',
565
+ claims,
566
+ '\\end{enumerate}',
567
+ '',
568
+ '\\end{document}',
569
+ ].join('\n');
570
+ }
571
+
572
+ // ── Status & serialisation ─────────────────────────────────────────────────
573
+
574
+ status() {
575
+ return {
576
+ id: this.id,
577
+ currentCycle: this.currentCycle,
578
+ maxCycles: this.maxCycles,
579
+ isRunning: this.isRunning,
580
+ autonomousMode: this.autonomousMode,
581
+ ownerDirective: this.ownerDirective,
582
+ annPsi: this.annPsi.status(),
583
+ memory: this.memory.stats(),
584
+ kg: this.kg.stats(),
585
+ citations: this.citations.stats(),
586
+ archive: this.archivist.stats(),
587
+ clusters: this.clusterManager.stats(),
588
+ router: this.router.stats(),
589
+ cascade: this.cascade.status(),
590
+ tools: this.tools.list().map(t => t.id),
591
+ metrics: this.metrics.getSummary(),
592
+ llm: this.llm?.metadata?.() ?? this.llm?.constructor?.name ?? 'none',
593
+ };
594
+ }
595
+
596
+ serialize() {
597
+ return {
598
+ id: this.id,
599
+ currentCycle: this.currentCycle,
600
+ maxCycles: this.maxCycles,
601
+ autonomousMode: this.autonomousMode,
602
+ ownerDirective: this.ownerDirective,
603
+ annPsi: this.annPsi.serialize(),
604
+ router: this.router.stats(),
605
+ history: this.history.slice(-100),
606
+ };
607
+ }
608
+
609
+ deserialize(state) {
610
+ this.id = state.id ?? this.id;
611
+ this.currentCycle = state.currentCycle ?? 0;
612
+ this.maxCycles = state.maxCycles ?? this.maxCycles;
613
+ this.autonomousMode = state.autonomousMode ?? this.autonomousMode;
614
+ this.ownerDirective = state.ownerDirective ?? null;
615
+ if (state.annPsi) this.annPsi.deserialize(state.annPsi);
616
+ if (state.history) this.history = state.history;
617
+ }
618
+ }
619
+
620
+ export { QUANTUM_STIMULUS_CLASSES, RESEARCH_LINES };
@@ -0,0 +1,74 @@
1
+ /**
2
+ * StateSerializer.js — FUSIONARY (v1.0)
3
+ * Saves/loads full agent state as versioned JSON files.
4
+ */
5
+
6
+ import { existsSync, mkdirSync, writeFileSync, readFileSync, readdirSync, unlinkSync } from 'node:fs';
7
+ import { join } from 'node:path';
8
+ import { v4 as uuidv4 } from 'uuid';
9
+
10
+ export class StateSerializer {
11
+ constructor(opts = {}) {
12
+ this.checkpointDir = opts.checkpointDir ?? './data/checkpoints';
13
+ this.maxCheckpoints = opts.maxCheckpoints ?? 20;
14
+ }
15
+
16
+ async save(agent, label = 'checkpoint') {
17
+ if (!existsSync(this.checkpointDir)) mkdirSync(this.checkpointDir, { recursive: true });
18
+ const id = uuidv4();
19
+ const timestamp = Date.now();
20
+ const filename = `${timestamp}_${label.replace(/[^a-zA-Z0-9_-]/g, '_')}.json`;
21
+ const filepath = join(this.checkpointDir, filename);
22
+ const state = {
23
+ version: '1.0',
24
+ id,
25
+ label,
26
+ timestamp,
27
+ agentState: agent.serialize(),
28
+ };
29
+ writeFileSync(filepath, JSON.stringify(state, null, 2));
30
+ this._prune();
31
+ return { id, label, filepath };
32
+ }
33
+
34
+ async load(agent, labelOrId) {
35
+ if (!existsSync(this.checkpointDir)) return null;
36
+ const files = readdirSync(this.checkpointDir)
37
+ .filter(f => f.endsWith('.json'))
38
+ .sort()
39
+ .reverse();
40
+ for (const f of files) {
41
+ if (f.includes(labelOrId)) {
42
+ const state = JSON.parse(readFileSync(join(this.checkpointDir, f), 'utf8'));
43
+ agent.deserialize(state.agentState);
44
+ return { label: state.label, timestamp: state.timestamp };
45
+ }
46
+ }
47
+ return null;
48
+ }
49
+
50
+ list() {
51
+ if (!existsSync(this.checkpointDir)) return [];
52
+ return readdirSync(this.checkpointDir)
53
+ .filter(f => f.endsWith('.json'))
54
+ .sort()
55
+ .reverse()
56
+ .map(f => {
57
+ try {
58
+ const s = JSON.parse(readFileSync(join(this.checkpointDir, f), 'utf8'));
59
+ return { file: f, label: s.label, timestamp: s.timestamp };
60
+ } catch { return null; }
61
+ })
62
+ .filter(Boolean);
63
+ }
64
+
65
+ _prune() {
66
+ const files = readdirSync(this.checkpointDir)
67
+ .filter(f => f.endsWith('.json'))
68
+ .sort();
69
+ while (files.length > this.maxCheckpoints) {
70
+ const oldest = files.shift();
71
+ try { unlinkSync(join(this.checkpointDir, oldest)); } catch {}
72
+ }
73
+ }
74
+ }