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,519 @@
|
|
|
1
|
+
from typing import Any, List, Optional, Tuple
|
|
2
|
+
|
|
3
|
+
__version__: str
|
|
4
|
+
|
|
5
|
+
# =============================================================================
|
|
6
|
+
# Domain Primitives
|
|
7
|
+
# =============================================================================
|
|
8
|
+
|
|
9
|
+
class Entity:
|
|
10
|
+
id: str
|
|
11
|
+
name: str
|
|
12
|
+
namespace: Optional[str]
|
|
13
|
+
|
|
14
|
+
def __init__(self, name: str, namespace: Optional[str] = None) -> None: ...
|
|
15
|
+
def set_attribute(self, key: str, value: Any) -> None: ...
|
|
16
|
+
def get_attribute(self, key: str) -> Any: ...
|
|
17
|
+
def __repr__(self) -> str: ...
|
|
18
|
+
def __str__(self) -> str: ...
|
|
19
|
+
|
|
20
|
+
class Resource:
|
|
21
|
+
id: str
|
|
22
|
+
name: str
|
|
23
|
+
unit: str
|
|
24
|
+
namespace: Optional[str]
|
|
25
|
+
|
|
26
|
+
def __init__(self, name: str, unit: str, namespace: Optional[str] = None) -> None: ...
|
|
27
|
+
def set_attribute(self, key: str, value: Any) -> None: ...
|
|
28
|
+
def get_attribute(self, key: str) -> Any: ...
|
|
29
|
+
def __repr__(self) -> str: ...
|
|
30
|
+
def __str__(self) -> str: ...
|
|
31
|
+
|
|
32
|
+
class Flow:
|
|
33
|
+
id: str
|
|
34
|
+
resource_id: str
|
|
35
|
+
from_id: str
|
|
36
|
+
to_id: str
|
|
37
|
+
quantity: float
|
|
38
|
+
namespace: Optional[str]
|
|
39
|
+
|
|
40
|
+
def __init__(self, resource_id: str, from_id: str, to_id: str, quantity: float) -> None: ...
|
|
41
|
+
def set_attribute(self, key: str, value: Any) -> None: ...
|
|
42
|
+
def get_attribute(self, key: str) -> Any: ...
|
|
43
|
+
def __repr__(self) -> str: ...
|
|
44
|
+
|
|
45
|
+
class ResourceInstance:
|
|
46
|
+
id: str
|
|
47
|
+
resource_id: str
|
|
48
|
+
entity_id: str
|
|
49
|
+
namespace: Optional[str]
|
|
50
|
+
|
|
51
|
+
def __init__(self, resource_id: str, entity_id: str, namespace: Optional[str] = None) -> None: ...
|
|
52
|
+
def set_attribute(self, key: str, value: Any) -> None: ...
|
|
53
|
+
def get_attribute(self, key: str) -> Any: ...
|
|
54
|
+
def __repr__(self) -> str: ...
|
|
55
|
+
|
|
56
|
+
class Instance:
|
|
57
|
+
id: str
|
|
58
|
+
name: str
|
|
59
|
+
entity_type: str
|
|
60
|
+
namespace: Optional[str]
|
|
61
|
+
|
|
62
|
+
def __init__(self, name: str, entity_type: str, namespace: Optional[str] = None) -> None: ...
|
|
63
|
+
def set_field(self, key: str, value: Any) -> None: ...
|
|
64
|
+
def get_field(self, key: str) -> Any: ...
|
|
65
|
+
def __repr__(self) -> str: ...
|
|
66
|
+
|
|
67
|
+
class Role:
|
|
68
|
+
id: str
|
|
69
|
+
name: str
|
|
70
|
+
namespace: Optional[str]
|
|
71
|
+
|
|
72
|
+
def __init__(self, name: str, namespace: Optional[str] = None) -> None: ...
|
|
73
|
+
def set_attribute(self, key: str, value: Any) -> None: ...
|
|
74
|
+
def get_attribute(self, key: str) -> Any: ...
|
|
75
|
+
def __repr__(self) -> str: ...
|
|
76
|
+
|
|
77
|
+
class Relation:
|
|
78
|
+
id: str
|
|
79
|
+
name: str
|
|
80
|
+
namespace: Optional[str]
|
|
81
|
+
subject_role_id: str
|
|
82
|
+
predicate: str
|
|
83
|
+
object_role_id: str
|
|
84
|
+
via_flow_id: Optional[str]
|
|
85
|
+
|
|
86
|
+
def __init__(
|
|
87
|
+
self,
|
|
88
|
+
name: str,
|
|
89
|
+
subject_role_id: str,
|
|
90
|
+
predicate: str,
|
|
91
|
+
object_role_id: str,
|
|
92
|
+
namespace: Optional[str] = None,
|
|
93
|
+
via_flow_id: Optional[str] = None,
|
|
94
|
+
) -> None: ...
|
|
95
|
+
def __repr__(self) -> str: ...
|
|
96
|
+
|
|
97
|
+
class Mapping:
|
|
98
|
+
name: str
|
|
99
|
+
target_format: str
|
|
100
|
+
|
|
101
|
+
def __repr__(self) -> str: ...
|
|
102
|
+
|
|
103
|
+
class Projection:
|
|
104
|
+
name: str
|
|
105
|
+
target_format: str
|
|
106
|
+
|
|
107
|
+
def __repr__(self) -> str: ...
|
|
108
|
+
|
|
109
|
+
# =============================================================================
|
|
110
|
+
# Graph
|
|
111
|
+
# =============================================================================
|
|
112
|
+
|
|
113
|
+
class Graph:
|
|
114
|
+
def __init__(self) -> None: ...
|
|
115
|
+
def add_entity(self, entity: Entity) -> None: ...
|
|
116
|
+
def add_resource(self, resource: Resource) -> None: ...
|
|
117
|
+
def add_flow(self, flow: Flow) -> None: ...
|
|
118
|
+
def add_instance(self, instance: ResourceInstance) -> None: ...
|
|
119
|
+
def add_role(self, role: Role) -> None: ...
|
|
120
|
+
def add_relation(self, relation: Relation) -> None: ...
|
|
121
|
+
def add_policy(self, policy_json: str) -> None: ...
|
|
122
|
+
def add_association(self, owner: str, owned: str, rel_type: str) -> None: ...
|
|
123
|
+
def entity_count(self) -> int: ...
|
|
124
|
+
def resource_count(self) -> int: ...
|
|
125
|
+
def flow_count(self) -> int: ...
|
|
126
|
+
def instance_count(self) -> int: ...
|
|
127
|
+
def role_count(self) -> int: ...
|
|
128
|
+
def relation_count(self) -> int: ...
|
|
129
|
+
def pattern_count(self) -> int: ...
|
|
130
|
+
def has_entity(self, id: str) -> bool: ...
|
|
131
|
+
def has_resource(self, id: str) -> bool: ...
|
|
132
|
+
def has_flow(self, id: str) -> bool: ...
|
|
133
|
+
def has_instance(self, id: str) -> bool: ...
|
|
134
|
+
def get_entity(self, id: str) -> Optional[Entity]: ...
|
|
135
|
+
def get_resource(self, id: str) -> Optional[Resource]: ...
|
|
136
|
+
def get_flow(self, id: str) -> Optional[Flow]: ...
|
|
137
|
+
def get_instance(self, id: str) -> Optional[ResourceInstance]: ...
|
|
138
|
+
def find_entity_by_name(self, name: str) -> Optional[str]: ...
|
|
139
|
+
def find_resource_by_name(self, name: str) -> Optional[str]: ...
|
|
140
|
+
def find_role_by_name(self, name: str) -> Optional[str]: ...
|
|
141
|
+
def flows_from(self, entity_id: str) -> List[Flow]: ...
|
|
142
|
+
def flows_to(self, entity_id: str) -> List[Flow]: ...
|
|
143
|
+
def all_entities(self) -> List[Entity]: ...
|
|
144
|
+
def all_resources(self) -> List[Resource]: ...
|
|
145
|
+
def all_flows(self) -> List[Flow]: ...
|
|
146
|
+
def all_instances(self) -> List[ResourceInstance]: ...
|
|
147
|
+
def all_roles(self) -> List[Role]: ...
|
|
148
|
+
def all_relations(self) -> List[Relation]: ...
|
|
149
|
+
def evaluate_policy(self, policy_json: str) -> EvaluationResult: ...
|
|
150
|
+
def set_evaluation_mode(self, use_three_valued_logic: bool) -> None: ...
|
|
151
|
+
def use_three_valued_logic(self) -> bool: ...
|
|
152
|
+
def export_calm(self) -> str: ...
|
|
153
|
+
def export_protobuf(
|
|
154
|
+
self,
|
|
155
|
+
package: str,
|
|
156
|
+
namespace: str = ...,
|
|
157
|
+
projection_name: str = ...,
|
|
158
|
+
include_governance: bool = ...,
|
|
159
|
+
include_services: bool = ...,
|
|
160
|
+
) -> str: ...
|
|
161
|
+
|
|
162
|
+
@staticmethod
|
|
163
|
+
def parse(source: str) -> Graph: ...
|
|
164
|
+
|
|
165
|
+
@staticmethod
|
|
166
|
+
def parse_to_ast_json(source: str) -> str: ...
|
|
167
|
+
|
|
168
|
+
@staticmethod
|
|
169
|
+
def import_calm(calm_json: str) -> Graph: ...
|
|
170
|
+
|
|
171
|
+
def __repr__(self) -> str: ...
|
|
172
|
+
|
|
173
|
+
# =============================================================================
|
|
174
|
+
# Policy Types
|
|
175
|
+
# =============================================================================
|
|
176
|
+
|
|
177
|
+
class Severity:
|
|
178
|
+
Error: Severity
|
|
179
|
+
Warning: Severity
|
|
180
|
+
Info: Severity
|
|
181
|
+
|
|
182
|
+
class Violation:
|
|
183
|
+
name: str
|
|
184
|
+
message: str
|
|
185
|
+
severity: Severity
|
|
186
|
+
|
|
187
|
+
def __repr__(self) -> str: ...
|
|
188
|
+
|
|
189
|
+
class EvaluationResult:
|
|
190
|
+
is_satisfied: bool
|
|
191
|
+
is_satisfied_tristate: Optional[bool]
|
|
192
|
+
violations: List[Violation]
|
|
193
|
+
|
|
194
|
+
def __repr__(self) -> str: ...
|
|
195
|
+
|
|
196
|
+
class BinaryOp:
|
|
197
|
+
And: BinaryOp
|
|
198
|
+
Or: BinaryOp
|
|
199
|
+
Equal: BinaryOp
|
|
200
|
+
NotEqual: BinaryOp
|
|
201
|
+
GreaterThan: BinaryOp
|
|
202
|
+
LessThan: BinaryOp
|
|
203
|
+
GreaterThanOrEqual: BinaryOp
|
|
204
|
+
LessThanOrEqual: BinaryOp
|
|
205
|
+
Plus: BinaryOp
|
|
206
|
+
Minus: BinaryOp
|
|
207
|
+
Multiply: BinaryOp
|
|
208
|
+
Divide: BinaryOp
|
|
209
|
+
Contains: BinaryOp
|
|
210
|
+
StartsWith: BinaryOp
|
|
211
|
+
EndsWith: BinaryOp
|
|
212
|
+
Matches: BinaryOp
|
|
213
|
+
HasRole: BinaryOp
|
|
214
|
+
Before: BinaryOp
|
|
215
|
+
After: BinaryOp
|
|
216
|
+
During: BinaryOp
|
|
217
|
+
|
|
218
|
+
class UnaryOp:
|
|
219
|
+
Not: UnaryOp
|
|
220
|
+
Negate: UnaryOp
|
|
221
|
+
|
|
222
|
+
class Quantifier:
|
|
223
|
+
ForAll: Quantifier
|
|
224
|
+
Exists: Quantifier
|
|
225
|
+
ExistsUnique: Quantifier
|
|
226
|
+
|
|
227
|
+
class AggregateFunction:
|
|
228
|
+
Count: AggregateFunction
|
|
229
|
+
Sum: AggregateFunction
|
|
230
|
+
Min: AggregateFunction
|
|
231
|
+
Max: AggregateFunction
|
|
232
|
+
Avg: AggregateFunction
|
|
233
|
+
|
|
234
|
+
class WindowSpec:
|
|
235
|
+
duration: int
|
|
236
|
+
unit: str
|
|
237
|
+
|
|
238
|
+
def __init__(self, duration: int, unit: str) -> None: ...
|
|
239
|
+
def __repr__(self) -> str: ...
|
|
240
|
+
|
|
241
|
+
class Expression:
|
|
242
|
+
@staticmethod
|
|
243
|
+
def literal(value: Any) -> Expression: ...
|
|
244
|
+
|
|
245
|
+
@staticmethod
|
|
246
|
+
def variable(name: str) -> Expression: ...
|
|
247
|
+
|
|
248
|
+
@staticmethod
|
|
249
|
+
def quantity(value: str, unit: str) -> Expression: ...
|
|
250
|
+
|
|
251
|
+
@staticmethod
|
|
252
|
+
def time(timestamp: str) -> Expression: ...
|
|
253
|
+
|
|
254
|
+
@staticmethod
|
|
255
|
+
def interval(start: str, end: str) -> Expression: ...
|
|
256
|
+
|
|
257
|
+
@staticmethod
|
|
258
|
+
def binary(op: BinaryOp, left: Expression, right: Expression) -> Expression: ...
|
|
259
|
+
|
|
260
|
+
@staticmethod
|
|
261
|
+
def unary(op: UnaryOp, operand: Expression) -> Expression: ...
|
|
262
|
+
|
|
263
|
+
@staticmethod
|
|
264
|
+
def cast(operand: Expression, target_type: str) -> Expression: ...
|
|
265
|
+
|
|
266
|
+
@staticmethod
|
|
267
|
+
def quantifier(
|
|
268
|
+
q: Quantifier,
|
|
269
|
+
variable: str,
|
|
270
|
+
collection: Expression,
|
|
271
|
+
condition: Expression,
|
|
272
|
+
) -> Expression: ...
|
|
273
|
+
|
|
274
|
+
@staticmethod
|
|
275
|
+
def member_access(object: str, member: str) -> Expression: ...
|
|
276
|
+
|
|
277
|
+
@staticmethod
|
|
278
|
+
def aggregation(
|
|
279
|
+
function: AggregateFunction,
|
|
280
|
+
collection: Expression,
|
|
281
|
+
field: Optional[str] = ...,
|
|
282
|
+
filter: Optional[Expression] = ...,
|
|
283
|
+
) -> Expression: ...
|
|
284
|
+
|
|
285
|
+
@staticmethod
|
|
286
|
+
def aggregation_comprehension(
|
|
287
|
+
function: AggregateFunction,
|
|
288
|
+
variable: str,
|
|
289
|
+
collection: Expression,
|
|
290
|
+
predicate: Expression,
|
|
291
|
+
projection: Expression,
|
|
292
|
+
window: Optional[WindowSpec] = ...,
|
|
293
|
+
target_unit: Optional[str] = ...,
|
|
294
|
+
) -> Expression: ...
|
|
295
|
+
|
|
296
|
+
@staticmethod
|
|
297
|
+
def group_by(
|
|
298
|
+
variable: str,
|
|
299
|
+
collection: Expression,
|
|
300
|
+
key: Expression,
|
|
301
|
+
condition: Expression,
|
|
302
|
+
filter: Optional[Expression] = ...,
|
|
303
|
+
) -> Expression: ...
|
|
304
|
+
|
|
305
|
+
def normalize(self) -> NormalizedExpression: ...
|
|
306
|
+
def is_equivalent(self, other: Expression) -> bool: ...
|
|
307
|
+
def __str__(self) -> str: ...
|
|
308
|
+
def __repr__(self) -> str: ...
|
|
309
|
+
def __eq__(self, other: Expression) -> bool: ...
|
|
310
|
+
|
|
311
|
+
class NormalizedExpression:
|
|
312
|
+
def stable_hash(self) -> int: ...
|
|
313
|
+
def inner_expression(self) -> Expression: ...
|
|
314
|
+
def __str__(self) -> str: ...
|
|
315
|
+
def __repr__(self) -> str: ...
|
|
316
|
+
def __eq__(self, other: NormalizedExpression) -> bool: ...
|
|
317
|
+
def __hash__(self) -> int: ...
|
|
318
|
+
|
|
319
|
+
# =============================================================================
|
|
320
|
+
# Authority Module
|
|
321
|
+
# =============================================================================
|
|
322
|
+
|
|
323
|
+
class FinalDecision:
|
|
324
|
+
Allow: FinalDecision
|
|
325
|
+
Deny: FinalDecision
|
|
326
|
+
Escalate: FinalDecision
|
|
327
|
+
NotApplicable: FinalDecision
|
|
328
|
+
Reject: FinalDecision
|
|
329
|
+
|
|
330
|
+
class PolicyModality:
|
|
331
|
+
Permission: PolicyModality
|
|
332
|
+
Prohibition: PolicyModality
|
|
333
|
+
Obligation: PolicyModality
|
|
334
|
+
Override: PolicyModality
|
|
335
|
+
|
|
336
|
+
class SourceClass:
|
|
337
|
+
CallerSupplied: SourceClass
|
|
338
|
+
RuntimeObserved: SourceClass
|
|
339
|
+
SystemOfRecord: SourceClass
|
|
340
|
+
Attested: SourceClass
|
|
341
|
+
ManualApproval: SourceClass
|
|
342
|
+
Derived: SourceClass
|
|
343
|
+
UnknownSource: SourceClass
|
|
344
|
+
|
|
345
|
+
class ClaimLevel:
|
|
346
|
+
AuditBacked: ClaimLevel
|
|
347
|
+
Validated: ClaimLevel
|
|
348
|
+
FormallyProven: ClaimLevel
|
|
349
|
+
|
|
350
|
+
class AuthorityEnvironment:
|
|
351
|
+
def __init__(self, config_json: str) -> None: ...
|
|
352
|
+
def validate(self) -> None: ...
|
|
353
|
+
def evaluate(self, request_json: str, facts_json: str = ...) -> Tuple[str, str]: ...
|
|
354
|
+
def __repr__(self) -> str: ...
|
|
355
|
+
|
|
356
|
+
def evaluate_authority(
|
|
357
|
+
config_json: str,
|
|
358
|
+
request_json: str,
|
|
359
|
+
facts_json: str = ...,
|
|
360
|
+
) -> Tuple[str, str]: ...
|
|
361
|
+
|
|
362
|
+
# =============================================================================
|
|
363
|
+
# Units Module
|
|
364
|
+
# =============================================================================
|
|
365
|
+
|
|
366
|
+
class Dimension:
|
|
367
|
+
@staticmethod
|
|
368
|
+
def parse(name: str) -> Dimension: ...
|
|
369
|
+
def __repr__(self) -> str: ...
|
|
370
|
+
def __str__(self) -> str: ...
|
|
371
|
+
|
|
372
|
+
class Unit:
|
|
373
|
+
symbol: str
|
|
374
|
+
name: str
|
|
375
|
+
base_unit: str
|
|
376
|
+
base_factor: float
|
|
377
|
+
|
|
378
|
+
def __init__(
|
|
379
|
+
self,
|
|
380
|
+
symbol: str,
|
|
381
|
+
name: str,
|
|
382
|
+
dimension: str,
|
|
383
|
+
base_factor: float,
|
|
384
|
+
base_unit: str,
|
|
385
|
+
) -> None: ...
|
|
386
|
+
def __repr__(self) -> str: ...
|
|
387
|
+
|
|
388
|
+
# =============================================================================
|
|
389
|
+
# Registry Module
|
|
390
|
+
# =============================================================================
|
|
391
|
+
|
|
392
|
+
class NamespaceBinding:
|
|
393
|
+
path: str
|
|
394
|
+
namespace: str
|
|
395
|
+
|
|
396
|
+
class NamespaceRegistry:
|
|
397
|
+
root: str
|
|
398
|
+
default_namespace: str
|
|
399
|
+
|
|
400
|
+
@staticmethod
|
|
401
|
+
def from_file(path: str) -> NamespaceRegistry: ...
|
|
402
|
+
|
|
403
|
+
@staticmethod
|
|
404
|
+
def discover(path: str) -> Optional[NamespaceRegistry]: ...
|
|
405
|
+
|
|
406
|
+
def resolve_files(self, fail_on_ambiguity: Optional[bool] = ...) -> List[NamespaceBinding]: ...
|
|
407
|
+
def namespace_for(self, path: str, fail_on_ambiguity: Optional[bool] = ...) -> str: ...
|
|
408
|
+
|
|
409
|
+
# =============================================================================
|
|
410
|
+
# Formatter Functions
|
|
411
|
+
# =============================================================================
|
|
412
|
+
|
|
413
|
+
def format_source(
|
|
414
|
+
source: str,
|
|
415
|
+
indent_width: int = ...,
|
|
416
|
+
use_tabs: bool = ...,
|
|
417
|
+
preserve_comments: bool = ...,
|
|
418
|
+
sort_imports: bool = ...,
|
|
419
|
+
) -> str: ...
|
|
420
|
+
|
|
421
|
+
def check_format(
|
|
422
|
+
source: str,
|
|
423
|
+
indent_width: int = ...,
|
|
424
|
+
use_tabs: bool = ...,
|
|
425
|
+
) -> bool: ...
|
|
426
|
+
|
|
427
|
+
# =============================================================================
|
|
428
|
+
# Semantic Pack Module
|
|
429
|
+
# =============================================================================
|
|
430
|
+
|
|
431
|
+
class SemanticTruth:
|
|
432
|
+
Valid: SemanticTruth
|
|
433
|
+
Invalid: SemanticTruth
|
|
434
|
+
Unknown: SemanticTruth
|
|
435
|
+
|
|
436
|
+
class DiagnosticSeverity:
|
|
437
|
+
Error: DiagnosticSeverity
|
|
438
|
+
Warning: DiagnosticSeverity
|
|
439
|
+
Info: DiagnosticSeverity
|
|
440
|
+
Hint: DiagnosticSeverity
|
|
441
|
+
|
|
442
|
+
class ValidationMode:
|
|
443
|
+
Off: ValidationMode
|
|
444
|
+
Warn: ValidationMode
|
|
445
|
+
Strict: ValidationMode
|
|
446
|
+
|
|
447
|
+
class ApprovalState:
|
|
448
|
+
Candidate: ApprovalState
|
|
449
|
+
Approved: ApprovalState
|
|
450
|
+
Rejected: ApprovalState
|
|
451
|
+
|
|
452
|
+
class SignatureState:
|
|
453
|
+
Unsigned: SignatureState
|
|
454
|
+
Signed: SignatureState
|
|
455
|
+
InvalidSignature: SignatureState
|
|
456
|
+
|
|
457
|
+
class ConceptStatus:
|
|
458
|
+
Active: ConceptStatus
|
|
459
|
+
Proposed: ConceptStatus
|
|
460
|
+
Deprecated: ConceptStatus
|
|
461
|
+
Rejected: ConceptStatus
|
|
462
|
+
ExternalOnly: ConceptStatus
|
|
463
|
+
|
|
464
|
+
class ConceptKind:
|
|
465
|
+
Entity: ConceptKind
|
|
466
|
+
Resource: ConceptKind
|
|
467
|
+
Role: ConceptKind
|
|
468
|
+
Flow: ConceptKind
|
|
469
|
+
Policy: ConceptKind
|
|
470
|
+
Metric: ConceptKind
|
|
471
|
+
Dimension: ConceptKind
|
|
472
|
+
Unit: ConceptKind
|
|
473
|
+
External: ConceptKind
|
|
474
|
+
|
|
475
|
+
class AliasStatus:
|
|
476
|
+
Approved: AliasStatus
|
|
477
|
+
Deprecated: AliasStatus
|
|
478
|
+
Ambiguous: AliasStatus
|
|
479
|
+
Blocked: AliasStatus
|
|
480
|
+
|
|
481
|
+
class SemanticValidationStatus:
|
|
482
|
+
Passed: SemanticValidationStatus
|
|
483
|
+
Failed: SemanticValidationStatus
|
|
484
|
+
Unknown: SemanticValidationStatus
|
|
485
|
+
Blocked: SemanticValidationStatus
|
|
486
|
+
|
|
487
|
+
class SemanticPack:
|
|
488
|
+
@staticmethod
|
|
489
|
+
def from_json(json: str) -> SemanticPack: ...
|
|
490
|
+
def to_json(self) -> str: ...
|
|
491
|
+
def pack_id(self) -> str: ...
|
|
492
|
+
def schema_version(self) -> str: ...
|
|
493
|
+
def approval_state(self) -> ApprovalState: ...
|
|
494
|
+
def signature_state(self) -> SignatureState: ...
|
|
495
|
+
def concept_count(self) -> int: ...
|
|
496
|
+
def alias_count(self) -> int: ...
|
|
497
|
+
def meaning_version(self) -> str: ...
|
|
498
|
+
def meaning_fingerprint(self) -> str: ...
|
|
499
|
+
def pack_content_hash(self) -> str: ...
|
|
500
|
+
def __repr__(self) -> str: ...
|
|
501
|
+
|
|
502
|
+
class SemanticValidationResult:
|
|
503
|
+
@staticmethod
|
|
504
|
+
def from_json(json: str) -> SemanticValidationResult: ...
|
|
505
|
+
def status(self) -> SemanticValidationStatus: ...
|
|
506
|
+
def diagnostics_json(self) -> str: ...
|
|
507
|
+
def unsigned_fixture_bypass_used(self) -> bool: ...
|
|
508
|
+
def first_approved_version_bypass_used(self) -> bool: ...
|
|
509
|
+
def __repr__(self) -> str: ...
|
|
510
|
+
|
|
511
|
+
def build_semantic_pack(input_json: str) -> Tuple[str, List[str]]: ...
|
|
512
|
+
def validate_semantic_pack(pack_json: str) -> List[str]: ...
|
|
513
|
+
def validate_graph_with_pack(pack_json: str, source: str, options_json: str) -> str: ...
|
|
514
|
+
def sign_pack(pack_json: str, private_key_pem: str) -> str: ...
|
|
515
|
+
def verify_pack_signature(pack_json: str, public_key_pem: str) -> bool: ...
|
|
516
|
+
def diff_packs(old_json: str, new_json: str) -> str: ...
|
|
517
|
+
def compute_pack_hash(pack_json: str) -> str: ...
|
|
518
|
+
def normalize_lookup_key(text: str) -> str: ...
|
|
519
|
+
def resolve_concept(raw_text: str, pack_json: str, options_json: str) -> str: ...
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["maturin>=1.7,<2.0"]
|
|
3
|
+
build-backend = "maturin"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "domainforge"
|
|
7
|
+
version = "0.13.0"
|
|
8
|
+
description = "SEA DSL - Semantic Enterprise Architecture Domain Specific Language"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = { text = "Apache-2.0" }
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "DomainForge Contributors" }
|
|
14
|
+
]
|
|
15
|
+
keywords = ["enterprise-architecture", "dsl", "domain-modeling", "business-logic"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 3 - Alpha",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"License :: OSI Approved :: Apache Software License",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3.11",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Programming Language :: Rust",
|
|
24
|
+
"Topic :: Software Development :: Libraries",
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
[project.optional-dependencies]
|
|
28
|
+
dev = [
|
|
29
|
+
"pytest>=7.4",
|
|
30
|
+
"mypy>=1.0",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[tool.maturin]
|
|
34
|
+
module-name = "domainforge"
|
|
35
|
+
features = ["python", "three_valued_logic"]
|
|
36
|
+
manifest-path = "../domainforge-core/Cargo.toml"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.13.0](https://github.com/GodSpeedAI/DomainForge/compare/domainforge-typescript-v0.12.0...domainforge-typescript-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))
|