@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.
- package/README.md +1032 -0
- package/dist/cli/commands/analysis.d.ts +3 -0
- package/dist/cli/commands/analysis.d.ts.map +1 -0
- package/dist/cli/commands/analysis.js +504 -0
- package/dist/cli/commands/analysis.js.map +1 -0
- package/dist/cli/commands/arguments.d.ts +3 -0
- package/dist/cli/commands/arguments.d.ts.map +1 -0
- package/dist/cli/commands/arguments.js +187 -0
- package/dist/cli/commands/arguments.js.map +1 -0
- package/dist/cli/commands/claims.d.ts +3 -0
- package/dist/cli/commands/claims.d.ts.map +1 -0
- package/dist/cli/commands/claims.js +120 -0
- package/dist/cli/commands/claims.js.map +1 -0
- package/dist/cli/commands/diff.d.ts +3 -0
- package/dist/cli/commands/diff.d.ts.map +1 -0
- package/dist/cli/commands/diff.js +61 -0
- package/dist/cli/commands/diff.js.map +1 -0
- package/dist/cli/commands/expressions.d.ts +3 -0
- package/dist/cli/commands/expressions.d.ts.map +1 -0
- package/dist/cli/commands/expressions.js +344 -0
- package/dist/cli/commands/expressions.js.map +1 -0
- package/dist/cli/commands/graph.d.ts +13 -0
- package/dist/cli/commands/graph.d.ts.map +1 -0
- package/dist/cli/commands/graph.js +382 -0
- package/dist/cli/commands/graph.js.map +1 -0
- package/dist/cli/commands/meta.d.ts +3 -0
- package/dist/cli/commands/meta.d.ts.map +1 -0
- package/dist/cli/commands/meta.js +14 -0
- package/dist/cli/commands/meta.js.map +1 -0
- package/dist/cli/commands/parse.d.ts +3 -0
- package/dist/cli/commands/parse.d.ts.map +1 -0
- package/dist/cli/commands/parse.js +171 -0
- package/dist/cli/commands/parse.js.map +1 -0
- package/dist/cli/commands/premises.d.ts +3 -0
- package/dist/cli/commands/premises.d.ts.map +1 -0
- package/dist/cli/commands/premises.js +261 -0
- package/dist/cli/commands/premises.js.map +1 -0
- package/dist/cli/commands/render.d.ts +3 -0
- package/dist/cli/commands/render.d.ts.map +1 -0
- package/dist/cli/commands/render.js +109 -0
- package/dist/cli/commands/render.js.map +1 -0
- package/dist/cli/commands/repair.d.ts +3 -0
- package/dist/cli/commands/repair.d.ts.map +1 -0
- package/dist/cli/commands/repair.js +53 -0
- package/dist/cli/commands/repair.js.map +1 -0
- package/dist/cli/commands/roles.d.ts +3 -0
- package/dist/cli/commands/roles.d.ts.map +1 -0
- package/dist/cli/commands/roles.js +64 -0
- package/dist/cli/commands/roles.js.map +1 -0
- package/dist/cli/commands/sources.d.ts +3 -0
- package/dist/cli/commands/sources.d.ts.map +1 -0
- package/dist/cli/commands/sources.js +103 -0
- package/dist/cli/commands/sources.js.map +1 -0
- package/dist/cli/commands/validate.d.ts +3 -0
- package/dist/cli/commands/validate.d.ts.map +1 -0
- package/dist/cli/commands/validate.js +27 -0
- package/dist/cli/commands/validate.js.map +1 -0
- package/dist/cli/commands/variables.d.ts +3 -0
- package/dist/cli/commands/variables.d.ts.map +1 -0
- package/dist/cli/commands/variables.js +206 -0
- package/dist/cli/commands/variables.js.map +1 -0
- package/dist/cli/commands/version-show.d.ts +3 -0
- package/dist/cli/commands/version-show.d.ts.map +1 -0
- package/dist/cli/commands/version-show.js +31 -0
- package/dist/cli/commands/version-show.js.map +1 -0
- package/dist/cli/config.d.ts +8 -0
- package/dist/cli/config.d.ts.map +1 -0
- package/dist/cli/config.js +24 -0
- package/dist/cli/config.js.map +1 -0
- package/dist/cli/engine.d.ts +19 -0
- package/dist/cli/engine.d.ts.map +1 -0
- package/dist/cli/engine.js +173 -0
- package/dist/cli/engine.js.map +1 -0
- package/dist/cli/import.d.ts +22 -0
- package/dist/cli/import.d.ts.map +1 -0
- package/dist/cli/import.js +242 -0
- package/dist/cli/import.js.map +1 -0
- package/dist/cli/llm/index.d.ts +6 -0
- package/dist/cli/llm/index.d.ts.map +1 -0
- package/dist/cli/llm/index.js +26 -0
- package/dist/cli/llm/index.js.map +1 -0
- package/dist/cli/llm/openai.d.ts +4 -0
- package/dist/cli/llm/openai.d.ts.map +1 -0
- package/dist/cli/llm/openai.js +44 -0
- package/dist/cli/llm/openai.js.map +1 -0
- package/dist/cli/llm/types.d.ts +14 -0
- package/dist/cli/llm/types.d.ts.map +1 -0
- package/dist/cli/llm/types.js +2 -0
- package/dist/cli/llm/types.js.map +1 -0
- package/dist/cli/logging.d.ts +8 -0
- package/dist/cli/logging.d.ts.map +1 -0
- package/dist/cli/logging.js +23 -0
- package/dist/cli/logging.js.map +1 -0
- package/dist/cli/output/diff-renderer.d.ts +4 -0
- package/dist/cli/output/diff-renderer.d.ts.map +1 -0
- package/dist/cli/output/diff-renderer.js +89 -0
- package/dist/cli/output/diff-renderer.js.map +1 -0
- package/dist/cli/output.d.ts +6 -0
- package/dist/cli/output.d.ts.map +1 -0
- package/dist/cli/output.js +41 -0
- package/dist/cli/output.js.map +1 -0
- package/dist/cli/router.d.ts +14 -0
- package/dist/cli/router.d.ts.map +1 -0
- package/dist/cli/router.js +59 -0
- package/dist/cli/router.js.map +1 -0
- package/dist/cli/schemata.d.ts +74 -0
- package/dist/cli/schemata.d.ts.map +1 -0
- package/dist/cli/schemata.js +89 -0
- package/dist/cli/schemata.js.map +1 -0
- package/dist/cli/storage/analysis.d.ts +9 -0
- package/dist/cli/storage/analysis.d.ts.map +1 -0
- package/dist/cli/storage/analysis.js +108 -0
- package/dist/cli/storage/analysis.js.map +1 -0
- package/dist/cli/storage/arguments.d.ts +12 -0
- package/dist/cli/storage/arguments.d.ts.map +1 -0
- package/dist/cli/storage/arguments.js +80 -0
- package/dist/cli/storage/arguments.js.map +1 -0
- package/dist/cli/storage/libraries.d.ts +14 -0
- package/dist/cli/storage/libraries.d.ts.map +1 -0
- package/dist/cli/storage/libraries.js +80 -0
- package/dist/cli/storage/libraries.js.map +1 -0
- package/dist/cli/storage/premises.d.ts +9 -0
- package/dist/cli/storage/premises.d.ts.map +1 -0
- package/dist/cli/storage/premises.js +67 -0
- package/dist/cli/storage/premises.js.map +1 -0
- package/dist/cli/storage/roles.d.ts +4 -0
- package/dist/cli/storage/roles.d.ts.map +1 -0
- package/dist/cli/storage/roles.js +26 -0
- package/dist/cli/storage/roles.js.map +1 -0
- package/dist/cli/storage/variables.d.ts +4 -0
- package/dist/cli/storage/variables.d.ts.map +1 -0
- package/dist/cli/storage/variables.js +36 -0
- package/dist/cli/storage/variables.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +65 -0
- package/dist/cli.js.map +1 -0
- package/dist/extensions/basics/argument-parser.d.ts +12 -0
- package/dist/extensions/basics/argument-parser.d.ts.map +1 -0
- package/dist/extensions/basics/argument-parser.js +27 -0
- package/dist/extensions/basics/argument-parser.js.map +1 -0
- package/dist/extensions/basics/index.d.ts +4 -0
- package/dist/extensions/basics/index.d.ts.map +1 -0
- package/dist/extensions/basics/index.js +3 -0
- package/dist/extensions/basics/index.js.map +1 -0
- package/dist/extensions/basics/schemata.d.ts +35 -0
- package/dist/extensions/basics/schemata.d.ts.map +1 -0
- package/dist/extensions/basics/schemata.js +55 -0
- package/dist/extensions/basics/schemata.js.map +1 -0
- package/dist/extensions/ieee/formatting.d.ts +18 -0
- package/dist/extensions/ieee/formatting.d.ts.map +1 -0
- package/dist/extensions/ieee/formatting.js +57 -0
- package/dist/extensions/ieee/formatting.js.map +1 -0
- package/dist/extensions/ieee/index.d.ts +6 -0
- package/dist/extensions/ieee/index.d.ts.map +1 -0
- package/dist/extensions/ieee/index.js +6 -0
- package/dist/extensions/ieee/index.js.map +1 -0
- package/dist/extensions/ieee/references.d.ts +1379 -0
- package/dist/extensions/ieee/references.d.ts.map +1 -0
- package/dist/extensions/ieee/references.js +929 -0
- package/dist/extensions/ieee/references.js.map +1 -0
- package/dist/extensions/ieee/relaxed.d.ts +1371 -0
- package/dist/extensions/ieee/relaxed.d.ts.map +1 -0
- package/dist/extensions/ieee/relaxed.js +160 -0
- package/dist/extensions/ieee/relaxed.js.map +1 -0
- package/dist/extensions/ieee/segment-builder.d.ts +9 -0
- package/dist/extensions/ieee/segment-builder.d.ts.map +1 -0
- package/dist/extensions/ieee/segment-builder.js +98 -0
- package/dist/extensions/ieee/segment-builder.js.map +1 -0
- package/dist/extensions/ieee/segment-templates.d.ts +58 -0
- package/dist/extensions/ieee/segment-templates.d.ts.map +1 -0
- package/dist/extensions/ieee/segment-templates.js +1618 -0
- package/dist/extensions/ieee/segment-templates.js.map +1 -0
- package/dist/extensions/ieee/source.d.ts +434 -0
- package/dist/extensions/ieee/source.d.ts.map +1 -0
- package/dist/extensions/ieee/source.js +12 -0
- package/dist/extensions/ieee/source.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/consts.d.ts +21 -0
- package/dist/lib/consts.d.ts.map +1 -0
- package/dist/lib/consts.js +117 -0
- package/dist/lib/consts.js.map +1 -0
- package/dist/lib/core/argument-engine.d.ts +181 -0
- package/dist/lib/core/argument-engine.d.ts.map +1 -0
- package/dist/lib/core/argument-engine.js +1294 -0
- package/dist/lib/core/argument-engine.js.map +1 -0
- package/dist/lib/core/argument-library.d.ts +84 -0
- package/dist/lib/core/argument-library.d.ts.map +1 -0
- package/dist/lib/core/argument-library.js +122 -0
- package/dist/lib/core/argument-library.js.map +1 -0
- package/dist/lib/core/argument-validation.d.ts +74 -0
- package/dist/lib/core/argument-validation.d.ts.map +1 -0
- package/dist/lib/core/argument-validation.js +315 -0
- package/dist/lib/core/argument-validation.js.map +1 -0
- package/dist/lib/core/change-collector.d.ts +24 -0
- package/dist/lib/core/change-collector.d.ts.map +1 -0
- package/dist/lib/core/change-collector.js +63 -0
- package/dist/lib/core/change-collector.js.map +1 -0
- package/dist/lib/core/checksum.d.ts +15 -0
- package/dist/lib/core/checksum.d.ts.map +1 -0
- package/dist/lib/core/checksum.js +43 -0
- package/dist/lib/core/checksum.js.map +1 -0
- package/dist/lib/core/claim-library.d.ts +23 -0
- package/dist/lib/core/claim-library.d.ts.map +1 -0
- package/dist/lib/core/claim-library.js +21 -0
- package/dist/lib/core/claim-library.js.map +1 -0
- package/dist/lib/core/claim-source-library.d.ts +32 -0
- package/dist/lib/core/claim-source-library.d.ts.map +1 -0
- package/dist/lib/core/claim-source-library.js +193 -0
- package/dist/lib/core/claim-source-library.js.map +1 -0
- package/dist/lib/core/diff.d.ts +20 -0
- package/dist/lib/core/diff.d.ts.map +1 -0
- package/dist/lib/core/diff.js +260 -0
- package/dist/lib/core/diff.js.map +1 -0
- package/dist/lib/core/evaluation/argument-evaluation.d.ts +53 -0
- package/dist/lib/core/evaluation/argument-evaluation.d.ts.map +1 -0
- package/dist/lib/core/evaluation/argument-evaluation.js +535 -0
- package/dist/lib/core/evaluation/argument-evaluation.js.map +1 -0
- package/dist/lib/core/evaluation/grading.d.ts +28 -0
- package/dist/lib/core/evaluation/grading.d.ts.map +1 -0
- package/dist/lib/core/evaluation/grading.js +44 -0
- package/dist/lib/core/evaluation/grading.js.map +1 -0
- package/dist/lib/core/evaluation/kleene.d.ts +12 -0
- package/dist/lib/core/evaluation/kleene.d.ts.map +1 -0
- package/dist/lib/core/evaluation/kleene.js +29 -0
- package/dist/lib/core/evaluation/kleene.js.map +1 -0
- package/dist/lib/core/evaluation/validation.d.ts +10 -0
- package/dist/lib/core/evaluation/validation.d.ts.map +1 -0
- package/dist/lib/core/evaluation/validation.js +28 -0
- package/dist/lib/core/evaluation/validation.js.map +1 -0
- package/dist/lib/core/expression-manager.d.ts +278 -0
- package/dist/lib/core/expression-manager.d.ts.map +1 -0
- package/dist/lib/core/expression-manager.js +1622 -0
- package/dist/lib/core/expression-manager.js.map +1 -0
- package/dist/lib/core/fork-library.d.ts +26 -0
- package/dist/lib/core/fork-library.d.ts.map +1 -0
- package/dist/lib/core/fork-library.js +71 -0
- package/dist/lib/core/fork-library.js.map +1 -0
- package/dist/lib/core/fork-namespace.d.ts +32 -0
- package/dist/lib/core/fork-namespace.d.ts.map +1 -0
- package/dist/lib/core/fork-namespace.js +99 -0
- package/dist/lib/core/fork-namespace.js.map +1 -0
- package/dist/lib/core/fork.d.ts +30 -0
- package/dist/lib/core/fork.d.ts.map +1 -0
- package/dist/lib/core/fork.js +125 -0
- package/dist/lib/core/fork.js.map +1 -0
- package/dist/lib/core/interfaces/argument-engine.interfaces.d.ts +366 -0
- package/dist/lib/core/interfaces/argument-engine.interfaces.d.ts.map +1 -0
- package/dist/lib/core/interfaces/argument-engine.interfaces.js +2 -0
- package/dist/lib/core/interfaces/argument-engine.interfaces.js.map +1 -0
- package/dist/lib/core/interfaces/index.d.ts +5 -0
- package/dist/lib/core/interfaces/index.d.ts.map +1 -0
- package/dist/lib/core/interfaces/index.js +2 -0
- package/dist/lib/core/interfaces/index.js.map +1 -0
- package/dist/lib/core/interfaces/library.interfaces.d.ts +347 -0
- package/dist/lib/core/interfaces/library.interfaces.d.ts.map +1 -0
- package/dist/lib/core/interfaces/library.interfaces.js +2 -0
- package/dist/lib/core/interfaces/library.interfaces.js.map +1 -0
- package/dist/lib/core/interfaces/premise-engine.interfaces.d.ts +401 -0
- package/dist/lib/core/interfaces/premise-engine.interfaces.d.ts.map +1 -0
- package/dist/lib/core/interfaces/premise-engine.interfaces.js +2 -0
- package/dist/lib/core/interfaces/premise-engine.interfaces.js.map +1 -0
- package/dist/lib/core/interfaces/shared.interfaces.d.ts +28 -0
- package/dist/lib/core/interfaces/shared.interfaces.d.ts.map +1 -0
- package/dist/lib/core/interfaces/shared.interfaces.js +2 -0
- package/dist/lib/core/interfaces/shared.interfaces.js.map +1 -0
- package/dist/lib/core/invariant-violation-error.d.ts +10 -0
- package/dist/lib/core/invariant-violation-error.d.ts.map +1 -0
- package/dist/lib/core/invariant-violation-error.js +16 -0
- package/dist/lib/core/invariant-violation-error.js.map +1 -0
- package/dist/lib/core/parser/formula-gen.js +923 -0
- package/dist/lib/core/parser/formula.d.ts +24 -0
- package/dist/lib/core/parser/formula.d.ts.map +1 -0
- package/dist/lib/core/parser/formula.js +8 -0
- package/dist/lib/core/parser/formula.js.map +1 -0
- package/dist/lib/core/premise-engine.d.ts +122 -0
- package/dist/lib/core/premise-engine.d.ts.map +1 -0
- package/dist/lib/core/premise-engine.js +1362 -0
- package/dist/lib/core/premise-engine.js.map +1 -0
- package/dist/lib/core/proposit-core.d.ts +111 -0
- package/dist/lib/core/proposit-core.d.ts.map +1 -0
- package/dist/lib/core/proposit-core.js +365 -0
- package/dist/lib/core/proposit-core.js.map +1 -0
- package/dist/lib/core/relationships.d.ts +15 -0
- package/dist/lib/core/relationships.d.ts.map +1 -0
- package/dist/lib/core/relationships.js +319 -0
- package/dist/lib/core/relationships.js.map +1 -0
- package/dist/lib/core/source-library.d.ts +23 -0
- package/dist/lib/core/source-library.d.ts.map +1 -0
- package/dist/lib/core/source-library.js +21 -0
- package/dist/lib/core/source-library.js.map +1 -0
- package/dist/lib/core/variable-manager.d.ts +68 -0
- package/dist/lib/core/variable-manager.d.ts.map +1 -0
- package/dist/lib/core/variable-manager.js +200 -0
- package/dist/lib/core/variable-manager.js.map +1 -0
- package/dist/lib/core/versioned-library.d.ts +52 -0
- package/dist/lib/core/versioned-library.d.ts.map +1 -0
- package/dist/lib/core/versioned-library.js +192 -0
- package/dist/lib/core/versioned-library.js.map +1 -0
- package/dist/lib/index.d.ts +54 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +39 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/parsing/argument-parser.d.ts +49 -0
- package/dist/lib/parsing/argument-parser.d.ts.map +1 -0
- package/dist/lib/parsing/argument-parser.js +403 -0
- package/dist/lib/parsing/argument-parser.js.map +1 -0
- package/dist/lib/parsing/clamp-max-lengths.d.ts +11 -0
- package/dist/lib/parsing/clamp-max-lengths.d.ts.map +1 -0
- package/dist/lib/parsing/clamp-max-lengths.js +56 -0
- package/dist/lib/parsing/clamp-max-lengths.js.map +1 -0
- package/dist/lib/parsing/index.d.ts +7 -0
- package/dist/lib/parsing/index.d.ts.map +1 -0
- package/dist/lib/parsing/index.js +4 -0
- package/dist/lib/parsing/index.js.map +1 -0
- package/dist/lib/parsing/prompt-builder.d.ts +11 -0
- package/dist/lib/parsing/prompt-builder.d.ts.map +1 -0
- package/dist/lib/parsing/prompt-builder.js +229 -0
- package/dist/lib/parsing/prompt-builder.js.map +1 -0
- package/dist/lib/parsing/schemata.d.ts +79 -0
- package/dist/lib/parsing/schemata.d.ts.map +1 -0
- package/dist/lib/parsing/schemata.js +92 -0
- package/dist/lib/parsing/schemata.js.map +1 -0
- package/dist/lib/parsing/types.d.ts +24 -0
- package/dist/lib/parsing/types.d.ts.map +1 -0
- package/dist/lib/parsing/types.js +2 -0
- package/dist/lib/parsing/types.js.map +1 -0
- package/dist/lib/schemata/analysis.d.ts +9 -0
- package/dist/lib/schemata/analysis.d.ts.map +1 -0
- package/dist/lib/schemata/analysis.js +13 -0
- package/dist/lib/schemata/analysis.js.map +1 -0
- package/dist/lib/schemata/argument.d.ts +14 -0
- package/dist/lib/schemata/argument.d.ts.map +1 -0
- package/dist/lib/schemata/argument.js +24 -0
- package/dist/lib/schemata/argument.js.map +1 -0
- package/dist/lib/schemata/claim.d.ts +9 -0
- package/dist/lib/schemata/claim.d.ts.map +1 -0
- package/dist/lib/schemata/claim.js +18 -0
- package/dist/lib/schemata/claim.js.map +1 -0
- package/dist/lib/schemata/fork.d.ts +76 -0
- package/dist/lib/schemata/fork.d.ts.map +1 -0
- package/dist/lib/schemata/fork.js +55 -0
- package/dist/lib/schemata/fork.js.map +1 -0
- package/dist/lib/schemata/import.d.ts +33 -0
- package/dist/lib/schemata/import.d.ts.map +1 -0
- package/dist/lib/schemata/import.js +18 -0
- package/dist/lib/schemata/import.js.map +1 -0
- package/dist/lib/schemata/index.d.ts +8 -0
- package/dist/lib/schemata/index.d.ts.map +1 -0
- package/dist/lib/schemata/index.js +8 -0
- package/dist/lib/schemata/index.js.map +1 -0
- package/dist/lib/schemata/propositional.d.ts +142 -0
- package/dist/lib/schemata/propositional.d.ts.map +1 -0
- package/dist/lib/schemata/propositional.js +120 -0
- package/dist/lib/schemata/propositional.js.map +1 -0
- package/dist/lib/schemata/shared.d.ts +41 -0
- package/dist/lib/schemata/shared.d.ts.map +1 -0
- package/dist/lib/schemata/shared.js +66 -0
- package/dist/lib/schemata/shared.js.map +1 -0
- package/dist/lib/schemata/source.d.ts +18 -0
- package/dist/lib/schemata/source.d.ts.map +1 -0
- package/dist/lib/schemata/source.js +35 -0
- package/dist/lib/schemata/source.js.map +1 -0
- package/dist/lib/types/checksum.d.ts +20 -0
- package/dist/lib/types/checksum.d.ts.map +1 -0
- package/dist/lib/types/checksum.js +2 -0
- package/dist/lib/types/checksum.js.map +1 -0
- package/dist/lib/types/diff.d.ts +60 -0
- package/dist/lib/types/diff.d.ts.map +1 -0
- package/dist/lib/types/diff.js +2 -0
- package/dist/lib/types/diff.js.map +1 -0
- package/dist/lib/types/evaluation.d.ts +164 -0
- package/dist/lib/types/evaluation.d.ts.map +1 -0
- package/dist/lib/types/evaluation.js +2 -0
- package/dist/lib/types/evaluation.js.map +1 -0
- package/dist/lib/types/fork.d.ts +25 -0
- package/dist/lib/types/fork.d.ts.map +1 -0
- package/dist/lib/types/fork.js +2 -0
- package/dist/lib/types/fork.js.map +1 -0
- package/dist/lib/types/grammar.d.ts +38 -0
- package/dist/lib/types/grammar.d.ts.map +1 -0
- package/dist/lib/types/grammar.js +11 -0
- package/dist/lib/types/grammar.js.map +1 -0
- package/dist/lib/types/mutation.d.ts +31 -0
- package/dist/lib/types/mutation.d.ts.map +1 -0
- package/dist/lib/types/mutation.js +2 -0
- package/dist/lib/types/mutation.js.map +1 -0
- package/dist/lib/types/reactive.d.ts +14 -0
- package/dist/lib/types/reactive.d.ts.map +1 -0
- package/dist/lib/types/reactive.js +2 -0
- package/dist/lib/types/reactive.js.map +1 -0
- package/dist/lib/types/relationships.d.ts +36 -0
- package/dist/lib/types/relationships.d.ts.map +1 -0
- package/dist/lib/types/relationships.js +2 -0
- package/dist/lib/types/relationships.js.map +1 -0
- package/dist/lib/types/validation.d.ts +47 -0
- package/dist/lib/types/validation.d.ts.map +1 -0
- package/dist/lib/types/validation.js +43 -0
- package/dist/lib/types/validation.js.map +1 -0
- package/dist/lib/utils/changeset.d.ts +124 -0
- package/dist/lib/utils/changeset.d.ts.map +1 -0
- package/dist/lib/utils/changeset.js +221 -0
- package/dist/lib/utils/changeset.js.map +1 -0
- package/dist/lib/utils/collections.d.ts +12 -0
- package/dist/lib/utils/collections.d.ts.map +1 -0
- package/dist/lib/utils/collections.js +24 -0
- package/dist/lib/utils/collections.js.map +1 -0
- package/dist/lib/utils/default-map.d.ts +17 -0
- package/dist/lib/utils/default-map.d.ts.map +1 -0
- package/dist/lib/utils/default-map.js +33 -0
- package/dist/lib/utils/default-map.js.map +1 -0
- package/dist/lib/utils/lookup.d.ts +47 -0
- package/dist/lib/utils/lookup.d.ts.map +1 -0
- package/dist/lib/utils/lookup.js +62 -0
- package/dist/lib/utils/lookup.js.map +1 -0
- package/dist/lib/utils/position.d.ts +12 -0
- package/dist/lib/utils/position.d.ts.map +1 -0
- package/dist/lib/utils/position.js +13 -0
- package/dist/lib/utils/position.js.map +1 -0
- package/package.json +82 -0
- package/skills/proposit-core/SKILL.md +35 -0
- package/skills/proposit-core/docs/api-usage.md +442 -0
- package/skills/proposit-core/docs/architecture.md +256 -0
- package/skills/proposit-core/docs/cli.md +304 -0
- package/skills/proposit-core/docs/testing.md +281 -0
- package/skills/proposit-core/docs/types-schemas.md +648 -0
|
@@ -0,0 +1,648 @@
|
|
|
1
|
+
# Types & Schemas Reference
|
|
2
|
+
|
|
3
|
+
Quick-reference for all exported types. For API usage, see [api-usage.md](./api-usage.md).
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Expression Types
|
|
8
|
+
|
|
9
|
+
**Source:** `src/lib/schemata/propositional.ts`, `src/lib/core/ExpressionManager.ts`
|
|
10
|
+
|
|
11
|
+
### `TCorePropositionalExpression<T>`
|
|
12
|
+
|
|
13
|
+
Discriminated union on `type`. Generic parameter `T` narrows the union (defaults to all three).
|
|
14
|
+
|
|
15
|
+
**Common fields (all variants):**
|
|
16
|
+
|
|
17
|
+
| Field | Type | Notes |
|
|
18
|
+
| ----------------- | ---------------- | ------------------------------- |
|
|
19
|
+
| `id` | `string` | UUID |
|
|
20
|
+
| `argumentId` | `string` | UUID |
|
|
21
|
+
| `argumentVersion` | `number` | |
|
|
22
|
+
| `parentId` | `string \| null` | `null` for root expressions |
|
|
23
|
+
| `position` | `number` | `>= 0`, ordering among siblings |
|
|
24
|
+
| `checksum` | `string` | Entity-level checksum |
|
|
25
|
+
|
|
26
|
+
**Variant-specific fields:**
|
|
27
|
+
|
|
28
|
+
| Variant | `type` | Extra field | Field type |
|
|
29
|
+
| ------------ | ------------ | ------------ | -------------------------- |
|
|
30
|
+
| `"variable"` | `"variable"` | `variableId` | `string` (UUID) |
|
|
31
|
+
| `"operator"` | `"operator"` | `operator` | `TCoreLogicalOperatorType` |
|
|
32
|
+
| `"formula"` | `"formula"` | _(none)_ | |
|
|
33
|
+
|
|
34
|
+
**Narrowing:** `TCorePropositionalExpression<"variable">` gives only the variable variant. Aliases: `TCorePropositionalVariableExpression`, `TCoreOperatorExpression`, `TCoreFormulaExpression`.
|
|
35
|
+
|
|
36
|
+
### `TExpressionInput`
|
|
37
|
+
|
|
38
|
+
Same as `TCorePropositionalExpression` but with `checksum` omitted. Preserves discriminated-union narrowing via distributive conditional type. Used as input for `addExpression`, `insertExpression`, and as the internal storage type.
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
type TExpressionInput = Omit<TCorePropositionalExpression<T>, "checksum"> // for each T
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### `TExpressionWithoutPosition`
|
|
45
|
+
|
|
46
|
+
Same as `TCorePropositionalExpression` but with both `position` and `checksum` omitted. Used as input for `appendExpression` and `addExpressionRelative`.
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
type TExpressionWithoutPosition = Omit<
|
|
50
|
+
TCorePropositionalExpression<T>,
|
|
51
|
+
"position" | "checksum"
|
|
52
|
+
>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### `TExpressionUpdate`
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
interface TExpressionUpdate {
|
|
59
|
+
position?: number
|
|
60
|
+
variableId?: string
|
|
61
|
+
operator?: TCoreLogicalOperatorType
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Used by `updateExpression(id, updates)`. Only set fields are applied. Forbidden fields (`id`, `parentId`, `type`, `argumentId`, `argumentVersion`, `checksum`) throw if present.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 2. Variable Type
|
|
70
|
+
|
|
71
|
+
**Source:** `src/lib/schemata/propositional.ts`
|
|
72
|
+
|
|
73
|
+
### `TCorePropositionalVariable`
|
|
74
|
+
|
|
75
|
+
```typescript
|
|
76
|
+
interface TCorePropositionalVariable {
|
|
77
|
+
id: string // UUID
|
|
78
|
+
argumentId: string // UUID
|
|
79
|
+
argumentVersion: number
|
|
80
|
+
symbol: string // e.g. "P", "Q"
|
|
81
|
+
checksum: string
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Schema has `additionalProperties: true` -- extra fields survive round-trips.
|
|
86
|
+
|
|
87
|
+
### `TVariableInput` (internal)
|
|
88
|
+
|
|
89
|
+
`Omit<TCorePropositionalVariable, "checksum">`. Used as input for `addVariable` and as internal storage in `VariableManager`. Not publicly exported from the package index.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## 3. Premise Type
|
|
94
|
+
|
|
95
|
+
**Source:** `src/lib/schemata/propositional.ts`
|
|
96
|
+
|
|
97
|
+
### `TCorePremise`
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
interface TCorePremise {
|
|
101
|
+
id: string // UUID
|
|
102
|
+
rootExpressionId?: string // UUID, present if premise has expressions
|
|
103
|
+
variables: string[] // IDs of referenced variables
|
|
104
|
+
expressions: TCorePropositionalExpression[] // full expression tree
|
|
105
|
+
checksum: string
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Schema has `additionalProperties: true` -- extra fields survive round-trips.
|
|
110
|
+
|
|
111
|
+
Returned by `PremiseManager.toData()` and included in `TCoreArgumentEngineData.premises`.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## 4. Argument Types
|
|
116
|
+
|
|
117
|
+
**Source:** `src/lib/schemata/argument.ts`
|
|
118
|
+
|
|
119
|
+
### `TCoreArgument`
|
|
120
|
+
|
|
121
|
+
```typescript
|
|
122
|
+
interface TCoreArgument {
|
|
123
|
+
id: string // UUID
|
|
124
|
+
version: number
|
|
125
|
+
checksum: string
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Schema has `additionalProperties: true` -- extra fields survive round-trips.
|
|
130
|
+
|
|
131
|
+
### `TCoreArgumentRoleState`
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
interface TCoreArgumentRoleState {
|
|
135
|
+
conclusionPremiseId?: string // UUID
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Supporting premises are derived dynamically (any inference premise that is not the conclusion). There is no `supportingPremiseIds` field.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## 5. Logical Operators
|
|
144
|
+
|
|
145
|
+
**Source:** `src/lib/schemata/propositional.ts`
|
|
146
|
+
|
|
147
|
+
### `TCoreLogicalOperatorType`
|
|
148
|
+
|
|
149
|
+
```typescript
|
|
150
|
+
type TCoreLogicalOperatorType = "not" | "and" | "or" | "implies" | "iff"
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Arity and placement rules:**
|
|
154
|
+
|
|
155
|
+
| Operator | Arity | Root-only? |
|
|
156
|
+
| --------- | --------------- | ---------- |
|
|
157
|
+
| `not` | unary (1 child) | No |
|
|
158
|
+
| `and` | variadic (2+) | No |
|
|
159
|
+
| `or` | variadic (2+) | No |
|
|
160
|
+
| `implies` | binary (2) | Yes |
|
|
161
|
+
| `iff` | binary (2) | Yes |
|
|
162
|
+
|
|
163
|
+
**Permitted `updateExpression` swaps:** `and` <-> `or`, `implies` <-> `iff`. `not` cannot be changed.
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## 6. Evaluation Types
|
|
168
|
+
|
|
169
|
+
**Source:** `src/lib/types/evaluation.ts`
|
|
170
|
+
|
|
171
|
+
### Core value types
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
type TCoreTrivalentValue = boolean | null // null = unknown/unset
|
|
175
|
+
type TCoreVariableAssignment = Record<string, TCoreTrivalentValue> // variable ID -> value
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### `TCoreExpressionAssignment`
|
|
179
|
+
|
|
180
|
+
Input to `evaluate()` methods.
|
|
181
|
+
|
|
182
|
+
```typescript
|
|
183
|
+
interface TCoreExpressionAssignment {
|
|
184
|
+
variables: TCoreVariableAssignment
|
|
185
|
+
rejectedExpressionIds: string[] // these evaluate to false, children skipped
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### `TCoreValidationResult` / `TCoreValidationIssue`
|
|
190
|
+
|
|
191
|
+
```typescript
|
|
192
|
+
interface TCoreValidationResult {
|
|
193
|
+
ok: boolean
|
|
194
|
+
issues: TCoreValidationIssue[]
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
interface TCoreValidationIssue {
|
|
198
|
+
code: TCoreValidationCode
|
|
199
|
+
severity: "error" | "warning"
|
|
200
|
+
message: string
|
|
201
|
+
premiseId?: string
|
|
202
|
+
expressionId?: string
|
|
203
|
+
variableId?: string
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### `TCoreValidationCode`
|
|
208
|
+
|
|
209
|
+
Machine-readable strings:
|
|
210
|
+
|
|
211
|
+
- `ARGUMENT_NO_CONCLUSION`, `ARGUMENT_CONCLUSION_NOT_FOUND`
|
|
212
|
+
- `ARGUMENT_VARIABLE_ID_SYMBOL_MISMATCH`, `ARGUMENT_VARIABLE_SYMBOL_AMBIGUOUS`
|
|
213
|
+
- `PREMISE_EMPTY`, `PREMISE_ROOT_MISSING`, `PREMISE_ROOT_MISMATCH`
|
|
214
|
+
- `EXPR_CHILD_COUNT_INVALID`, `EXPR_BINARY_POSITIONS_INVALID`, `EXPR_VARIABLE_UNDECLARED`
|
|
215
|
+
- `ASSIGNMENT_MISSING_VARIABLE`, `ASSIGNMENT_UNKNOWN_VARIABLE`
|
|
216
|
+
|
|
217
|
+
### `TCorePremiseEvaluationResult`
|
|
218
|
+
|
|
219
|
+
Returned per-premise by `ArgumentEngine.evaluate()`.
|
|
220
|
+
|
|
221
|
+
```typescript
|
|
222
|
+
interface TCorePremiseEvaluationResult {
|
|
223
|
+
premiseId: string
|
|
224
|
+
premiseType: "inference" | "constraint"
|
|
225
|
+
rootExpressionId?: string
|
|
226
|
+
rootValue?: TCoreTrivalentValue
|
|
227
|
+
expressionValues: Record<string, TCoreTrivalentValue>
|
|
228
|
+
variableValues: Record<string, TCoreTrivalentValue>
|
|
229
|
+
inferenceDiagnostic?: TCorePremiseInferenceDiagnostic
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### `TCorePremiseInferenceDiagnostic`
|
|
234
|
+
|
|
235
|
+
Discriminated union on `kind`:
|
|
236
|
+
|
|
237
|
+
- `kind: "implies"` -- has `leftValue`, `rightValue`, `rootValue`, `antecedentTrue`, `consequentTrue`, `isVacuouslyTrue`, `fired`, `firedAndHeld`
|
|
238
|
+
- `kind: "iff"` -- has `leftValue`, `rightValue`, `rootValue`, `leftToRight: TCoreDirectionalVacuity`, `rightToLeft: TCoreDirectionalVacuity`, `bothSidesTrue`, `bothSidesFalse`
|
|
239
|
+
|
|
240
|
+
Both variants include `premiseId` and `rootExpressionId`.
|
|
241
|
+
|
|
242
|
+
### `TCoreDirectionalVacuity`
|
|
243
|
+
|
|
244
|
+
```typescript
|
|
245
|
+
interface TCoreDirectionalVacuity {
|
|
246
|
+
antecedentTrue: TCoreTrivalentValue
|
|
247
|
+
consequentTrue: TCoreTrivalentValue
|
|
248
|
+
implicationValue: TCoreTrivalentValue
|
|
249
|
+
isVacuouslyTrue: TCoreTrivalentValue
|
|
250
|
+
fired: TCoreTrivalentValue
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### `TCoreArgumentEvaluationResult`
|
|
255
|
+
|
|
256
|
+
Top-level result from `ArgumentEngine.evaluate()`.
|
|
257
|
+
|
|
258
|
+
```typescript
|
|
259
|
+
interface TCoreArgumentEvaluationResult {
|
|
260
|
+
ok: boolean
|
|
261
|
+
validation?: TCoreValidationResult
|
|
262
|
+
assignment?: TCoreExpressionAssignment
|
|
263
|
+
referencedVariableIds?: string[]
|
|
264
|
+
conclusion?: TCorePremiseEvaluationResult
|
|
265
|
+
supportingPremises?: TCorePremiseEvaluationResult[]
|
|
266
|
+
constraintPremises?: TCorePremiseEvaluationResult[]
|
|
267
|
+
isAdmissibleAssignment?: TCoreTrivalentValue
|
|
268
|
+
allSupportingPremisesTrue?: TCoreTrivalentValue
|
|
269
|
+
conclusionTrue?: TCoreTrivalentValue
|
|
270
|
+
isCounterexample?: TCoreTrivalentValue
|
|
271
|
+
preservesTruthUnderAssignment?: TCoreTrivalentValue
|
|
272
|
+
}
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### `TCoreArgumentEvaluationOptions`
|
|
276
|
+
|
|
277
|
+
```typescript
|
|
278
|
+
interface TCoreArgumentEvaluationOptions {
|
|
279
|
+
strictUnknownAssignmentKeys?: boolean
|
|
280
|
+
includeExpressionValues?: boolean
|
|
281
|
+
includeDiagnostics?: boolean
|
|
282
|
+
validateFirst?: boolean
|
|
283
|
+
}
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### `TCoreValidityCheckResult`
|
|
287
|
+
|
|
288
|
+
Top-level result from `ArgumentEngine.checkValidity()`.
|
|
289
|
+
|
|
290
|
+
```typescript
|
|
291
|
+
interface TCoreValidityCheckResult {
|
|
292
|
+
ok: boolean
|
|
293
|
+
validation?: TCoreValidationResult
|
|
294
|
+
isValid?: boolean
|
|
295
|
+
checkedVariableIds?: string[]
|
|
296
|
+
numAssignmentsChecked?: number
|
|
297
|
+
numAdmissibleAssignments?: number
|
|
298
|
+
counterexamples?: TCoreCounterexample[]
|
|
299
|
+
truncated?: boolean
|
|
300
|
+
}
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### `TCoreCounterexample`
|
|
304
|
+
|
|
305
|
+
```typescript
|
|
306
|
+
interface TCoreCounterexample {
|
|
307
|
+
assignment: TCoreExpressionAssignment
|
|
308
|
+
result: TCoreArgumentEvaluationResult
|
|
309
|
+
}
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### `TCoreValidityCheckOptions`
|
|
313
|
+
|
|
314
|
+
```typescript
|
|
315
|
+
interface TCoreValidityCheckOptions {
|
|
316
|
+
mode?: "firstCounterexample" | "exhaustive"
|
|
317
|
+
maxVariables?: number
|
|
318
|
+
maxAssignmentsChecked?: number
|
|
319
|
+
includeCounterexampleEvaluations?: boolean
|
|
320
|
+
validateFirst?: boolean
|
|
321
|
+
}
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### `TCoreArgumentEngineData`
|
|
325
|
+
|
|
326
|
+
Returned by `ArgumentEngine.toData()`.
|
|
327
|
+
|
|
328
|
+
```typescript
|
|
329
|
+
interface TCoreArgumentEngineData {
|
|
330
|
+
argument: TCoreArgument
|
|
331
|
+
premises: TCorePremise[]
|
|
332
|
+
roles: TCoreArgumentRoleState
|
|
333
|
+
}
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## 7. Mutation Types
|
|
339
|
+
|
|
340
|
+
**Source:** `src/lib/types/mutation.ts`
|
|
341
|
+
|
|
342
|
+
### `TCoreMutationResult<T>`
|
|
343
|
+
|
|
344
|
+
Wrapper returned by all mutating methods on `PremiseManager` and `ArgumentEngine`.
|
|
345
|
+
|
|
346
|
+
```typescript
|
|
347
|
+
interface TCoreMutationResult<T> {
|
|
348
|
+
result: T // direct answer (e.g. the removed expression)
|
|
349
|
+
changes: TCoreChangeset // all side effects
|
|
350
|
+
}
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
### `TCoreChangeset`
|
|
354
|
+
|
|
355
|
+
Only affected categories are present.
|
|
356
|
+
|
|
357
|
+
```typescript
|
|
358
|
+
interface TCoreChangeset {
|
|
359
|
+
expressions?: TCoreEntityChanges<TCorePropositionalExpression>
|
|
360
|
+
variables?: TCoreEntityChanges<TCorePropositionalVariable>
|
|
361
|
+
premises?: TCoreEntityChanges<TCorePremise>
|
|
362
|
+
roles?: TCoreArgumentRoleState // new role state (present only when roles changed)
|
|
363
|
+
argument?: TCoreArgument // new argument (present only when argument changed)
|
|
364
|
+
}
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
### `TCoreEntityChanges<T>`
|
|
368
|
+
|
|
369
|
+
```typescript
|
|
370
|
+
interface TCoreEntityChanges<T> {
|
|
371
|
+
added: T[]
|
|
372
|
+
modified: T[]
|
|
373
|
+
removed: T[]
|
|
374
|
+
}
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
### `TCoreRawChangeset` (internal)
|
|
378
|
+
|
|
379
|
+
Same shape as `TCoreChangeset` but uses `TExpressionInput` and `TVariableInput` (no checksums). Used internally by `ChangeCollector`; converted to `TCoreChangeset` via `attachChangesetChecksums()` before returning to callers.
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
## 8. Diff Types
|
|
384
|
+
|
|
385
|
+
**Source:** `src/lib/types/diff.ts`
|
|
386
|
+
|
|
387
|
+
### `TCoreArgumentDiff`
|
|
388
|
+
|
|
389
|
+
Top-level result from `diffArguments(engineA, engineB, options?)`.
|
|
390
|
+
|
|
391
|
+
```typescript
|
|
392
|
+
interface TCoreArgumentDiff {
|
|
393
|
+
argument: TCoreEntityFieldDiff<TCoreArgument>
|
|
394
|
+
variables: TCoreEntitySetDiff<TCorePropositionalVariable>
|
|
395
|
+
premises: TCorePremiseSetDiff
|
|
396
|
+
roles: TCoreRoleDiff
|
|
397
|
+
}
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
### `TCoreFieldChange`
|
|
401
|
+
|
|
402
|
+
```typescript
|
|
403
|
+
interface TCoreFieldChange {
|
|
404
|
+
field: string
|
|
405
|
+
before: unknown
|
|
406
|
+
after: unknown
|
|
407
|
+
}
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
### `TCoreEntityFieldDiff<T>`
|
|
411
|
+
|
|
412
|
+
Field-level diff for a single matched entity.
|
|
413
|
+
|
|
414
|
+
```typescript
|
|
415
|
+
interface TCoreEntityFieldDiff<T> {
|
|
416
|
+
before: T
|
|
417
|
+
after: T
|
|
418
|
+
changes: TCoreFieldChange[]
|
|
419
|
+
}
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
### `TCoreEntitySetDiff<T>`
|
|
423
|
+
|
|
424
|
+
Set-level diff for a collection of ID-keyed entities.
|
|
425
|
+
|
|
426
|
+
```typescript
|
|
427
|
+
interface TCoreEntitySetDiff<T extends { id: string }> {
|
|
428
|
+
added: T[]
|
|
429
|
+
removed: T[]
|
|
430
|
+
modified: TCoreEntityFieldDiff<T>[]
|
|
431
|
+
}
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
### `TCorePremiseDiff`
|
|
435
|
+
|
|
436
|
+
Extends `TCoreEntityFieldDiff<TCorePremise>` with nested expression diffs.
|
|
437
|
+
|
|
438
|
+
```typescript
|
|
439
|
+
interface TCorePremiseDiff extends TCoreEntityFieldDiff<TCorePremise> {
|
|
440
|
+
expressions: TCoreEntitySetDiff<TCorePropositionalExpression>
|
|
441
|
+
}
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
### `TCorePremiseSetDiff`
|
|
445
|
+
|
|
446
|
+
```typescript
|
|
447
|
+
interface TCorePremiseSetDiff {
|
|
448
|
+
added: TCorePremise[]
|
|
449
|
+
removed: TCorePremise[]
|
|
450
|
+
modified: TCorePremiseDiff[]
|
|
451
|
+
}
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
### `TCoreRoleDiff`
|
|
455
|
+
|
|
456
|
+
```typescript
|
|
457
|
+
interface TCoreRoleDiff {
|
|
458
|
+
conclusion: { before: string | undefined; after: string | undefined }
|
|
459
|
+
}
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
### `TCoreFieldComparator<T>`
|
|
463
|
+
|
|
464
|
+
```typescript
|
|
465
|
+
type TCoreFieldComparator<T> = (before: T, after: T) => TCoreFieldChange[]
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
### `TCoreDiffOptions`
|
|
469
|
+
|
|
470
|
+
Per-entity comparator overrides for `diffArguments`.
|
|
471
|
+
|
|
472
|
+
```typescript
|
|
473
|
+
interface TCoreDiffOptions {
|
|
474
|
+
compareArgument?: TCoreFieldComparator<TCoreArgument>
|
|
475
|
+
compareVariable?: TCoreFieldComparator<TCorePropositionalVariable>
|
|
476
|
+
comparePremise?: TCoreFieldComparator<TCorePremise>
|
|
477
|
+
compareExpression?: TCoreFieldComparator<TCorePropositionalExpression>
|
|
478
|
+
}
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
---
|
|
482
|
+
|
|
483
|
+
## 9. Relationship Types
|
|
484
|
+
|
|
485
|
+
**Source:** `src/lib/types/relationships.ts`
|
|
486
|
+
|
|
487
|
+
### `TCoreVariableAppearance`
|
|
488
|
+
|
|
489
|
+
```typescript
|
|
490
|
+
interface TCoreVariableAppearance {
|
|
491
|
+
variableId: string
|
|
492
|
+
side: "antecedent" | "consequent" // TCorePremiseSide
|
|
493
|
+
polarity: "positive" | "negative" // TCoreVariablePolarity
|
|
494
|
+
}
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
### `TCorePremiseProfile`
|
|
498
|
+
|
|
499
|
+
Returned by `buildPremiseProfile()`.
|
|
500
|
+
|
|
501
|
+
```typescript
|
|
502
|
+
interface TCorePremiseProfile {
|
|
503
|
+
premiseId: string
|
|
504
|
+
isInference: boolean
|
|
505
|
+
appearances: TCoreVariableAppearance[]
|
|
506
|
+
}
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
### `TCorePremiseRelationshipType`
|
|
510
|
+
|
|
511
|
+
```typescript
|
|
512
|
+
type TCorePremiseRelationshipType =
|
|
513
|
+
| "supporting"
|
|
514
|
+
| "contradicting"
|
|
515
|
+
| "restricting"
|
|
516
|
+
| "downstream"
|
|
517
|
+
| "unrelated"
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
### `TCoreVariableRelationship`
|
|
521
|
+
|
|
522
|
+
```typescript
|
|
523
|
+
interface TCoreVariableRelationship {
|
|
524
|
+
variableId: string
|
|
525
|
+
relationship: "supporting" | "contradicting" | "restricting"
|
|
526
|
+
}
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
### `TCorePremiseRelationResult`
|
|
530
|
+
|
|
531
|
+
```typescript
|
|
532
|
+
interface TCorePremiseRelationResult {
|
|
533
|
+
premiseId: string
|
|
534
|
+
relationship: TCorePremiseRelationshipType
|
|
535
|
+
variableDetails: TCoreVariableRelationship[]
|
|
536
|
+
transitive: boolean
|
|
537
|
+
}
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
### `TCorePremiseRelationshipAnalysis`
|
|
541
|
+
|
|
542
|
+
Top-level result from `analyzePremiseRelationships()`.
|
|
543
|
+
|
|
544
|
+
```typescript
|
|
545
|
+
interface TCorePremiseRelationshipAnalysis {
|
|
546
|
+
focusedPremiseId: string
|
|
547
|
+
premises: TCorePremiseRelationResult[]
|
|
548
|
+
}
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
---
|
|
552
|
+
|
|
553
|
+
## 10. Checksum Types
|
|
554
|
+
|
|
555
|
+
**Source:** `src/lib/types/checksum.ts`, `src/lib/consts.ts`
|
|
556
|
+
|
|
557
|
+
### `TCoreChecksumConfig`
|
|
558
|
+
|
|
559
|
+
```typescript
|
|
560
|
+
interface TCoreChecksumConfig {
|
|
561
|
+
expressionFields?: Set<string>
|
|
562
|
+
variableFields?: Set<string>
|
|
563
|
+
premiseFields?: Set<string>
|
|
564
|
+
argumentFields?: Set<string>
|
|
565
|
+
roleFields?: Set<string>
|
|
566
|
+
}
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
### `DEFAULT_CHECKSUM_CONFIG`
|
|
570
|
+
|
|
571
|
+
```typescript
|
|
572
|
+
{
|
|
573
|
+
expressionFields: Set(["id", "type", "parentId", "position", "argumentId", "argumentVersion", "variableId", "operator"]),
|
|
574
|
+
variableFields: Set(["id", "symbol", "argumentId", "argumentVersion"]),
|
|
575
|
+
premiseFields: Set(["id", "rootExpressionId"]),
|
|
576
|
+
argumentFields: Set(["id", "version"]),
|
|
577
|
+
roleFields: Set(["conclusionPremiseId"]),
|
|
578
|
+
}
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
### `createChecksumConfig(additional)`
|
|
582
|
+
|
|
583
|
+
Merges additional fields into defaults (union, not replace). Pass to `ArgumentEngine` constructor via `options.checksumConfig`.
|
|
584
|
+
|
|
585
|
+
---
|
|
586
|
+
|
|
587
|
+
## 11. Analysis File Type
|
|
588
|
+
|
|
589
|
+
**Source:** `src/lib/schemata/analysis.ts`
|
|
590
|
+
|
|
591
|
+
### `TCoreAnalysisFile`
|
|
592
|
+
|
|
593
|
+
```typescript
|
|
594
|
+
interface TCoreAnalysisFile {
|
|
595
|
+
argumentId: string
|
|
596
|
+
argumentVersion: number
|
|
597
|
+
assignments: Record<string, boolean | null> // variable symbol -> value
|
|
598
|
+
rejectedExpressionIds: string[]
|
|
599
|
+
}
|
|
600
|
+
```
|
|
601
|
+
|
|
602
|
+
Used by CLI analysis commands. Not directly used by the library API.
|
|
603
|
+
|
|
604
|
+
---
|
|
605
|
+
|
|
606
|
+
## 12. Formula Parser Types
|
|
607
|
+
|
|
608
|
+
**Source:** `src/lib/core/parser/formula.ts`
|
|
609
|
+
|
|
610
|
+
### `FormulaAST`
|
|
611
|
+
|
|
612
|
+
Returned by `parseFormula(input)`.
|
|
613
|
+
|
|
614
|
+
```typescript
|
|
615
|
+
type FormulaAST =
|
|
616
|
+
| { type: "variable"; name: string }
|
|
617
|
+
| { type: "not"; operand: FormulaAST }
|
|
618
|
+
| { type: "and"; operands: FormulaAST[] }
|
|
619
|
+
| { type: "or"; operands: FormulaAST[] }
|
|
620
|
+
| { type: "implies"; left: FormulaAST; right: FormulaAST }
|
|
621
|
+
| { type: "iff"; left: FormulaAST; right: FormulaAST }
|
|
622
|
+
```
|
|
623
|
+
|
|
624
|
+
---
|
|
625
|
+
|
|
626
|
+
## 13. Position Constants
|
|
627
|
+
|
|
628
|
+
**Source:** `src/lib/utils/position.ts`
|
|
629
|
+
|
|
630
|
+
```typescript
|
|
631
|
+
const POSITION_MIN = 0
|
|
632
|
+
const POSITION_MAX = Number.MAX_SAFE_INTEGER // 9007199254740991
|
|
633
|
+
const POSITION_INITIAL = Math.floor(POSITION_MAX / 2) // 4503599627370495
|
|
634
|
+
function midpoint(a: number, b: number): number // a + (b - a) / 2
|
|
635
|
+
```
|
|
636
|
+
|
|
637
|
+
Used internally for sibling ordering. Callers typically use `appendExpression` or `addExpressionRelative` rather than computing positions directly.
|
|
638
|
+
|
|
639
|
+
---
|
|
640
|
+
|
|
641
|
+
## 14. Schema System Notes
|
|
642
|
+
|
|
643
|
+
- **Typebox-based.** Schemas defined with `Type.*` from `@sinclair/typebox`. Types extracted via `Static<typeof Schema>`.
|
|
644
|
+
- **Validation:** `Value.Parse(Schema, raw)` from `@sinclair/typebox/value` throws on invalid data. `Value.Check` returns `boolean`.
|
|
645
|
+
- **`additionalProperties: true`** on `CorePropositionalVariableSchema`, `CorePremiseSchema`, and `CoreArgumentSchema`. Extra fields survive round-trips through `Value.Parse`.
|
|
646
|
+
- **Expression schemas** use `Type.Interface` (intersection-like) to extend the base schema. They do not set `additionalProperties`.
|
|
647
|
+
- **`Nullable(T)`** helper produces `Type.Union([T, Type.Null()])` with `default: null`.
|
|
648
|
+
- **`UUID`** is `Type.String()` (no format enforcement at the schema level).
|