@cratis/pi 7.50.0 → 7.51.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/authoring-skills.instructions.md +93 -0
- package/package/corpus/harnesses/copilot/instructions/profiles.instructions.md +4 -0
- package/package/corpus/prompts/review-skill.prompt.md +6 -8
- package/package/corpus/rules/authoring-skills.md +92 -0
- package/package/corpus/rules/general.md +1 -0
- package/package/corpus/rules/profiles.md +4 -0
- package/package/corpus/skills/cratis-application-react-specifications/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/SKILL.md +23 -29
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authentication.md +7 -7
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authorization.md +34 -32
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authproxy.md +1 -1
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/frontend.md +2 -2
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/local-development.md +3 -3
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/observable-emission-guards.md +8 -6
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/tenancy.md +3 -3
- package/package/corpus/skills/cratis-arc-command/SKILL.md +23 -25
- package/package/corpus/skills/cratis-arc-command/references/command-result.md +1 -1
- package/package/corpus/skills/cratis-arc-command/references/decisions-and-routing.md +9 -9
- package/package/corpus/skills/cratis-arc-command/references/generated-values.md +11 -12
- package/package/corpus/skills/cratis-arc-command/references/handler-shapes.md +4 -4
- package/package/corpus/skills/cratis-arc-command/references/proxy-generation.md +3 -3
- package/package/corpus/skills/cratis-arc-command/references/read-model-injection.md +1 -3
- package/package/corpus/skills/cratis-arc-command/references/shop-generation.md +11 -14
- package/package/corpus/skills/cratis-arc-command-execution/LICENSE +6 -0
- package/package/corpus/skills/cratis-arc-command-execution/SKILL.md +17 -19
- package/package/corpus/skills/cratis-arc-command-kotlin/SKILL.md +8 -7
- package/package/corpus/skills/cratis-arc-command-kotlin/references/read-model-naming.md +2 -2
- package/package/corpus/skills/cratis-arc-command-operation/SKILL.md +14 -15
- package/package/corpus/skills/cratis-arc-command-operation/references/execution-and-recovery.md +2 -2
- package/package/corpus/skills/cratis-arc-command-operation/references/testing.md +7 -8
- package/package/corpus/skills/cratis-arc-command-typescript/SKILL.md +14 -11
- package/package/corpus/skills/cratis-arc-command-typescript/references/chronicle-events.md +7 -7
- package/package/corpus/skills/cratis-arc-command-typescript/references/command-operations.md +4 -4
- package/package/corpus/skills/cratis-arc-command-typescript/references/hosting-and-storage.md +11 -7
- package/package/corpus/skills/cratis-arc-command-typescript/references/identity-and-introspection.md +4 -2
- package/package/corpus/skills/cratis-arc-command-typescript/references/observability-and-host-scopes.md +2 -2
- package/package/corpus/skills/cratis-arc-command-typescript/references/proxy-generation.md +3 -3
- package/package/corpus/skills/cratis-arc-command-typescript/references/slice-layout.md +1 -1
- package/package/corpus/skills/cratis-arc-command-typescript/verification.json +2 -2
- package/package/corpus/skills/cratis-arc-command-validation/SKILL.md +10 -14
- package/package/corpus/skills/cratis-arc-ef-core-migration/LICENSE +6 -0
- package/package/corpus/skills/cratis-arc-ef-core-migration/SKILL.md +9 -10
- package/package/corpus/skills/cratis-arc-go/SKILL.md +14 -15
- package/package/corpus/skills/cratis-arc-go/references/queries.md +2 -2
- package/package/corpus/skills/cratis-arc-hosting/SKILL.md +8 -8
- package/package/corpus/skills/cratis-arc-hosting/references/integrations-and-publish.md +11 -11
- package/package/corpus/skills/cratis-arc-identity-and-tenancy-kotlin/SKILL.md +3 -3
- package/package/corpus/skills/cratis-arc-observable-query-http/SKILL.md +13 -13
- package/package/corpus/skills/cratis-arc-observable-query-http/verification.json +1 -1
- package/package/corpus/skills/cratis-arc-query-kotlin/SKILL.md +2 -3
- package/package/corpus/skills/cratis-arc-query-paging/SKILL.md +11 -14
- package/package/corpus/skills/cratis-arc-query-typescript/SKILL.md +3 -3
- package/package/corpus/skills/cratis-arc-query-typescript/references/storage-observation-and-compliance.md +2 -2
- package/package/corpus/skills/cratis-arc-spring-data-kotlin/SKILL.md +3 -3
- package/package/corpus/skills/cratis-arc-testing-kotlin/SKILL.md +3 -3
- package/package/corpus/skills/cratis-arc-validation-kotlin/SKILL.md +1 -2
- package/package/corpus/skills/cratis-arc-validation-typescript/SKILL.md +4 -4
- package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +19 -22
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/command-effects.md +10 -10
- package/package/corpus/skills/cratis-chronicle-client-dotnet/SKILL.md +36 -36
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/additional-surfaces.md +4 -2
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/client-construction.md +1 -1
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/compatibility-check.md +13 -13
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/discovery.md +10 -10
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/hosting.md +10 -10
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/pinned-generation-delivery.md +7 -5
- package/package/corpus/skills/cratis-chronicle-client-elixir/SKILL.md +59 -64
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/append-api.md +17 -17
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/compliance.md +5 -3
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/connections.md +15 -11
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/event-sources.md +3 -1
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/pitfalls.md +4 -4
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/projections.md +8 -4
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/upgrading.md +19 -19
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/variants.md +3 -8
- package/package/corpus/skills/cratis-chronicle-client-elixir/verification.json +2 -2
- package/package/corpus/skills/cratis-chronicle-client-go/SKILL.md +16 -18
- package/package/corpus/skills/cratis-chronicle-client-go/references/projections.md +2 -2
- package/package/corpus/skills/cratis-chronicle-client-kotlin/SKILL.md +61 -58
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/connection-lifecycle.md +9 -10
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/discovery-and-registration.md +6 -6
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/event-sources.md +4 -2
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/java-api.md +4 -4
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/options.md +1 -1
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/spring-boot.md +24 -24
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/variants.md +6 -5
- package/package/corpus/skills/cratis-chronicle-client-typescript/SKILL.md +26 -20
- package/package/corpus/skills/cratis-chronicle-client-typescript/references/read-models-and-projections.md +4 -4
- package/package/corpus/skills/cratis-chronicle-client-typescript/references/testing.md +1 -1
- package/package/corpus/skills/cratis-chronicle-client-typescript/references/variants.md +4 -3
- package/package/corpus/skills/cratis-chronicle-client-typescript/verification.json +2 -2
- package/package/corpus/skills/cratis-chronicle-compliance/SKILL.md +9 -9
- package/package/corpus/skills/cratis-chronicle-decision-reads/SKILL.md +11 -10
- package/package/corpus/skills/cratis-chronicle-decision-reads/references/admission-and-ownership.md +1 -1
- package/package/corpus/skills/cratis-chronicle-decision-reads/references/choosing-how-a-rule-holds.md +5 -6
- package/package/corpus/skills/cratis-chronicle-event-constraints/SKILL.md +7 -7
- package/package/corpus/skills/cratis-chronicle-event-constraints/references/closing-streams.md +1 -1
- package/package/corpus/skills/cratis-chronicle-event-specifications/SKILL.md +6 -6
- package/package/corpus/skills/cratis-chronicle-event-type-migration/SKILL.md +12 -10
- package/package/corpus/skills/cratis-chronicle-event-type-migration/references/pinned-generations.md +2 -3
- package/package/corpus/skills/cratis-chronicle-hosting/SKILL.md +7 -7
- package/package/corpus/skills/cratis-chronicle-hosting/references/operations.md +5 -5
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/SKILL.md +6 -6
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/blocked-tools.md +5 -5
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/deployment.md +9 -10
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/observational-tools.md +29 -29
- package/package/corpus/skills/cratis-chronicle-multi-tenancy/SKILL.md +9 -9
- package/package/corpus/skills/cratis-chronicle-projection/SKILL.md +13 -14
- package/package/corpus/skills/cratis-chronicle-projection/references/fluent-builder.md +3 -5
- package/package/corpus/skills/cratis-chronicle-projection/references/model-bound-attributes.md +2 -4
- package/package/corpus/skills/cratis-chronicle-projection/references/variants.md +1 -3
- package/package/corpus/skills/cratis-chronicle-read-model/SKILL.md +16 -15
- package/package/corpus/skills/cratis-chronicle-read-model/references/queries.md +8 -8
- package/package/corpus/skills/cratis-chronicle-reducer/SKILL.md +14 -13
- package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +11 -12
- package/package/corpus/skills/cratis-cli-terminal-workbench/SKILL.md +6 -6
- package/package/corpus/skills/cratis-code-review/SKILL.md +13 -17
- package/package/corpus/skills/cratis-components-accessibility/SKILL.md +3 -3
- package/package/corpus/skills/cratis-components-common-controls/SKILL.md +15 -15
- package/package/corpus/skills/cratis-components-data-surfaces/SKILL.md +29 -29
- package/package/corpus/skills/cratis-components-schema-editor/SKILL.md +4 -4
- package/package/corpus/skills/cratis-components-schema-editor/references/tree-layout.md +1 -1
- package/package/corpus/skills/cratis-components-stepper-command-dialog/SKILL.md +6 -6
- package/package/corpus/skills/cratis-components-styling/LICENSE +6 -0
- package/package/corpus/skills/cratis-components-styling/SKILL.md +5 -4
- package/package/corpus/skills/cratis-components-toolbar/SKILL.md +5 -5
- package/package/corpus/skills/cratis-developer-marketing/SKILL.md +2 -2
- package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +3 -3
- package/package/corpus/skills/cratis-engineering-csharp-conventions/references/exceptions-logging-and-di.md +1 -1
- package/package/corpus/skills/cratis-engineering-effect-boundaries/references/failure-archetypes.md +4 -4
- package/package/corpus/skills/cratis-fundamentals-concept/SKILL.md +19 -24
- package/package/corpus/skills/cratis-fundamentals-concept/references/shop-generation.md +10 -10
- package/package/corpus/skills/cratis-fundamentals-concept/references/typescript-concepts.md +8 -8
- package/package/corpus/skills/cratis-fundamentals-concept-go/SKILL.md +10 -11
- package/package/corpus/skills/cratis-fundamentals-telemetry/SKILL.md +18 -18
- package/package/corpus/skills/cratis-fundamentals-telemetry/verification.json +1 -1
- package/package/corpus/skills/cratis-fundamentals-type-discovery/SKILL.md +4 -4
- package/package/corpus/skills/cratis-lens-browser-extension/SKILL.md +19 -19
- package/package/corpus/skills/cratis-orleans-jobs/SKILL.md +27 -27
- package/package/corpus/skills/cratis-orleans-jobs/references/state-machines.md +12 -12
- package/package/corpus/skills/cratis-performance-review/SKILL.md +8 -10
- package/package/corpus/skills/cratis-release-notes/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +1 -1
- package/package/corpus/skills/cratis-security-review/SKILL.md +8 -10
- package/package/corpus/skills/cratis-security-review/references/arc-boundaries.md +18 -16
- package/package/corpus/skills/cratis-specification-by-example/SKILL.md +1 -1
- package/package/corpus/skills/cratis-specifications-csharp/SKILL.md +26 -29
- package/package/corpus/skills/cratis-specifications-csharp/references/application-scenarios.md +8 -8
- package/package/corpus/skills/cratis-specifications-csharp/references/csharp-patterns.md +2 -2
- package/package/corpus/skills/cratis-specifications-csharp/references/integration-specs.md +6 -4
- package/package/corpus/skills/cratis-specifications-csharp/references/shared-lifecycle.md +6 -2
- package/package/corpus/skills/cratis-specifications-typescript/SKILL.md +2 -2
- package/package/corpus/skills/cratis-studio-mcp-safety-guidance/SKILL.md +4 -4
- package/package/corpus/skills/cratis-writing-voice-and-cadence/SKILL.md +1 -1
- package/package/corpus/skills/guiding-refactoring-with-code-health/SKILL.md +1 -1
- package/package/corpus/skills/prioritizing-technical-debt/SKILL.md +1 -1
- package/package/corpus/skills/risk-based-testing-with-code-health/SKILL.md +3 -3
- package/package/corpus/skills/safeguarding-ai-generated-code/SKILL.md +1 -1
- package/package.json +1 -1
|
@@ -12,8 +12,7 @@ static (Java) methods are queries. KSP generates a reflection-free
|
|
|
12
12
|
|
|
13
13
|
## Verified product sources
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
Kotlin 2.4.20, KSP 2.3.12, Spring Boot 4.1.1, JUnit Jupiter 6.1.3. `io.cratis:arc` supplies
|
|
15
|
+
Source: `Arc.Kotlin`. `io.cratis:arc` supplies
|
|
17
16
|
`io.cratis.arc.artifacts.ReadModel`, `io.cratis.arc.queries.Path`,
|
|
18
17
|
`@QueryHttpMethod`, `@QueryTransport`, `ObservableState<T>`. The optional
|
|
19
18
|
`arc-rxjava3` artifact adds RxJava 3 `Observable` support at runtime. The
|
|
@@ -213,7 +212,7 @@ site from opening a socket carrying your visitor's cookies.
|
|
|
213
212
|
|
|
214
213
|
For repository-backed paging, concept converters, tenant-aware storage and
|
|
215
214
|
Mongo/JPA observable snapshots, use `cratis-arc-spring-data-kotlin`.
|
|
216
|
-
Arc
|
|
215
|
+
Arc also aligns Chronicle projection collection names with Arc MongoDB;
|
|
217
216
|
read [../cratis-arc-command-kotlin/references/read-model-naming.md](../cratis-arc-command-kotlin/references/read-model-naming.md)
|
|
218
217
|
when upgrading or customizing collection names.
|
|
219
218
|
|
|
@@ -22,17 +22,14 @@ the query string — you choose a **return shape** that the framework can narrow
|
|
|
22
22
|
|
|
23
23
|
## Verified product sources
|
|
24
24
|
|
|
25
|
-
| Package |
|
|
26
|
-
| --- | --- |
|
|
27
|
-
| `Cratis.Arc.Core` | `
|
|
28
|
-
| `Cratis.Arc.MongoDB` | `
|
|
29
|
-
| `Cratis.Arc.EntityFrameworkCore` | `
|
|
30
|
-
| `@cratis/arc.react` | `
|
|
31
|
-
|
|
32
|
-
> Rechecked at Arc v22.75.0: request parsing, paging validation and storage
|
|
33
|
-
> observation contracts. Do not transfer a provider's ordering guarantee to another.
|
|
25
|
+
| Package | Purpose |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| `Cratis.Arc.Core` | `QueryableQueryRenderer`, `Paging`, `Sorting`, `PagingInfo` |
|
|
28
|
+
| `Cratis.Arc.MongoDB` | `Observe` helpers that page at the source |
|
|
29
|
+
| `Cratis.Arc.EntityFrameworkCore` | `DbSet<T>` observe helpers that page at the source |
|
|
30
|
+
| `@cratis/arc.react` | `useWithPaging`, `useSuspenseWithPaging` |
|
|
34
31
|
|
|
35
|
-
|
|
32
|
+
Do not transfer a provider's ordering guarantee to another. A small, bounded result
|
|
36
33
|
set does not need any of this — `IEnumerable<T>` is fine.
|
|
37
34
|
|
|
38
35
|
## The wire contract
|
|
@@ -52,9 +49,9 @@ Two consequences that surprise people:
|
|
|
52
49
|
|
|
53
50
|
GET paging/sorting keys are matched case-insensitively. `QueryPipeline.ValidatePaging`
|
|
54
51
|
runs the page validators whenever `paging.IsPaged`: negative page and zero or
|
|
55
|
-
negative size fail validation. This was already true
|
|
52
|
+
negative size fail validation. This was already true. A missing sort
|
|
56
53
|
direction parses as ascending, but GET sorting still needs both nonempty keys.
|
|
57
|
-
Sources
|
|
54
|
+
Sources: `Arc.Core/Queries/QueryStringQueryRequestReader.cs`,
|
|
58
55
|
`SortDirections.cs` and `QueryPipeline.cs` under `Source/DotNET`.
|
|
59
56
|
|
|
60
57
|
## Which return shapes page
|
|
@@ -103,7 +100,7 @@ query-shaped method on a read model is generic — a generic method is registere
|
|
|
103
100
|
and routed but can never be invoked, because there is nothing to close its type
|
|
104
101
|
parameters with.
|
|
105
102
|
|
|
106
|
-
|
|
103
|
+
Paged MongoDB observations re-read the page and total on each
|
|
107
104
|
change; unpaged observations retain incremental membership. The watch does not
|
|
108
105
|
always fetch the whole collection. MongoDB observation breaks sort ties on `_id`
|
|
109
106
|
and orders unsorted pages on `_id`. See the read-model skill's [versioned query-cost guidance](../cratis-chronicle-read-model/references/queries.md#cost-and-composition).
|
|
@@ -141,7 +138,7 @@ provide field-named sort helpers. For composed MongoDB/EF observations, pass
|
|
|
141
138
|
`ignoreQueryContext: true` to auxiliary sources so only the primary consumes
|
|
142
139
|
client paging/sorting and writes totals. Single-instance observations emit
|
|
143
140
|
`default` when absent/deleted/outside the filter; guard `hasData`/`isReady` in React.
|
|
144
|
-
Source: [
|
|
141
|
+
Source: [MongoDB observations](https://github.com/Cratis/Arc/blob/main/Documentation/backend/csharp/mongodb/observing-collections.md).
|
|
145
142
|
|
|
146
143
|
## Consume it from the frontend
|
|
147
144
|
|
|
@@ -19,12 +19,12 @@ frontend. Project setup, the builder, and hosts are in
|
|
|
19
19
|
|
|
20
20
|
## Verified product sources
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
server packages
|
|
22
|
+
Source: `Cratis/Arc.TypeScript` (source preview;
|
|
23
|
+
server packages not on npm), reading
|
|
24
24
|
`Source/Core/queries/index.ts`, `Documentation/queries/**`,
|
|
25
25
|
`Documentation/mongodb/**`, `Documentation/sql/**`,
|
|
26
26
|
`Documentation/testing/queries.md` and `observable-queries.md`, and
|
|
27
|
-
`Samples/Tasks` / `Samples/Library`. RxJS
|
|
27
|
+
`Samples/Tasks` / `Samples/Library`. RxJS is an optional peer of
|
|
28
28
|
`@cratis/arc.core`, required only for RxJS sources.
|
|
29
29
|
|
|
30
30
|
## Declare a read model and its queries
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# Storage observation and protected raw reads
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Source: `Cratis/Arc.TypeScript` (source preview, not on npm):
|
|
7
7
|
`Source/Drizzle/DrizzleOptions.ts`, package exports and observation code,
|
|
8
8
|
`Source/MongoDB/MongoReadModelsOptions.ts`, `Source/Chronicle/releaseRawDocument.ts`,
|
|
9
9
|
`Documentation/sql/observing-tables.md`, `observing-postgresql.md`, and
|
|
@@ -11,7 +11,7 @@ Verified at `Cratis/Arc.TypeScript` **v0.57.2** (source preview, not on npm):
|
|
|
11
11
|
|
|
12
12
|
## Drizzle live queries
|
|
13
13
|
|
|
14
|
-
`rxjs
|
|
14
|
+
`rxjs` is a **required peer** of `@cratis/arc.drizzle`, even with
|
|
15
15
|
observation disabled. Starting an observation without opting in throws; it never
|
|
16
16
|
silently returns a stream that will not update.
|
|
17
17
|
|
|
@@ -15,12 +15,12 @@ tenants or turn a repository into an observable source.
|
|
|
15
15
|
|
|
16
16
|
## Verified product sources
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Source: `Arc.Kotlin`: `Integrations/SpringDataJpa`,
|
|
19
19
|
`Integrations/SpringDataMongo` (observable query services/extensions, contextual
|
|
20
20
|
read-model providers, tenant access and converters) and
|
|
21
21
|
`Documentation/guides/spring-data/*.mdx`.
|
|
22
|
-
Add `io.cratis:arc-spring-data-jpa
|
|
23
|
-
`io.cratis:arc-spring-data-mongodb
|
|
22
|
+
Add `io.cratis:arc-spring-data-jpa:<version>` or
|
|
23
|
+
`io.cratis:arc-spring-data-mongodb:<version>`; both include the Arc Spring Boot
|
|
24
24
|
starter and corresponding Spring Data starter. Spring owns repository discovery,
|
|
25
25
|
datasource/entity manager, Mongo client and their standard configuration.
|
|
26
26
|
|
|
@@ -15,12 +15,12 @@ This is test support, not an alternative production host.
|
|
|
15
15
|
|
|
16
16
|
## Verified product sources
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Source: `Arc.Kotlin`: `Testing/src/main/kotlin/io/cratis/arc/testing`
|
|
19
19
|
(`CommandScenario`, `QueryScenario`, `ObservableQueryScenario`, result assertions),
|
|
20
20
|
`Integrations/Chronicle/ChronicleCommandScenario.kt`, and
|
|
21
21
|
`Documentation/guides/testing.mdx`. Add
|
|
22
|
-
`testImplementation("io.cratis:arc-testing
|
|
23
|
-
plugin and KSP version.
|
|
22
|
+
`testImplementation("io.cratis:arc-testing:<version>")`; align it with the runtime,
|
|
23
|
+
plugin and KSP version.
|
|
24
24
|
|
|
25
25
|
## Choose the pipeline
|
|
26
26
|
|
|
@@ -14,8 +14,7 @@ that way; keep service calls, async work, and cross-member logic imperative.
|
|
|
14
14
|
|
|
15
15
|
## Verified product sources
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
Kotlin 2.4.20, KSP 2.3.12, Spring Boot 4.1.1, JUnit Jupiter 6.1.3. `io.cratis:arc` supplies `io.cratis.arc.validation.FluentModelValidator`,
|
|
17
|
+
Source: `Arc.Kotlin`. `io.cratis:arc` supplies `io.cratis.arc.validation.FluentModelValidator`,
|
|
19
18
|
`CommandValidator<T>`, nongeneric `QueryValidator`, `ConceptValidator<T>`,
|
|
20
19
|
`ModelValidator<T>`, `ConceptValidationExclusion`, `IgnoreValidation`,
|
|
21
20
|
`CommandFilter`, `QueryFilter`. Sources: `queries/QueryValidator.kt`,
|
|
@@ -20,8 +20,8 @@ generator copies into generated proxies. Setup is in
|
|
|
20
20
|
|
|
21
21
|
## Verified product sources
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
server packages
|
|
23
|
+
Source: `Cratis/Arc.TypeScript` (source preview;
|
|
24
|
+
server packages not on npm), reading `Source/Core/validation/**` (including
|
|
25
25
|
`index.ts`, `ValidationResult.ts`, `Severity.ts`, `RuleBuilder.ts`),
|
|
26
26
|
`Source/Core/commands/Outcome.ts`, `Documentation/commands/command-validation.md`,
|
|
27
27
|
`validation-severity-filtering.md`, `command-outcomes.md`,
|
|
@@ -228,8 +228,8 @@ return rejected(validation('Unusually long title', ['title'], 'rule', Severity.W
|
|
|
228
228
|
return denied('Only the owner can rename a task');
|
|
229
229
|
```
|
|
230
230
|
|
|
231
|
-
- `ValidationResult.information/warning/error(message, options?)` (Arc for
|
|
232
|
-
TypeScript 0.34.0
|
|
231
|
+
- `ValidationResult.information/warning/error(message, options?)` (Requires Arc for
|
|
232
|
+
TypeScript 0.34.0) build a result at that severity; `options` sets
|
|
233
233
|
`members`, `state` (must be JSON-serializable), `reason` (default `rule`) and
|
|
234
234
|
`reasonDetail`. `members` defaults to `[]` and `reason` to `rule`; omitted
|
|
235
235
|
`state` and `reasonDetail` are left out of the result.
|
|
@@ -12,18 +12,16 @@ event you are not sure was appended — read the server instead of the code.
|
|
|
12
12
|
|
|
13
13
|
## Verified product sources
|
|
14
14
|
|
|
15
|
-
This skill
|
|
15
|
+
This skill draws on these sources:
|
|
16
16
|
|
|
17
|
-
| Package |
|
|
18
|
-
| --- | --- |
|
|
19
|
-
| `Cratis.Cli` |
|
|
20
|
-
| `Cratis.Chronicle` |
|
|
21
|
-
| `Cratis.Chronicle` | `19.50.1` | server authentication configuration and development-client registration |
|
|
17
|
+
| Package | Purpose |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| `Cratis.Cli` | command effects, confirmations, contexts, output and command tree |
|
|
20
|
+
| `Cratis.Chronicle` | the CLI's Chronicle client package; server authentication configuration and development-client registration |
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
when classifying a mutation or confirmation; it cites the exact tag.
|
|
22
|
+
Observer removal, partition-quarantine clearing, server-bound login and diagnose scope
|
|
23
|
+
are operational. Read [command effects](references/command-effects.md)
|
|
24
|
+
when classifying a mutation or confirmation.
|
|
27
25
|
|
|
28
26
|
The CLI ships a **versioned machine-readable catalog of its own surface**, and
|
|
29
27
|
that catalog is the authority for exact command names, `effect` and
|
|
@@ -85,15 +83,14 @@ notice explains the mismatch.
|
|
|
85
83
|
|
|
86
84
|
Use `cratis chronicle login <user>` (`--secret` or prompt), `chronicle logout`
|
|
87
85
|
and `chronicle auth status -o json` (`tokenServer`, `loginMatchesServer`). Login
|
|
88
|
-
refuses multi-host and `chronicle+srv://` targets.
|
|
89
|
-
the login token; log in again after upgrading. Context values can be changed
|
|
86
|
+
refuses multi-host and `chronicle+srv://` targets. Requires cratis CLI 3.21.0 for login to keep the token; an older CLI discarded it, so log in again if `auth status` shows no token. Context values can be changed
|
|
90
87
|
with `context set-value server|event-store|namespace|client-id|client-secret`.
|
|
91
88
|
Keep secrets out of logs and committed configuration.
|
|
92
|
-
Evidence: [ChronicleSettings.cs](https://github.com/Cratis/cli/blob/
|
|
93
|
-
and [authentication](https://github.com/Cratis/cli/blob/
|
|
94
|
-
Server evidence
|
|
95
|
-
[authentication configuration](https://github.com/Cratis/Chronicle/blob/
|
|
96
|
-
and [development-client registration](https://github.com/Cratis/Chronicle/blob/
|
|
89
|
+
Evidence: [ChronicleSettings.cs](https://github.com/Cratis/cli/blob/main/Source/Cli/Commands/Chronicle/ChronicleSettings.cs)
|
|
90
|
+
and [authentication](https://github.com/Cratis/cli/blob/main/Documentation/chronicle/auth.md).
|
|
91
|
+
Server evidence:
|
|
92
|
+
[authentication configuration](https://github.com/Cratis/Chronicle/blob/main/Source/Kernel/Core/Configuration/Authentication.cs)
|
|
93
|
+
and [development-client registration](https://github.com/Cratis/Chronicle/blob/main/Source/Kernel/Core/Setup/Authentication/AuthenticationService.cs)
|
|
97
94
|
(`EnsureDefaultClientCredentials`, compiled under `DEVELOPMENT`).
|
|
98
95
|
|
|
99
96
|
Prefer a named context over repeating a connection string:
|
|
@@ -166,8 +163,8 @@ The catalog recommends plain for `event-types list`, `projections list` and
|
|
|
166
163
|
automatically under the configured budget; quarantined partitions stop retrying.
|
|
167
164
|
Missing `IsQuarantined` is Unknown, not healthy. A stale value can mean lag or a
|
|
168
165
|
stopped partition: inspect attempts and observer state rather than guessing.
|
|
169
|
-
|
|
170
|
-
|
|
166
|
+
Observer clear does not clear partition quarantine. Source: Chronicle
|
|
167
|
+
`Documentation/concepts/observers.mdx`.
|
|
171
168
|
- **Fix the cause before replaying.** Replaying into an unfixed handler fails the
|
|
172
169
|
same way and buries the original error under a newer one.
|
|
173
170
|
- **A quarantined observer does not resume by itself.** A quarantine ends when
|
|
@@ -179,7 +176,7 @@ The catalog recommends plain for `event-types list`, `projections list` and
|
|
|
179
176
|
|
|
180
177
|
- **Observer and partition quarantine are separate.** `observers clear-quarantine`
|
|
181
178
|
clears only the observer. `observers clear-partition-quarantine <observer> <partition>`
|
|
182
|
-
|
|
179
|
+
needs Chronicle 19.29.0 or later, resets the retry budget and retries unless `--no-retry`
|
|
183
180
|
is given; handler side effects may repeat. `retry-partition` exits non-zero
|
|
184
181
|
when quarantined or not failed. `jobs resume` resumes Stopped jobs, not Failed.
|
|
185
182
|
|
|
@@ -202,7 +199,7 @@ These commands mutate the running store:
|
|
|
202
199
|
- `chronicle users add`, `chronicle users remove`
|
|
203
200
|
- `chronicle applications add`, `chronicle applications remove`
|
|
204
201
|
|
|
205
|
-
|
|
202
|
+
Check the installed catalog's `effect` before acting; it is the authority. `chronicle login/logout` are `local`, while
|
|
206
203
|
catalog's `effect` before acting. `chronicle login/logout` are `local`, while
|
|
207
204
|
`chronicle workbench` is `destructive` because its keys can mutate the store.
|
|
208
205
|
|
|
@@ -264,7 +261,7 @@ authorization.
|
|
|
264
261
|
- The terminal Workbench (`cratis chronicle workbench`) presents the same data
|
|
265
262
|
with mutating keys; a human at a terminal uses it, not an agent harness.
|
|
266
263
|
- The browser Workbench owns redaction, revision, and event-type authoring.
|
|
267
|
-
- Narrator (VS Code extension `cratis.narrator
|
|
264
|
+
- Narrator (VS Code extension `cratis.narrator`) browses stores, event types, observers and projections from the editor, using the same contexts in `~/.cratis/config.json`.
|
|
268
265
|
- Source-level diagnosis belongs in the application's own diagnostic workflow;
|
|
269
266
|
start there when the symptom reproduces locally, and start here when it is
|
|
270
267
|
only visible on a running server.
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<!-- Copyright (c) Cratis. All rights reserved. -->
|
|
2
2
|
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
|
|
3
3
|
|
|
4
|
-
# Chronicle CLI effects
|
|
4
|
+
# Chronicle CLI effects
|
|
5
5
|
|
|
6
|
-
Derived from `cratis llm-context
|
|
7
|
-
installed version's catalog, not this snapshot,
|
|
8
|
-
[effect/confirmation contract](https://github.com/Cratis/cli/blob/
|
|
6
|
+
Derived from `cratis llm-context`. Use the
|
|
7
|
+
installed version's catalog, not this snapshot, when they differ. The
|
|
8
|
+
[effect/confirmation contract](https://github.com/Cratis/cli/blob/main/Documentation/reference/llm-context.md)
|
|
9
9
|
defines `read-only`, `local`, `mutating`, `destructive`; every other or unknown
|
|
10
10
|
effect is a state change. `requiresConfirmation=true` fails non-interactively
|
|
11
11
|
without `--yes`, independently of effect. Confirmation is not authorization.
|
|
12
12
|
|
|
13
13
|
All paths below start with `cratis chronicle`. This table exhausts its
|
|
14
|
-
non-read-only commands
|
|
14
|
+
non-read-only commands.
|
|
15
15
|
|
|
16
16
|
| Path | Effect | requiresConfirmation |
|
|
17
17
|
| --- | --- | --- |
|
|
@@ -42,14 +42,14 @@ catalog; server version is included in diagnostic output.
|
|
|
42
42
|
|
|
43
43
|
Critical effect implementations at the tag:
|
|
44
44
|
|
|
45
|
-
- [RemoveObserverCommand.cs
|
|
45
|
+
- [RemoveObserverCommand.cs](https://github.com/Cratis/cli/blob/main/Source/Cli/Commands/Chronicle/Observers/RemoveObserverCommand.cs):
|
|
46
46
|
deletes observer records across all namespaces, leaves read model data,
|
|
47
47
|
refuses running/subscribed observers.
|
|
48
|
-
- [ClearPartitionQuarantineCommand.cs
|
|
49
|
-
|
|
50
|
-
- [ChronicleCommand.cs](https://github.com/Cratis/cli/blob/
|
|
48
|
+
- [ClearPartitionQuarantineCommand.cs](https://github.com/Cratis/cli/blob/main/Source/Cli/Commands/Chronicle/Observers/ClearPartitionQuarantineCommand.cs):
|
|
49
|
+
Chronicle 19.29.0 or later, resets retry budget, retries unless `--no-retry`.
|
|
50
|
+
- [ChronicleCommand.cs](https://github.com/Cratis/cli/blob/main/Source/Cli/Commands/Chronicle/ChronicleCommand.cs):
|
|
51
51
|
confirmation handling shared by prompted commands.
|
|
52
|
-
- [WorkbenchCommand.cs](https://github.com/Cratis/cli/blob/
|
|
52
|
+
- [WorkbenchCommand.cs](https://github.com/Cratis/cli/blob/main/Source/Cli/Commands/Chronicle/Workbench/WorkbenchCommand.cs):
|
|
53
53
|
destructive interactive surface, table output only.
|
|
54
54
|
|
|
55
55
|
The guard covers `chronicle` only. `direct login|logout|status|use` declares
|
|
@@ -16,20 +16,17 @@ There is no host requirement and no application architecture imposed.
|
|
|
16
16
|
|
|
17
17
|
## Verified product sources
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
from v19.50.0; earlier release numbers identify feature availability.
|
|
19
|
+
Source: `Cratis/Chronicle`.
|
|
21
20
|
|
|
22
|
-
| Package |
|
|
23
|
-
| --- | --- |
|
|
24
|
-
| `Cratis.Chronicle` | `
|
|
25
|
-
| `Cratis.Chronicle
|
|
26
|
-
| `Cratis.Chronicle.
|
|
27
|
-
| `Cratis.Chronicle.
|
|
28
|
-
| `Cratis.Chronicle.
|
|
29
|
-
| `Cratis.Chronicle.CodeAnalysis` | `19.50.1` | CHR analyzers, distributed as a client dependency |
|
|
21
|
+
| Package | Purpose |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| `Cratis.Chronicle` | `ChronicleClient`, `IEventStore`, `[EventType]`, existing observers; reducer discovery and nomination (`DefaultClientArtifactsProvider.cs`, `Reducers/{SelfReducerMethods,RegisteredReducerReadModel,ReducerCatalog}.cs`, `Registrations/ExplicitArtifacts.Types.cs`) |
|
|
24
|
+
| `Cratis.Chronicle.Connections` | `ChronicleConnectionString`, connection lifecycle |
|
|
25
|
+
| `Cratis.Chronicle.AspNetCore` | ASP.NET Core wiring, header/subdomain namespace resolvers |
|
|
26
|
+
| `Cratis.Chronicle.Testing` | in-process scenarios |
|
|
27
|
+
| `Cratis.Chronicle.CodeAnalysis` | CHR analyzers, distributed as a client dependency |
|
|
30
28
|
|
|
31
|
-
Take the version from nuget.org, not the
|
|
32
|
-
Reverify before claiming another version.
|
|
29
|
+
Take the version from nuget.org, not the placeholder version in the source.
|
|
33
30
|
|
|
34
31
|
## Lifecycle
|
|
35
32
|
|
|
@@ -92,7 +89,7 @@ dotnet add package Cratis.Chronicle # console / worker service
|
|
|
92
89
|
dotnet add package Cratis.Chronicle.AspNetCore # ASP.NET Core
|
|
93
90
|
```
|
|
94
91
|
|
|
95
|
-
|
|
92
|
+
Requires Chronicle 19.4.8 for `Cratis.Chronicle` to bring `Cratis.Chronicle.CodeAnalysis` as a
|
|
96
93
|
package dependency: consumers receive the CHR analyzers without opting in.
|
|
97
94
|
The package id is still separate; Chronicle does not run these analyzers over
|
|
98
95
|
its own generic client plumbing. Source: `Source/Clients/DotNET/DotNET.csproj`.
|
|
@@ -141,7 +138,7 @@ on development kernels; production always enforces it.
|
|
|
141
138
|
**There is no `ChronicleUrl` type and no microservice id.** The identity of a
|
|
142
139
|
connection is a connection string plus an event store name and optionally a
|
|
143
140
|
namespace. `ChronicleConnectionString` lives in `Cratis.Chronicle.Connections`
|
|
144
|
-
(`Source/Clients/Connections/ChronicleConnectionString.cs
|
|
141
|
+
(`Source/Clients/Connections/ChronicleConnectionString.cs`):
|
|
145
142
|
|
|
146
143
|
```
|
|
147
144
|
chronicle://host[:port]/?opts
|
|
@@ -162,10 +159,10 @@ client also falls back to these development credentials, including through
|
|
|
162
159
|
application, directly in persistent storage. Switching that storage to a
|
|
163
160
|
production image does not remove it: remove the development application and any
|
|
164
161
|
configuration declaration that would recreate it. Do not infer other clients'
|
|
165
|
-
authentication behavior from this one.
|
|
166
|
-
`Source/Clients/DotNET/ChronicleClient.cs
|
|
167
|
-
`Source/Clients/Connections/ServiceCollectionExtensions.cs
|
|
168
|
-
`Source/Kernel/Core/Setup/Authentication/AuthenticationService.cs
|
|
162
|
+
authentication behavior from this one. Source:
|
|
163
|
+
`Source/Clients/DotNET/ChronicleClient.cs`,
|
|
164
|
+
`Source/Clients/Connections/ServiceCollectionExtensions.cs`, and
|
|
165
|
+
`Source/Kernel/Core/Setup/Authentication/AuthenticationService.cs`.
|
|
169
166
|
Read [host wiring](references/hosting.md) for the deployment distinction.
|
|
170
167
|
|
|
171
168
|
> **Certificate validation is skipped by default, and that is deliberate.** The
|
|
@@ -189,9 +186,10 @@ Read [references/hosting.md](references/hosting.md) when wiring Chronicle into a
|
|
|
189
186
|
|
|
190
187
|
`ChronicleOptions.EventGenerationDelivery` defaults to `Compatibility`. Opt in
|
|
191
188
|
with `EventGenerationDelivery.Pinned` (`Cratis.Chronicle.Observation`) **before
|
|
192
|
-
connecting**. Reactors/reducers receive their handler's CLR event generation
|
|
193
|
-
|
|
194
|
-
|
|
189
|
+
connecting**. Reactors/reducers receive their handler's CLR event generation;
|
|
190
|
+
typed materialized projections use each clause's CLR generation.
|
|
191
|
+
|
|
192
|
+
Requires Chronicle 19.41.0 for reactors/reducers and 19.48.0 for typed materialized projections.
|
|
195
193
|
|
|
196
194
|
Read [references/pinned-generation-delivery.md](references/pinned-generation-delivery.md)
|
|
197
195
|
for compiling standalone/host configuration, registration constraints, and the
|
|
@@ -215,7 +213,7 @@ public record <EventName>(<Type> <Property>);
|
|
|
215
213
|
```
|
|
216
214
|
|
|
217
215
|
`EventTypeAttribute` is in `Cratis.Chronicle.Events` —
|
|
218
|
-
`Source/Clients/DotNET/Events/EventTypeAttribute.cs
|
|
216
|
+
`Source/Clients/DotNET/Events/EventTypeAttribute.cs`:
|
|
219
217
|
|
|
220
218
|
```csharp
|
|
221
219
|
public sealed class EventTypeAttribute(string id = "", uint generation = EventTypeGeneration.FirstValue) : Attribute
|
|
@@ -228,13 +226,13 @@ public sealed class EventTypeAttribute(string id = "", uint generation = EventTy
|
|
|
228
226
|
For a new event, pass nothing: the type name is the identifier. Use `generation`
|
|
229
227
|
only when evolving a contract that already exists, and prefer
|
|
230
228
|
`EventTypeGenerationForAttribute<TEventType>` over a second `[EventType]` — the
|
|
231
|
-
guidance is in the attribute's own remarks (`EventTypeAttribute.cs
|
|
229
|
+
guidance is in the attribute's own remarks (`EventTypeAttribute.cs`).
|
|
232
230
|
|
|
233
231
|
## Appending
|
|
234
232
|
|
|
235
233
|
`IEventLog : IEventSequence` is a marker
|
|
236
|
-
(`Source/Clients/DotNET/EventSequences/IEventLog.cs
|
|
237
|
-
`IEventSequence` (`Source/Clients/DotNET/EventSequences/IEventSequence.cs
|
|
234
|
+
(`Source/Clients/DotNET/EventSequences/IEventLog.cs`); the surface is on
|
|
235
|
+
`IEventSequence` (`Source/Clients/DotNET/EventSequences/IEventSequence.cs`):
|
|
238
236
|
|
|
239
237
|
```csharp
|
|
240
238
|
Task<AppendResult> Append( // :115
|
|
@@ -253,7 +251,9 @@ Task<AppendManyResult> AppendMany(EventSourceId eventSourceId, IEnumerable<objec
|
|
|
253
251
|
Task<AppendManyResult> AppendMany(IEnumerable<EventForEventSourceId> events, /* ... */); // :167
|
|
254
252
|
```
|
|
255
253
|
|
|
256
|
-
|
|
254
|
+
Requires Chronicle kernel 19.30.0 for event source definitions.
|
|
255
|
+
|
|
256
|
+
Event source definitions: a never-instantiated type marked
|
|
257
257
|
`IEventSource`, named by `[EventSource(name)]` (default: the type name without a trailing
|
|
258
258
|
`EventSource`) and declaring streams with `[EventStream(name)]` (all in
|
|
259
259
|
`Cratis.Chronicle.EventSources`; both take `Description` and `Concurrency`). Append through
|
|
@@ -288,11 +288,11 @@ if (!result.IsSuccess)
|
|
|
288
288
|
|
|
289
289
|
- `EventSourceId` is a `record EventSourceId(string Value) : ConceptAs<string>`
|
|
290
290
|
with implicit conversion from `string` and `Guid`
|
|
291
|
-
(`Source/Clients/DotNET/Events/EventSourceId.cs
|
|
291
|
+
(`Source/Clients/DotNET/Events/EventSourceId.cs`).
|
|
292
292
|
- `AppendResult` carries `SequenceNumber`, `IsSuccess`,
|
|
293
293
|
`HasConstraintViolations`, `HasConcurrencyViolations`, `HasErrors`,
|
|
294
294
|
`ConstraintViolations`, `ConcurrencyViolation`, `Errors`, and the routing facts
|
|
295
|
-
(`Source/Clients/DotNET/EventSequences/AppendResult.cs
|
|
295
|
+
(`Source/Clients/DotNET/EventSequences/AppendResult.cs`).
|
|
296
296
|
- The `IEnumerable<EventForEventSourceId>` overload is the way to append across
|
|
297
297
|
several event sources in one batch.
|
|
298
298
|
- **There is no `AppendAnonymous`.** It does not exist anywhere in the product.
|
|
@@ -316,20 +316,20 @@ await unitOfWork.Commit();
|
|
|
316
316
|
```
|
|
317
317
|
|
|
318
318
|
`ITransactionalEventSequence` returns `Task`, not a result
|
|
319
|
-
(`Source/Clients/DotNET/EventSequences/ITransactionalEventSequence.cs
|
|
319
|
+
(`Source/Clients/DotNET/EventSequences/ITransactionalEventSequence.cs`); the
|
|
320
320
|
results live on the unit of work.
|
|
321
321
|
|
|
322
322
|
## Observing
|
|
323
323
|
|
|
324
324
|
| Artifact | Shape | Source |
|
|
325
325
|
| --- | --- | --- |
|
|
326
|
-
| Reactor | marker `IReactor` (empty interface), `[Reactor]` optional | `Reactors/IReactor.cs
|
|
326
|
+
| Reactor | marker `IReactor` (empty interface), `[Reactor]` optional | `Reactors/IReactor.cs`, `Reactors/ReactorAttribute.cs` |
|
|
327
327
|
| Self model (.NET reducer default) | public static `Reduce(event, model? current[, EventContext])`, returns model or `Task<model>` (nullable results allowed); no marker | `Reducers/SelfReducerMethods.cs` |
|
|
328
|
-
| Separate reducer | `IReducerFor<TReadModel>` for DI, replay instance behavior or separation | `Reducers/IReducerFor.cs
|
|
328
|
+
| Separate reducer | `IReducerFor<TReadModel>` for DI, replay instance behavior or separation | `Reducers/IReducerFor.cs` |
|
|
329
329
|
| Plain reducer | instance handlers infer one model; nomination required | `Reducers/RegisteredReducerReadModel.cs` |
|
|
330
|
-
| Projection | `IProjectionFor<TReadModel>` with `Define(IProjectionBuilderFor<TReadModel>)` | `Projections/IProjectionFor.cs
|
|
330
|
+
| Projection | `IProjectionFor<TReadModel>` with `Define(IProjectionBuilderFor<TReadModel>)` | `Projections/IProjectionFor.cs` |
|
|
331
331
|
| Model-bound projection | attributes on the read model | `Projections/ModelBound/` |
|
|
332
|
-
| Read model reactor | marker `IReadModelReactor`, methods `Added`/`Modified`/`Removed` | `ReadModels/IReadModelReactor.cs
|
|
332
|
+
| Read model reactor | marker `IReadModelReactor`, methods `Added`/`Modified`/`Removed` | `ReadModels/IReadModelReactor.cs` |
|
|
333
333
|
|
|
334
334
|
Read [observer handlers and reads](references/discovery.md#observer-handlers-and-reads)
|
|
335
335
|
for reactor dispatch, an instance-handler example and `eventStore.ReadModels` APIs.
|
|
@@ -342,7 +342,7 @@ Plain instance reducers require nomination before store creation. Self models
|
|
|
342
342
|
need no activation or fold-time DI. See the [read-model ladder](../cratis-chronicle-read-model/SKILL.md#step-3--choose-a-projection-or-a-reducer)
|
|
343
343
|
and [reducer contract](../cratis-chronicle-reducer/SKILL.md) for placement,
|
|
344
344
|
upgrades, warnings and conflicts. Self reduction is
|
|
345
|
-
.NET-only
|
|
345
|
+
.NET-only, not an other-client or Stage contract.
|
|
346
346
|
|
|
347
347
|
Read [discovery and nomination](references/discovery.md) for missing artifacts,
|
|
348
348
|
plain-class registration or `AutoDiscoverAndRegister = false`.
|
|
@@ -360,8 +360,8 @@ plain-class registration or `AutoDiscoverAndRegister = false`.
|
|
|
360
360
|
| Polling `IsConnected` to know it is ready | Connected is not registered; use `WaitForRegistration` |
|
|
361
361
|
| Treating a quiet reactor as "no events yet" | Keepalive loss stops observers while appends keep succeeding |
|
|
362
362
|
| Returning from `Main` after appending | The observation stream dies with the process |
|
|
363
|
-
| Assuming no CHR analyzers without an explicit reference | The client brings `Cratis.Chronicle.CodeAnalysis` transitively
|
|
364
|
-
| Copying a version out of the repository | It is a
|
|
363
|
+
| Assuming no CHR analyzers without an explicit reference | The client brings `Cratis.Chronicle.CodeAnalysis` transitively |
|
|
364
|
+
| Copying a version out of the repository | It is a placeholder; take it from nuget.org |
|
|
365
365
|
|
|
366
366
|
## Verify
|
|
367
367
|
|
package/package/corpus/skills/cratis-chronicle-client-dotnet/references/additional-surfaces.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# Additional client surfaces
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Source: `Cratis/Chronicle`:
|
|
7
7
|
`Source/Clients/DotNET/EventSequences/{IEventSequence,EventForEventSourceId}.cs`,
|
|
8
8
|
`Events/{EventSerializer,ICanProvideAdditionalEventInformation}.cs`, `Seeding/`,
|
|
9
9
|
and `Documentation/event-seeding/seeding-with-csharp.mdx`. Connection checks:
|
|
@@ -12,8 +12,10 @@ and `Documentation/event-seeding/seeding-with-csharp.mdx`. Connection checks:
|
|
|
12
12
|
|
|
13
13
|
## Tags and ambiguous appends
|
|
14
14
|
|
|
15
|
+
Requires Chronicle 19.15.0 for named tags.
|
|
16
|
+
|
|
15
17
|
`AppendWithNamedTags` / `AppendManyWithNamedTags` and
|
|
16
|
-
`EventForEventSourceId.NamedTags` carry structured tags
|
|
18
|
+
`EventForEventSourceId.NamedTags` carry structured tags. Tags are
|
|
17
19
|
plaintext and indexed: never personal data, credentials or business payloads.
|
|
18
20
|
Upgrade kernels before clients that depend on named tags. `AppendThroughEventSource`
|
|
19
21
|
uses a declared source type and stream name rather than hand-built routing strings.
|
package/package/corpus/skills/cratis-chronicle-client-dotnet/references/compatibility-check.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
## The client and the server check each other
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Source: `Cratis/Chronicle`: `ChronicleConnection.cs`,
|
|
4
4
|
`ChronicleConnectionStringBuilder.cs`, `ChronicleOptions.cs` and
|
|
5
5
|
`Source/Kernel/Compatibility/`.
|
|
6
6
|
|
|
@@ -9,30 +9,30 @@ Verified at **Cratis/Chronicle v19.50.0**, `ChronicleConnection.cs`,
|
|
|
9
9
|
is sufficient, including for a standalone `ChronicleClient`. Use this only for
|
|
10
10
|
a known-safe skew against a kernel that cannot yet be redeployed: it hides
|
|
11
11
|
**genuine incompatibilities too**. This is independent of `skipTlsValidation`.
|
|
12
|
-
|
|
12
|
+
Requires Chronicle kernel 19.0.1: it orders contract comparison by protocol version, so added
|
|
13
13
|
fields in a newer client do not by themselves make an older kernel incompatible.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
The compatibility check is a server-side RPC, and **the client
|
|
16
16
|
runs it automatically inside `Connect()`** —
|
|
17
|
-
`Source/Clients/Connections/ChronicleConnection.cs
|
|
18
|
-
`CheckCompatibility
|
|
19
|
-
version, and the descriptor set its contracts package was built with
|
|
20
|
-
The rationale is at
|
|
17
|
+
`Source/Clients/Connections/ChronicleConnection.cs` calls
|
|
18
|
+
`CheckCompatibility`, sending the client type, client version, protocol
|
|
19
|
+
version, and the descriptor set its contracts package was built with.
|
|
20
|
+
The rationale is at: Chronicle has clients in four languages and only
|
|
21
21
|
some can build a descriptor set at runtime, so each ships the one it was built
|
|
22
22
|
with and the server does the single comparison.
|
|
23
23
|
|
|
24
24
|
Behavior you can rely on:
|
|
25
25
|
|
|
26
26
|
- A server too old to have the RPC answers `Unimplemented`, and the client falls
|
|
27
|
-
back to the previous client-side exchange
|
|
27
|
+
back to the previous client-side exchange — upgrading the client
|
|
28
28
|
does not silently drop the check.
|
|
29
|
-
- Any other transport error is **logged and ignored
|
|
29
|
+
- Any other transport error is **logged and ignored**, on the stated
|
|
30
30
|
reasoning that failing to ask says nothing about whether the two sides agree.
|
|
31
31
|
- A genuine mismatch throws `IncompatibleServerException`
|
|
32
|
-
(`Source/Clients/Connections/IncompatibleServerException.cs
|
|
32
|
+
(`Source/Clients/Connections/IncompatibleServerException.cs`) whose message
|
|
33
33
|
names the server address, its version, its protocol version, and the specific
|
|
34
|
-
incompatibilities
|
|
34
|
+
incompatibilities.
|
|
35
35
|
|
|
36
36
|
The client identifies itself as `".NET"`
|
|
37
|
-
(`Source/Clients/Connections/ChronicleClientIdentity.cs
|
|
38
|
-
informational version
|
|
37
|
+
(`Source/Clients/Connections/ChronicleClientIdentity.cs`) with its assembly
|
|
38
|
+
informational version and the contracts protocol version.
|
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
## Discovery and explicit registration
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
Self and nominated reducer discovery were verified at **v19.59.4**:
|
|
13
|
+
Source: Cratis/Chronicle, covering projection/reactor APIs and self and nominated reducer discovery:
|
|
15
14
|
`Source/Clients/DotNET/DefaultClientArtifactsProvider.cs`,
|
|
16
15
|
`Reducers/{SelfReducerMethods,RegisteredReducerReadModel,ReducerCatalog}.cs`,
|
|
17
16
|
`ReadModels/ReadModelBuilderOwnership.cs`,
|
|
@@ -37,8 +36,10 @@ Multiple projection or reducer targets in one class fail discovery with
|
|
|
37
36
|
`TypeImplementsMultipleProjectionInterfaces` / `TypeMustImplementOnlyOneReducer`
|
|
38
37
|
(analyzer CHR0057). They are not silently flattened into independent artifacts.
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
Requires Chronicle 19.58.0 for self shapes.
|
|
40
|
+
|
|
41
|
+
Complete self shapes are marker-free discovery signals (.NET-only).
|
|
42
|
+
Existing static helpers can therefore become reducers on upgrade.
|
|
42
43
|
No model is activated, and `Reduce` cannot take injected services. Static near
|
|
43
44
|
misses whose current/result refers to the model warn (CHR0058) and are skipped;
|
|
44
45
|
explicit nomination rejects them. Once a valid shape exists, malformed siblings
|
|
@@ -99,10 +100,9 @@ is missing.
|
|
|
99
100
|
|
|
100
101
|
## Observer handlers and reads
|
|
101
102
|
|
|
102
|
-
This existing handler/read surface was verified at **v19.50.1**.
|
|
103
103
|
**A reactor handler is found by its first parameter's type**, and further
|
|
104
104
|
parameters are resolved as dependencies — `EventContext`, a read model, a service
|
|
105
|
-
(`Source/Clients/DotNET/Reactors/EventHandlerMethods.cs
|
|
105
|
+
(`Source/Clients/DotNET/Reactors/EventHandlerMethods.cs`). The
|
|
106
106
|
return may be `Task`, `void`, or a side-effect event type.
|
|
107
107
|
|
|
108
108
|
```csharp
|
|
@@ -125,7 +125,7 @@ it is not something you write. `Source/Clients/DotNET/Observation/` holds
|
|
|
125
125
|
|
|
126
126
|
Read models are queried through `eventStore.ReadModels`
|
|
127
127
|
(`Source/Clients/DotNET/ReadModels/IReadModels.cs`):
|
|
128
|
-
`GetInstanceById<TReadModel>(ReadModelKey, ReadModelSessionId?)
|
|
129
|
-
`GetInstances<TReadModel>(EventCount?)
|
|
130
|
-
`GetSnapshotsById<TReadModel
|
|
131
|
-
`IObservable<ReadModelChangeset<TReadModel>> Watch<TReadModel>()
|
|
128
|
+
`GetInstanceById<TReadModel>(ReadModelKey, ReadModelSessionId?)`,
|
|
129
|
+
`GetInstances<TReadModel>(EventCount?)`,
|
|
130
|
+
`GetSnapshotsById<TReadModel>`,
|
|
131
|
+
`IObservable<ReadModelChangeset<TReadModel>> Watch<TReadModel>()`.
|