@cratis/pi 8.0.2 → 8.2.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/package/corpus/harnesses/copilot/instructions/ai-distribution.instructions.md +9 -102
- package/package/corpus/harnesses/copilot/instructions/authoring-skills.instructions.md +3 -5
- package/package/corpus/harnesses/copilot/instructions/browser.instructions.md +8 -49
- package/package/corpus/harnesses/copilot/instructions/code-health.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/code-quality.csharp.instructions.md +3 -84
- package/package/corpus/harnesses/copilot/instructions/code-quality.instructions.md +6 -51
- package/package/corpus/harnesses/copilot/instructions/code-quality.typescript.instructions.md +4 -81
- package/package/corpus/harnesses/copilot/instructions/codescene.instructions.md +5 -54
- package/package/corpus/harnesses/copilot/instructions/components.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/cratis-folder-is-configuration.instructions.md +5 -22
- package/package/corpus/harnesses/copilot/instructions/csharp.instructions.md +7 -315
- package/package/corpus/harnesses/copilot/instructions/dialogs.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/discoverability.instructions.md +3 -25
- package/package/corpus/harnesses/copilot/instructions/documentation-structure-and-formatting.instructions.md +5 -151
- package/package/corpus/harnesses/copilot/instructions/documentation.instructions.md +5 -104
- package/package/corpus/harnesses/copilot/instructions/editing-cratis-docs.instructions.md +5 -63
- package/package/corpus/harnesses/copilot/instructions/efcore.instructions.md +8 -55
- package/package/corpus/harnesses/copilot/instructions/efcore.specs.instructions.md +3 -33
- package/package/corpus/harnesses/copilot/instructions/elixir.instructions.md +6 -79
- package/package/corpus/harnesses/copilot/instructions/exit-codes-and-wrappers.instructions.md +4 -27
- package/package/corpus/harnesses/copilot/instructions/framework-dotnet.instructions.md +4 -6
- package/package/corpus/harnesses/copilot/instructions/framework.instructions.md +0 -2
- package/package/corpus/harnesses/copilot/instructions/frontend-quality.instructions.md +0 -1
- package/package/corpus/harnesses/copilot/instructions/frontend-testing.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/github-actions.instructions.md +7 -138
- package/package/corpus/harnesses/copilot/instructions/glossary.instructions.md +19 -19
- package/package/corpus/harnesses/copilot/instructions/go-engineering.instructions.md +1 -4
- package/package/corpus/harnesses/copilot/instructions/go.instructions.md +2 -7
- package/package/corpus/harnesses/copilot/instructions/guards-and-fuses.instructions.md +5 -6
- package/package/corpus/harnesses/copilot/instructions/java.instructions.md +7 -129
- package/package/corpus/harnesses/copilot/instructions/kotlin.instructions.md +8 -165
- package/package/corpus/harnesses/copilot/instructions/local-work-artifacts.instructions.md +4 -1
- package/package/corpus/harnesses/copilot/instructions/orleans.instructions.md +5 -98
- package/package/corpus/harnesses/copilot/instructions/profiles.instructions.md +9 -63
- package/package/corpus/harnesses/copilot/instructions/scripting.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/specs.csharp.instructions.md +8 -148
- package/package/corpus/harnesses/copilot/instructions/specs.elixir.instructions.md +4 -37
- package/package/corpus/harnesses/copilot/instructions/specs.typescript.instructions.md +3 -1
- package/package/corpus/harnesses/copilot/instructions/storybook.instructions.md +7 -70
- package/package/corpus/harnesses/copilot/instructions/typescript.instructions.md +8 -98
- package/package/corpus/harnesses/copilot/instructions/writing-correct-examples.instructions.md +3 -47
- package/package/corpus/harnesses/copilot/instructions/writing-cratis-docs.instructions.md +3 -65
- package/package/corpus/hooks/README.md +16 -8
- package/package/corpus/hooks/scripts/cratis-cleanup-worktrees.sh +109 -6
- package/package/corpus/hooks/scripts/cratis-guard-shell-writes.sh +1 -1
- package/package/corpus/hooks/scripts/quality-gates.json +3 -5
- package/package/corpus/rules/ai-distribution.md +9 -102
- package/package/corpus/rules/authoring-skills.md +3 -5
- package/package/corpus/rules/browser.md +8 -49
- package/package/corpus/rules/code-health-policy.txt +4 -24
- package/package/corpus/rules/code-health.md +1 -1
- package/package/corpus/rules/code-quality.csharp.md +3 -84
- package/package/corpus/rules/code-quality.md +6 -51
- package/package/corpus/rules/code-quality.typescript.md +4 -81
- package/package/corpus/rules/codescene.md +5 -54
- package/package/corpus/rules/components.md +1 -1
- package/package/corpus/rules/cratis-folder-is-configuration.md +5 -22
- package/package/corpus/rules/csharp.md +7 -315
- package/package/corpus/rules/dialogs.md +1 -1
- package/package/corpus/rules/discoverability.md +3 -25
- package/package/corpus/rules/documentation-structure-and-formatting.md +5 -151
- package/package/corpus/rules/documentation.md +5 -104
- package/package/corpus/rules/editing-cratis-docs.md +5 -63
- package/package/corpus/rules/efcore.md +8 -55
- package/package/corpus/rules/efcore.specs.md +3 -33
- package/package/corpus/rules/elixir.md +6 -79
- package/package/corpus/rules/exit-codes-and-wrappers.md +4 -27
- package/package/corpus/rules/framework-dotnet.md +4 -6
- package/package/corpus/rules/framework.md +0 -2
- package/package/corpus/rules/frontend-quality.md +0 -1
- package/package/corpus/rules/frontend-testing.md +1 -1
- package/package/corpus/rules/general.md +2 -2
- package/package/corpus/rules/github-actions.md +7 -138
- package/package/corpus/rules/glossary.md +19 -19
- package/package/corpus/rules/go-engineering.md +1 -4
- package/package/corpus/rules/go.md +2 -7
- package/package/corpus/rules/guards-and-fuses.md +5 -6
- package/package/corpus/rules/java.md +7 -129
- package/package/corpus/rules/kotlin.md +8 -165
- package/package/corpus/rules/local-work-artifacts.md +4 -1
- package/package/corpus/rules/orleans.md +5 -98
- package/package/corpus/rules/profiles.md +9 -63
- package/package/corpus/rules/scripting.md +1 -1
- package/package/corpus/rules/specs.csharp.md +8 -148
- package/package/corpus/rules/specs.elixir.md +4 -37
- package/package/corpus/rules/specs.typescript.md +3 -1
- package/package/corpus/rules/storybook.md +7 -70
- package/package/corpus/rules/typescript.md +8 -98
- package/package/corpus/rules/writing-correct-examples.md +3 -47
- package/package/corpus/rules/writing-cratis-docs.md +3 -65
- package/package/corpus/skills/cratis-application-growth/SKILL.md +7 -54
- package/package/corpus/skills/cratis-application-growth/references/move-and-untangle.md +49 -0
- package/package/corpus/skills/cratis-application-growth/references/rename-window.md +12 -14
- package/package/corpus/skills/cratis-application-growth/references/stages.md +2 -2
- package/package/corpus/skills/cratis-arc-authorize-request/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-authorize-request/references/csharp.md +3 -3
- package/package/corpus/skills/cratis-arc-authorize-request/references/kotlin.md +2 -2
- package/package/corpus/skills/cratis-arc-code-analysis-typescript/SKILL.md +10 -43
- package/package/corpus/skills/cratis-arc-code-analysis-typescript/references/rule-fixes.md +40 -0
- package/package/corpus/skills/cratis-arc-connect-storage/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-connect-storage/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-declare-command/references/csharp.md +4 -4
- package/package/corpus/skills/cratis-arc-declare-command/references/go.md +1 -1
- package/package/corpus/skills/cratis-arc-declare-command/references/kotlin.md +6 -7
- package/package/corpus/skills/cratis-arc-declare-operation/SKILL.md +2 -8
- package/package/corpus/skills/cratis-arc-declare-operation/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-diagnose-live-query/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-diagnose-live-query/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-expose-mcp-operation/SKILL.md +6 -12
- package/package/corpus/skills/cratis-arc-expose-mcp-operation/references/custom-exposure-and-audit.md +4 -0
- package/package/corpus/skills/cratis-arc-expose-query/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-expose-query/references/csharp.md +11 -4
- package/package/corpus/skills/cratis-arc-expose-query/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-arc-generate-proxies/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-generate-proxies/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-generate-proxies/references/go.md +19 -2
- package/package/corpus/skills/cratis-arc-generate-proxies/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/references/csharp.md +1 -2
- package/package/corpus/skills/cratis-arc-host-application/references/elixir.md +2 -2
- package/package/corpus/skills/cratis-arc-host-application/references/go.md +5 -1
- package/package/corpus/skills/cratis-arc-host-application/references/java.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-arc-identity-and-tenancy-kotlin/SKILL.md +4 -7
- package/package/corpus/skills/cratis-arc-invoke-command/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-invoke-command/references/csharp.md +4 -4
- package/package/corpus/skills/cratis-arc-invoke-command/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-arc-isolate-tenant/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/csharp.md +2 -2
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/java.md +1 -1
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/typescript.md +4 -2
- package/package/corpus/skills/cratis-arc-migrate-relational-schema/SKILL.md +6 -6
- package/package/corpus/skills/cratis-arc-page-query/SKILL.md +3 -3
- package/package/corpus/skills/cratis-arc-page-query/references/csharp.md +10 -6
- package/package/corpus/skills/cratis-arc-page-query/references/elixir.md +2 -2
- package/package/corpus/skills/cratis-arc-page-query/references/java.md +1 -1
- package/package/corpus/skills/cratis-arc-page-query/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-arc-react-bind-slice/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-react-bind-slice/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-react-bind-slice/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-arc-react-separate-view-model/SKILL.md +7 -3
- package/package/corpus/skills/cratis-arc-react-separate-view-model/references/react-routing-and-messaging.md +1 -1
- package/package/corpus/skills/cratis-arc-select-backend-sdk/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/elixir.md +2 -4
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/go.md +2 -2
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/java.md +1 -1
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/kotlin.md +2 -2
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/typescript.md +1 -3
- package/package/corpus/skills/cratis-arc-spring-data-kotlin/SKILL.md +13 -51
- package/package/corpus/skills/cratis-arc-spring-data-kotlin/references/read-model-naming.md +9 -1
- package/package/corpus/skills/cratis-arc-spring-data-kotlin/references/storage-boundaries.md +40 -0
- package/package/corpus/skills/cratis-arc-storage-typescript/SKILL.md +19 -64
- package/package/corpus/skills/cratis-arc-storage-typescript/references/drizzle.md +62 -0
- package/package/corpus/skills/cratis-arc-tenancy-typescript/SKILL.md +24 -55
- package/package/corpus/skills/cratis-arc-tenancy-typescript/references/tenant-selection.md +49 -0
- package/package/corpus/skills/cratis-arc-testing-kotlin/SKILL.md +13 -31
- package/package/corpus/skills/cratis-arc-testing-kotlin/references/jvm-scenario-variants.md +25 -0
- package/package/corpus/skills/cratis-arc-testing-typescript/SKILL.md +24 -62
- package/package/corpus/skills/cratis-arc-testing-typescript/references/hosts-and-runners.md +51 -0
- package/package/corpus/skills/cratis-arc-validate-command/SKILL.md +4 -4
- package/package/corpus/skills/cratis-arc-validate-command/references/csharp.md +10 -12
- package/package/corpus/skills/cratis-arc-validate-command/references/elixir.md +16 -3
- package/package/corpus/skills/cratis-arc-validate-command/references/go.md +19 -2
- package/package/corpus/skills/cratis-arc-validate-command/references/java.md +20 -7
- package/package/corpus/skills/cratis-arc-validate-command/references/kotlin.md +22 -2
- package/package/corpus/skills/cratis-arc-validate-command/references/python.md +8 -2
- package/package/corpus/skills/cratis-arc-validate-command/references/typescript.md +22 -2
- package/package/corpus/skills/cratis-arc-validation-kotlin/SKILL.md +22 -248
- package/package/corpus/skills/cratis-arc-validation-kotlin/references/feature-filters.md +55 -0
- package/package/corpus/skills/cratis-arc-validation-kotlin/references/model-validation.md +72 -0
- package/package/corpus/skills/cratis-arc-validation-kotlin/references/server-validators.md +86 -0
- package/package/corpus/skills/cratis-arc-validation-typescript/SKILL.md +27 -275
- package/package/corpus/skills/cratis-arc-validation-typescript/references/models-and-queries.md +63 -0
- package/package/corpus/skills/cratis-arc-validation-typescript/references/rules-and-checks.md +46 -0
- package/package/corpus/skills/cratis-arc-validation-typescript/references/server-decisions.md +114 -0
- package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +15 -255
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/command-effects.md +13 -6
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/inspection.md +75 -0
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/project-tooling.md +78 -13
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/recovery-and-comparison.md +16 -14
- package/package/corpus/skills/cratis-chronicle-connect-application/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp.md +10 -6
- package/package/corpus/skills/cratis-chronicle-connect-application/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-chronicle-constrain-append/SKILL.md +2 -2
- package/package/corpus/skills/cratis-chronicle-constrain-append/references/csharp.md +8 -8
- package/package/corpus/skills/cratis-chronicle-deploy-kernel/SKILL.md +10 -8
- package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/storage.md +8 -4
- package/package/corpus/skills/cratis-chronicle-evolve-event/SKILL.md +4 -4
- package/package/corpus/skills/cratis-chronicle-evolve-event/references/csharp.md +2 -2
- package/package/corpus/skills/cratis-chronicle-evolve-event/references/deployed-readers.md +21 -8
- package/package/corpus/skills/cratis-chronicle-evolve-event/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-chronicle-inspect-observer/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-inspect-observer/references/csharp.md +5 -7
- package/package/corpus/skills/cratis-chronicle-inspect-observer/references/elixir.md +3 -3
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/SKILL.md +10 -80
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/blocked-tools.md +2 -2
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/deployment.md +9 -24
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/observational-tools.md +10 -0
- package/package/corpus/skills/cratis-chronicle-project-view/SKILL.md +2 -2
- package/package/corpus/skills/cratis-chronicle-project-view/references/csharp.md +7 -6
- package/package/corpus/skills/cratis-chronicle-project-view/references/elixir.md +2 -2
- package/package/corpus/skills/cratis-chronicle-project-view/references/go.md +6 -0
- package/package/corpus/skills/cratis-chronicle-project-view/references/java.md +6 -0
- package/package/corpus/skills/cratis-chronicle-project-view/references/kotlin.md +6 -0
- package/package/corpus/skills/cratis-chronicle-project-view/references/typescript.md +11 -5
- package/package/corpus/skills/cratis-chronicle-protect-decision/SKILL.md +2 -2
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp.md +4 -4
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/elixir.md +2 -2
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/go.md +3 -1
- package/package/corpus/skills/cratis-chronicle-protect-personal-data/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-protect-personal-data/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-chronicle-publish-contract/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-publish-contract/references/csharp.md +51 -40
- package/package/corpus/skills/cratis-chronicle-publish-contract/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/{occurrences.md → csharp-occurrences.md} +2 -2
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp.md +5 -6
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/go.md +1 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/java.md +1 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-chronicle-record-event/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-record-event/references/csharp.md +21 -19
- package/package/corpus/skills/cratis-chronicle-record-event/references/elixir.md +3 -3
- package/package/corpus/skills/cratis-chronicle-record-event/references/go.md +1 -1
- package/package/corpus/skills/cratis-chronicle-record-event/references/java.md +3 -4
- package/package/corpus/skills/cratis-chronicle-record-event/references/kotlin.md +3 -4
- package/package/corpus/skills/cratis-chronicle-record-event/references/typescript.md +2 -2
- package/package/corpus/skills/cratis-chronicle-reduce-state/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-reduce-state/references/csharp.md +7 -2
- package/package/corpus/skills/cratis-chronicle-reduce-state/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-chronicle-select-client/SKILL.md +4 -4
- package/package/corpus/skills/cratis-chronicle-select-client/references/csharp.md +3 -3
- package/package/corpus/skills/cratis-chronicle-select-client/references/elixir.md +2 -6
- package/package/corpus/skills/cratis-chronicle-select-client/references/go.md +2 -2
- package/package/corpus/skills/cratis-chronicle-select-client/references/java.md +1 -1
- package/package/corpus/skills/cratis-chronicle-select-client/references/kotlin.md +1 -5
- package/package/corpus/skills/cratis-chronicle-select-client/references/python.md +3 -3
- package/package/corpus/skills/cratis-chronicle-select-client/references/typescript.md +2 -2
- package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +12 -201
- package/package/corpus/skills/cratis-chronicle-web-workbench/references/hosting.md +67 -0
- package/package/corpus/skills/cratis-chronicle-web-workbench/references/operations.md +88 -0
- package/package/corpus/skills/cratis-ci-pipeline-performance/SKILL.md +8 -4
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/build-once-and-shard.md +13 -11
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/caching.md +2 -2
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/flaky-and-hung-jobs.md +6 -4
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/required-checks-and-path-filters.md +20 -61
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/security-and-pinning.md +1 -1
- package/package/corpus/skills/cratis-cli-terminal-workbench/SKILL.md +15 -26
- package/package/corpus/skills/cratis-code-review/SKILL.md +7 -6
- package/package/corpus/skills/cratis-commits-and-pull-requests/SKILL.md +1 -1
- package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-description.md +1 -1
- package/package/corpus/skills/cratis-components-accessibility/SKILL.md +14 -206
- package/package/corpus/skills/cratis-components-accessibility/references/control-labels.md +29 -0
- package/package/corpus/skills/cratis-components-accessibility/references/focus-and-announcements.md +8 -0
- package/package/corpus/skills/cratis-components-build-canvas/SKILL.md +7 -7
- package/package/corpus/skills/cratis-components-build-canvas/references/pixi-items.md +1 -1
- package/package/corpus/skills/cratis-components-choose-control/SKILL.md +7 -8
- package/package/corpus/skills/cratis-components-choose-control/references/collections.md +2 -2
- package/package/corpus/skills/cratis-components-choose-control/references/inputs.md +1 -1
- package/package/corpus/skills/cratis-components-compose-toolbar/SKILL.md +22 -27
- package/package/corpus/skills/cratis-components-compose-toolbar/references/contributed-tools.md +5 -0
- package/package/corpus/skills/cratis-components-coordinate-feedback/SKILL.md +19 -25
- package/package/corpus/skills/cratis-components-display-list/SKILL.md +26 -19
- package/package/corpus/skills/cratis-components-display-list/references/server-query.md +3 -3
- package/package/corpus/skills/cratis-components-edit-schema-data/SKILL.md +15 -12
- package/package/corpus/skills/cratis-components-edit-schema-data/references/controlled-editor.md +3 -3
- package/package/corpus/skills/cratis-components-explore-data/SKILL.md +7 -7
- package/package/corpus/skills/cratis-components-host-chat/SKILL.md +7 -7
- package/package/corpus/skills/cratis-components-submit-form/SKILL.md +9 -15
- package/package/corpus/skills/cratis-components-submit-form/references/confirmation.md +5 -5
- package/package/corpus/skills/cratis-components-submit-form/references/wizard.md +3 -3
- package/package/corpus/skills/cratis-components-theme-application/SKILL.md +7 -51
- package/package/corpus/skills/cratis-components-theme-application/references/palette.md +49 -0
- package/package/corpus/skills/cratis-components-theme-application/references/renderer-adapters.md +4 -2
- package/package/corpus/skills/cratis-content-length/SKILL.md +34 -46
- package/package/corpus/skills/cratis-content-length/references/length-evidence.md +26 -127
- package/package/corpus/skills/cratis-developer-marketing/SKILL.md +15 -27
- package/package/corpus/skills/cratis-developer-marketing/references/measurement.md +3 -19
- package/package/corpus/skills/cratis-developer-marketing/references/playbook-evidence.md +29 -224
- package/package/corpus/skills/cratis-discoverability/SKILL.md +11 -4
- package/package/corpus/skills/cratis-discoverability/references/package-metadata.md +2 -2
- package/package/corpus/skills/cratis-documentation-writing/SKILL.md +4 -3
- package/package/corpus/skills/cratis-engineering-ci-gates/SKILL.md +13 -129
- package/package/corpus/skills/cratis-engineering-ci-gates/references/gate-operation.md +132 -0
- package/package/corpus/skills/cratis-engineering-consolidation-guard/SKILL.md +11 -100
- package/package/corpus/skills/cratis-engineering-consolidation-guard/references/ci-required-check.md +55 -40
- package/package/corpus/skills/cratis-engineering-consolidation-guard/references/source-verification.md +68 -0
- package/package/corpus/skills/cratis-engineering-consolidation-guard/references/verification-details.md +38 -0
- package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +14 -65
- package/package/corpus/skills/cratis-engineering-csharp-conventions/references/exceptions-logging-and-di.md +40 -174
- package/package/corpus/skills/cratis-engineering-decision-record/SKILL.md +8 -52
- package/package/corpus/skills/cratis-engineering-decision-record/references/decision-pitfalls.md +29 -0
- package/package/corpus/skills/cratis-engineering-decision-record/references/decision-scope.md +20 -0
- package/package/corpus/skills/cratis-engineering-decision-record/references/record-format.md +3 -4
- package/package/corpus/skills/cratis-engineering-docs-authoring/SKILL.md +7 -12
- package/package/corpus/skills/cratis-engineering-docs-authoring/references/site-format.md +5 -4
- package/package/corpus/skills/cratis-engineering-effect-boundaries/SKILL.md +6 -40
- package/package/corpus/skills/cratis-engineering-effect-boundaries/references/failure-archetypes.md +18 -151
- package/package/corpus/skills/cratis-engineering-inherited-work/SKILL.md +5 -21
- package/package/corpus/skills/cratis-engineering-inherited-work/references/continue-inherited-work.md +19 -0
- package/package/corpus/skills/cratis-engineering-issue-design-note/SKILL.md +3 -66
- package/package/corpus/skills/cratis-engineering-issue-design-note/references/design-note-format.md +68 -0
- package/package/corpus/skills/cratis-engineering-issue-hygiene/SKILL.md +2 -84
- package/package/corpus/skills/cratis-engineering-issue-hygiene/references/issue-disposition.md +87 -0
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/SKILL.md +15 -263
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/dependency-map.md +3 -3
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/docker-images.md +28 -6
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/dotnet-nuget.md +18 -14
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/helper-runbook.md +231 -0
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/other-environments.md +2 -3
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/worked-examples.md +62 -77
- package/package/corpus/skills/cratis-engineering-post-mortem/SKILL.md +6 -39
- package/package/corpus/skills/cratis-engineering-post-mortem/references/proportionate-follow-up.md +36 -0
- package/package/corpus/skills/cratis-engineering-regression-cluster/SKILL.md +4 -4
- package/package/corpus/skills/cratis-engineering-release-trains/SKILL.md +8 -134
- package/package/corpus/skills/cratis-engineering-release-trains/references/candidate-assembly.md +139 -0
- package/package/corpus/skills/cratis-engineering-review-rounds/SKILL.md +3 -100
- package/package/corpus/skills/cratis-engineering-review-rounds/references/round-handoffs.md +109 -0
- package/package/corpus/skills/cratis-environments-and-secrets/SKILL.md +1 -5
- package/package/corpus/skills/cratis-environments-and-secrets/references/environment-file.md +1 -3
- package/package/corpus/skills/cratis-event-model-diagram/SKILL.md +11 -116
- package/package/corpus/skills/cratis-event-model-diagram/references/frame-patterns.md +93 -0
- package/package/corpus/skills/cratis-fundamentals-concept-go/SKILL.md +4 -15
- package/package/corpus/skills/cratis-fundamentals-name-value/SKILL.md +8 -8
- package/package/corpus/skills/cratis-fundamentals-name-value/references/csharp.md +4 -4
- package/package/corpus/skills/cratis-fundamentals-name-value/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-fundamentals-name-value/references/go.md +1 -1
- package/package/corpus/skills/cratis-fundamentals-name-value/references/java.md +5 -5
- package/package/corpus/skills/cratis-fundamentals-name-value/references/kotlin.md +15 -2
- package/package/corpus/skills/cratis-fundamentals-name-value/references/python.md +1 -1
- package/package/corpus/skills/cratis-fundamentals-name-value/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-fundamentals-telemetry/SKILL.md +10 -27
- package/package/corpus/skills/cratis-fundamentals-telemetry/references/otlp-export.md +16 -0
- package/package/corpus/skills/cratis-fundamentals-type-discovery/SKILL.md +26 -188
- package/package/corpus/skills/cratis-fundamentals-type-discovery/references/diagnostics.md +14 -0
- package/package/corpus/skills/cratis-governed-release-methodology/SKILL.md +7 -5
- package/package/corpus/skills/cratis-lens-browser-extension/SKILL.md +23 -157
- package/package/corpus/skills/cratis-lens-browser-extension/references/troubleshooting.md +139 -0
- package/package/corpus/skills/cratis-llm-friendly-documentation/SKILL.md +7 -5
- package/package/corpus/skills/cratis-modeling-design-event-model/SKILL.md +2 -4
- package/package/corpus/skills/cratis-modeling-design-event-model/references/model-first.md +7 -0
- package/package/corpus/skills/cratis-modeling-discover-timeline/SKILL.md +2 -2
- package/package/corpus/skills/cratis-modeling-discover-timeline/references/group-and-document-intake.md +1 -1
- package/package/corpus/skills/cratis-modeling-review-event-model/SKILL.md +2 -2
- package/package/corpus/skills/cratis-modeling-review-event-model/references/implementation-findings.md +2 -2
- package/package/corpus/skills/cratis-modeling-trace-existing-behavior/SKILL.md +5 -23
- package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/compare-evidence.md +20 -0
- package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/recovery-inputs.md +3 -3
- package/package/corpus/skills/cratis-multi-service-local-orchestration/SKILL.md +8 -63
- package/package/corpus/skills/cratis-multi-service-local-orchestration/references/aspire.md +52 -0
- package/package/corpus/skills/cratis-observability/SKILL.md +1 -1
- package/package/corpus/skills/cratis-observability/references/arc-and-chronicle-signals.md +9 -23
- package/package/corpus/skills/cratis-observability/references/chronicle-kernel-export.md +3 -14
- package/package/corpus/skills/cratis-observability/references/csharp.md +4 -6
- package/package/corpus/skills/cratis-observability/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-observability/references/troubleshooting.md +4 -5
- package/package/corpus/skills/cratis-onboarding-runtime/SKILL.md +1 -4
- package/package/corpus/skills/cratis-onboarding-runtime/references/default-offering.md +0 -3
- package/package/corpus/skills/cratis-onboarding-runtime/references/sign-up-review.md +0 -4
- package/package/corpus/skills/cratis-orchestration-lanes/SKILL.md +7 -49
- package/package/corpus/skills/cratis-orchestration-lanes/references/escalation.md +22 -0
- package/package/corpus/skills/cratis-orchestration-lanes/references/inbox-and-handover.md +4 -4
- package/package/corpus/skills/cratis-orchestration-lanes/references/placeholders.md +1 -1
- package/package/corpus/skills/cratis-orchestration-lanes/references/roles.md +12 -0
- package/package/corpus/skills/cratis-orchestration-lanes/references/roll-call.md +12 -0
- package/package/corpus/skills/cratis-orchestration-lanes/references/worktrees.md +11 -0
- package/package/corpus/skills/cratis-orchestration-merge-gates/SKILL.md +14 -13
- package/package/corpus/skills/cratis-orchestration-merge-gates/references/merge-queue.md +51 -26
- package/package/corpus/skills/cratis-orchestration-merge-gates/references/unattended-guards.md +8 -14
- package/package/corpus/skills/cratis-orleans-jobs/SKILL.md +9 -65
- package/package/corpus/skills/cratis-orleans-jobs/references/activation-callbacks.md +5 -0
- package/package/corpus/skills/cratis-orleans-jobs/references/lifecycle-and-placement.md +11 -7
- package/package/corpus/skills/cratis-orleans-jobs/references/state-machines.md +1 -1
- package/package/corpus/skills/cratis-orleans-jobs/references/step-planning.md +27 -0
- package/package/corpus/skills/cratis-orleans-jobs/references/storage-and-options.md +35 -0
- package/package/corpus/skills/cratis-performance-review/SKILL.md +6 -76
- package/package/corpus/skills/cratis-performance-review/references/review-checklist.md +79 -0
- package/package/corpus/skills/cratis-platform-configure-environment/SKILL.md +19 -16
- package/package/corpus/skills/cratis-platform-contribute-change/SKILL.md +2 -2
- package/package/corpus/skills/cratis-platform-deliver-slice/SKILL.md +5 -5
- package/package/corpus/skills/cratis-platform-deliver-slice/references/coordinate-slices.md +1 -1
- package/package/corpus/skills/cratis-platform-diagnose-slice/SKILL.md +2 -3
- package/package/corpus/skills/cratis-platform-prepare-release-pr/SKILL.md +2 -2
- package/package/corpus/skills/cratis-platform-start-application/SKILL.md +10 -8
- package/package/corpus/skills/cratis-platform-start-application/references/csharp.md +6 -6
- package/package/corpus/skills/cratis-platform-start-application/references/java.md +4 -4
- package/package/corpus/skills/cratis-platform-start-application/references/kotlin.md +4 -4
- package/package/corpus/skills/cratis-platform-verify-service-handoff/SKILL.md +3 -3
- package/package/corpus/skills/cratis-release-notes/SKILL.md +9 -133
- package/package/corpus/skills/cratis-release-notes/references/channel-guidance.md +59 -0
- package/package/corpus/skills/cratis-release-notes/references/publish-repair.md +64 -0
- package/package/corpus/skills/cratis-rtk/SKILL.md +12 -18
- package/package/corpus/skills/cratis-screenplay-accept-model/SKILL.md +3 -3
- package/package/corpus/skills/cratis-screenplay-accept-model/references/capability-consumption.md +1 -1
- package/package/corpus/skills/cratis-screenplay-accept-model/references/coverage-obligations.md +1 -1
- package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/SKILL.md +25 -59
- package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/references/onboarding-directives.md +11 -10
- package/package/corpus/skills/cratis-screenplay-author-extension/SKILL.md +9 -6
- package/package/corpus/skills/cratis-screenplay-author-extension/references/consume.md +3 -3
- package/package/corpus/skills/cratis-screenplay-author-extension/references/stage-candidate.md +8 -0
- package/package/corpus/skills/cratis-screenplay-availability/SKILL.md +20 -167
- package/package/corpus/skills/cratis-screenplay-availability/references/complete-example.md +23 -47
- package/package/corpus/skills/cratis-screenplay-availability/references/review-checks.md +9 -10
- package/package/corpus/skills/cratis-screenplay-availability/references/runtime-ownership.md +26 -23
- package/package/corpus/skills/cratis-screenplay-declare-slice/SKILL.md +6 -14
- package/package/corpus/skills/cratis-screenplay-declare-slice/references/projection-replay.md +2 -2
- package/package/corpus/skills/cratis-screenplay-declare-slice/references/read-identity.md +1 -1
- package/package/corpus/skills/cratis-screenplay-edit-workspace/SKILL.md +7 -9
- package/package/corpus/skills/cratis-screenplay-edit-workspace/references/model-notes.md +1 -1
- package/package/corpus/skills/cratis-screenplay-handoff-slice/SKILL.md +10 -14
- package/package/corpus/skills/cratis-screenplay-model-automation/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-automation/references/reaction-boundaries.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-interaction/SKILL.md +6 -31
- package/package/corpus/skills/cratis-screenplay-model-interaction/references/shell-and-data.md +22 -0
- package/package/corpus/skills/cratis-screenplay-model-translation/SKILL.md +5 -5
- package/package/corpus/skills/cratis-screenplay-onboard-workspace/SKILL.md +5 -5
- package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/version-migration.md +4 -4
- package/package/corpus/skills/cratis-screenplay-recover-intent/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-recover-intent/references/csharp.md +2 -2
- package/package/corpus/skills/cratis-screenplay-recover-intent/references/ground-truth-benchmark.md +1 -1
- package/package/corpus/skills/cratis-screenplay-specify-outcome/SKILL.md +4 -75
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/host-body-execution.md +0 -2
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/observable-result.md +85 -1
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/query-rejections.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +15 -133
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +5 -5
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/chronicle-boundaries.md +4 -12
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +28 -57
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution-example.md +4 -5
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +13 -20
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/multi-service-models.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/neighbouring-skills.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/read-model-keys.md +3 -5
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-id-rules.md +2 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +5 -5
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +82 -71
- package/package/corpus/skills/cratis-security-review/SKILL.md +4 -73
- package/package/corpus/skills/cratis-security-review/references/arc-boundaries.md +24 -13
- package/package/corpus/skills/cratis-security-review/references/review-checklist.md +74 -0
- package/package/corpus/skills/cratis-session-handoff/SKILL.md +7 -32
- package/package/corpus/skills/cratis-session-handoff/references/handoff-template.md +2 -2
- package/package/corpus/skills/cratis-session-handoff/references/session-hygiene.md +20 -0
- package/package/corpus/skills/cratis-showrunner-herald/SKILL.md +9 -17
- package/package/corpus/skills/cratis-showrunner-herald/references/options.md +2 -2
- package/package/corpus/skills/cratis-showrunner-herald/references/templates-and-images.md +16 -10
- package/package/corpus/skills/cratis-social-feed-post/SKILL.md +9 -162
- package/package/corpus/skills/cratis-social-feed-post/references/asset-and-formatting.md +37 -0
- package/package/corpus/skills/cratis-social-feed-post/references/editorial-checks.md +40 -0
- package/package/corpus/skills/cratis-social-feed-post/references/engagement-evidence.md +39 -150
- package/package/corpus/skills/cratis-social-feed-post/references/linkedin-media.md +24 -0
- package/package/corpus/skills/cratis-social-feed-post/references/other-channels.md +23 -0
- package/package/corpus/skills/cratis-specifications-exercise-backend/SKILL.md +5 -5
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-command-results.md +2 -2
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-query-scenario.md +13 -5
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp.md +7 -4
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/go.md +20 -4
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-specifications-isolate-behavior/SKILL.md +2 -2
- package/package/corpus/skills/cratis-specifications-observe-ui/SKILL.md +5 -5
- package/package/corpus/skills/cratis-specifications-test-application-ui/SKILL.md +2 -2
- package/package/corpus/skills/cratis-specifications-test-application-ui/references/typescript-command-results.md +2 -2
- package/package/corpus/skills/cratis-specifications-test-typescript-behavior/SKILL.md +2 -2
- package/package/corpus/skills/cratis-stage-render-slice/SKILL.md +10 -9
- package/package/corpus/skills/cratis-stage-run-sandbox/SKILL.md +3 -3
- package/package/corpus/skills/cratis-stage-run-sandbox/references/semantic-spec-runner.md +7 -6
- package/package/corpus/skills/cratis-studio-mcp-safety-guidance/SKILL.md +4 -6
- package/package/corpus/skills/cratis-technical-examples/SKILL.md +10 -106
- package/package/corpus/skills/cratis-technical-examples/references/csharp-package-checks.md +1 -1
- package/package/corpus/skills/cratis-technical-examples/references/source-and-format.md +42 -0
- package/package/corpus/skills/cratis-technical-examples/references/typescript-package-checks.md +2 -2
- package/package/corpus/skills/cratis-technical-examples/references/verification-scope.md +37 -0
- package/package/corpus/skills/cratis-ux-review/SKILL.md +8 -40
- package/package/corpus/skills/cratis-ux-review/references/capture-contract.md +24 -0
- package/package/corpus/skills/cratis-ux-review/references/checklist.md +1 -1
- package/package/corpus/skills/cratis-ux-review/references/report-template.md +2 -1
- package/package/corpus/skills/cratis-writing-voice-and-cadence/SKILL.md +19 -132
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/ai-tells.md +24 -97
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/author-and-batch.md +23 -0
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/documentation-evidence.md +25 -0
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/interpretation.md +17 -0
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/stock-constructions.md +23 -0
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/voice-guidance.md +8 -29
- package/package.json +1 -1
- /package/package/corpus/skills/cratis-chronicle-protect-decision/references/{standalone.md → csharp-standalone.md} +0 -0
- /package/package/corpus/skills/cratis-engineering-post-mortem/references/{examples/silent-backup-failure.md → silent-backup-failure.md} +0 -0
- /package/package/corpus/skills/cratis-engineering-post-mortem/references/{examples/unintended-release-regression.md → unintended-release-regression.md} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-arc-code-analysis-typescript
|
|
3
|
-
description: Use when adding the Arc ESLint plugin to a Node.js server project or fixing an arc-core lint finding such as missing-field, ARC0004 or ARCCHR0006. Not for
|
|
3
|
+
description: Use when adding the Arc ESLint plugin to a Node.js server project or fixing an arc-core lint finding such as missing-field, ARC0004 or ARCCHR0006. Not for configuring server artifact bindings (use cratis-arc-declare-command).
|
|
4
4
|
license: MIT
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -8,9 +8,11 @@ license: MIT
|
|
|
8
8
|
|
|
9
9
|
The plugin finds model-bound binding mistakes in `@command()`, `@readModel()`
|
|
10
10
|
and validator classes before `build()` or the first request. It targets ESLint
|
|
11
|
-
10 flat config and `typescript-eslint`. It
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
10 flat config and `typescript-eslint`. It is for Node server artifacts, not the Arc frontend. Install the plugin and tooling in the server project:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm install --save-dev @cratis/eslint-plugin-arc-core eslint@10 typescript-eslint
|
|
15
|
+
```
|
|
14
16
|
|
|
15
17
|
```javascript
|
|
16
18
|
// eslint.config.mjs
|
|
@@ -23,8 +25,7 @@ export default tseslint.config(
|
|
|
23
25
|
);
|
|
24
26
|
```
|
|
25
27
|
|
|
26
|
-
Run `eslint src
|
|
27
|
-
under the `arc-core/` rule prefix:
|
|
28
|
+
Run `npx eslint src`, substituting the server source directory. Use the type-checked preset by default. Choose `recommended` when the files cannot use TypeScript project information. Either preset applies to `**/*.ts` and `**/*.tsx` under the `arc-core/` rule prefix. Exclude generated files and any files outside the TypeScript project when using the type-checked preset, or add the handwritten files to the project.
|
|
28
29
|
|
|
29
30
|
| Preset | Needs type information | Rules |
|
|
30
31
|
| --- | --- | --- |
|
|
@@ -33,47 +34,13 @@ under the `arc-core/` rule prefix:
|
|
|
33
34
|
|
|
34
35
|
`arc-core/query-argument-name` is opt-in in both presets.
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
Rule names are `arc-core/<name>`. Arc rules keep the .NET ARC ids only where the
|
|
39
|
-
same mistake exists in TypeScript.
|
|
40
|
-
|
|
41
|
-
| Rule | Finds | Fix |
|
|
42
|
-
| --- | --- | --- |
|
|
43
|
-
| `missing-field` | public instance property on `@command()`/`@readModel()` without `@field` (private, `#` and `_` names are ignored) | add `@field(String)` etc.; unmarked properties are invisible to the wire schema |
|
|
44
|
-
| `declared-field` | decorated property declared with `declare` | use `!` with a real class field |
|
|
45
|
-
| `inject-binding` | `@inject` token count or provable type disagrees with `handle` parameters | align tokens and parameters (type comparison needs type information) |
|
|
46
|
-
| `query-binding` | `@query` descriptor count differs from the method's parameters, or a token type disagrees | one descriptor per parameter |
|
|
47
|
-
| `query-argument-name` (opt-in) | literal wire argument name differs from the method parameter | rename one to match |
|
|
48
|
-
| `misplaced-decorator` | `@query` not on a static read-model method, `@inject` not on a command `handle`, authorization on an unsupported member | move it |
|
|
49
|
-
| `unexported-artifact` | decorated artifact not exported (including an export at the end of the file) | export the class; `discover()` only registers exports |
|
|
50
|
-
| `validator-target` | validator subclass without `@validator(Target)` | add the decorator |
|
|
51
|
-
| `arc0002` | class with public fields and an instance `handle()` but no `@command()` | add `@command()` and `@field`s; no decorator is needed if the class is a service |
|
|
52
|
-
| `arc0003` | external `handle(command: DecoratedCommand)` that never runs | move `handle` onto the command |
|
|
53
|
-
| `arc0004` | command without an instance `handle()` (inherited counts) | add one |
|
|
54
|
-
| `arc0005` | `provide()` value discarded because `handle` takes no parameter for it | add the parameter or drop the value |
|
|
55
|
-
| `arc0010` | async `handle()` with no `await`, `for await` or returned value | remove `async` or await |
|
|
56
|
-
| `arc0012` | built-in `Error` thrown from a decorated artifact | throw a domain-named error class (or reject through validation) |
|
|
57
|
-
| `arc0014` | generic type arguments on `@query` (HTTP cannot supply them) | use a concrete type |
|
|
58
|
-
| `arc0015` | primitive query parameter converted to a `ConceptAs` inside the query, skipping concept validation | bind the concept as the parameter |
|
|
59
|
-
| `arc0019` | `@allowAnonymous()` with `@authorize()` or `@roles()` on one declaration | remove one |
|
|
60
|
-
| `arcchr0003` | reactor appends directly through `eventLog.append`/`appendMany` on a store from `getEventStore`/`getStore` | return the event from the reactor |
|
|
61
|
-
| `arcchr0006` | command-returning reactor without once-only or a replay handler | add `@onceOnly()` or a replay handler (type-checked) |
|
|
62
|
-
| `arcchr0007` | command handler bypassing the append pipeline with a direct write | return the event |
|
|
63
|
-
| `arcchr0009` | secret command field persisted into Chronicle causation | mark with `@notAudited` or `@pii` |
|
|
64
|
-
| `arcchr0010` | keyless command returning a GUID meant as the event stream id | return `eventSourceIdResponse` (type-checked) |
|
|
65
|
-
|
|
66
|
-
The .NET ids ARC0001, ARC0006 to ARC0009, ARC0011, ARC0016 to ARC0018 and
|
|
67
|
-
ARC0020/ARC0021 have no TypeScript rule: TypeScript queries may return any
|
|
68
|
-
shape, a missing command read model is explicit through
|
|
69
|
-
`commandReadModel(Type, { optional: true })`, concepts are classes, roles are
|
|
70
|
-
strings, operations are returned `CommandOperation` objects, and ASP.NET
|
|
71
|
-
attributes do not exist in the Node host.
|
|
37
|
+
Read the [rule catalog](references/rule-fixes.md) when ESLint reports an `arc-core/*` finding.
|
|
72
38
|
|
|
73
39
|
## Pitfalls
|
|
74
40
|
|
|
75
41
|
- A suppression comment hides the finding, not the bug: `unexported-artifact`
|
|
76
42
|
and `missing-field` describe things `build()` or the wire schema will break on.
|
|
43
|
+
- Arc decorators must come from `@cratis/arc.core`, and `@field` from `@cratis/fundamentals`; wrapper decorators are not recognized.
|
|
77
44
|
- The Chronicle rules need the decorator imports to come from
|
|
78
45
|
`@cratis/chronicle` or `@cratis/chronicle/reactors`; the rule cannot prove a
|
|
79
46
|
`this.client` field belongs to the reactor, so a non-match is not a clean bill.
|
|
@@ -84,7 +51,7 @@ attributes do not exist in the Node host.
|
|
|
84
51
|
|
|
85
52
|
## Verify
|
|
86
53
|
|
|
87
|
-
Run `eslint src` with the type-checked preset in CI next to `tsc` and the
|
|
54
|
+
Run `npx eslint src` with the type-checked preset in CI next to `tsc` and the
|
|
88
55
|
specs. A pass shows no `arc-core/*` findings; a deliberately broken artifact
|
|
89
56
|
(for example a `@command()` property without `@field`) should fail with
|
|
90
57
|
`arc-core/missing-field`.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Arc server lint findings and fixes
|
|
2
|
+
|
|
3
|
+
Rule names are `arc-core/<name>`. Arc rules keep the .NET ARC ids only where the
|
|
4
|
+
same mistake exists in TypeScript.
|
|
5
|
+
|
|
6
|
+
| Rule | Finds | Fix |
|
|
7
|
+
| --- | --- | --- |
|
|
8
|
+
| `missing-field` | public instance property on `@command()`/`@readModel()` without `@field` (private, `#` and `_` names are ignored) | add `@field(String)` etc.; unmarked properties are invisible to the wire schema |
|
|
9
|
+
| `declared-field` | decorated property declared with `declare` | use `!` with a real class field |
|
|
10
|
+
| `inject-binding` | `@inject` token count or provable type disagrees with `handle` parameters | align tokens and parameters (type comparison needs type information) |
|
|
11
|
+
| `query-binding` | `@query` descriptor count differs from the method's parameters, or a token type disagrees | one descriptor per parameter |
|
|
12
|
+
| `query-argument-name` (opt-in) | literal wire argument name differs from the method parameter | rename one to match |
|
|
13
|
+
| `misplaced-decorator` | `@query` not on a static read-model method, `@inject` not on a command instance `handle` or `provide`, authorization on an unsupported member | move it |
|
|
14
|
+
| `unexported-artifact` | decorated artifact not exported (including an export at the end of the file) | export the class; `discover()` only registers exports |
|
|
15
|
+
| `validator-target` | validator subclass without `@validator(Target)` in the default rule configuration | add `@validator(Target)`, or use the generated-metadata option below |
|
|
16
|
+
| `arc0002` | class with public fields and an instance `handle()` but no `@command()` | add `@command()` and `@field`s; no decorator is needed if the class is a service |
|
|
17
|
+
| `arc0003` | external `handle(command: DecoratedCommand)` that never runs | move `handle` onto the command |
|
|
18
|
+
| `arc0004` | command without an instance `handle()` (inherited counts) | add one |
|
|
19
|
+
| `arc0005` | `provide()` value discarded because `handle` takes no parameter for it | add the parameter or drop the value |
|
|
20
|
+
| `arc0010` | async `handle()` with no `await`, `for await` or returned value | remove `async` or await |
|
|
21
|
+
| `arc0012` | built-in `Error` thrown from a decorated artifact | throw a domain-named error class (or reject through validation) |
|
|
22
|
+
| `arc0014` | generic type arguments on `@query` (HTTP cannot supply them) | use a concrete type |
|
|
23
|
+
| `arc0015` | primitive query parameter converted to a `ConceptAs` inside the query, skipping concept validation | bind the concept as the parameter |
|
|
24
|
+
| `arc0019` | `@allowAnonymous()` with `@authorize()` or `@roles()` on one declaration | remove one |
|
|
25
|
+
| `arcchr0003` | reactor appends directly through `eventLog.append`/`appendMany` on a store from `getEventStore`/`getStore` | return the event from the reactor |
|
|
26
|
+
| `arcchr0006` | command-returning reactor without once-only or a replay handler | add `@onceOnly()` or a replay handler (type-checked) |
|
|
27
|
+
| `arcchr0007` | command handler bypassing the append pipeline with a direct write | return the event |
|
|
28
|
+
| `arcchr0009` | secret command field persisted into Chronicle causation | mark with `@notAudited` or `@pii` |
|
|
29
|
+
| `arcchr0010` | keyless command returning a plain `Guid` beside an event (type-checked) | if the GUID is meant to select the event source, return `tuple(eventSourceIdResponse(id), new Created())` with `id` as a string and keep the actual event in the tuple. This sets the event **source** ID and returns it to the caller; it does not set the stream ID. Keep an ordinary GUID response when it is not meant to route the event. |
|
|
30
|
+
|
|
31
|
+
### Validators with generated metadata
|
|
32
|
+
|
|
33
|
+
Choose the undecorated form only when the generator captures the validator's exact generic target and the host registers that metadata before discovery or `add()`. In the ESLint override for those files, set `rules: { 'arc-core/validator-target': ['error', { generatedMetadata: true }] }`. The option disables the lint finding; it does not register the validator. Keep `arc-proxygenerator --check-metadata` in the build and verify that invalid input is rejected by the validator.
|
|
34
|
+
|
|
35
|
+
The .NET IDs ARC0001, ARC0006–ARC0009, ARC0011, ARC0013, ARC0016–ARC0018,
|
|
36
|
+
and ARC0020–ARC0021 have no TypeScript rule: TypeScript queries may return any
|
|
37
|
+
shape, a missing command read model is explicit through
|
|
38
|
+
`commandReadModel(Type, { optional: true })`, concepts are classes, roles are
|
|
39
|
+
strings, operations are returned `CommandOperation` objects, and ASP.NET
|
|
40
|
+
attributes do not exist in the Node host.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-arc-connect-storage
|
|
3
|
-
description: Use when a developer needs to connect an Arc backend to the database that holds its read models. Not for changing an EF table schema.
|
|
3
|
+
description: Use when a developer needs to connect an Arc backend to the database that holds its read models. Not for changing an EF table schema (use cratis-arc-migrate-relational-schema).
|
|
4
4
|
compatibility: Requires an Arc backend and a reachable database.
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -83,7 +83,7 @@ Reuse the registered Arc MongoDB services. A second, unconfigured `MongoClient`
|
|
|
83
83
|
|
|
84
84
|
## Resolve connections and credentials
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
Use `Cratis:Arc:ConnectionResolution` to share resolver settings between MongoDB and EF Core. A configured integration-level `ConnectionResolution` replaces the entire shared default; it does not merge. The two slots run in order, `Connection` then `Identity`. The default is `Default` (configured values); use `Template` for scope-derived values, `Http` for a trusted endpoint or `Custom` for an application `IConnectionResolver`.
|
|
87
87
|
|
|
88
88
|
For rotating identity without moving the database, configure only the `Identity` slot inside `ConnectionResolution` and have the endpoint return identity only:
|
|
89
89
|
|
|
@@ -40,7 +40,7 @@ public record LendBook(BookId BookId, BorrowerId BorrowerId) : ICanProvideEventS
|
|
|
40
40
|
|
|
41
41
|
In the command scenario, use different IDs and assert the single append is to the book, not the borrower. This tests ownership, not the handler's field copy.
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
When the command uses an event source definition, declare `[EventSource<T>]` on the command so Arc resolves the route before `Handle`. Choose per-event routing only when an individual append targets a different source or stream. Return `new EventForEventSourceId(id, fact) { EventSource = typeof(OtherDefinition), EventStream = "Archive" }` for an event that targets the declared `Archive` stream on a different definition. Set only `EventStream` to select a different stream on the command’s definition. Neither override changes the route used to load command dependencies.
|
|
44
44
|
|
|
45
45
|
## Read state to make a decision
|
|
46
46
|
|
|
@@ -63,12 +63,12 @@ namespace Library.Features.Authors.Registration;
|
|
|
63
63
|
[Command]
|
|
64
64
|
public record RegisterAuthor(string Name)
|
|
65
65
|
{
|
|
66
|
-
public (AuthorId, EventForEventSourceId) Handle([GeneratedValue
|
|
66
|
+
public (AuthorId, EventForEventSourceId) Handle([GeneratedValue] AuthorId authorId) =>
|
|
67
67
|
(authorId, new EventForEventSourceId(authorId, new AuthorRegistered(Name)));
|
|
68
68
|
}
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
Arc calls `AuthorId.New()` for the generated parameter. The wrapper addresses the event to that ID; the first tuple item returns it to the caller. If the caller does not need the ID, return only the wrapper. Check `IsSuccess` before using the response. In the backend spec, import `Cratis.Arc.Testing.Commands` and insert `scenario.PinGeneratedValue("authorId", id);` before execution. Supply the fixed `AuthorId id` used by the append assertion.
|
|
71
|
+
Arc calls `AuthorId.New()` for the generated parameter and uses the parameter name as the capture name. Specify an explicit name only when the capture name must stay stable independently of the parameter name. The wrapper addresses the event to that ID; the first tuple item returns it to the caller. If the caller does not need the ID, return only the wrapper. Check `IsSuccess` before using the response. In the backend spec, import `Cratis.Arc.Testing.Commands` and insert `scenario.PinGeneratedValue("authorId", id);` before execution. Supply the fixed `AuthorId id` used by the append assertion.
|
|
72
72
|
|
|
73
73
|
## What `Handle` may return
|
|
74
74
|
|
|
@@ -97,7 +97,7 @@ Source identity, stream selection and concurrency are separate decisions. Use `[
|
|
|
97
97
|
|
|
98
98
|
For an application-defined `AuthorHistory` event source with an `Edition` stream, derive the route with `var route = routes.For<AuthorHistory>("Edition").WithStreamId("first");`, where `routes` is `IEventRoutes` from `Cratis.Arc.Chronicle.Streams`. Use `IStreamReads.Stream(authorId, route)` to guard that exact stream, or `StreamType(authorId, route)` to guard every stream of that type for that source. Only one exact stream scope is available per source ID. Return `route.Route(authorId, fact)` to create an `EventForEventSourceId` with explicit routing that overrides the command context.
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
Return `CompleteStream` (for example `route.Complete()`) to close a non-default stream. Arc commits events first and completes separately. A declared source key, source provider or returned source ID scopes completion to that source; without one, completion applies across sources. For two authors with stream `Edition/first`, let a close command declare the first author's ID and return `route.Complete()`; verify a later append there is refused and the second author's stream still accepts writes. If completion fails after commit, retry completion alone; do not append the events again.
|
|
101
101
|
|
|
102
102
|
## `Provide`, generated values and context
|
|
103
103
|
|
|
@@ -46,6 +46,6 @@ func RegisterBookCommand(builder *arc.Builder) error {
|
|
|
46
46
|
}
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
For the append example, register `BookRegistered` in the Chronicle event catalog and install the integration on the builder before `Build`. For Go event registration, use the `cratis-chronicle-record-event` skill (in `cratis/chronicle/client-go`). The integration is a nested module
|
|
49
|
+
For the append example, register `BookRegistered` in the Chronicle event catalog and install the integration on the builder before `Build`. For Go event registration, use the `cratis-chronicle-record-event` skill (in `cratis/chronicle/client-go`). The integration is a separate nested module, not part of the root Arc release. Select it as described in `cratis-arc-select-backend-sdk` (in `cratis/arc/go`); without the integration use the standalone reply example and don't claim an append.
|
|
50
50
|
|
|
51
51
|
A plain return is not a request to persist. Use `chronicle.Events` to group event values and `chronicle.EventForSource` to name an individual event's target explicitly. Verify that target in a pipeline spec. For preparation before a decision, use `commands.WithProvide(provide, handle)` to bind the preparation function and consume its typed result. Finish registration before `Build`; it seals composition.
|
|
@@ -6,31 +6,30 @@ Declare `@Command` on a data class; KSP generates the adapter. Put `@CommandKey`
|
|
|
6
6
|
import io.cratis.arc.artifacts.Command
|
|
7
7
|
import io.cratis.arc.artifacts.CommandKey
|
|
8
8
|
import io.cratis.arc.chronicle.EventsWithConcurrencyScopes
|
|
9
|
-
import io.cratis.chronicle.eventSequences.EventForEventSourceId
|
|
10
9
|
import io.cratis.chronicle.events.EventType
|
|
11
10
|
|
|
12
|
-
data class TaskView(val title: String)
|
|
11
|
+
data class TaskView(val title: String, val sequenceNumber: Long)
|
|
13
12
|
|
|
14
13
|
interface TaskViews {
|
|
15
14
|
fun get(id: String): TaskView
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
@EventType
|
|
17
|
+
@EventType
|
|
19
18
|
data class TaskRenamed(val previousTitle: String, val title: String)
|
|
20
19
|
|
|
21
20
|
@Command
|
|
22
|
-
data class RenameTask(@CommandKey val id: String, val title: String
|
|
21
|
+
data class RenameTask(@CommandKey val id: String, val title: String) {
|
|
23
22
|
fun provide(views: TaskViews): TaskView = views.get(id)
|
|
24
23
|
|
|
25
24
|
fun handle(current: TaskView): EventsWithConcurrencyScopes =
|
|
26
25
|
EventsWithConcurrencyScopes.builder()
|
|
27
|
-
.event(
|
|
28
|
-
.expectedSequenceNumber(id,
|
|
26
|
+
.event(id, TaskRenamed(current.title, title))
|
|
27
|
+
.expectedSequenceNumber(id, current.sequenceNumber)
|
|
29
28
|
.build()
|
|
30
29
|
}
|
|
31
30
|
```
|
|
32
31
|
|
|
33
|
-
Register the `TaskViews` implementation with the host and `TaskRenamed` with Chronicle. Return this outcome to the Chronicle integration; do not append separately. `@CommandEventSourceType` names the source type, `@CommandEventStreamId` names the stream and `@CommandEventSubject` sets the subject. Test a stale sequence: no rename should be appended.
|
|
32
|
+
Register the `TaskViews` implementation with the host and `TaskRenamed` with Chronicle. `TaskViews.get` must return the title and the exact Chronicle position it was read through from the same observation; a projection timestamp or a separate read of the current event-log position does not protect the decision. If the client also supplies an expected position, reject a mismatch with the observed position before returning the event. Keep an explicit event type ID when it must match an existing history or survive a class rename. Return this outcome to the Chronicle integration; do not append separately. `@CommandEventSourceType` names the source type, `@CommandEventStreamId` names the stream and `@CommandEventSubject` sets the subject. Test a stale sequence: no rename should be appended.
|
|
34
33
|
|
|
35
34
|
Declare a single key: a constructor key plus a body key is rejected at compile time (`ARCKSP0106`), not combined. Use `commandProvidedValuesOf` to pass prepared values to the handler. An `EventForEventSourceId` routes an individual returned event to a different history. Keep the event and caller response distinct when the handler returns both; a response is not another event to append.
|
|
36
35
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-arc-declare-operation
|
|
3
|
-
description: Use when a developer needs an Arc command to call an external provider before it commits, with a way to undo that call if the command fails. Not for work after commit.
|
|
3
|
+
description: Use when a developer needs an Arc command to call an external provider before it commits, with a way to undo that call if the command fails. Not for work after commit (use cratis-chronicle-react-to-fact).
|
|
4
4
|
compatibility: Requires an Arc backend whose SDK supports command operations.
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -14,7 +14,7 @@ Use one operation per provider action. Work that cannot be undone, such as sendi
|
|
|
14
14
|
|
|
15
15
|
For a command in a `*.csproj`, read [C#](references/csharp.md); for a Node server package, read [TypeScript](references/typescript.md); for a `go.mod` server, read [Go](references/go.md).
|
|
16
16
|
|
|
17
|
-
Kotlin, Java and Elixir have no verified returned-operation runner. If delivery after commit is acceptable, record a durable fact and process it idempotently. If the contract requires compensation before commit, put the command in a supported host. [Python](references/python.md) callers should invoke that service over HTTP, not simulate rollback locally.
|
|
17
|
+
[Kotlin](references/kotlin.md), [Java](references/java.md) and [Elixir](references/elixir.md) have no verified returned-operation runner; read the corresponding reference for the service boundary. If delivery after commit is acceptable, record a durable fact and process it idempotently. If the contract requires compensation before commit, put the command in a supported host. [Python](references/python.md) callers should invoke that service over HTTP, not simulate rollback locally.
|
|
18
18
|
|
|
19
19
|
## Expected outcome
|
|
20
20
|
|
|
@@ -34,9 +34,3 @@ In a pipeline scenario, make the provider call fail after it may have been accep
|
|
|
34
34
|
|
|
35
35
|
- Declare a command (`cratis-arc-declare-command` skill in `cratis/arc`)
|
|
36
36
|
- React after commit (`cratis-chronicle-react-to-fact` skill in `cratis/chronicle`)
|
|
37
|
-
|
|
38
|
-
For Elixir callers, read the [service boundary](references/elixir.md).
|
|
39
|
-
|
|
40
|
-
For Java callers, read the [service boundary](references/java.md).
|
|
41
|
-
|
|
42
|
-
For Kotlin callers, read the [service boundary](references/kotlin.md).
|
|
@@ -40,7 +40,7 @@ Implement `IBookReservations` in `Features/Books/Reservations/BookReservations.c
|
|
|
40
40
|
|
|
41
41
|
Use one operation for one provider action. Choose an ordered batch when several actions must run in order: if the command holds `Id, Book` and `SecondId, SecondBook`, use `public CommandOperations Handle() => [new ReserveBookOperation(Id, Book), new ReserveBookOperation(SecondId, SecondBook)];`. A plain array does not declare an operation batch. Import `Cratis.Arc.Commands` for `ICommandOperation` and `CommandOperations` if needed.
|
|
42
42
|
|
|
43
|
-
When a successful booking also needs a durable fact, mark `ReserveBook`'s `Id` parameter with `[Key]` (`Cratis.Chronicle.Keys`) so the reservation ID identifies the event source. Return a tuple containing the `BookReserved` event and the `ReserveBookOperation`. Arc enrolls the event, runs the reservation, then completes the event transaction. Send the confirmation from a reactor on the committed fact, using the booking ID to deduplicate delivery. Do not send mail in `Execute`: canceling a reservation cannot unsend a message.
|
|
43
|
+
When a successful booking also needs a durable fact, mark `ReserveBook`'s `Id` parameter with `[property: Key]` (`Cratis.Chronicle.Keys`) so the reservation ID identifies the event source. Return a tuple containing the `BookReserved` event and the `ReserveBookOperation`. Arc enrolls the event, runs the reservation, then completes the event transaction. Send the confirmation from a reactor on the committed fact, using the booking ID to deduplicate delivery. Do not send mail in `Execute`: canceling a reservation cannot unsend a message.
|
|
44
44
|
|
|
45
45
|
## Verify recovery through the pipeline
|
|
46
46
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-arc-diagnose-live-query
|
|
3
|
-
description: Use when a live Arc query shows its first result but a later change never reaches the client. Not for declaring the query.
|
|
3
|
+
description: Use when a live Arc query shows its first result but a later change never reaches the client. Not for declaring the query (use cratis-arc-expose-query).
|
|
4
4
|
compatibility: Requires a running Arc backend, its database and credentials for the affected caller.
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -62,7 +62,7 @@ The direct SSE request above subscribes to one query. The browser normally uses
|
|
|
62
62
|
|
|
63
63
|
## Date-sensitive observable queries
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
Import `Cratis.Arc.Calendar` and inject `IApplicationCalendar` for calendar reads at a supplied instant. For live results, create a `ClockBoundaryContext` with `await boundaries.Begin(tenant, operationZone, token)` on `IClockBoundaries` for the subscription. Observe candidates without a date predicate tied to the clock; otherwise tomorrow's matches may never enter the source. For a “due today” list:
|
|
66
66
|
|
|
67
67
|
```csharp
|
|
68
68
|
return candidates.ReevaluateAtBoundaries(context, (items, reading) =>
|
|
@@ -10,7 +10,7 @@ Start with a finite read. Expose a write only if the verified caller is allowed
|
|
|
10
10
|
|
|
11
11
|
## Prepare the host
|
|
12
12
|
|
|
13
|
-
Add explicit package references to the host project for `Cratis.Arc.Mcp` and `Cratis.Arc.PersonalAccessTokens
|
|
13
|
+
Add explicit package references to the host project for `Cratis.Arc.Mcp` and `Cratis.Arc.PersonalAccessTokens`. Neither comes with `Cratis` or `Cratis.Arc`.
|
|
14
14
|
|
|
15
15
|
**Existing verified host:** extend its PAT scopes and tool catalog on the same Arc builder. Do not install a second verifier. The example below shows the resulting configuration for an Arc-only receiver. It assumes a `LibraryPersonDirectory` implementing `Cratis.Arc.Identity.Callers.ICallerPersonDirectory` that resolves verified account keys to persisted person records.
|
|
16
16
|
|
|
@@ -37,13 +37,13 @@ await app.RunAsync();
|
|
|
37
37
|
|
|
38
38
|
`direct` is the PAT format key. `ForResource` binds the receiver to its resource URI, credential audience and deployment environment. Match all three to the token issuer. Keep the application's durable `IPatAuthority`, `IPatRecoveryEpoch` and `IPatPolicy` registrations.
|
|
39
39
|
|
|
40
|
-
**Fresh local host:** start with the [MCP quick start’s local development adapters](https://www.cratis.io/arc/backend/csharp/mcp/quick-start/#local-development-adapters). In Development only, `UseDevelopmentPersonalAccessTokenAdapters()` after `WithPersonalAccessTokens(...)`
|
|
40
|
+
**Fresh local host:** start with the [MCP quick start’s local development adapters](https://www.cratis.io/arc/backend/csharp/mcp/quick-start/#local-development-adapters). In Development only, import `Cratis.Arc.PersonalAccessTokens.Development` and call `UseDevelopmentPersonalAccessTokenAdapters()` after `WithPersonalAccessTokens(...)` to supply those three adapters in memory, not a person directory or an issuance endpoint. Issuance still needs a verified browser caller. When issuance and PAT verification share a receiver, configure signed v2 forwarding and call `AllowPersonalAccessTokenCallers()` inside the same `WithPersonalAccessTokens` delegate. Without a verified browser caller, exercise issuance in an isolated spec with a test-only verified caller and signing key. Never install the test signer or key in the application host.
|
|
41
41
|
|
|
42
42
|
For a combined Library host, merge `options.EndpointGroups.Assign("capabilities", 5002)` into the `configureArcOptions` lambda on `builder.AddCratis(...)`. Extend that call's existing `configureArcBuilder` lambda with the `.WithCapabilities().WithPersonalAccessTokens(...).WithMcp(...)` chain above. Keep the existing MongoDB and Chronicle registration. `catalog` gives queries the default `catalog:read` scope and commands `catalog:write`. The local client endpoint here is `http://127.0.0.1:5002/mcp`. Use HTTPS for remote clients.
|
|
43
43
|
|
|
44
44
|
## Add a tool
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
Annotate the existing authorized finite query method on its read model. If the only existing query is live, declare a finite one first (`cratis-arc-expose-query`). Preserve the operation’s authorization, including any requirement inherited from the read model; MCP scopes do not protect the HTTP query. For example, on `Author` with an authorized `ListAuthors` query, import `Cratis.Arc.Mcp` and add the attribute:
|
|
47
47
|
|
|
48
48
|
```csharp
|
|
49
49
|
[ExposeOverMcp("list_authors", Description = "Lists the library's authors.")]
|
|
@@ -57,11 +57,11 @@ Give the tool a name matching `^[a-z][a-z0-9_]{0,63}$` and a description. For an
|
|
|
57
57
|
|
|
58
58
|
## One-off scope check
|
|
59
59
|
|
|
60
|
-
With both tools configured and a client PAT issued for `catalog:read` only, list tools on the capabilities listener.
|
|
60
|
+
With both tools configured and a client PAT issued for `catalog:read` only, list tools on the capabilities listener. Load `PAT` privately into the shell with tracing disabled. Pass the header through stdin rather than putting the token in curl’s process arguments.
|
|
61
61
|
|
|
62
62
|
```sh
|
|
63
|
-
|
|
64
|
-
-
|
|
63
|
+
printf 'Authorization: Bearer %s\n' "$PAT" |
|
|
64
|
+
curl -fsS http://127.0.0.1:5002/mcp -H @- \
|
|
65
65
|
-H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' \
|
|
66
66
|
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
|
|
67
67
|
```
|
|
@@ -83,9 +83,3 @@ In the result, expect `list_authors` and no `register_author`.
|
|
|
83
83
|
|
|
84
84
|
- Declare the command (`cratis-arc-declare-command` skill in `cratis/arc`)
|
|
85
85
|
- [Protect the operation](../cratis-arc-authorize-request/SKILL.md)
|
|
86
|
-
|
|
87
|
-
## Diagnose admission with the client credential
|
|
88
|
-
|
|
89
|
-
Check startup first, then reachability of the capability listener and the mapped POST, then authentication, origin, tool listing and invocation. A public GET or a tool appearing under another profile proves none of these. Use `PatOnly` for a PAT, `OAuthOnly` for OAuth or `Combined` only when both are intended. Configure the public origin, resource and authorization servers from trusted deployment settings, never the incoming Host header. An absent Origin is not the same as a disallowed browser Origin.
|
|
90
|
-
|
|
91
|
-
Publication installs no caller credential. Check the verified caller installation, allowed scopes and the PAT authority, issuance policy and recovery epoch separately. Development adapters do not bypass issuance. Use the [admission and audit checks](references/custom-exposure-and-audit.md) to distinguish a credential challenge from a scope or operation-policy refusal. Retest listing and calling by name with the actual client's profile and credential.
|
|
@@ -10,6 +10,10 @@ A caller must hold every scope in the tool's required set or every scope in one
|
|
|
10
10
|
|
|
11
11
|
## Find where a refusal occurred
|
|
12
12
|
|
|
13
|
+
Start with startup and listener reachability, then test listing and invocation with the actual client’s credential. A public GET or a tool appearing under another profile does not verify either call.
|
|
14
|
+
|
|
15
|
+
The default profile accepts PATs. Choose `OAuthOnly` when using only OAuth or `Combined` when both credential types are intended. For either OAuth profile, configure the public origin, resource and authorization servers from trusted deployment settings, never the incoming Host header. An absent `Origin` is not the same as a disallowed browser origin.
|
|
16
|
+
|
|
13
17
|
- **Listener:** Assigning the capabilities port does not bind it. Confirm the host binds that port and accepts the MCP POST there. By default the capability gate also protects health and readiness routes on that port; a rejected anonymous probe is not proof MCP is down. Move anonymous probes off the capabilities port, then retest `/mcp` separately with the intended credential.
|
|
14
18
|
- **HTTP admission:** A `401` and `WWW-Authenticate` point to credential admission; check the client profile, credential kind, validity and binding. For `403`, distinguish `origin_not_allowed` (compare the exact browser origin with `PublicOrigin` and `AllowedOrigins`) from `insufficient_scope` (compare the advertised required set with the caller's scopes) and `forbidden` (check the tool authorizers). Don't loosen either check to make a probe pass.
|
|
15
19
|
- **Tool refusal:** An MCP result with `isError: true` is a tool-level error even if HTTP succeeded. Inspect the result content for scope or operation-policy refusal, bad input or execution failure. Do not treat HTTP success alone as proof the tool ran successfully.
|
|
@@ -6,9 +6,9 @@ compatibility: Requires an Arc backend with storage connected for the read model
|
|
|
6
6
|
|
|
7
7
|
# Expose a read model as a query
|
|
8
8
|
|
|
9
|
-
A query serves an existing read model; it does not define how facts build its rows. Start from the projection (`cratis-chronicle-project-view` skill in `cratis/chronicle`) that owns the row shape and [connect its storage](../cratis-arc-connect-storage/SKILL.md) first.
|
|
9
|
+
A query serves an existing read model; it does not define how facts build its rows. Start from the projection (`cratis-chronicle-project-view` skill in `cratis/chronicle`) that owns the row shape and [connect its storage](../cratis-arc-connect-storage/SKILL.md) first. Use the SDK reference to declare or register the query. Keep the storage handle in server-side dependencies, not in client arguments.
|
|
10
10
|
|
|
11
|
-
Choose a live query when the view must stay current while it is open
|
|
11
|
+
Start with a finite snapshot. Choose a live query when the view must stay current while it is open. Use the SDK’s subscription source or watched-model mechanism for live results; a finite list on its own cannot deliver later changes. Expose only the intended queries.
|
|
12
12
|
|
|
13
13
|
## Read the reference for the host
|
|
14
14
|
|
|
@@ -2,18 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
Prerequisite: an Arc host with the storage integration for the read model registered.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Connect MongoDB with `WithMongoDB()` before resolving the collection. Start with the existing `Author` projection; it already owns the row shape and event mapping. Mark the record `[ReadModel]` if it is not already marked and add this public static method. Import `Cratis.Arc.Queries.ModelBound` for the attribute and `MongoDB.Driver` for the collection. Arc supplies the collection; it is not a client argument.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
```csharp
|
|
8
|
+
public static IEnumerable<Author> AllAuthors(IMongoCollection<Author> collection) =>
|
|
9
|
+
collection.Find(_ => true).ToList();
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Register an author and check that calling the query returns the known `Id` and `Name`.
|
|
13
|
+
|
|
14
|
+
## Choose a live query when an open view must stay current
|
|
8
15
|
|
|
9
|
-
|
|
16
|
+
Replace the snapshot method with this method and import `System.Reactive.Subjects`:
|
|
10
17
|
|
|
11
18
|
```csharp
|
|
12
19
|
public static ISubject<IEnumerable<Author>> AllAuthors(IMongoCollection<Author> collection) =>
|
|
13
20
|
collection.Observe();
|
|
14
21
|
```
|
|
15
22
|
|
|
16
|
-
|
|
23
|
+
Subscribe to `AllAuthors`. Check its first list, register an author, then check that the same subscription delivers the new `Id` and `Name`.
|
|
17
24
|
|
|
18
25
|
## When the first result is empty or changes never arrive
|
|
19
26
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Export a `@readModel()` class and mark its **static** method `@query()`. Bind caller inputs with `argument()`, injected services with `service()` and execution options with `queryOptions()` where explicit descriptors are needed. An instance method is not a query. Use `T | undefined` for an optional argument, not an invented empty value. Keep credentials and tenant context out of the argument list.
|
|
4
4
|
|
|
5
|
-
A finite query returns a value or promise; returning `undefined` successfully gives HTTP 200 without `data`. Let store failures propagate so an unavailable database does not look like a missing row. For live results return the scoped `collection.observe()` source, not a previously loaded list. For protected Mongo reads, follow the release
|
|
5
|
+
A finite query returns a value or promise; returning `undefined` successfully gives HTTP 200 without `data`. Let store failures propagate so an unavailable database does not look like a missing row. For live results return the scoped `collection.observe()` source, not a previously loaded list. For protected Mongo reads, follow the data-release rules below.
|
|
6
6
|
|
|
7
7
|
| Stage | Diagnostic boundary |
|
|
8
8
|
| --- | --- |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-arc-generate-proxies
|
|
3
|
-
description: Use when generating TypeScript clients from Arc server contracts or diagnosing a stale proxy. Not for consuming a generated hook.
|
|
3
|
+
description: Use when generating TypeScript clients from Arc server contracts or diagnosing a stale proxy. Not for consuming a generated hook (use cratis-arc-react-bind-slice).
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Generate and verify the contract
|
|
@@ -13,6 +13,6 @@ Generate from the server that owns the command or query. Use its registration an
|
|
|
13
13
|
- For a Java module, read [Java](references/java.md).
|
|
14
14
|
- For a Mix application, read [Elixir](references/elixir.md).
|
|
15
15
|
|
|
16
|
-
For
|
|
16
|
+
For a `go.mod` server, read [Go](references/go.md). Use the HTTP contract when the frontend contract has not been verified with the generator. No [Python](references/python.md) Arc application generator is verified; use the owning service contract.
|
|
17
17
|
|
|
18
18
|
Regenerate after renaming a contract, compile the consumer, and call one real endpoint. A successful build with a wrong route is not a passing check. Verify ignored or disposable output without staging it. For required tracked output, review the relevant generated diff and stage it only within the assignment; stop if the repository policy and brief conflict.
|
|
@@ -18,7 +18,7 @@ Add these properties to `Library.csproj`:
|
|
|
18
18
|
Merge this section into the host project's `appsettings.json`, preserving other settings:
|
|
19
19
|
|
|
20
20
|
```json
|
|
21
|
-
{ "Cratis": { "Arc": { "GeneratedApis": { "
|
|
21
|
+
{ "Cratis": { "Arc": { "GeneratedApis": { "SegmentsToSkipForRoute": 1, "IncludeCommandNameInRoute": false } } } }
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
1. Run `dotnet build Library.csproj -c Debug` from the project directory. Skipping the `Library` segment keeps `Features/Authors/Listing` and `Features/Authors/Registration` distinct.
|
|
@@ -1,3 +1,20 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Generate Go adapters and TypeScript proxies together
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Use a handwritten client against the registered routes when the frontend contract is unverified. Arc.Go's generator has one tested profile for Arc, Arc React, and Fundamentals; that partial coverage does not establish compatibility with the current frontend packages. Choose generation only when the target frontend contract is verified, including any subscriptions the application uses.
|
|
4
|
+
|
|
5
|
+
The separately maintained generator module is not distributed with the root Go runtime release. If you can build tools from source, build `arc-gen` from a checkout of the released Arc.Go source, using Go 1.26 or later. From that checkout's `tools/` directory run `GOWORK=off GOTOOLCHAIN=local go install ./cmd/arc-gen`. If you can use only published packages, use the handwritten client instead.
|
|
6
|
+
|
|
7
|
+
In your application module, put `arc-gen.json` beside `go.mod`. Use your application's namespace and a fresh, dedicated client output directory. This profile is for an application whose artifact packages are under `features/`:
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"formatVersion": 1,
|
|
12
|
+
"name": "shop-frontend",
|
|
13
|
+
"defaultNamespace": "Shop",
|
|
14
|
+
"typescript": { "out": "web/src/api" }
|
|
15
|
+
}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Run `GOWORK=off GOTOOLCHAIN=local arc-gen -config arc-gen.json ./features/...`. Select the artifact packages, not the composition package. Check that it reports both adapter and TypeScript file counts and writes a client manifest and proxies. For each generated package, check the error from `RegisterArtifacts(builder)` before building the host. If you override `routes` in the profile, match the builder's route settings; the host refuses to build when they disagree.
|
|
19
|
+
|
|
20
|
+
Run the same command with `-check` before `./features/...` to detect stale files without rewriting them. Then compile the generated client against the frontend's actual dependencies and exercise the mapped calls and subscriptions it uses. This path emits Go adapters as well as TypeScript; it does not support proxy-only output.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Generate clients from Node source
|
|
2
2
|
|
|
3
|
-
Run `arc-proxygenerator --project tsconfig.json --artifacts Features --output Features --use-proxy-file-suffix --metadata "$PWD/Features/generatedMetadata.ts"` from the Library example project root, where registered classes live under `Features`. Use the actual slice path in other projects. The input is source, not a running server. The suffix keeps co-located proxies separate from handwritten artifacts.
|
|
3
|
+
Run `arc-proxygenerator --project tsconfig.json --artifacts Features --output Features --use-proxy-file-suffix --metadata "$PWD/Features/generatedMetadata.ts"` from the Library example project root, where registered classes live under `Features`. Use the actual slice path in other projects. The input is source, not a running server. The suffix keeps co-located proxies separate from handwritten artifacts. Import the generated `metadata` and call `builder.useGeneratedMetadata(metadata)` before `discover()` or `add()`. Stale runtime shapes can prevent startup; source-only changes can still escape the runtime check. Run the same command with `--check-metadata` in CI.
|
|
4
4
|
|
|
5
5
|
Match generator options to the server before debugging the client:
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-arc-host-application
|
|
3
|
-
description: Use when configuring or starting an Arc application and verifying that its host serves a registered endpoint. Not for connecting a Chronicle kernel.
|
|
3
|
+
description: Use when configuring or starting an Arc application and verifying that its host serves a registered endpoint. Not for connecting a Chronicle kernel (use cratis-chronicle-connect-application).
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Start and verify the registered host
|
|
@@ -10,7 +10,6 @@ using Microsoft.AspNetCore.Builder;
|
|
|
10
10
|
var builder = WebApplication.CreateBuilder(args);
|
|
11
11
|
builder.AddCratisArc(options =>
|
|
12
12
|
{
|
|
13
|
-
options.GeneratedApis.RoutePrefix = "api";
|
|
14
13
|
options.GeneratedApis.SegmentsToSkipForRoute = 1;
|
|
15
14
|
});
|
|
16
15
|
var app = builder.Build();
|
|
@@ -32,7 +31,7 @@ public record LibraryStatus(string State)
|
|
|
32
31
|
}
|
|
33
32
|
```
|
|
34
33
|
|
|
35
|
-
Run `dotnet run` from the host project directory. With the
|
|
34
|
+
Run `dotnet run` from the host project directory. With the default `api` prefix and one namespace segment skipped, request `GET /api/features/diagnostics/current-status` at the listening address printed at startup. Expect HTTP 200, `isSuccess: true` and `data.state` equal to `Open`. When testing an existing query, use its route and required credentials. For an observable query, append `?waitForFirstResult=true` to request one result.
|
|
36
35
|
|
|
37
36
|
## When it goes off the usual path
|
|
38
37
|
|
|
@@ -8,9 +8,9 @@ defmodule Counters.Arc do
|
|
|
8
8
|
end
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Add `Counters.Arc` to the OTP supervisor's children after its dependencies and before the HTTP listener. Put commands and read models
|
|
11
|
+
Add `Counters.Arc` to the OTP supervisor's children after its dependencies and before the HTTP listener. Put commands and read models in the configured OTP application; Arc scans its compiled modules. Exercise a registered endpoint after startup: if the listener responds but the command is missing, check supervision and discovery before adding a Plug route for the command.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Choose an explicit `artifacts` list only when that Arc instance should expose a subset of the OTP application’s modules. Configure it for that supervised instance. Availability runs before binding, filters and authorization. Unknown or unavailable is closed (403); suspension is also a denial. An undecidable evaluation yields retryable 503 rather than pretending the caller lacks entitlement.
|
|
14
14
|
|
|
15
15
|
## Declare availability
|
|
16
16
|
|
|
@@ -2,4 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Create the builder with `builder, err := arc.NewBuilder(arc.Options{})`. Before `builder.Build()`, register each model-bound command, for example `commands.Register[Greet](builder, commands.Handle(Greet.Handle))` for a command whose `Handle` returns a greeting. Return registration and build errors instead of starting a partially configured host.
|
|
4
4
|
|
|
5
|
-
Let `app.Run(ctx, "127.0.0.1:8080")` own the listener. Invoke the greeting command with a known name and check the returned greeting.
|
|
5
|
+
Let `app.Run(ctx, "127.0.0.1:8080")` own the listener. Invoke the greeting command with a known name and check the returned greeting.
|
|
6
|
+
|
|
7
|
+
## Choose an embedded handler when the listener already exists
|
|
8
|
+
|
|
9
|
+
If another HTTP server owns the listener, call `app.Start(ctx)` before mounting Arc as an `http.Handler`; do not also call `Run`. At shutdown, start HTTP server shutdown and `app.Shutdown(cleanupCtx)` concurrently with fresh bounded contexts, then wait for both. Otherwise HTTP shutdown can wait on live streams that Arc has not canceled yet.
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Annotate the entry class with `@SpringBootApplication` and start it from `main` with `SpringApplication.run(LibraryApplication.class, args);`. Build with the Arc adapter generation enabled so the application has endpoints to register.
|
|
4
4
|
|
|
5
|
-
Set `cratis.arc.endpoints.segments-to-skip-for-route`
|
|
5
|
+
Keep all package segments by default. Set `cratis.arc.endpoints.segments-to-skip-for-route` only to remove a known package prefix from generated routes. Do not copy a skip count from another service: it changes the generated path. Send a query to the generated route of a registered read model. Expect its data in the query result; for a missing route check the generated manifest and endpoint prefix before changing the handler.
|
|
6
6
|
|
|
7
7
|
Match `cratis.arc.endpoints` prefix and `segments-to-skip-for-route` to the generator, including kebab-case path segments. Compare an emitted Java-backed URL with the Spring route; a client compile alone does not check either setting.
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Annotate the entry class with `@SpringBootApplication` and start it from `main` with `runApplication<LibraryApplication>(*args)`. Build with the Arc adapter generation enabled so the application has endpoints to register.
|
|
4
4
|
|
|
5
|
-
Set `cratis.arc.endpoints.segments-to-skip-for-route`
|
|
5
|
+
Keep all package segments by default. Set `cratis.arc.endpoints.segments-to-skip-for-route` only to remove a known package prefix from generated routes. Do not copy a skip count from another service: it changes the mapped path. Send a query to the Spring mapping for a registered read model and expect its data in the query result.
|
|
6
6
|
|
|
7
7
|
If a route is missing, use the generated manifest to confirm discovery, then verify the effective mapping in the running Spring host, including the method (`POST` for command execution). Compare that path against the client URL. The host derives the kebab-case routes using its `cratis.arc.endpoints` settings, including `route-prefix` and `segments-to-skip-for-route`.
|
|
@@ -23,7 +23,7 @@ Mount Arc on the existing host instead of starting a second listener. For live q
|
|
|
23
23
|
| --- | --- |
|
|
24
24
|
| Express | Mount `cratisArc(arc)` before body parsers; reading the body first makes commands answer 400 `malformedRequest`. Express middleware does not see upgrades; call `middleware.injectWebSocket(listener, upgradeNative)` for live queries (`upgradeNative` is needed in native-principal mode; the Express HTTP callback never sees upgrades). Use `middleware.shutdown(listener)`. |
|
|
25
25
|
| Fastify | `app.register(cratisArc, { arc })` installs raw-body handling and upgrades. WebSockets are on unless `webSockets: false`; do not attach another handler. The registration's `native` callback covers HTTP and upgrades. Raise both Fastify's `bodyLimit` (1 MiB default; Fastify answers 413 above it) and Arc's `hosting.maxBodyBytes` when accepting larger bodies. |
|
|
26
|
-
| Hono on Node |
|
|
26
|
+
| Hono on Node | Mount `cratisArc(arc)` and call `middleware.injectWebSocket(listener)` if you own the listener; retain the returned socket disposer. If starting a Hono listener, use `serveCratisArc(app, arc, { port })` to attach upgrades automatically. Supply the optional verified `native` callback to both middleware and listener setup when using native-principal mode. |
|
|
27
27
|
| `node:http` | Create the request listener with `createArcNodeHandler(arc.server)`. This handles HTTP, not upgrades; for WebSockets wire `attachNodeWebSockets(listener, arc.server, upgradeNative)` separately. |
|
|
28
28
|
|
|
29
29
|
Coordinate shutdown with `shutdownArcHost(arc.server, closeListener)` from `@cratis/arc.core/hosting`, or Express's wrapper above. Pass the adapter's transport-aware close/dispose callback when it provides one. Listener-only `close()` does not drain Arc participants or dispose Arc services.
|