Skip to content

Release v3.21.0

Choose a tag to compare

@github-actions github-actions released this 28 Sep 08:50
05ab40e

Action required

  • Log in again if you used cratis chronicle login before this release. Earlier versions reported success but never saved the token (#118), so those contexts kept using the built-in development client. They still do, and each run now prints a one-line warning on stderr until you run cratis chronicle login again. A context without a login is unaffected.

Added

  • Cratis AI update hint. In a repository with the Cratis AI corpus installed (.cratis/ai.json and .cratis/ai.manifest.json), an interactive command may end with ↑ Cratis AI update available: 12 new commits since cc9c631 - run 'cratis ai update'. The hint appears only when the installed commit is behind the latest commit on Cratis/AI's default branch, so a corpus installed from a local checkout or another branch never triggers it. The answer is cached per installed commit next to the CLI version check and rechecked hourly. The hint is skipped when output is redirected, in AI agent environments and completions, while running ai install/ai update/ai uninstall, and when CRATIS_NO_UPDATE_CHECK is set (#197).
  • cratis render sends Screenplay's typed-context descriptors to Stage, so generated code can use typed contexts (#192).

Changed

  • The CLI now bundles Screenplay 4.43.0 and Stage 4.20.0, and cratis run defaults to the matching Stage image. Model authors get Screenplay's fixes up to 4.43, including given … for and when append … for in view slices, which previously failed with PLAY0273 (#193).
  • Chronicle login tokens only go to the server that issued them. cratis chronicle login saves the token, its expiry and the issuing server in the active context. Later commands send the token only when they connect to that exact server. If you log in with --server, the token is used when you pass the same --server again, and nowhere else. Login refuses multi-host and chronicle+srv:// connection strings, because the server that receives the token can't be determined in advance. It also no longer follows redirects, and it honours the connection string's TLS options instead of accepting any certificate.
  • All startup hints share one wait. The CLI, Stage image and Cratis AI hints get at most about 300 ms together after the command finishes, instead of up to 300 ms each. CRATIS_NO_UPDATE_CHECK now also skips the Stage image check's local Docker lookup.

Fixed

  • cratis chronicle login now saves the token (#118). Before, it reported "Logged in as …" but threw the token away, so every later command fell back to the development client and got 401 from any secured server. Login now fails with a clear error when the server returns no usable token. When a saved token expires, commands report an expired login instead of silently switching to the development client, unless the context has its own client credentials. Tokens and certificate passwords are hidden in --debug, diagnose and workbench output.
  • The CLI update hint names the version cratis update would install (#191). The "update available" answer was cached for a day, so a release published after the check went unannounced, and the hint said 3.19.0 while cratis update installed 3.20.0. The answer is now rechecked hourly. Failed checks back off for 15 minutes, or an hour when GitHub is rate-limiting. The startup checks no longer overwrite each other's entries in ~/.cratis/version-check.json.
  • cratis new --language kotlin and --language java scaffold the default cratis template without naming it (#195). The catalogue pointed at cratis-kotlin and cratis-java, but the published packages call the template cratis. When a template isn't available for the chosen language, the error now lists only that language's templates, and a template identity from another language is no longer silently swapped for this language's version. A custom template's tags.language must match --language, and untagged templates count as C#.

Not in this release

  • #172 (a [Flags] enum's zero member rendered as 0 by cratis screenplay) comes from Arc's Screenplay analysis and is tracked in Cratis/Arc#2839. The CLI picks up the fix when it moves to that Arc release.
  • Client (mTLS) certificates at login, and a notice when a context's server changes after login, are tracked in #198.

Closes #118
Closes #191
Closes #192
Closes #193
Closes #195
Closes #197