@cratis/pi 7.87.0 → 7.88.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.
@@ -72,7 +72,11 @@ paths:
72
72
  - A bot's pre-push verification build must match the strictest configuration any CI in
73
73
  the organization applies to the same commit (build `Release` when consumers enforce
74
74
  analyzers there). Do not add `[skip ci]` to bot commits as a load optimization: the
75
- downstream CI run is the only check that sees the merged result.
75
+ downstream CI run is the only check that sees the merged result. One exception: a
76
+ bootstrap commit that changes **only** bootstrapped wrapper workflow files, whose
77
+ content the source repository's CI verified before the rollout, may carry
78
+ `[skip ci]` once the same wrapper content has landed with CI running in one canary
79
+ repository. Package-update bots, and any commit touching another file, keep normal CI.
76
80
  - Comment-triggered agent workflows must gate on the trigger phrase in the job's `if:`
77
81
  (for example `contains(github.event.comment.body, '@claude')`) so a runner only
78
82
  starts when the agent is actually addressed.
@@ -71,7 +71,11 @@ paths:
71
71
  - A bot's pre-push verification build must match the strictest configuration any CI in
72
72
  the organization applies to the same commit (build `Release` when consumers enforce
73
73
  analyzers there). Do not add `[skip ci]` to bot commits as a load optimization: the
74
- downstream CI run is the only check that sees the merged result.
74
+ downstream CI run is the only check that sees the merged result. One exception: a
75
+ bootstrap commit that changes **only** bootstrapped wrapper workflow files, whose
76
+ content the source repository's CI verified before the rollout, may carry
77
+ `[skip ci]` once the same wrapper content has landed with CI running in one canary
78
+ repository. Package-update bots, and any commit touching another file, keep normal CI.
75
79
  - Comment-triggered agent workflows must gate on the trigger phrase in the job's `if:`
76
80
  (for example `contains(github.event.comment.body, '@claude')`) so a runner only
77
81
  starts when the agent is actually addressed.
@@ -214,8 +214,8 @@ Stage renders two projection forms; the restrictions differ.
214
214
  1. The identifier always equals the projection's effective key: the inline `key`, else the
215
215
  `from` block `key`, else the event source. An event-source key (default or
216
216
  `key $eventSourceId`) makes the identifier the event source; an event-property or literal
217
- key makes it that key. Stage refuses a literal key (`STAGE-ESM-017`; scoped keys are an
218
- event property or the event source). Never map `$eventSourceId` onto the identifier when the key is
217
+ key makes it that key. A literal key (`key "global"`) renders only at the root of a scope as
218
+ Chronicle's constant key; every other scoped key is an event property or the event source. Never map `$eventSourceId` onto the identifier when the key is
219
219
  something else (`from PaymentRecorded key invoiceId`): the runtime fails with "affected key
220
220
  disagrees with read-model identifier".
221
221
  2. Executable model. A flat-bound projection must map the identifier like any required
@@ -237,8 +237,10 @@ Stage renders two projection forms; the restrictions differ.
237
237
  the event source, drop the explicit key and the projection is scoped, which admits literals.
238
238
  - **Scoped:** every other projection, including a plain single `from E` with the default or
239
239
  `$eventSourceId` key. Forms: several distinct `from` blocks, `remove with`, root
240
- `join ... on`, `children` with an identified element (one level, no children or joins
241
- inside a child; `remove with` and `remove via join` inside a child are admitted), `nested`
240
+ `join ... on`, `children` with an identified element (one level, no children inside a child;
241
+ a `join` inside a child matches the element's own identity, so it names no `on` of its own and its
242
+ mappings count towards the element's required properties; `remove with` and `remove via join`
243
+ inside a child are admitted), `nested`
242
244
  over an optional composite property, and `every`/`all` with set-from-event-source mappings. Keys
243
245
  are an event property or the event source. The key establishes the identifier, so it must
244
246
  end up unmapped: a mapping onto it is refused unless it copies the key's own event
@@ -256,9 +258,24 @@ Stage renders two projection forms; the restrictions differ.
256
258
  - Refused in a scope (`STAGE-ESM-017`): composite keys; empty/literal `all` mappings;
257
259
  unmapped `all` properties outside that nullable subset; `every` with
258
260
  children included beside children or nested blocks; root `remove via join`; joins,
259
- children or join removals inside `nested`; a `clear` inside `nested`; recursive children
260
- and joins inside a child; duplicate event contracts among `from`, join or
261
+ children or join removals inside `nested`; a `clear` inside `nested`; recursive children;
262
+ duplicate event contracts among `from`, join or
261
263
  removal blocks; event or read-model property names that collide with Chronicle syntax.
264
+ - Running totals: `add`, `subtract`, `increment` and `decrement` start from 0 where nothing was set. `add x by 0`
265
+ (or `subtract x by 0`) on a required plain whole number or decimal only makes the total exist and renders as nothing;
266
+ any other constant operand is refused (Chronicle's `Add` takes an event property), and so is a concept total at zero
267
+ (a never-set concept is null in Chronicle). An optional total (plain or concept) that is also cleared, or set from a
268
+ value that may be absent, is refused: Chronicle cannot add to a property it has set to null. The added event property
269
+ must be the total's type, a concept into the number it holds, a number into a concept, or a concept into another concept
270
+ of the same number (the target concept declares the conversion); a concept into an optional plain number is refused
271
+ (`STAGE-ESM-017`: Chronicle rejects the double conversion).
272
+ - `$eventSourceId` in a mapping of a block keyed by an event property (`sku = $eventSourceId`) renders
273
+ when every command that produces the event addresses it with a value of the target's type (and no
274
+ reaction produces it under another type); the same mapping onto the key itself is always refused.
275
+ - Events a state-view slice declares (a projection removes with an event no command of the slice produces) are generated
276
+ with the slice.
277
+ - A command whose productions address different event sources (`for orderId`, `for productId`, ESM v30) renders; each
278
+ event goes to the source its own destination names.
262
279
  - A scope cannot also carry flat transitions.
263
280
 
264
281
  The example in [render-example.md](render-example.md) uses a scope (`from` plus `remove with`).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "7.87.0",
3
+ "version": "7.88.0",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [