Repository navigation
Release v4.81.0
Summary
Policies can exclude callers with not, specifications reuse typed examples, screens offer one action that picks its command from the item's state, reactions can describe refused commands and redelivery, and models can be checked per module, feature or slice and for structural gaps. The MCP server gains a semantic diff of proposals and can open a model in another Git worktree.
Added
- Policy conditions accept
not <condition>, includingnot role "…",not claim … matches …and grouped conditions;notbinds tighter thanand, which binds tighter thanor. A claim comparison whose target is missing, null, an absent subject or not text is unknown,notkeeps it unknown, and a policy whose result is unknown denies access. Warning PLAY0546 flagsnotover a claim whose target can be absent or is not text. Negating a policy reference or an opaque predicate is refused. (#431) - Models that use
notselect ESM v7, which gains anotpolicy condition in this release; models without it keep their version, bytes and revision. Consumers that read v7 must admit the new condition kind, and older strict v7 readers reject it. (#431) - Declare
example <Name> : <Event|Command|ReadModel>once and use its name wherever that type goes ingiven,given readmodel,when,when append,thenandthen readmodel, overriding values with the step's indented lines or one inline assignment such asgiven AcmeInvoice total = 5000. Examples expand before binding, so the executable model is the same as writing the values out; a property missing from both the example and the step is reported at the step. Examples cannot state event source or stream lines; state those on the step. (#427) - MCP
find-fixturesshows effective fixture values with their origin (authored, example or override), examples appear in search, references and dependencies and can be renamed safely, and .NET embedders get expanded specifications with the same origins. Monaco and the VS Code extension complete examples and show effective values on hover; the Invoicing, Commerce and TimeTracking samples use them. (#427) - A screen can offer one action that runs one of several commands depending on the selected item:
action "<label>"with orderedwhen <condition> execute <Command>alternatives and an optionalotherwise hiddenorotherwise execute <Command>. The first alternative whose condition holds decides, a condition on a missing or null field does not match, and when none holds the fallback runs or the action is hidden, as it is when no item is selected. Running the selection needs renderer support. (#432) - A reaction's
invokescan declare what happens when the command is refused, with orderedon refusedbranches (optionallyby validation,by constraint [Name]orby authorization) thatacknowledgethe refusal or produce events using$refusal.reason,$refusal.constraintand$refusal.message; specifications can usewhen redelivered <Event> to <Reaction>andthen no events. These need a new executable model version and are refused when binding until it is admitted, so models using them do not run yet. (part of #433) - Check one module, feature or slice with
screenplay <root> --scope <Module>[.<Feature>[.<Slice>]]and the MCPdiagnosticsargumentscope: the whole application is still compiled once, the exit code and--warnaserrorapply to the scope and the declarations that directly reference it, and the whole application's status and affected scopes are always reported. (part of #428) - Check a model for structural gaps with
--check <name>[,<name>](or--check all) and the MCPdiagnosticsargumentchecks: conflicting screen data bindings, commands people cannot reach an input for, read-model fields without an origin, query parameters a view cannot hold, events nothing consumes and screens no navigation reaches. The checks are opt-in warnings, so--warnaserrorcan gate on them, and .NET embedders can run them withModelCompleteness.Check. (#429) - Review what a proposal means for the model with the MCP
read-proposalviewsemantic-diff: declarations added, removed, renamed or moved, changed members, contract-breaking event changes and whether a generation covers them, changed specification expectations, direct dependants and identity changes. Anything it cannot compare is marked incomplete rather than unchanged. (part of #387) - The Screenplay MCP server can open the model in another registered Git worktree of the same repository through
open-workspace, with that worktree's own identities, proposals and recovery; other folders, unregistered pointers, bare repositories, submodules and configuration it cannot read reliably are refused. (part of #430)
Changed
- An incomplete fixture in a specification reports PLAY0524 at the step for each missing required property instead of a generic binding error, assigning the same property twice in a step reports PLAY0519, and specification steps accept qualified type names. (#427)
- The standalone
screenplaytool exits2for missing paths, non-.playfiles, unknown flags and extra positional arguments, and when it cannot read the model. Remove unsupported flags and extra arguments from scripts, and treat exit code2as "could not run". (part of #428) - The TypeScript compiler reports invalid property mappings under a reaction's
invokesinstead of silently skipping them. (part of #433) - The Commerce, Invoicing, Library and TimeTracking samples reach each command's input screen through a click that carries the item's identity, and use an action's
navigate toonly for where to go after the command succeeds. (#429)