@cratis/pi 7.57.0 → 7.58.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.
@@ -170,9 +170,9 @@
170
170
  }
171
171
  ],
172
172
  "synced": {
173
- "version": "4.164.0",
174
- "date": "2026-10-14",
175
- "by": "Cratis/AI#668"
173
+ "version": "4.188.0",
174
+ "date": "2026-10-16",
175
+ "by": "Cratis/AI#706"
176
176
  },
177
177
  "covers": {
178
178
  "skills": [
@@ -200,7 +200,7 @@
200
200
  ],
201
201
  "rules": []
202
202
  },
203
- "notes": "Standalone 4.164.0 and byte-identical compiler contract pinned. Cratis/AI#663: one origin per capture (PLAY0687). #668: executable no-event/redelivery v17. #684: concept query-argument validation in every version and query-error assertions v18. #681: executable refusal branches and refusal values v19. #666: proposal summary/severity counts and exact structural source proposals. Generated-concept rules select v20 with PLAY0688/0689 proofs and derived-matches repair; generated secrets and preview strategies remain refused. Release-baseline from-esm admission reads storedName. Standalone binding is not renderer admission: Stage 4.103.0 admits v1-v17 and v19; CLI 3.62.0 bundles Screenplay 4.159.0 / Stage 4.99.0 and renders through v16. Prior evidence remains unless superseded; no new renderer, Docker or browser probe."
203
+ "notes": "Standalone 4.188.0 and byte-identical compiler contract pinned. Cratis/AI#706: application navigation regions (module inherit, extend or override), toolbar slice buttons, blueprint template references and sample data packs in cratis-screenplay-ui-composition (references/application-shell.md), with the canonical shell vector and the rejection codes PLAY0710-PLAY0722 and PLAY0740-PLAY0765. Examples moved to the executable-state rules since 4.164: translator reactions in an Automation slice beside the Translate slice (PLAY0694) and the first record of a capture key appended with `when added`. Earlier: Standalone 4.164.0 and byte-identical compiler contract pinned. Cratis/AI#663: one origin per capture (PLAY0687). #668: executable no-event/redelivery v17. #684: concept query-argument validation in every version and query-error assertions v18. #681: executable refusal branches and refusal values v19. #666: proposal summary/severity counts and exact structural source proposals. Generated-concept rules select v20 with PLAY0688/0689 proofs and derived-matches repair; generated secrets and preview strategies remain refused. Release-baseline from-esm admission reads storedName. Standalone binding is not renderer admission: Stage 4.103.0 admits v1-v17 and v19; CLI 3.62.0 bundles Screenplay 4.159.0 / Stage 4.99.0 and renders through v16. Prior evidence remains unless superseded; no new renderer, Docker or browser probe."
204
204
  },
