@cratis/pi 8.17.0 → 8.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,15 +18,17 @@ builder.AddCratisChronicle(options =>
18
18
  options.EventStore = "dispatch";
19
19
  options.UseAutomaticMiddleware = false;
20
20
  });
21
- builder.Services.AddChronicleHealthCheck();
22
21
  var app = builder.Build();
23
22
  app.UseRouting();
24
23
  // In an authenticated app, place authentication and authorization here.
25
24
  app.UseCratisChronicle();
26
- app.MapHealthChecks("/ready");
25
+ app.MapHealthChecks("/health/live", new() { Predicate = _ => false });
26
+ app.MapHealthChecks("/health/ready", new() { Predicate = check => check.Tags.Contains("ready") });
27
27
  await app.RunAsync();
28
28
  ```
29
29
 
30
+ `AddCratisChronicle` already registers the `chronicle` health check with the tags `chronicle` and `ready`; do not register it again. Map it only into readiness: a host that cannot reach the kernel stays alive but does not serve, and restarting it does not bring the kernel back. A `MapHealthChecks` without a predicate runs every check, so set one on both endpoints. To report `Degraded` instead of `Unhealthy`, call `builder.Services.AddChronicleHealthCheck(HealthStatus.Degraded)` before `AddCratisChronicle`; the first registration wins and a later call does nothing.
31
+
30
32
  Use explicit placement when identity or tenant resolution depends on earlier middleware. Otherwise leave automatic middleware enabled and still call `UseCratisChronicle()` for host setup. Set `options.UnitOfWork.ReportFailuresBeforeResponseStarts = true` when request completion failures must affect the response. For an integrated Arc host use `cratis-arc-host-application` instead of registering Chronicle twice. For a generic worker use `Host.CreateApplicationBuilder(args)` and `builder.AddCratisChronicle(o => o.EventStore = "dispatch")`; there is no HTTP middleware.
31
33
 
32
34
  ## Select a partition and prove readiness
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "8.17.0",
3
+ "version": "8.17.1",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [