@cratis/pi 7.9.2 → 7.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/corpus/harnesses/pi/extensions/cratis-mcp/configuration.ts +4 -3
- package/package/corpus/harnesses/pi/extensions/cratis-mcp/index.ts +1 -1
- package/package/corpus/mcp-servers.json +0 -1
- package/package/corpus/rules/ai-distribution.md +2 -1
- package/package/corpus/rules/profiles.md +2 -2
- package/package/corpus/skills/cratis-arc-command/references/handler-shapes.md +23 -0
- package/package/corpus/skills/cratis-chronicle-client-dotnet/SKILL.md +25 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +6 -3
- package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +8 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +2 -2
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +3 -2
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +4 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/verification.json +4 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +4 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/verification.json +2 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +3 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +5 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/sources-and-streams.md +29 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/versions.md +7 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +4 -1
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +5 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +3 -1
- package/package.json +1 -1
|
@@ -95,8 +95,9 @@ export function selectedServer(project: string, corpus: string) {
|
|
|
95
95
|
JSON.stringify(server.profiles) !== '["cratis/screenplay"]' || server.env !== undefined) {
|
|
96
96
|
throw new Error('Only the distributed native Cratis Screenplay MCP command is supported.');
|
|
97
97
|
}
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
// Without an explicit root the Cratis CLI locates the model itself: the existing .play files, else Source/src, else Screenplay/.
|
|
99
|
+
const root = object(screenplay) ? screenplay.root : undefined;
|
|
100
|
+
if (root !== undefined && typeof root !== 'string') throw new Error('Screenplay MCP root must be a project-relative string.');
|
|
100
101
|
const physicalProject = realpathSync(project);
|
|
101
|
-
return { project: physicalProject, root: physicalRoot(physicalProject, root) };
|
|
102
|
+
return { project: physicalProject, root: root === undefined ? undefined : physicalRoot(physicalProject, root) };
|
|
102
103
|
}
|
|
@@ -59,7 +59,7 @@ export function registerBridge(pi: ExtensionAPI, corpus: string, connect = start
|
|
|
59
59
|
failures.clear();
|
|
60
60
|
if (!selection) return;
|
|
61
61
|
if (uncertain) throw new Error('Screenplay mutation outcome remains unknown. Explicitly reload, inspect workspace-state, and obtain authorization before any recovery.');
|
|
62
|
-
const modelRoot = selection.root;
|
|
62
|
+
const modelRoot = selection.root ?? "the project's Screenplay model";
|
|
63
63
|
const activeConnection = connect(selection.project);
|
|
64
64
|
connection = activeConnection;
|
|
65
65
|
try {
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
"transport": "stdio",
|
|
8
8
|
"command": "cratis",
|
|
9
9
|
"args": ["screenplay", "mcp"],
|
|
10
|
-
"defaultRoot": ".cratis/screenplay",
|
|
11
10
|
"description": "Understand and safely author one Screenplay application through typed AST operations, reviewed proposals, durable identities, and explicit recovery."
|
|
12
11
|
}
|
|
13
12
|
]
|
|
@@ -45,7 +45,8 @@ remove only unchanged owned entries on uninstall. Unsupported adapters must be
|
|
|
45
45
|
reported explicitly rather than presented as configured.
|
|
46
46
|
|
|
47
47
|
Project model roots and opt-outs are consumer-owned configuration. Guidance
|
|
48
|
-
installation never
|
|
48
|
+
installation never creates or manages a model directory: the Screenplay MCP locates the model
|
|
49
|
+
itself (existing `.play` files, else `Source/` or `src/`, else a new `Screenplay/` folder). Ordinary
|
|
49
50
|
model writes still require the model-authoring proposal/apply contract and the
|
|
50
51
|
user's in-scope request.
|
|
51
52
|
|
|
@@ -150,8 +150,8 @@ Standalone Chronicle client usage (no Arc) in TypeScript is
|
|
|
150
150
|
|
|
151
151
|
### Event modeling with Screenplay
|
|
152
152
|
|
|
153
|
-
**Model first.** A repository is opted in only when its model root (
|
|
154
|
-
`.
|
|
153
|
+
**Model first.** A repository is opted in only when its model root (where the project's
|
|
154
|
+
`.play` files live: normally under `Source/` or `src/`, else `Screenplay/`) holds a committed `.play` file (`git ls-tree -r --name-only HEAD -- <root>` lists it) or the project explicitly set
|
|
155
155
|
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install output, an
|
|
156
156
|
installed profile or skill, a `.play` file outside the root or an untracked or uncommitted draft is not
|
|
157
157
|
opt-in. An accepted model under the root covering the scope is the contract and the source
|
|
@@ -130,6 +130,29 @@ public IEnumerable<object> Handle() =>
|
|
|
130
130
|
`EventForEventSourceId` also carries optional `Subject`, `EventStreamType` and
|
|
131
131
|
`EventStreamId` init members when the target stream is not the default.
|
|
132
132
|
|
|
133
|
+
A command that always appends through a Chronicle event source definition (Arc 22.49.0
|
|
134
|
+
and later, definitions from Chronicle 19.30.0) declares it with
|
|
135
|
+
`[EventSource<TSource>(stream)]` from `Cratis.Arc.Chronicle.Commands`; the definition
|
|
136
|
+
supplies the event source type and validates the optional stream name:
|
|
137
|
+
|
|
138
|
+
```csharp
|
|
139
|
+
[EventSource]
|
|
140
|
+
[EventStream("transactions")]
|
|
141
|
+
public class Account : IEventSource;
|
|
142
|
+
|
|
143
|
+
[Command]
|
|
144
|
+
[EventSource<Account>("transactions")]
|
|
145
|
+
public record RecordTransaction(AccountId AccountId, decimal Amount)
|
|
146
|
+
{
|
|
147
|
+
public <TransactionRecorded> Handle() => new(Amount);
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
An event that sets legacy `EventSourceType`/`EventStreamType` is appended by those
|
|
152
|
+
strings, not through the definition. A command may also implement
|
|
153
|
+
`ICanProvideEventStreamId` to supply the stream id. Do not combine a definition with
|
|
154
|
+
contradicting `[EventSourceType]`/`[EventStreamType]` attributes.
|
|
155
|
+
|
|
133
156
|
Concurrency scope is resolved **per target stream** — one expected tail per
|
|
134
157
|
event source id, not one shared across the streams a cross-stream command writes
|
|
135
158
|
to.
|
|
@@ -255,6 +255,31 @@ Task<AppendManyResult> AppendMany(EventSourceId eventSourceId, IEnumerable<objec
|
|
|
255
255
|
Task<AppendManyResult> AppendMany(IEnumerable<EventForEventSourceId> events, /* ... */); // :167
|
|
256
256
|
```
|
|
257
257
|
|
|
258
|
+
Event source definitions (Chronicle 19.30.0 and later): a never-instantiated type marked
|
|
259
|
+
`IEventSource`, named by `[EventSource(name)]` (default: the type name without a trailing
|
|
260
|
+
`EventSource`) and declaring streams with `[EventStream(name)]` (all in
|
|
261
|
+
`Cratis.Chronicle.EventSources`; both take `Description` and `Concurrency`). Append through
|
|
262
|
+
it with `EventForEventSourceId { EventSource = typeof(<Definition>), EventStream = "<stream>" }`;
|
|
263
|
+
the source and stream types come from the definition and contradicting explicit
|
|
264
|
+
`EventSourceType`/`EventStreamType` values are rejected. The stream id stays with the caller
|
|
265
|
+
(`EventStreamId`, or `ICanProvideEventStreamId.GetEventStreamId()` on a reactor or command).
|
|
266
|
+
|
|
267
|
+
```csharp
|
|
268
|
+
[EventSource("Account")]
|
|
269
|
+
[EventStream("Transactions")]
|
|
270
|
+
public class Account : IEventSource;
|
|
271
|
+
|
|
272
|
+
await eventStore.EventLog.AppendMany(
|
|
273
|
+
[
|
|
274
|
+
new EventForEventSourceId(<accountId>, new <Deposited>(<amount>))
|
|
275
|
+
{
|
|
276
|
+
EventSource = typeof(Account),
|
|
277
|
+
EventStream = "Transactions",
|
|
278
|
+
EventStreamId = <streamId>
|
|
279
|
+
}
|
|
280
|
+
]);
|
|
281
|
+
```
|
|
282
|
+
|
|
258
283
|
```csharp
|
|
259
284
|
var result = await eventStore.EventLog.Append(<eventSourceId>, new <EventName>(<value>));
|
|
260
285
|
if (!result.IsSuccess)
|
|
@@ -318,9 +318,12 @@ to the routed scope. This does not make command `reads` protected.
|
|
|
318
318
|
|
|
319
319
|
Decision 0023's constructs differ in availability. **Authorable at 4.64.0, never
|
|
320
320
|
executable yet** (binding reports `PLAY0268`, so they stop a model at V1): generated
|
|
321
|
-
values and `returns` responses
|
|
322
|
-
|
|
323
|
-
|
|
321
|
+
values and `returns` responses, operations, and named event sources and streams with
|
|
322
|
+
command routes (`eventsource`, `stream`, `streamId`). Their ESM versions are allocated,
|
|
323
|
+
not implemented (the highest implemented is v6). Syntax or MCP acceptance is not proof of
|
|
324
|
+
execution. A model using sources, streams or routes can be authored and validated, but
|
|
325
|
+
not bound, run or rendered; hand-write the code with the model as contract
|
|
326
|
+
(`cratis-screenplay-toolchain` `references/sources-and-streams.md`). `derive` and `provide` have no documented syntax at that tag; treat them as
|
|
324
327
|
planned and do not write them.
|
|
325
328
|
|
|
326
329
|
## `constraint` — uniqueness at append time
|
package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md
CHANGED
|
@@ -32,7 +32,7 @@ reports what: `cratis-screenplay-toolchain` `references/versions.md`.
|
|
|
32
32
|
| `reads` under a reaction trigger that `produces` directly | accepted | `PLAY0268` |
|
|
33
33
|
| Generated properties, `returns` responses | authorable, syntax-only | `PLAY0268`; allocated to ESM v8 |
|
|
34
34
|
| `system`, `operation` | authorable, syntax-only | `PLAY0268`; allocated to ESM v9 |
|
|
35
|
-
| `eventsource`, `stream` | authorable, authoring-only | `PLAY0268`; allocated
|
|
35
|
+
| `eventsource`, `stream` | authorable, authoring-only | `PLAY0268`; allocated, not implemented (`cratis-screenplay-toolchain` `references/sources-and-streams.md`) |
|
|
36
36
|
| UI constructs | accepted | information `PLAY0269` |
|
|
37
37
|
|
|
38
38
|
A model that carries one of the blocked constructs is still a valid design model. Never remove
|
package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md
CHANGED
|
@@ -175,7 +175,7 @@ the standalone 4.64.0 tool for the rows marked "probed"; Cratis CLI 3.27.1
|
|
|
175
175
|
| Reaction with trigger `reads` | Direct-producing (or code-bodied) reaction with `reads`: `PLAY0268` ("ESM v6 cannot protect that decision dependency", decision 0006), non-executable. Invokes-only reaction with `reads`: information only; the invoked command must declare and protect its own decision reads. Keep the `reads`; never remove them to obtain binding |
|
|
176
176
|
| Binds as opaque code (v3); reference runner reports unsupported | Bodied reducers, bodied named rules, fenced `validate` blocks, code or file policies. A pure reducer body is the only attachment Stage 4.24.0 admits |
|
|
177
177
|
| Information only, never blocks (probed) | `persona` (report-only: `PLAY0270`, the policies it lists must exist), `authentication`, `domain`, `seed`, descriptions and `file` provenance. A persona does not block binding and does not change behavior, so state persona scope in a description or a policy the model uses |
|
|
178
|
-
| Authorable, not executable (`PLAY0268`, probed) | `generated` properties and `returns` responses (allocated ESM v8), `system` and `operation` (v9), `eventsource` and `stream` (
|
|
178
|
+
| Authorable, not executable (`PLAY0268`, probed) | `generated` properties and `returns` responses (allocated ESM v8), `system` and `operation` (v9), `eventsource` and `stream` (allocated, not implemented; see `cratis-screenplay-toolchain` `references/sources-and-streams.md`). The MCP reads and edits them (`declaration-details`, `find-fixtures`, `read-workspace` views `event-sources`/`event-streams`/`command-routes`) with `executionAvailable: false`. Keep them in the model as intent; do not strip them to make the model bind, and do not call the model executable |
|
|
179
179
|
| Blocks binding (`PLAY0268`) | `@pii`/`@sensitive` concepts (probed: "compliance attributes require portable data-subject semantics"), command `handler` (never binds; a command cannot declare both `produces` and `handler`, `PLAY0035`), bare `rule <Name>`, `require` or conditions over read-model paths, dates and `today` in comparisons, `$context.tenant`/claims/roles/causation in `produces`, `$env` conditions, `file` constraints, unquoted `import` of an external contract, a read model whose keyed queries in its own slice do not share one `by` property (none, or two different properties; several queries over the same property bind), any query other than `=> <ReadModel> optional` with one caller-supplied `by` argument (so also observable, filtered, scoped and performer-backed queries), `$causedBy` and templates in projections |
|
|
180
180
|
| Blocks binding (`PLAY0271`, legacy meaning) | Command `reads` and `concurrency` |
|
|
181
181
|
| Deferred (`PLAY0269`, information) | Screens, layouts, templates, forms, contributions, UI profiles, themes, behaviors and `on`/`uses` |
|
|
@@ -209,7 +209,7 @@ Decision 0023's generated values and `returns`, operations and named event
|
|
|
209
209
|
sources/streams are **authorable** at v4.64.0 (syntax only, see the table above and
|
|
210
210
|
`commands.md`, `operations.md`, `event-sources.md` in the Screenplay documentation):
|
|
211
211
|
write them, but binding reports `PLAY0268` and nothing executes them until
|
|
212
|
-
ESM
|
|
212
|
+
the allocated ESM versions are implemented (the highest implemented is v6). Do not drop them for the sake of a green bind.
|
|
213
213
|
Protected reads and `derive`/`provide` (allocated v11) have no documented syntax at
|
|
214
214
|
v4.64.0: do not teach or invent one. Affected-instance declarations, per-event data
|
|
215
215
|
subjects, external event origin and query paging/sorting/change-set delivery also
|
|
@@ -93,8 +93,9 @@ not host these production-repair transactions. Use MCP for production repairs.
|
|
|
93
93
|
## Syntax-only constructs through the MCP
|
|
94
94
|
|
|
95
95
|
`generated` properties and `returns` responses, `system`/`operation`, and
|
|
96
|
-
`eventsource`/`stream` are authorable but not executable (`PLAY0268
|
|
97
|
-
|
|
96
|
+
`eventsource`/`stream` are authorable but not executable (`PLAY0268`; the first two
|
|
97
|
+
are allocated to ESM v8 and v9, sources and streams are allocated, not implemented:
|
|
98
|
+
`cratis-screenplay-toolchain` `references/sources-and-streams.md`). The server reads and edits them: `declaration-details` exposes `isGenerated`
|
|
98
99
|
and a command `response` view, `route` and `streams` views; `read-workspace` offers
|
|
99
100
|
the views `event-sources`, `event-streams`, `event-source-details`,
|
|
100
101
|
`event-stream-details`, `command-routes` and `event-source-diagnostics` (detail
|
|
@@ -62,6 +62,10 @@ assume an answer to 4, and record it as `blocked` for the user.
|
|
|
62
62
|
| **B. Generated base plus authorized gap-fill** | an earlier admitted whole-model render exists and the user separately authorized hand-written scope, or a seam the model names needs an adapter | the generated output stays managed and untouched; hand-written code lives in `Customizations/` or a separate project (seam adapters by this skill, business gap-fill by `slice-implementer`), serves named model elements only, never claims render admission, and V5 is reported for the generated base **with its scope stated** |
|
|
63
63
|
| **C. Fully hand-written delivery** | the scope cannot render and no generated base is wanted | `slice-implementer` delivers it with the model as the contract (`references/gap-fill-handoff.md`); V5 is `not run: no render` |
|
|
64
64
|
|
|
65
|
+
Models with event sources, streams or command routes are case A or C today: they cannot
|
|
66
|
+
bind or render (`PLAY0268`, `STAGE-ESM-016`), so hand-write the code with the model as the
|
|
67
|
+
contract (`cratis-screenplay-toolchain` `references/sources-and-streams.md`).
|
|
68
|
+
|
|
65
69
|
Two rules hold in every case: a customization never makes a rejected model renderable, and
|
|
66
70
|
a whole-application V5 is never claimed from a subset. The CLI renders whole applications
|
|
67
71
|
only; a dependency-closed scope selection does not exist, so do not fake one with an
|
|
@@ -67,7 +67,10 @@ option, mark it `ASSUMED` in the slice or module `description` and in the sessio
|
|
|
67
67
|
each event belongs, and decide retain, split, view instead, or unresolved, by lifecycle and
|
|
68
68
|
invariant consequences, not names or length. For Chronicle keep event-source identity,
|
|
69
69
|
namespace, process-stream routing and concurrency scope apart
|
|
70
|
-
(`references/chronicle-boundaries.md`).
|
|
70
|
+
(`references/chronicle-boundaries.md`). Declared `eventsource`/`stream`/`streamId` and
|
|
71
|
+
command routes can be authored and validated but not bound, run or rendered today
|
|
72
|
+
(`PLAY0268`, `STAGE-ESM-016`): keep them as intent and hand-write the routing
|
|
73
|
+
(`cratis-screenplay-toolchain` `references/sources-and-streams.md`).
|
|
71
74
|
2. **Account for every invariant.** One row per rule in the table from
|
|
72
75
|
`references/consistency-and-concurrency.md`: rule, authoritative inputs, all paths that can
|
|
73
76
|
affect it, intended atomic decision point, exact construct, status (`enforced` / `recorded` /
|
|
@@ -189,7 +189,7 @@ Ask for each stream:
|
|
|
189
189
|
Some event stores decide consistency by a query over tagged events instead of one stream
|
|
190
190
|
(often called dynamic consistency boundaries). Chronicle's concurrency scopes can narrow a
|
|
191
191
|
check to event types, source type or stream (`concurrency` block, Screenplay
|
|
192
|
-
`commands.md`), and Screenplay has syntax-only event-source/stream declarations (ESM
|
|
192
|
+
`commands.md`), and Screenplay has syntax-only event-source/stream declarations (allocated, not implemented ESM version;
|
|
193
193
|
`event-sources.md`). None of this binds on either compiler (`versions.md` in `cratis-screenplay-toolchain`). Model the stream by business
|
|
194
194
|
identity; when a rule truly needs a cross-stream decision, record it (see
|
|
195
195
|
`consistency-and-concurrency.md`) rather than inventing a construct.
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
{ "kind": "skill-contains", "value": "retry identity" },
|
|
12
12
|
{ "kind": "skill-contains", "value": "CHR0034" },
|
|
13
13
|
{ "kind": "skill-contains", "value": "No calculated events" },
|
|
14
|
-
{ "kind": "skill-contains", "value": "decision tree and red flags" }
|
|
14
|
+
{ "kind": "skill-contains", "value": "decision tree and red flags" },
|
|
15
|
+
{ "kind": "skill-contains", "value": "not bound, run or rendered" }
|
|
15
16
|
]
|
|
16
17
|
}
|
|
@@ -103,6 +103,9 @@ changes with the root folder name.
|
|
|
103
103
|
`concurrency` do not bind (PLAY0271); no `@pii`; v6 constructs only on the standalone tool.
|
|
104
104
|
- **Renderable** (V5): `references/renderable-subset.md`. Stage 4.24 renders ESM v1 to v3
|
|
105
105
|
`StateChange`/`StateView` slices; Automation and Translate are gap-fill (Stage#79).
|
|
106
|
+
- **Event sources, streams and command routes**: authorable and validatable, but never
|
|
107
|
+
bound (`PLAY0268`: allocated, not implemented ESM version), run or rendered
|
|
108
|
+
(`STAGE-ESM-016`); gap-fill with the model as contract (`references/sources-and-streams.md`).
|
|
106
109
|
|
|
107
110
|
## Edit strategy
|
|
108
111
|
|
|
@@ -122,7 +122,7 @@ bodies still leave their owner non-executable.
|
|
|
122
122
|
| `join`, `children` or `remove via join` inside `nested` | blocked plan | binds; `UnsupportedProjectionBlock` |
|
|
123
123
|
| `$eventContext.occurred.Week` | PLAY0273 | derived value |
|
|
124
124
|
| Projection `parent p` where `p` is not on the child event | PLAY0273 | "Event property not found" |
|
|
125
|
-
| `generated` or `returns` (v8), operations or systems (v9), eventsource or stream (
|
|
125
|
+
| `generated` or `returns` (v8), operations or systems (v9), `numbers exact` (v7), eventsource or stream (allocated, not implemented; `sources-and-streams.md`) | PLAY0268 | syntax only; one such construct leaves the **whole** application without an executable model |
|
|
126
126
|
| Spec of a gated command or query without `given caller` | PLAY0389 | module and feature gates count |
|
|
127
127
|
| `given` or `then readmodel` missing the key property | PLAY0351 | key is the keyed query's `by` |
|
|
128
128
|
| When-less spec asserting events or errors | PLAY0352 | |
|
|
@@ -14,6 +14,11 @@ rejects members. A model that binds only on the standalone tool is not renderabl
|
|
|
14
14
|
|
|
15
15
|
## What Stage 4.24 admits
|
|
16
16
|
|
|
17
|
+
Models using `eventsource`, `stream` or command routes are not renderable: they fail
|
|
18
|
+
binding (`PLAY0268`) and Stage refuses their ESM version (`STAGE-ESM-016`); rendered
|
|
19
|
+
appends never carry event source type, event stream type or event stream id, so
|
|
20
|
+
Chronicle's defaults apply (Stage#177, #200, #201). See `sources-and-streams.md`.
|
|
21
|
+
|
|
17
22
|
Whole-model admission requires ESM schema v1 to v3; anything else is STAGE-ESM-016 (v4
|
|
18
23
|
generations also fail the CLI pre-check CLI-RENDER-003). The admitted vertical is concepts,
|
|
19
24
|
composite types, one command to its events, a one-instance projection, an optional keyed
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Event sources, streams and command routes
|
|
2
|
+
|
|
3
|
+
What a model that uses `eventsource`, `stream`, `streamId` or a command route can and
|
|
4
|
+
cannot do today. Facts read at Screenplay v4.64.0 (`SemanticModelBinder.CommandProductions.cs`),
|
|
5
|
+
Stage v4.24.0 (`SemanticCratisAdmission.cs`) and Chronicle v19.30.0 / Arc v22.49.0.
|
|
6
|
+
|
|
7
|
+
| Activity | Today |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| Author in `.play` (syntax, MCP views `event-sources`, `event-streams`, `command-routes`) | yes, since Screenplay v4.62.0 |
|
|
10
|
+
| Validate (V1: authorable) | yes |
|
|
11
|
+
| Bind (V3) and run specifications | no: binding reports `PLAY0268`; the whole application then has no executable model. V2 (executable diagnostics) shows that blocking `PLAY0268` as the evidence for the blocked V3 |
|
|
12
|
+
| Render (V5) | no: Stage admits ESM v1 to v3 only, so the model is refused with `STAGE-ESM-016` |
|
|
13
|
+
| Deliver as code | gap-fill by hand with the model as the contract (`cratis-screenplay-render-and-gap-fill`, case C) |
|
|
14
|
+
|
|
15
|
+
Why binding refuses: the constructs need an ESM version that is **allocated** but **not
|
|
16
|
+
implemented**. The highest **implemented** ESM version is v6. At 4.64.0 the `PLAY0268`
|
|
17
|
+
message names the allocated version; do not copy a number into a model, a skill or a
|
|
18
|
+
decision, because the numbering is under decision (Cratis/Screenplay PR #401). Tracked in
|
|
19
|
+
Cratis/Screenplay#407 (increment 2 of #302).
|
|
20
|
+
|
|
21
|
+
Stage: even when a model uses none of these constructs, Stage 4.24.0 renders appends
|
|
22
|
+
without event source type, event stream type or event stream id, so Chronicle's defaults
|
|
23
|
+
apply. Tracked in Cratis/Stage#177, #200 and #201. Keep a declared route as intent in the
|
|
24
|
+
model and implement it in hand-written code; never remove it to make the model bind or render.
|
|
25
|
+
|
|
26
|
+
Code-level target for the hand-written part: `IEventSource`, `[EventSource]`, `[EventStream]`
|
|
27
|
+
(Chronicle 19.30.0 and later) and Arc's `[EventSource<TSource>(stream)]` on a command
|
|
28
|
+
(Arc 22.49.0 and later); see `cratis-chronicle-client-dotnet` and `cratis-arc-command`
|
|
29
|
+
(`references/handler-shapes.md`).
|
|
@@ -79,10 +79,16 @@ not prove the older compiler: read the construct it names.
|
|
|
79
79
|
| Exit codes | 0 pass; 5 errors (or warnings with `--warnings-as-errors`); 1 path missing **or no `.play` files**. Information never fails | probed |
|
|
80
80
|
| Output | JSON lines: a `diagnostics` array with `severity`, `code`, `message`, `location`, then either `{"path","files","diagnostics":0}` or an error object. A passing folder run prints the file count | probed on 3.27.1 |
|
|
81
81
|
| File versus folder | file mode compiles one document and **ignores imports** (cli#244). Validate the folder | probed |
|
|
82
|
-
| MCP | `cratis screenplay mcp <root>`, or no argument inside a project
|
|
82
|
+
| MCP | `cratis screenplay mcp <root>`, or no argument inside a project: the server locates the model itself (existing `.play` files, else `Source/`/`src/`, else a new `Screenplay/` folder) unless `.cratis/ai.json` sets `mcpServers.screenplay.root`; 29 tools, no event-source, stream or route views. Fails fast only when an explicitly configured root does not exist | source `ScreenplayMcpRoot.cs:20-37` |
|
|
83
83
|
| Render | `cratis render` binds with the bundled compiler first, then Stage 4.24.0 admits. See `renderable-subset.md` | source |
|
|
84
84
|
| `prologue interpret` | no `--no-llm` flag; LLM resolution and `screenplay generate` flags were checked on 3.27.0 | source |
|
|
85
85
|
|
|
86
|
+
## Event sources and streams
|
|
87
|
+
|
|
88
|
+
Declared since Screenplay v4.62.0 but not bound: PLAY0268, allocated-not-implemented ESM
|
|
89
|
+
version (highest implemented: v6). Stage 4.24.0 admits ESM v1 to v3 and refuses with
|
|
90
|
+
STAGE-ESM-016. Details and trackers: `sources-and-streams.md`.
|
|
91
|
+
|
|
86
92
|
## MCP roots bug (4.63.1 and earlier; fixed in 4.63.2)
|
|
87
93
|
|
|
88
94
|
A dynamic-root server (`screenplay mcp` with no folder) asks a roots-capable client for
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
{ "kind": "skill-contains", "value": "cratis screenplay validate" },
|
|
11
11
|
{ "kind": "skill-contains", "value": "cli#244" },
|
|
12
12
|
{ "kind": "skill-contains", "value": "`notifications/initialized`" },
|
|
13
|
-
{ "kind": "skill-contains", "value": "A handler never binds" }
|
|
13
|
+
{ "kind": "skill-contains", "value": "A handler never binds" },
|
|
14
|
+
{ "kind": "skill-contains", "value": "references/sources-and-streams.md" },
|
|
15
|
+
{ "kind": "skill-contains", "value": "STAGE-ESM-016" },
|
|
16
|
+
{ "kind": "skill-contains", "value": "authorable and validatable" }
|
|
14
17
|
]
|
|
15
18
|
}
|
|
@@ -85,6 +85,11 @@ Facts that surprise:
|
|
|
85
85
|
|
|
86
86
|
## What Stage 4.24 admits
|
|
87
87
|
|
|
88
|
+
A model using `eventsource`, `stream` or command routes is refused (`STAGE-ESM-016`), and
|
|
89
|
+
rendered appends never carry event source type, event stream type or event stream id, so
|
|
90
|
+
Chronicle's defaults apply (Stage#177, #200, #201; Screenplay#407). Gap-fill the routing by
|
|
91
|
+
hand; see `cratis-screenplay-toolchain` `references/sources-and-streams.md`.
|
|
92
|
+
|
|
88
93
|
Whole-model admission needs ESM schema v1 to v3; anything else is `STAGE-ESM-016`. Event
|
|
89
94
|
generations (v4) also fail the CLI pre-check `CLI-RENDER-003`. The admitted vertical:
|
|
90
95
|
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
{ "kind": "skill-contains", "value": "`[ProtectedDecision]`" },
|
|
15
15
|
{ "kind": "skill-contains", "value": "`Customizations/`" },
|
|
16
16
|
{ "kind": "skill-contains", "value": "`Stage__Runtime__Engine=semantic`" },
|
|
17
|
-
{ "kind": "skill-contains", "value": "`--engine semantic`" }
|
|
17
|
+
{ "kind": "skill-contains", "value": "`--engine semantic`" },
|
|
18
|
+
{ "kind": "skill-contains", "value": "Stage#177" },
|
|
19
|
+
{ "kind": "skill-contains", "value": "never carry event source type" }
|
|
18
20
|
]
|
|
19
21
|
}
|