@cratis/pi 8.4.1 → 8.6.0

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.
Files changed (286) hide show
  1. package/package/corpus/harnesses/copilot/instructions/ai-distribution.instructions.md +2 -1
  2. package/package/corpus/harnesses/copilot/instructions/exit-codes-and-wrappers.instructions.md +1 -1
  3. package/package/corpus/harnesses/copilot/instructions/glossary.instructions.md +5 -3
  4. package/package/corpus/harnesses/copilot/instructions/react.instructions.md +3 -1
  5. package/package/corpus/harnesses/copilot/instructions/reactors.instructions.md +3 -1
  6. package/package/corpus/harnesses/copilot/instructions/scripting.instructions.md +2 -1
  7. package/package/corpus/harnesses/copilot/instructions/specs.csharp.instructions.md +6 -3
  8. package/package/corpus/harnesses/copilot/instructions/vertical-slices.instructions.md +5 -2
  9. package/package/corpus/hooks/scripts/cratis-guard-secrets.sh +131 -9
  10. package/package/corpus/rules/ai-distribution.md +2 -1
  11. package/package/corpus/rules/exit-codes-and-wrappers.md +1 -1
  12. package/package/corpus/rules/glossary.md +5 -3
  13. package/package/corpus/rules/react.md +3 -1
  14. package/package/corpus/rules/reactors.md +3 -1
  15. package/package/corpus/rules/scripting.md +2 -1
  16. package/package/corpus/rules/specs.csharp.md +6 -3
  17. package/package/corpus/rules/vertical-slices.md +5 -2
  18. package/package/corpus/skills/cratis-application-growth/SKILL.md +1 -2
  19. package/package/corpus/skills/cratis-application-growth/references/csharp.md +1 -3
  20. package/package/corpus/skills/cratis-application-growth/references/move-and-untangle.md +1 -2
  21. package/package/corpus/skills/cratis-application-growth/references/rename-window.md +1 -3
  22. package/package/corpus/skills/cratis-application-growth/references/service-and-delivery.md +3 -2
  23. package/package/corpus/skills/cratis-application-growth/references/stages.md +2 -2
  24. package/package/corpus/skills/cratis-arc-authorize-request/SKILL.md +3 -3
  25. package/package/corpus/skills/cratis-arc-authorize-request/references/authproxy.md +47 -3
  26. package/package/corpus/skills/cratis-arc-authorize-request/references/csharp-query-security.md +18 -3
  27. package/package/corpus/skills/cratis-arc-authorize-request/references/csharp.md +12 -3
  28. package/package/corpus/skills/cratis-arc-authorize-request/references/typescript.md +2 -0
  29. package/package/corpus/skills/cratis-arc-connect-storage/references/csharp.md +1 -0
  30. package/package/corpus/skills/cratis-arc-connect-storage/references/elixir.md +9 -2
  31. package/package/corpus/skills/cratis-arc-declare-command/SKILL.md +2 -0
  32. package/package/corpus/skills/cratis-arc-declare-command/references/csharp-chronicle.md +47 -8
  33. package/package/corpus/skills/cratis-arc-declare-command/references/csharp-controller.md +3 -1
  34. package/package/corpus/skills/cratis-arc-declare-command/references/csharp-history.md +6 -3
  35. package/package/corpus/skills/cratis-arc-declare-command/references/csharp.md +38 -11
  36. package/package/corpus/skills/cratis-arc-declare-command/references/go.md +1 -1
  37. package/package/corpus/skills/cratis-arc-declare-operation/references/csharp-abilities.md +2 -2
  38. package/package/corpus/skills/cratis-arc-declare-operation/references/csharp-recovery.md +6 -4
  39. package/package/corpus/skills/cratis-arc-declare-operation/references/csharp.md +2 -2
  40. package/package/corpus/skills/cratis-arc-diagnose-live-query/SKILL.md +1 -1
  41. package/package/corpus/skills/cratis-arc-diagnose-live-query/references/csharp.md +29 -7
  42. package/package/corpus/skills/cratis-arc-diagnose-live-query/references/java.md +1 -1
  43. package/package/corpus/skills/cratis-arc-diagnose-live-query/references/kotlin.md +1 -1
  44. package/package/corpus/skills/cratis-arc-expose-mcp-operation/references/csharp-diagnose-tool-call.md +9 -7
  45. package/package/corpus/skills/cratis-arc-expose-mcp-operation/references/csharp.md +52 -1
  46. package/package/corpus/skills/cratis-arc-expose-query/SKILL.md +4 -2
  47. package/package/corpus/skills/cratis-arc-expose-query/references/csharp.md +36 -10
  48. package/package/corpus/skills/cratis-arc-expose-query/references/go.md +2 -2
  49. package/package/corpus/skills/cratis-arc-expose-query/references/typescript.md +6 -3
  50. package/package/corpus/skills/cratis-arc-generate-proxies/SKILL.md +1 -0
  51. package/package/corpus/skills/cratis-arc-generate-proxies/references/csharp.md +55 -6
  52. package/package/corpus/skills/cratis-arc-generate-proxies/references/typescript.md +9 -0
  53. package/package/corpus/skills/cratis-arc-host-application/SKILL.md +1 -1
  54. package/package/corpus/skills/cratis-arc-host-application/references/csharp-configuration.md +54 -0
  55. package/package/corpus/skills/cratis-arc-host-application/references/csharp-deployment.md +98 -0
  56. package/package/corpus/skills/cratis-arc-host-application/references/csharp-http.md +9 -1
  57. package/package/corpus/skills/cratis-arc-host-application/references/csharp-identity.md +87 -4
  58. package/package/corpus/skills/cratis-arc-host-application/references/csharp.md +9 -0
  59. package/package/corpus/skills/cratis-arc-invoke-command/references/csharp-extensions.md +4 -0
  60. package/package/corpus/skills/cratis-arc-invoke-command/references/csharp.md +2 -1
  61. package/package/corpus/skills/cratis-arc-isolate-tenant/SKILL.md +19 -2
  62. package/package/corpus/skills/cratis-arc-isolate-tenant/references/csharp.md +4 -2
  63. package/package/corpus/skills/cratis-arc-page-query/references/csharp.md +2 -0
  64. package/package/corpus/skills/cratis-arc-react-bind-slice/SKILL.md +33 -36
  65. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-commands.md +18 -3
  66. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-host.md +94 -19
  67. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-identity.md +29 -5
  68. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-instant-feedback.md +81 -0
  69. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-localization.md +80 -0
  70. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-navigation.md +103 -0
  71. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-queries.md +41 -2
  72. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-structure.md +117 -0
  73. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript.md +8 -4
  74. package/package/corpus/skills/cratis-arc-react-separate-view-model/SKILL.md +3 -3
  75. package/package/corpus/skills/cratis-arc-react-separate-view-model/references/typescript.md +27 -6
  76. package/package/corpus/skills/cratis-arc-testing-typescript/references/typescript.md +2 -2
  77. package/package/corpus/skills/cratis-arc-validate-command/references/csharp-rules.md +23 -2
  78. package/package/corpus/skills/cratis-arc-validate-command/references/csharp.md +28 -2
  79. package/package/corpus/skills/cratis-arc-validation-typescript/SKILL.md +1 -0
  80. package/package/corpus/skills/cratis-authproxy-configure/SKILL.md +136 -0
  81. package/package/corpus/skills/cratis-authproxy-configure/references/admission.md +125 -0
  82. package/package/corpus/skills/cratis-authproxy-configure/references/aspire.md +154 -0
  83. package/package/corpus/skills/cratis-authproxy-configure/references/operations.md +122 -0
  84. package/package/corpus/skills/cratis-authproxy-configure/references/services-and-routing.md +114 -0
  85. package/package/corpus/skills/cratis-authproxy-configure/references/sessions-and-logout.md +126 -0
  86. package/package/corpus/skills/cratis-authproxy-configure/references/sign-in-providers.md +116 -0
  87. package/package/corpus/skills/cratis-authproxy-configure/references/tenant-resolution.md +135 -0
  88. package/package/corpus/skills/cratis-choreography-run-workflow/SKILL.md +117 -0
  89. package/package/corpus/skills/cratis-choreography-run-workflow/references/csharp-chronicle.md +164 -0
  90. package/package/corpus/skills/cratis-choreography-run-workflow/references/csharp.md +354 -0
  91. package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +6 -6
  92. package/package/corpus/skills/cratis-chronicle-cli-operations/references/inspection.md +11 -3
  93. package/package/corpus/skills/cratis-chronicle-cli-operations/references/project-tooling.md +50 -0
  94. package/package/corpus/skills/cratis-chronicle-cli-operations/references/recovery-and-comparison.md +17 -3
  95. package/package/corpus/skills/cratis-chronicle-cli-operations/references/setup-and-target.md +8 -2
  96. package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp-services.md +13 -2
  97. package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp.md +12 -0
  98. package/package/corpus/skills/cratis-chronicle-connect-application/references/kotlin.md +2 -0
  99. package/package/corpus/skills/cratis-chronicle-connect-application/references/python.md +2 -2
  100. package/package/corpus/skills/cratis-chronicle-connect-application/references/typescript.md +10 -1
  101. package/package/corpus/skills/cratis-chronicle-constrain-append/SKILL.md +9 -2
  102. package/package/corpus/skills/cratis-chronicle-constrain-append/references/csharp.md +35 -3
  103. package/package/corpus/skills/cratis-chronicle-constrain-append/references/go.md +1 -1
  104. package/package/corpus/skills/cratis-chronicle-constrain-append/references/operations.md +70 -0
  105. package/package/corpus/skills/cratis-chronicle-deploy-kernel/SKILL.md +6 -3
  106. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/configuration.md +113 -16
  107. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/container-and-kubernetes.md +293 -0
  108. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/kernel-options.md +16 -9
  109. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/network-and-tls.md +60 -7
  110. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/storage.md +124 -2
  111. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/upgrade-and-recovery.md +36 -1
  112. package/package/corpus/skills/cratis-chronicle-evolve-event/SKILL.md +12 -0
  113. package/package/corpus/skills/cratis-chronicle-evolve-event/references/csharp.md +2 -2
  114. package/package/corpus/skills/cratis-chronicle-inspect-observer/SKILL.md +15 -5
  115. package/package/corpus/skills/cratis-chronicle-inspect-observer/references/csharp.md +9 -8
  116. package/package/corpus/skills/cratis-chronicle-inspect-observer/references/go.md +2 -2
  117. package/package/corpus/skills/cratis-chronicle-mcp-inspection/SKILL.md +1 -1
  118. package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/deployment.md +1 -1
  119. package/package/corpus/skills/cratis-chronicle-project-view/SKILL.md +2 -2
  120. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp-fluent.md +15 -4
  121. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp-model-bound.md +4 -1
  122. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp-reading.md +5 -2
  123. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp.md +23 -0
  124. package/package/corpus/skills/cratis-chronicle-project-view/references/elixir.md +1 -0
  125. package/package/corpus/skills/cratis-chronicle-project-view/references/go.md +2 -1
  126. package/package/corpus/skills/cratis-chronicle-project-view/references/java.md +3 -1
  127. package/package/corpus/skills/cratis-chronicle-project-view/references/kotlin.md +4 -3
  128. package/package/corpus/skills/cratis-chronicle-project-view/references/typescript.md +3 -1
  129. package/package/corpus/skills/cratis-chronicle-protect-decision/SKILL.md +3 -1
  130. package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp-scopes.md +41 -4
  131. package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp.md +22 -4
  132. package/package/corpus/skills/cratis-chronicle-protect-decision/references/elixir.md +7 -0
  133. package/package/corpus/skills/cratis-chronicle-protect-decision/references/go.md +9 -1
  134. package/package/corpus/skills/cratis-chronicle-protect-decision/references/java.md +8 -0
  135. package/package/corpus/skills/cratis-chronicle-protect-decision/references/kotlin.md +9 -0
  136. package/package/corpus/skills/cratis-chronicle-protect-decision/references/typescript.md +7 -0
  137. package/package/corpus/skills/cratis-chronicle-protect-personal-data/SKILL.md +1 -1
  138. package/package/corpus/skills/cratis-chronicle-protect-personal-data/references/csharp.md +28 -3
  139. package/package/corpus/skills/cratis-chronicle-publish-contract/SKILL.md +7 -6
  140. package/package/corpus/skills/cratis-chronicle-publish-contract/references/csharp.md +41 -0
  141. package/package/corpus/skills/cratis-chronicle-publish-contract/references/elixir-integrations.md +3 -3
  142. package/package/corpus/skills/cratis-chronicle-publish-contract/references/webhook-signature-wire-format.md +82 -0
  143. package/package/corpus/skills/cratis-chronicle-react-to-fact/SKILL.md +19 -1
  144. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp-outputs.md +3 -1
  145. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp-pages.md +1 -1
  146. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp.md +37 -4
  147. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/elixir.md +11 -0
  148. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/java.md +2 -1
  149. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/kotlin.md +1 -0
  150. package/package/corpus/skills/cratis-chronicle-record-event/SKILL.md +3 -3
  151. package/package/corpus/skills/cratis-chronicle-record-event/references/csharp-coordination.md +31 -2
  152. package/package/corpus/skills/cratis-chronicle-record-event/references/csharp-history.md +21 -4
  153. package/package/corpus/skills/cratis-chronicle-record-event/references/csharp.md +20 -2
  154. package/package/corpus/skills/cratis-chronicle-record-event/references/go.md +1 -1
  155. package/package/corpus/skills/cratis-chronicle-record-event/references/java.md +1 -1
  156. package/package/corpus/skills/cratis-chronicle-record-event/references/kotlin.md +3 -0
  157. package/package/corpus/skills/cratis-chronicle-reduce-state/SKILL.md +2 -1
  158. package/package/corpus/skills/cratis-chronicle-reduce-state/references/csharp.md +3 -1
  159. package/package/corpus/skills/cratis-chronicle-reduce-state/references/java.md +10 -1
  160. package/package/corpus/skills/cratis-chronicle-reduce-state/references/kotlin.md +10 -1
  161. package/package/corpus/skills/cratis-chronicle-reduce-state/references/typescript.md +27 -5
  162. package/package/corpus/skills/cratis-chronicle-select-client/SKILL.md +18 -0
  163. package/package/corpus/skills/cratis-chronicle-select-client/references/elixir.md +21 -1
  164. package/package/corpus/skills/cratis-chronicle-select-client/references/go.md +13 -0
  165. package/package/corpus/skills/cratis-chronicle-select-client/references/java.md +15 -0
  166. package/package/corpus/skills/cratis-chronicle-select-client/references/kotlin.md +15 -0
  167. package/package/corpus/skills/cratis-chronicle-select-client/references/typescript.md +16 -0
  168. package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +1 -1
  169. package/package/corpus/skills/cratis-ci-pipeline-performance/SKILL.md +4 -3
  170. package/package/corpus/skills/cratis-ci-pipeline-performance/references/publish-pipelines.md +19 -4
  171. package/package/corpus/skills/cratis-code-review/SKILL.md +6 -2
  172. package/package/corpus/skills/cratis-code-review/references/csharp-diagnostics.md +28 -2
  173. package/package/corpus/skills/cratis-code-review/references/csharp.md +4 -4
  174. package/package/corpus/skills/cratis-commits-and-pull-requests/SKILL.md +6 -38
  175. package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-description.md +2 -0
  176. package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-labels-and-release.md +5 -4
  177. package/package/corpus/skills/cratis-commits-and-pull-requests/references/workflow-inputs.md +39 -0
  178. package/package/corpus/skills/cratis-components-accessibility/SKILL.md +6 -8
  179. package/package/corpus/skills/cratis-components-accessibility/references/typescript.md +32 -14
  180. package/package/corpus/skills/cratis-components-build-canvas/SKILL.md +4 -3
  181. package/package/corpus/skills/cratis-components-build-canvas/references/typescript-props.md +1 -1
  182. package/package/corpus/skills/cratis-components-build-canvas/references/typescript.md +4 -2
  183. package/package/corpus/skills/cratis-components-choose-control/SKILL.md +13 -7
  184. package/package/corpus/skills/cratis-components-choose-control/references/from-primereact.md +116 -0
  185. package/package/corpus/skills/cratis-components-choose-control/references/menu.md +90 -0
  186. package/package/corpus/skills/cratis-components-choose-control/references/typescript-composition.md +48 -0
  187. package/package/corpus/skills/cratis-components-choose-control/references/typescript.md +2 -2
  188. package/package/corpus/skills/cratis-components-compose-toolbar/SKILL.md +2 -1
  189. package/package/corpus/skills/cratis-components-compose-toolbar/references/floating-toolbar.md +146 -0
  190. package/package/corpus/skills/cratis-components-diagnose-screen/SKILL.md +102 -0
  191. package/package/corpus/skills/cratis-components-display-list/SKILL.md +10 -10
  192. package/package/corpus/skills/cratis-components-display-list/references/typescript-custom-panel.md +74 -0
  193. package/package/corpus/skills/cratis-components-display-list/references/typescript-datatables.md +2 -7
  194. package/package/corpus/skills/cratis-components-display-list/references/typescript.md +3 -2
  195. package/package/corpus/skills/cratis-components-submit-form/SKILL.md +6 -6
  196. package/package/corpus/skills/cratis-components-submit-form/references/typescript-commanddialog.md +21 -1
  197. package/package/corpus/skills/cratis-components-submit-form/references/typescript-commandform.md +72 -2
  198. package/package/corpus/skills/cratis-components-submit-form/references/typescript.md +7 -5
  199. package/package/corpus/skills/cratis-components-theme-application/SKILL.md +17 -15
  200. package/package/corpus/skills/cratis-components-theme-application/references/localization.md +166 -0
  201. package/package/corpus/skills/cratis-components-theme-application/references/typescript.md +18 -14
  202. package/package/corpus/skills/cratis-components-theme-application/references/upgrade-from-previous-major.md +141 -0
  203. package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +2 -0
  204. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/csharp-domain-philosophy.md +31 -3
  205. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/csharp-fundamentals-helpers.md +119 -0
  206. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/csharp.md +4 -0
  207. package/package/corpus/skills/cratis-fundamentals-concept/references/csharp-serialization.md +72 -1
  208. package/package/corpus/skills/cratis-fundamentals-concept/references/csharp.md +9 -0
  209. package/package/corpus/skills/cratis-fundamentals-concept/references/go.md +2 -1
  210. package/package/corpus/skills/cratis-fundamentals-concept/references/java-json.md +3 -2
  211. package/package/corpus/skills/cratis-fundamentals-concept/references/kotlin-json.md +3 -2
  212. package/package/corpus/skills/cratis-fundamentals-concept/references/typescript-serialization.md +41 -2
  213. package/package/corpus/skills/cratis-fundamentals-name-value/SKILL.md +8 -7
  214. package/package/corpus/skills/cratis-fundamentals-name-value/references/csharp.md +2 -1
  215. package/package/corpus/skills/cratis-fundamentals-type-discovery/SKILL.md +3 -3
  216. package/package/corpus/skills/cratis-fundamentals-type-discovery/references/csharp-diagnostics.md +8 -0
  217. package/package/corpus/skills/cratis-fundamentals-type-discovery/references/csharp.md +2 -2
  218. package/package/corpus/skills/cratis-fundamentals-type-discovery/references/go-dependency-injection.md +3 -0
  219. package/package/corpus/skills/cratis-modeling-design-event-model/SKILL.md +6 -4
  220. package/package/corpus/skills/cratis-modeling-design-event-model/references/command-inventory.md +7 -1
  221. package/package/corpus/skills/cratis-modeling-design-event-model/references/model-first.md +13 -1
  222. package/package/corpus/skills/cratis-modeling-design-event-model/references/review-one-slice.md +6 -0
  223. package/package/corpus/skills/cratis-multi-service-local-orchestration/SKILL.md +6 -6
  224. package/package/corpus/skills/cratis-multi-service-local-orchestration/references/csharp-aspire.md +116 -28
  225. package/package/corpus/skills/cratis-multi-service-local-orchestration/references/docker-compose.md +2 -2
  226. package/package/corpus/skills/cratis-observability/references/chronicle-kernel-export.md +46 -0
  227. package/package/corpus/skills/cratis-orleans-jobs/SKILL.md +4 -2
  228. package/package/corpus/skills/cratis-platform-build-application/SKILL.md +8 -0
  229. package/package/corpus/skills/cratis-platform-build-application/references/cratis-identity.md +71 -0
  230. package/package/corpus/skills/cratis-platform-build-application/references/studio-repository.md +96 -0
  231. package/package/corpus/skills/cratis-platform-deliver-slice/SKILL.md +14 -8
  232. package/package/corpus/skills/cratis-platform-deliver-slice/references/csharp.md +167 -3
  233. package/package/corpus/skills/cratis-platform-deliver-slice/references/eventual-consistency.md +150 -0
  234. package/package/corpus/skills/cratis-platform-deliver-slice/references/typescript.md +14 -1
  235. package/package/corpus/skills/cratis-platform-diagnose-slice/SKILL.md +1 -1
  236. package/package/corpus/skills/cratis-platform-prepare-release-pr/SKILL.md +8 -8
  237. package/package/corpus/skills/cratis-platform-prepare-release-pr/references/product-release-checks.md +16 -2
  238. package/package/corpus/skills/cratis-platform-start-application/SKILL.md +21 -0
  239. package/package/corpus/skills/cratis-platform-start-application/references/csharp.md +77 -3
  240. package/package/corpus/skills/cratis-platform-upgrade-application/SKILL.md +118 -0
  241. package/package/corpus/skills/cratis-platform-upgrade-application/references/csharp.md +117 -0
  242. package/package/corpus/skills/cratis-platform-upgrade-application/references/java.md +53 -0
  243. package/package/corpus/skills/cratis-platform-upgrade-application/references/kotlin.md +53 -0
  244. package/package/corpus/skills/cratis-platform-upgrade-application/references/typescript.md +71 -0
  245. package/package/corpus/skills/cratis-release-notes/SKILL.md +1 -1
  246. package/package/corpus/skills/cratis-release-notes/references/publish-repair.md +6 -3
  247. package/package/corpus/skills/cratis-screenplay-accept-model/references/csharp.md +34 -3
  248. package/package/corpus/skills/cratis-screenplay-accept-model/references/read-the-evidence.md +84 -3
  249. package/package/corpus/skills/cratis-screenplay-declare-slice/SKILL.md +7 -11
  250. package/package/corpus/skills/cratis-screenplay-declare-slice/references/commands.md +8 -4
  251. package/package/corpus/skills/cratis-screenplay-declare-slice/references/projections.md +2 -0
  252. package/package/corpus/skills/cratis-screenplay-declare-slice/references/structure-and-imports.md +29 -1
  253. package/package/corpus/skills/cratis-screenplay-edit-workspace/SKILL.md +2 -1
  254. package/package/corpus/skills/cratis-screenplay-edit-workspace/references/mcp-tools.md +1 -1
  255. package/package/corpus/skills/cratis-screenplay-handoff-slice/references/csharp.md +13 -1
  256. package/package/corpus/skills/cratis-screenplay-model-translation/SKILL.md +1 -1
  257. package/package/corpus/skills/cratis-screenplay-model-translation/references/boundary-diagnostics.md +1 -1
  258. package/package/corpus/skills/cratis-screenplay-onboard-workspace/SKILL.md +30 -51
  259. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/cli.md +19 -2
  260. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/smallest-model.md +87 -0
  261. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/studio.md +5 -0
  262. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/typescript.md +13 -0
  263. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/workspace-mcp.md +5 -0
  264. package/package/corpus/skills/cratis-screenplay-specify-outcome/SKILL.md +8 -12
  265. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/running-mcp.md +12 -0
  266. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/scenarios.md +2 -2
  267. package/package/corpus/skills/cratis-specifications-exercise-backend/SKILL.md +2 -0
  268. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-colocated.md +101 -0
  269. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-command-results.md +4 -2
  270. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-decision-reads.md +1 -0
  271. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-events.md +7 -0
  272. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-integration.md +7 -4
  273. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-reactors.md +18 -5
  274. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-read-models.md +4 -2
  275. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp.md +35 -2
  276. package/package/corpus/skills/cratis-specifications-exercise-backend/references/elixir.md +2 -0
  277. package/package/corpus/skills/cratis-specifications-exercise-backend/references/typescript.md +4 -2
  278. package/package/corpus/skills/cratis-specifications-isolate-behavior/SKILL.md +1 -1
  279. package/package/corpus/skills/cratis-specifications-isolate-behavior/references/csharp-running.md +10 -3
  280. package/package/corpus/skills/cratis-specifications-test-application-ui/references/typescript.md +22 -4
  281. package/package/corpus/skills/cratis-specifications-test-typescript-behavior/SKILL.md +2 -1
  282. package/package/corpus/skills/cratis-specifications-test-typescript-behavior/references/typescript.md +40 -0
  283. package/package/corpus/skills/cratis-stage-render-slice/SKILL.md +6 -0
  284. package/package/corpus/skills/cratis-stage-render-slice/references/semantic-conformance.md +64 -0
  285. package/package/profile-catalog.json +15 -0
  286. package/package.json +1 -1
@@ -0,0 +1,354 @@
1
+ # Workflows in C#
2
+
3
+ ## Contents
4
+
5
+ - Packages
6
+ - Define the graph
7
+ - Node configuration
8
+ - Outlets and failures
9
+ - Perform a capability
10
+ - Send a command from a node
11
+ - Supply the definition
12
+ - Host the engine
13
+ - Start a run
14
+ - Follow, approve and cancel a run
15
+ - Scopes and tenants
16
+ - Test a workflow
17
+
18
+ Choreography is for Cratis's own Orleans-based services; an application does not use it. Names such as `OrderWorkflows`, `ReserveStock`, `Ship`, `IStockService` and `ITenantCatalog` are illustrative.
19
+
20
+ ## Packages
21
+
22
+ | You need | Package |
23
+ | --- | --- |
24
+ | The engine, performers, definitions, hosting | `Cratis.Choreography` |
25
+ | The journal in Chronicle, event triggers, schedules, signals | add `Cratis.Choreography.Chronicle` |
26
+ | A node that executes an Arc command through `Execute<TCommand>` | add `Cratis.Choreography.Arc` |
27
+
28
+ Namespaces are `Cratis.Choreography.Workflows` and its children `Graphs`, `Adapters`, `Definitions`, `Contracts`, `Triggers`, `Runs` and `Waits`; hosting is in `Cratis.Choreography.Hosting`.
29
+
30
+ ## Define the graph
31
+
32
+ A `WorkflowGraph` is a list of nodes and a list of edges. A node is `WorkflowNode(Id, Kind, Capability, Configuration, Outlets, Policy)`; an edge is `WorkflowEdge(From, Outlet, To)`. The outlets are the ones you declare; the engine does not derive them from the kind.
33
+
34
+ ```csharp
35
+ using Cratis.Choreography.Workflows.Graphs;
36
+
37
+ var retrying = new WorkflowNodePolicy(
38
+ MaxAttempts: 3,
39
+ AttemptTimeout: TimeSpan.FromMinutes(1),
40
+ RetryDelay: TimeSpan.FromSeconds(10),
41
+ MaxVisits: 1);
42
+
43
+ var graph = new WorkflowGraph(
44
+ [
45
+ new("start", WorkflowNodeKind.Trigger, new("manual", 1), WorkflowNodeConfiguration.Empty, ["next"], WorkflowNodePolicy.Default),
46
+ new("reserve", WorkflowNodeKind.Action, new("orders.reserve-stock", 1), WorkflowNodeConfiguration.Empty, ["next", "failed"], retrying),
47
+ new("review", WorkflowNodeKind.Approval, new("engine.approval", 1),
48
+ """{"expiresAfter":"2.00:00:00"}""", ["approved", "rejected", "expired"], WorkflowNodePolicy.Default),
49
+ new("ship", WorkflowNodeKind.Action, new("orders.ship", 1), WorkflowNodeConfiguration.Empty, ["next"], retrying),
50
+ new("release", WorkflowNodeKind.Action, new("orders.release-stock", 1), WorkflowNodeConfiguration.Empty, ["next"], retrying)
51
+ ],
52
+ [
53
+ new("start", "next", "reserve"),
54
+ new("reserve", "next", "review"),
55
+ new("review", "approved", "ship"),
56
+ new("review", "rejected", "release"),
57
+ new("review", "expired", "release")
58
+ ]);
59
+ ```
60
+
61
+ - The capability of a `Trigger`, `Wait`, `Approval`, `ForEach` or `Join` node is never looked up; give it a descriptive name. Only `Action` and `Decision` capabilities need a performer.
62
+ - `WorkflowNodePolicy.Default` is one attempt of at most ten minutes, a 30 second retry delay and one visit.
63
+ - A node on a cycle needs `MaxVisits` above 1, or the graph is refused.
64
+ - A run is admitted only when the graph is sound. It is refused for: no trigger, more than one trigger, a duplicate node, an edge to an unknown node, an edge through an undeclared outlet, a `ForEach` without exactly one `Join`, a nested `ForEach`, an unbounded cycle, or a `Wait`, `ForEach` or `Join` node whose configuration cannot be read as that kind's. The configuration of the other kinds is not checked.
65
+
66
+ ## Node configuration
67
+
68
+ Configuration is JSON text with camelCase property names. A `TimeSpan` is written `[d.]hh:mm:ss`. It never holds a secret.
69
+
70
+ | Node | Property | Meaning |
71
+ | --- | --- | --- |
72
+ | `Wait` | `kind` | `signal` or `timer` |
73
+ | `Wait` | `after` | How long a timer waits |
74
+ | `Wait` | `expiresAfter` | How long a signal wait stays open before it expires; zero waits forever |
75
+ | `Wait` | `signal` | The contract a signal wait accepts, `{"id":"payment-received","version":1}`; default is any |
76
+ | `Approval` | `expiresAfter` | How long the approval stays open before it expires; zero waits forever |
77
+ | `ForEach` | `itemsFrom` | The node whose output holds the items |
78
+ | `ForEach` | `itemsProperty` | The property of that output holding the list |
79
+ | `ForEach` | `maxParallelism` | How many action and decision executions across the branches of this `ForEach` may be scheduled or awaiting a retry at once. It does not limit how many branches are open or waiting |
80
+ | `Join` | `forEach` | The `ForEach` it joins |
81
+ | `Join` | `mode` | `all`, `any` or `atLeast` |
82
+ | `Join` | `threshold` | How many branches must succeed for `atLeast` |
83
+
84
+ ```csharp
85
+ new("await-payment", WorkflowNodeKind.Wait, new("orders.await-payment", 1),
86
+ """{"kind":"signal","expiresAfter":"1.00:00:00","signal":{"id":"payment-received","version":1}}""",
87
+ ["resumed", "expired"], WorkflowNodePolicy.Default),
88
+ new("cool-off", WorkflowNodeKind.Wait, new("orders.cool-off", 1),
89
+ """{"kind":"timer","after":"1.00:00:00"}""", ["elapsed"], WorkflowNodePolicy.Default),
90
+ new("per-line", WorkflowNodeKind.ForEach, new("engine.for-each", 1),
91
+ """{"itemsFrom":"load-lines","itemsProperty":"lines","maxParallelism":4}""", ["each"], WorkflowNodePolicy.Default),
92
+ new("all-shipped", WorkflowNodeKind.Join, new("engine.join", 1),
93
+ """{"forEach":"per-line","mode":"all"}""", ["completed", "partial"], WorkflowNodePolicy.Default)
94
+ ```
95
+
96
+ Every item in a `ForEach` list must be an object with a unique, non-empty string `key`; the key names the branch. A join's output holds each branch's `key`, `status`, `outlet` and `output`. A skipped branch counts as succeeded for a join.
97
+
98
+ ## Outlets and failures
99
+
100
+ | Outlet | Taken |
101
+ | --- | --- |
102
+ | `next` | As the ordinary way on |
103
+ | `failed` | When a node failed for good |
104
+ | `fallback` | When a node answered with an outlet it does not declare, or unusable output, and `fallback` is connected |
105
+ | `each` | Once per item by a `ForEach` |
106
+ | `completed` | By a join whose mode was satisfied |
107
+ | `partial` | By a join whose mode was not satisfied once every branch had ended |
108
+ | `resumed` | By a signal wait that was resumed |
109
+ | `elapsed` | By a timer wait once its time has come |
110
+ | `expired` | By a signal or approval wait that ran out of time |
111
+ | `approved` / `rejected` | By an approval that was given or refused |
112
+ | `cancelled` | By a signal wait that was called off |
113
+
114
+ | Failure | Cause | Retried | Routed through |
115
+ | --- | --- | --- | --- |
116
+ | `Error` | The performer reported a failure or threw | While attempts remain | `failed` |
117
+ | `TimedOut` | The attempt ran past `AttemptTimeout` | While attempts remain | `failed` |
118
+ | `InvalidOutlet` | The performer answered with an undeclared outlet | No | `fallback`, else `failed` |
119
+ | `InvalidOutput` | Output was not JSON, too large or not the shape needed | No | `fallback`, else `failed` |
120
+ | `PerformerMissing` | No performer provides the capability | No | `failed` |
121
+ | `VisitLimitExceeded` | The node was reached more often than `MaxVisits` | No | Nothing |
122
+
123
+ A failure with no connected outlet fails the run in the root branch; in a `ForEach` branch it only ends the branch.
124
+
125
+ ## Perform a capability
126
+
127
+ A performer implements `IWorkflowNodePerformer`. Dependencies come from the container. Performers are discovered; do not register them. Two performers for the same capability and version throw `MoreThanOneWorkflowNodePerformer`.
128
+
129
+ ```csharp
130
+ using Cratis.Choreography.Workflows.Adapters;
131
+ using Cratis.Choreography.Workflows.Graphs;
132
+
133
+ public class ReserveStock(IStockService stock) : IWorkflowNodePerformer
134
+ {
135
+ public CapabilityReference Capability => new("orders.reserve-stock", 1);
136
+
137
+ public async Task<WorkflowNodeOutcome> Perform(WorkflowNodeInvocation invocation, CancellationToken cancellationToken)
138
+ {
139
+ var reserved = await stock.Reserve(
140
+ invocation.Input.Value, invocation.Run.Scope.Value, invocation.IdempotencyKey.Value, cancellationToken);
141
+ return reserved
142
+ ? WorkflowNodeOutcome.Succeeded("next", """{"reserved":true}""")
143
+ : WorkflowNodeOutcome.Failed("no stock");
144
+ }
145
+ }
146
+ ```
147
+
148
+ - `invocation.Input` is JSON: `{ "trigger": { "payload", "subject": { "kind", "id" }, "correlation" }, "nodes": { "<node id>": <output> }, "item": <current ForEach item> }`. `nodes` holds, for each node, the output of its latest successful visit in the current branch, or else in the root branch. A branch never sees the output of a sibling branch.
149
+ - `invocation.IdempotencyKey` is the same for every attempt of one node execution. It is derived from the workflow, the trigger's deduplication key and the node execution, not from the scope, so the same workflow and trigger key in two scopes give the same key. Pass the receiver both `invocation.Run.Scope` and the key, and deduplicate there on the pair; a receiver that is already separate per tenant needs the key only.
150
+
151
+ | Outcome | Meaning |
152
+ | --- | --- |
153
+ | `WorkflowNodeOutcome.Succeeded(outlet, output)` | Leaves through an outlet the node declares. The output is optional JSON of at most 32 KiB |
154
+ | `WorkflowNodeOutcome.Failed(reason)` | The attempt failed; retried while attempts remain |
155
+ | `WorkflowNodeOutcome.Skipped(reason)` | The branch ends there; not a failure |
156
+ | `WorkflowNodeOutcome.Ambiguous(reason)` | The effect may or may not have happened. Never retried; the run ends `ReconciliationRequired`. In the root branch a person settles it with `IWorkflowRun.Reconcile`. Never return it from a node inside a `ForEach`: that execution cannot be reconciled |
157
+ | `WorkflowNodeOutcome.Suspended(key, expiresAfter)` | Edge case: the work was accepted and the answer arrives later. The node waits until it is completed by that key or expires through `expired` |
158
+
159
+ A decision node is performed the same way: its performer returns `Succeeded` with one of the node's own outlets.
160
+
161
+ ## Send a command from a node
162
+
163
+ To run an Arc command as the node's work, derive from `ActionNodePerformer` and describe the actions. The command runs through the Arc command pipeline resolved from the host's services.
164
+
165
+ ```csharp
166
+ using System.Text.Json;
167
+ using Cratis.Choreography.Actions;
168
+ using Cratis.Choreography.Arc.Actions;
169
+ using Cratis.Choreography.Workflows.Adapters;
170
+ using Cratis.Choreography.Workflows.Graphs;
171
+
172
+ public class ShipOrder(IServiceProvider services) : ActionNodePerformer(services)
173
+ {
174
+ public override CapabilityReference Capability => new("orders.ship", 1);
175
+
176
+ protected override void Define(ActionsBuilder actions) => actions
177
+ .Execute(context => new Ship(OrderIdFrom(context.Input)));
178
+
179
+ static string OrderIdFrom(string input)
180
+ {
181
+ using var document = JsonDocument.Parse(input);
182
+ return document.RootElement.GetProperty("trigger").GetProperty("subject").GetProperty("id").GetString()!;
183
+ }
184
+ }
185
+ ```
186
+
187
+ - `Execute(context => new Ship(...))` builds the command from the action context; use it for a command that is a record. For a command class with a default constructor, `Execute<TCommand>((command, context) => ...)` creates it and lets you populate it.
188
+ - `context.Input` is the node's input JSON as a string, in the shape shown under Perform a capability. Parse the identifiers you need from it.
189
+ - The node succeeds through `next` when the command succeeds; override `SuccessOutlet` to choose another outlet. A command that is not authorized, not valid or that throws fails the attempt, and the node's policy applies.
190
+ - The action context carries the input and the run's identity, not the idempotency key. A command sent this way must itself be safe to repeat: when the operation was already applied, the command succeeds without applying it again. A command that rejects the repeat fails the attempt, and so the node, although the work was done. When the receiver needs the key to recognise the repeat or to return the original result, implement `IWorkflowNodePerformer` directly.
191
+
192
+ ## Supply the definition
193
+
194
+ A definition source implements `IWorkflowDefinitions`. Sources are discovered; do not register them.
195
+
196
+ ```csharp
197
+ using Cratis.Choreography.Workflows;
198
+ using Cratis.Choreography.Workflows.Definitions;
199
+ using Cratis.Choreography.Workflows.Graphs;
200
+
201
+ public class OrderWorkflows : IWorkflowDefinitions
202
+ {
203
+ public const string FulfilOrder = "orders.fulfil";
204
+
205
+ static readonly WorkflowDefinitionSnapshot _fulfilOrder = new(
206
+ Workflow: FulfilOrder,
207
+ Area: "orders",
208
+ Version: 1,
209
+ Subject: "order",
210
+ Graph: new WorkflowGraph(Nodes: [ /* ... */ ], Edges: [ /* ... */ ]),
211
+ CatalogVersion: "1",
212
+ Capabilities: []);
213
+
214
+ public bool Owns(WorkflowKey workflow) => workflow.Workflow.Value == FulfilOrder;
215
+
216
+ public Task<WorkflowDefinitionSnapshot?> GetActive(WorkflowKey workflow) =>
217
+ Task.FromResult<WorkflowDefinitionSnapshot?>(_fulfilOrder);
218
+ }
219
+ ```
220
+
221
+ - `Subject` is the subject kind the workflow is about. A trigger with another subject kind is rejected.
222
+ - A run pins the snapshot it was admitted with. To change a workflow, return a snapshot with a higher `Version`; runs in flight are unaffected.
223
+ - A workflow that no source owns is rejected with `NoActiveVersion`. A workflow owned by two sources throws `MoreThanOneWorkflowDefinitionSource`.
224
+
225
+ ## Host the engine
226
+
227
+ Workflows are off by default. Switch them on in the Choreography host:
228
+
229
+ ```csharp
230
+ using Cratis.Choreography.Hosting;
231
+
232
+ builder.AddCratisChoreography(new CratisChoreographyOptions { Workflows = true });
233
+ ```
234
+
235
+ - `Workflows = true` adds the engine and the grain storage provider it needs. `IWorkflows` is registered for you.
236
+ - Node work runs as Choreography jobs. `AddCratisChoreography` hosts the job system; with durable storage also register a jobs storage, as for any job. For jobs storage and the remaining host options see `cratis-orleans-jobs`, reference `csharp.md`.
237
+ - With the default storage mode, `GrainStorageMode.MongoDB`, the journal is durable. With `GrainStorageMode.InMemory` nothing survives the process.
238
+ - On durable storage, tell the engine which scopes to look in after a restart; it knows none by itself. For a service with one scope: `ConfigureWorkflows = options => options.Scopes.Add(WorkflowScope.Default.Value)`. For tenants see Scopes and tenants.
239
+ - To keep the journal in Chronicle, add the Chronicle integration: see `csharp-chronicle.md`.
240
+
241
+ `WorkflowsOptions` are set through `CratisChoreographyOptions.ConfigureWorkflows`:
242
+
243
+ | Option | Default | Meaning |
244
+ | --- | --- | --- |
245
+ | `Scopes` | empty | Scopes the engine sweeps and recovers jobs for, besides those a scope source names and those the silo has seen |
246
+ | `WakeRunsItself` | `true` | Keep a grain timer and reminder while a retry or wait deadline is pending |
247
+ | `Sweep` | `true` | Whether the sweep runs on this silo |
248
+ | `SweepInterval` | 30 seconds | How often the sweep asks every unfinished run whether it has anything to do |
249
+ | `SweepStartupDelay` | 20 seconds | How long after start the first sweep runs |
250
+ | `IdleBeforeResume` | 15 minutes | How long a run may be idle before the sweep takes it forward from its history |
251
+ | `JobsScope` | `workflows` | The jobs scope the node work of a run is started in. Not used with the Chronicle journal, where the jobs follow the event store and the namespace the scope maps to |
252
+
253
+ Deadlines and retry times follow from recorded facts, not from in-memory timers. While a deadline or retry is pending the run keeps a grain timer and a reminder; the sweep also expires due waits and starts due retries. Reminders in the co-hosted silo are in memory and do not survive a full cluster restart; the sweep does.
254
+
255
+ ## Start a run
256
+
257
+ ```csharp
258
+ using System.Text.Json;
259
+ using Cratis.Choreography.Workflows;
260
+ using Cratis.Choreography.Workflows.Contracts;
261
+ using Cratis.Choreography.Workflows.Triggers;
262
+
263
+ var admission = await workflows.Start(
264
+ WorkflowScope.Default,
265
+ OrderWorkflows.FulfilOrder,
266
+ new WorkflowTrigger(
267
+ Kind: WorkflowTriggerKind.Manual,
268
+ Source: "orders-api",
269
+ Deduplication: $"order-{orderId}",
270
+ Subject: new("order", orderId),
271
+ Contract: WorkflowContractReference.Any,
272
+ Payload: JsonSerializer.Serialize(new { orderId }),
273
+ Evidence: [],
274
+ Correlation: orderId,
275
+ Causation: WorkflowCausationKey.None,
276
+ Actor: "orders-api",
277
+ OccurredAt: DateTimeOffset.UtcNow));
278
+ ```
279
+
280
+ - `workflows` is the injected `IWorkflows`. `orderId` is a string here.
281
+ - `admission.Admitted` says whether the run was admitted, `admission.Run` is the run id and `admission.Rejections` says why not.
282
+ - `Deduplication` decides the run id together with the workflow id. In the same scope, the same key reaches the same run and starts nothing new. Every call is still checked against the active definition first, so a repeat can be rejected; another scope has its own run.
283
+ - Serialize the payload; never build the JSON by inserting values into a string. A payload that is not valid JSON is rejected.
284
+ - `Correlation` is the key that signals match on. Use the business identifier.
285
+ - The engine records `Kind` in the run's history and does not act on it.
286
+ - `Start` returns when the run is admitted, not when it has finished.
287
+
288
+ ## Follow, approve and cancel a run
289
+
290
+ ```csharp
291
+ var run = workflows.GetRun(WorkflowScope.Default, admission.Run);
292
+ var snapshot = await run.GetSnapshot();
293
+ // snapshot.Status, snapshot.Executions (Execution.Node, Status, Attempt, Outlet, Reason), snapshot.OpenWaits
294
+ ```
295
+
296
+ - Run statuses: `Running`, `Waiting`, `Succeeded`, `Failed`, `Cancelled`, `ReconciliationRequired`.
297
+ - Node statuses: `Pending`, `Scheduled`, `Waiting`, `Succeeded`, `Failed`, `Skipped`, `Unreachable`, `Cancelled`, `ReconciliationRequired`, `RetryPending`.
298
+ - A person's decision on an approval: `await run.ResolveWait(wait, "approved", payload, actor)`, where `wait` comes from `snapshot.OpenWaits`. An approval resolves through `approved` or `rejected`. A wait can be resolved or expired only while open: whichever is recorded first wins.
299
+ - `await run.Cancel(reason)` cancels the run and its open waits. An outcome that arrives afterwards is recorded, but nothing is planned from it.
300
+ - `await run.Reconcile(execution, outcome, actor)` settles a node in the root branch that answered ambiguous and resumes the run. It does nothing for a node execution inside a `ForEach` branch and does not report that; such a run stays `ReconciliationRequired`. Read the snapshot afterwards to confirm.
301
+
302
+ ## Scopes and tenants
303
+
304
+ A `WorkflowScope` is an opaque value that separates one tenant's workflows and runs from another's; `WorkflowScope.Default` is the single scope of a service without tenants. The scope is part of the run's identity, so a run cannot move to another scope.
305
+
306
+ After a full restart the sweep knows only the scopes its silo has served since, those in `WorkflowsOptions.Scopes` and those an `IWorkflowScopeSource` names. `Scopes` starts empty and the default scope is not added for you, so a run waiting on a timer in a scope nothing has touched since the restart is never woken.
307
+
308
+ - One scope: add it to `Scopes`, as shown under Host the engine.
309
+ - Tenants: register an `IWorkflowScopeSource` in the container that returns every scope.
310
+
311
+ ```csharp
312
+ using Cratis.Choreography.Workflows;
313
+ using Cratis.Choreography.Workflows.Sweeping;
314
+
315
+ public class TenantScopes(ITenantCatalog tenants) : IWorkflowScopeSource
316
+ {
317
+ public async Task<IEnumerable<WorkflowScope>> GetScopes(CancellationToken cancellationToken) =>
318
+ (await tenants.All(cancellationToken)).Select(tenant => new WorkflowScope(tenant));
319
+ }
320
+ ```
321
+
322
+ ## Test a workflow
323
+
324
+ Start with the cheapest level that shows the behaviour.
325
+
326
+ | Level | Use it for |
327
+ | --- | --- |
328
+ | The performer alone, called directly with its dependencies substituted | What one capability does and which outcome it reports |
329
+ | A real silo in the test process with in-memory storage | Running a workflow end to end: admission, routing, failure paths, expiry |
330
+ | A host against durable storage | A run that survives a restart while waiting |
331
+
332
+ An in-memory host for specs:
333
+
334
+ ```csharp
335
+ var builder = WebApplication.CreateBuilder();
336
+ builder.Configuration["urls"] = "http://127.0.0.1:0";
337
+ builder.AddCratisChoreography(new CratisChoreographyOptions
338
+ {
339
+ Clustering = ClusteringMode.Localhost,
340
+ Storage = GrainStorageMode.InMemory,
341
+ Workflows = true
342
+ });
343
+
344
+ await using var app = builder.Build();
345
+ await app.StartAsync();
346
+
347
+ var workflows = app.Services.GetRequiredService<IWorkflows>();
348
+ ```
349
+
350
+ - `CratisChoreographyOptions.Local()` gives the same clustering and storage but leaves workflows off, so write the options out.
351
+ - Localhost clustering uses the default Orleans ports, so two such silos cannot run at once on one machine. Share one silo across the specs of a test run.
352
+ - A run proceeds in the background. Poll `GetSnapshot()` under a deadline until the run reaches the expected status; never sleep a fixed time.
353
+ - Use short `after` and `expiresAfter` values in the definition under test to exercise timers and expiry.
354
+ - Assert the run status and the status of the nodes that matter, and count the effect at the receiver to prove a repeated trigger or attempt did not repeat it.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cratis-chronicle-cli-operations
3
- description: Use when inspecting a running Chronicle store, gating a deployment or release, or performing an authorized store operation through the cratis CLI; includes the complete `cratis chronicle` command catalog. Not for choosing MCP tools (use cratis-chronicle-mcp-inspection) or configuring the kernel (use cratis-chronicle-deploy-kernel).
3
+ description: Use when inspecting a live Chronicle store, gating a release or deploy, running an authorized store operation or installing/updating AI guidance (`cratis ai`) via the cratis CLI; lists every `cratis chronicle` command. Not for picking MCP tools (use cratis-chronicle-mcp-inspection) or kernel configuration (use cratis-chronicle-deploy-kernel).
4
4
  license: MIT
