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
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.11.0] - 2026-06-09
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Semantic Pack System**: Added canonical semantic pack support with schema definitions, builder APIs, validation, diffing, pack-set resolution, canonical JSON, review records, and signing helpers.
|
|
13
|
+
- **Authority Evaluation**: Added authority policy compilation and evaluation with environments, fact resolvers, resolver traces, policy transforms, and conformance coverage.
|
|
14
|
+
- **CLI Pack Workflows**: Added `domainforge pack` and authority-oriented CLI support for building, validating, reviewing, signing, and checking semantic packs.
|
|
15
|
+
- **Cross-Language Semantic Pack Bindings**: Exposed semantic pack and authority APIs through Python, TypeScript napi, and WASM bindings to keep FFI packages in lockstep with `domainforge-core`.
|
|
16
|
+
- **Semantic Pack Fixtures And Tests**: Added ACME procurement fixtures and comprehensive Rust, Python, TypeScript, and WASM tests for semantic pack behavior, authority evaluation, aliases, pack sets, signing, and three-valued logic.
|
|
17
|
+
- **Security And Diagnostics Documentation**: Added security model, generated-artifact policy, semantic pack, signing, review, diagnostics, and expanded language API documentation.
|
|
18
|
+
- **Release And CI Guardrails**: Added release workflow linting, enterprise verification gates, resource guardrails, native export validation, and deterministic napi type patching.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- **README And Binding Guides**: Reworked the main README and Python, TypeScript, and WASM package READMEs for clearer domain modeling and binding usage.
|
|
23
|
+
- **Protobuf Projection**: Expanded projection handling and validation for generated Protobuf output.
|
|
24
|
+
- **CALM And RDF Round Trips**: Improved import/export fidelity for CALM and RDF knowledge graph projections.
|
|
25
|
+
- **Parser And AST Robustness**: Tightened namespace semantics, resource limits, AST conversion/schema behavior, and printer output.
|
|
26
|
+
- **Release Packaging**: Hardened npm/WASM packaging, release artifact checks, and workflow behavior for published releases.
|
|
27
|
+
- **WASM Release Budget**: Aligned the release WASM bundle size gate with CI at 2.5MB for the expanded authority-enabled WASM API surface.
|
|
28
|
+
- **Dependency Baseline**: Updated locked dependencies, including `uuid`, `time`, and `bytes`.
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
|
|
32
|
+
- **Path Traversal Protection**: Hardened CLI and semantic pack file handling against unsafe paths.
|
|
33
|
+
- **Python Stubs And TypeScript Declarations**: Regenerated and patched binding declarations so exported APIs match native implementations.
|
|
34
|
+
- **Decimal Quantity Handling**: Fixed decimal quantity behavior in parser and projection paths.
|
|
35
|
+
- **CI Stability**: Stabilized Rust, Python, TypeScript, macOS, and release jobs; removed stale helper tests and committed artifact hygiene issues.
|
|
36
|
+
- **Release Security**: Removed a committed private-key fixture and improved encrypted secret handling in release workflows.
|
|
37
|
+
- **Release Precheck Version Parsing**: Stripped carriage returns when comparing package versions so CRLF TOML files do not trigger false mismatches.
|
|
38
|
+
- **Parser/Protobuf Review Findings**: Addressed review findings around parser behavior, Protobuf validity, and deferred CI-only failures.
|
|
39
|
+
|
|
40
|
+
## [0.10.0] - 2026-01-13
|
|
41
|
+
|
|
42
|
+
### Added
|
|
43
|
+
|
|
44
|
+
- **Manual Release**: Prepared manual release for 0.10.0.
|
|
45
|
+
|
|
46
|
+
## [0.8.1] - 2026-01-12
|
|
47
|
+
|
|
48
|
+
### Added
|
|
49
|
+
|
|
50
|
+
- **Release Artifacts**: Include Python wheel alongside CLI and WASM artifacts in release bundles.
|
|
51
|
+
|
|
52
|
+
### Changed
|
|
53
|
+
|
|
54
|
+
- **README**: CI badge now reflects live workflow status instead of a static test count.
|
|
55
|
+
|
|
56
|
+
### Fixed
|
|
57
|
+
|
|
58
|
+
- **Python Packaging**: Ensure maturin-based wheel is built and published for releases.
|
|
59
|
+
|
|
60
|
+
## [0.8.0] - 2026-01-12
|
|
61
|
+
|
|
62
|
+
### Added
|
|
63
|
+
|
|
64
|
+
- **CLI Parse Command**: New `domainforge parse` command for SEA file parsing
|
|
65
|
+
- **AST JSON Output**: JSON output support for AST generation
|
|
66
|
+
- **Custom Flow Annotations**: Grammar + parser support for flow annotations
|
|
67
|
+
- **AST JSON Schema Generation**: Added `schemars` dependency for schema output
|
|
68
|
+
|
|
69
|
+
### Changed
|
|
70
|
+
|
|
71
|
+
- **Documentation**: Updated specs and guides for AST JSON features
|
|
72
|
+
- **Examples**: Added namespace/version directives in AST JSON examples
|
|
73
|
+
|
|
74
|
+
## [0.7.3] - 2025-12-24
|
|
75
|
+
|
|
76
|
+
### Added
|
|
77
|
+
|
|
78
|
+
- **CLI Registry Command**: New `domainforge registry resolve` subcommand for namespace resolution
|
|
79
|
+
- Supports `--fail-on-ambiguity` flag for strict matching
|
|
80
|
+
- Enables CI integration tests for registry ambiguity detection
|
|
81
|
+
|
|
82
|
+
### Fixed
|
|
83
|
+
|
|
84
|
+
- **CI/Python Tests**: Fixed pytest invocation to use virtualenv (`ci-test-python` now uses `.venv/bin/pytest`)
|
|
85
|
+
- **WASM Bundle Size**: Increased limit from 1MB to 2MB to accommodate actual bundle size (1.83MB)
|
|
86
|
+
|
|
87
|
+
### Changed
|
|
88
|
+
|
|
89
|
+
- **Registry Tests**: Added comprehensive unit tests for registry ambiguity and precedence logic
|
|
90
|
+
|
|
91
|
+
## [0.7.2] - 2025-12-24
|
|
92
|
+
|
|
93
|
+
### Changed
|
|
94
|
+
|
|
95
|
+
- **Documentation**: Updated README with comprehensive SEA DSL syntax reference
|
|
96
|
+
- Added Pattern as 6th building block primitive
|
|
97
|
+
- New "SEA DSL Syntax" section with basic and advanced examples
|
|
98
|
+
- All 14 declaration types documented with syntax patterns
|
|
99
|
+
- Updated VS Code extension README with matching grammar examples
|
|
100
|
+
|
|
101
|
+
## [0.7.1] - 2025-12-24
|
|
102
|
+
|
|
103
|
+
### Changed
|
|
104
|
+
|
|
105
|
+
- **CHANGELOG**: Added comprehensive release notes for v0.7.0
|
|
106
|
+
|
|
107
|
+
## [0.7.0] - 2025-12-24
|
|
108
|
+
|
|
109
|
+
### Added
|
|
110
|
+
|
|
111
|
+
- **AST v3 Schema**: New JSON Schema for AST with expanded node definitions and annotations support
|
|
112
|
+
|
|
113
|
+
- `schemas/ast-v2.schema.json` and `schemas/ast-v3.schema.json` for validation
|
|
114
|
+
- `ast_schema.rs` module for programmatic schema generation
|
|
115
|
+
|
|
116
|
+
- **Resource/Flow Annotations**: `@replaces` and `@changes` annotations for evolution tracking
|
|
117
|
+
|
|
118
|
+
- Enables declaring replacement relationships between resources
|
|
119
|
+
- Tracks change history in flow declarations
|
|
120
|
+
|
|
121
|
+
- **Parser Location Tracking**: Line and column information in AST nodes
|
|
122
|
+
|
|
123
|
+
- `Spanned<AstNode>` wrapper for precise source locations
|
|
124
|
+
- Enhanced `ParseError` with line/column for better diagnostics
|
|
125
|
+
|
|
126
|
+
- **Structured Module Errors**: New error types for module resolution
|
|
127
|
+
|
|
128
|
+
- Circular dependency path tracking
|
|
129
|
+
- Namespace suggestions for typos
|
|
130
|
+
- Error codes E500, E504, E505 documented
|
|
131
|
+
|
|
132
|
+
- **Release Automation Scripts**: New scripts in `scripts/` for release management
|
|
133
|
+
|
|
134
|
+
- `release.sh`, `build-release.sh`, `bump-version.sh`
|
|
135
|
+
- `create-tag.sh`, `create-github-release.sh`
|
|
136
|
+
- `generate-changelog.sh`, `generate-release-notes.sh`
|
|
137
|
+
- `pre-release-check.sh` for pre-flight validation
|
|
138
|
+
|
|
139
|
+
- **Release Branch Workflow**: Updated playbook to enforce dedicated release branches
|
|
140
|
+
|
|
141
|
+
### Changed
|
|
142
|
+
|
|
143
|
+
- **Parser Grammar**: Extended `sea.pest` for annotation syntax and improved `in domain` parsing
|
|
144
|
+
- **Formatter**: Enhanced `printer.rs` with annotation support
|
|
145
|
+
- **Release Tooling**: Replaced `npm version` with `jq` in `justfile`, removing npm dependency
|
|
146
|
+
- **Documentation**: Improved package READMEs for PyPI, npm, WASM, and crates.io
|
|
147
|
+
|
|
148
|
+
### Fixed
|
|
149
|
+
|
|
150
|
+
- **Parser**: Correctly parse Resource `in domain` syntax
|
|
151
|
+
- **CI**: Resolved Clippy lints in `printer.rs`
|
|
152
|
+
- **CI**: Correct `gh pr checks` parsing in dependabot automerge
|
|
153
|
+
|
|
154
|
+
## [0.6.2] - 2025-12-18
|
|
155
|
+
|
|
156
|
+
### Fixed
|
|
157
|
+
|
|
158
|
+
- **Windows Release**: Fixed `maturin publish` on Windows by executing via `python -m maturin` to avoid PATH issues
|
|
159
|
+
|
|
160
|
+
## [0.6.1] - 2025-12-18
|
|
161
|
+
|
|
162
|
+
### Fixed
|
|
163
|
+
|
|
164
|
+
- **Release Workflows**: Resolved issues preventing PyPI and NPM publishing
|
|
165
|
+
- Removed invalid `--release` flag from maturin publish
|
|
166
|
+
- Updated macOS runner version
|
|
167
|
+
- Fixed npm dependency installation and wasm-pack flags
|
|
168
|
+
|
|
169
|
+
## [0.6.0] - 2025-12-18
|
|
170
|
+
|
|
171
|
+
### Added
|
|
172
|
+
|
|
173
|
+
- **Expression Normalization Engine**: Canonical normalization for policy expressions
|
|
174
|
+
|
|
175
|
+
- Transforms expressions to canonical form for equivalence checking
|
|
176
|
+
- Implements boolean algebra simplifications (identity, idempotence, double negation)
|
|
177
|
+
- Commutative operand sorting for deterministic output
|
|
178
|
+
- Stable hashing via xxhash-rust for caching and comparison
|
|
179
|
+
|
|
180
|
+
- **`domainforge normalize` CLI Command**: New command for expression normalization
|
|
181
|
+
|
|
182
|
+
- Normalize policy expressions: `domainforge normalize "a AND b"`
|
|
183
|
+
- Check equivalence: `domainforge normalize "a AND b" --check-equiv "b AND a"`
|
|
184
|
+
- JSON output mode: `--json` for programmatic use
|
|
185
|
+
|
|
186
|
+
- **Expression Bindings**: Full Expression API across all language bindings
|
|
187
|
+
|
|
188
|
+
- **Python**: `Expression`, `NormalizedExpression`, `BinaryOp`, `UnaryOp`, `Quantifier`, `AggregateFunction`, `WindowSpec`
|
|
189
|
+
- **TypeScript**: Same APIs via napi-rs bindings
|
|
190
|
+
- **WASM**: Same APIs for browser environments
|
|
191
|
+
- Factory methods for all expression types (literals, variables, binary, unary, quantifiers, aggregations)
|
|
192
|
+
- `normalize()`, `is_equivalent()`, `stable_hash()` methods
|
|
193
|
+
|
|
194
|
+
- **ADR-001**: Architectural Decision Record for canonical normalizer design
|
|
195
|
+
|
|
196
|
+
### Changed
|
|
197
|
+
|
|
198
|
+
- **License**: Standardized to Apache-2.0 across all package configurations
|
|
199
|
+
- **Documentation**: Updated CLI reference and language binding docs with expression APIs
|
|
200
|
+
|
|
201
|
+
### Fixed
|
|
202
|
+
|
|
203
|
+
- **Parser Trailing Input Detection**: `parse_expression_from_str` now correctly rejects malformed expressions with unconsumed trailing input (e.g., `"NOT (a"` no longer parses as just `NOT`)
|
|
204
|
+
- **SBVR Test Expression**: Fixed invalid quantifier syntax in test data
|
|
205
|
+
- **CI Network Failures**: Added `RUSTUP_MAX_RETRIES: 10` to all Rust toolchain installations to handle transient network failures on macOS runners
|
|
206
|
+
- **Dependency Review**: Added BSL-1.0 to allowed licenses for xxhash-rust dependency
|
|
207
|
+
- **Rust Toolchain Action**: Added explicit `toolchain: stable` input to all `dtolnay/rust-toolchain@stable` action invocations
|
|
208
|
+
|
|
209
|
+
## [0.5.0] - 2025-12-17
|
|
210
|
+
|
|
211
|
+
### Changed
|
|
212
|
+
|
|
213
|
+
- **macOS CI Runners**: Updated from macos-13 to macos-14 (macos-13 retired Dec 2024)
|
|
214
|
+
- **Release Workflow**: Enhanced version syncing across pyproject.toml and package.json
|
|
215
|
+
|
|
216
|
+
### Fixed
|
|
217
|
+
|
|
218
|
+
- **CHANGELOG Update**: Fixed printf-based YAML generation to avoid comment parsing issues
|
|
219
|
+
- **PR Token**: Use dedicated token for creating pull requests
|
|
220
|
+
|
|
221
|
+
## [0.4.0] - 2025-12-15
|
|
222
|
+
|
|
223
|
+
### Added
|
|
224
|
+
|
|
225
|
+
- **ARM Platform Support**: Native binaries for Apple Silicon and ARM Linux
|
|
226
|
+
|
|
227
|
+
- `aarch64-apple-darwin` (Apple Silicon Macs)
|
|
228
|
+
- `aarch64-unknown-linux-gnu` (ARM Linux servers)
|
|
229
|
+
- Cross-compilation using `cross` and `zig` for CI builds
|
|
230
|
+
|
|
231
|
+
- **WASM npm Package**: `@domainforge/domainforge-core-wasm` now published to npm
|
|
232
|
+
|
|
233
|
+
- Enables browser-based SEA DSL parsing and formatting
|
|
234
|
+
- Published alongside existing napi bindings
|
|
235
|
+
|
|
236
|
+
- **Release Automation Workflow**: New `prepare-release.yml` for streamlined releases
|
|
237
|
+
|
|
238
|
+
- Automatic version bumping (major/minor/patch)
|
|
239
|
+
- CHANGELOG.md template generation
|
|
240
|
+
- PR creation with checklist
|
|
241
|
+
|
|
242
|
+
- **VS Code Multi-Root Workspace**: Configuration for monorepo development
|
|
243
|
+
- Unified workspace for domainforge, domainforge-lsp, and domainforge-vsc-extension
|
|
244
|
+
|
|
245
|
+
### Changed
|
|
246
|
+
|
|
247
|
+
- **CI/CD Improvements**:
|
|
248
|
+
|
|
249
|
+
- Harmonized WASM bundle size threshold to 2MB across CI and release workflows
|
|
250
|
+
- Better error handling in crates.io publishing (explicit "already published" detection)
|
|
251
|
+
- GitHub Release creation explicitly required for publishing workflows
|
|
252
|
+
|
|
253
|
+
- **Documentation**:
|
|
254
|
+
- Updated workflows README with comprehensive release process guide
|
|
255
|
+
- Added notes about `release: published` trigger requirement
|
|
256
|
+
|
|
257
|
+
### Fixed
|
|
258
|
+
|
|
259
|
+
- **Clippy Errors**: Resolved `field_reassign_with_default` and `collapsible_if` warnings
|
|
260
|
+
- **Test Expectations**: Updated `test_format_check` to expect success (format now implemented)
|
|
261
|
+
- **CodeRabbit Review Issues**: Addressed all 4 issues from automated review
|
|
262
|
+
- Fixed README release instructions
|
|
263
|
+
- Removed unsafe `--allow-dirty` from crates publish
|
|
264
|
+
- Fixed fragile sed patterns in CHANGELOG update
|
|
265
|
+
- Preserved backward-compatible job IDs
|
|
266
|
+
|
|
267
|
+
## [0.3.0] - 2025-12-14
|
|
268
|
+
|
|
269
|
+
### Added
|
|
270
|
+
|
|
271
|
+
- **SEA Formatter (`sea fmt`)**: New CLI command to format SEA source code
|
|
272
|
+
|
|
273
|
+
- Supports 14 declaration types (Entity, Resource, Flow, etc.)
|
|
274
|
+
- Indentation and spacing standardization
|
|
275
|
+
- Comment preservation (file headers)
|
|
276
|
+
- Sorting of imports
|
|
277
|
+
- `--check` flag for CI validation
|
|
278
|
+
|
|
279
|
+
- **Formatter Bindings**: Programmatic access to the formatter
|
|
280
|
+
|
|
281
|
+
- **Python**: `domainforge.format_source()`, `domainforge.check_format()`
|
|
282
|
+
- **TypeScript**: `formatSource()`, `checkFormat()` from `@godspeedai/domainforge`
|
|
283
|
+
- **WASM**: `formatSource()`, `checkFormat()` for browser environments
|
|
284
|
+
|
|
285
|
+
- **Documentation**:
|
|
286
|
+
- Comprehensive CLI reference for `fmt`
|
|
287
|
+
- Updated language binding APIs with formatter documentation
|
|
288
|
+
- Usage examples for all platforms
|
|
289
|
+
|
|
290
|
+
### Changed
|
|
291
|
+
|
|
292
|
+
- Updated dependencies to align with new features
|
|
293
|
+
- Enhanced documentation for all supported bindings
|
|
294
|
+
|
|
295
|
+
## [0.2.1] - 2025-12-14
|
|
296
|
+
|
|
297
|
+
### Added
|
|
298
|
+
|
|
299
|
+
- **Protobuf Projection Engine**: Full Protocol Buffers export support for SEA models
|
|
300
|
+
|
|
301
|
+
- Entity and Resource projection to Protobuf messages
|
|
302
|
+
- Type mapping from SEA types to proto scalar types
|
|
303
|
+
- Deterministic field numbering for schema stability
|
|
304
|
+
- CLI command: `domainforge project --format protobuf model.sea output.proto`
|
|
305
|
+
|
|
306
|
+
- **gRPC Service Generation**: Generate gRPC services from Flow patterns (Phase 2)
|
|
307
|
+
|
|
308
|
+
- Flows automatically become RPC methods
|
|
309
|
+
- Streaming support: `@streaming`, `@client_streaming`, `@bidirectional` attributes
|
|
310
|
+
- Service naming convention: `{DestinationEntity}Service`
|
|
311
|
+
|
|
312
|
+
- **Well-Known Types Support**: Automatic mapping to Google's WKT (Phase 1)
|
|
313
|
+
|
|
314
|
+
- `DateTime` → `google.protobuf.Timestamp`
|
|
315
|
+
- `Duration` → `google.protobuf.Duration`
|
|
316
|
+
- `Any` → `google.protobuf.Any`
|
|
317
|
+
- Auto-import generation for used WKT types
|
|
318
|
+
|
|
319
|
+
- **Custom Proto Options**: Per-file and per-message options (Phase 3)
|
|
320
|
+
|
|
321
|
+
- `--option java_package=com.example` CLI flag
|
|
322
|
+
- Support for `java_multiple_files`, `go_package`, `csharp_namespace`, etc.
|
|
323
|
+
- Custom option values in generated output
|
|
324
|
+
|
|
325
|
+
- **Schema Compatibility Checking**: Prevent breaking changes
|
|
326
|
+
|
|
327
|
+
- Three modes: `Additive`, `Backward`, `Breaking`
|
|
328
|
+
- Validates field additions, removals, renames, and type changes
|
|
329
|
+
- `--compatibility` and `--against` CLI flags
|
|
330
|
+
|
|
331
|
+
- **Buf.build Integration**: Optional CLI integration (Phase 4)
|
|
332
|
+
|
|
333
|
+
- `--buf-lint` for proto linting
|
|
334
|
+
- `--buf-breaking` for breaking change detection
|
|
335
|
+
- Graceful degradation when buf CLI not installed
|
|
336
|
+
- Auto-generation of `buf.yaml` and `buf.gen.yaml`
|
|
337
|
+
|
|
338
|
+
- **Multi-File Output**: Separate `.proto` files per namespace (Phase 5)
|
|
339
|
+
- `--multi-file --output-dir ./proto` CLI flags
|
|
340
|
+
- Fully qualified imports for cross-namespace references
|
|
341
|
+
- Directory structure mirrors package hierarchy
|
|
342
|
+
|
|
343
|
+
### Documentation
|
|
344
|
+
|
|
345
|
+
- New how-to guide: `docs/how-tos/export-to-protobuf.md`
|
|
346
|
+
- New API reference: `docs/reference/protobuf-api.md`
|
|
347
|
+
- Updated CLI reference with protobuf options
|
|
348
|
+
- Updated SDS-001 status to Implemented
|
|
349
|
+
|
|
350
|
+
## [0.2.0] - 2025-12-07
|
|
351
|
+
|
|
352
|
+
### Added
|
|
353
|
+
|
|
354
|
+
- **Bun Runtime Support**: Adopted Bun as the primary JavaScript runtime and package manager for TypeScript tooling, with Node.js as fallback
|
|
355
|
+
- **FINOS CALM Integration**: Full import/export support for architecture-as-code
|
|
356
|
+
- `export_calm()` and `import_calm()` methods across all bindings
|
|
357
|
+
- Policy (Constraint) export/import with SEA/SBVR expression formats
|
|
358
|
+
- Association mapping for relationship types
|
|
359
|
+
- **Namespace Registry Improvements**:
|
|
360
|
+
- `domainforge registry` CLI with `list` and `resolve` subcommands
|
|
361
|
+
- Longest-literal-prefix precedence for overlapping glob patterns
|
|
362
|
+
- Deterministic alphabetical tie-breaker for equal prefixes
|
|
363
|
+
- `--fail-on-ambiguity` flag for strict resolution
|
|
364
|
+
- Python, TypeScript, and WASM FFI bindings for registry operations
|
|
365
|
+
- **Instance Primitives**: New `Instance` class for entity type instances with named fields
|
|
366
|
+
- **Role and Relation Primitives**: Support for roles and relationships between entities
|
|
367
|
+
- **Enhanced Graph Methods**: `add_role()`, `add_relation()`, `add_policy()`, `add_association()`, `evaluate_policy()`, `set_evaluation_mode()`
|
|
368
|
+
- **Three-Valued Logic**: Policy evaluation with true/false/null semantics
|
|
369
|
+
|
|
370
|
+
### Changed
|
|
371
|
+
|
|
372
|
+
- **API Simplification**: Unified constructor patterns across Python/TypeScript/WASM
|
|
373
|
+
- Standard constructors instead of static factory methods
|
|
374
|
+
- Consistent `id()`, `name()`, `namespace()` method signatures
|
|
375
|
+
- **Documentation Updates**: Comprehensive README updates for all bindings
|
|
376
|
+
- Accurate API documentation matching actual implementations
|
|
377
|
+
- Updated test counts (544+ Rust tests across 69 test files)
|
|
378
|
+
- Fixed code examples with correct method signatures
|
|
379
|
+
|
|
380
|
+
### Fixed
|
|
381
|
+
|
|
382
|
+
- Module import/export correctness: wildcard imports require aliases, trailing commas allowed
|
|
383
|
+
- Parser keyword ambiguity resolved (fixed `Resource ... units` parsing)
|
|
384
|
+
- Cross-language binding stability: `ReferenceType` serialization fixes
|
|
385
|
+
- Parser entry options handle missing registry gracefully
|
|
386
|
+
- CI/CD optimizations with smarter caching strategies
|
|
387
|
+
|
|
388
|
+
## [0.1.0] - 2024-11-15
|
|
389
|
+
|
|
390
|
+
### Added
|
|
391
|
+
|
|
392
|
+
- Initial release with core SEA DSL primitives
|
|
393
|
+
- Entity, Resource, Flow, ResourceInstance primitives
|
|
394
|
+
- Graph-based domain modeling with validation
|
|
395
|
+
- Parser for SEA DSL syntax
|
|
396
|
+
- Python bindings via PyO3
|
|
397
|
+
- TypeScript bindings via napi-rs
|
|
398
|
+
- WASM bindings via wasm-bindgen
|
|
399
|
+
- CLI tool for validation and projection
|
|
400
|
+
- Knowledge Graph (RDF/Turtle) export
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# context-mode — MANDATORY routing rules
|
|
2
|
+
|
|
3
|
+
You have context-mode MCP tools available. These rules are NOT optional — they protect your context window from flooding. A single unrouted command can dump 56 KB into context and waste the entire session.
|
|
4
|
+
|
|
5
|
+
## BLOCKED commands — do NOT attempt these
|
|
6
|
+
|
|
7
|
+
### curl / wget — BLOCKED
|
|
8
|
+
Any Bash command containing `curl` or `wget` is intercepted and replaced with an error message. Do NOT retry.
|
|
9
|
+
Instead use:
|
|
10
|
+
- `ctx_fetch_and_index(url, source)` to fetch and index web pages
|
|
11
|
+
- `ctx_execute(language: "javascript", code: "const r = await fetch(...)")` to run HTTP calls in sandbox
|
|
12
|
+
|
|
13
|
+
### Inline HTTP — BLOCKED
|
|
14
|
+
Any Bash command containing `fetch('http`, `requests.get(`, `requests.post(`, `http.get(`, or `http.request(` is intercepted and replaced with an error message. Do NOT retry with Bash.
|
|
15
|
+
Instead use:
|
|
16
|
+
- `ctx_execute(language, code)` to run HTTP calls in sandbox — only stdout enters context
|
|
17
|
+
|
|
18
|
+
### WebFetch — BLOCKED
|
|
19
|
+
WebFetch calls are denied entirely. The URL is extracted and you are told to use `ctx_fetch_and_index` instead.
|
|
20
|
+
Instead use:
|
|
21
|
+
- `ctx_fetch_and_index(url, source)` then `ctx_search(queries)` to query the indexed content
|
|
22
|
+
|
|
23
|
+
## REDIRECTED tools — use sandbox equivalents
|
|
24
|
+
|
|
25
|
+
### Bash (>20 lines output)
|
|
26
|
+
Bash is ONLY for: `git`, `mkdir`, `rm`, `mv`, `cd`, `ls`, `npm install`, `pip install`, and other short-output commands.
|
|
27
|
+
For everything else, use:
|
|
28
|
+
- `ctx_batch_execute(commands, queries)` — run multiple commands + search in ONE call
|
|
29
|
+
- `ctx_execute(language: "shell", code: "...")` — run in sandbox, only stdout enters context
|
|
30
|
+
|
|
31
|
+
### Read (for analysis)
|
|
32
|
+
If you are reading a file to **Edit** it → Read is correct (Edit needs content in context).
|
|
33
|
+
If you are reading to **analyze, explore, or summarize** → use `ctx_execute_file(path, language, code)` instead. Only your printed summary enters context. The raw file content stays in the sandbox.
|
|
34
|
+
|
|
35
|
+
### Grep (large results)
|
|
36
|
+
Grep results can flood context. Use `ctx_execute(language: "shell", code: "grep ...")` to run searches in sandbox. Only your printed summary enters context.
|
|
37
|
+
|
|
38
|
+
## Tool selection hierarchy
|
|
39
|
+
|
|
40
|
+
1. **GATHER**: `ctx_batch_execute(commands, queries)` — Primary tool. Runs all commands, auto-indexes output, returns search results. ONE call replaces 30+ individual calls.
|
|
41
|
+
2. **FOLLOW-UP**: `ctx_search(queries: ["q1", "q2", ...])` — Query indexed content. Pass ALL questions as array in ONE call.
|
|
42
|
+
3. **PROCESSING**: `ctx_execute(language, code)` | `ctx_execute_file(path, language, code)` — Sandbox execution. Only stdout enters context.
|
|
43
|
+
4. **WEB**: `ctx_fetch_and_index(url, source)` then `ctx_search(queries)` — Fetch, chunk, index, query. Raw HTML never enters context.
|
|
44
|
+
5. **INDEX**: `ctx_index(content, source)` — Store content in FTS5 knowledge base for later search.
|
|
45
|
+
|
|
46
|
+
## Subagent routing
|
|
47
|
+
|
|
48
|
+
When spawning subagents (Agent/Task tool), the routing block is automatically injected into their prompt. Bash-type subagents are upgraded to general-purpose so they have access to MCP tools. You do NOT need to manually instruct subagents about context-mode.
|
|
49
|
+
|
|
50
|
+
## Output constraints
|
|
51
|
+
|
|
52
|
+
- Keep responses under 500 words.
|
|
53
|
+
- Write artifacts (code, configs, PRDs) to FILES — never return them as inline text. Return only: file path + 1-line description.
|
|
54
|
+
- When indexing content, use descriptive source labels so others can `ctx_search(source: "label")` later.
|
|
55
|
+
|
|
56
|
+
## ctx commands
|
|
57
|
+
|
|
58
|
+
| Command | Action |
|
|
59
|
+
|---------|--------|
|
|
60
|
+
| `ctx stats` | Call the `ctx_stats` MCP tool and display the full output verbatim |
|
|
61
|
+
| `ctx doctor` | Call the `ctx_doctor` MCP tool, run the returned shell command, display as checklist |
|
|
62
|
+
| `ctx upgrade` | Call the `ctx_upgrade` MCP tool, run the returned shell command, display as checklist |
|