@proposit/proposit-core 0.8.9

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 (429) hide show
  1. package/README.md +1032 -0
  2. package/dist/cli/commands/analysis.d.ts +3 -0
  3. package/dist/cli/commands/analysis.d.ts.map +1 -0
  4. package/dist/cli/commands/analysis.js +504 -0
  5. package/dist/cli/commands/analysis.js.map +1 -0
  6. package/dist/cli/commands/arguments.d.ts +3 -0
  7. package/dist/cli/commands/arguments.d.ts.map +1 -0
  8. package/dist/cli/commands/arguments.js +187 -0
  9. package/dist/cli/commands/arguments.js.map +1 -0
  10. package/dist/cli/commands/claims.d.ts +3 -0
  11. package/dist/cli/commands/claims.d.ts.map +1 -0
  12. package/dist/cli/commands/claims.js +120 -0
  13. package/dist/cli/commands/claims.js.map +1 -0
  14. package/dist/cli/commands/diff.d.ts +3 -0
  15. package/dist/cli/commands/diff.d.ts.map +1 -0
  16. package/dist/cli/commands/diff.js +61 -0
  17. package/dist/cli/commands/diff.js.map +1 -0
  18. package/dist/cli/commands/expressions.d.ts +3 -0
  19. package/dist/cli/commands/expressions.d.ts.map +1 -0
  20. package/dist/cli/commands/expressions.js +344 -0
  21. package/dist/cli/commands/expressions.js.map +1 -0
  22. package/dist/cli/commands/graph.d.ts +13 -0
  23. package/dist/cli/commands/graph.d.ts.map +1 -0
  24. package/dist/cli/commands/graph.js +382 -0
  25. package/dist/cli/commands/graph.js.map +1 -0
  26. package/dist/cli/commands/meta.d.ts +3 -0
  27. package/dist/cli/commands/meta.d.ts.map +1 -0
  28. package/dist/cli/commands/meta.js +14 -0
  29. package/dist/cli/commands/meta.js.map +1 -0
  30. package/dist/cli/commands/parse.d.ts +3 -0
  31. package/dist/cli/commands/parse.d.ts.map +1 -0
  32. package/dist/cli/commands/parse.js +171 -0
  33. package/dist/cli/commands/parse.js.map +1 -0
  34. package/dist/cli/commands/premises.d.ts +3 -0
  35. package/dist/cli/commands/premises.d.ts.map +1 -0
  36. package/dist/cli/commands/premises.js +261 -0
  37. package/dist/cli/commands/premises.js.map +1 -0
  38. package/dist/cli/commands/render.d.ts +3 -0
  39. package/dist/cli/commands/render.d.ts.map +1 -0
  40. package/dist/cli/commands/render.js +109 -0
  41. package/dist/cli/commands/render.js.map +1 -0
  42. package/dist/cli/commands/repair.d.ts +3 -0
  43. package/dist/cli/commands/repair.d.ts.map +1 -0
  44. package/dist/cli/commands/repair.js +53 -0
  45. package/dist/cli/commands/repair.js.map +1 -0
  46. package/dist/cli/commands/roles.d.ts +3 -0
  47. package/dist/cli/commands/roles.d.ts.map +1 -0
  48. package/dist/cli/commands/roles.js +64 -0
  49. package/dist/cli/commands/roles.js.map +1 -0
  50. package/dist/cli/commands/sources.d.ts +3 -0
  51. package/dist/cli/commands/sources.d.ts.map +1 -0
  52. package/dist/cli/commands/sources.js +103 -0
  53. package/dist/cli/commands/sources.js.map +1 -0
  54. package/dist/cli/commands/validate.d.ts +3 -0
  55. package/dist/cli/commands/validate.d.ts.map +1 -0
  56. package/dist/cli/commands/validate.js +27 -0
  57. package/dist/cli/commands/validate.js.map +1 -0
  58. package/dist/cli/commands/variables.d.ts +3 -0
  59. package/dist/cli/commands/variables.d.ts.map +1 -0
  60. package/dist/cli/commands/variables.js +206 -0
  61. package/dist/cli/commands/variables.js.map +1 -0
  62. package/dist/cli/commands/version-show.d.ts +3 -0
  63. package/dist/cli/commands/version-show.d.ts.map +1 -0
  64. package/dist/cli/commands/version-show.js +31 -0
  65. package/dist/cli/commands/version-show.js.map +1 -0
  66. package/dist/cli/config.d.ts +8 -0
  67. package/dist/cli/config.d.ts.map +1 -0
  68. package/dist/cli/config.js +24 -0
  69. package/dist/cli/config.js.map +1 -0
  70. package/dist/cli/engine.d.ts +19 -0
  71. package/dist/cli/engine.d.ts.map +1 -0
  72. package/dist/cli/engine.js +173 -0
  73. package/dist/cli/engine.js.map +1 -0
  74. package/dist/cli/import.d.ts +22 -0
  75. package/dist/cli/import.d.ts.map +1 -0
  76. package/dist/cli/import.js +242 -0
  77. package/dist/cli/import.js.map +1 -0
  78. package/dist/cli/llm/index.d.ts +6 -0
  79. package/dist/cli/llm/index.d.ts.map +1 -0
  80. package/dist/cli/llm/index.js +26 -0
  81. package/dist/cli/llm/index.js.map +1 -0
  82. package/dist/cli/llm/openai.d.ts +4 -0
  83. package/dist/cli/llm/openai.d.ts.map +1 -0
  84. package/dist/cli/llm/openai.js +44 -0
  85. package/dist/cli/llm/openai.js.map +1 -0
  86. package/dist/cli/llm/types.d.ts +14 -0
  87. package/dist/cli/llm/types.d.ts.map +1 -0
  88. package/dist/cli/llm/types.js +2 -0
  89. package/dist/cli/llm/types.js.map +1 -0
  90. package/dist/cli/logging.d.ts +8 -0
  91. package/dist/cli/logging.d.ts.map +1 -0
  92. package/dist/cli/logging.js +23 -0
  93. package/dist/cli/logging.js.map +1 -0
  94. package/dist/cli/output/diff-renderer.d.ts +4 -0
  95. package/dist/cli/output/diff-renderer.d.ts.map +1 -0
  96. package/dist/cli/output/diff-renderer.js +89 -0
  97. package/dist/cli/output/diff-renderer.js.map +1 -0
  98. package/dist/cli/output.d.ts +6 -0
  99. package/dist/cli/output.d.ts.map +1 -0
  100. package/dist/cli/output.js +41 -0
  101. package/dist/cli/output.js.map +1 -0
  102. package/dist/cli/router.d.ts +14 -0
  103. package/dist/cli/router.d.ts.map +1 -0
  104. package/dist/cli/router.js +59 -0
  105. package/dist/cli/router.js.map +1 -0
  106. package/dist/cli/schemata.d.ts +74 -0
  107. package/dist/cli/schemata.d.ts.map +1 -0
  108. package/dist/cli/schemata.js +89 -0
  109. package/dist/cli/schemata.js.map +1 -0
  110. package/dist/cli/storage/analysis.d.ts +9 -0
  111. package/dist/cli/storage/analysis.d.ts.map +1 -0
  112. package/dist/cli/storage/analysis.js +108 -0
  113. package/dist/cli/storage/analysis.js.map +1 -0
  114. package/dist/cli/storage/arguments.d.ts +12 -0
  115. package/dist/cli/storage/arguments.d.ts.map +1 -0
  116. package/dist/cli/storage/arguments.js +80 -0
  117. package/dist/cli/storage/arguments.js.map +1 -0
  118. package/dist/cli/storage/libraries.d.ts +14 -0
  119. package/dist/cli/storage/libraries.d.ts.map +1 -0
  120. package/dist/cli/storage/libraries.js +80 -0
  121. package/dist/cli/storage/libraries.js.map +1 -0
  122. package/dist/cli/storage/premises.d.ts +9 -0
  123. package/dist/cli/storage/premises.d.ts.map +1 -0
  124. package/dist/cli/storage/premises.js +67 -0
  125. package/dist/cli/storage/premises.js.map +1 -0
  126. package/dist/cli/storage/roles.d.ts +4 -0
  127. package/dist/cli/storage/roles.d.ts.map +1 -0
  128. package/dist/cli/storage/roles.js +26 -0
  129. package/dist/cli/storage/roles.js.map +1 -0
  130. package/dist/cli/storage/variables.d.ts +4 -0
  131. package/dist/cli/storage/variables.d.ts.map +1 -0
  132. package/dist/cli/storage/variables.js +36 -0
  133. package/dist/cli/storage/variables.js.map +1 -0
  134. package/dist/cli.d.ts +3 -0
  135. package/dist/cli.d.ts.map +1 -0
  136. package/dist/cli.js +65 -0
  137. package/dist/cli.js.map +1 -0
  138. package/dist/extensions/basics/argument-parser.d.ts +12 -0
  139. package/dist/extensions/basics/argument-parser.d.ts.map +1 -0
  140. package/dist/extensions/basics/argument-parser.js +27 -0
  141. package/dist/extensions/basics/argument-parser.js.map +1 -0
  142. package/dist/extensions/basics/index.d.ts +4 -0
  143. package/dist/extensions/basics/index.d.ts.map +1 -0
  144. package/dist/extensions/basics/index.js +3 -0
  145. package/dist/extensions/basics/index.js.map +1 -0
  146. package/dist/extensions/basics/schemata.d.ts +35 -0
  147. package/dist/extensions/basics/schemata.d.ts.map +1 -0
  148. package/dist/extensions/basics/schemata.js +55 -0
  149. package/dist/extensions/basics/schemata.js.map +1 -0
  150. package/dist/extensions/ieee/formatting.d.ts +18 -0
  151. package/dist/extensions/ieee/formatting.d.ts.map +1 -0
  152. package/dist/extensions/ieee/formatting.js +57 -0
  153. package/dist/extensions/ieee/formatting.js.map +1 -0
  154. package/dist/extensions/ieee/index.d.ts +6 -0
  155. package/dist/extensions/ieee/index.d.ts.map +1 -0
  156. package/dist/extensions/ieee/index.js +6 -0
  157. package/dist/extensions/ieee/index.js.map +1 -0
  158. package/dist/extensions/ieee/references.d.ts +1379 -0
  159. package/dist/extensions/ieee/references.d.ts.map +1 -0
  160. package/dist/extensions/ieee/references.js +929 -0
  161. package/dist/extensions/ieee/references.js.map +1 -0
  162. package/dist/extensions/ieee/relaxed.d.ts +1371 -0
  163. package/dist/extensions/ieee/relaxed.d.ts.map +1 -0
  164. package/dist/extensions/ieee/relaxed.js +160 -0
  165. package/dist/extensions/ieee/relaxed.js.map +1 -0
  166. package/dist/extensions/ieee/segment-builder.d.ts +9 -0
  167. package/dist/extensions/ieee/segment-builder.d.ts.map +1 -0
  168. package/dist/extensions/ieee/segment-builder.js +98 -0
  169. package/dist/extensions/ieee/segment-builder.js.map +1 -0
  170. package/dist/extensions/ieee/segment-templates.d.ts +58 -0
  171. package/dist/extensions/ieee/segment-templates.d.ts.map +1 -0
  172. package/dist/extensions/ieee/segment-templates.js +1618 -0
  173. package/dist/extensions/ieee/segment-templates.js.map +1 -0
  174. package/dist/extensions/ieee/source.d.ts +434 -0
  175. package/dist/extensions/ieee/source.d.ts.map +1 -0
  176. package/dist/extensions/ieee/source.js +12 -0
  177. package/dist/extensions/ieee/source.js.map +1 -0
  178. package/dist/index.d.ts +10 -0
  179. package/dist/index.d.ts.map +1 -0
  180. package/dist/index.js +10 -0
  181. package/dist/index.js.map +1 -0
  182. package/dist/lib/consts.d.ts +21 -0
  183. package/dist/lib/consts.d.ts.map +1 -0
  184. package/dist/lib/consts.js +117 -0
  185. package/dist/lib/consts.js.map +1 -0
  186. package/dist/lib/core/argument-engine.d.ts +181 -0
  187. package/dist/lib/core/argument-engine.d.ts.map +1 -0
  188. package/dist/lib/core/argument-engine.js +1294 -0
  189. package/dist/lib/core/argument-engine.js.map +1 -0
  190. package/dist/lib/core/argument-library.d.ts +84 -0
  191. package/dist/lib/core/argument-library.d.ts.map +1 -0
  192. package/dist/lib/core/argument-library.js +122 -0
  193. package/dist/lib/core/argument-library.js.map +1 -0
  194. package/dist/lib/core/argument-validation.d.ts +74 -0
  195. package/dist/lib/core/argument-validation.d.ts.map +1 -0
  196. package/dist/lib/core/argument-validation.js +315 -0
  197. package/dist/lib/core/argument-validation.js.map +1 -0
  198. package/dist/lib/core/change-collector.d.ts +24 -0
  199. package/dist/lib/core/change-collector.d.ts.map +1 -0
  200. package/dist/lib/core/change-collector.js +63 -0
  201. package/dist/lib/core/change-collector.js.map +1 -0
  202. package/dist/lib/core/checksum.d.ts +15 -0
  203. package/dist/lib/core/checksum.d.ts.map +1 -0
  204. package/dist/lib/core/checksum.js +43 -0
  205. package/dist/lib/core/checksum.js.map +1 -0
  206. package/dist/lib/core/claim-library.d.ts +23 -0
  207. package/dist/lib/core/claim-library.d.ts.map +1 -0
  208. package/dist/lib/core/claim-library.js +21 -0
  209. package/dist/lib/core/claim-library.js.map +1 -0
  210. package/dist/lib/core/claim-source-library.d.ts +32 -0
  211. package/dist/lib/core/claim-source-library.d.ts.map +1 -0
  212. package/dist/lib/core/claim-source-library.js +193 -0
  213. package/dist/lib/core/claim-source-library.js.map +1 -0
  214. package/dist/lib/core/diff.d.ts +20 -0
  215. package/dist/lib/core/diff.d.ts.map +1 -0
  216. package/dist/lib/core/diff.js +260 -0
  217. package/dist/lib/core/diff.js.map +1 -0
  218. package/dist/lib/core/evaluation/argument-evaluation.d.ts +53 -0
  219. package/dist/lib/core/evaluation/argument-evaluation.d.ts.map +1 -0
  220. package/dist/lib/core/evaluation/argument-evaluation.js +535 -0
  221. package/dist/lib/core/evaluation/argument-evaluation.js.map +1 -0
  222. package/dist/lib/core/evaluation/grading.d.ts +28 -0
  223. package/dist/lib/core/evaluation/grading.d.ts.map +1 -0
  224. package/dist/lib/core/evaluation/grading.js +44 -0
  225. package/dist/lib/core/evaluation/grading.js.map +1 -0
  226. package/dist/lib/core/evaluation/kleene.d.ts +12 -0
  227. package/dist/lib/core/evaluation/kleene.d.ts.map +1 -0
  228. package/dist/lib/core/evaluation/kleene.js +29 -0
  229. package/dist/lib/core/evaluation/kleene.js.map +1 -0
  230. package/dist/lib/core/evaluation/validation.d.ts +10 -0
  231. package/dist/lib/core/evaluation/validation.d.ts.map +1 -0
  232. package/dist/lib/core/evaluation/validation.js +28 -0
  233. package/dist/lib/core/evaluation/validation.js.map +1 -0
  234. package/dist/lib/core/expression-manager.d.ts +278 -0
  235. package/dist/lib/core/expression-manager.d.ts.map +1 -0
  236. package/dist/lib/core/expression-manager.js +1622 -0
  237. package/dist/lib/core/expression-manager.js.map +1 -0
  238. package/dist/lib/core/fork-library.d.ts +26 -0
  239. package/dist/lib/core/fork-library.d.ts.map +1 -0
  240. package/dist/lib/core/fork-library.js +71 -0
  241. package/dist/lib/core/fork-library.js.map +1 -0
  242. package/dist/lib/core/fork-namespace.d.ts +32 -0
  243. package/dist/lib/core/fork-namespace.d.ts.map +1 -0
  244. package/dist/lib/core/fork-namespace.js +99 -0
  245. package/dist/lib/core/fork-namespace.js.map +1 -0
  246. package/dist/lib/core/fork.d.ts +30 -0
  247. package/dist/lib/core/fork.d.ts.map +1 -0
  248. package/dist/lib/core/fork.js +125 -0
  249. package/dist/lib/core/fork.js.map +1 -0
  250. package/dist/lib/core/interfaces/argument-engine.interfaces.d.ts +366 -0
  251. package/dist/lib/core/interfaces/argument-engine.interfaces.d.ts.map +1 -0
  252. package/dist/lib/core/interfaces/argument-engine.interfaces.js +2 -0
  253. package/dist/lib/core/interfaces/argument-engine.interfaces.js.map +1 -0
  254. package/dist/lib/core/interfaces/index.d.ts +5 -0
  255. package/dist/lib/core/interfaces/index.d.ts.map +1 -0
  256. package/dist/lib/core/interfaces/index.js +2 -0
  257. package/dist/lib/core/interfaces/index.js.map +1 -0
  258. package/dist/lib/core/interfaces/library.interfaces.d.ts +347 -0
  259. package/dist/lib/core/interfaces/library.interfaces.d.ts.map +1 -0
  260. package/dist/lib/core/interfaces/library.interfaces.js +2 -0
  261. package/dist/lib/core/interfaces/library.interfaces.js.map +1 -0
  262. package/dist/lib/core/interfaces/premise-engine.interfaces.d.ts +401 -0
  263. package/dist/lib/core/interfaces/premise-engine.interfaces.d.ts.map +1 -0
  264. package/dist/lib/core/interfaces/premise-engine.interfaces.js +2 -0
  265. package/dist/lib/core/interfaces/premise-engine.interfaces.js.map +1 -0
  266. package/dist/lib/core/interfaces/shared.interfaces.d.ts +28 -0
  267. package/dist/lib/core/interfaces/shared.interfaces.d.ts.map +1 -0
  268. package/dist/lib/core/interfaces/shared.interfaces.js +2 -0
  269. package/dist/lib/core/interfaces/shared.interfaces.js.map +1 -0
  270. package/dist/lib/core/invariant-violation-error.d.ts +10 -0
  271. package/dist/lib/core/invariant-violation-error.d.ts.map +1 -0
  272. package/dist/lib/core/invariant-violation-error.js +16 -0
  273. package/dist/lib/core/invariant-violation-error.js.map +1 -0
  274. package/dist/lib/core/parser/formula-gen.js +923 -0
  275. package/dist/lib/core/parser/formula.d.ts +24 -0
  276. package/dist/lib/core/parser/formula.d.ts.map +1 -0
  277. package/dist/lib/core/parser/formula.js +8 -0
  278. package/dist/lib/core/parser/formula.js.map +1 -0
  279. package/dist/lib/core/premise-engine.d.ts +122 -0
  280. package/dist/lib/core/premise-engine.d.ts.map +1 -0
  281. package/dist/lib/core/premise-engine.js +1362 -0
  282. package/dist/lib/core/premise-engine.js.map +1 -0
  283. package/dist/lib/core/proposit-core.d.ts +111 -0
  284. package/dist/lib/core/proposit-core.d.ts.map +1 -0
  285. package/dist/lib/core/proposit-core.js +365 -0
  286. package/dist/lib/core/proposit-core.js.map +1 -0
  287. package/dist/lib/core/relationships.d.ts +15 -0
  288. package/dist/lib/core/relationships.d.ts.map +1 -0
  289. package/dist/lib/core/relationships.js +319 -0
  290. package/dist/lib/core/relationships.js.map +1 -0
  291. package/dist/lib/core/source-library.d.ts +23 -0
  292. package/dist/lib/core/source-library.d.ts.map +1 -0
  293. package/dist/lib/core/source-library.js +21 -0
  294. package/dist/lib/core/source-library.js.map +1 -0
  295. package/dist/lib/core/variable-manager.d.ts +68 -0
  296. package/dist/lib/core/variable-manager.d.ts.map +1 -0
  297. package/dist/lib/core/variable-manager.js +200 -0
  298. package/dist/lib/core/variable-manager.js.map +1 -0
  299. package/dist/lib/core/versioned-library.d.ts +52 -0
  300. package/dist/lib/core/versioned-library.d.ts.map +1 -0
  301. package/dist/lib/core/versioned-library.js +192 -0
  302. package/dist/lib/core/versioned-library.js.map +1 -0
  303. package/dist/lib/index.d.ts +54 -0
  304. package/dist/lib/index.d.ts.map +1 -0
  305. package/dist/lib/index.js +39 -0
  306. package/dist/lib/index.js.map +1 -0
  307. package/dist/lib/parsing/argument-parser.d.ts +49 -0
  308. package/dist/lib/parsing/argument-parser.d.ts.map +1 -0
  309. package/dist/lib/parsing/argument-parser.js +403 -0
  310. package/dist/lib/parsing/argument-parser.js.map +1 -0
  311. package/dist/lib/parsing/clamp-max-lengths.d.ts +11 -0
  312. package/dist/lib/parsing/clamp-max-lengths.d.ts.map +1 -0
  313. package/dist/lib/parsing/clamp-max-lengths.js +56 -0
  314. package/dist/lib/parsing/clamp-max-lengths.js.map +1 -0
  315. package/dist/lib/parsing/index.d.ts +7 -0
  316. package/dist/lib/parsing/index.d.ts.map +1 -0
  317. package/dist/lib/parsing/index.js +4 -0
  318. package/dist/lib/parsing/index.js.map +1 -0
  319. package/dist/lib/parsing/prompt-builder.d.ts +11 -0
  320. package/dist/lib/parsing/prompt-builder.d.ts.map +1 -0
  321. package/dist/lib/parsing/prompt-builder.js +229 -0
  322. package/dist/lib/parsing/prompt-builder.js.map +1 -0
  323. package/dist/lib/parsing/schemata.d.ts +79 -0
  324. package/dist/lib/parsing/schemata.d.ts.map +1 -0
  325. package/dist/lib/parsing/schemata.js +92 -0
  326. package/dist/lib/parsing/schemata.js.map +1 -0
  327. package/dist/lib/parsing/types.d.ts +24 -0
  328. package/dist/lib/parsing/types.d.ts.map +1 -0
  329. package/dist/lib/parsing/types.js +2 -0
  330. package/dist/lib/parsing/types.js.map +1 -0
  331. package/dist/lib/schemata/analysis.d.ts +9 -0
  332. package/dist/lib/schemata/analysis.d.ts.map +1 -0
  333. package/dist/lib/schemata/analysis.js +13 -0
  334. package/dist/lib/schemata/analysis.js.map +1 -0
  335. package/dist/lib/schemata/argument.d.ts +14 -0
  336. package/dist/lib/schemata/argument.d.ts.map +1 -0
  337. package/dist/lib/schemata/argument.js +24 -0
  338. package/dist/lib/schemata/argument.js.map +1 -0
  339. package/dist/lib/schemata/claim.d.ts +9 -0
  340. package/dist/lib/schemata/claim.d.ts.map +1 -0
  341. package/dist/lib/schemata/claim.js +18 -0
  342. package/dist/lib/schemata/claim.js.map +1 -0
  343. package/dist/lib/schemata/fork.d.ts +76 -0
  344. package/dist/lib/schemata/fork.d.ts.map +1 -0
  345. package/dist/lib/schemata/fork.js +55 -0
  346. package/dist/lib/schemata/fork.js.map +1 -0
  347. package/dist/lib/schemata/import.d.ts +33 -0
  348. package/dist/lib/schemata/import.d.ts.map +1 -0
  349. package/dist/lib/schemata/import.js +18 -0
  350. package/dist/lib/schemata/import.js.map +1 -0
  351. package/dist/lib/schemata/index.d.ts +8 -0
  352. package/dist/lib/schemata/index.d.ts.map +1 -0
  353. package/dist/lib/schemata/index.js +8 -0
  354. package/dist/lib/schemata/index.js.map +1 -0
  355. package/dist/lib/schemata/propositional.d.ts +142 -0
  356. package/dist/lib/schemata/propositional.d.ts.map +1 -0
  357. package/dist/lib/schemata/propositional.js +120 -0
  358. package/dist/lib/schemata/propositional.js.map +1 -0
  359. package/dist/lib/schemata/shared.d.ts +41 -0
  360. package/dist/lib/schemata/shared.d.ts.map +1 -0
  361. package/dist/lib/schemata/shared.js +66 -0
  362. package/dist/lib/schemata/shared.js.map +1 -0
  363. package/dist/lib/schemata/source.d.ts +18 -0
  364. package/dist/lib/schemata/source.d.ts.map +1 -0
  365. package/dist/lib/schemata/source.js +35 -0
  366. package/dist/lib/schemata/source.js.map +1 -0
  367. package/dist/lib/types/checksum.d.ts +20 -0
  368. package/dist/lib/types/checksum.d.ts.map +1 -0
  369. package/dist/lib/types/checksum.js +2 -0
  370. package/dist/lib/types/checksum.js.map +1 -0
  371. package/dist/lib/types/diff.d.ts +60 -0
  372. package/dist/lib/types/diff.d.ts.map +1 -0
  373. package/dist/lib/types/diff.js +2 -0
  374. package/dist/lib/types/diff.js.map +1 -0
  375. package/dist/lib/types/evaluation.d.ts +164 -0
  376. package/dist/lib/types/evaluation.d.ts.map +1 -0
  377. package/dist/lib/types/evaluation.js +2 -0
  378. package/dist/lib/types/evaluation.js.map +1 -0
  379. package/dist/lib/types/fork.d.ts +25 -0
  380. package/dist/lib/types/fork.d.ts.map +1 -0
  381. package/dist/lib/types/fork.js +2 -0
  382. package/dist/lib/types/fork.js.map +1 -0
  383. package/dist/lib/types/grammar.d.ts +38 -0
  384. package/dist/lib/types/grammar.d.ts.map +1 -0
  385. package/dist/lib/types/grammar.js +11 -0
  386. package/dist/lib/types/grammar.js.map +1 -0
  387. package/dist/lib/types/mutation.d.ts +31 -0
  388. package/dist/lib/types/mutation.d.ts.map +1 -0
  389. package/dist/lib/types/mutation.js +2 -0
  390. package/dist/lib/types/mutation.js.map +1 -0
  391. package/dist/lib/types/reactive.d.ts +14 -0
  392. package/dist/lib/types/reactive.d.ts.map +1 -0
  393. package/dist/lib/types/reactive.js +2 -0
  394. package/dist/lib/types/reactive.js.map +1 -0
  395. package/dist/lib/types/relationships.d.ts +36 -0
  396. package/dist/lib/types/relationships.d.ts.map +1 -0
  397. package/dist/lib/types/relationships.js +2 -0
  398. package/dist/lib/types/relationships.js.map +1 -0
  399. package/dist/lib/types/validation.d.ts +47 -0
  400. package/dist/lib/types/validation.d.ts.map +1 -0
  401. package/dist/lib/types/validation.js +43 -0
  402. package/dist/lib/types/validation.js.map +1 -0
  403. package/dist/lib/utils/changeset.d.ts +124 -0
  404. package/dist/lib/utils/changeset.d.ts.map +1 -0
  405. package/dist/lib/utils/changeset.js +221 -0
  406. package/dist/lib/utils/changeset.js.map +1 -0
  407. package/dist/lib/utils/collections.d.ts +12 -0
  408. package/dist/lib/utils/collections.d.ts.map +1 -0
  409. package/dist/lib/utils/collections.js +24 -0
  410. package/dist/lib/utils/collections.js.map +1 -0
  411. package/dist/lib/utils/default-map.d.ts +17 -0
  412. package/dist/lib/utils/default-map.d.ts.map +1 -0
  413. package/dist/lib/utils/default-map.js +33 -0
  414. package/dist/lib/utils/default-map.js.map +1 -0
  415. package/dist/lib/utils/lookup.d.ts +47 -0
  416. package/dist/lib/utils/lookup.d.ts.map +1 -0
  417. package/dist/lib/utils/lookup.js +62 -0
  418. package/dist/lib/utils/lookup.js.map +1 -0
  419. package/dist/lib/utils/position.d.ts +12 -0
  420. package/dist/lib/utils/position.d.ts.map +1 -0
  421. package/dist/lib/utils/position.js +13 -0
  422. package/dist/lib/utils/position.js.map +1 -0
  423. package/package.json +82 -0
  424. package/skills/proposit-core/SKILL.md +35 -0
  425. package/skills/proposit-core/docs/api-usage.md +442 -0
  426. package/skills/proposit-core/docs/architecture.md +256 -0
  427. package/skills/proposit-core/docs/cli.md +304 -0
  428. package/skills/proposit-core/docs/testing.md +281 -0
  429. package/skills/proposit-core/docs/types-schemas.md +648 -0
@@ -0,0 +1,401 @@
1
+ import type { TCoreArgument, TCoreLogicalOperatorType, TCorePremise, TCorePropositionalExpression, TCorePropositionalVariable } from "../../schemata/index.js";
2
+ import type { TCoreExpressionAssignment, TCorePremiseEvaluationResult, TCoreValidationResult } from "../../types/evaluation.js";
3
+ import type { TInvariantValidationResult } from "../../types/validation.js";
4
+ import type { TCoreMutationResult } from "../../types/mutation.js";
5
+ import type { TExpressionInput, TExpressionWithoutPosition, TExpressionUpdate } from "../expression-manager.js";
6
+ import type { TPremiseEngineSnapshot } from "../premise-engine.js";
7
+ /**
8
+ * Single-premise expression tree mutations.
9
+ */
10
+ export interface TExpressionMutations<TArg extends TCoreArgument = TCoreArgument, TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression, TVar extends TCorePropositionalVariable = TCorePropositionalVariable> {
11
+ /**
12
+ * Adds an expression to this premise's tree.
13
+ *
14
+ * If the expression has `parentId: null` it becomes the root; only one
15
+ * root is permitted per premise. All structural rules (`implies`/`iff`
16
+ * root-only, child limits, position uniqueness) are enforced.
17
+ *
18
+ * When `grammarConfig.autoNormalize` is `true`, operator nesting
19
+ * violations are auto-corrected by inserting a `formula` buffer between
20
+ * the parent operator and the non-`not` operator child, rather than
21
+ * throwing. Auto-normalize is only active for `addExpression`; compound
22
+ * operations (`insertExpression`, `wrapExpression`) and `removeExpression`
23
+ * always throw on violations regardless of this flag.
24
+ *
25
+ * @param expression - The expression to add, including position and
26
+ * parent assignment.
27
+ * @returns The added expression (with checksum) and changeset.
28
+ * @throws If the premise already has a root expression and this one is
29
+ * also a root.
30
+ * @throws If the expression's parent does not exist in this premise.
31
+ * @throws If the expression is a variable reference and the variable
32
+ * has not been registered.
33
+ * @throws If a non-not operator would become a direct child of another
34
+ * operator expression (when `autoNormalize` is `false`).
35
+ */
36
+ addExpression(expression: TExpressionInput<TExpr>): TCoreMutationResult<TExpr, TExpr, TVar, TPremise, TArg>;
37
+ /**
38
+ * Adds an expression as the last child of the given parent, with
39
+ * position computed automatically. If `parentId` is `null`, the
40
+ * expression becomes the root.
41
+ *
42
+ * @param parentId - The parent expression ID, or `null` for root.
43
+ * @param expression - The expression to add (position is auto-assigned).
44
+ * @returns The added expression (with checksum) and changeset.
45
+ * @throws If the premise already has a root and `parentId` is `null`.
46
+ * @throws If the expression is a variable reference and the variable
47
+ * has not been registered.
48
+ * @throws If a non-not operator would become a direct child of another
49
+ * operator expression.
50
+ */
51
+ appendExpression(parentId: string | null, expression: TExpressionWithoutPosition<TExpr>): TCoreMutationResult<TExpr, TExpr, TVar, TPremise, TArg>;
52
+ /**
53
+ * Adds an expression immediately before or after an existing sibling,
54
+ * with position computed automatically.
55
+ *
56
+ * @param siblingId - The ID of the existing sibling expression.
57
+ * @param relativePosition - Whether to insert `"before"` or `"after"`
58
+ * the sibling.
59
+ * @param expression - The expression to add (position is auto-assigned).
60
+ * @returns The added expression (with checksum) and changeset.
61
+ * @throws If the sibling does not exist in this premise.
62
+ * @throws If the expression is a variable reference and the variable
63
+ * has not been registered.
64
+ * @throws If a non-not operator would become a direct child of another
65
+ * operator expression.
66
+ */
67
+ addExpressionRelative(siblingId: string, relativePosition: "before" | "after", expression: TExpressionWithoutPosition<TExpr>): TCoreMutationResult<TExpr, TExpr, TVar, TPremise, TArg>;
68
+ /**
69
+ * Updates mutable fields of an existing expression. Only `position`,
70
+ * `variableId`, and `operator` may be updated.
71
+ *
72
+ * @param expressionId - The ID of the expression to update.
73
+ * @param updates - The fields to update.
74
+ * @returns The updated expression and changeset.
75
+ * @throws If the expression does not exist in this premise.
76
+ * @throws If `variableId` references a non-existent variable.
77
+ */
78
+ updateExpression(expressionId: string, updates: TExpressionUpdate): TCoreMutationResult<TExpr, TExpr, TVar, TPremise, TArg>;
79
+ /**
80
+ * Removes an expression and optionally its entire descendant subtree,
81
+ * then collapses any ancestor operators with fewer than two children.
82
+ *
83
+ * @param expressionId - The ID of the expression to remove.
84
+ * @param deleteSubtree - Whether to remove all descendants as well.
85
+ * @returns The removed root expression, or `undefined` if not found.
86
+ * @throws If removal would promote a non-not operator as a direct
87
+ * child of another operator expression.
88
+ */
89
+ removeExpression(expressionId: string, deleteSubtree: boolean): TCoreMutationResult<TExpr | undefined, TExpr, TVar, TPremise, TArg>;
90
+ /**
91
+ * Splices a new expression between existing nodes in the tree. The new
92
+ * expression inherits the tree slot of the anchor node
93
+ * (`leftNodeId ?? rightNodeId`).
94
+ *
95
+ * @param expression - The expression to insert, including position and
96
+ * parent assignment.
97
+ * @param leftNodeId - The existing node to become the left child of
98
+ * the new expression.
99
+ * @param rightNodeId - The existing node to become the right child of
100
+ * the new expression.
101
+ * @returns The inserted expression (with checksum) and changeset.
102
+ * @throws If the expression is a variable reference and the variable
103
+ * has not been registered.
104
+ * @throws If a non-not operator would become a direct child of another
105
+ * operator expression.
106
+ */
107
+ insertExpression(expression: TExpressionInput<TExpr>, leftNodeId?: string, rightNodeId?: string): TCoreMutationResult<TExpr, TExpr, TVar, TPremise, TArg>;
108
+ /**
109
+ * Wraps an existing expression with a new operator and a new sibling
110
+ * in a single atomic operation.
111
+ *
112
+ * The operator takes the existing node's slot in the tree. Both the
113
+ * existing node and the new sibling become children of the operator.
114
+ * Exactly one of `leftNodeId` / `rightNodeId` must be provided — it
115
+ * identifies the existing node and which child slot it occupies.
116
+ *
117
+ * @param operator - The new operator expression to wrap with.
118
+ * @param newSibling - The new sibling expression to add alongside the
119
+ * existing node.
120
+ * @param leftNodeId - The existing node to place as the left child.
121
+ * @param rightNodeId - The existing node to place as the right child.
122
+ * @returns The inserted operator (with checksum) and changeset.
123
+ * @throws If the new sibling is a variable reference and the variable
124
+ * has not been registered.
125
+ * @throws If a non-not operator would become a direct child of another
126
+ * operator expression.
127
+ */
128
+ wrapExpression(operator: TExpressionWithoutPosition<TExpr>, newSibling: TExpressionWithoutPosition<TExpr>, leftNodeId?: string, rightNodeId?: string): TCoreMutationResult<TExpr, TExpr, TVar, TPremise, TArg>;
129
+ /**
130
+ * Toggles negation on an expression. If the expression's parent is a
131
+ * NOT operator, removes the NOT (promoting the expression). Otherwise,
132
+ * wraps the expression with a new NOT operator.
133
+ *
134
+ * @param expressionId - The ID of the expression to toggle negation on.
135
+ * @param extraFields - Optional additional fields to merge into newly
136
+ * created expressions (NOT and formula nodes). Structural fields
137
+ * (id, type, operator, parentId, position, premiseId, argumentId,
138
+ * argumentVersion) cannot be overridden.
139
+ * @returns The new NOT expression when adding negation, or `null` when
140
+ * removing it, along with the changeset.
141
+ * @throws If the expression does not exist in this premise.
142
+ */
143
+ toggleNegation(expressionId: string, extraFields?: Partial<TExpr>): TCoreMutationResult<TExpr | null, TExpr, TVar, TPremise, TArg>;
144
+ /**
145
+ * Changes the operator type of an existing operator expression.
146
+ *
147
+ * Handles three structural cases automatically:
148
+ * - **Simple change:** The operator has exactly 2 children and no merge
149
+ * condition. Updates the operator type in-place.
150
+ * - **Merge:** The operator has exactly 2 children and its parent is the
151
+ * same type as `newOperator`. Dissolves the current operator and
152
+ * reparents its children under the parent.
153
+ * - **Split:** The operator has >2 children. Extracts `sourceChildId` and
154
+ * `targetChildId` into a new sub-operator of type `newOperator`,
155
+ * inserting a formula buffer if required by grammar enforcement.
156
+ *
157
+ * @param expressionId The operator expression to change.
158
+ * @param newOperator The target operator type.
159
+ * @param sourceChildId First child to include in a split (required when >2 children).
160
+ * @param targetChildId Second child to include in a split (required when >2 children).
161
+ * @param extraFields Optional partial expression fields merged into any
162
+ * newly created expressions (formula buffer, new sub-operator).
163
+ * Structural fields (id, type, operator, parentId, position,
164
+ * premiseId, argumentId, argumentVersion) cannot be overridden.
165
+ * @returns result — For simple change: the updated operator expression.
166
+ * For merge: null (operator was dissolved).
167
+ * For split: the newly created sub-operator expression.
168
+ * changes — Full changeset with correct hierarchical checksums.
169
+ * @throws If the expression does not exist, is not an operator, or is "not".
170
+ * @throws If >2 children and sourceChildId/targetChildId not provided.
171
+ * @throws If sourceChildId/targetChildId are not children of expressionId.
172
+ */
173
+ changeOperator(expressionId: string, newOperator: TCoreLogicalOperatorType, sourceChildId?: string, targetChildId?: string, extraFields?: Partial<TExpr>): TCoreMutationResult<TExpr | null, TExpr, TVar, TPremise, TArg>;
174
+ /**
175
+ * Performs a full normalization sweep on this premise's expression tree.
176
+ * Collapses unjustified formulas, operators with 0/1 children, and inserts
177
+ * formula buffers where needed. Works regardless of `autoNormalize` setting.
178
+ */
179
+ normalizeExpressions(): TCoreMutationResult<void, TExpr, TVar, TPremise, TArg>;
180
+ }
181
+ /**
182
+ * Single-premise expression tree reads.
183
+ */
184
+ export interface TExpressionQueries<TExpr extends TCorePropositionalExpression = TCorePropositionalExpression> {
185
+ /**
186
+ * Returns an expression by ID, or `undefined` if not found in this
187
+ * premise.
188
+ *
189
+ * @param id - The expression ID to look up.
190
+ * @returns The expression entity, or `undefined`.
191
+ */
192
+ getExpression(id: string): TExpr | undefined;
193
+ /**
194
+ * Returns the ID of the root expression, or `undefined` if the premise
195
+ * is empty.
196
+ *
197
+ * @returns The root expression ID, or `undefined`.
198
+ */
199
+ getRootExpressionId(): string | undefined;
200
+ /**
201
+ * Returns the root expression, or `undefined` if the premise is empty.
202
+ *
203
+ * @returns The root expression entity, or `undefined`.
204
+ */
205
+ getRootExpression(): TExpr | undefined;
206
+ /**
207
+ * Returns all expressions in this premise.
208
+ *
209
+ * @returns An array of expression entities.
210
+ */
211
+ getExpressions(): TExpr[];
212
+ /**
213
+ * Returns the child expressions of the given parent, sorted by
214
+ * position.
215
+ *
216
+ * @param parentId - The parent expression ID, or `null` for root-level
217
+ * children.
218
+ * @returns An array of child expression entities.
219
+ */
220
+ getChildExpressions(parentId: string | null): TExpr[];
221
+ }
222
+ /**
223
+ * Variable reference queries and cascade deletion.
224
+ */
225
+ export interface TVariableReferences<TArg extends TCoreArgument = TCoreArgument, TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression, TVar extends TCorePropositionalVariable = TCorePropositionalVariable> {
226
+ /**
227
+ * Returns all argument-level variables (from the shared
228
+ * VariableManager) sorted by ID. Since the VariableManager is shared
229
+ * across all premises, this returns every registered variable — not
230
+ * just those referenced by expressions in this premise.
231
+ *
232
+ * @returns An array of variable entities.
233
+ */
234
+ getVariables(): TVar[];
235
+ /**
236
+ * Returns the set of variable IDs referenced by expressions in this
237
+ * premise. Only variables that appear in `type: "variable"` expression
238
+ * nodes are included.
239
+ *
240
+ * @returns A Set of referenced variable ID strings.
241
+ */
242
+ getReferencedVariableIds(): Set<string>;
243
+ /**
244
+ * Deletes all expressions that reference the given variable ID,
245
+ * including their subtrees. Operator collapse runs after each removal.
246
+ *
247
+ * @param variableId - The variable ID whose referencing expressions
248
+ * should be removed.
249
+ * @returns The removed expressions and changeset.
250
+ */
251
+ deleteExpressionsUsingVariable(variableId: string): TCoreMutationResult<TExpr[], TExpr, TVar, TPremise, TArg>;
252
+ }
253
+ /**
254
+ * Premise type classification (inference vs constraint).
255
+ */
256
+ export interface TPremiseClassification {
257
+ /**
258
+ * Returns `true` if the root expression is an `implies` or `iff`
259
+ * operator, meaning this premise expresses a logical inference
260
+ * relationship.
261
+ *
262
+ * @returns Whether this premise is an inference.
263
+ */
264
+ isInference(): boolean;
265
+ /**
266
+ * Returns `true` if this premise does not have an inference operator at
267
+ * its root. Equivalent to `!isInference()`.
268
+ *
269
+ * @returns Whether this premise is a constraint.
270
+ */
271
+ isConstraint(): boolean;
272
+ }
273
+ /**
274
+ * Premise-level evaluation: single-assignment evaluation and evaluability
275
+ * validation.
276
+ */
277
+ export interface TPremiseEvaluation {
278
+ /**
279
+ * Validates that this premise is structurally ready for evaluation.
280
+ *
281
+ * @returns A validation result with any issues found.
282
+ */
283
+ validateEvaluability(): TCoreValidationResult;
284
+ /**
285
+ * Evaluates the premise under a three-valued expression assignment.
286
+ *
287
+ * Variable values are looked up using Kleene three-valued logic
288
+ * (`null` = unknown). Missing variables default to `null`. For
289
+ * inference premises (`implies`/`iff`), an `inferenceDiagnostic` is
290
+ * computed with three-valued fields unless the root is rejected.
291
+ *
292
+ * @param assignment - The variable assignment and optional rejected
293
+ * expression IDs.
294
+ * @param options - Optional evaluation options.
295
+ * @param options.strictUnknownKeys - If `true`, unknown variable keys
296
+ * in the assignment cause an error.
297
+ * @param options.requireExactCoverage - If `true`, the assignment must
298
+ * cover exactly the referenced variables.
299
+ * @returns The premise evaluation result.
300
+ */
301
+ evaluate(assignment: TCoreExpressionAssignment, options?: {
302
+ strictUnknownKeys?: boolean;
303
+ requireExactCoverage?: boolean;
304
+ }): TCorePremiseEvaluationResult;
305
+ }
306
+ /**
307
+ * Premise snapshot and mutation callback lifecycle.
308
+ * Static fromSnapshot factory is class-level only.
309
+ */
310
+ export interface TPremiseLifecycle<TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression> {
311
+ /**
312
+ * Returns a serializable snapshot of the premise's owned state.
313
+ *
314
+ * @returns The premise engine snapshot.
315
+ */
316
+ snapshot(): TPremiseEngineSnapshot<TPremise, TExpr>;
317
+ /**
318
+ * Sets a callback invoked after every mutation, or `undefined` to
319
+ * clear.
320
+ *
321
+ * @param callback - The mutation callback, or `undefined` to remove.
322
+ */
323
+ setOnMutate(callback: (() => void) | undefined): void;
324
+ /**
325
+ * Sets a callback that checks whether adding a variable-expression to a
326
+ * premise would create a circular binding. Injected by `ArgumentEngine`
327
+ * to enable cross-premise cycle detection. If not set, only the direct
328
+ * check (within the premise itself) runs.
329
+ *
330
+ * @param check - A function that returns `true` if adding the variable
331
+ * to the premise would create a cycle, or `undefined` to clear.
332
+ */
333
+ setCircularityCheck(check: ((variableId: string, premiseId: string) => boolean) | undefined): void;
334
+ /**
335
+ * Sets a callback that checks whether a premise-bound variable's target
336
+ * premise has an empty expression tree. Injected by `ArgumentEngine` to
337
+ * enable cross-premise validation. Used during `validateEvaluability`.
338
+ *
339
+ * @param check - A function that returns `true` if the variable's bound
340
+ * premise has no root expression, or `undefined` to clear.
341
+ */
342
+ setEmptyBoundPremiseCheck(check: ((variableId: string) => boolean) | undefined): void;
343
+ /**
344
+ * Invalidates the cached checksum so the next call recomputes it.
345
+ */
346
+ markDirty(): void;
347
+ /**
348
+ * Run invariant validation on this premise and its expression tree.
349
+ */
350
+ validate(): TInvariantValidationResult;
351
+ /**
352
+ * Sets a callback that returns the full set of variable IDs registered
353
+ * in the argument. Injected by `ArgumentEngine`.
354
+ *
355
+ * @param callback - A function returning the set of registered variable
356
+ * IDs, or `undefined` to clear.
357
+ */
358
+ setVariableIdsCallback(callback: (() => Set<string>) | undefined): void;
359
+ /**
360
+ * Sets a callback that runs full argument-level invariant validation.
361
+ * Injected by `ArgumentEngine` so the premise can delegate to the
362
+ * argument-level validator.
363
+ *
364
+ * @param callback - A function returning the invariant validation result,
365
+ * or `undefined` to clear.
366
+ */
367
+ setArgumentValidateCallback(callback: (() => TInvariantValidationResult) | undefined): void;
368
+ }
369
+ /**
370
+ * Premise entity identity and metadata access.
371
+ */
372
+ export interface TPremiseIdentity<TArg extends TCoreArgument = TCoreArgument, TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression, TVar extends TCorePropositionalVariable = TCorePropositionalVariable> {
373
+ /**
374
+ * Returns the premise ID.
375
+ *
376
+ * @returns The premise ID string.
377
+ */
378
+ getId(): string;
379
+ /**
380
+ * Returns a serializable premise representation containing only
381
+ * identity/metadata and checksum. Use `getRootExpressionId()`,
382
+ * `getExpressions()`, `getReferencedVariableIds()` for runtime state.
383
+ *
384
+ * @returns The premise data entity.
385
+ */
386
+ toPremiseData(): TPremise;
387
+ /**
388
+ * Returns the premise's extra metadata record.
389
+ *
390
+ * @returns The extras record.
391
+ */
392
+ getExtras(): Record<string, unknown>;
393
+ /**
394
+ * Replaces the premise's extra metadata record.
395
+ *
396
+ * @param extras - The new extras record.
397
+ * @returns The previous extras record and changeset.
398
+ */
399
+ setExtras(extras: Record<string, unknown>): TCoreMutationResult<Record<string, unknown>, TExpr, TVar, TPremise, TArg>;
400
+ }
401
+ //# sourceMappingURL=premise-engine.interfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"premise-engine.interfaces.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/interfaces/premise-engine.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,aAAa,EACb,wBAAwB,EACxB,YAAY,EACZ,4BAA4B,EAC5B,0BAA0B,EAC7B,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EACR,yBAAyB,EACzB,4BAA4B,EAC5B,qBAAqB,EACxB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAA;AAC3E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAA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0B,GAAG,0BAA0B;IAEpE;;;;OAIG;IACH,KAAK,IAAI,MAAM,CAAA;IACf;;;;;;OAMG;IACH,aAAa,IAAI,QAAQ,CAAA;IACzB;;;;OAIG;IACH,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACpC;;;;;OAKG;IACH,SAAS,CACL,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,mBAAmB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAA;CAC/E"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=premise-engine.interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"premise-engine.interfaces.js","sourceRoot":"","sources":["../../../../src/lib/core/interfaces/premise-engine.interfaces.ts"],"names":[],"mappings":""}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * An entity that can produce a human-readable display string.
3
+ */
4
+ export interface TDisplayable {
5
+ /**
6
+ * Renders the entity as a human-readable string.
7
+ *
8
+ * @returns A human-readable display string.
9
+ */
10
+ toDisplayString(): string;
11
+ }
12
+ /**
13
+ * An entity that can produce hierarchical content checksums:
14
+ * meta (entity-only), descendant (children), and combined (both).
15
+ */
16
+ export interface THierarchicalChecksummable<TCollectionName extends string = string> {
17
+ /** Returns the meta checksum — derived from entity data only. */
18
+ checksum(): string;
19
+ /** Returns the descendant checksum — derived from children's combinedChecksums. Null if no children. */
20
+ descendantChecksum(): string | null;
21
+ /** Returns the combined checksum — hash(checksum + descendantChecksum), or equals checksum if no descendants. */
22
+ combinedChecksum(): string;
23
+ /** Returns the checksum for a named descendant collection. Null if collection is empty. */
24
+ getCollectionChecksum(name: TCollectionName): string | null;
25
+ /** Forces recomputation of all dirty checksums in the hierarchy. */
26
+ flushChecksums(): void;
27
+ }
28
+ //# sourceMappingURL=shared.interfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.interfaces.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/interfaces/shared.interfaces.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB;;;;OAIG;IACH,eAAe,IAAI,MAAM,CAAA;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,0BAA0B,CACvC,eAAe,SAAS,MAAM,GAAG,MAAM;IAEvC,iEAAiE;IACjE,QAAQ,IAAI,MAAM,CAAA;IAClB,wGAAwG;IACxG,kBAAkB,IAAI,MAAM,GAAG,IAAI,CAAA;IACnC,iHAAiH;IACjH,gBAAgB,IAAI,MAAM,CAAA;IAC1B,2FAA2F;IAC3F,qBAAqB,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,GAAG,IAAI,CAAA;IAC3D,oEAAoE;IACpE,cAAc,IAAI,IAAI,CAAA;CACzB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=shared.interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.interfaces.js","sourceRoot":"","sources":["../../../../src/lib/core/interfaces/shared.interfaces.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import type { TInvariantViolation } from "../types/validation.js";
2
+ /**
3
+ * Thrown when a mutation would leave the system in an invalid state.
4
+ * Carries the full list of {@link TInvariantViolation} entries that were detected.
5
+ */
6
+ export declare class InvariantViolationError extends Error {
7
+ readonly violations: TInvariantViolation[];
8
+ constructor(violations: TInvariantViolation[]);
9
+ }
10
+ //# sourceMappingURL=invariant-violation-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invariant-violation-error.d.ts","sourceRoot":"","sources":["../../../src/lib/core/invariant-violation-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAEjE;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;IAC9C,SAAgB,UAAU,EAAE,mBAAmB,EAAE,CAAA;gBAErC,UAAU,EAAE,mBAAmB,EAAE;CAShD"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Thrown when a mutation would leave the system in an invalid state.
3
+ * Carries the full list of {@link TInvariantViolation} entries that were detected.
4
+ */
5
+ export class InvariantViolationError extends Error {
6
+ violations;
7
+ constructor(violations) {
8
+ const summary = violations.length === 1
9
+ ? violations[0].message
10
+ : `${violations.length} invariant violations detected`;
11
+ super(summary);
12
+ this.name = "InvariantViolationError";
13
+ this.violations = violations;
14
+ }
15
+ }
16
+ //# sourceMappingURL=invariant-violation-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invariant-violation-error.js","sourceRoot":"","sources":["../../../src/lib/core/invariant-violation-error.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,OAAO,uBAAwB,SAAQ,KAAK;IAC9B,UAAU,CAAuB;IAEjD,YAAY,UAAiC;QACzC,MAAM,OAAO,GACT,UAAU,CAAC,MAAM,KAAK,CAAC;YACnB,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO;YACvB,CAAC,CAAC,GAAG,UAAU,CAAC,MAAM,gCAAgC,CAAA;QAC9D,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAA;QACrC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;IAChC,CAAC;CACJ"}