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,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"mcp__plugin_context-mode_context-mode__ctx_batch_execute",
|
|
5
|
+
"mcp__headroom__headroom_retrieve",
|
|
6
|
+
"Bash(git -C /home/sprime01/projects/domainforge diff --stat)",
|
|
7
|
+
"Bash(cargo update:*)",
|
|
8
|
+
"Bash(git -C /home/sprime01/projects/domainforge status)",
|
|
9
|
+
"Bash(git add:*)",
|
|
10
|
+
"Bash(git commit -m \"$\\(cat <<''EOF''\nfix\\(release\\): use linked-versions and sync all components to 0.12.0\n\nThe multi-component release pipeline was broken because release-please\nonly created tags for sea-core \\(where Rust source lives\\), leaving\nsea-dsl and sea-typescript stuck at 0.11.0 with no tags to trigger\ndeploy.yml. This adds the linked-versions plugin so all three components\nrelease together, removes the orphaned v*-triggered release.yml, and\nremoves duplicate --manifest-path flags in release-pypi.yml.\n\nCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>\nEOF\n\\)\")",
|
|
11
|
+
"Bash(gh run view:*)",
|
|
12
|
+
"Bash(gh api:*)",
|
|
13
|
+
"Bash(git -C /home/sprime01/projects/domainforge show HEAD:.github/workflows/release-npm.yml)",
|
|
14
|
+
"Bash(git -C /home/sprime01/projects/domainforge show HEAD:.github/workflows/release-crates.yml)",
|
|
15
|
+
"Bash(gh pr create:*)"
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
package/.coderabbit.yml
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
language: en-US
|
|
2
|
+
tone_instructions: "Focus only on critical issues; Generate concise, actionable, and unambiguous fix instructions. Specify exact file paths and edits; focus on mechanical details required for automated or manual application. Focus on critical issues only."
|
|
3
|
+
reviews:
|
|
4
|
+
profile: assertive
|
|
5
|
+
commit_status: true
|
|
6
|
+
fail_commit_status: true
|
|
7
|
+
auto_review:
|
|
8
|
+
enabled: true
|
|
9
|
+
drafts: false
|
|
10
|
+
base_branches:
|
|
11
|
+
- main
|
|
12
|
+
- dev
|
|
13
|
+
- release/*
|
|
14
|
+
# Tools configuration
|
|
15
|
+
tools:
|
|
16
|
+
# Rust tooling
|
|
17
|
+
clippy:
|
|
18
|
+
enabled: true
|
|
19
|
+
# Python tooling
|
|
20
|
+
ruff:
|
|
21
|
+
enabled: true
|
|
22
|
+
request_changes_workflow: true
|
|
23
|
+
high_level_summary: true
|
|
24
|
+
poem: false
|
|
25
|
+
review_status: true
|
|
26
|
+
collapse_walkthrough: false
|
|
27
|
+
path_filters:
|
|
28
|
+
- "!**/target/**"
|
|
29
|
+
- "!**/node_modules/**"
|
|
30
|
+
- "!**/*.lock"
|
|
31
|
+
auto_title_placeholder: "@coderabbitai"
|
|
32
|
+
auto_title_instructions: "Start titles with a conventional prefix such as feat, fix, chore, docs, test, or refactor followed by a brief summary."
|
|
33
|
+
knowledge_base:
|
|
34
|
+
code_guidelines:
|
|
35
|
+
enabled: true
|
|
36
|
+
filePatterns:
|
|
37
|
+
- "docs/**/*.md"
|
|
38
|
+
- "domainforge-core/**/*.rs"
|
|
39
|
+
- "domainforge-core/**/*.py"
|
|
40
|
+
- "tests/**/*.rs"
|
|
41
|
+
- "tests/**/*.py"
|
|
42
|
+
chat:
|
|
43
|
+
auto_reply: true
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: release-management
|
|
3
|
+
description: Use when cutting, shipping, promoting, diagnosing, or previewing DomainForge releases, release-please PRs, component tags, deploy triggers, or release readiness.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Release Management
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
DomainForge releases use release-please manifest mode on `main`, independent
|
|
11
|
+
per-package versions, component-prefixed tags, and a tag-triggered deploy
|
|
12
|
+
workflow that dispatches to existing publish workflows. All protected-branch
|
|
13
|
+
checks on `main` must pass.
|
|
14
|
+
|
|
15
|
+
## Current Release Model
|
|
16
|
+
|
|
17
|
+
| Package key | Component | Tag | Layout |
|
|
18
|
+
|---|---|---|---|
|
|
19
|
+
| `domainforge-core` | `domainforge-core` | `domainforge-core-vX.Y.Z` | `domainforge-core/` |
|
|
20
|
+
| `domainforge-python` | `domainforge` | `domainforge-vX.Y.Z` | `domainforge-python/` |
|
|
21
|
+
| `domainforge-typescript` | `domainforge-typescript` | `domainforge-typescript-vX.Y.Z` | `domainforge-typescript/` |
|
|
22
|
+
|
|
23
|
+
Release PRs are opened or updated by `.github/workflows/release-please.yml`
|
|
24
|
+
after pushes to `main`. Merging a release-please PR creates the matching
|
|
25
|
+
component tag. Component tags trigger `.github/workflows/deploy.yml`, which
|
|
26
|
+
parses the tag and dispatches to the appropriate reusable publish workflow:
|
|
27
|
+
|
|
28
|
+
- `domainforge-core-v*` → `release-crates.yml` (crates.io)
|
|
29
|
+
- `domainforge-v*` → `release-pypi.yml` (PyPI wheels, multi-platform matrix)
|
|
30
|
+
- `domainforge-typescript-v*` → `release-npm.yml` (npm + WASM)
|
|
31
|
+
|
|
32
|
+
There is intentionally no separate `prod` GitHub environment gate. This is a
|
|
33
|
+
solo-maintainer repository: CI on `main` is the merge gate, and a component
|
|
34
|
+
tag push is the publish signal. The publish workflows handle their own
|
|
35
|
+
idempotency (`--skip-existing`, `npm view` checks, cargo "already published"
|
|
36
|
+
detection).
|
|
37
|
+
|
|
38
|
+
Treat older `v*.*.*` release scripts and `docs/RELEASE_PROCESS.md` as legacy
|
|
39
|
+
unless the user explicitly asks for that path.
|
|
40
|
+
|
|
41
|
+
## Hard Rules
|
|
42
|
+
|
|
43
|
+
1. Never hand-edit changelogs, manifests, or package versions for a release.
|
|
44
|
+
release-please owns those files.
|
|
45
|
+
2. Never push release tags manually. Tags come from merging release-please PRs.
|
|
46
|
+
3. Always run a dry-run before saying what a release will contain.
|
|
47
|
+
4. Check commit scopes before blaming release-please. Invalid scopes can place
|
|
48
|
+
changes in the wrong package or hide them from a component changelog.
|
|
49
|
+
5. Do not assume a `prod` environment or branch exists. This repo only has
|
|
50
|
+
`main`. Tag push → publish workflow → registry.
|
|
51
|
+
|
|
52
|
+
## Quick Commands
|
|
53
|
+
|
|
54
|
+
| Need | Command |
|
|
55
|
+
|---|---|
|
|
56
|
+
| Preview release plan | `.codex/skills/release-management/scripts/release-dryrun.sh` |
|
|
57
|
+
| Required checks on a PR | `gh pr checks <number>` |
|
|
58
|
+
| Release PRs | `gh pr list --search "release in:title" --state open` |
|
|
59
|
+
| Tags on origin | `git ls-remote --tags origin 'refs/tags/*-v*'` |
|
|
60
|
+
| Deploy runs | `gh run list --workflow deploy.yml --limit 10` |
|
|
61
|
+
|
|
62
|
+
## Workflows
|
|
63
|
+
|
|
64
|
+
### What will the next release contain?
|
|
65
|
+
|
|
66
|
+
Run the dry-run script from the repo root. Report each component's current
|
|
67
|
+
version, proposed version, bump reason, and changelog delta. Do not commit.
|
|
68
|
+
|
|
69
|
+
### Cut or ship a release
|
|
70
|
+
|
|
71
|
+
1. Confirm `main` is green with the latest required checks.
|
|
72
|
+
2. Run the dry-run and summarize proposed component releases.
|
|
73
|
+
3. Confirm release PRs exist. If missing, inspect `release-please.yml` runs and
|
|
74
|
+
`CREATE_PR_TOKEN`; `GITHUB_TOKEN` cannot trigger downstream tag workflows.
|
|
75
|
+
4. If the user explicitly authorizes merging, merge the release PR. Otherwise
|
|
76
|
+
tell the user which release PR to merge.
|
|
77
|
+
5. After merge, verify the component tag exists and the expected publish
|
|
78
|
+
workflow (`release-crates.yml` / `release-pypi.yml` / `release-npm.yml`)
|
|
79
|
+
started via `deploy.yml`.
|
|
80
|
+
|
|
81
|
+
### Publish did not trigger
|
|
82
|
+
|
|
83
|
+
Check in order:
|
|
84
|
+
|
|
85
|
+
1. Tag exists: `git ls-remote --tags origin 'refs/tags/*-v*'`.
|
|
86
|
+
2. Tag matches `deploy.yml`: `domainforge-core-v*`, `domainforge-v*`, or `domainforge-typescript-v*`.
|
|
87
|
+
3. Tag came from release-please using `CREATE_PR_TOKEN`, not `GITHUB_TOKEN`.
|
|
88
|
+
4. `deploy.yml` has not been disabled and Actions permissions are healthy.
|
|
89
|
+
5. The dispatchable publish workflow file exists and is not disabled.
|
|
90
|
+
|
|
91
|
+
### Add a package to release-please
|
|
92
|
+
|
|
93
|
+
1. Add package config to `release-please-config.json`.
|
|
94
|
+
2. Add current version to `.release-please-manifest.json`.
|
|
95
|
+
3. Create a directory at repo root named after the package key (release-please
|
|
96
|
+
resolves file paths as `<package-key>/<file>`).
|
|
97
|
+
4. Move the package's version file (pyproject.toml, package.json, Cargo.toml)
|
|
98
|
+
into that directory with relative paths adjusted to reach `domainforge-core/`.
|
|
99
|
+
5. Add a `deploy-<component>` job to `deploy.yml` that dispatches to the
|
|
100
|
+
appropriate publish workflow, gated by `if: needs.identify.outputs.component == '<component>'`.
|
|
101
|
+
6. Add the component to `commitlint.config.cjs` scope-enum (if you maintain one).
|
|
102
|
+
7. Update `docs/governance.md`.
|
|
103
|
+
8. Run the dry-run and focused workflow validation.
|
|
104
|
+
|
|
105
|
+
### Rename a component / bootstrap a renamed package
|
|
106
|
+
|
|
107
|
+
Renaming a component (e.g. `sea-core` -> `domainforge-core`) or relaunching
|
|
108
|
+
under new registry names breaks release-please's continuity: the old
|
|
109
|
+
`<old-component>-v*` tags no longer match the new component names, so
|
|
110
|
+
release-please reports `No user facing commits found since - skipping`. The
|
|
111
|
+
historical commits also reference the old paths, so path-based attribution
|
|
112
|
+
stops matching, and a rename committed as a hidden type (`chore`) does not
|
|
113
|
+
trigger a release on its own.
|
|
114
|
+
|
|
115
|
+
To cut the first release under the new names:
|
|
116
|
+
|
|
117
|
+
1. Update `release-please-config.json` package keys, `component`, and
|
|
118
|
+
`package-name` to the new names (done by the rename commit).
|
|
119
|
+
2. Update `.release-please-manifest.json` keys to the new package keys with the
|
|
120
|
+
current version as the starting point.
|
|
121
|
+
3. Add a per-package `"release-as": "<X.Y.Z>"` to `release-please-config.json`
|
|
122
|
+
for each renamed component to force the bootstrap release at the intended
|
|
123
|
+
version. release-please then opens a release PR even though no conventional
|
|
124
|
+
user-facing commit is attributed to the new components yet.
|
|
125
|
+
4. Merge the release PR, confirm the new `<component>-v*` tags appear, and that
|
|
126
|
+
`deploy.yml` dispatches the publish workflows.
|
|
127
|
+
5. After the first release ships, **remove `release-as`** from the config —
|
|
128
|
+
otherwise it pins every future release to that version.
|
|
129
|
+
|
|
130
|
+
## Common Mistakes
|
|
131
|
+
|
|
132
|
+
| Mistake | Correction |
|
|
133
|
+
|---|---|
|
|
134
|
+
| Looking for `dev`, `stage`, or `prod` branches | Use `main`; this repo has only `main`. Tags trigger publish directly. |
|
|
135
|
+
| Looking for `prod` environment gate | None exists. Publish workflows are dispatched by `deploy.yml` on tag push. |
|
|
136
|
+
| Asking for approval before merge | Required approvals are `0`; required checks still block merge. |
|
|
137
|
+
| Manually creating tags to unblock publish | Fix release-please or merge the release PR. |
|
|
138
|
+
| Treating old local release scripts as canonical | Use release-please unless the user requests legacy scripts. |
|
|
139
|
+
| Putting package version files at repo root | release-please requires them under `<package-key>/`. Root-level packages must have a directory. |
|
|
140
|
+
| Treating `deploy.yml` as a builder | `deploy.yml` is a router. The publish workflows own build + publish logic. |
|
|
141
|
+
| Listing the workspace-root `Cargo.lock` in a package's `extra-files` | release-please resolves `extra-files` relative to the package dir and **rejects `..`** (`illegal pathing characters`). For `domainforge-core` (whose lockfile lives at the workspace root), omit `Cargo.lock` from `extra-files` — the rust strategy bumps `Cargo.toml`, and the lockfile regenerates during the publish build. |
|
|
142
|
+
| Leaving `release-as` in the config after the bootstrap release | `release-as` pins the version. Add it to force the first release of a renamed component, then remove it once the tag lands. |
|
|
143
|
+
|
|
144
|
+
## References
|
|
145
|
+
|
|
146
|
+
- Config: `release-please-config.json`, `.release-please-manifest.json`
|
|
147
|
+
- Router: `.github/workflows/deploy.yml`
|
|
148
|
+
- Publish workflows: `.github/workflows/release-crates.yml`, `release-pypi.yml`, `release-npm.yml`
|
|
149
|
+
- Release-please trigger: `.github/workflows/release-please.yml`
|
|
150
|
+
- Governance: `docs/governance.md`
|
|
151
|
+
- Commit rules: `commitlint.config.cjs`
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
name: "Decrypt Secrets"
|
|
2
|
+
description: "Install sops and decrypt secrets using age"
|
|
3
|
+
inputs:
|
|
4
|
+
sops-age-key:
|
|
5
|
+
description: "The age private key for decrypting secrets"
|
|
6
|
+
required: true
|
|
7
|
+
outputs:
|
|
8
|
+
pypi-api-token:
|
|
9
|
+
description: "PyPI API token"
|
|
10
|
+
value: ${{ steps.extract.outputs.pypi-api-token }}
|
|
11
|
+
pypi-test-api-token:
|
|
12
|
+
description: "PyPI Test API token"
|
|
13
|
+
value: ${{ steps.extract.outputs.pypi-test-api-token }}
|
|
14
|
+
npm-token:
|
|
15
|
+
description: "NPM token"
|
|
16
|
+
value: ${{ steps.extract.outputs.npm-token }}
|
|
17
|
+
cargo-registry-token:
|
|
18
|
+
description: "Cargo registry token"
|
|
19
|
+
value: ${{ steps.extract.outputs.cargo-registry-token }}
|
|
20
|
+
|
|
21
|
+
runs:
|
|
22
|
+
using: "composite"
|
|
23
|
+
steps:
|
|
24
|
+
- name: Install sops
|
|
25
|
+
shell: bash
|
|
26
|
+
run: |
|
|
27
|
+
SOPS_VERSION="3.9.4"
|
|
28
|
+
case "$RUNNER_OS" in
|
|
29
|
+
Linux)
|
|
30
|
+
SOPS_BINARY="sops-v${SOPS_VERSION}.linux.amd64"
|
|
31
|
+
SOPS_SHA256="5488e32bc471de7982ad895dd054bbab3ab91c417a118426134551e9626e4e85"
|
|
32
|
+
SOPS_EXT=""
|
|
33
|
+
;;
|
|
34
|
+
macOS)
|
|
35
|
+
SOPS_BINARY="sops-v${SOPS_VERSION}.darwin.amd64"
|
|
36
|
+
SOPS_SHA256="f48d73efc278326e54d0e6a056b285fd8f5f28549b19aff9b0fedbbdd846b20c"
|
|
37
|
+
SOPS_EXT=""
|
|
38
|
+
;;
|
|
39
|
+
Windows)
|
|
40
|
+
SOPS_BINARY="sops-v${SOPS_VERSION}.exe"
|
|
41
|
+
SOPS_SHA256="bee270926fc55b5b89ed9ce87fb2569a36c74e99d63e6392090b3d0f0c2775eb"
|
|
42
|
+
SOPS_EXT=".exe"
|
|
43
|
+
;;
|
|
44
|
+
*)
|
|
45
|
+
echo "Unsupported OS: $RUNNER_OS"
|
|
46
|
+
exit 1
|
|
47
|
+
;;
|
|
48
|
+
esac
|
|
49
|
+
|
|
50
|
+
DOWNLOAD_DIR="$RUNNER_TEMP/sops-download"
|
|
51
|
+
mkdir -p "$DOWNLOAD_DIR"
|
|
52
|
+
curl -sSLo "$DOWNLOAD_DIR/sops${SOPS_EXT}" "https://github.com/getsops/sops/releases/download/v${SOPS_VERSION}/${SOPS_BINARY}"
|
|
53
|
+
|
|
54
|
+
if command -v sha256sum >/dev/null 2>&1; then
|
|
55
|
+
ACTUAL_SHA256=$(sha256sum "$DOWNLOAD_DIR/sops${SOPS_EXT}" | cut -d' ' -f1 | tr -d '\\')
|
|
56
|
+
elif command -v shasum >/dev/null 2>&1; then
|
|
57
|
+
ACTUAL_SHA256=$(shasum -a 256 "$DOWNLOAD_DIR/sops${SOPS_EXT}" | cut -d' ' -f1 | tr -d '\\')
|
|
58
|
+
else
|
|
59
|
+
echo "::error::No SHA256 tool available on runner"
|
|
60
|
+
rm -f "$DOWNLOAD_DIR/sops${SOPS_EXT}"
|
|
61
|
+
exit 1
|
|
62
|
+
fi
|
|
63
|
+
if [ -z "$ACTUAL_SHA256" ]; then
|
|
64
|
+
echo "::error::SHA256 calculation failed for sops binary"
|
|
65
|
+
rm -f "$DOWNLOAD_DIR/sops${SOPS_EXT}"
|
|
66
|
+
exit 1
|
|
67
|
+
fi
|
|
68
|
+
if [ "$ACTUAL_SHA256" != "$SOPS_SHA256" ]; then
|
|
69
|
+
echo "::error::SHA256 mismatch for sops binary. Expected: $SOPS_SHA256, Got: $ACTUAL_SHA256"
|
|
70
|
+
rm -f "$DOWNLOAD_DIR/sops${SOPS_EXT}"
|
|
71
|
+
exit 1
|
|
72
|
+
fi
|
|
73
|
+
echo "SHA256 verified: $ACTUAL_SHA256"
|
|
74
|
+
chmod +x "$DOWNLOAD_DIR/sops${SOPS_EXT}"
|
|
75
|
+
|
|
76
|
+
if [[ "$RUNNER_OS" == "Windows" ]]; then
|
|
77
|
+
mkdir -p "$RUNNER_TEMP/bin"
|
|
78
|
+
mv "$DOWNLOAD_DIR/sops${SOPS_EXT}" "$RUNNER_TEMP/bin/sops${SOPS_EXT}"
|
|
79
|
+
echo "$RUNNER_TEMP/bin" >> $GITHUB_PATH
|
|
80
|
+
"$RUNNER_TEMP/bin/sops${SOPS_EXT}" --version
|
|
81
|
+
else
|
|
82
|
+
mkdir -p $HOME/.local/bin
|
|
83
|
+
mv "$DOWNLOAD_DIR/sops" $HOME/.local/bin/sops
|
|
84
|
+
chmod +x $HOME/.local/bin/sops
|
|
85
|
+
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
|
86
|
+
$HOME/.local/bin/sops --version
|
|
87
|
+
fi
|
|
88
|
+
rm -rf "$DOWNLOAD_DIR"
|
|
89
|
+
|
|
90
|
+
- name: Decrypt secrets
|
|
91
|
+
id: extract
|
|
92
|
+
shell: bash
|
|
93
|
+
env:
|
|
94
|
+
SOPS_AGE_KEY: ${{ inputs.sops-age-key }}
|
|
95
|
+
run: |
|
|
96
|
+
# Use RUNNER_TEMP for cross-platform temp file
|
|
97
|
+
TEMP_FILE="$RUNNER_TEMP/decrypted-secrets.yaml"
|
|
98
|
+
|
|
99
|
+
# Decrypt secrets to temp file
|
|
100
|
+
sops --decrypt secrets/secrets.yaml > "$TEMP_FILE"
|
|
101
|
+
|
|
102
|
+
# Extract values and set as outputs (masked)
|
|
103
|
+
PYPI_API_TOKEN=$(grep -E '^PYPI_API_TOKEN:' "$TEMP_FILE" | cut -d':' -f2- | sed -E 's/^ *"?//; s/"?$//' || echo "")
|
|
104
|
+
PYPI_TEST_API_TOKEN=$(grep -E '^PYPI_TEST_API_TOKEN:' "$TEMP_FILE" | cut -d':' -f2- | sed -E 's/^ *"?//; s/"?$//' || echo "")
|
|
105
|
+
NPM_TOKEN=$(grep -E '^NPM_TOKEN:' "$TEMP_FILE" | cut -d':' -f2- | sed -E 's/^ *"?//; s/"?$//' || echo "")
|
|
106
|
+
CARGO_REGISTRY_TOKEN=$(grep -E '^CARGO_REGISTRY_TOKEN:' "$TEMP_FILE" | cut -d':' -f2- | sed -E 's/^ *"?//; s/"?$//' || echo "")
|
|
107
|
+
|
|
108
|
+
# Mask secrets in logs
|
|
109
|
+
echo "::add-mask::${PYPI_API_TOKEN}"
|
|
110
|
+
echo "::add-mask::${PYPI_TEST_API_TOKEN}"
|
|
111
|
+
echo "::add-mask::${NPM_TOKEN}"
|
|
112
|
+
echo "::add-mask::${CARGO_REGISTRY_TOKEN}"
|
|
113
|
+
|
|
114
|
+
# Set outputs
|
|
115
|
+
echo "pypi-api-token=${PYPI_API_TOKEN}" >> $GITHUB_OUTPUT
|
|
116
|
+
echo "pypi-test-api-token=${PYPI_TEST_API_TOKEN}" >> $GITHUB_OUTPUT
|
|
117
|
+
echo "npm-token=${NPM_TOKEN}" >> $GITHUB_OUTPUT
|
|
118
|
+
echo "cargo-registry-token=${CARGO_REGISTRY_TOKEN}" >> $GITHUB_OUTPUT
|
|
119
|
+
|
|
120
|
+
# Clean up
|
|
121
|
+
rm -f "$TEMP_FILE"
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Autonomous code-execution agent that plans, runs, and verifies multi-step coding tasks using MCP tools with minimal user intervention.
|
|
3
|
+
tools: ["runCommands", "runTasks", "Context7/*", "Exa Search/*", "Memory Tool/*", "microsoftdocs/mcp/*", "Ref/*", "Vibe Check/*", "edit", "search", "Nx Mcp Server/*", "pylance mcp server/*", "todos", "runSubagent", "runTests", "usages", "vscodeAPI", "problems", "changes", "testFailure", "fetch", "githubRepo", "github.vscode-pull-request-github/copilotCodingAgent", "github.vscode-pull-request-github/issue_fetch", "github.vscode-pull-request-github/suggest-fix", "github.vscode-pull-request-github/searchSyntax", "github.vscode-pull-request-github/doSearch", "github.vscode-pull-request-github/renderIssues", "github.vscode-pull-request-github/activePullRequest", "github.vscode-pull-request-github/openPullRequest", "ms-python.python/getPythonEnvironmentInfo", "ms-python.python/getPythonExecutableCommand", "ms-python.python/installPythonPackage", "ms-python.python/configurePythonEnvironment"]
|
|
4
|
+
handoffs:
|
|
5
|
+
- label: "Deep Research / Audit"
|
|
6
|
+
agent: "DeepResearch"
|
|
7
|
+
prompt: "I need a deep investigation or audit before I can proceed. Here is the context and what I need to find out:"
|
|
8
|
+
send: true
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
You are an autonomous senior software architect and pair-programmer.
|
|
12
|
+
Your mission: take multi-step coding tasks from intent to working, verified code with minimal user intervention.
|
|
13
|
+
|
|
14
|
+
# Core Responsibilities
|
|
15
|
+
|
|
16
|
+
1. **Orchestrate**: Delegate _research_ and _discovery_ to `DeepResearch`.
|
|
17
|
+
2. **Execute**: You are the primary builder. Handle **ALL** code changes, from one-liners to multi-file refactors.
|
|
18
|
+
3. **Verify**: Always run tests or build commands to verify changes.
|
|
19
|
+
4. **Persist**: Store key decisions and learnings in memory using `add-memory`.
|
|
20
|
+
|
|
21
|
+
# Operational Workflow
|
|
22
|
+
|
|
23
|
+
For every request, follow this loop:
|
|
24
|
+
|
|
25
|
+
1. **Contextualize**
|
|
26
|
+
- Use `search-memory` to retrieve project conventions and past decisions.
|
|
27
|
+
- Use `ref_search_documentation` (Ref) to search private repos, PDFs, or external docs efficiently.
|
|
28
|
+
- Use `search` or `githubRepo` to locate relevant files.
|
|
29
|
+
|
|
30
|
+
2. **Orchestrate (The "Manager" Check)**
|
|
31
|
+
- **Ask yourself**: "Do I know _what_ to build, or do I need to research _how_?"
|
|
32
|
+
- **IF RESEARCH NEEDED**: Use `runSubagent` (DeepResearch) or the Handoff button.
|
|
33
|
+
- **IF READY TO BUILD**: Proceed to Execute.
|
|
34
|
+
|
|
35
|
+
3. **Execute (The "Doer" Phase)**
|
|
36
|
+
- **Tool Chain Strategy**:
|
|
37
|
+
1. **Pre-Code Context**: Use `get-library-docs` (Context7) if using a new library to avoid hallucinations.
|
|
38
|
+
2. **Pre-Code Check**: Use `vibe_check` ("Am I over-engineering this?").
|
|
39
|
+
3. **Implementation**: `edit` -> `runTests`.
|
|
40
|
+
4. **Post-Code Check**: Use `vibe_check` ("Did I introduce any regressions?").
|
|
41
|
+
- **Loop**: Pick the next independent step -> Edit -> Verify.
|
|
42
|
+
- _Constraint_: Never edit > 2 files without an intermediate verification step.
|
|
43
|
+
|
|
44
|
+
4. **Verify (CRITICAL)**
|
|
45
|
+
- IMMEDIATELY after editing, attempt to verify.
|
|
46
|
+
- Run relevant tests (`npm test`, `nx test`, etc.) or linters.
|
|
47
|
+
- If verification fails, analyze the error, fix it, and retry.
|
|
48
|
+
|
|
49
|
+
5. **Persist**
|
|
50
|
+
- Use `memory_store` to save new patterns or architectural decisions.
|
|
51
|
+
|
|
52
|
+
# Delegation Strategy (Subagents)
|
|
53
|
+
|
|
54
|
+
**ALWAYS** delegate to `DeepResearch` (`runSubagent`) for:
|
|
55
|
+
|
|
56
|
+
- **Deep Research**: "Compare Auth0 vs Firebase", "How do I use X library?".
|
|
57
|
+
- **Broad Analysis**: "Audit all API endpoints for security".
|
|
58
|
+
- **Unknowns**: "I don't know where the bug is, investigate first."
|
|
59
|
+
|
|
60
|
+
**DO NOT** delegate implementation. You write the code.
|
|
61
|
+
|
|
62
|
+
**Subagent Prompt Structure**:
|
|
63
|
+
When calling `runSubagent`, prepend this context to the task:
|
|
64
|
+
|
|
65
|
+
> "You are a subagent working for the Lead Architect.
|
|
66
|
+
> **Goal**: [One clear sentence]
|
|
67
|
+
> **Scope**: [Specific files/folders]
|
|
68
|
+
> **Deliverable**: [Specific output, e.g., 'Comparison Matrix', 'Refactor Plan']"
|
|
69
|
+
|
|
70
|
+
**Result Synthesis**:
|
|
71
|
+
When a subagent returns:
|
|
72
|
+
|
|
73
|
+
- **Summarize**: Extract 3-5 key bullet points.
|
|
74
|
+
- **Decide**: State your decision based on the findings.
|
|
75
|
+
- **Act**: Move immediately to implementation or next steps.
|
|
76
|
+
- _Do not_ copy-paste the raw subagent output.
|
|
77
|
+
|
|
78
|
+
# Tool Use Guidelines
|
|
79
|
+
|
|
80
|
+
- **Bias for Action**: Don't ask for permission to use standard tools.
|
|
81
|
+
- **Memory**: Always check memory first.
|
|
82
|
+
- **Vibe Check**: Periodically use `vibe_check` to ensure you aren't getting stuck or cluttering the chat.
|
|
83
|
+
|
|
84
|
+
# Communication Protocol
|
|
85
|
+
|
|
86
|
+
Keep responses concise and structured:
|
|
87
|
+
|
|
88
|
+
- **Analysis**: Brief summary of the problem/context.
|
|
89
|
+
- **Plan**: Bullet points of next steps.
|
|
90
|
+
- **Action**: What you just did (e.g., "Updated `auth.ts`").
|
|
91
|
+
- **Verification**: Result of tests/checks (e.g., "Tests passed").
|
|
92
|
+
|
|
93
|
+
# Constraints
|
|
94
|
+
|
|
95
|
+
- **Never** guess API methods. Check documentation or source code first.
|
|
96
|
+
- **Never** leave the codebase in a broken state without explicit user acknowledgement.
|
|
97
|
+
- **Always** prefer existing project patterns over new ones.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Specialized Research & Analysis Agent – Use this for deep-dive investigations, comparisons, and audits without modifying code."
|
|
3
|
+
tools: ["runCommands", "runTasks", "Context7/*", "Exa Search/*", "Memory Tool/*", "microsoftdocs/mcp/*", "Ref/*", "Vibe Check/*", "search", "Nx Mcp Server/*", "pylance mcp server/*", "todos", "usages", "vscodeAPI", "problems", "changes", "testFailure", "fetch", "githubRepo", "github.vscode-pull-request-github/copilotCodingAgent", "github.vscode-pull-request-github/issue_fetch", "github.vscode-pull-request-github/suggest-fix", "github.vscode-pull-request-github/searchSyntax", "github.vscode-pull-request-github/doSearch", "github.vscode-pull-request-github/renderIssues", "github.vscode-pull-request-github/activePullRequest", "github.vscode-pull-request-github/openPullRequest"]
|
|
4
|
+
handoffs:
|
|
5
|
+
- label: "Implement Findings"
|
|
6
|
+
agent: "Coder"
|
|
7
|
+
prompt: "Based on the research findings above, please proceed with the implementation. Here is the plan:"
|
|
8
|
+
send: true
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
You are the **Research Specialist**.
|
|
12
|
+
Your mission: Conduct deep, isolated investigations and return structured, decision-ready findings. You do NOT write production code. If the user gives you a task provide them with a detailed research based prompt for the Coder agent to implement.
|
|
13
|
+
|
|
14
|
+
# When to Use Me
|
|
15
|
+
|
|
16
|
+
Use this agent directly when you want to:
|
|
17
|
+
|
|
18
|
+
- Compare libraries or architectural patterns.
|
|
19
|
+
- Audit the codebase for specific patterns or security issues.
|
|
20
|
+
- Understand a complex module before starting work.
|
|
21
|
+
- Generate documentation or migration plans.
|
|
22
|
+
|
|
23
|
+
# Operational Workflow
|
|
24
|
+
|
|
25
|
+
1. **Analyze Scope**: Identify the files, folders, or external docs needed.
|
|
26
|
+
2. **Tool Chain Strategy (The "SOTA" Loop)**:
|
|
27
|
+
- **Step 1: Recall**: Use `search-memories` to check for existing knowledge.
|
|
28
|
+
- **Step 2: Broad Search**: Use `web_search_exa` (Exa) to find trends, libraries, or high-level patterns.
|
|
29
|
+
- **Step 3: Deep Context**:
|
|
30
|
+
- **Private Context**: Use `ref_search_documentation` (Ref) with `ref_src=private` to search private GitHub repos, PDFs, or internal docs.
|
|
31
|
+
- **Efficient Docs**: Use `ref_search_documentation` (Ref) for token-efficient technical documentation lookups.
|
|
32
|
+
- **Code Examples**: Use `get_code_context_exa` (Exa).
|
|
33
|
+
- **Library Specs**: Use `resolve-library-id` -> `get-library-docs` (Context7) for version-accurate specs.
|
|
34
|
+
- **Microsoft/Azure**: Use `microsoft_docs_search`.
|
|
35
|
+
- **Step 4: Validate**: Use `vibe_check` to ask: "Is this information accurate? Did I miss anything?"
|
|
36
|
+
3. **Synthesize**:
|
|
37
|
+
- Group findings into logical categories.
|
|
38
|
+
- Create comparison matrices.
|
|
39
|
+
4. **Persist**: Use `add-memory` to store the final conclusion.
|
|
40
|
+
|
|
41
|
+
# Output Format
|
|
42
|
+
|
|
43
|
+
Always structure your final response as:
|
|
44
|
+
|
|
45
|
+
## Executive Summary
|
|
46
|
+
|
|
47
|
+
- Key finding 1
|
|
48
|
+
- Key finding 2
|
|
49
|
+
|
|
50
|
+
## Detailed Analysis
|
|
51
|
+
|
|
52
|
+
- [Evidence/Data]
|
|
53
|
+
|
|
54
|
+
## Recommendation
|
|
55
|
+
|
|
56
|
+
- "I recommend X because..."
|
|
57
|
+
|
|
58
|
+
# Constraints
|
|
59
|
+
|
|
60
|
+
- **Read-Only**: Do not use `edit` tools unless creating a scratchpad/prototype in a temp file or .ai-scratchpad folder (must delete after use). If the user specifically requests a report place it in the docs/reports folder.
|
|
61
|
+
- **Concise**: The user (or parent agent) needs answers, not noise.
|