Skip to content

Release v4.81.0

Choose a tag to compare

@github-actions github-actions released this 08 Oct 06:36
32182ac

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>, including not role "…", not claim … matches … and grouped conditions; not binds tighter than and, which binds tighter than or. A claim comparison whose target is missing, null, an absent subject or not text is unknown, not keeps it unknown, and a policy whose result is unknown denies access. Warning PLAY0546 flags not over 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 not select ESM v7, which gains a not policy 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 in given, given readmodel, when, when append, then and then readmodel, overriding values with the step's indented lines or one inline assignment such as given 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-fixtures shows 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 ordered when <condition> execute <Command> alternatives and an optional otherwise hidden or otherwise 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 invokes can declare what happens when the command is refused, with ordered on refused branches (optionally by validation, by constraint [Name] or by authorization) that acknowledge the refusal or produce events using $refusal.reason, $refusal.constraint and $refusal.message; specifications can use when redelivered <Event> to <Reaction> and then 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 MCP diagnostics argument scope: the whole application is still compiled once, the exit code and --warnaserror apply 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 MCP diagnostics argument checks: 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 --warnaserror can gate on them, and .NET embedders can run them with ModelCompleteness.Check. (#429)
  • Review what a proposal means for the model with the MCP read-proposal view semantic-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 screenplay tool exits 2 for missing paths, non-.play files, unknown flags and extra positional arguments, and when it cannot read the model. Remove unsupported flags and extra arguments from scripts, and treat exit code 2 as "could not run". (part of #428)
  • The TypeScript compiler reports invalid property mappings under a reaction's invokes instead 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 to only for where to go after the command succeeds. (#429)