@cratis/pi 7.34.1 → 7.35.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/agents/security-reviewer.md +1 -0
- package/package/corpus/agents/spec-writer.md +1 -1
- package/package/corpus/harnesses/pi/extensions/shared/rules.ts +3 -1
- package/package/corpus/hooks/scripts/cratis-nuget-pins.txt +7 -6
- package/package/corpus/hooks/scripts/cratis-release-notes-reviewed.cjs +7 -6
- package/package/corpus/hooks/scripts/cratis-store-mutations.json +7 -3
- package/package/corpus/product-sync.json +896 -0
- package/package/corpus/prompts/add-business-rule.prompt.md +1 -1
- package/package/corpus/prompts/ship-changes.prompt.md +2 -2
- package/package/corpus/rules/ai-distribution.md +31 -3
- package/package/corpus/rules/application-profile.md +2 -1
- package/package/corpus/rules/components.md +66 -7
- package/package/corpus/rules/concepts.md +11 -3
- package/package/corpus/rules/csharp.md +3 -1
- package/package/corpus/rules/dialogs.md +9 -0
- package/package/corpus/rules/efcore.md +1 -1
- package/package/corpus/rules/elixir.md +49 -0
- package/package/corpus/rules/framework.md +5 -3
- package/package/corpus/rules/general.md +1 -0
- package/package/corpus/rules/glossary.md +4 -4
- package/package/corpus/rules/go-engineering.md +60 -0
- package/package/corpus/rules/go.md +115 -0
- package/package/corpus/rules/java.md +5 -2
- package/package/corpus/rules/kotlin.md +7 -5
- package/package/corpus/rules/orleans.md +65 -9
- package/package/corpus/rules/profiles.md +43 -6
- package/package/corpus/rules/pull-requests.md +3 -3
- package/package/corpus/rules/react.md +8 -1
- package/package/corpus/rules/reactors.md +27 -3
- package/package/corpus/rules/specs.csharp.md +11 -4
- package/package/corpus/rules/specs.scenarios.csharp.md +35 -4
- package/package/corpus/rules/specs.typescript.md +2 -1
- package/package/corpus/rules/storybook.md +1 -1
- package/package/corpus/rules/typescript.md +1 -1
- package/package/corpus/rules/vertical-slices.md +37 -5
- package/package/corpus/skills/cratis-application-react-specifications/SKILL.md +4 -2
- package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +18 -8
- package/package/corpus/skills/cratis-application-slice-specifications/references/query-and-decision-scenarios.md +65 -0
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/SKILL.md +53 -57
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authentication.md +38 -42
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authorization.md +18 -7
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authproxy.md +30 -0
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/frontend.md +12 -9
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/local-development.md +9 -9
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/observable-emission-guards.md +8 -5
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/tenancy.md +20 -4
- package/package/corpus/skills/cratis-arc-command/SKILL.md +32 -10
- package/package/corpus/skills/cratis-arc-command/references/command-result.md +12 -5
- package/package/corpus/skills/cratis-arc-command/references/decisions-and-routing.md +95 -0
- package/package/corpus/skills/cratis-arc-command/references/generated-values.md +3 -2
- package/package/corpus/skills/cratis-arc-command/references/handler-shapes.md +8 -8
- package/package/corpus/skills/cratis-arc-command/references/proxy-generation.md +22 -3
- package/package/corpus/skills/cratis-arc-command/references/read-model-injection.md +13 -1
- package/package/corpus/skills/cratis-arc-command-execution/SKILL.md +19 -9
- package/package/corpus/skills/cratis-arc-command-kotlin/SKILL.md +44 -18
- package/package/corpus/skills/cratis-arc-command-kotlin/references/read-model-naming.md +29 -0
- package/package/corpus/skills/cratis-arc-command-operation/SKILL.md +10 -9
- 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 +4 -3
- package/package/corpus/skills/cratis-arc-command-typescript/SKILL.md +42 -22
- package/package/corpus/skills/cratis-arc-command-typescript/references/chronicle-events.md +36 -5
- package/package/corpus/skills/cratis-arc-command-typescript/references/command-operations.md +114 -0
- package/package/corpus/skills/cratis-arc-command-typescript/references/hosting-and-storage.md +37 -16
- package/package/corpus/skills/cratis-arc-command-typescript/references/identity-and-introspection.md +88 -0
- package/package/corpus/skills/cratis-arc-command-typescript/references/observability-and-host-scopes.md +25 -0
- package/package/corpus/skills/cratis-arc-command-typescript/references/proxy-generation.md +35 -4
- package/package/corpus/skills/cratis-arc-command-typescript/references/slice-layout.md +11 -0
- package/package/corpus/skills/cratis-arc-command-typescript/verification.json +8 -1
- package/package/corpus/skills/cratis-arc-command-validation/SKILL.md +49 -19
- package/package/corpus/skills/cratis-arc-ef-core-migration/SKILL.md +12 -6
- package/package/corpus/skills/cratis-arc-go/SKILL.md +148 -0
- package/package/corpus/skills/cratis-arc-go/references/queries.md +80 -0
- package/package/corpus/skills/cratis-arc-hosting/SKILL.md +96 -0
- package/package/corpus/skills/cratis-arc-hosting/references/integrations-and-publish.md +80 -0
- package/package/corpus/skills/cratis-arc-identity-and-tenancy-kotlin/SKILL.md +137 -0
- package/package/corpus/skills/cratis-arc-observable-query-http/SKILL.md +20 -2
- package/package/corpus/skills/cratis-arc-query-kotlin/SKILL.md +26 -6
- package/package/corpus/skills/cratis-arc-query-paging/SKILL.md +25 -20
- package/package/corpus/skills/cratis-arc-query-typescript/SKILL.md +32 -6
- package/package/corpus/skills/cratis-arc-query-typescript/references/storage-observation-and-compliance.md +66 -0
- package/package/corpus/skills/cratis-arc-query-typescript/verification.json +5 -1
- package/package/corpus/skills/cratis-arc-react-page/SKILL.md +24 -13
- package/package/corpus/skills/cratis-arc-react-page/references/data-page.md +20 -10
- package/package/corpus/skills/cratis-arc-react-page/references/data-tables.md +17 -3
- package/package/corpus/skills/cratis-arc-react-page/references/dialogs.md +14 -3
- package/package/corpus/skills/cratis-arc-react-page/references/from-screenplay.md +6 -1
- package/package/corpus/skills/cratis-arc-react-page/references/provenance.md +1 -1
- package/package/corpus/skills/cratis-arc-react-page/references/queries-and-commands.md +11 -1
- package/package/corpus/skills/cratis-arc-react-page/verification.json +6 -1
- package/package/corpus/skills/cratis-arc-spring-data-kotlin/SKILL.md +163 -0
- package/package/corpus/skills/cratis-arc-testing-kotlin/SKILL.md +131 -0
- package/package/corpus/skills/cratis-arc-validation-kotlin/SKILL.md +44 -11
- package/package/corpus/skills/cratis-arc-validation-typescript/SKILL.md +5 -3
- package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +79 -25
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/command-effects.md +57 -0
- package/package/corpus/skills/cratis-chronicle-client-dotnet/SKILL.md +87 -99
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/additional-surfaces.md +65 -0
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/client-construction.md +42 -0
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/compatibility-check.md +12 -0
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/discovery.md +43 -19
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/hosting.md +29 -1
- package/package/corpus/skills/cratis-chronicle-client-elixir/SKILL.md +158 -162
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/append-api.md +36 -15
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/compliance.md +32 -0
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/connections.md +56 -0
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/event-sources.md +64 -0
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/pitfalls.md +25 -0
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/projections.md +48 -0
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/upgrading.md +34 -0
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/variants.md +13 -5
- package/package/corpus/skills/cratis-chronicle-client-elixir/verification.json +23 -0
- package/package/corpus/skills/cratis-chronicle-client-go/SKILL.md +162 -0
- package/package/corpus/skills/cratis-chronicle-client-go/references/projections.md +73 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/SKILL.md +87 -88
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/connection-lifecycle.md +13 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/discovery-and-registration.md +14 -4
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/event-sources.md +65 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/options.md +29 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/spring-boot.md +13 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/variants.md +5 -4
- package/package/corpus/skills/cratis-chronicle-client-typescript/SKILL.md +165 -156
- package/package/corpus/skills/cratis-chronicle-client-typescript/references/read-models-and-projections.md +54 -11
- package/package/corpus/skills/cratis-chronicle-client-typescript/references/testing.md +126 -0
- package/package/corpus/skills/cratis-chronicle-client-typescript/references/variants.md +3 -5
- package/package/corpus/skills/cratis-chronicle-client-typescript/verification.json +19 -0
- package/package/corpus/skills/cratis-chronicle-compliance/SKILL.md +36 -13
- package/package/corpus/skills/cratis-chronicle-decision-reads/SKILL.md +110 -0
- package/package/corpus/skills/cratis-chronicle-decision-reads/references/admission-and-ownership.md +57 -0
- package/package/corpus/skills/cratis-chronicle-decision-reads/verification.json +12 -0
- package/package/corpus/skills/cratis-chronicle-event-constraints/SKILL.md +58 -19
- package/package/corpus/skills/cratis-chronicle-event-constraints/references/closing-streams.md +73 -0
- package/package/corpus/skills/cratis-chronicle-event-modeling/SKILL.md +32 -3
- package/package/corpus/skills/cratis-chronicle-event-specifications/SKILL.md +18 -5
- package/package/corpus/skills/cratis-chronicle-event-type-migration/SKILL.md +32 -2
- package/package/corpus/skills/cratis-chronicle-hosting/SKILL.md +134 -0
- package/package/corpus/skills/cratis-chronicle-hosting/references/operations.md +89 -0
- package/package/corpus/skills/cratis-chronicle-hosting/verification.json +14 -0
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/SKILL.md +93 -66
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/blocked-tools.md +21 -7
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/deployment.md +77 -0
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/observational-tools.md +46 -4
- package/package/corpus/skills/cratis-chronicle-multi-tenancy/SKILL.md +15 -1
- package/package/corpus/skills/cratis-chronicle-projection/SKILL.md +44 -10
- package/package/corpus/skills/cratis-chronicle-projection/references/fluent-builder.md +7 -1
- package/package/corpus/skills/cratis-chronicle-projection/references/model-bound-attributes.md +8 -0
- package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +85 -105
- package/package/corpus/skills/cratis-chronicle-reactor/references/specifications.md +20 -1
- package/package/corpus/skills/cratis-chronicle-read-model/SKILL.md +2 -2
- package/package/corpus/skills/cratis-chronicle-read-model/references/queries.md +35 -16
- package/package/corpus/skills/cratis-chronicle-read-model-specifications/SKILL.md +15 -3
- package/package/corpus/skills/cratis-chronicle-reducer/SKILL.md +23 -4
- package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +40 -15
- package/package/corpus/skills/cratis-cli-terminal-workbench/SKILL.md +20 -6
- package/package/corpus/skills/cratis-code-review/SKILL.md +25 -3
- package/package/corpus/skills/cratis-components-accessibility/SKILL.md +20 -4
- package/package/corpus/skills/cratis-components-schema-editor/SKILL.md +40 -28
- package/package/corpus/skills/cratis-components-schema-editor/references/tree-layout.md +62 -0
- package/package/corpus/skills/cratis-components-schema-editor/verification.json +14 -0
- package/package/corpus/skills/cratis-components-stepper-command-dialog/SKILL.md +16 -8
- package/package/corpus/skills/cratis-components-styling/SKILL.md +57 -20
- package/package/corpus/skills/cratis-components-styling/verification.json +13 -0
- package/package/corpus/skills/cratis-components-toolbar/SKILL.md +37 -7
- package/package/corpus/skills/cratis-components-toolbar/verification.json +12 -0
- package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +6 -0
- package/package/corpus/skills/cratis-engineering-csharp-conventions/references/exceptions-logging-and-di.md +5 -3
- package/package/corpus/skills/cratis-fundamentals-concept/SKILL.md +19 -6
- package/package/corpus/skills/cratis-fundamentals-concept/references/typescript-concepts.md +97 -0
- package/package/corpus/skills/cratis-fundamentals-concept/verification.json +4 -1
- package/package/corpus/skills/cratis-fundamentals-concept-go/SKILL.md +112 -0
- package/package/corpus/skills/cratis-fundamentals-type-discovery/SKILL.md +54 -17
- package/package/corpus/skills/cratis-fundamentals-type-discovery/verification.json +14 -0
- package/package/corpus/skills/cratis-lens-browser-extension/SKILL.md +55 -28
- package/package/corpus/skills/cratis-performance-review/SKILL.md +5 -2
- package/package/corpus/skills/cratis-release-notes/SKILL.md +3 -1
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +5 -4
- package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +5 -6
- package/package/corpus/skills/cratis-screenplay-command-surface/references/compliance.md +24 -6
- package/package/corpus/skills/cratis-screenplay-command-surface/references/enum-numbers.md +4 -2
- package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +4 -1
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +3 -2
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +2 -2
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +1 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md +34 -4
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +5 -3
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +4 -2
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/property-links.md +42 -3
- package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +3 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +3 -1
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +3 -1
- package/package/corpus/skills/cratis-screenplay-specifications/references/examples-and-routes.md +48 -0
- package/package/corpus/skills/cratis-screenplay-specifications/verification.json +3 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +4 -2
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +5 -4
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +8 -6
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +2 -2
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +4 -2
- package/package/corpus/skills/cratis-screenplay-toolchain/references/doc-contradictions.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +16 -11
- package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +5 -2
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +1329 -32
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +2 -2
- package/package/corpus/skills/cratis-screenplay-toolchain/references/versions.md +23 -7
- package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +1 -1
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +2 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-composition-contract.md +27 -9
- package/package/corpus/skills/cratis-security-review/SKILL.md +9 -3
- package/package/corpus/skills/cratis-security-review/references/arc-boundaries.md +59 -0
- package/package/corpus/skills/cratis-specification-by-example/SKILL.md +7 -0
- package/package/corpus/skills/cratis-specifications-csharp/SKILL.md +43 -11
- package/package/corpus/skills/cratis-specifications-csharp/references/application-scenarios.md +16 -4
- package/package/corpus/skills/cratis-specifications-csharp/references/csharp-patterns.md +18 -5
- package/package/corpus/skills/cratis-specifications-csharp/references/integration-specs.md +21 -0
- package/package/corpus/skills/cratis-specifications-csharp/references/shared-lifecycle.md +34 -0
- package/package/corpus/skills/cratis-specifications-csharp/verification.json +13 -0
- package/package/corpus/skills/cratis-specifications-typescript/SKILL.md +14 -5
- package/package/corpus/skills/cratis-specifications-typescript/verification.json +12 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +8 -2
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +6 -3
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/rendered-application.md +10 -1
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/scene-runtime.md +75 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +5 -0
- package/package/corpus/skills/cratis-studio-mcp-safety-guidance/SKILL.md +14 -1
- package/package/profile-catalog.json +68 -1
- package/package.json +1 -1
- package/src/index.ts +3 -1
|
@@ -46,7 +46,7 @@ This skill is verified against this exact source:
|
|
|
46
46
|
|
|
47
47
|
| Package | Version | Purpose |
|
|
48
48
|
| --- | --- | --- |
|
|
49
|
-
| `Cratis.Chronicle` | `
|
|
49
|
+
| `Cratis.Chronicle` | `19.50.1` | the Workbench application, its hosting, screens, and commands |
|
|
50
50
|
|
|
51
51
|
Reverify before claiming a screen, route, command, or configuration key for
|
|
52
52
|
another version.
|
|
@@ -57,7 +57,14 @@ The Workbench is served by the Chronicle server on the kernel port, which
|
|
|
57
57
|
defaults to **35000**. That port is **TLS**, because HTTP/1.1 and HTTP/2 are
|
|
58
58
|
multiplexed on it through ALPN — so the browser URL is `https://<host>:35000/`,
|
|
59
59
|
not `http://`. In a non-development build the server refuses to start without a
|
|
60
|
-
certificate.
|
|
60
|
+
certificate. Explicit `Tls.Enabled=false` instead serves **private HTTP/2-only
|
|
61
|
+
h2c** behind an HTTPS-terminating proxy; it warns at startup. The proxy must
|
|
62
|
+
forward **all** traffic over h2c, including Workbench/REST, not HTTP/1.1.
|
|
63
|
+
Restrict direct backend access. With authentication enabled, this requires an
|
|
64
|
+
external HTTPS authority; the internal OAuth authority and `/connect/token`
|
|
65
|
+
are unavailable. The .NET SDK's built-in ClientCredentials mode cannot use that
|
|
66
|
+
external authority. Source: `Documentation/hosting/configuration/tls.md` at
|
|
67
|
+
**v19.50.0**. Use **cratis-chronicle-hosting** for the deployment checklist.
|
|
61
68
|
|
|
62
69
|
Configuration lives under `Cratis:Chronicle`, bound from a `chronicle.json` at
|
|
63
70
|
the host root and from environment variables prefixed `Cratis__Chronicle__`.
|
|
@@ -93,9 +100,14 @@ Read these before putting a Workbench on any reachable network.
|
|
|
93
100
|
layer; the Sequences screen renders whatever event content the API returns.
|
|
94
101
|
Whether an operator sees plaintext personal data depends on the server path,
|
|
95
102
|
not on the UI. Assume they do.
|
|
96
|
-
-
|
|
97
|
-
|
|
98
|
-
|
|
103
|
+
- **Forwarded headers are not trusted unconditionally.** At **v19.50.0**,
|
|
104
|
+
`X-Forwarded-For/Proto` is accepted only from loopback by default, or immediate
|
|
105
|
+
proxy addresses configured in `forwardedHeaders.knownProxies/knownNetworks`
|
|
106
|
+
(`Cratis__Chronicle__ForwardedHeaders__KnownProxies__0` and
|
|
107
|
+
`__KnownNetworks__0`). `ASPNETCORE_FORWARDEDHEADERS_ENABLED=true` does not widen
|
|
108
|
+
trust. Restrict the proxy subnet, never use a wildcard CIDR, and have the proxy
|
|
109
|
+
**replace** client-supplied headers. Source: `Documentation/hosting/configuration/tls.md`,
|
|
110
|
+
"Trusted reverse proxies" at **v19.50.0**.
|
|
99
111
|
- The health endpoint, the antiforgery probe, the gRPC descriptor-set and
|
|
100
112
|
compatibility calls, the initial-admin-password endpoints, and the gRPC
|
|
101
113
|
`ResetKernelState` call answer anonymously (`[AllowAnonymous]`).
|
|
@@ -105,24 +117,32 @@ Read these before putting a Workbench on any reachable network.
|
|
|
105
117
|
Routes are grouped by scope. Event-store-scoped screens apply to the whole
|
|
106
118
|
store; namespace-scoped screens apply to one tenant namespace.
|
|
107
119
|
|
|
108
|
-
**Namespace-scoped:**
|
|
109
|
-
|
|
110
|
-
Identities · Seed Data.
|
|
120
|
+
**Namespace-scoped:** Dashboard (the landing screen, `Default/dashboard`) ·
|
|
121
|
+
Recommendations · Jobs · Sequences · Closed streams · Pivot · Patterns ·
|
|
122
|
+
Pattern heatmap · Observers · Failed partitions · Read Models · Identities · Seed Data.
|
|
111
123
|
|
|
112
|
-
**Event-store-scoped:** Event Types · Read Model Types ·
|
|
113
|
-
Services · Captures · Projections (namespace-routed) · Namespaces · Seed Data.
|
|
124
|
+
**Event-store-scoped:** Dashboard · Event Types · Event sources · Read Model Types ·
|
|
125
|
+
Webhooks · External Services · Captures · Projections (namespace-routed) · Namespaces · Seed Data.
|
|
114
126
|
|
|
115
127
|
**System:** Users · Applications · Connected Clients · Servers · Development
|
|
116
128
|
Tools (offered only when the server reports them available).
|
|
117
129
|
|
|
118
130
|
Reducers, Reactors, Sinks and a store-wide Sequences view have routes but no menu
|
|
119
|
-
entry (their menu lines are commented out in `EventStore.tsx`).
|
|
120
|
-
|
|
131
|
+
entry (their menu lines are commented out in `EventStore.tsx`). Event types uses
|
|
132
|
+
one list with a side panel (Schema and Observers tabs). Observer details includes
|
|
133
|
+
connected clients in Summary; Failed partitions has Retry and a detail panel.
|
|
134
|
+
The Help menu is available since 19.39.2. Source at **v19.50.0**:
|
|
135
|
+
`Source/Workbench/Features/EventStore/EventStore.tsx`,
|
|
136
|
+
`Namespaces/Observers/ObserverDetails.tsx`, `Namespaces/FailedPartitions/FailedPartitions.tsx`,
|
|
137
|
+
and `General/EventTypes/TypeDetails.tsx` (paths relative to that feature).
|
|
138
|
+
Do not infer that dashboard or stale-detail reports are fixed from the new menu:
|
|
139
|
+
Cratis/Chronicle#4414 and #4418 remain unresolved in the release research; no
|
|
140
|
+
runtime reproduction was performed here.
|
|
121
141
|
|
|
122
142
|
## What each screen can change
|
|
123
143
|
|
|
124
144
|
Read-only: Read Models, Identities, Pivot, Behavior patterns, Pattern heatmap,
|
|
125
|
-
Connected Clients.
|
|
145
|
+
Connected Clients, Dashboards, Event sources, Closed streams.
|
|
126
146
|
|
|
127
147
|
Everything below mutates the running server.
|
|
128
148
|
|
|
@@ -130,6 +150,7 @@ Everything below mutates the running server.
|
|
|
130
150
|
| --- | --- | --- |
|
|
131
151
|
| Observers | Replay observer | yes |
|
|
132
152
|
| Observers | Clear quarantine | **no** |
|
|
153
|
+
| Observers | Remove observer | yes |
|
|
133
154
|
| Failed partitions | Retry partition | **no** |
|
|
134
155
|
| Jobs | Stop / Resume / Delete job | **no** |
|
|
135
156
|
| Recommendations | Perform | **no** |
|
|
@@ -165,8 +186,12 @@ not being there.
|
|
|
165
186
|
|
|
166
187
|
These two are Workbench-only; the CLI has no equivalent command.
|
|
167
188
|
|
|
168
|
-
- **Redact** removes an event's content
|
|
169
|
-
|
|
189
|
+
- **Redact** removes an event's content, retained causation property values,
|
|
190
|
+
revision history and content hashes. It requires a reason and records the
|
|
191
|
+
redaction itself. It does not reach backups, oplogs or already-forwarded events.
|
|
192
|
+
- `IEventSequence.VerifyContent` is a command for comparing prepared content
|
|
193
|
+
after an ambiguous append, not an authorization to revise or retry blindly.
|
|
194
|
+
Use **cratis-chronicle-client-dotnet** for its result contract. Use it for
|
|
170
195
|
content that should never have been appended.
|
|
171
196
|
- **Revise** rewrites an event's content. Its confirmation dialog enumerates the
|
|
172
197
|
replayable observers that will be affected — read that list before confirming,
|
|
@@ -24,9 +24,9 @@ This skill is verified against this exact source:
|
|
|
24
24
|
|
|
25
25
|
| Package | Version | Purpose |
|
|
26
26
|
| --- | --- | --- |
|
|
27
|
-
| `Cratis.Cli` | `3.
|
|
27
|
+
| `Cratis.Cli` | `3.53.1` | `cratis chronicle workbench`, its views, keys, and actions |
|
|
28
28
|
|
|
29
|
-
> Re-verified at `Cratis/cli` **v3.
|
|
29
|
+
> Re-verified at `Cratis/cli` **v3.53.1**: fifteen views remain; keys are in [WorkbenchKeyDispatcher.cs](https://github.com/Cratis/cli/blob/v3.53.1/Source/Cli/Commands/Chronicle/Workbench/windows/WorkbenchKeyDispatcher.cs) and output validation is in [WorkbenchCommand.cs](https://github.com/Cratis/cli/blob/v3.53.1/Source/Cli/Commands/Chronicle/Workbench/WorkbenchCommand.cs).
|
|
30
30
|
|
|
31
31
|
Reverify before claiming a view, key binding, or action for another version.
|
|
32
32
|
`cratis chronicle workbench --help` and `cratis llm-context` are the authority
|
|
@@ -35,11 +35,16 @@ for the installed version.
|
|
|
35
35
|
## Launch it
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
cratis chronicle workbench
|
|
39
|
-
cratis chronicle workbench -e <store> -n <ns>
|
|
40
|
-
cratis chronicle workbench --interval <secs>
|
|
38
|
+
cratis chronicle workbench -o table # active context
|
|
39
|
+
cratis chronicle workbench -o table -e <store> -n <ns> # explicit scope
|
|
40
|
+
cratis chronicle workbench -o table --interval <secs> # default 5
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
+
A **human at a terminal** launches it; an agent should not launch or try to drive
|
|
44
|
+
this TUI. The catalog classifies it `destructive`, and the Cratis store guard
|
|
45
|
+
blocks it. `auto` becomes `json-compact` in an agent environment, so `-o table`
|
|
46
|
+
is needed explicitly there even for a human-operated session.
|
|
47
|
+
|
|
43
48
|
It requires an interactive terminal and the `table` output format. Asking for
|
|
44
49
|
`json`, `plain`, or `json-compact` is rejected with a validation error — that is
|
|
45
50
|
the correct behavior, not a bug. **When you need machine-readable output, use
|
|
@@ -83,7 +88,12 @@ read-only.
|
|
|
83
88
|
- `Ctrl+E` switches event store; `Ctrl+N` switches namespace.
|
|
84
89
|
- `F` filters the current view; `[` and `]` page; `Home` jumps to the first row
|
|
85
90
|
and `Shift+G` to the last.
|
|
86
|
-
-
|
|
91
|
+
- `1`–`9` jump to view N; `F9` opens the theme chooser.
|
|
92
|
+
- `+` / `-` change the refresh interval; `Esc` dismisses overlays.
|
|
93
|
+
- `?` shows the keyboard shortcuts. The File menu offers Switch Event Store
|
|
94
|
+
(`Ctrl+E`), Switch Namespace (`Ctrl+N`) and Quit; Help offers shortcuts/themes.
|
|
95
|
+
- Filters support `state:`, `type:`, `event:` in Observers, `type:` in Event
|
|
96
|
+
Sequences, `owner:` / `gen:` in Event Types and `owner:` in Read Models.
|
|
87
97
|
- `Ctrl+C` **copies the detail pane to the clipboard** — it does not interrupt.
|
|
88
98
|
Quit with `Q`, which also persists the refresh interval and the last view.
|
|
89
99
|
|
|
@@ -146,6 +156,10 @@ Fix the cause before replaying. Replaying into an unfixed handler fails the same
|
|
|
146
156
|
way and buries the original error. A failed partition you have not yet explained
|
|
147
157
|
is not a thing to clear.
|
|
148
158
|
|
|
159
|
+
There is no key for `observers remove`, `clear-quarantine` or
|
|
160
|
+
`clear-partition-quarantine`. A quarantined partition refuses retry; use the CLI
|
|
161
|
+
recovery guidance after fixing the cause, not repeated `T` presses.
|
|
162
|
+
|
|
149
163
|
`D` and `V` on the event views — view an event type's definition, view the
|
|
150
164
|
observers for an event type — are navigation, not mutation.
|
|
151
165
|
|
|
@@ -18,11 +18,21 @@ change did not touch is a note, never a blocker.
|
|
|
18
18
|
|
|
19
19
|
| Package | Version | Purpose |
|
|
20
20
|
| --- | --- | --- |
|
|
21
|
-
| `Cratis.Arc.Core` | `22.
|
|
21
|
+
| `Cratis.Arc.Core` | `22.75.0` | Command, query, validation and analyzer surface (`ARC0001`–`ARC0026`, including operations, authorization, generated values and explicit query selection) |
|
|
22
22
|
| `Cratis.Chronicle` | `18.3.0` | Event, projection, read-model and constraint surface |
|
|
23
|
-
| `Cratis.Fundamentals` | `7.
|
|
23
|
+
| `Cratis.Fundamentals` | `7.23.0` | `ConceptAs<T>`, `IInstancesOf<T>`, the DI conventions |
|
|
24
24
|
|
|
25
|
-
>
|
|
25
|
+
> Arc analyzer/decision/query surface rechecked at v22.75.0. Arc depends on
|
|
26
|
+
> Chronicle 19.39.1 / Fundamentals 7.23.0; separate product verification stays
|
|
27
|
+
> version-qualified.
|
|
28
|
+
|
|
29
|
+
Fundamentals rechecked at v7.23.0:
|
|
30
|
+
[`ConceptAs<T>`](https://github.com/Cratis/Fundamentals/blob/v7.23.0/Source/DotNET/Fundamentals/Concepts/ConceptAs.cs)
|
|
31
|
+
is the typed-value record;
|
|
32
|
+
[`InstancesOf<T>`](https://github.com/Cratis/Fundamentals/blob/v7.23.0/Source/DotNET/Fundamentals/Types/InstancesOf.cs)
|
|
33
|
+
discovers implementations and resolves them when enumerated;
|
|
34
|
+
[DI conventions](https://github.com/Cratis/Fundamentals/blob/v7.23.0/Source/DotNET/Fundamentals/DependencyInjection/ServiceCollectionExtensions.cs)
|
|
35
|
+
honor `[Singleton]` and `[Scoped]`, defaulting to transient.
|
|
26
36
|
|
|
27
37
|
Reverify against the owning product repository before asserting a framework
|
|
28
38
|
contract this file does not already state.
|
|
@@ -75,6 +85,18 @@ there is nothing to review under a red build.
|
|
|
75
85
|
- Logging lives in a `*Logging.cs` partial with `[LoggerMessage]`, not inline in
|
|
76
86
|
domain code.
|
|
77
87
|
- No shared mutable state between commands.
|
|
88
|
+
- Plain injected models are advisory, not a concurrency guard. Review guarded
|
|
89
|
+
stream/projection reads and actual conflict specs (`UseDecisionReads()`).
|
|
90
|
+
- Use `Cratis.Arc.Core.CodeAnalysis` and `Cratis.Arc.Chronicle.CodeAnalysis`.
|
|
91
|
+
At Arc v22.75.0, ARCCHR0011/0012 (Info) flag unprotected reads/immediate
|
|
92
|
+
bypasses; 0013 (Info) recommends definitions; 0014 checks declared observer
|
|
93
|
+
streams; 0015 warns on nullable events; 0016 flags ignored concurrency flags;
|
|
94
|
+
0017/0018 check stream-id templates; 0019 warns on folds exposed as queries.
|
|
95
|
+
ARC0015 checks concept query inputs, ARC0016–18 operations, ARC0019–21
|
|
96
|
+
authorization, ARC0022–25 generated values and ARC0026 explicit/ambiguous queries.
|
|
97
|
+
A clean build cannot prove the Info-level decision advisories were addressed.
|
|
98
|
+
Sources: Arc v22.75.0 `Source/DotNET/Arc.Core.CodeAnalysis/DiagnosticDescriptors.cs`
|
|
99
|
+
and `Source/DotNET/Chronicle.CodeAnalysis/DiagnosticDescriptors.cs`.
|
|
78
100
|
|
|
79
101
|
## Step 3 — C# style
|
|
80
102
|
|
|
@@ -17,7 +17,7 @@ what is written here.
|
|
|
17
17
|
|
|
18
18
|
| Package | Version | Verified from |
|
|
19
19
|
| --- | --- | --- |
|
|
20
|
-
| `@cratis/components` | `4.
|
|
20
|
+
| `@cratis/components` | `4.26.4` | `Source/Dialogs/*` (`DialogInitialFocus`, `DialogImplementation`), `Source/CommandForm/fields/fieldAccessibility.tsx`, `Source/for_accessibility/*`, `Source/SchemaEditor/*`, `Source/ObjectNavigationalBar/*`, `Source/MIGRATION.md`, `Documentation/Styling/pass-through.md`, `Documentation/Common/cratis-components-provider.md`, `Documentation/renderers/index.md` |
|
|
21
21
|
|
|
22
22
|
Focus, overlay and collection behavior come from React Aria **internally** — the
|
|
23
23
|
dialog is a React Aria `Modal` inside a `ModalOverlay`; you never import React
|
|
@@ -89,7 +89,9 @@ different name.
|
|
|
89
89
|
| `SchemaEditor` | `labels` | — |
|
|
90
90
|
| `ObjectNavigationalBar` | `backLabel` — tooltip **and** accessible name | — |
|
|
91
91
|
| `ToolbarButton` | `title` — required; the accessible name and the tooltip | — |
|
|
92
|
-
| `Toolbar` | `aria-label` | `messages.toolbar` (`label`, default `'Tools'`) |
|
|
92
|
+
| `Toolbar` | `aria-label`, `aria-labelledby` | `messages.toolbar` (`label`, default `'Tools'`) |
|
|
93
|
+
| `ToolbarFolder` drawer | `closeLabel` | `messages.toolbar.closeDrawer` |
|
|
94
|
+
| `FilterPanel` | `aria-label`, `searchAriaLabel` | `messages.filter` (`label`, `searchAriaLabel`) |
|
|
93
95
|
| `ToolbarFanOutItem` / `ToolbarFolder` | `tooltip` / `title` — required | — |
|
|
94
96
|
| `RatingField` | `starAriaLabel` | — |
|
|
95
97
|
| `ChipsField` | `removeAriaLabel` | — |
|
|
@@ -186,8 +188,22 @@ nothing.
|
|
|
186
188
|
motion, forced colors and responsive behavior.** Components supplies semantic
|
|
187
189
|
behavior and the `--cratis-focus-ring` token; it cannot infer the product's
|
|
188
190
|
color relationships.
|
|
189
|
-
- **
|
|
190
|
-
|
|
191
|
+
- **Query state is announced.** Loading rows contain `role='status'`; failure
|
|
192
|
+
and unauthorized rows contain `role='alert'`. `empty-row` is only for a real
|
|
193
|
+
empty result. `Message live={false}` avoids double announcement inside an
|
|
194
|
+
existing live region.
|
|
195
|
+
- **FilterPanel is a named non-modal dialog.** It uses the overlay environment,
|
|
196
|
+
and Escape returns focus to its anchor. Localize `messages.filter`.
|
|
197
|
+
- **Toolbars navigate by keyboard.** `ToolbarFocusMode.Arrows` is the default
|
|
198
|
+
(arrows/Home/End, each tool retains its Tab stop); `SingleTabStop` implements
|
|
199
|
+
the WAI-ARIA toolbar pattern, while `None` keeps native focus. `ToolbarButton`
|
|
200
|
+
exposes `aria-pressed` when `active` is supplied. Tabs, toggle groups, tag
|
|
201
|
+
groups and breadcrumbs also provide keyboard semantics; name each control.
|
|
202
|
+
- **ErrorBoundary uses neutral recovery copy**, never exception text. Supply
|
|
203
|
+
`fallback` (node or `(reset) => node`) to localize it; `onError` reports
|
|
204
|
+
diagnostics, `onReset` runs before retry remounts only the protected section.
|
|
205
|
+
- **Application layouts still own skip links and announcements.** Library
|
|
206
|
+
status regions and focus behavior do not certify the surrounding application.
|
|
191
207
|
|
|
192
208
|
## Verify
|
|
193
209
|
|
|
@@ -21,8 +21,8 @@ case where the shape itself is data.
|
|
|
21
21
|
|
|
22
22
|
| Package | Version | Verified from |
|
|
23
23
|
| --- | --- | --- |
|
|
24
|
-
| `@cratis/components` | `4.
|
|
25
|
-
| `react` | `^19.0.0` | peer of `@cratis/components@4.
|
|
24
|
+
| `@cratis/components` | `4.26.4` | its package manifest and the `SchemaEditor` / `ObjectContentEditor` sources |
|
|
25
|
+
| `react` | `^19.0.0` | peer of `@cratis/components@4.26.4` |
|
|
26
26
|
|
|
27
27
|
## The schema type these editors consume
|
|
28
28
|
|
|
@@ -42,7 +42,7 @@ interface JsonSchema {
|
|
|
42
42
|
interface JsonSchemaProperty {
|
|
43
43
|
id?: string; name?: string; type?: string; format?: string; description?: string;
|
|
44
44
|
items?: JsonSchema; properties?: Record<string, JsonSchemaProperty>;
|
|
45
|
-
required?:
|
|
45
|
+
required?: string[]; $ref?: string;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
type Json = string | number | boolean | null | Json[] | { [key: string]: Json };
|
|
@@ -54,8 +54,9 @@ Three limits to design around:
|
|
|
54
54
|
navigation walks `properties` and `items` literally. A schema that relies on
|
|
55
55
|
references will not render its referenced shapes.
|
|
56
56
|
- **`type` is a plain string**, not a union — there is no exhaustiveness check.
|
|
57
|
-
-
|
|
58
|
-
|
|
57
|
+
- **Required and key toggles are opt-in.** `allowRequired` edits the object's
|
|
58
|
+
`required: string[]`; `allowKeyProperty` edits `x-key` (at most one key per
|
|
59
|
+
object). Both table columns and tree toggles are supported.
|
|
59
60
|
|
|
60
61
|
## `SchemaEditor`
|
|
61
62
|
|
|
@@ -64,8 +65,10 @@ import { SchemaEditor } from '@cratis/components/SchemaEditor';
|
|
|
64
65
|
import type { JsonSchema, TypeFormat } from '@cratis/components/SchemaEditor';
|
|
65
66
|
```
|
|
66
67
|
|
|
67
|
-
The
|
|
68
|
-
every structural change.
|
|
68
|
+
The default `layout='table'` has Edit/Save/Cancel and pushes the **whole new
|
|
69
|
+
schema** out on every structural change. `layout='tree'` applies edits live,
|
|
70
|
+
with `readOnly` for display. Read [tree layout](references/tree-layout.md) when
|
|
71
|
+
using concepts, render slots, selection, parts or controlled property trees.
|
|
69
72
|
|
|
70
73
|
```tsx
|
|
71
74
|
const [schema, setSchema] = useState<JsonSchema>(initialSchema);
|
|
@@ -83,11 +86,12 @@ const [schema, setSchema] = useState<JsonSchema>(initialSchema);
|
|
|
83
86
|
|
|
84
87
|
| Prop | Type | Default |
|
|
85
88
|
| --- | --- | --- |
|
|
86
|
-
| `schema` | `JsonSchema` |
|
|
89
|
+
| `schema` | `JsonSchema` | required unless a tree is controlled through `properties` |
|
|
90
|
+
| `layout` | `'table' \| 'tree'` | `'table'` |
|
|
87
91
|
| `eventTypeName` | `string` | `''` — the breadcrumb root label |
|
|
88
92
|
| `canEdit` | `boolean` | `true` |
|
|
89
93
|
| `canNotEditReason` | `string` | shown when `canEdit` is false |
|
|
90
|
-
| `onChange` | `
|
|
94
|
+
| `onChange` | `ChangeHandler<JsonSchema>` | complete new schema; optional second metadata argument |
|
|
91
95
|
| `onSave` | `() => void` | takes **no arguments** |
|
|
92
96
|
| `onCancel` | `() => void` | |
|
|
93
97
|
| `editMode` | `boolean` | initial edit state only — see below |
|
|
@@ -96,8 +100,14 @@ const [schema, setSchema] = useState<JsonSchema>(initialSchema);
|
|
|
96
100
|
| `typeFormats` | `TypeFormat[]` | the default vocabulary |
|
|
97
101
|
| `className` | `string` | |
|
|
98
102
|
| `labels` | `Partial<SchemaEditorLabels>` | override every visible and accessible string |
|
|
103
|
+
| `allowRequired` | `boolean` | opt-in Required column/toggle |
|
|
104
|
+
| `allowKeyProperty` | `boolean \| (property, context) => boolean` | opt-in Key column/toggle; table function enables the column |
|
|
105
|
+
| `header` / `footer` | `ReactNode` | content around the properties, both layouts |
|
|
106
|
+
| `isPropertyProtected` | `(property: Property) => boolean` | prevents rename/removal, both layouts |
|
|
107
|
+
| `validatePropertyName` | `(name, property, siblings) => string \| undefined` | extra name check, both layouts |
|
|
108
|
+
| `onPropertyRenamed` / `onPropertyRemoved` | callbacks on the property | both layouts; rename includes previous name |
|
|
99
109
|
|
|
100
|
-
###
|
|
110
|
+
### Table-layout behaviors that decide how you wire it
|
|
101
111
|
|
|
102
112
|
- **`editMode` is initial state, not a controlled prop.** It seeds the internal
|
|
103
113
|
flag once; changing it later has no effect. Drive edit mode from inside the
|
|
@@ -120,10 +130,10 @@ The default vocabulary covers `string` (plain, `guid`, `date-time`, `date`,
|
|
|
120
130
|
`time`), `integer` (plain, `int16`, `int32`, `int64`), `number` (plain, `float`,
|
|
121
131
|
`double`), and `boolean`. Supply your own `typeFormats` to narrow or extend it.
|
|
122
132
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
133
|
+
`typeFormats` changes the table vocabulary, not its fixed cell renderer.
|
|
134
|
+
Both layouts have header/footer and protection/name callbacks. The tree adds
|
|
135
|
+
concept types, row render slots, `getPropertyRowState`, selection and `pt`;
|
|
136
|
+
see [tree layout](references/tree-layout.md).
|
|
127
137
|
|
|
128
138
|
Changing a property's type has side effects worth knowing: switching to `array`
|
|
129
139
|
seeds `items` as a string and clears `format`; switching to `object` seeds an
|
|
@@ -133,10 +143,10 @@ clears both `items` and `properties`.
|
|
|
133
143
|
### Nested navigation
|
|
134
144
|
|
|
135
145
|
Drilling into an object property or an array's item definition pushes a
|
|
136
|
-
breadcrumb segment. Array item definitions use the reserved
|
|
137
|
-
`$items`, rendered
|
|
138
|
-
|
|
139
|
-
|
|
146
|
+
breadcrumb segment in table layout. Array item definitions use the reserved
|
|
147
|
+
path segment `$items`, rendered as `[items]`. Breadcrumb and drill-in buttons
|
|
148
|
+
are keyboard-activatable; do not promise arrow-key grid navigation. Tree layout
|
|
149
|
+
shows nested properties inline.
|
|
140
150
|
|
|
141
151
|
### Property-name validation
|
|
142
152
|
|
|
@@ -146,7 +156,9 @@ among its siblings. Save is disabled while any name is invalid.
|
|
|
146
156
|
|
|
147
157
|
### Localization
|
|
148
158
|
|
|
149
|
-
`SchemaEditorLabels`
|
|
159
|
+
`SchemaEditorLabels` retains fourteen required fields and adds optional labels
|
|
160
|
+
for the tree, concepts, key/required toggles and name diagnostics. The original
|
|
161
|
+
fields include:
|
|
150
162
|
menu actions `edit`, `save`, `cancel`, `addProperty`; accessible names `actions`,
|
|
151
163
|
`navigateBack`, `navigateToItemDefinition`, `navigateToProperties`,
|
|
152
164
|
`propertyName`, `propertyType`, `arrayItemType`, `deleteProperty`; and the
|
|
@@ -214,14 +226,14 @@ Anything richer belongs in the caller.
|
|
|
214
226
|
`ObjectNavigationalBar` (`@cratis/components/ObjectNavigationalBar`) is the
|
|
215
227
|
shared breadcrumb both editors use. Standalone, it takes `navigationPath`,
|
|
216
228
|
`onNavigate`, and `backLabel` (which is both the tooltip and the accessible
|
|
217
|
-
name — localize it).
|
|
229
|
+
name — localize it). Its breadcrumb buttons are keyboard-activatable.
|
|
218
230
|
|
|
219
231
|
## Styling
|
|
220
232
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
233
|
+
The tree layout of `SchemaEditor` accepts `pt: SchemaEditorParts`; its table
|
|
234
|
+
layout and `ObjectContentEditor` use `className`. Reach internal controls
|
|
235
|
+
through documented `data-cratis-part` values and the `--cratis-*` tokens;
|
|
236
|
+
there is no global provider pass-through in Components 4 —
|
|
225
237
|
see the **cratis-components-styling** skill.
|
|
226
238
|
|
|
227
239
|
## Verify
|
|
@@ -231,10 +243,10 @@ see the **cratis-components-styling** skill.
|
|
|
231
243
|
relied on for rendering.
|
|
232
244
|
- The parent holds the schema or object state and updates it from `onChange`;
|
|
233
245
|
`onSave` is treated as a signal, not a carrier of data.
|
|
234
|
-
- `editMode`
|
|
235
|
-
|
|
236
|
-
-
|
|
237
|
-
|
|
246
|
+
- Table `editMode` is initial state, not controlled; tree edits are live unless
|
|
247
|
+
`readOnly` or host-controlled through `properties`.
|
|
248
|
+
- Required/key toggles are opted into. No nested **object-instance** editing or
|
|
249
|
+
arrow-key grid navigation is promised.
|
|
238
250
|
- Every visible and accessible string is supplied through `labels` /
|
|
239
251
|
`backLabel` in a localized application.
|
|
240
252
|
- Lint and the TypeScript build pass.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<!-- Copyright (c) Cratis. All rights reserved. -->
|
|
2
|
+
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
|
|
3
|
+
|
|
4
|
+
# SchemaEditor tree layout
|
|
5
|
+
|
|
6
|
+
## Contents
|
|
7
|
+
|
|
8
|
+
- Live edits and controlled mode
|
|
9
|
+
- Extension props
|
|
10
|
+
- Conversion helpers
|
|
11
|
+
|
|
12
|
+
Verified at Components v4.26.4: `Source/SchemaEditor/SchemaEditor.tsx`,
|
|
13
|
+
`Tree/TreeSchemaEditor.tsx`, `Tree/schemaConversion.ts`, and `index.ts`.
|
|
14
|
+
All exports below come from `@cratis/components/SchemaEditor`.
|
|
15
|
+
|
|
16
|
+
## Live edits and controlled mode
|
|
17
|
+
|
|
18
|
+
`layout='tree'` shows nested properties inline. With `schema` and `onChange`,
|
|
19
|
+
it owns the property tree and reports every edit as a complete schema through
|
|
20
|
+
`ChangeHandler<JsonSchema>` (the optional metadata argument identifies a user edit).
|
|
21
|
+
Handing the reported schema back preserves property ids; a different external
|
|
22
|
+
schema replaces the tree. `readOnly` disables edits, not selection or host slots.
|
|
23
|
+
Table-only Edit/Save/Cancel and `typeFormats` do not govern this layout.
|
|
24
|
+
|
|
25
|
+
Alternatively pass `properties: Property[]`: the host owns all changes. An edit
|
|
26
|
+
with no matching callback is not offered. Handle `onAddProperty`,
|
|
27
|
+
`onAddChildProperty`, `onDeleteProperty`, `onRenameProperty`,
|
|
28
|
+
`onChangePropertyType`, `onSetKeyProperty`, and `onSetRequiredProperty` as needed.
|
|
29
|
+
`schema` is ignored in this mode. `onChange`, `onPropertiesChange`,
|
|
30
|
+
`onPropertyRemoved`, and `onPropertyRenamed` report editor-owned changes only;
|
|
31
|
+
the controlled host applies and reports its own changes.
|
|
32
|
+
|
|
33
|
+
## Extension props
|
|
34
|
+
|
|
35
|
+
| Prop | Contract |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| `concepts: PropertyConcept[]` | Named types with a `PropertyType`; saved as `x-concept`. Overrides a surrounding `PropertyConceptsProvider` |
|
|
38
|
+
| `allowRequired` | Toggle membership in the object's `required` names |
|
|
39
|
+
| `allowKeyProperty` | Boolean or `(property, context) => boolean`; `x-key`, one per object |
|
|
40
|
+
| `isPropertyProtected` | Prevent rename/removal, not every possible edit |
|
|
41
|
+
| `validatePropertyName` | `(name, property, siblings) => string \| undefined`, after built-in checks |
|
|
42
|
+
| `selectedPropertyId`, `onPropertyClick` | Controlled selection; callback receives the property id |
|
|
43
|
+
| `header`, `footer` | Content above properties / beside the add button |
|
|
44
|
+
| `renderPropertyLeading`, `renderPropertyAccessory`, `renderPropertyDetails` | `(property, context) => ReactNode`, before name / after row content / below row |
|
|
45
|
+
| `renderPropertyTypeBadge` | `(property, context, defaultBadge) => ReactNode` |
|
|
46
|
+
| `getPropertyRowState` | Extra row classes, data attributes, tooltip and type-lock state |
|
|
47
|
+
| `pt: SchemaEditorParts` | Stable part attributes |
|
|
48
|
+
| `aria-label`, `aria-labelledby`, `labels` | Localizable editor name and copy |
|
|
49
|
+
|
|
50
|
+
In controlled mode, supplying `onSetKeyProperty` or `onSetRequiredProperty`
|
|
51
|
+
enables the corresponding toggle unless explicitly disabled. Both layouts also
|
|
52
|
+
support `header`, `footer`, protection, extra name checks and rename/removal callbacks.
|
|
53
|
+
|
|
54
|
+
## Conversion helpers
|
|
55
|
+
|
|
56
|
+
The subpath exports `PropertyType`, `PropertyConceptsProvider`,
|
|
57
|
+
`jsonSchemaToProperties`, `propertiesToJsonSchema`, `addProperty`,
|
|
58
|
+
`addChildProperty`, `renameProperty`, `removeProperty`, `changePropertyType`,
|
|
59
|
+
`setKeyProperty`, `setRequiredProperty`, and `toggleRequiredProperty`.
|
|
60
|
+
Use the typed property-tree helpers for a controlled host, rather than treating
|
|
61
|
+
`required` as a property boolean. Schema keywords are `x-concept`, `x-key`, and
|
|
62
|
+
the parent object's `required: string[]`.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill": "cratis-components-schema-editor",
|
|
3
|
+
"input": "Edit a JSON schema with live tree edits, required and key toggles, and custom row content.",
|
|
4
|
+
"fixtures": [],
|
|
5
|
+
"assertions": [
|
|
6
|
+
{ "kind": "skill-contains", "value": "required?: string[]" },
|
|
7
|
+
{ "kind": "skill-contains", "value": "allowRequired" },
|
|
8
|
+
{ "kind": "skill-contains", "value": "layout='tree'" },
|
|
9
|
+
{ "kind": "skill-contains", "value": "ChangeHandler<JsonSchema>" },
|
|
10
|
+
{ "kind": "skill-contains", "value": "references/tree-layout.md" },
|
|
11
|
+
{ "kind": "skill-contains", "value": "onSetRequiredProperty", "file": "references/tree-layout.md" },
|
|
12
|
+
{ "kind": "skill-contains", "value": "renderPropertyTypeBadge", "file": "references/tree-layout.md" }
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -14,8 +14,8 @@ field across every step is valid.
|
|
|
14
14
|
|
|
15
15
|
| Package | Version | Verified from |
|
|
16
16
|
| --- | --- | --- |
|
|
17
|
-
| `@cratis/components` | `4.
|
|
18
|
-
| `@cratis/arc.react` | `>=20.3.1 <23` | peer range declared by `@cratis/components@4.
|
|
17
|
+
| `@cratis/components` | `4.26.4` | its package manifest, `Source/CommandDialog/*` (`StepperCommandDialog`, `CommandStepper`, `StepperPanel`), `Documentation/StepperCommandDialog/*`, `Documentation/CommandStepper/*` |
|
|
18
|
+
| `@cratis/arc.react` | `>=20.3.1 <23` | peer range declared by `@cratis/components@4.26.4` |
|
|
19
19
|
|
|
20
20
|
## Choose it over `CommandDialog` when
|
|
21
21
|
|
|
@@ -66,7 +66,8 @@ export const CreateProjectDialog = () => {
|
|
|
66
66
|
|
|
67
67
|
Rules:
|
|
68
68
|
|
|
69
|
-
-
|
|
69
|
+
- Give every `StepperPanel` a `header` — the house convention for a named step.
|
|
70
|
+
Its type is optional `ReactNode`, not a required string.
|
|
70
71
|
- All `CommandForm` fields inside any panel bind to the **same** command
|
|
71
72
|
instance through their `value` accessor.
|
|
72
73
|
- Each command property belongs on exactly one step.
|
|
@@ -144,6 +145,7 @@ Dialog-level props:
|
|
|
144
145
|
| `isValid` | `boolean` | extra validity gate on top of form validity |
|
|
145
146
|
| `onConfirm` / `onCancel` / `onClose` | close gates | — |
|
|
146
147
|
| `onBeforeExecute` | `(values) => values` | transformer; must return the values |
|
|
148
|
+
| `confirmBeforeExecute` | `(values) => boolean \| Promise<boolean>` | after validation and transformation; only `true` executes |
|
|
147
149
|
| `style` / `contentStyle` | `CSSProperties` | — |
|
|
148
150
|
| `resizable` | `boolean` | `false` — accepted but has no effect |
|
|
149
151
|
|
|
@@ -155,11 +157,16 @@ Stepper-level props (inherited from the stepper customization surface):
|
|
|
155
157
|
| `headerPosition` | `'top' \| 'bottom'` | `'top'` |
|
|
156
158
|
| `linear` | `boolean` | `true` |
|
|
157
159
|
| `start` / `end` | `React.ReactNode` | extra content beside the step headers |
|
|
158
|
-
| `onChangeStep` | `(event: { index: number }) => void` |
|
|
160
|
+
| `onChangeStep` | `(event: { index: number }) => void` | once per accepted move: header, Previous, Next |
|
|
159
161
|
|
|
160
162
|
Command-form props (`initialValues`, `currentValues`, `validateOn`,
|
|
161
163
|
`validateOnInit`, `onSuccess`, `onValidationFailure`, `onFailed`,
|
|
162
|
-
`autoServerValidate`, …) all apply as well.
|
|
164
|
+
`autoServerValidate`, …) all apply as well. Horizontal steppers show names below
|
|
165
|
+
numbers and wrap (4.26.3+). Panels are named by their headers through
|
|
166
|
+
`aria-labelledby`; custom header ids are preserved.
|
|
167
|
+
|
|
168
|
+
While `confirmBeforeExecute` is pending, fields are disabled; changed command
|
|
169
|
+
values discard approval and skip execution. Confirm the new values again.
|
|
163
170
|
|
|
164
171
|
### Two part targets
|
|
165
172
|
|
|
@@ -167,8 +174,8 @@ The inherited `pt` (`StepperParts`: `root`, `list`, `step`, `header`, `number`,
|
|
|
167
174
|
`title`, `separator`, `panels`, `panel`) targets the **inner stepper**. Use
|
|
168
175
|
`dialogPt` (`DialogParts`) and `dialogClassName` to reach the **outer dialog**.
|
|
169
176
|
Getting these the wrong way round is the usual cause of a `pt` that appears to do
|
|
170
|
-
nothing. (`ptOptions`/`unstyled`
|
|
171
|
-
|
|
177
|
+
nothing. (`ptOptions`/`unstyled` are compatibility no-ops;
|
|
178
|
+
`dialogPtOptions`/`dialogUnstyled` are also deprecated no-ops.)
|
|
172
179
|
|
|
173
180
|
## Dismissal while the command runs
|
|
174
181
|
|
|
@@ -181,7 +188,8 @@ needs one.
|
|
|
181
188
|
|
|
182
189
|
`CommandStepper` (same subpath) is the stepper without the dialog chrome, for
|
|
183
190
|
embedding a wizard directly in a page. It takes the same `StepperPanel`
|
|
184
|
-
children.
|
|
191
|
+
children. It reports `onException`, `onUnauthorized`, and `onFailed` (including
|
|
192
|
+
validation failures), and guards against double submission.
|
|
185
193
|
|
|
186
194
|
## Common mistakes
|
|
187
195
|
|