domainforge 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cargo/config.toml +6 -0
- package/.claude/settings.local.json +18 -0
- package/.coderabbit.yml +43 -0
- package/.codex/skills/release-management/SKILL.md +151 -0
- package/.codex/skills/release-management/agents/openai.yaml +4 -0
- package/.github/actions/decrypt-secrets/action.yml +121 -0
- package/.github/agents/Coder.agent.md +97 -0
- package/.github/agents/DeepResearch.agent.md +61 -0
- package/.github/chatmodes/tdd.vibepro.chatmode.md +1183 -0
- package/.github/copilot-instructions.md +13 -0
- package/.github/dependabot.yml +68 -0
- package/.github/workflows/README.md +165 -0
- package/.github/workflows/ci.yml +335 -0
- package/.github/workflows/dependabot-automerge.yml +114 -0
- package/.github/workflows/dependency-review.yml +27 -0
- package/.github/workflows/deploy.yml +87 -0
- package/.github/workflows/prepare-release.yml +168 -0
- package/.github/workflows/release-crates.yml +42 -0
- package/.github/workflows/release-npm.yml +137 -0
- package/.github/workflows/release-please.yml +29 -0
- package/.github/workflows/release-pypi.yml +96 -0
- package/.gitkeep +1 -0
- package/.release-please-manifest.json +5 -0
- package/.sea-registry.toml +10 -0
- package/.serena/project.yml +133 -0
- package/.sops.yaml +10 -0
- package/AGENTS.md +216 -0
- package/CHANGELOG.md +400 -0
- package/CLAUDE.md +62 -0
- package/CONTRIBUTING.md +323 -0
- package/Cargo.lock +3612 -0
- package/Cargo.toml +12 -0
- package/LICENSE +201 -0
- package/README.md +660 -0
- package/README_PYTHON.md +256 -0
- package/README_TYPESCRIPT.md +305 -0
- package/README_WASM.md +329 -0
- package/RELEASE_NOTES.md +41 -0
- package/bun.lock +378 -0
- package/bunfig.toml +11 -0
- package/check_output.txt +83 -0
- package/clippy_output.txt +80 -0
- package/commitlint.config.cjs +8 -0
- package/deny.toml +42 -0
- package/devbox.json +14 -0
- package/devbox.lock +76 -0
- package/docs/RELEASE_PROCESS.md +360 -0
- package/docs/diagnostics.md +161 -0
- package/docs/doc_guidelines.md +53 -0
- package/docs/explanations/README.md +21 -0
- package/docs/explanations/architecture-overview.md +109 -0
- package/docs/explanations/cross-language-binding-strategy.md +68 -0
- package/docs/explanations/graph-store-design.md +47 -0
- package/docs/explanations/performance-benchmarks.md +63 -0
- package/docs/explanations/policy-evaluation-logic.md +106 -0
- package/docs/explanations/semantic-modeling-concepts.md +109 -0
- package/docs/explanations/three-valued-logic.md +66 -0
- package/docs/explanations/versioning-strategy.md +45 -0
- package/docs/governance.md +168 -0
- package/docs/how-tos/README.md +46 -0
- package/docs/how-tos/ci-cd-validation.md +93 -0
- package/docs/how-tos/create-custom-units.md +125 -0
- package/docs/how-tos/define-policies.md +119 -0
- package/docs/how-tos/export-to-calm.md +110 -0
- package/docs/how-tos/export-to-protobuf.md +312 -0
- package/docs/how-tos/extend-grammar.md +133 -0
- package/docs/how-tos/generate-rdf-turtle.md +106 -0
- package/docs/how-tos/import-from-calm.md +114 -0
- package/docs/how-tos/import-from-sbvr.md +249 -0
- package/docs/how-tos/install-cli.md +126 -0
- package/docs/how-tos/parse-sea-files.md +132 -0
- package/docs/how-tos/policy-evaluation-modes.md +30 -0
- package/docs/how-tos/run-cross-language-tests.md +115 -0
- package/docs/how-tos/troubleshoot-napi-builds.md +55 -0
- package/docs/how-tos/use-modules-imports.md +285 -0
- package/docs/index.md +13 -0
- package/docs/plans/canonical-normalizer.md +121 -0
- package/docs/plans/cd_improvement.md +112 -0
- package/docs/plans/cli-ast.md +29 -0
- package/docs/plans/expression-bindings-and-normalizer-integration.md +174 -0
- package/docs/plans/protobuf_advanced_features_plan.md +597 -0
- package/docs/plans/protobuf_plan.yml +525 -0
- package/docs/plans/refactor_dsl_architecture.md +131 -0
- package/docs/plans/release-plan.md +163 -0
- package/docs/plans/sea_fmt_implementation_plan.md +516 -0
- package/docs/playbooks/README.md +18 -0
- package/docs/playbooks/adding-new-primitive.md +68 -0
- package/docs/playbooks/debugging-parser-failures.md +42 -0
- package/docs/playbooks/local-release-preparation.md +139 -0
- package/docs/playbooks/migrating-schema-versions.md +43 -0
- package/docs/playbooks/onboarding-contributors.md +64 -0
- package/docs/playbooks/releasing-beta.md +86 -0
- package/docs/playbooks/secret-management.md +64 -0
- package/docs/reference/README.md +199 -0
- package/docs/reference/ast-json-api.md +427 -0
- package/docs/reference/calm-mapping.md +519 -0
- package/docs/reference/cli-commands.md +588 -0
- package/docs/reference/configuration.md +202 -0
- package/docs/reference/error-codes.md +664 -0
- package/docs/reference/generated-artifacts-policy.md +53 -0
- package/docs/reference/grammar-spec.md +255 -0
- package/docs/reference/primitives-api.md +317 -0
- package/docs/reference/protobuf-api.md +426 -0
- package/docs/reference/python-api.md +485 -0
- package/docs/reference/registry.md +50 -0
- package/docs/reference/sea-dsl-ai-cheatsheet.yaml +913 -0
- package/docs/reference/security-model.md +74 -0
- package/docs/reference/typescript-api.md +508 -0
- package/docs/reference/wasm-api.md +420 -0
- package/docs/semantic-pack-review.md +144 -0
- package/docs/semantic-pack-signing.md +234 -0
- package/docs/semantic-packs.md +284 -0
- package/docs/specs/ADR-001-sea-dsl-semantic-source-of-truth.md +33 -0
- package/docs/specs/ADR-002-projection-first-class-construct.md +50 -0
- package/docs/specs/ADR-003-protobuf-projection-target.md +51 -0
- package/docs/specs/ADR-004-projection-compatibility-semantics.md +57 -0
- package/docs/specs/ADR-005-multi-language-support-strategy.md +112 -0
- package/docs/specs/ADR-006-error-handling-strategy.md +115 -0
- package/docs/specs/ADR-007-policy-evaluation-engine.md +95 -0
- package/docs/specs/ADR-008-knowledge-graph-integration.md +90 -0
- package/docs/specs/ADR-009-module-resolution-strategy.md +115 -0
- package/docs/specs/ADR-010-unit-system.md +106 -0
- package/docs/specs/PRD-001-sea-projection-framework.md +155 -0
- package/docs/specs/PRD-002-sea-cli-tooling.md +169 -0
- package/docs/specs/PRD-003-dsl-core-capabilities.md +275 -0
- package/docs/specs/README.md +62 -0
- package/docs/specs/SDS-001-protobuf-projection-engine.md +451 -0
- package/docs/specs/SDS-002-sea-core-architecture.md +268 -0
- package/docs/specs/SDS-003-parser-semantic-graph.md +377 -0
- package/docs/specs/SDS-004-policy-engine-design.md +362 -0
- package/docs/specs/SDS-005-knowledge-graph-module.md +364 -0
- package/docs/specs/SDS-006-calm-integration.md +367 -0
- package/docs/specs/SDS-007-sbvr-import.md +347 -0
- package/docs/templates/template_explanation.md +14 -0
- package/docs/templates/template_howto.md +21 -0
- package/docs/templates/template_playbook.md +21 -0
- package/docs/templates/template_reference.md +17 -0
- package/docs/templates/template_tutorial.md +24 -0
- package/docs/tutorials/README.md +12 -0
- package/docs/tutorials/first-sea-model.md +85 -0
- package/docs/tutorials/getting-started.md +98 -0
- package/docs/tutorials/python-binding-quickstart.md +107 -0
- package/docs/tutorials/typescript-binding-quickstart.md +91 -0
- package/docs/tutorials/wasm-in-browser.md +75 -0
- package/domainforge-core/CHANGELOG.md +138 -0
- package/domainforge-core/Cargo.toml +101 -0
- package/domainforge-core/MIGRATING.md +32 -0
- package/domainforge-core/README.md +197 -0
- package/domainforge-core/benchmark_results.txt +51 -0
- package/domainforge-core/build.rs +6 -0
- package/domainforge-core/deny.toml +31 -0
- package/domainforge-core/docs/specs/projections/sbvr_kg_mapping.md +43 -0
- package/domainforge-core/examples/basic.sea +7 -0
- package/domainforge-core/examples/cli/import_export_workflow.sh +38 -0
- package/domainforge-core/examples/cli/validate_example.sh +30 -0
- package/domainforge-core/examples/evolution_semantics.sea +31 -0
- package/domainforge-core/examples/parser_demo.rs +203 -0
- package/domainforge-core/grammar/sea.pest +408 -0
- package/domainforge-core/schemas/calm-v1.schema.json +170 -0
- package/domainforge-core/schemas/shacl/sea_shapes.ttl +19 -0
- package/domainforge-core/src/authority/compiler.rs +309 -0
- package/domainforge-core/src/authority/environment.rs +203 -0
- package/domainforge-core/src/authority/error.rs +164 -0
- package/domainforge-core/src/authority/fact_resolver.rs +224 -0
- package/domainforge-core/src/authority/mod.rs +25 -0
- package/domainforge-core/src/authority/pack.rs +133 -0
- package/domainforge-core/src/authority/policy.rs +224 -0
- package/domainforge-core/src/authority/resolver.rs +446 -0
- package/domainforge-core/src/authority/trace.rs +217 -0
- package/domainforge-core/src/authority/transform.rs +168 -0
- package/domainforge-core/src/authority/types.rs +617 -0
- package/domainforge-core/src/bin/domainforge.rs +25 -0
- package/domainforge-core/src/calm/export.rs +538 -0
- package/domainforge-core/src/calm/import.rs +1220 -0
- package/domainforge-core/src/calm/mod.rs +9 -0
- package/domainforge-core/src/calm/models.rs +108 -0
- package/domainforge-core/src/calm/sbvr_import.rs +9 -0
- package/domainforge-core/src/cli/authority.rs +149 -0
- package/domainforge-core/src/cli/format.rs +85 -0
- package/domainforge-core/src/cli/import.rs +133 -0
- package/domainforge-core/src/cli/mod.rs +64 -0
- package/domainforge-core/src/cli/normalize.rs +180 -0
- package/domainforge-core/src/cli/pack.rs +904 -0
- package/domainforge-core/src/cli/parse.rs +112 -0
- package/domainforge-core/src/cli/project.rs +294 -0
- package/domainforge-core/src/cli/registry.rs +41 -0
- package/domainforge-core/src/cli/test.rs +12 -0
- package/domainforge-core/src/cli/validate.rs +195 -0
- package/domainforge-core/src/cli/validate_kg.rs +80 -0
- package/domainforge-core/src/concept_id.rs +89 -0
- package/domainforge-core/src/error/diagnostics.rs +426 -0
- package/domainforge-core/src/error/fuzzy.rs +253 -0
- package/domainforge-core/src/error/mod.rs +13 -0
- package/domainforge-core/src/formatter/comments.rs +223 -0
- package/domainforge-core/src/formatter/config.rs +114 -0
- package/domainforge-core/src/formatter/mod.rs +22 -0
- package/domainforge-core/src/formatter/printer.rs +906 -0
- package/domainforge-core/src/graph/mod.rs +858 -0
- package/domainforge-core/src/graph/to_ast.rs +66 -0
- package/domainforge-core/src/kg.rs +1476 -0
- package/domainforge-core/src/kg_import.rs +251 -0
- package/domainforge-core/src/lib.rs +203 -0
- package/domainforge-core/src/module/mod.rs +1 -0
- package/domainforge-core/src/module/resolver.rs +260 -0
- package/domainforge-core/src/parser/ast.rs +2919 -0
- package/domainforge-core/src/parser/ast_convert.rs +494 -0
- package/domainforge-core/src/parser/ast_schema.rs +491 -0
- package/domainforge-core/src/parser/error.rs +291 -0
- package/domainforge-core/src/parser/lint.rs +39 -0
- package/domainforge-core/src/parser/mod.rs +193 -0
- package/domainforge-core/src/parser/printer.rs +702 -0
- package/domainforge-core/src/parser/profiles.rs +71 -0
- package/domainforge-core/src/parser/string_utils.rs +138 -0
- package/domainforge-core/src/patterns.rs +68 -0
- package/domainforge-core/src/policy/core.rs +1148 -0
- package/domainforge-core/src/policy/expression.rs +399 -0
- package/domainforge-core/src/policy/mod.rs +18 -0
- package/domainforge-core/src/policy/normalize.rs +1028 -0
- package/domainforge-core/src/policy/quantifier.rs +940 -0
- package/domainforge-core/src/policy/three_valued.rs +140 -0
- package/domainforge-core/src/policy/three_valued_microbench.rs +104 -0
- package/domainforge-core/src/policy/type_inference.rs +67 -0
- package/domainforge-core/src/policy/violation.rs +36 -0
- package/domainforge-core/src/primitives/concept_change.rs +61 -0
- package/domainforge-core/src/primitives/entity.rs +224 -0
- package/domainforge-core/src/primitives/flow.rs +111 -0
- package/domainforge-core/src/primitives/instance.rs +93 -0
- package/domainforge-core/src/primitives/mapping_contract.rs +50 -0
- package/domainforge-core/src/primitives/metric.rs +79 -0
- package/domainforge-core/src/primitives/mod.rs +25 -0
- package/domainforge-core/src/primitives/projection_contract.rs +50 -0
- package/domainforge-core/src/primitives/quantity.rs +56 -0
- package/domainforge-core/src/primitives/relation.rs +68 -0
- package/domainforge-core/src/primitives/resource.rs +237 -0
- package/domainforge-core/src/primitives/resource_instance.rs +88 -0
- package/domainforge-core/src/primitives/role.rs +49 -0
- package/domainforge-core/src/projection/buf.rs +404 -0
- package/domainforge-core/src/projection/contracts.rs +22 -0
- package/domainforge-core/src/projection/engine.rs +19 -0
- package/domainforge-core/src/projection/mod.rs +16 -0
- package/domainforge-core/src/projection/protobuf.rs +3331 -0
- package/domainforge-core/src/projection/registry.rs +43 -0
- package/domainforge-core/src/python/authority.rs +253 -0
- package/domainforge-core/src/python/error.rs +227 -0
- package/domainforge-core/src/python/formatter.rs +86 -0
- package/domainforge-core/src/python/graph.rs +366 -0
- package/domainforge-core/src/python/mod.rs +9 -0
- package/domainforge-core/src/python/policy.rs +651 -0
- package/domainforge-core/src/python/primitives.rs +796 -0
- package/domainforge-core/src/python/registry.rs +98 -0
- package/domainforge-core/src/python/semantic_pack.rs +619 -0
- package/domainforge-core/src/python/units.rs +96 -0
- package/domainforge-core/src/registry/mod.rs +432 -0
- package/domainforge-core/src/registry/tests.rs +210 -0
- package/domainforge-core/src/sbvr.rs +744 -0
- package/domainforge-core/src/semantic_pack/builder.rs +470 -0
- package/domainforge-core/src/semantic_pack/canonical_json.rs +184 -0
- package/domainforge-core/src/semantic_pack/diagnostics.rs +214 -0
- package/domainforge-core/src/semantic_pack/diff.rs +216 -0
- package/domainforge-core/src/semantic_pack/mod.rs +31 -0
- package/domainforge-core/src/semantic_pack/pack_set.rs +240 -0
- package/domainforge-core/src/semantic_pack/resolver.rs +437 -0
- package/domainforge-core/src/semantic_pack/review.rs +125 -0
- package/domainforge-core/src/semantic_pack/schema.rs +342 -0
- package/domainforge-core/src/semantic_pack/signing.rs +105 -0
- package/domainforge-core/src/semantic_pack/validator.rs +368 -0
- package/domainforge-core/src/semantic_version.rs +140 -0
- package/domainforge-core/src/test_utils.rs +12 -0
- package/domainforge-core/src/typescript/authority.rs +184 -0
- package/domainforge-core/src/typescript/error.rs +146 -0
- package/domainforge-core/src/typescript/formatter.rs +76 -0
- package/domainforge-core/src/typescript/graph.rs +391 -0
- package/domainforge-core/src/typescript/mod.rs +9 -0
- package/domainforge-core/src/typescript/policy.rs +564 -0
- package/domainforge-core/src/typescript/primitives.rs +784 -0
- package/domainforge-core/src/typescript/registry.rs +88 -0
- package/domainforge-core/src/typescript/semantic_pack.rs +470 -0
- package/domainforge-core/src/typescript/units.rs +76 -0
- package/domainforge-core/src/units/mod.rs +462 -0
- package/domainforge-core/src/uuid_module.rs +42 -0
- package/domainforge-core/src/validation_error.rs +818 -0
- package/domainforge-core/src/validation_result.rs +30 -0
- package/domainforge-core/src/wasm/authority.rs +192 -0
- package/domainforge-core/src/wasm/error.rs +145 -0
- package/domainforge-core/src/wasm/formatter.rs +69 -0
- package/domainforge-core/src/wasm/graph.rs +471 -0
- package/domainforge-core/src/wasm/mod.rs +16 -0
- package/domainforge-core/src/wasm/policy.rs +607 -0
- package/domainforge-core/src/wasm/primitives.rs +295 -0
- package/domainforge-core/src/wasm/semantic_pack.rs +471 -0
- package/domainforge-core/src/wasm/units.rs +62 -0
- package/domainforge-core/std/aws.sea +6 -0
- package/domainforge-core/std/core.sea +6 -0
- package/domainforge-core/std/http.sea +27 -0
- package/domainforge-core/tests/aggregation_enhanced_tests.rs +162 -0
- package/domainforge-core/tests/aggregation_eval_tests.rs +248 -0
- package/domainforge-core/tests/aggregation_integration_tests.rs +379 -0
- package/domainforge-core/tests/aggregation_parser_tests.rs +92 -0
- package/domainforge-core/tests/aggregation_tests.rs +102 -0
- package/domainforge-core/tests/authority_conformance_tests.rs +1173 -0
- package/domainforge-core/tests/calm_round_trip_tests.rs +283 -0
- package/domainforge-core/tests/calm_schema_validation_tests.rs +137 -0
- package/domainforge-core/tests/cast_operator_tests.rs +85 -0
- package/domainforge-core/tests/cli_binary_check.rs +37 -0
- package/domainforge-core/tests/cli_import_tests.rs +291 -0
- package/domainforge-core/tests/cli_path_traversal_tests.rs +124 -0
- package/domainforge-core/tests/cli_tests.rs +63 -0
- package/domainforge-core/tests/diagnostics_tests.rs +203 -0
- package/domainforge-core/tests/dimension_unit_tests.rs +80 -0
- package/domainforge-core/tests/entity_tests.rs +69 -0
- package/domainforge-core/tests/evolution_semantics_tests.rs +157 -0
- package/domainforge-core/tests/flow_tests.rs +78 -0
- package/domainforge-core/tests/flow_unit_validation_tests.rs +31 -0
- package/domainforge-core/tests/graph_integration_tests.rs +218 -0
- package/domainforge-core/tests/graph_tests.rs +626 -0
- package/domainforge-core/tests/import_parsing_tests.rs +23 -0
- package/domainforge-core/tests/instance_integration_tests.rs +98 -0
- package/domainforge-core/tests/instance_parsing_tests.rs +58 -0
- package/domainforge-core/tests/instance_tests.rs +61 -0
- package/domainforge-core/tests/kg_uri_encoding_tests.rs +53 -0
- package/domainforge-core/tests/lint_tests.rs +19 -0
- package/domainforge-core/tests/metric_tests.rs +143 -0
- package/domainforge-core/tests/module_resolution_tests.rs +100 -0
- package/domainforge-core/tests/namespace_registry_tests.rs +247 -0
- package/domainforge-core/tests/null_handling_tests.rs +26 -0
- package/domainforge-core/tests/parser_ast_v3.rs +53 -0
- package/domainforge-core/tests/parser_dimension_registry_tests.rs +20 -0
- package/domainforge-core/tests/parser_integration_tests.rs +294 -0
- package/domainforge-core/tests/parser_metadata_tests.rs +97 -0
- package/domainforge-core/tests/parser_resource_domain_only_graph_test.rs +21 -0
- package/domainforge-core/tests/parser_resource_limits_tests.rs +122 -0
- package/domainforge-core/tests/parser_tests.rs +512 -0
- package/domainforge-core/tests/pattern_semantics_tests.rs +87 -0
- package/domainforge-core/tests/phase_14_determinism_tests.rs +166 -0
- package/domainforge-core/tests/phase_15_validation_error_tests.rs +136 -0
- package/domainforge-core/tests/phase_16_unicode_tests.rs +248 -0
- package/domainforge-core/tests/phase_17_export_tests.rs +285 -0
- package/domainforge-core/tests/phase_17_round_trip_tests.rs +264 -0
- package/domainforge-core/tests/policy_tests.rs +635 -0
- package/domainforge-core/tests/primitives_integration_tests.rs +151 -0
- package/domainforge-core/tests/print_rdf_xml.rs +14 -0
- package/domainforge-core/tests/printer_tests.rs +204 -0
- package/domainforge-core/tests/profile_tests.rs +35 -0
- package/domainforge-core/tests/projection_contracts_tests.rs +154 -0
- package/domainforge-core/tests/protobuf_projection_tests.rs +199 -0
- package/domainforge-core/tests/quantity_tests.rs +41 -0
- package/domainforge-core/tests/rdf_xml_typed_literal_tests.rs +105 -0
- package/domainforge-core/tests/registry_schema_tests.rs +33 -0
- package/domainforge-core/tests/resource_tests.rs +50 -0
- package/domainforge-core/tests/resource_unit_tests.rs +24 -0
- package/domainforge-core/tests/roles_relations_tests.rs +61 -0
- package/domainforge-core/tests/round_trip_tests.rs +34 -0
- package/domainforge-core/tests/runtime_toggle_tests.rs +70 -0
- package/domainforge-core/tests/sbvr_fact_schema_tests.rs +60 -0
- package/domainforge-core/tests/sbvr_flow_facts_tests.rs +55 -0
- package/domainforge-core/tests/sbvr_parsing_tests.rs +53 -0
- package/domainforge-core/tests/semantic_pack_alias_resolution.rs +197 -0
- package/domainforge-core/tests/semantic_pack_build.rs +302 -0
- package/domainforge-core/tests/semantic_pack_consumer_smoke.rs +150 -0
- package/domainforge-core/tests/semantic_pack_pack_set.rs +160 -0
- package/domainforge-core/tests/semantic_pack_signing.rs +157 -0
- package/domainforge-core/tests/semantic_pack_three_valued.rs +250 -0
- package/domainforge-core/tests/semantic_pack_validate.rs +196 -0
- package/domainforge-core/tests/std_lib_tests.rs +37 -0
- package/domainforge-core/tests/temporal_evaluation_tests.rs +159 -0
- package/domainforge-core/tests/temporal_semantics_tests.rs +214 -0
- package/domainforge-core/tests/three_valued_quantifiers_tests.rs +164 -0
- package/domainforge-core/tests/turtle_entity_export_tests.rs +38 -0
- package/domainforge-core/tests/turtle_escaping_tests.rs +53 -0
- package/domainforge-core/tests/turtle_resource_export_tests.rs +34 -0
- package/domainforge-core/tests/type_inference_tests.rs +40 -0
- package/domainforge-core/tests/unicode_validation_tests.rs +169 -0
- package/domainforge-core/tests/unit_tests.rs +81 -0
- package/domainforge-core/tests/validate_tests.rs +38 -0
- package/domainforge-core/tests/validation_unit_mismatch_tests.rs +83 -0
- package/domainforge-core/tests/wasm_tests.rs +229 -0
- package/domainforge-python/CHANGELOG-python.md +12 -0
- package/domainforge-python/MIGRATING.md +24 -0
- package/domainforge-python/README.md +256 -0
- package/domainforge-python/domainforge/__init__.py +95 -0
- package/domainforge-python/domainforge/domainforge.pyi +519 -0
- package/domainforge-python/pyproject.toml +36 -0
- package/domainforge-typescript/CHANGELOG-typescript.md +12 -0
- package/domainforge-typescript/LICENSE +201 -0
- package/domainforge-typescript/MIGRATING.md +24 -0
- package/domainforge-typescript/README.md +305 -0
- package/domainforge-typescript/index.d.ts +452 -0
- package/domainforge-typescript/index.js +361 -0
- package/domainforge-typescript/package.json +60 -0
- package/example.js +61 -0
- package/examples/browser.html +366 -0
- package/examples/namespaces/finance/cashflow.sea +5 -0
- package/examples/namespaces/logistics/core.sea +7 -0
- package/examples/observability_metrics.sea +38 -0
- package/fixtures/semantic_packs/acme_procurement/domain/entities.sea +39 -0
- package/fixtures/semantic_packs/acme_procurement/domain/metrics.sea +11 -0
- package/fixtures/semantic_packs/acme_procurement/domain/relations.sea +7 -0
- package/fixtures/semantic_packs/acme_procurement/domain/resources.sea +9 -0
- package/fixtures/semantic_packs/acme_procurement/review/acme.procurement.semantic-review.jsonl +7 -0
- package/fixtures/semantic_packs/acme_procurement/tests/ambiguous_vendor_alias.sea +8 -0
- package/fixtures/semantic_packs/acme_procurement/tests/deprecated_vendor_alias.sea +8 -0
- package/fixtures/semantic_packs/acme_procurement/tests/invalid_relation.sea +3 -0
- package/fixtures/semantic_packs/acme_procurement/tests/proposed_concept.sea +8 -0
- package/fixtures/semantic_packs/acme_procurement/tests/rejected_concept.sea +8 -0
- package/fixtures/semantic_packs/acme_procurement/tests/unit_mismatch.sea +7 -0
- package/fixtures/semantic_packs/acme_procurement/tests/unknown_vendor_policy.sea +8 -0
- package/fixtures/semantic_packs/acme_procurement/tests/valid_purchase_policy.sea +8 -0
- package/index.d.ts +2 -0
- package/index.js +8 -0
- package/justfile +200 -0
- package/lefthook.yml +13 -0
- package/lib/validate_native_exports.d.ts +4 -0
- package/lib/validate_native_exports.js +12 -0
- package/package.json +22 -0
- package/pytest.ini +5 -0
- package/python/tests/test_registry.py +75 -0
- package/python/tests/test_units.py +18 -0
- package/release-please-config.json +49 -0
- package/requirements-dev.txt +3 -0
- package/requirements.txt +3 -0
- package/rust-toolchain.toml +3 -0
- package/schemas/ast-v1.schema.json +72 -0
- package/schemas/ast-v2.schema.json +1200 -0
- package/schemas/ast-v3.schema.json +1200 -0
- package/schemas/sea-registry.schema.json +45 -0
- package/scripts/build-python.sh +37 -0
- package/scripts/build-release.sh +279 -0
- package/scripts/build-typescript.sh +13 -0
- package/scripts/build-wasm.sh +113 -0
- package/scripts/bump-version.sh +245 -0
- package/scripts/check_unused_test_imports.py +85 -0
- package/scripts/ci_tasks.py +379 -0
- package/scripts/clear_debug_test.sh +10 -0
- package/scripts/create-github-release.sh +262 -0
- package/scripts/create-tag.sh +203 -0
- package/scripts/find_and_link_test_binary.sh +70 -0
- package/scripts/generate-changelog.sh +271 -0
- package/scripts/generate-release-notes.sh +205 -0
- package/scripts/lint_release_security.py +96 -0
- package/scripts/lint_release_workflows.py +82 -0
- package/scripts/lint_workflow_gates.py +113 -0
- package/scripts/optimized-wasm-build.sh +61 -0
- package/scripts/patch_napi_types.py +62 -0
- package/scripts/pre-release-check.sh +289 -0
- package/scripts/prepare_rust_debug.sh +52 -0
- package/scripts/release.sh +373 -0
- package/scripts/resolve_rust_binary.py +230 -0
- package/scripts/run_commitlint.sh +29 -0
- package/scripts/test-all.sh +77 -0
- package/scripts/update_launch_program.py +93 -0
- package/secrets/README.md +27 -0
- package/secrets/secrets.yaml +21 -0
- package/test_integration.py +67 -0
- package/tests/test_authority.py +328 -0
- package/tests/test_ci_tasks.py +143 -0
- package/tests/test_expression.py +256 -0
- package/tests/test_golden_payment_flow.py +42 -0
- package/tests/test_graph.py +127 -0
- package/tests/test_instance.py +136 -0
- package/tests/test_parser.py +82 -0
- package/tests/test_primitives.py +68 -0
- package/tests/test_role_relation_parity.py +56 -0
- package/tests/test_runtime_toggle.py +156 -0
- package/tests/test_semantic_pack.py +639 -0
- package/tests/test_three_valued_eval.py +159 -0
- package/tsconfig.json +30 -0
- package/typescript-tests/advanced.test.ts +165 -0
- package/typescript-tests/authority.test.ts +216 -0
- package/typescript-tests/expression.test.ts +228 -0
- package/typescript-tests/golden-payment-flow.test.ts +51 -0
- package/typescript-tests/graph.test.ts +142 -0
- package/typescript-tests/native-binding.test.ts +20 -0
- package/typescript-tests/primitives.test.ts +88 -0
- package/typescript-tests/registry.test.ts +122 -0
- package/typescript-tests/role_relation.test.ts +63 -0
- package/typescript-tests/runtime_toggle.test.ts +141 -0
- package/typescript-tests/semantic-pack.test.ts +556 -0
- package/typescript-tests/three_valued_eval.test.ts +135 -0
- package/typescript-tests/units.test.ts +36 -0
- package/vitest.config.ts +13 -0
- package/wasm_demo.html +225 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.13.0](https://github.com/GodSpeedAI/DomainForge/compare/domainforge-core-v0.12.0...domainforge-core-v0.13.0) (2026-06-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* **repo:** packages renamed sea-core -> domainforge-core (crates.io), sea-dsl -> domainforge (PyPI), @godspeedai/sea -> @godspeedai/domainforge (npm); the `sea` CLI binary is now `domainforge`. See the per-package MIGRATING.md files.
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **repo:** document sea to domainforge migration ([#101](https://github.com/GodSpeedAI/DomainForge/issues/101)) ([f5182b6](https://github.com/GodSpeedAI/DomainForge/commit/f5182b6a014f7ecd7ae429de76eb14abe01d9ed6))
|
|
13
|
+
|
|
14
|
+
## [0.12.0](https://github.com/GodSpeedAI/DomainForge/compare/sea-core-v0.11.0...sea-core-v0.12.0) (2026-06-18)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* Add `schemars` dependency for JSON schema generation and introduce namespace/version directives in example. ([04a2b8a](https://github.com/GodSpeedAI/DomainForge/commit/04a2b8adfadeb5c4679d2a83c924fb14579accdb))
|
|
20
|
+
* Add `schemars` dependency for JSON schema generation and introduce namespace/version directives in example. ([fe6d049](https://github.com/GodSpeedAI/DomainForge/commit/fe6d049e839325f8ede250721a50921dc50cd507))
|
|
21
|
+
* add AST JSON output support ([33a69d6](https://github.com/GodSpeedAI/DomainForge/commit/33a69d6c7084e3838ef79249b24dce20a10c1f14))
|
|
22
|
+
* add AST JSON output support ([b63b189](https://github.com/GodSpeedAI/DomainForge/commit/b63b1896b91e9e2806cae915e98fb818261fd9f6))
|
|
23
|
+
* Add AST pretty printer, linter, and quantity primitive with rendering, refactor type inference, and introduce new specs and tests. ([6a0bd3b](https://github.com/GodSpeedAI/DomainForge/commit/6a0bd3b0e093204f11e4e5ad0ba78f1f4a8b7d1d))
|
|
24
|
+
* Add AST schema types for JSON Schema generation, documentation, and the generated schema file. ([ca66cd8](https://github.com/GodSpeedAI/DomainForge/commit/ca66cd8aa38bb86370115ad6a6ed5568562104ba))
|
|
25
|
+
* add buf.build integration (Phase 4) ([95ff0d5](https://github.com/GodSpeedAI/DomainForge/commit/95ff0d590359173e3e6361c027d735f9ad4d0117))
|
|
26
|
+
* Add CI, dependency review, and release workflows; include deny.toml for advisory management ([de1f420](https://github.com/GodSpeedAI/DomainForge/commit/de1f42024cff53149343879622a7a8d6cda071d5))
|
|
27
|
+
* add diagnostic formatters (JSON, Human, LSP) ([5ea5a75](https://github.com/GodSpeedAI/DomainForge/commit/5ea5a75b7559aa7d7c60cb36024658c76021d091))
|
|
28
|
+
* add error codes, source ranges, and fuzzy matching ([f2d3c5f](https://github.com/GodSpeedAI/DomainForge/commit/f2d3c5fe7135839a78627b8d7db4274a5a70cf4d))
|
|
29
|
+
* add formatter bindings for Python, TypeScript, WASM (Phase 5) ([baf811e](https://github.com/GodSpeedAI/DomainForge/commit/baf811ea347b9da70df6ccac1b0bfb2db1ecaeaa))
|
|
30
|
+
* add gRPC service generation from Flow patterns (Phase 2) ([0ebb0a6](https://github.com/GodSpeedAI/DomainForge/commit/0ebb0a6629d69f9f883c971e4fedd1af448fdd8c))
|
|
31
|
+
* Add line and column information to `ParseError` variants, their constructors, and display messages. ([f21a69a](https://github.com/GodSpeedAI/DomainForge/commit/f21a69a0d5937eb76c0c29f6d8bac10e7f98b63f))
|
|
32
|
+
* Add line and column information to parsed AST nodes and several parser error types. ([a6697d0](https://github.com/GodSpeedAI/DomainForge/commit/a6697d0c99b99aa7b43562dfd39292de5955bb87))
|
|
33
|
+
* add multi-file protobuf projection support (Phase 5) ([9770107](https://github.com/GodSpeedAI/DomainForge/commit/9770107434baef1000f70195b1e85273327f0312))
|
|
34
|
+
* add namespace registry and registry-driven CLI ([392b607](https://github.com/GodSpeedAI/DomainForge/commit/392b60769b061316a21c974fbc98766d24ca03c1))
|
|
35
|
+
* add Protobuf projection support ([7f051ea](https://github.com/GodSpeedAI/DomainForge/commit/7f051eab4a5aaf565ced88b6e9ae8c705105ab18))
|
|
36
|
+
* add Python-native error handling ([294ef2f](https://github.com/GodSpeedAI/DomainForge/commit/294ef2fdee4206fd8d96ff6005a5b2319da939ad))
|
|
37
|
+
* add schema compatibility enforcement for Protobuf projection ([ee86efd](https://github.com/GodSpeedAI/DomainForge/commit/ee86efd573e29bd91888a345f1d5f75563fac6f3))
|
|
38
|
+
* Add SHACL shapes for SEA Graph and implement validation command in sea binary ([095f9bb](https://github.com/GodSpeedAI/DomainForge/commit/095f9bb37e031f2297ee0fbbc040cf9dfa7b6477))
|
|
39
|
+
* Add support for `[@replaces](https://github.com/replaces)` and `[@changes](https://github.com/changes)` annotations to Resource and Flow declarations. ([313972c](https://github.com/GodSpeedAI/DomainForge/commit/313972cbf30763fc1c1a8cbb7c85594390527b4c))
|
|
40
|
+
* Add support for concept changes with versioning and migration annotations in DSL ([fca2d01](https://github.com/GodSpeedAI/DomainForge/commit/fca2d01182e9c0ccbbb3d93805b4cf487e18bfe8))
|
|
41
|
+
* Add tests for URI encoding in KnowledgeGraph to ensure comprehensive encoding of special characters ([ed484a9](https://github.com/GodSpeedAI/DomainForge/commit/ed484a919832ffcef54ff0212e0a11a9dc95cb57))
|
|
42
|
+
* add TypeScript and WASM native error handling ([7bdc712](https://github.com/GodSpeedAI/DomainForge/commit/7bdc7127a0226f0d1bc279059124ecb4c9a4033d))
|
|
43
|
+
* Add validation for finite quantity values and return `Result` from quantity creation and formatting methods. ([cbc36b8](https://github.com/GodSpeedAI/DomainForge/commit/cbc36b8c0a641e3c14e995fe2c6e51ad30598897))
|
|
44
|
+
* add Well-Known Types support for Protobuf projection (Phase 1) ([7059088](https://github.com/GodSpeedAI/DomainForge/commit/70590885f1f9a0d65250955b07a2e60c476d4b23))
|
|
45
|
+
* **calm:** Add CALM export/import, policy & association mapping, bindings, and tests ([a164064](https://github.com/GodSpeedAI/DomainForge/commit/a16406400b4d9ac4b3c273f0b860eb062c991413))
|
|
46
|
+
* **cli:** add parse command for SEA file parsing ([631da50](https://github.com/GodSpeedAI/DomainForge/commit/631da50f258e03bf729a1b2481d02bf4377c21db))
|
|
47
|
+
* **cli:** add parse command for SEA file parsing ([9a169d2](https://github.com/GodSpeedAI/DomainForge/commit/9a169d26980308a4ca70374abe3ab58235e70c79))
|
|
48
|
+
* complete implementation of enhanced aggregations with group_by support and associated tests ([971b9a1](https://github.com/GodSpeedAI/DomainForge/commit/971b9a1691039a6798da952b0fb1ff5697a6582e))
|
|
49
|
+
* **docs:** normalize unit conversions in active docs; add PrettyPrinter tests ([88e053c](https://github.com/GodSpeedAI/DomainForge/commit/88e053c7e166024abc51a3ff350df6d6142eae5e))
|
|
50
|
+
* encapsulate policy expression, switch to xxhash-rust for stable hashing, and enhance WASM/TS APIs and documentation ([899448c](https://github.com/GodSpeedAI/DomainForge/commit/899448ccd2a40a9865374da4fca782212fac96d7))
|
|
51
|
+
* Enhance CLI and parser with fail-on-ambiguity flag, improve error handling, and update documentation ([ef987d3](https://github.com/GodSpeedAI/DomainForge/commit/ef987d303525ca10526d1723573e5214f800750b))
|
|
52
|
+
* Enhance grammar and integration tests for entity and instance declarations ([ca7773c](https://github.com/GodSpeedAI/DomainForge/commit/ca7773c5d302c46ab980609efab7487a39841088))
|
|
53
|
+
* Enhance NamespaceRegistry with longest literal prefix precedence ([9273089](https://github.com/GodSpeedAI/DomainForge/commit/9273089f06d17fbf6f67fef4b947d2dc98727f84))
|
|
54
|
+
* Enhance unit conversion and profiles in SEA DSL ([44337c3](https://github.com/GodSpeedAI/DomainForge/commit/44337c3655ce1ec53b9b39fc814fb787b43c7525))
|
|
55
|
+
* Enhance WASM build process with optimization and add optional dependencies ([d2419bd](https://github.com/GodSpeedAI/DomainForge/commit/d2419bdd941ce61525581b331c498a2d500dffc9))
|
|
56
|
+
* **grammar:** add file-level metadata, unit/dimension declarations, enhanced policy syntax, and aggregation comprehensions ([7089cc2](https://github.com/GodSpeedAI/DomainForge/commit/7089cc264dd8a12d5cf4062d590ea9b3f3be3994))
|
|
57
|
+
* Implement --fail-on-ambiguity flag for namespace resolution and update documentation ([83de206](https://github.com/GodSpeedAI/DomainForge/commit/83de206ab6032fbb137b74046a5a143fe6ebc324))
|
|
58
|
+
* implement comment preservation (Phase 3) ([0f79fbc](https://github.com/GodSpeedAI/DomainForge/commit/0f79fbc13360043afa420642c42269bd94860c67))
|
|
59
|
+
* implement comprehensive CLI with new import, validate, project, format, and test commands ([22ef5f9](https://github.com/GodSpeedAI/DomainForge/commit/22ef5f99cdfb0884fb10279b2d738f6ea87fb457))
|
|
60
|
+
* Implement Evolution Semantics with versioning, migration tracking, and associated grammar and AST updates ([23ec075](https://github.com/GodSpeedAI/DomainForge/commit/23ec075df9aca3f0a49dd9e44f02d332de74d1be))
|
|
61
|
+
* Implement hardening and feature enhancements for SEA DSL ([ed2a569](https://github.com/GodSpeedAI/DomainForge/commit/ed2a56969ce50b21d13b46231b555ced48598dff))
|
|
62
|
+
* Implement Instance Declarations with refactoring and new bindings for Python and TypeScript ([fa7197d](https://github.com/GodSpeedAI/DomainForge/commit/fa7197dbac3e1ec4d1cf843c516c20140f677647))
|
|
63
|
+
* Implement KG import functionality with Turtle and RDF/XML support ([8aea13e](https://github.com/GodSpeedAI/DomainForge/commit/8aea13e7f800b6ddb3a4813cf5b208aa16eefd75))
|
|
64
|
+
* Implement module system with import/export capabilities, resolver logic, and error handling ([4c38e86](https://github.com/GodSpeedAI/DomainForge/commit/4c38e86ac5596061101108e1a512bce95897bae5))
|
|
65
|
+
* implement pattern semantics (Phase 1, Step 3) ([6d36a39](https://github.com/GodSpeedAI/DomainForge/commit/6d36a390f724a7cb13785be69a15413ca9a29393))
|
|
66
|
+
* Implement Projection Contracts with new grammar, AST, primitives, and engine for custom export mappings and overrides. ([010caed](https://github.com/GodSpeedAI/DomainForge/commit/010caedf5c2244e5cf5962646ca83a0da5f2243f))
|
|
67
|
+
* implement proper expression formatting (Phase 2) ([b3662a5](https://github.com/GodSpeedAI/DomainForge/commit/b3662a54fee6c12297e847d488a5bc232f16a40c))
|
|
68
|
+
* Implement roles and relations primitives, grammar, and `has_role` policy support with KG and SBVR projection. ([381b505](https://github.com/GodSpeedAI/DomainForge/commit/381b505e60f6703086b86fffa08a16596ed6d94c))
|
|
69
|
+
* implement sea fmt command (Phase 1) ([cd4b8b8](https://github.com/GodSpeedAI/DomainForge/commit/cd4b8b8bfb0fb29b108bbda5814dc96e2f370337))
|
|
70
|
+
* implement temporal semantics (Step 1) ([c45a8bd](https://github.com/GodSpeedAI/DomainForge/commit/c45a8bd36bf1bdf0fdce968e4a09564e35507a08))
|
|
71
|
+
* implement temporal semantics including time/interval literals and operators ([ad49353](https://github.com/GodSpeedAI/DomainForge/commit/ad49353605fb7249cfb013d0968aaf113751bda4))
|
|
72
|
+
* implement three-valued logic for SEA policy evaluation with comprehensive documentation and tests ([188b645](https://github.com/GodSpeedAI/DomainForge/commit/188b645daa651a34451beaf9d003b078c14922fe))
|
|
73
|
+
* Implement unit conversion and profiles in SEA DSL ([eb86fd6](https://github.com/GodSpeedAI/DomainForge/commit/eb86fd6f2027a83e46cdf1498cfdf01c6838c632))
|
|
74
|
+
* integrate diagnostic formatters into CLI ([af453cd](https://github.com/GodSpeedAI/DomainForge/commit/af453cd53492e383395b8606392996d41c3e8c41))
|
|
75
|
+
* Introduce `group_by` expressions with optional filters and windowing for aggregations. ([71ab840](https://github.com/GodSpeedAI/DomainForge/commit/71ab8405112fc1199aeb1e6cb3c81e5a63c0f09f))
|
|
76
|
+
* Introduce `Instance` for concrete entity data and rename old `Instance` to `ResourceInstance` to clarify their distinct purposes. ([2d12082](https://github.com/GodSpeedAI/DomainForge/commit/2d12082904f9be5acfaf18cb9e33312177d5045b))
|
|
77
|
+
* Introduce AST v3 schema, adding annotations to declarations and expanding AST node definitions. ([0eaa097](https://github.com/GodSpeedAI/DomainForge/commit/0eaa0973c66d486f43ff0fa327aaf38a8530e1cc))
|
|
78
|
+
* Introduce expression normalization and equivalence checking CLI and API. ([eb34f2e](https://github.com/GodSpeedAI/DomainForge/commit/eb34f2e92c01645c334d3486007e63bc0b5ad514))
|
|
79
|
+
* Introduce expression normalization and equivalence checking CLI… ([f1d6c18](https://github.com/GodSpeedAI/DomainForge/commit/f1d6c18e96534572f1cde5dcdace3938900298fc))
|
|
80
|
+
* Introduce expression normalizer for canonicalizing policy expre… ([b48226e](https://github.com/GodSpeedAI/DomainForge/commit/b48226efc14bc1caf36edbe618188b112507ab62))
|
|
81
|
+
* Introduce expression normalizer for canonicalizing policy expressions and providing stable hashing. ([69bc3ea](https://github.com/GodSpeedAI/DomainForge/commit/69bc3eae65f8c324901fc0c75d0ebd91c4b5d2c1))
|
|
82
|
+
* introduce Metric primitive with CALM export and enhance CLI validation output ([71b5346](https://github.com/GodSpeedAI/DomainForge/commit/71b53467f357dca86ec29e0302d2f67af07e571c))
|
|
83
|
+
* Introduce Role and Relation classes with associated methods ([c4d7aed](https://github.com/GodSpeedAI/DomainForge/commit/c4d7aed2e104b5de590cc6839a375754f35b4e21))
|
|
84
|
+
* introduce structured error types for module resolution, including circular dependency paths and namespace suggestions. ([7ff6ed1](https://github.com/GodSpeedAI/DomainForge/commit/7ff6ed1474c274d4f4943ba2a2db670cfceb56b4))
|
|
85
|
+
* Observability metrics — parser, bindings, and serialization fixes ([5805628](https://github.com/GodSpeedAI/DomainForge/commit/5805628cab532d03f077daa418e5e23b3a2e4189))
|
|
86
|
+
* Optimize CI/CD workflows and pre-commit hooks ([74d352d](https://github.com/GodSpeedAI/DomainForge/commit/74d352d3ca0d1391bdd99067d5f35128e7aa2c5b))
|
|
87
|
+
* **parser:** implement file metadata, dimension/unit declarations, and enhanced policy syntax ([7cee28d](https://github.com/GodSpeedAI/DomainForge/commit/7cee28da1c06d747e79b55ed5905e5e397fd7f00))
|
|
88
|
+
* Refactor unit registration and improve profile initialization ([3bf4dbe](https://github.com/GodSpeedAI/DomainForge/commit/3bf4dbe382a075ab2b7cd5a5edee34964481bfb8))
|
|
89
|
+
* **units:** add Dimension/Unit bindings; centralize parse & FromStr; grammar & parser fixes; tests ([7075935](https://github.com/GodSpeedAI/DomainForge/commit/7075935e00eac28a9506ae1196b9ff2f3efcb53a))
|
|
90
|
+
* **units:** case-insensitive Dimension parsing and use in registry/AST conversions; add tests ([ceb5c4a](https://github.com/GodSpeedAI/DomainForge/commit/ceb5c4ab4827e5ffc5fbe49b474762a197c786f3))
|
|
91
|
+
* Update CI workflow to streamline wasm-opt installation and disable wasm-opt in Cargo.toml ([b6149cf](https://github.com/GodSpeedAI/DomainForge/commit/b6149cf0f19dfe3d8034491e9350f89e3a903bf8))
|
|
92
|
+
* Update dependencies and add new packages ([08773b7](https://github.com/GodSpeedAI/DomainForge/commit/08773b754e503b4da565959fc6f07eba205cd936))
|
|
93
|
+
* Update instance handling and grammar for consistency across DSL ([ca4758c](https://github.com/GodSpeedAI/DomainForge/commit/ca4758c7d0d310cf772845a32b012f81bf89047a))
|
|
94
|
+
* Update versioning syntax in ConceptChange annotations to use unquoted semantic versions ([bdde34c](https://github.com/GodSpeedAI/DomainForge/commit/bdde34c2fb5cae8189b374d412557ff4f275c69e))
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
### Bug Fixes
|
|
98
|
+
|
|
99
|
+
* address all 26 review findings (F1-F26) ([f55e6ad](https://github.com/GodSpeedAI/DomainForge/commit/f55e6adbac8c6eac91a0e66079ce6cb4c0cfb0e1))
|
|
100
|
+
* Address CodeRabbit review feedback for instance declarations ([2eea800](https://github.com/GodSpeedAI/DomainForge/commit/2eea800259c80e1a095348130a4b6b06bbdb4b82))
|
|
101
|
+
* apply CodeRabbit auto-fixes ([85aeb65](https://github.com/GodSpeedAI/DomainForge/commit/85aeb65f7cc4e6b57d45ec975ce5105249a1912a))
|
|
102
|
+
* **bindings:** accept Policy JSON in Python/TypeScript bindings; deserialize to Policy ([fc297f8](https://github.com/GodSpeedAI/DomainForge/commit/fc297f863a4469a6df9313326b6fa99ca592068e))
|
|
103
|
+
* **ci:** fix formatting and python detection ([3f6b78b](https://github.com/GodSpeedAI/DomainForge/commit/3f6b78bc596fbc2fab6ce2a894867ee664317638))
|
|
104
|
+
* **ci:** implement missing 'sea registry' subcommand ([8c6fb6e](https://github.com/GodSpeedAI/DomainForge/commit/8c6fb6e58ec0f8a7fc87b1127bd0afcedaeeced9))
|
|
105
|
+
* **ci:** increase wasm size limit and use lol_alloc ([e2da453](https://github.com/GodSpeedAI/DomainForge/commit/e2da453556428ab9679f827f238921dab857f744))
|
|
106
|
+
* **ci:** resolve all CI test failures ([85fae4c](https://github.com/GodSpeedAI/DomainForge/commit/85fae4c037da178dc8308953b18909e2ad3361d8))
|
|
107
|
+
* **ci:** resolve Clippy lints in printer.rs ([45178d9](https://github.com/GodSpeedAI/DomainForge/commit/45178d9054df24155e4e084cd7242c5e5bd942f1))
|
|
108
|
+
* **ci:** resolve wasm compilation errors and remove vulnerable wee_alloc ([3c874a1](https://github.com/GodSpeedAI/DomainForge/commit/3c874a1f8cd321720077b9ac0d84789fdaecddff))
|
|
109
|
+
* **ci:** unblock windows checkout and python/wasm jobs ([02c710a](https://github.com/GodSpeedAI/DomainForge/commit/02c710ad788222a6c4eb36b7ec07c9432f7a7b10))
|
|
110
|
+
* Complete all CodeRabbit review tasks ([c802e56](https://github.com/GodSpeedAI/DomainForge/commit/c802e569de27482b6294814e1ca90f1e48feb36f))
|
|
111
|
+
* **deps:** add getrandom dependency for wasm32 target ([2974baf](https://github.com/GodSpeedAI/DomainForge/commit/2974baf752363a0f5eff23bbc1efe3a5989f68ab))
|
|
112
|
+
* Enable uuid/js feature for WASM build ([e5a1a26](https://github.com/GodSpeedAI/DomainForge/commit/e5a1a26a27e39773e831beae7dff3b24d0ad6927))
|
|
113
|
+
* grammar keyword ambiguity and artifacts in examples ([0f89f52](https://github.com/GodSpeedAI/DomainForge/commit/0f89f5211a5cce950ae4bb7c21eb7c3b6a4e170b))
|
|
114
|
+
* harden CI setup across platforms ([0a06ced](https://github.com/GodSpeedAI/DomainForge/commit/0a06ced0fb3726b09803c34b3e1798b69e92bf2d))
|
|
115
|
+
* Improve Python exception attribute setting error handling and resolve reported issues in CI/CD docs, CLI error propagation, and validation error types. ([bc368fe](https://github.com/GodSpeedAI/DomainForge/commit/bc368fe05970790311710cb04d94540dff2bf36e))
|
|
116
|
+
* parser namespace semantics, decimal quantities, version constant, artifact hygiene ([5062b29](https://github.com/GodSpeedAI/DomainForge/commit/5062b2963d05720d85f150df5373ef9cdf5fd1ae))
|
|
117
|
+
* **parser:** correctly parse Resource 'in domain' syntax ([7512d84](https://github.com/GodSpeedAI/DomainForge/commit/7512d846a53d41e2e4b4e8034fdc1d82bc79dace))
|
|
118
|
+
* path traversal security, protobuf validity, CALM/RDF round trips, TS declarations ([4b26c78](https://github.com/GodSpeedAI/DomainForge/commit/4b26c780edf48beccfa2a65cfee7b6894b8ef114))
|
|
119
|
+
* Pin uuid to 1.8.0 to resolve WASM build failure ([0f96149](https://github.com/GodSpeedAI/DomainForge/commit/0f961491893d74f74f3c7975346f20bda0263830))
|
|
120
|
+
* **python:** Avoid pyo3 #[args] attribute — accept Option<bool> in binding to ensure compile with --all-features ([b8c7c33](https://github.com/GodSpeedAI/DomainForge/commit/b8c7c336931a77d12d7f3ede70a23e5c67a5d7a9))
|
|
121
|
+
* refine wasm allocator configuration for clarity and binary size reduction ([04bcc3c](https://github.com/GodSpeedAI/DomainForge/commit/04bcc3c382427d349c12b0a9153905686b84dad3))
|
|
122
|
+
* remove unnecessary .clone() on Copy types (clippy warning) ([b9cace1](https://github.com/GodSpeedAI/DomainForge/commit/b9cace173f79fedb46d3caa28cd8c440a6b8725a))
|
|
123
|
+
* resolve all CI failures and remove committed private key fixture ([7b0129d](https://github.com/GodSpeedAI/DomainForge/commit/7b0129dbc41fe84af9d9213b58b4c3397ed1f7c3))
|
|
124
|
+
* resolve all CI failures for expression normalization PR ([7b1a144](https://github.com/GodSpeedAI/DomainForge/commit/7b1a144f1528e5ff6c3dd06c47690c331052e25a))
|
|
125
|
+
* resolve clippy errors and update test expectations ([8fe9ed0](https://github.com/GodSpeedAI/DomainForge/commit/8fe9ed08df41f0c0cdac1a20e3ec6c7419f921ae))
|
|
126
|
+
* resolve compilation errors and clippy warnings ([274c127](https://github.com/GodSpeedAI/DomainForge/commit/274c127f5fa695bd79f27f3b0042b5536af82356))
|
|
127
|
+
* resolve deferred-to-CI items and index.d.ts regen issue ([09d4316](https://github.com/GodSpeedAI/DomainForge/commit/09d43166ef85df75cd50f895fbd757051ded9fe8))
|
|
128
|
+
* restore missing if-guard in validate_definition_hashes ([7267113](https://github.com/GodSpeedAI/DomainForge/commit/7267113b045d79d0039c54d2455589ec07642a8c))
|
|
129
|
+
* restore pr ci checks ([8d4968f](https://github.com/GodSpeedAI/DomainForge/commit/8d4968f02bc1953a5830884a3e867cbcfd5983e0))
|
|
130
|
+
* stabilize CI test jobs ([3563509](https://github.com/GodSpeedAI/DomainForge/commit/3563509d946704aaebefff0a3856abc611776f67))
|
|
131
|
+
* stabilize semantic pack ci bindings ([a4acea9](https://github.com/GodSpeedAI/DomainForge/commit/a4acea9556bae159335bbd673d08b2edd8fcb175))
|
|
132
|
+
* Update Python dependencies and adjust wheel upload paths in CI workflows ([c0d23c8](https://github.com/GodSpeedAI/DomainForge/commit/c0d23c8cdb1d468161d11ef1030b34fcabdc81ab))
|
|
133
|
+
* **wasm:** accept Policy as JsValue in addPolicy and deserialize with serde_wasm_bindgen ([c20de95](https://github.com/GodSpeedAI/DomainForge/commit/c20de950c34ddc065a2aeaa563a596ddd3a69a85))
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
### Dependencies
|
|
137
|
+
|
|
138
|
+
* **pyo3:** upgrade to 0.29 and make cargo audit blocking ([88b54d1](https://github.com/GodSpeedAI/DomainForge/commit/88b54d1af802e928ca6b469fe1dcab02265c82a5))
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "domainforge-core"
|
|
3
|
+
version = "0.13.0"
|
|
4
|
+
authors = ["DomainForge Contributors"]
|
|
5
|
+
edition = "2021"
|
|
6
|
+
rust-version = "1.77"
|
|
7
|
+
description = "Rust core library implementing the SEA DSL primitives and validation engine."
|
|
8
|
+
license = "Apache-2.0"
|
|
9
|
+
homepage = "https://github.com/GodSpeedAI/DomainForge"
|
|
10
|
+
repository = "https://github.com/GodSpeedAI/DomainForge"
|
|
11
|
+
|
|
12
|
+
[dependencies]
|
|
13
|
+
uuid = { version = "=1.19.0", features = ["v4", "v5", "v7", "serde"] }
|
|
14
|
+
serde = { version = "1.0", features = ["derive"] }
|
|
15
|
+
serde_json = "1.0"
|
|
16
|
+
thiserror = "1.0"
|
|
17
|
+
icu_decimal = { version = "1.5", optional = true }
|
|
18
|
+
icu_locid = { version = "1.5", optional = true }
|
|
19
|
+
fixed_decimal = { version = "0.5", optional = true }
|
|
20
|
+
rust_decimal = { version = "1.33", features = ["serde"] }
|
|
21
|
+
chrono = { version = "0.4", default-features = false, features = ["serde", "std", "wasmbind", "clock"] }
|
|
22
|
+
pest = "2.7"
|
|
23
|
+
pest_derive = "2.7"
|
|
24
|
+
indexmap = { version = "2.0", features = ["serde"] }
|
|
25
|
+
log = "0.4.21"
|
|
26
|
+
globset = "0.4"
|
|
27
|
+
globwalk = "0.9"
|
|
28
|
+
toml = { version = "0.8", features = ["parse"] }
|
|
29
|
+
regex = { version = "1.11", default-features = false, features = ["std", "unicode"] }
|
|
30
|
+
once_cell = "1.19"
|
|
31
|
+
rustc-hash = "2.0"
|
|
32
|
+
xxhash-rust = { version = "0.8", features = ["xxh64"] }
|
|
33
|
+
pyo3 = { version = "0.29.0", features = ["extension-module"], optional = true }
|
|
34
|
+
pythonize = { version = "0.29", optional = true }
|
|
35
|
+
napi = { version = "2.16", features = ["async", "dyn-symbols"], optional = true }
|
|
36
|
+
napi-derive = { version = "2.16", optional = true }
|
|
37
|
+
wasm-bindgen = { version = "0.2", optional = true }
|
|
38
|
+
serde-wasm-bindgen = { version = "0.6", optional = true }
|
|
39
|
+
lol_alloc = { version = "0.4", optional = true }
|
|
40
|
+
percent-encoding = "2.3.2"
|
|
41
|
+
roxmltree = "0.21.1"
|
|
42
|
+
oxigraph = { version = "0.3", optional = true }
|
|
43
|
+
clap = { version = "4.5", features = ["derive"], optional = true }
|
|
44
|
+
colored = { version = "2.0", optional = true }
|
|
45
|
+
anyhow = "1.0.100"
|
|
46
|
+
schemars = { version = "0.8", features = ["chrono", "rust_decimal", "indexmap2"], optional = true }
|
|
47
|
+
sha2 = "=0.10"
|
|
48
|
+
ed25519-dalek = { version = "=2.1.0", features = ["pem", "std"], optional = true }
|
|
49
|
+
unicode-normalization = "0.1"
|
|
50
|
+
base64 = "=0.22"
|
|
51
|
+
|
|
52
|
+
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
53
|
+
getrandom = { version = "0.2", features = ["js"] }
|
|
54
|
+
|
|
55
|
+
[dev-dependencies]
|
|
56
|
+
proptest = { version = "1.0", features = ["std", "bit-set"] }
|
|
57
|
+
wasm-bindgen-test = "0.3"
|
|
58
|
+
jsonschema = { version = "0.18" }
|
|
59
|
+
roxmltree = "0.21.1"
|
|
60
|
+
rust_decimal_macros = "1.33"
|
|
61
|
+
schemars = { version = "0.8", features = ["chrono", "rust_decimal", "indexmap2"] }
|
|
62
|
+
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
|
|
63
|
+
tempfile = "3.12"
|
|
64
|
+
assert_cmd = "2.0"
|
|
65
|
+
predicates = "3"
|
|
66
|
+
# Note: criterion was removed due to unmaintained/unsound `atty` transitive dependency (RUSTSEC-2024-0375, RUSTSEC-2021-0145).
|
|
67
|
+
# If benchmarks are needed, consider using `divan` or re-adding criterion when its deps are updated.
|
|
68
|
+
|
|
69
|
+
[build-dependencies]
|
|
70
|
+
napi-build = "2.1"
|
|
71
|
+
|
|
72
|
+
[lib]
|
|
73
|
+
name = "domainforge_core"
|
|
74
|
+
path = "src/lib.rs"
|
|
75
|
+
crate-type = ["rlib", "cdylib"]
|
|
76
|
+
|
|
77
|
+
[features]
|
|
78
|
+
default = []
|
|
79
|
+
python = ["pyo3", "pythonize", "signing"]
|
|
80
|
+
typescript = ["napi", "napi-derive", "signing"]
|
|
81
|
+
wasm = ["wasm-bindgen", "serde-wasm-bindgen", "uuid/js", "lol_alloc"]
|
|
82
|
+
shacl = ["oxigraph"]
|
|
83
|
+
formatting = ["icu_decimal", "icu_locid", "fixed_decimal"]
|
|
84
|
+
cli = ["three_valued_logic", "clap", "colored", "signing"]
|
|
85
|
+
three_valued_logic = []
|
|
86
|
+
json-schema = ["schemars"]
|
|
87
|
+
signing = ["ed25519-dalek"]
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
## NOTE: Profiles are managed at the workspace root (Cargo.toml). Please
|
|
91
|
+
## update the workspace-level profiles in /Cargo.toml rather than in
|
|
92
|
+
## this crate's Cargo.toml. This avoids the "profiles for the non root
|
|
93
|
+
## package will be ignored" cargo warning.
|
|
94
|
+
|
|
95
|
+
[[bin]]
|
|
96
|
+
name = "domainforge"
|
|
97
|
+
path = "src/bin/domainforge.rs"
|
|
98
|
+
required-features = ["cli"]
|
|
99
|
+
|
|
100
|
+
[package.metadata.wasm-pack.profile.release]
|
|
101
|
+
wasm-opt = ["-Oz", "--enable-mutable-globals", "--enable-bulk-memory", "--enable-nontrapping-float-to-int", "--enable-sign-ext"]
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Migrating from `sea-core` to `domainforge-core`
|
|
2
|
+
|
|
3
|
+
The Rust crate was renamed. The published artifact, CLI binary, and library
|
|
4
|
+
name changed:
|
|
5
|
+
|
|
6
|
+
| Before (`sea-core`) | After (`domainforge-core`) |
|
|
7
|
+
|-----------------------------|--------------------------------|
|
|
8
|
+
| `sea-core` (crates.io) | `domainforge-core` |
|
|
9
|
+
| `sea_core` (Rust crate) | `domainforge_core` |
|
|
10
|
+
| `sea` CLI binary | `domainforge` CLI binary |
|
|
11
|
+
|
|
12
|
+
## Cargo
|
|
13
|
+
|
|
14
|
+
```toml
|
|
15
|
+
[dependencies]
|
|
16
|
+
# old: sea-core = "0.12"
|
|
17
|
+
domainforge-core = "0.13"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
```rust
|
|
21
|
+
// old: use sea_core::...
|
|
22
|
+
use domainforge_core::...;
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## CLI
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# old: sea validate model.sea
|
|
29
|
+
domainforge validate model.sea
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The `.sea` DSL file extension and grammar are unchanged.
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# SEA Core
|
|
2
|
+
|
|
3
|
+
[](https://crates.io/crates/domainforge-core)
|
|
4
|
+
[](https://docs.rs/domainforge-core)
|
|
5
|
+
[](https://github.com/GodSpeedAI/DomainForge/blob/main/LICENSE)
|
|
6
|
+
[](https://github.com/GodSpeedAI/DomainForge/actions/workflows/ci.yml)
|
|
7
|
+
[](https://blog.rust-lang.org/2024/03/21/Rust-1.77.0.html)
|
|
8
|
+
|
|
9
|
+
Rust core library implementing the **SEA DSL** (Semantic Enterprise Architecture) primitives and validation engine. Part of the [DomainForge](https://github.com/GodSpeedAI/DomainForge) ecosystem.
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- 🏗️ **Domain Primitives** — Entities, Resources, Flows, Roles, Relations
|
|
14
|
+
- 📐 **Unit System** — First-class dimensional analysis with 100+ built-in units
|
|
15
|
+
- ✅ **Policy Engine** — Constraint validation with three-valued logic
|
|
16
|
+
- 🔄 **Round-trip Parsing** — Parse SEA DSL to AST/Graph, format back to source
|
|
17
|
+
- 🌐 **Multi-target** — Compile to Rust, Python (PyO3), TypeScript (N-API), WASM
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
Add to your `Cargo.toml`:
|
|
22
|
+
|
|
23
|
+
```toml
|
|
24
|
+
[dependencies]
|
|
25
|
+
domainforge-core = "0.6"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Or install the CLI:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
cargo install domainforge-core --features cli
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Quick Start
|
|
35
|
+
|
|
36
|
+
```rust
|
|
37
|
+
use domainforge_core::parser::parse_to_graph;
|
|
38
|
+
|
|
39
|
+
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
40
|
+
let source = r#"
|
|
41
|
+
@namespace "finance"
|
|
42
|
+
|
|
43
|
+
Entity "Customer"
|
|
44
|
+
Entity "Vendor"
|
|
45
|
+
|
|
46
|
+
Resource "Payment" USD in transactions
|
|
47
|
+
|
|
48
|
+
Flow "Payment" from "Customer" to "Vendor"
|
|
49
|
+
"#;
|
|
50
|
+
|
|
51
|
+
let graph = parse_to_graph(source)?;
|
|
52
|
+
|
|
53
|
+
println!("Entities: {:?}", graph.all_entities().len());
|
|
54
|
+
println!("Resources: {:?}", graph.all_resources().len());
|
|
55
|
+
println!("Flows: {:?}", graph.all_flows().len());
|
|
56
|
+
|
|
57
|
+
Ok(())
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Feature Flags
|
|
62
|
+
|
|
63
|
+
| Feature | Description | Default |
|
|
64
|
+
| -------------------- | ---------------------------------------- | ------- |
|
|
65
|
+
| `cli` | Command-line interface (`sea` binary) | ❌ |
|
|
66
|
+
| `python` | Python bindings via PyO3 | ❌ |
|
|
67
|
+
| `typescript` | TypeScript/Node.js bindings via N-API | ❌ |
|
|
68
|
+
| `wasm` | WebAssembly target support | ❌ |
|
|
69
|
+
| `shacl` | SHACL/RDF knowledge graph export | ❌ |
|
|
70
|
+
| `formatting` | ICU-based number formatting | ❌ |
|
|
71
|
+
| `three_valued_logic` | Three-valued logic for policy evaluation | ❌ |
|
|
72
|
+
|
|
73
|
+
### Enable features:
|
|
74
|
+
|
|
75
|
+
```toml
|
|
76
|
+
# CLI binary
|
|
77
|
+
domainforge-core = { version = "0.6", features = ["cli"] }
|
|
78
|
+
|
|
79
|
+
# Python bindings (for maturin builds)
|
|
80
|
+
domainforge-core = { version = "0.6", features = ["python"] }
|
|
81
|
+
|
|
82
|
+
# WASM target
|
|
83
|
+
domainforge-core = { version = "0.6", features = ["wasm"] }
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## CLI Usage
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Validate a SEA file
|
|
90
|
+
domainforge validate domain.sea
|
|
91
|
+
|
|
92
|
+
# Format SEA source
|
|
93
|
+
domainforge format domain.sea
|
|
94
|
+
|
|
95
|
+
# Export to CALM JSON
|
|
96
|
+
domainforge project --format calm domain.sea output.json
|
|
97
|
+
|
|
98
|
+
# Show version and help
|
|
99
|
+
domainforge --version
|
|
100
|
+
domainforge --help
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## API Overview
|
|
104
|
+
|
|
105
|
+
### Parsing
|
|
106
|
+
|
|
107
|
+
```rust
|
|
108
|
+
use domainforge_core::parser::{parse_to_graph, parse_to_graph_with_options, ParseOptions};
|
|
109
|
+
|
|
110
|
+
// Simple parsing
|
|
111
|
+
let graph = parse_to_graph(source)?;
|
|
112
|
+
|
|
113
|
+
// With options
|
|
114
|
+
let options = ParseOptions {
|
|
115
|
+
default_namespace: Some("my_namespace".into()),
|
|
116
|
+
..Default::default()
|
|
117
|
+
};
|
|
118
|
+
let graph = parse_to_graph_with_options(source, &options)?;
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Querying the Graph
|
|
122
|
+
|
|
123
|
+
```rust
|
|
124
|
+
// Get all entities
|
|
125
|
+
for entity in graph.all_entities() {
|
|
126
|
+
println!("{}: {:?}", entity.name(), entity.namespace());
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Get resource by name
|
|
130
|
+
if let Some(resource) = graph.resource_by_name("Payment") {
|
|
131
|
+
println!("Unit: {}", resource.unit_symbol());
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Get flows for a resource
|
|
135
|
+
let flows = graph.flows_for_resource(&resource_id);
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Validation
|
|
139
|
+
|
|
140
|
+
```rust
|
|
141
|
+
use domainforge_core::validation::validate_graph;
|
|
142
|
+
|
|
143
|
+
let violations = validate_graph(&graph);
|
|
144
|
+
for violation in violations {
|
|
145
|
+
eprintln!("[{}] {}", violation.severity, violation.message);
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Documentation
|
|
150
|
+
|
|
151
|
+
- 📖 [API Reference](https://docs.rs/domainforge-core) — Full Rust API documentation
|
|
152
|
+
- 📚 [SEA DSL Guide](https://github.com/GodSpeedAI/DomainForge/blob/main/docs/reference/sea-dsl-syntax.md) — Language specification
|
|
153
|
+
- 🏗️ [Architecture](https://github.com/GodSpeedAI/DomainForge/blob/main/docs/architecture.md) — Design overview
|
|
154
|
+
|
|
155
|
+
## Building from Source
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# Clone the repository
|
|
159
|
+
git clone https://github.com/GodSpeedAI/DomainForge.git
|
|
160
|
+
cd DomainForge
|
|
161
|
+
|
|
162
|
+
# Build the library
|
|
163
|
+
cargo build -p domainforge-core
|
|
164
|
+
|
|
165
|
+
# Run tests
|
|
166
|
+
cargo test -p domainforge-core
|
|
167
|
+
|
|
168
|
+
# Build with CLI
|
|
169
|
+
cargo build -p domainforge-core --features cli
|
|
170
|
+
|
|
171
|
+
# Build documentation
|
|
172
|
+
cargo doc -p domainforge-core --no-deps --open
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Minimum Supported Rust Version
|
|
176
|
+
|
|
177
|
+
This crate requires **Rust 1.77.0** or later.
|
|
178
|
+
|
|
179
|
+
## Related Crates
|
|
180
|
+
|
|
181
|
+
| Crate | Description |
|
|
182
|
+
| ------------------------------------------------------------------------------ | --------------------------- |
|
|
183
|
+
| [`domainforge-core`](https://crates.io/crates/domainforge-core) | Core library (this crate) |
|
|
184
|
+
| [`domainforge`](https://pypi.org/project/domainforge-python/) | Python bindings |
|
|
185
|
+
| [`@domainforge/domainforge-core`](https://www.npmjs.com/package/@domainforge/domainforge-core) | TypeScript/Node.js bindings |
|
|
186
|
+
|
|
187
|
+
## Contributing
|
|
188
|
+
|
|
189
|
+
Contributions are welcome! Please see [CONTRIBUTING.md](https://github.com/GodSpeedAI/DomainForge/blob/main/CONTRIBUTING.md) for guidelines.
|
|
190
|
+
|
|
191
|
+
## License
|
|
192
|
+
|
|
193
|
+
Licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
Part of the [DomainForge](https://github.com/GodSpeedAI/DomainForge) project.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Compiling domainforge-core v0.0.1 (/home/sprime01/projects/domainforge/domainforge-core)
|
|
2
|
+
Finished `bench` profile [optimized] target(s) in 21.41s
|
|
3
|
+
Running benches/null_overhead.rs (/home/sprime01/projects/domainforge/target/release/deps/null_overhead-a3cacc905f36c3c3)
|
|
4
|
+
Benchmarking sum_baseline/sum_strict_1k
|
|
5
|
+
Benchmarking sum_baseline/sum_strict_1k: Warming up for 3.0000 s
|
|
6
|
+
Benchmarking sum_baseline/sum_strict_1k: Collecting 100 samples in estimated 5.0007 s (566k iterations)
|
|
7
|
+
Benchmarking sum_baseline/sum_strict_1k: Analyzing
|
|
8
|
+
sum_baseline/sum_strict_1k
|
|
9
|
+
time: [7.9087 µs 8.2293 µs 8.6586 µs]
|
|
10
|
+
Found 11 outliers among 100 measurements (11.00%)
|
|
11
|
+
5 (5.00%) high mild
|
|
12
|
+
6 (6.00%) high severe
|
|
13
|
+
|
|
14
|
+
Benchmarking three_valued_sum/sum_nullable/0pct_null
|
|
15
|
+
Benchmarking three_valued_sum/sum_nullable/0pct_null: Warming up for 3.0000 s
|
|
16
|
+
Benchmarking three_valued_sum/sum_nullable/0pct_null: Collecting 100 samples in estimated 5.0218 s (601k iterations)
|
|
17
|
+
Benchmarking three_valued_sum/sum_nullable/0pct_null: Analyzing
|
|
18
|
+
three_valued_sum/sum_nullable/0pct_null
|
|
19
|
+
time: [8.5873 µs 9.0864 µs 9.6445 µs]
|
|
20
|
+
Found 10 outliers among 100 measurements (10.00%)
|
|
21
|
+
3 (3.00%) high mild
|
|
22
|
+
7 (7.00%) high severe
|
|
23
|
+
Benchmarking three_valued_sum/sum_nullable/10pct_null
|
|
24
|
+
Benchmarking three_valued_sum/sum_nullable/10pct_null: Warming up for 3.0000 s
|
|
25
|
+
Benchmarking three_valued_sum/sum_nullable/10pct_null: Collecting 100 samples in estimated 5.0037 s (651k iterations)
|
|
26
|
+
Benchmarking three_valued_sum/sum_nullable/10pct_null: Analyzing
|
|
27
|
+
three_valued_sum/sum_nullable/10pct_null
|
|
28
|
+
time: [7.4073 µs 7.6063 µs 7.8516 µs]
|
|
29
|
+
Found 7 outliers among 100 measurements (7.00%)
|
|
30
|
+
5 (5.00%) high mild
|
|
31
|
+
2 (2.00%) high severe
|
|
32
|
+
Benchmarking three_valued_sum/sum_nullable/50pct_null
|
|
33
|
+
Benchmarking three_valued_sum/sum_nullable/50pct_null: Warming up for 3.0000 s
|
|
34
|
+
Benchmarking three_valued_sum/sum_nullable/50pct_null: Collecting 100 samples in estimated 5.0119 s (1.2M iterations)
|
|
35
|
+
Benchmarking three_valued_sum/sum_nullable/50pct_null: Analyzing
|
|
36
|
+
three_valued_sum/sum_nullable/50pct_null
|
|
37
|
+
time: [3.9081 µs 4.0466 µs 4.2245 µs]
|
|
38
|
+
Found 12 outliers among 100 measurements (12.00%)
|
|
39
|
+
4 (4.00%) high mild
|
|
40
|
+
8 (8.00%) high severe
|
|
41
|
+
|
|
42
|
+
Benchmarking sum_nonnull/sum_nonnull_10pct_null_1k
|
|
43
|
+
Benchmarking sum_nonnull/sum_nonnull_10pct_null_1k: Warming up for 3.0000 s
|
|
44
|
+
Benchmarking sum_nonnull/sum_nonnull_10pct_null_1k: Collecting 100 samples in estimated 5.0033 s (641k iterations)
|
|
45
|
+
Benchmarking sum_nonnull/sum_nonnull_10pct_null_1k: Analyzing
|
|
46
|
+
sum_nonnull/sum_nonnull_10pct_null_1k
|
|
47
|
+
time: [7.1903 µs 7.3307 µs 7.5023 µs]
|
|
48
|
+
Found 12 outliers among 100 measurements (12.00%)
|
|
49
|
+
6 (6.00%) high mild
|
|
50
|
+
6 (6.00%) high severe
|
|
51
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[advisories]
|
|
2
|
+
db-path = "~/.cargo/advisory-db"
|
|
3
|
+
db-urls = ["https://github.com/rustsec/advisory-db"]
|
|
4
|
+
vulnerability = "deny"
|
|
5
|
+
unmaintained = "warn"
|
|
6
|
+
yanked = "deny"
|
|
7
|
+
notice = "warn"
|
|
8
|
+
|
|
9
|
+
[licenses]
|
|
10
|
+
unlicensed = "deny"
|
|
11
|
+
allow = [
|
|
12
|
+
"MIT",
|
|
13
|
+
"Apache-2.0",
|
|
14
|
+
"BSD-3-Clause",
|
|
15
|
+
"ISC",
|
|
16
|
+
"Unicode-DFS-2016",
|
|
17
|
+
]
|
|
18
|
+
deny = [
|
|
19
|
+
"GPL-3.0",
|
|
20
|
+
"AGPL-3.0",
|
|
21
|
+
]
|
|
22
|
+
copyleft = "warn"
|
|
23
|
+
|
|
24
|
+
[bans]
|
|
25
|
+
multiple-versions = "warn"
|
|
26
|
+
wildcards = "warn"
|
|
27
|
+
|
|
28
|
+
[sources]
|
|
29
|
+
unknown-registry = "deny"
|
|
30
|
+
unknown-git = "deny"
|
|
31
|
+
allow-registry = ["crates-io"]
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# SBVR/KG Projection Mapping (Normative)
|
|
2
|
+
|
|
3
|
+
This document records the minimal SBVR→SEA and KG (RDF/SHACL)→SEA mapping implemented in Phase 18.
|
|
4
|
+
|
|
5
|
+
## High-level mappings
|
|
6
|
+
|
|
7
|
+
- SBVR:
|
|
8
|
+
- `sbvr:GeneralConcept` → SEA `Entity`
|
|
9
|
+
- `sbvr:IndividualConcept` → SEA `Resource`
|
|
10
|
+
- `sbvr:VerbConcept` → not represented (verbs are currently not mapped to primitives)
|
|
11
|
+
- `sbvr:FactType` (verb: `transfers`) → SEA `Flow` (quantity is defaulted to 1 in this import)
|
|
12
|
+
- `sbvr` rules (Obligation/Prohibition/Permission/Derivation) → imported to `SbvrModel::rules` but not converted into `Policy` primitives in Phase 18
|
|
13
|
+
|
|
14
|
+
- KG / RDF / SHACL:
|
|
15
|
+
- `sea:Entity` (rdf:type) + `rdfs:label` → SEA `Entity`
|
|
16
|
+
- `sea:Resource` (rdf:type) + `sea:unit` → SEA `Resource` with unit mapping via `unit_from_string`
|
|
17
|
+
- `sea:Flow` + `sea:from`, `sea:to`, `sea:hasResource`, `sea:quantity` → SEA `Flow` with quantity parsed as decimal
|
|
18
|
+
|
|
19
|
+
## Limitations
|
|
20
|
+
|
|
21
|
+
- SBVR `FactType` currently encodes only a subject/verb/object/destination with default quantity `1`. Complex SBVR expressions and modalities are stored in `SbvrModel` but not converted to SEA `Policy` primitives in Phase 18.
|
|
22
|
+
- The KG import is intentionally a best-effort parser tailored to the Turtle exports produced by this crate (`KnowledgeGraph::to_turtle`). It is not a general-purpose Turtle/RDF parser.
|
|
23
|
+
- SHACL validation is not enforced in the import functions; the CLI will validate KG exports in the planned steps.
|
|
24
|
+
|
|
25
|
+
## Example: SBVR Fact → Flow
|
|
26
|
+
|
|
27
|
+
Given SBVR XMI with a FactType referencing a `Subject` (GeneralConcept), `Verb` (transfers), `Object` (resource) and `Destination`, the import will map it to a `Flow`:
|
|
28
|
+
|
|
29
|
+
- Subject `Warehouse` → SEA `Entity` named "Warehouse"
|
|
30
|
+
- Verb `transfers` → recognized but not materialized
|
|
31
|
+
- Object `Cameras` → SEA `Resource` named "Cameras"; the importer calls `domainforge_core::units::unit_from_string("units")` (see `domainforge-core/src/units/mod.rs`), so the default unit literal `"units"` maps to a `Unit` whose `symbol` and `base_unit` are `"units"`, `dimension` is `Dimension::Count`, and `base_factor` is `Decimal::ONE`.
|
|
32
|
+
- Destination `Factory` → SEA `Entity` named "Factory"
|
|
33
|
+
- The resulting Flow will be added with quantity `1` unless a quantity fact is present (Phase 19+)
|
|
34
|
+
|
|
35
|
+
## Notes for Integrators
|
|
36
|
+
|
|
37
|
+
- If you have XMI produced by other SBVR tools, import using `SbvrModel::from_xmi` and then convert to `Graph` with `to_graph`.
|
|
38
|
+
- For RDF/Turtle produced externally, it's recommended to verify the triple patterns match the `sea:` predicates used here (`sea:Flow`, `sea:hasResource`, `sea:quantity`).
|
|
39
|
+
- Future phases will expand the mapping to support richer SBVR constructs, modalities, and using SHACL validation via `oxigraph`.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
For more details and examples, review unit tests in `domainforge-core/tests/projection_contracts_tests.rs`.
|