205
205
  {
206
206
  "id": "scene",
@@ -57,7 +57,7 @@ module Exams
57
57
  then denied
58
58
 
59
59
  slice Translate ImportProctorResults
60
- description "Per external field: reference -> correlation key (our attempt id, echoed); outcome -> translated to our enum; score -> kept; examinerNote -> ignored (free text, may hold personal data, no consumer). Repeated delivery: this example compares outcome only. An unchanged outcome appends nothing, even if the score changed, so it does not implement score corrections. OneResultPerAttempt refuses a second local result. Changed outcomes and score-only corrections need an explicit correction policy (open decision, recorded in STATE.md, not an overwrite) before this is a complete integration."
60
+ description "Per external field: reference -> correlation key (our attempt id, echoed); outcome -> translated to our enum; score -> kept; examinerNote -> ignored (free text, may hold personal data, no consumer). Repeated delivery: the first record of a key appends once (`when added`, Chronicle's first-observation rule); a later delivery of the same key appends nothing, even if the outcome or score changed, so it does not implement corrections. OneResultPerAttempt refuses a second local result. Changed outcomes and score-only corrections need an explicit correction policy (open decision, recorded in STATE.md, not an overwrite) before this is a complete integration."
61
61
  capture ProctorResults
62
62
  source webhook
63
63
  path /webhooks/proctoring/results
@@ -67,21 +67,9 @@ module Exams
67
67
  "P" => passed
68
68
  "F" => failed
69
69
  append ProctorResultReceived
70
- when outcome
70
+ when added
71
71
  outcome = $.outcome
72
72
  score = $.score
73
- reaction PassTranslator
74
- when ProctorResultReceived
75
- outcome
76
- score
77
- produces ExamPassed
78
- score = score
79
- where outcome == "passed"
80
- reaction FailTranslator
81
- when ProctorResultReceived
82
- outcome
83
- produces ExamFailed
84
- where outcome == "failed"
85
73
  event ProctorResultReceived
86
74
  outcome ProctorOutcome
87
75
  score Int
@@ -112,12 +100,26 @@ module Exams
112
100
  outcome = "failed"
113
101
  score = 40
114
102
  then error "Constraint 'OneResultPerAttempt' is violated: the event source already has the constrained event."
103
+
104
+ slice Automation TranslateProctorResults
105
+ description "Our facts from the provider's: the translators react to the external fact the Translate slice records"
106
+ reaction PassTranslator
107
+ when ProctorResultReceived
108
+ outcome
109
+ score
110
+ produces ExamPassed
111
+ score = score
112
+ where outcome == "passed"
113
+ reaction FailTranslator
114
+ when ProctorResultReceived
115
+ outcome
116
+ produces ExamFailed
117
+ where outcome == "failed"
115
118
  ```
116
119
 
117
120
  Notes for the reader:
118
121
 
119
- - A capture, the translator reactions and the events they append stay in one `Translate`
120
- slice. `then` lists every new fact, so `TranslatingAPass` names both the external fact and ours.
122
+ - A capture and the external fact it appends stay in the `Translate` slice; the translator reactions that answer that fact sit in an `Automation` slice beside it (a reaction in the capture's own directionless `Translate` slice is `PLAY0694`). `then` lists every new fact, so `TranslatingAPass` names both the external fact and ours.
121
123
  - The unauthenticated-booking spec needs an explicit `given caller` (empty means no caller);
122
124
  an authorized command exercised without one is PLAY0389 at binding.
123
125
  - Authenticity of the webhook, tenant ownership and a score-correction policy are not in the
@@ -244,7 +244,7 @@ Never invent commands, parameters, syntax nodes or downstream capabilities.
244
244
  | Commands, events, validation and concurrency | `cratis-screenplay-command-surface` |
245
245
  | Projections and reducers | `cratis-screenplay-projections` |
246
246
  | Read models, queries and screens | `cratis-screenplay-read-surface` |
247
- | Layouts, forms, contributions, component bindings, toolbars, outlets, themes and localization | `cratis-screenplay-ui-composition` |
247
+ | Layouts, forms, contributions, navigation regions, slice buttons, template references, sample data, component bindings, toolbars, outlets, themes and localization | `cratis-screenplay-ui-composition` |
248
248
  | Captures, reactions and triggers | `cratis-screenplay-captures-and-reactions` |
249
249
  | Behavioral examples and assertions | `cratis-screenplay-specifications` |
250
250
  | Rendering/running an admitted model | `cratis-stage-rendering-and-sandbox` |
@@ -11,6 +11,7 @@
11
11
  - 3. Review and apply with revision checks
12
12
  - 4. Validate authoring and executable readiness
13
13
  - 5. Run/render using the same configuration
14
+ - Edit the application shell
14
15
  - 6. Use Screenplay-owned fixtures
15
16
  - Replay the workflow in CI without a Screenplay checkout
16
17
  - Edit, render, run and see it in the browser
@@ -148,6 +149,30 @@ represented in the generated plan or runtime diagnostics. A consumer that cannot
148
149
  implement one reports a blocking diagnostic. Silent fallback to the default screen
149
150
  composition is a failure.
150
151
 
152
+ ## Edit the application shell
153
+
154
+ Navigation regions, toolbar buttons, blueprint template references and sample data are typed nodes and follow the same
155
+ open, read, propose, review, apply, reopen loop; the syntax and rules are in
156
+ `cratis-screenplay-ui-composition` (`references/application-shell.md`). The vectors to replay against are the
157
+ `screen-shell-navigation-positive` source case and its rejection vectors in `Cratis.Screenplay.CanonicalCorpus`.
158
+
159
+ 1. `read-ast` with `kind` `NavigationRegionSyntax`, `NavigationItemSyntax`, `ToolbarButtonSyntax`,
160
+ `TemplateAssignmentSyntax`, `ScreenTemplateReferenceSyntax` or `SampleDataPackSyntax`, `includeContent: true`.
161
+ Select the occurrence by its parent: a region belongs to the `LayoutSyntax` or a `ModuleSyntax`, and the same item id
162
+ can appear in several regions.
163
+ 2. `propose-ast` with `replace` (copy the returned node, change `mode`, `items`, `slice`, `version` or a row value),
164
+ `add` to a member the node kind declares (`navigation`, `items`, `children`, `buttons`) or `remove`. A member that
165
+ holds nothing is not in the node JSON; `add` still accepts it.
166
+ 3. Read the proposal's diagnostics before applying. A refusal such as `PLAY0750` (a module item targeting another
167
+ module), `PLAY0762` (a button on a State View slice), `PLAY0722` (a blueprint no profile lists) or `PLAY0714` (an
168
+ unknown active pack) is the answer; change the proposal, not the rule.
169
+ 4. `apply` with both revisions. A `StaleRevision` means the model moved: reopen, re-read the nodes and propose again.
170
+ 5. Switching a module from inherit to override copies the application's items; retarget each copy to the module's own
171
+ features first or the proposal is refused.
172
+
173
+ Requires Screenplay 4.188.0 or later (`screenplay --version`) to `add` the first region, button or sub-item to a member
174
+ the node JSON omits while empty; an older MCP server answers "Unknown typed syntax member".
175
+
151
176
  ## 6. Use Screenplay-owned fixtures
152
177
 
153
178
  The canonical multi-file application belongs to the Screenplay/conformance corpus,
@@ -317,6 +317,6 @@ Read [screen patterns](references/screen-patterns.md) when deciding whether a sc
317
317
  Attribution and licences: `references/provenance.md`.
318
318
 
319
319
  - How events fill the read model: `cratis-screenplay-projections`.
320
- - Layouts, templates, forms, component bindings, toolbars, outlets, contributions, packages and themes: `cratis-screenplay-ui-composition`.
320
+ - Layouts, templates, forms, component bindings, toolbars and slice buttons, outlets, contributions, navigation regions, sample data, packages and themes: `cratis-screenplay-ui-composition`.
321
321
  - Asserting query results: `cratis-screenplay-specifications`.
322
322
  - Deciding which read models exist: `cratis-screenplay-event-modeling`.
@@ -93,15 +93,18 @@ module Invoicing
93
93
  when outcome
94
94
  outcome = $.outcome
95
95
  reason = $.reason
96
+ event PaymentGatewayResultReceived
97
+ outcome GatewayOutcome
98
+ reason String
99
+ event PaymentReceived
100
+
101
+ slice Automation TranslatePaymentGatewayResults
102
+ description "Gives PaymentReceived its producer: the translator reacts to the provider's external fact"
96
103
  reaction ReceivedTranslator
97
104
  when PaymentGatewayResultReceived
98
105
  outcome
99
106
  produces PaymentReceived
100
107
  where outcome == "captured"
101
- event PaymentGatewayResultReceived
102
- outcome GatewayOutcome
103
- reason String
104
- event PaymentReceived
105
108
 
106
109
  slice StateChange SettleOrVoidInvoice
107
110
  description "An invoice ends either settled or voided, never both (SettleOrVoid, enforced at append). NOT enforced in the model today: that the invoice exists and is still open (settling) and that only an open, unpaid invoice may be voided. Stated as `reads OpenInvoice` + `require` (PLAY0271/PLAY0268 at binding; Screenplay#129). Target: Arc [ProtectedDecision] with DecisionRead, or a Chronicle DCB. Requirements to test in the target: settling an unknown invoice is rejected; voiding a paid invoice is rejected; voiding an open invoice succeeds."
@@ -205,9 +205,18 @@ module Invoicing
205
205
  "C" => captured
206
206
  "D" => declined
207
207
  append PaymentGatewayResultReceived
208
- when outcome
208
+ when added
209
209
  outcome = $.outcome
210
210
  reason = $.reason
211
+ event PaymentGatewayResultReceived
212
+ outcome GatewayOutcome
213
+ reason String
214
+ event PaymentReceived
215
+ event PaymentDeclined
216
+ reason String
217
+
218
+ slice Automation TranslatePaymentGatewayResults
219
+ description "Our facts from the provider's: the translators react to the external fact the Translate slice records"
211
220
  reaction ReceivedTranslator
212
221
  when PaymentGatewayResultReceived
213
222
  outcome
@@ -220,12 +229,6 @@ module Invoicing
220
229
  produces PaymentDeclined
221
230
  reason = reason
222
231
  where outcome == "declined"
223
- event PaymentGatewayResultReceived
224
- outcome GatewayOutcome
225
- reason String
226
- event PaymentReceived
227
- event PaymentDeclined
228
- reason String
229
232
 
230
233
  specification TranslatingADeclinedCardResult
231
234
  when capture PaymentGatewayResults