@cratis/pi 7.127.0 → 7.129.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.
Files changed (68) hide show
  1. package/package/corpus/product-sync.json +4 -4
  2. package/package/corpus/skills/cratis-application-slice-conformance/SKILL.md +1 -1
  3. package/package/corpus/skills/cratis-arc-react-page/references/from-screenplay.md +5 -5
  4. package/package/corpus/skills/cratis-onboarding-runtime/SKILL.md +10 -2
  5. package/package/corpus/skills/cratis-onboarding-runtime/references/default-offering.md +61 -0
  6. package/package/corpus/skills/cratis-onboarding-runtime/references/sign-up-review.md +52 -0
  7. package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/SKILL.md +1 -1
  8. package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/references/onboarding-directives.md +1 -1
  9. package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +6 -1
  10. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +1 -1
  11. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/cases-to-specify.md +5 -5
  12. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/statemachines-and-workflows.md +164 -0
  13. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +12 -15
  14. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translate-example.md +10 -4
  15. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/complete-examples.md +2 -2
  16. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/invocation-identity.md +8 -2
  17. package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +5 -4
  18. package/package/corpus/skills/cratis-screenplay-command-surface/references/described-handlers.md +12 -8
  19. package/package/corpus/skills/cratis-screenplay-command-surface/references/validate-rules.md +5 -5
  20. package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +1 -1
  21. package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +6 -3
  22. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generated-recovery.md +4 -4
  23. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +2 -2
  24. package/package/corpus/skills/cratis-screenplay-read-surface/references/named-keys.md +3 -1
  25. package/package/corpus/skills/cratis-screenplay-read-surface/references/screen-patterns.md +2 -2
  26. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +4 -4
  27. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +6 -5
  28. package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +2 -2
  29. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-design.md +0 -3
  30. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-example.md +8 -3
  31. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-examples.md +17 -9
  32. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +4 -3
  33. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/version-skew.md +25 -14
  34. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/view-and-story-specs.md +7 -6
  35. package/package/corpus/skills/cratis-screenplay-scenario-coverage/verification.json +1 -1
  36. package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +1 -1
  37. package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +1 -1
  38. package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +3 -3
  39. package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +4 -2
  40. package/package/corpus/skills/cratis-screenplay-specifications/references/actions-beyond-commands.md +4 -2
  41. package/package/corpus/skills/cratis-screenplay-specifications/references/child-ordering.md +12 -3
  42. package/package/corpus/skills/cratis-screenplay-specifications/references/reactions-and-cascades.md +70 -21
  43. package/package/corpus/skills/cratis-screenplay-specifications/references/vocabulary.md +3 -2
  44. package/package/corpus/skills/cratis-screenplay-specifications/verification.json +2 -2
  45. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +3 -3
  46. package/package/corpus/skills/cratis-screenplay-toolchain/references/automation-translate-example.md +5 -8
  47. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +12 -11
  48. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +1 -1
  49. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostic-arguments.md +1 -1
  50. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +2 -2
  51. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +10 -7
  52. package/package/corpus/skills/cratis-screenplay-toolchain/references/language-admission.md +4 -1
  53. package/package/corpus/skills/cratis-screenplay-toolchain/references/preferred-syntax.md +4 -1
  54. package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +4 -4
  55. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract-exceptions.json +0 -70
  56. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +4743 -623
  57. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
  58. package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +1 -1
  59. package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +6 -0
  60. package/package/corpus/skills/cratis-screenplay-ui-composition/references/action-subjects.md +73 -0
  61. package/package/corpus/skills/cratis-screenplay-ui-composition/references/file-references.md +4 -3
  62. package/package/corpus/skills/cratis-screenplay-ui-composition/references/response-continuations.md +1 -1
  63. package/package/corpus/skills/cratis-screenplay-ui-composition/references/worked-flow.md +1 -1
  64. package/package/corpus/skills/cratis-showrunner-herald/SKILL.md +5 -0
  65. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +6 -5
  66. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +8 -5
  67. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/rendered-application.md +14 -5
  68. package/package.json +1 -1
@@ -62,7 +62,7 @@ Identity and compliance traps (`identity.md`, `concepts.md`, `events.md`, `purpo
62
62
  unknown, not safe. Arc needs `[ExecuteCommandsAsSystem]` to supply a principal.
63
63
 
64
64
  Traps 39 to 44 are tool traps.
65
- 39. Attached file/inline command handlers refuse PLAY0800 (`CommandHandlerRequiresAttachment`): permanent constrained-attachment requirement, so gap-fill in code rather than wait for ESM admission. Read required typed `arguments.subject`, not the message; older binders use PLAY0268 (version gate: [diagnostic arguments](diagnostic-arguments.md)). Pending `handler implementation` beside unconditional productions binds as a described v23 command (PLAY0695). Body-reaching specs are Unsupported ImplementationBody; Stage still refuses rendering STAGE-IMPL-002 even in Stub mode; semantic execution reports ImplementationBody only when reached after gates. `implementation` and `hint` are accepted on a command handler, an operation execute/compensate phase and a command property named rule, and are rejected on concept rules, built-in property rules and whole-command `require`/`validate` bodies; hints do not execute, lock or confirm a body. A handler slice is gap-fill, not a customization of a rendered slice.
65
+ 39. An attached file/inline command handler binds as the v23 result contract only beside unconditional `produces` with a resolved, nonempty body; with no `produces`, `produces ... when` or an unresolved body it refuses PLAY0800 (`CommandHandlerRequiresAttachment`). Read required typed `arguments.subject`, not the message; older binders refuse every attached handler (version gate: [diagnostic arguments](diagnostic-arguments.md)). Pending `handler implementation` beside unconditional productions binds as a described v23 command (PLAY0695). Body-reaching specs are Unsupported ImplementationBody; Stage still refuses rendering STAGE-IMPL-002 even in Stub mode; semantic execution reports ImplementationBody only when reached after gates. `implementation` and `hint` are accepted on a command handler, an operation execute/compensate phase and a command property named rule, and are rejected on concept rules, built-in property rules and whole-command `require`/`validate` bodies; hints do not execute, lock or confirm a body. A handler slice is gap-fill, not a customization of a rendered slice.
66
66
  40. `numbers exact` (the source mode) parses but never binds (PLAY0268; "not admitted by any supported executable model (ESM) version yet") and is PLAY0001 on older compilers; it is absent from `grammar.md`. Exact lowering of qualifying Double-mode literals is separate (v11). Never use it in a model or example meant to execute.
67
67
  41. MCP roots bug: a dynamic-root server on an old tool answers the roots request with an `id: null` error right after `notifications/initialized`; hosts treat it as fatal, and `open-workspace.path` does not help. Start with a fixed root (`screenplay mcp <folder>`, `cratis screenplay mcp` in a project with `.cratis/ai.json`).
68
68
  Requires Screenplay 4.63.2 or later (`screenplay --version`) for a dynamic-root server; the compiler bundled in older cratis releases lacks it.
@@ -248,6 +248,12 @@ Read [change alternatives](references/change-alternatives.md) when a component's
248
248
 
249
249
  Read [interaction example](references/interaction-example.md) when wiring a
250
250
  named confirmation behavior and an inline refresh to the same screen.
251
+
252
+ State every plain and toolbar `action`'s subject: `for item` (the chosen record fills its
253
+ inputs) or `for screen` (no row does). Omitted, the compiler infers it from types, and a
254
+ create action on a list can bind the selected row's id. Read
255
+ [action subjects](references/action-subjects.md) when adding a screen action or when
256
+ PLAY0817-PLAY0821 appear.
251
257
  Scalar/named `returns` bind and reference-execute (ESM v7).
252
258
  Renderer generation/response limits: command-surface `references/generated-values-and-responses.md`.
253
259
  Screenplay resolves response names in form submit and execute success (Requires Screenplay 4.148.0 or later);
@@ -0,0 +1,73 @@
1
+ # Action subjects: `for item` and `for screen`
2
+
3
+ Requires Screenplay 4.248.0 or later (`screenplay --version`). Source: Screenplay
4
+ `Documentation/screenplay/action-subjects.md` (decision 0110).
5
+
6
+ A plain or toolbar `action` states whether it acts on one chosen record or on the screen:
7
+
8
+ - `for item`: the nearest single `data` record, or the selected row of a collection. Inputs bind
9
+ from it: explicit `with <input> from item.<field>` first, then case-sensitive same-name
10
+ fields, then one key field with the same declared concept.
11
+ - `for screen`: independent of selection; no row fills the inputs. Use it for actions that
12
+ create something or that the user fills in through the form.
13
+
14
+ The clause follows the command name, before an inline `label`. Only action toolbar items
15
+ accept it.
16
+
17
+ ```screenplay
18
+ concept TaskId : Uuid
19
+ concept Title : String
20
+ module Work
21
+ feature Tasks
22
+ slice StateChange AddTask
23
+ command AddTask
24
+ taskId TaskId identifier
25
+ title Title
26
+ produces event TaskAdded
27
+ title Title = title
28
+ slice StateChange CompleteTask
29
+ command CompleteTask
30
+ taskId TaskId identifier
31
+ note String
32
+ produces event TaskCompleted
33
+ note String = note
34
+ slice StateView OpenTasks
35
+ readmodel OpenTask
36
+ taskId TaskId key
37
+ title Title
38
+ projection OpenTasks => OpenTask
39
+ from TaskAdded
40
+ taskId = $eventSourceId
41
+ title = title
42
+ remove with TaskCompleted
43
+ query ListOpenTasks => OpenTask[]
44
+ screen OpenTasksScreen
45
+ title "Open tasks"
46
+ data OpenTask[] via query ListOpenTasks
47
+ action AddTask for screen
48
+ label "Add task"
49
+ action CompleteTask for item
50
+ label "Complete"
51
+ with taskId from item.taskId
52
+ table OpenTask
53
+ column title label "Task"
54
+ ```
55
+
56
+ State the subject on every plain and toolbar action. Without it, the compiler infers `for item`
57
+ when there is exactly one collection `data`, one required non-generated identifier and one key
58
+ with the same concept, and `for screen` otherwise. Inference follows types, not intent: here
59
+ `AddTask` without a clause infers `for item`, because its `taskId` has the row key's concept,
60
+ and would bind the selected row's id to a new task.
61
+
62
+ | Code | Severity | Meaning | Fix |
63
+ | --- | --- | --- | --- |
64
+ | PLAY0817 | Error | Malformed, duplicate or misplaced subject clause | One clause after the command name |
65
+ | PLAY0818 | Information | Explains an omitted subject's inference | State `for item` or `for screen` |
66
+ | PLAY0819 | Warning | The inferred binding differs from the legacy case-insensitive row-name matching | Decide per action: `for screen`, or `for item` with explicit inputs; never bulk-accept |
67
+ | PLAY0820 | Warning | Several keys could bind one input | Write `with <input> from item.<field>` |
68
+ | PLAY0821 | Warning | A guarded `for screen` action has collection data and cannot choose one item | Use `for item` or single-record data |
69
+
70
+ A model written before 4.248.0 can report PLAY0818/PLAY0819 on every list-screen action. Review
71
+ each one against what the action means; a create action is `for screen` even when the row has a
72
+ matching identifier. Compiler inference is authoring evidence only: Scene owns the runtime
73
+ selection and form-input behavior.
@@ -7,8 +7,9 @@ This reference holds the three meanings of `file` and the rules for paths and lo
7
7
  Three meanings, one word:
8
8
 
9
9
  - **Backend implementation attachment.** On an attached command `handler`
10
- (PLAY0800: permanent constrained-attachment requirement, gap-filled in code;
11
- pending described handlers instead bind v23 without a file), a validation
10
+ (binds as the v23 result contract beside unconditional `produces` with a resolved
11
+ body from Screenplay 4.250.0, otherwise PLAY0800; pending described handlers bind
12
+ v23 without a file), a validation
12
13
  rule predicate, a query `performer`, a reducer rule, a reaction trigger, a
13
14
  `constraint` and a `policy`, `file` stands in for the inline body: the
14
15
  implementation lives there. These are the files a host inventories.
@@ -22,7 +23,7 @@ Three meanings, one word:
22
23
  `readmodel`, `projection`, `slice`, `specification`, top-level `trigger` — it
23
24
  only records which file realizes it.
24
25
 
25
- Requires Screenplay 4.210.0 (`screenplay --version`) for the file/inline handler's PLAY0800; older binders use PLAY0268. Read its required typed `arguments.subject` to identify the command, never the message.
26
+ Requires Screenplay 4.250.0 (`screenplay --version`) for a file/inline handler beside `produces` to bind; 4.210.0 to 4.249.x refuse it with PLAY0800 and older binders use PLAY0268. Read its required typed `arguments.subject` to identify the command, never the message.
26
27
 
27
28
  The rules:
28
29
 
@@ -72,7 +72,7 @@ module Billing
72
72
  title String = title
73
73
  returns invoiceId
74
74
  screen CreateInvoiceScreen
75
- action CreateInvoice
75
+ action CreateInvoice for screen
76
76
  label "Create invoice"
77
77
  slice StateView Details
78
78
  readmodel Invoice
@@ -21,7 +21,7 @@ module Marina
21
21
  screen BookBerthScreen
22
22
  title "Book a berth"
23
23
  data BerthListView[] via query ListBerths
24
- action BookBerth
24
+ action BookBerth for screen
25
25
  navigate to BerthListScreen
26
26
  label "Book berth"
27
27
  slice StateView BerthList
@@ -12,6 +12,10 @@ as events in the application's own Chronicle event store. It is not a service.
12
12
 
13
13
  **Requires** `Cratis.Showrunner.Herald` 1.10.0 or later and an application that is a Chronicle
14
14
  client (`AddCratis` or `AddCratisChronicle`); check the package reference in the `.csproj`.
15
+ Herald records in the host application's own event store, without naming it again; set
16
+ `HeraldOptions.EventStore` only to use another store. Showrunner 1.13.0 or later takes the host's
17
+ store; an older release takes the name from the Chronicle client options, which an ASP.NET Core
18
+ host leaves empty, so set `EventStore` explicitly there.
15
19
 
16
20
  ## Add it
17
21
 
@@ -41,6 +45,7 @@ builder.AddHerald(herald =>
41
45
  validated at startup and the error names the option.
42
46
  - Defaults worth knowing: `DefaultLanguage` `en`, `Transport` `Smtp`, `Smtp.Security` `StartTls`,
43
47
  `Retry.MaxAttempts` 6, `PollingInterval` 5 seconds. Read [options](references/options.md) for the full table.
48
+ - A `signupDeclined` email is sent from `OrganizationRegistrationDeclined` with the reviewer's message as a value; see `cratis-onboarding-runtime`.
44
49
  - Chronicle finds Herald's events through type discovery of referenced `Cratis*` packages.
45
50
  - Run the worker in **one** application instance: delivery is at least once.
46
51
 
@@ -148,11 +148,12 @@ and unaudited-version refusals still stop first. Codes, limits and fixes:
148
148
  overrides (`-036`), unsupported code validation (`-005`), DateTime filters (`-010`),
149
149
  unsupported conditional productions, unsupported composite-key projection shapes, including DateTime and decimal key parts (`STAGE-ESM-048`, and `-047` for a single-instance query by parts) and unsupported `all` shapes.
150
150
  Protected reads render as Arc read protection in a new enough bundle; shapes it cannot preserve, and every protected read in an older bundle, refuse `STAGE-ESM-044` (see admission.md). Described handlers still refuse `STAGE-IMPL-002` even in Stub mode. Query-performer gaps are a separate contract, not a completed implementation.
151
- - **Attached command handlers (`PLAY0800`):** file/inline handlers permanently require
152
- constrained implementation attachments: gap-fill the slice in code, not by waiting
153
- for ESM admission. Read the required typed `arguments.subject` for the command,
154
- never match message text. Requires Screenplay 4.210.0 (`screenplay --version`);
155
- older bundled binders use PLAY0268 for these handlers.
151
+ - **Attached command handlers:** a file/inline handler beside unconditional `produces`
152
+ with a resolved body binds as the v23 result contract and Stage renders its C# body.
153
+ Without `produces`, with `produces ... when` or with an unresolved body it refuses
154
+ `PLAY0800`: read the required typed `arguments.subject` for the command, never match
155
+ message text. Older bundled binders refuse every attached handler (version gate:
156
+ toolchain `references/executable-subset.md`).
156
157
  - **Binding refusals:** read toolchain `references/executable-subset.md` for
157
158
  `PLAY0268`/`PLAY0271` families; binding is not rendering. Composite keys have
158
159
  target-specific support, not blanket refusal. Never drop protection.
@@ -314,11 +314,14 @@ pure expressions, and no generated type shadowing a referenced one. Anything els
314
314
  `STAGE-ESM-019`, `-021` or `-022`. A reducer needs a `StateView` slice, its read model in the
315
315
  same slice, a required Guid or text identifier and a matching keyed query. Resolved
316
316
  C# command/concept rule and iterator validation bodies have pure-gated render
317
- paths; unsupported body/context shapes still refuse. Attached
318
- command handlers refuse `PLAY0800` and permanently require constrained implementation
319
- attachments: gap-fill in code, not by waiting for ESM admission. Requires Screenplay
320
- 4.210.0 (`screenplay --version`); older bundled binders use PLAY0268 for these handlers.
321
- Read the required typed `arguments.subject` for the command rather than the message.
317
+ paths; unsupported body/context shapes still refuse. An attached command handler
318
+ beside unconditional `produces` with a resolved body binds as the v23 result contract
319
+ (Screenplay 4.250.0, decision 0117); Stage renders a C# body (`STAGE-IMPL-LANGUAGE` when
320
+ no `csharp` body exists) and its semantic Host and executor report a reached body as
321
+ `Unsupported(ImplementationBody)`. Without `produces`, with `produces ... when` or with
322
+ an unresolved body the handler refuses `PLAY0800` at binding; 4.210.0 to 4.249.x refuse
323
+ every attached handler with it and older binders use PLAY0268. Read the required typed
324
+ `arguments.subject` for the command rather than the message.
322
325
  A pending handler beside unconditional productions binds as a described v23
323
326
  command; rendering still refuses it with STAGE-IMPL-002 even in Stub mode.
324
327
  Query-performer gaps are a separate contract: see [bodies and implementation gaps](current-boundaries.md#bodies-and-implementation-gaps).
@@ -127,15 +127,24 @@ Requires cratis CLI 3.116.0 with Stage 4.211.0 (`cratis --version`); older relea
127
127
  - Only provider kinds AuthProxy supports render (`EntraId`, `GitHub`, `Google`, `Apple`,
128
128
  `OpenId`). Another kind is left out with `STAGE-AUTH-001`; a persona that is not a
129
129
  requirement on authentication, roles or claims is never matched (`STAGE-AUTH-002`).
130
- - `offering` renders nothing (`STAGE-ONBOARDING-001`): tenants are provisioned without
131
- licensing. `STAGE-ONBOARDING-002` to `-006` cover a tenant invitation with no command,
130
+ - `offering <Name>` renders against Box Office: the default offering is declared, and a
131
+ retrying reactor on tenant provisioning starts each new tenant on it (`StartTenant`) as soon as
132
+ the operator publishes the offer. Provisioning and the welcome email do not wait for it.
133
+ `STAGE-ONBOARDING-008` is information: the operator must publish an offer with that name, and
134
+ Box Office seat and compute policies are not rendered. Requires Stage 4.212.0
135
+ for the offering and the declined email; older renderers render neither.
136
+ `STAGE-ONBOARDING-002` to `-006` cover a tenant invitation with no command,
132
137
  a sign-up without a first-member persona, a legal document count other than two, a
133
- missing email template and an invitation without inviters.
138
+ missing email template and an invitation without inviters. `-001` and `-007` are retired
139
+ and never reused.
134
140
  - An invitation Ante rejects (a persona or invitation type the model does not allow) is a
135
141
  mistake in the invitation, not a decision about the person: the application records
136
142
  `OnboardingInvitationRejected` and logs a warning for an administrator, and emails no
137
- one. The `signupDeclined` template renders but is not sent until Ante publishes a
138
- declined sign-up (`STAGE-ONBOARDING-007`).
143
+ one.
144
+ - The `signupDeclined` template is sent on `OrganizationRegistrationDeclined`, with the
145
+ reviewer's message as `decline.message`, once per registration. Ante publishes that only
146
+ when sign-up review is on; the model has no review syntax, so a rendered application leaves
147
+ review off and the host adds approve and decline commands by hand (`cratis-onboarding-runtime`).
139
148
  - An application with onboarding pins a newer Chronicle client and kernel image than
140
149
  other applications; read them from the rendered files.
141
150
  - Realization needs the model folder: email images are read from the model root.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "7.127.0",
3
+ "version": "7.129.0",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [