@cratis/pi 7.125.2 → 7.127.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 (57) hide show
  1. package/package/corpus/agents/spec-writer.md +2 -2
  2. package/package/corpus/harnesses/copilot/instructions/application-profile.instructions.md +1 -1
  3. package/package/corpus/harnesses/copilot/instructions/fast-feedback.instructions.md +37 -0
  4. package/package/corpus/harnesses/copilot/instructions/profiles.instructions.md +3 -2
  5. package/package/corpus/harnesses/copilot/instructions/secrets.instructions.md +1 -1
  6. package/package/corpus/harnesses/copilot/instructions/specs.csharp.instructions.md +1 -1
  7. package/package/corpus/harnesses/copilot/instructions/specs.instructions.md +7 -1
  8. package/package/corpus/harnesses/copilot/instructions/specs.scenarios.csharp.instructions.md +40 -3
  9. package/package/corpus/harnesses/copilot/instructions/vertical-slices.instructions.md +1 -1
  10. package/package/corpus/harnesses/pi/agents/spec-writer.md +2 -2
  11. package/package/corpus/hooks/README.md +1 -1
  12. package/package/corpus/hooks/scripts/cratis-guard-secrets.sh +13 -2
  13. package/package/corpus/rules/application-profile.md +1 -1
  14. package/package/corpus/rules/fast-feedback.md +36 -0
  15. package/package/corpus/rules/general.md +1 -0
  16. package/package/corpus/rules/profiles.md +3 -2
  17. package/package/corpus/rules/secrets.md +1 -1
  18. package/package/corpus/rules/specs.csharp.md +1 -1
  19. package/package/corpus/rules/specs.md +7 -1
  20. package/package/corpus/rules/specs.scenarios.csharp.md +40 -3
  21. package/package/corpus/rules/vertical-slices.md +1 -1
  22. package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +15 -10
  23. package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/SKILL.md +1 -1
  24. package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authproxy.md +26 -0
  25. package/package/corpus/skills/cratis-arc-command/SKILL.md +7 -4
  26. package/package/corpus/skills/cratis-chronicle-event-specifications/SKILL.md +5 -0
  27. package/package/corpus/skills/cratis-chronicle-reactor/references/specifications.md +23 -2
  28. package/package/corpus/skills/cratis-chronicle-read-model-specifications/SKILL.md +6 -3
  29. package/package/corpus/skills/cratis-chronicle-reducer/SKILL.md +2 -2
  30. package/package/corpus/skills/cratis-code-review/SKILL.md +4 -2
  31. package/package/corpus/skills/cratis-environments-and-secrets/LICENSE +9 -0
  32. package/package/corpus/skills/cratis-environments-and-secrets/SKILL.md +112 -0
  33. package/package/corpus/skills/cratis-environments-and-secrets/references/environment-file.md +48 -0
  34. package/package/corpus/skills/cratis-onboarding-runtime/LICENSE +9 -0
  35. package/package/corpus/skills/cratis-onboarding-runtime/SKILL.md +94 -0
  36. package/package/corpus/skills/cratis-onboarding-runtime/references/ante-onboarding-keys.md +31 -0
  37. package/package/corpus/skills/cratis-onboarding-runtime/references/performance.md +86 -0
  38. package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/LICENSE +9 -0
  39. package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/SKILL.md +111 -0
  40. package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/references/onboarding-directives.md +89 -0
  41. package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/verification.json +32 -0
  42. package/package/corpus/skills/cratis-screenplay-command-surface/references/policy-persona-seed.md +1 -0
  43. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +1 -1
  44. package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +2 -0
  45. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +8 -0
  46. package/package/corpus/skills/cratis-screenplay-toolchain/references/neighbouring-skills.md +2 -0
  47. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract-exceptions.json +70 -0
  48. package/package/corpus/skills/cratis-showrunner-herald/LICENSE +9 -0
  49. package/package/corpus/skills/cratis-showrunner-herald/SKILL.md +106 -0
  50. package/package/corpus/skills/cratis-showrunner-herald/references/options.md +35 -0
  51. package/package/corpus/skills/cratis-showrunner-herald/references/templates-and-images.md +70 -0
  52. package/package/corpus/skills/cratis-specifications-csharp/SKILL.md +2 -2
  53. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +5 -0
  54. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/rendered-application.md +39 -0
  55. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +7 -0
  56. package/package/profile-catalog.json +6 -2
  57. package/package.json +1 -1
@@ -6,6 +6,7 @@
6
6
  - Runtime package migration
7
7
  - Lists on screen
8
8
  - Reducer layout for new applications
9
+ - Authentication and onboarding
9
10
  - What is managed
10
11
  - `Customizations/` (unmanaged)
11
12
  - Re-render checklist
@@ -104,6 +105,44 @@ an existing classic application to `self`: observer identity and old reducer rem
104
105
  need migration-aware publication. This opt-in does not automatically change CLI,
105
106
  Studio or semantic-engine execution.
106
107
 
108
+ ## Authentication and onboarding
109
+
110
+ A model with an `authentication` block renders an application that runs behind AuthProxy
111
+ and trusts the identity it forwards. The model's `onboarding` block renders the code that
112
+ acts on the outcomes of the application's own Ante. Both are realized by the renderer;
113
+ none of it is hand-written gap-fill.
114
+
115
+ Requires cratis CLI 3.116.0 with Stage 4.211.0 (`cratis --version`); older releases report `authentication` and `onboarding` as unrendered warnings.
116
+
117
+ | Rendered | Purpose |
118
+ | --- | --- |
119
+ | `appsettings.json` with `Cratis:Arc:TrustForwardedIdentityHeaders` true | Arc builds the caller from the headers AuthProxy forwards. |
120
+ | `GeneratedAuthentication/` (`Personas`, `MemberIdentity`, `RuntimeConventions`) | Roles and claims per persona, the identity of a person, and the Chronicle connection string read from `CRATIS_CHRONICLE_CONNECTION_STRING_FILE`. |
121
+ | `GeneratedOnboarding/` | Reactor on Ante's outcomes, idempotent provisioning, the invite-member command, member persona claims, Herald email sending. |
122
+ | `Emails/` | Email templates and images laid out for Herald. |
123
+ | `.runtime/authproxy.application.json`, `.runtime/ante.onboarding.json`, `.runtime/environment.json` | What a runtime (`cratis run`, Stage Manager) starts AuthProxy and Ante with, and the environment keys the model needs. |
124
+
125
+ - The identity headers are unsigned. Never expose a rendered application with authentication
126
+ except through AuthProxy.
127
+ - Only provider kinds AuthProxy supports render (`EntraId`, `GitHub`, `Google`, `Apple`,
128
+ `OpenId`). Another kind is left out with `STAGE-AUTH-001`; a persona that is not a
129
+ requirement on authentication, roles or claims is never matched (`STAGE-AUTH-002`).
130
+ - `offering` renders nothing (`STAGE-ONBOARDING-001`): tenants are provisioned without
131
+ licensing. `STAGE-ONBOARDING-002` to `-006` cover a tenant invitation with no command,
132
+ a sign-up without a first-member persona, a legal document count other than two, a
133
+ missing email template and an invitation without inviters.
134
+ - An invitation Ante rejects (a persona or invitation type the model does not allow) is a
135
+ mistake in the invitation, not a decision about the person: the application records
136
+ `OnboardingInvitationRejected` and logs a warning for an administrator, and emails no
137
+ one. The `signupDeclined` template renders but is not sent until Ante publishes a
138
+ declined sign-up (`STAGE-ONBOARDING-007`).
139
+ - An application with onboarding pins a newer Chronicle client and kernel image than
140
+ other applications; read them from the rendered files.
141
+ - Realization needs the model folder: email images are read from the model root.
142
+
143
+ Read the Stage references `authentication-rendering.md` and `onboarding-rendering.md` for
144
+ exact files and keys.
145
+
107
146
  ## What is managed
108
147
 
109
148
  Every path in `.cratis-render.json` is managed: the scaffold files (project, solution,
@@ -49,6 +49,13 @@ ports or an authenticated proxy). Rendered applications use the renderer's admit
49
49
  authorization instead, which is the thing to test for production behavior (Debug tests
50
50
  of a render, [render-example.md](render-example.md)).
51
51
 
52
+ `Stage__Sandbox__ForwardedIdentity=true` (`Stage:Sandbox:ForwardedIdentity`) is the exception:
53
+ the sandbox runs behind AuthProxy, trusts the identity it forwards and plays no persona, so the
54
+ signed-in caller is the caller authorization runs for. It overrides `Stage:Sandbox:Identity`.
55
+ `cratis run` sets it when the model declares `authentication`; set it yourself only behind an
56
+ AuthProxy, because the headers are unsigned and anything that can reach the sandbox directly
57
+ can forge them. Requires Stage 4.211.0; an older sandbox ignores the setting.
58
+
52
59
  The semantic Host encrypts personal-data and secret concepts at rest through Chronicle and
53
60
  releases values on read; erasure deletes event-source keys. Encryption applies to new
54
61
  writes only: events already stored in plaintext in an existing Play store are not
@@ -522,7 +522,8 @@
522
522
  "cratis-chronicle-reducer",
523
523
  "cratis-event-model-diagram",
524
524
  "cratis-multi-service-architecture",
525
- "cratis-multi-service-local-orchestration"
525
+ "cratis-multi-service-local-orchestration",
526
+ "cratis-showrunner-herald"
526
527
  ],
527
528
  "languages": [
528
529
  "csharp",
@@ -623,7 +624,8 @@
623
624
  "availableTargets": [
624
625
  "cratis-commits-and-pull-requests",
625
626
  "cratis-rtk",
626
- "cratis-chronicle-cli-operations"
627
+ "cratis-chronicle-cli-operations",
628
+ "cratis-environments-and-secrets"
627
629
  ],
628
630
  "languages": [
629
631
  "shell"
@@ -953,6 +955,7 @@
953
955
  "availableTargets": [
954
956
  "cratis-commits-and-pull-requests",
955
957
  "cratis-rtk",
958
+ "cratis-screenplay-authentication-and-onboarding",
956
959
  "cratis-screenplay-automations-and-translations",
957
960
  "cratis-screenplay-captures-and-reactions",
958
961
  "cratis-screenplay-command-surface",
@@ -1026,6 +1029,7 @@
1026
1029
  "availableTargets": [
1027
1030
  "cratis-commits-and-pull-requests",
1028
1031
  "cratis-rtk",
1032
+ "cratis-onboarding-runtime",
1029
1033
  "cratis-stage-rendering-and-sandbox"
1030
1034
  ],
1031
1035
  "languages": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "7.125.2",
3
+ "version": "7.127.0",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [