diff --git a/Directory.Packages.props b/Directory.Packages.props
index 535f0dc5..c47439dd 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -7,7 +7,7 @@
0.18.0
4.87.0
- 4.36.0
+ 4.40.0
diff --git a/Documentation/reference/screenplay.md b/Documentation/reference/screenplay.md
index 859f83dc..d62676f6 100644
--- a/Documentation/reference/screenplay.md
+++ b/Documentation/reference/screenplay.md
@@ -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).
@@ -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 `
diff --git a/Source/Cli.Specs/for_CratisRenderTarget/when_planning_a_supported_application.cs b/Source/Cli.Specs/for_CratisRenderTarget/when_planning_a_supported_application.cs
index c153f2fa..50cdc273 100644
--- a/Source/Cli.Specs/for_CratisRenderTarget/when_planning_a_supported_application.cs
+++ b/Source/Cli.Specs/for_CratisRenderTarget/when_planning_a_supported_application.cs
@@ -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;
@@ -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()!.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() =>
diff --git a/Source/Cli.Specs/for_RunCommand/when_running/with_a_folder_and_the_default_stage_tag.cs b/Source/Cli.Specs/for_RunCommand/when_running/with_a_folder_and_the_default_stage_tag.cs
new file mode 100644
index 00000000..295791e8
--- /dev/null
+++ b/Source/Cli.Specs/for_RunCommand/when_running/with_a_folder_and_the_default_stage_tag.cs
@@ -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);
+}
diff --git a/Source/Cli.Specs/for_RunCommand/when_running/with_a_play_file_and_the_default_stage_tag.cs b/Source/Cli.Specs/for_RunCommand/when_running/with_a_play_file_and_the_default_stage_tag.cs
new file mode 100644
index 00000000..1e39271d
--- /dev/null
+++ b/Source/Cli.Specs/for_RunCommand/when_running/with_a_play_file_and_the_default_stage_tag.cs
@@ -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);
+}
diff --git a/Source/Cli.Specs/for_ScreenplayPlanning/when_rendering_implementation_attachments/with_inline_policy.cs b/Source/Cli.Specs/for_ScreenplayPlanning/when_rendering_implementation_attachments/with_inline_policy.cs
index 4bfae4d1..d1d355b7 100644
--- a/Source/Cli.Specs/for_ScreenplayPlanning/when_rendering_implementation_attachments/with_inline_policy.cs
+++ b/Source/Cli.Specs/for_ScreenplayPlanning/when_rendering_implementation_attachments/with_inline_policy.cs
@@ -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();
}
diff --git a/Source/Cli.Specs/for_StageContainer/when_resolving_the_default_tag.cs b/Source/Cli.Specs/for_StageContainer/when_resolving_the_default_tag.cs
index a004ffc1..de139792 100644
--- a/Source/Cli.Specs/for_StageContainer/when_resolving_the_default_tag.cs
+++ b/Source/Cli.Specs/for_StageContainer/when_resolving_the_default_tag.cs
@@ -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);
///