Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<CratisScreenplayGenerationVersion>0.18.0</CratisScreenplayGenerationVersion>
<ScreenplayVersion Condition="'$(ScreenplayVersion)' == ''">4.87.0</ScreenplayVersion>
<!-- The Stage packages the renderer uses and the Stage container 'cratis run' starts are the same release. -->
<StageVersion Condition="'$(StageVersion)' == ''">4.36.0</StageVersion>
<StageVersion Condition="'$(StageVersion)' == ''">4.40.0</StageVersion>
</PropertyGroup>
<ItemGroup>
<!-- Cratis -->
Expand Down
4 changes: 2 additions & 2 deletions Documentation/reference/screenplay.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cratis screenplay mcp [PATH]
cratis screenplay desktop install
```

The CLI bundles Screenplay 4.87.0 (including its MCP server), Stage 4.36.0, and the Arc source adapter 22.52.0. `cratis render` admits ESM v1 through v7, but the renderer still refuses unsupported constructs within those versions: reactions, captures, triggers and Automation/Translate slices report `STAGE-ESM-024`, and read-model absence assertions report `STAGE-ESM-027`. It also refuses an evolved event until Stage can render its event-type migrations. Validation rejects `numbers exact` and `implementation` attachments on concept, built-in, and whole-command rules.
The CLI bundles Screenplay 4.87.0 (including its MCP server), Stage 4.40.0, and the Arc source adapter 22.52.0. `cratis render` admits ESM v1 through v7, but the renderer still refuses unsupported constructs within those versions: reactions, captures, triggers and Automation/Translate slices report `STAGE-ESM-024`, and read-model absence assertions report `STAGE-ESM-027`. It also refuses an evolved event until Stage can render its event-type migrations. Validation rejects `numbers exact` and `implementation` attachments on concept, built-in, and whole-command rules.

For the embedded stdio server, the `visualize-model` MCP App, and native AI host registration, see [Screenplay MCP](screenplay-mcp.md). For Claude Desktop and ChatGPT Desktop installation, see [Screenplay desktop MCP](screenplay-desktop-mcp.md).

Expand All @@ -29,7 +29,7 @@ A newer bundled compiler can produce a newer executable semantic model (ESM) ver
| `cratis screenplay mcp` | Admitted for authoring and reading. The embedded server binds v7 models, pages their executable model (generated properties, responses, generation fixtures and return expectations) and reports execution readiness. Reference execution is not offered: neither the CLI nor the embedded server runs specifications. |
| `cratis render` | Admitted. Policy negation renders. Generated command values and command responses are refused by the renderer with `STAGE-ESM-028` and `STAGE-ESM-029`, respectively; see [Cratis/Stage#175](https://github.com/Cratis/Stage/issues/175). Stage refuses a specification whose unauthenticated caller carries roles or claims with `STAGE-ESM-011`; this includes the unchanged canonical negation example. A refusal leaves no publishable artifacts. Versions newer than v7 are still blocked by `CLI-RENDER-004`. |
| `cratis screenplay generate` | From Arc 22.52.0, the Arc adapter recovers supported generated UUID values and command responses by default for commands without successful scenarios. Output containing these constructs compiles to ESM v7, which `cratis render` admits, but the renderer refuses generated values with `STAGE-ESM-028` and responses with `STAGE-ESM-029`, even without `--authoring-only-constructs`; see [Cratis/Stage#175](https://github.com/Cratis/Stage/issues/175). Unsupported shapes and values needed by pre-generation protection remain in code with `SP0052`. Marten and Critter Stack retain their existing recovery surface. |
| `cratis run` | The Stage 4.36.0 container compiles the mounted `.play` files with its own Screenplay release, 4.81.5. A screen `action` with `when … execute` alternatives is refused by Stage with `STAGE-SCENE-ACTION-001` and likely prevents the container from starting. Passing `cratis screenplay validate` does not establish Stage support. |
| `cratis run` | The Stage 4.40.0 container compiles the mounted `.play` files with its own Screenplay release, 4.84.1. A screen `action` with `when … execute` alternatives is refused by Stage with `STAGE-SCENE-ACTION-001` and likely prevents the container from starting. Passing `cratis screenplay validate` does not establish Stage support. |

## `cratis render [PATH]` or `cratis render --workspace <FILE>`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Cratis. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Reflection;
using Cratis.Screenplay.Semantics;
using Cratis.Screenplay.Semantics.Execution;
using Cratis.Stage.Contracts.Rendering;
Expand Down Expand Up @@ -30,6 +31,8 @@ Task Because()
[Fact] void should_plan_the_exact_facade_target_version() => _result.TargetVersion.ShouldEqual(_expected.TargetVersion);
[Fact] void should_plan_the_exact_facade_renderer() => _result.Renderer.ShouldEqual(_expected.Renderer);
[Fact] void should_plan_the_exact_facade_renderer_version() => _result.RendererVersion.ShouldEqual(_expected.RendererVersion);
[Fact] void should_load_the_released_stage_440_renderer_package() =>
typeof(CratisRendering).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()!.InformationalVersion.Split('+')[0].ShouldEqual("4.40.0");
[Fact] void should_plan_the_same_application_name() => _result.ApplicationName.ShouldEqual(_expected.ApplicationName);
[Fact] void should_plan_the_same_semantic_revision() => _result.SemanticRevision.ShouldEqual(_expected.SemanticRevision);
[Fact] void should_plan_the_exact_facade_artifacts() =>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright (c) Cratis. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace Cratis.Cli.for_RunCommand.when_running;

[Collection(CliSpecsCollection.Name)]
public class with_a_folder_and_the_default_stage_tag : given.a_run_command
{
int _result;

void Establish() => File.WriteAllText(Path.Combine(Directory.CreateDirectory(Path.Combine(_folder, "features")).FullName, "invoicing.play"), "domain Invoicing\n");

async Task Because() => _result = await Run(_folder, "--port", "9191", "--workbench-port", "35001");

[Unix.Fact] void should_start_the_released_stage_image_that_matches_the_renderer_packages() =>
DockerArguments.ShouldContain($"cratis/stage:{StageContainer.DefaultTag}");

[Unix.Fact] void should_run_stage_440_by_default() =>
DockerArguments.ShouldContain("cratis/stage:4.40.0");

[Unix.Fact] void should_mount_only_the_selected_folder_read_only() =>
DockerArguments.ShouldContain($"{_folder}:/eventmodel:ro");

[Unix.Fact] void should_report_that_the_container_stopped_before_it_was_ready() => _result.ShouldEqual(ExitCodes.ServerError);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Copyright (c) Cratis. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace Cratis.Cli.for_RunCommand.when_running;

[Collection(CliSpecsCollection.Name)]
public class with_a_play_file_and_the_default_stage_tag : given.a_run_command
{
string _path;
int _result;

void Establish()
{
_path = Path.Combine(_folder, "invoicing.play");
File.WriteAllText(_path, "domain Invoicing\n");
}

async Task Because() => _result = await Run(_path, "--port", "9191", "--workbench-port", "35001");

[Unix.Fact] void should_start_the_released_stage_image_that_matches_the_renderer_packages() =>
DockerArguments.ShouldContain($"cratis/stage:{StageContainer.DefaultTag}");

[Unix.Fact] void should_run_stage_440_by_default() =>
DockerArguments.ShouldContain("cratis/stage:4.40.0");

[Unix.Fact] void should_mount_only_the_selected_file_read_only() =>
DockerArguments.ShouldContain($"{_path}:/eventmodel/input.play:ro");

[Unix.Fact] void should_report_that_the_container_stopped_before_it_was_ready() => _result.ShouldEqual(ExitCodes.ServerError);
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ public class with_inline_policy : given.a_model_root
void Establish() => WriteSource(PolicySource);
async Task Because() => _result = await _planning.Plan(new(_path, "Orders", "cratis"), CancellationToken.None);

[Fact] void should_report_the_precise_v3_rejection() => _result.Diagnostics.Select(_ => _.Code).ShouldContain("STAGE-ESM-015");
[Fact] void should_report_the_parser_rejection_before_stage_blocks_publication() => _result.Diagnostics.Select(_ => _.Code).ShouldContain("PLAY0478");
[Fact] void should_report_the_stage_publication_blocker() => _result.Diagnostics.Select(_ => _.Code).ShouldContain("STAGE-ESM-006");
[Fact] void should_not_report_a_missing_body() => _result.Diagnostics.Select(_ => _.Code).ShouldNotContain("STAGE-ESM-020");
[Fact] void should_not_publish_artifacts() => _result.Artifacts!.Artifacts.ShouldBeEmpty();
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ void Establish() => _renderer = typeof(ArtifactRenderPlan).Assembly

[Fact] void should_run_the_stage_the_renderer_came_from() => _tag.ShouldEqual(_renderer);

[Fact] void should_run_the_released_stage_440_image() => _tag.ShouldEqual("4.40.0");

[Fact] void should_not_run_a_moving_tag() => _tag.ShouldNotEqual(StageContainer.FallbackTag);

/// <summary>
Expand Down
Loading