5
5
  ---
6
6
 
@@ -26,7 +26,7 @@ license: MIT
26
26
  ## How it behaves
27
27
 
28
28
  - **Target.** The server is `--server`, then `CHRONICLE_CONNECTION_STRING`, then the active context, then `chronicle://localhost:35000`. The store and namespace are `-e`/`-n`, then the active context, then `default` and `Default`. `--debug` prints the resolved, redacted target on stderr. In an interactive terminal without `-e` or `--yes`, a store-scoped command whose context has no store, or names one the server no longer has, prompts for a store and saves the choice as the context default before it runs, even for a read. Pass `-e` and `-n` explicitly.
29
- - **Output.** `-o auto` gives `json-compact` to a detected AI agent, `plain` under `NO_COLOR`, `json` when stdout is redirected and `table` otherwise.
29
+ - **Output.** `-o auto` gives, in order: `json-compact` to a detected AI agent, `plain` when `NO_COLOR` is nonempty, `json` when stdout is redirected, and `table` otherwise. `-q` overrides any `-o` value except `json` and `json-compact`, which it turns into a JSON list of identifiers. In scripts and CI pass `-o` explicitly and pin the CLI version the parser was written against; output formats can change between CLI versions.
30
30
  - **Confirmation.** A command with `requiresConfirmation` prompts in a terminal and fails with exit 5 in a non-interactive session unless `--yes` is given. `--yes` confirms; it never authorizes.
31
31
  - **Exit codes.** 0 success, 1 not found, 2 unreachable, 3 server error or unhealthy, 4 authentication, 5 invalid input, refusal or missing confirmation, 10 internal failure. Branch on the code, not the text.
32
32
  - **Accepted is not done.** Recovery commands often return once the server accepts the request and finish in the background. Re-read the state to learn the outcome.
@@ -35,7 +35,7 @@ license: MIT
35
35
 
36
36
  Start with an installed CLI, a trusted server endpoint, read access and the exact event store and namespace.
37
37
 
38
- 1. Establish the intended server, store and namespace. If the target or credentials are unclear, read [setup and target](references/setup-and-target.md#reach-the-right-server). Do not run `cratis context list`, `context show` or `chronicle auth status` while a saved context might contain embedded credentials; they print saved servers verbatim, and none shows the effective target.
38
+ 1. Establish the intended server, store and namespace. If the target or credentials are unclear, read [setup and target](references/setup-and-target.md#reach-the-right-server). Do not run `cratis context list` or `context show` while a saved context might contain embedded credentials: they print saved servers verbatim. `chronicle auth status` redacts the saved server to scheme, hosts, ports and TLS state, and the login binding to host and port (or, for a binding saved as a URL, the same as the server); it can still show the saved username and client ID, never the token or client secret. None of them shows the effective target.
39
39
  2. Pick the command from the catalog below. Run `cratis llm-context` to confirm the command, flags, `effect` and `requiresConfirmation` before relying on them. Use only `read-only` commands for diagnosis, never `report-error`; treat unknown effects as changes. Use `cratis llm-context --schema` for the catalog schema or `cratis <group> --help` for one group.
40
40
  3. Read the smallest relevant scope and verify the effective target from the redacted `--debug` output on stderr. For example, inspect one observer:
41
41
 
@@ -91,7 +91,7 @@ Every command starts with `cratis chronicle`. Effect is the strongest change the
91
91
  | `users list`, `users add <name> <email> <password>`, `users remove <user-id>` | read, mutating, destructive | Manage the users who sign in to the Workbench and the CLI |
92
92
  | `applications list`, `applications add <client-id> <client-secret>`, `applications remove <app-id>` | read, mutating, destructive | Manage the client-credential applications that SDK clients connect as |
93
93
  | `login <user>`, `logout` | local | Cache or clear a user session for the target server. `--secret <password>` signs in without a prompt |
94
- | `auth status` | read | Show the active context's saved login or client credentials and whether the login matches the target server. Reads local configuration only and prints the saved server verbatim |
94
+ | `auth status` | read | Show the active context's saved login and client credentials: username, client ID and whether a secret is set, never the token or secret. JSON includes both identifiers; the readable view shows the username when a login is saved, otherwise the client ID. `loginMatchesServer` says whether the saved login's token is usable for the selected connection. Reads local configuration only. Redacts the saved server to scheme, host, port and TLS state, and the login binding to host and port (a binding saved as a URL keeps its scheme and TLS state) |
95
95
  | `workbench` | destructive, interactive | Open the terminal dashboard (`--interval <seconds>` sets the refresh). See the `cratis-cli-terminal-workbench` skill |
96
96
  | `report-error` | external | Open a prefilled public issue form in the browser (`--title`, `--body`; it prompts for both unless `-q`). The catalog calls it read-only, but the text leaves this machine: never use it for diagnosis, and keep identifiers, payloads and credentials out of it |
97
97
 
@@ -107,7 +107,7 @@ These commands outside `cratis chronicle` set the target, set up the tool and co
107
107
  | `cratis context set-value <key> <value>` | local | Change one value of the active context |
108
108
  | `cratis context rename <old> <new>`, `context delete <name>` | local | Rename or remove a saved context |
109
109
  | `cratis version` | read | Inventory: the CLI, Screenplay and server versions, the server commit and newer releases. Its `compatible` field only means the server answered, and it exits 0 when the server is unreachable; gate a deployment with `check-release` |
110
- | `cratis get-started` | read | Show the active context, its authentication state, whether the server is reachable, and starter commands; `-o json` reports `canConnect` |
110
+ | `cratis get-started` | read | Show the active context, its authentication state, whether connection setup succeeded, and starter commands; `-o json` reports that as `canConnect`. A guide, not a health check: `canConnect: true` does not prove the server answered, and it exits 0 when setup fails (4 only when the CLI would reuse a matching saved login whose token is unusable: missing, without a readable expiry, expired, or expiring within a minute), and with no CLI configuration it exits 0 with setup instructions (`-o json` returns only `configured: false`) |
111
111
  | `cratis llm-context` | read | Print the command catalog with each command's flags, `effect` and `requiresConfirmation` (`--schema` prints its JSON Schema) |
112
112
  | `cratis init` | local | Write `CHRONICLE.md` and configure the project's AI tools. `--tool claude`, `copilot`, `cursor`, `windsurf` or `pi` targets one tool instead of detecting them; `--force` overwrites existing files; `--no-commands` skips slash commands and prompt files; `--no-context` leaves the tool's instruction file alone; `--refresh` only re-captures the catalog snapshot |
113
113
  | `cratis completions bash`, `zsh`, `fish`, `powershell` | read | Print that shell's completion script to stdout |
@@ -122,6 +122,6 @@ These commands outside `cratis chronicle` set the target, set up the tool and co
122
122
  - **Reading results:** [Inspection results](references/inspection.md) covers output formats, every exit code, which command answers which question, and the `diagnose` readiness gate.
123
123
  - **Release gate or model comparison:** [Recovery outcomes and comparison](references/recovery-and-comparison.md) covers `check-release` before a deploy and the read-only Screenplay namespace comparison after one.
124
124
  - **Authorized recovery:** Check [command effects and write preflight](references/command-effects.md#preflight-for-a-write), then [recovery outcomes](references/recovery-and-comparison.md) for the exact operation. A diagnosis request does not authorize changes. Re-read after an accepted request and verify the actual outcome.
125
- - **CLI upgrades, templates and managed AI installation:** [Project tooling](references/project-tooling.md).
125
+ - **CLI upgrades, templates and managed AI installation:** [Project tooling](references/project-tooling.md) covers what `cratis update` changes and leaves alone, `cratis ai install`/`update` in unattended setups and pinning a reviewed corpus revision.
126
126
 
127
127
  Leave mutating interactive keys in the terminal Workbench to an operator.
@@ -15,9 +15,17 @@
15
15
  There is one output flag, `-o` / `--output`, with values `table`, `plain`,
16
16
  `json`, `json-compact`, and `auto`. **There is no `--json` flag.**
17
17
 
18
- - `auto` (the default) resolves to `json-compact` when an AI-agent environment
19
- is detected, `plain` when `NO_COLOR` is set, `json` when stdout is redirected,
20
- and `table` otherwise.
18
+ - `auto` (the default) resolves, in order, to `json-compact` when an AI-agent
19
+ environment is detected, `plain` when `NO_COLOR` is nonempty, `json` when
20
+ stdout is redirected, and `table` otherwise. `-q` overrides the format: it
21
+ prints identifiers, as a JSON list with `-o json` or `-o json-compact`.
22
+ - Never rely on `auto` in a script: the same command changes format with the
23
+ environment. Pass `-o` explicitly and pin the CLI version (for example
24
+ `dotnet tool install -g Cratis.Cli --version <version>`); output formats are
25
+ not a stable contract across CLI versions.
26
+ - For list output (without `-q`), `plain` prints tab-separated rows with the
27
+ column headers on the first row. Some commands print their own plain layout
28
+ instead; `diagnose -o plain` prints `key=value` lines such as `healthy=True`.
21
29
  - `-q` / `--quiet` prints identifiers only, one per line — what you want when
22
30
  piping one command into another. Combined with a JSON format it yields a JSON
23
31
  array of identifiers.
@@ -32,6 +32,34 @@ fails; `--no-templates` skips it. CLI and template versions are separate. Do not
32
32
  silently enable scaffold scripts; preserve the template's `--allow-scripts`
33
33
  choice. Multi-service orchestration still needs explicit per-store settings.
34
34
 
35
+ What `cratis update` changes beyond the CLI and the templates, and what it leaves alone:
36
+
37
+ - **Container images.** It pulls a newer Stage image or builder image only for a
38
+ supported repository that already has an image with a numeric version tag on
39
+ the machine, wherever that image came from. A repository with no local image,
40
+ or with no tag that parses as a numeric version, is skipped.
41
+ - **Installation method.** The running .NET global tool installation and a
42
+ detected Homebrew installation on macOS are updated by the command itself; a
43
+ .NET local tool is not. `--version <version>` works only for the .NET global
44
+ tool; on a detected macOS Homebrew installation it exits 5 and updates
45
+ nothing. Any other native installation, including a Homebrew installation on
46
+ Linux, is not updated: the command ignores `--version`, prints how to update
47
+ it, still attempts the image and template refreshes, reports `updated: false`
48
+ in `-o json`, and exits 0. Exit 0
49
+ therefore does not prove a newer CLI, and on the automatic paths `updated` can
50
+ reflect the expected version rather than a verified one. Confirm with
51
+ `cratis version` from the executable you intend to use.
52
+ - **Existing applications.** Newer templates change the default set that the
53
+ next `cratis new` uses. When `cratis new` acquires a template package, its
54
+ `--version` overrides that pin (`*` requests the latest); `--template-path`
55
+ uses the local package and bypasses package selection altogether. Newer
56
+ templates never change an application that is already scaffolded.
57
+ - **Installed AI guidance.** It does not touch a Cratis-managed AI corpus
58
+ installation in a repository. Run `cratis ai update` from each directory that
59
+ contains `.cratis/ai.json`; it does not search parent directories, so from a
60
+ subdirectory, or without that file, the command fails and asks for
61
+ `cratis ai install`. What `cratis init` wrote is not such an installation.
62
+
35
63
  For `cratis render` / `run`, use the `cratis-stage-render-slice` skill. The bundled renderer determines support;
36
64
  a CLI upgrade can change admission, generated output and the default container
37
65
  without changing the model. Never infer support from the ESM version alone or
@@ -39,6 +67,28 @@ edit generated output to force a match.
39
67
 
40
68
  ## Managed AI installation and MCP
41
69
 
70
+ `cratis ai install` records the selected profiles, harnesses and languages in
71
+ `.cratis/ai.json`. `cratis ai update` re-applies that selection; its own options
72
+ are only `--source`, `--force` and `--dry-run` (global options such as `--output`
73
+ still apply). Run `install` again to change the selection.
74
+ When stdin is redirected, install cannot prompt: pass `--profiles` and
75
+ `--harnesses` (`--languages` is optional), or it exits 5 and downloads nothing.
76
+ A CI job or agent session whose stdin is still a terminal can reach a prompt, so
77
+ redirect stdin for unattended runs.
78
+
79
+ ```bash
80
+ cratis ai install --profiles <profile> --harnesses claude,copilot </dev/null
81
+ cratis ai update --dry-run
82
+ ```
83
+
84
+ Both commands take whatever the corpus source currently holds; the installed
85
+ revision does not pin later runs. To reproduce a reviewed revision, pass
86
+ `--source <local Cratis/AI checkout>` or set `CRATIS_AI_SOURCE`, and use a fresh
87
+ checkout of the reviewed revision on every run. The CLI reads the corpus files
88
+ that match its layout and your selection from the working tree, not from a
89
+ recorded commit, so eligible untracked or ignored files are included and a clean
90
+ `git status` is not enough.
91
+
42
92
  `.pi/agents` links to Pi-native corpus adapters when available. Do not
43
93
  hand-edit generated adapters to restore missing tools; update the CLI/corpus.
44
94
 
@@ -66,9 +66,23 @@ never in the script text.
66
66
  Run the [write preflight](command-effects.md#preflight-for-a-write) before any command below that
67
67
  changes the store. A prompt or `--yes` is not authority to mutate a live store.
68
68
 
69
- `chronicle jobs stop` and `resume` report kernel refusals and exit nonzero. The terminal Workbench also reports refusals.
70
- Inspect the job again; resume can be refused for missing, concluded, unpersisted
71
- or otherwise unresumable work. Do not repeat it without understanding the reason.
69
+ `chronicle jobs stop` and `resume` exit nonzero when the kernel refuses (5, or
70
+ 3 when a stop could not be made durable); they never report success for a
71
+ refused request. The terminal Workbench also reports refusals. A job that does
72
+ not exist when the request is validated, including a completed job whose record
73
+ was removed, fails both commands with exit 3 and "Job does not exist." Stop
74
+ names its refusal reason: a job not found (it vanished after validation), a
75
+ concluded job (a `Failed` one is reported as not found) or a job that is not
76
+ running. Resume has one generic refusal, "nothing took the job forward" (exit
77
+ 5), and it is not a diagnosis: a never-prepared or `Failed` job, or one that
78
+ vanished after validation, causes it, and so can a pending drain, a refused or
79
+ failed admission check, or a failed state write. Resuming a completed job whose
80
+ record is still retained is accepted and exits 0.
81
+
82
+ In a script, let these exit codes fail the step; an earlier status read does not
83
+ replace the command's answer. After exit 0, read the status with
84
+ `jobs get <id> -o json` before relying on it. Do not repeat a refused command
85
+ without understanding the reason.
72
86
 
73
87
  `cratis chronicle jobs delete <JOB_ID>` is destructive
74
88
  and irreversible: retained job state is removed. Before confirmation it names
@@ -14,7 +14,13 @@ Check the command catalog (`cratis llm-context`) before using a flag.
14
14
 
15
15
  `cratis` is a .NET tool published as `Cratis.Cli` with the command name
16
16
  `cratis`. Install it with `dotnet tool install -g Cratis.Cli`, or through
17
- Homebrew, or from a release binary. Follow with `cratis completions install`;
17
+ Homebrew, or from a release binary. Native release binaries are self-contained;
18
+ the .NET tool needs the runtimes its package targets, currently the .NET 11
19
+ runtime and the ASP.NET Core 11 shared runtime (the base runtime alone is not
20
+ enough). In CI,
21
+ pin the CLI version and set up a matching SDK (for example `actions/setup-dotnet`
22
+ with `dotnet-version: 11.0.x`) before `dotnet tool install`, or use a pinned
23
+ native release binary. Follow with `cratis completions install`;
18
24
  it detects the shell from `$SHELL` (`--shell bash`, `zsh` or `fish` overrides
19
25
  it) and `--force` re-adds the line. To manage the shell configuration yourself,
20
26
  `cratis completions bash`, `zsh`, `fish` or `powershell` prints the script to
@@ -63,7 +69,7 @@ Use `cratis chronicle login <user>` (`--secret` or prompt), `chronicle logout`
63
69
  and `chronicle auth status -o json` (`tokenServer`, `loginMatchesServer`). Login
64
70
  refuses multi-host and `chronicle+srv://` targets. If the intended server requires login and no matching token is saved, sign in again. Context values can be changed
65
71
  with `context set-value server|event-store|namespace|client-id|client-secret`.
66
- Keep saved server strings free of credentials: `context list`, `context show` and `auth status` print saved servers verbatim, so do not run them while a saved context may embed credentials. Keep secrets out of logs and committed configuration.
72
+ Keep saved server strings free of credentials: `context list` and `context show` print saved servers verbatim, so do not run them while a saved context may embed credentials. `chronicle auth status` is safe then: it redacts the saved server to scheme, hosts, ports and TLS state and the login binding to host and port (a binding saved as a URL keeps its scheme and TLS state), and replaces a string it cannot parse with a placeholder. `loginMatchesServer` is `true` only when the saved login's token is usable for the selected connection. JSON still shows the saved username and client ID (the readable view shows the username when a login is saved), and only whether a client secret is set; it never shows the token or the secret. Keep secrets out of logs and committed configuration.
67
73
  Default development-client credentials are registered only in development builds.
68
74
 
69
75
  Prefer a named context over repeating a connection string:
@@ -1,7 +1,5 @@
1
1
  # C#: what the connected client gives you
2
2
 
3
- Names are illustrative.
4
-
5
3
  ## Contents
6
4
 
7
5
  - Services you can inject
@@ -11,6 +9,8 @@ Names are illustrative.
11
9
  - Artifact discovery and registration failures
12
10
  - Federation management
13
11
 
12
+ Names are illustrative.
13
+
14
14
  ## Services you can inject
15
15
 
16
16
  `AddCratisChronicle` (and `AddCratisChronicleClient` on a generic host) registers these. Take the narrowest one a class needs.
@@ -52,6 +52,17 @@ Every appended event records who caused it, the operation it belongs to and the
52
52
  - **Keep `Subject` stable.** It identifies the actor; `Name` is only for display. When a person's name changes, call `await store.Identities.Rename(subject, newName)`: existing events and read models show the new name because they refer to the identity, not a copy.
53
53
  - **Correlation:** one ID per logical operation, read from `ICorrelationIdAccessor.Current` (`Cratis.Execution`). To start a new one for a background job, register `new CorrelationIdAccessor()` yourself with `configure: b => b.WithCorrelationIdAccessor(accessor)` and call `accessor.Modify(CorrelationId.New())` at the start of the job; the value flows with the async call.
54
54
  - **Causation:** an ASP.NET Core request (its route) and an Arc command are recorded for you. For your own unit of work use `using var scope = client.CausationManager.BeginScope("ImportBatch", properties)`; disposing it removes the link. `Add(type, properties)` leaves the link on the chain for every later append in the same flow, so prefer the scope. `properties` is an `IDictionary<string, string>`: never put secrets or personal data in it.
55
+ - **Reading who caused an event:** `GetMetadataAt` returns `CausedBy` as a `ResolvedIdentity` (`Subject`, `Name`, `UserName`, `Resolution`, `OnBehalfOf`). The name is looked up at read time, so a rename shows on the next read, also for events appended before it. `OnBehalfOf` is the next link of the chain and is resolved separately. Check `Resolution` (`IdentityResolution` in `Cratis.Chronicle.EventSequences`) before showing a name:
56
+
57
+ | `Resolution` | Meaning | `Name` |
58
+ | --- | --- | --- |
59
+ | `Resolved` | The identity exists and has a display name | The current name |
60
+ | `NameUnavailable` | The identity exists but its display name is empty | `null` |
61
+ | `Missing` | The stored identity no longer resolves | `null` |
62
+ | `NotSet` | No identity was recorded | `null` |
63
+ | `System` | Chronicle's own system identity | `null` |
64
+
65
+ The read never substitutes the subject for a name it cannot give: choose your own placeholder for a `null` name. A `Resolved` name is whatever was recorded, and that can itself equal the subject, for example when a caller was recorded without a display name, so do not treat `Name` as proof of a human-readable name. `InitiatorType` on the metadata classifies the first link: `Agent` when it acts on behalf of another identity, otherwise `User`; `System` for Chronicle's system identity; `Unknown` when it is missing, not set or the well-known unknown identity. An application's own service identity is **not** `System`: it classifies as `User` or `Agent`, so recognise service identities by their subject, never by display name. `cratis-chronicle-record-event` (`references/csharp-history.md`) owns the metadata read itself.
55
66
 
56
67
  ## Connection failures
57
68
 
@@ -1,5 +1,12 @@
1
1
  # Connect a .NET workload to Chronicle
2
2
 
3
+ ## Contents
4
+
5
+ - Host setup (below)
6
+ - Select a partition and prove readiness
7
+ - Edge cases: readiness of another store, Arc host deployment
8
+ - Not supported in this SDK
9
+
3
10
  Names are illustrative. For a standalone ASP.NET Core service reference `Cratis.Chronicle.AspNetCore`; for a generic host or owned client reference `Cratis.Chronicle`. Supply `Cratis:Chronicle:ConnectionString` from deployment secrets, including `skipTlsValidation=false` for a shared endpoint. Make the kernel reachable and its certificate trusted before diagnosing registration.
4
11
 
5
12
  ```csharp
@@ -73,6 +80,11 @@ Use `await client.GetEventStores(ct)` and `await store.GetNamespaces(ct)` for ro
73
80
  - [Client services](csharp-services.md) — injectable services, the event store's members, identity and causation, connection failures and federation management.
74
81
  - [Behavior patterns](csharp-patterns.md) — ask what a user or scope usually does.
75
82
 
83
+ ## Edge cases
84
+
85
+ - **Readiness of a store the health check does not cover.** The `chronicle` health check is the default and reports the configured store only. For another store the application opens itself, read `client.GetStartupStatus("orders", EventStoreNamespaceName.Default, RegistrationMode.Inline)` in your own readiness endpoint and answer ready only when `State` is `EventStoreStartupState.Completed`. The other states are `NotStarted`, `Connecting`, `Registering` and `Failed`; `PendingArtifacts` lists the kinds of registration work still outstanding and is empty outside registration. The call is local: it neither opens the store nor contacts the kernel, so open the store on the normal startup path. Pass exactly the store name, namespace and registration mode the store was opened with (`options.RegistrationMode` unless a mode was passed to `GetEventStore`); no namespace is resolved for you, and a combination the client has not opened answers `NotStarted`. `Completed` means registration finished on the current connection, not that an observer has caught up.
86
+ - **Arc host deployment.** Deploy a current Arc integration, Chronicle client and kernel together, and upgrade them together. Arc command features such as completing a stream scoped to one event source, several concurrency guards for one event source ID in the same command, and the generated-ID freshness check on staged events rely on all three; do not work around a mismatch in the command.
87
+
76
88
  ## Not supported in this SDK
77
89
 
78
90
  - Borrowing a raw gRPC channel with caller-retained lifetime: let Chronicle construct its transport. Even the constructor accepting `IChronicleConnection` disposes that connection.
@@ -99,6 +99,8 @@ Outside the filters the SDK exposes `identityProvider.setCurrentIdentity(identit
99
99
  | `ProjectionRegistrationNotApplied` | The kernel accepted a projection but could not apply it; read `failure` and fix the definition |
100
100
  | `ObserverHasNoHandlers`, `InvalidHandlerSignature` | A reactor or reducer has no handler, or a handler with parameters the client cannot supply; fix the method |
101
101
 
102
+ **Refused credentials.** With the defaults (automatic registration and the keep-alive session on), when the kernel refuses the connection, `awaitRegistration()` and an append that is still waiting for the first registration pass throw `io.cratis.chronicle.connection.ChronicleConnectionFailed` instead of waiting; the message names the gRPC status: `UNAUTHENTICATED` for a wrong client ID or secret, `PERMISSION_DENIED` for a client that is not permitted. Treat it as a configuration fault: report the process as not ready and correct the secret or the client's permissions. Do not add a retry loop: the client keeps reconnecting in the background and later calls succeed once the kernel accepts it. With `withoutAutoRegistration()` there is no such gate: `awaitRegistration()` returns immediately and a refused call fails with the gRPC `StatusException` of that call. A kernel that is unreachable when the client is constructed makes the constructor throw `io.grpc.StatusException: UNAVAILABLE`. If it stops answering before the first registration pass has started, nothing is thrown and `awaitRegistration()` and the first append wait, which is why the startup wait above is bounded with `withTimeout`. A pass that starts and then fails, for example because the kernel drops mid-registration, still lets the waiting callers through: the failure is written to standard error and registration is retried on the next connection, so `awaitRegistration()` returning does not prove that every artifact registered. After the first pass an append no longer waits for registration, but it still throws `ChronicleConnectionFailed` without calling the kernel while the connection stands refused; otherwise the call goes to the kernel, and an outage makes it fail with a gRPC `StatusException` or wait: handle all three. Connection problems are written to standard error as `[Chronicle] Connection lost: <status>`, not to a logging framework.
103
+
102
104
  The client emits OpenTelemetry spans under the `io.cratis.chronicle` scope with no client setup when the application runs the OpenTelemetry SDK: `Chronicle append <EventType>`, `Chronicle appendMany`, `Chronicle observe <EventType>`, `Chronicle reduce <EventType>` and the `observe batch` / `reduce batch` variants. A refused append or throwing handler ends its span with an error. An observation span is **not** a child of the append span; correlate them by the `chronicle.event_source_id` attribute or the correlation ID.
103
105
 
104
106
  ## Not supported in this SDK