@rizom/ops 0.2.0-alpha.211 → 0.2.0-alpha.212

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.
package/dist/schema.d.ts CHANGED
@@ -51,7 +51,7 @@ declare const atprotoSchema: z.ZodObject<{
51
51
  }>;
52
52
  declare const siteOverrideSchema: z.ZodObject<{
53
53
  package: z.ZodString;
54
- version: typeof exactVersionSchema;
54
+ version: z.ZodOptional<typeof exactVersionSchema>;
55
55
  theme: z.ZodOptional<z.ZodString>;
56
56
  }>;
57
57
  declare const playbooksSchema: z.ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rizom/ops",
3
- "version": "0.2.0-alpha.211",
3
+ "version": "0.2.0-alpha.212",
4
4
  "description": "Operator CLI for managing private brain fleet registry repos",
5
5
  "keywords": [
6
6
  "brains",
@@ -30,8 +30,8 @@ The repo also checks in its deploy contract:
30
30
 
31
31
  `.env.schema` is the single source of truth for required and sensitive deploy vars.
32
32
  Use separate GitHub tokens: `CONTENT_REPO_ADMIN_TOKEN` for operator-side content repo creation/checks, and `GIT_SYNC_TOKEN` for runtime directory-sync git access.
33
- The shared pilot image tag is `brain-${brainVersion}` end to end.
34
- When `pilot.yaml.brainVersion` changes and you push, CI rebuilds the shared tag, refreshes generated user env files, and redeploys affected users.
33
+ The default pilot image tag is `brain-${brainVersion}` end to end. A user with `siteOverride` gets an isolated `brain-${brainVersion}-sites-${packageHash}` image instead.
34
+ When the effective brain version (`pilot.yaml.brainVersion`, or a cohort override) changes and you push, CI rebuilds the required default/site tags, refreshes generated user env files, and redeploys affected users. An omitted `siteOverride.version` follows that effective version; an explicit exact version remains pinned.
35
35
  When a push changes only deploy contract files, CI prints `No affected user configs; skipping deploy.` and stops before Kamal.
36
36
 
37
37
  ## Commands
@@ -34,7 +34,7 @@
34
34
  - background jobs are not repeatedly failing, except for expected missing optional integrations
35
35
  - for `presetOverride: default` users:
36
36
  - initial site build completes
37
- 14. For fleet upgrades, edit `pilot.yaml.brainVersion` and push once; CI rebuilds the shared image tag, refreshes generated user env files, and redeploys affected users.
37
+ 14. For fleet upgrades, edit `pilot.yaml.brainVersion` and push once; CI rebuilds the required default/site image tags, refreshes generated user env files, and redeploys affected users. Site overrides follow the user's effective brain version unless they declare an explicit exact `version` pin.
38
38
  15. Confirm the user received the setup email, registered their passkey, and can sign in to web chat at `https://<handle>.rizom.ai/chat`. That completes the default onboarding; everything below is per-cohort extras.
39
39
  16. Hand over the browser surfaces:
40
40
  - Chat (primary): `https://<handle>.rizom.ai/chat`
@@ -14,21 +14,26 @@ Treat these as checked-in deploy artifacts in the pilot repo:
14
14
  `.env.schema` is the single source of truth for required and sensitive deploy vars.
15
15
  The deploy scripts and workflows should read from that contract instead of inventing a second list.
16
16
 
17
- The shared pilot image tag is `brain-${brainVersion}`:
17
+ The default pilot image tag is `brain-${brainVersion}`:
18
18
 
19
- - build publishes `brain-${brainVersion}`
19
+ - build publishes `brain-${brainVersion}` for users without a site override
20
+ - a site override gets an isolated `brain-${brainVersion}-sites-${packageHash}` image
20
21
  - generated `users/<handle>/.env` carries `BRAIN_VERSION=<brainVersion>`
21
- - deploy sets `VERSION=brain-${brainVersion}`
22
+ - build and deploy derive the same effective image tag from the resolved registry
22
23
 
23
24
  ## Version bump flow
24
25
 
25
26
  When `pilot.yaml.brainVersion` changes and you push:
26
27
 
27
- 1. build publishes the new shared image tag
28
+ 1. build publishes the new default image and any required site images
28
29
  2. reconcile refreshes generated `users/<handle>/.env`
29
30
  3. deploy runs for handles whose generated config changed
30
31
  4. generated file commits happen once in a final aggregation step after the deploy matrix finishes
31
32
 
33
+ An omitted `siteOverride.version` follows the user's effective brain version, so a
34
+ cohort or pilot version bump advances its site and theme packages automatically.
35
+ Set an exact `siteOverride.version` only when that user needs a deliberate pin.
36
+
32
37
  When a push changes only deploy contract files and no generated `users/<handle>/.env` or `users/<handle>/brain.yaml` files, the deploy workflow exits through its explicit no-op path and prints `No affected user configs; skipping deploy.`
33
38
 
34
39
  They are scaffolded from `@rizom/ops`, then versioned in this repo like any other deploy contract.
@@ -132,6 +137,41 @@ Rollback:
132
137
  - reconcile generated outputs
133
138
  - rebuild/redeploy the affected user
134
139
 
140
+ ## Hosted site and theme package contract
141
+
142
+ Start with the public [site mockup migration guide](https://github.com/rizom-ai/brains/blob/main/docs/site-mockup-migration.md), then apply these hosted-fleet requirements:
143
+
144
+ - A site package must default-export a valid `SitePackage` and use documented public APIs such as `@rizom/brain/site`.
145
+ - A theme package must default-export its CSS as a string. Hosted custom themes currently use the `@rizom/*` scope so the fleet image installs them with the site package; `@brains/*` themes are bundled with `@rizom/brain`.
146
+ - Site and custom theme packages must be public npm packages that install without registry credentials.
147
+ - Publish packages at the same exact version as the compatible `@rizom/brain` release. Hosted configuration resolves package names plus the effective version into exact npm refs.
148
+ - Keep site structure and theme CSS in separate packages. Do not put private content or secrets in either package.
149
+
150
+ Configure a user in `users/<handle>.yaml`:
151
+
152
+ ```yaml
153
+ siteOverride:
154
+ package: "@rizom/site-example"
155
+ theme: "@rizom/theme-example"
156
+ # version: <exact-brain-version> # optional deliberate pin
157
+ ```
158
+
159
+ When `version` is omitted, it defaults to the user's effective brain version
160
+ (cohort override first, then `pilot.yaml.brainVersion`). A site override produces
161
+ an isolated per-instance image; it never changes the fleet's shared default
162
+ image.
163
+
164
+ ### Custom-package canary and rollback
165
+
166
+ 1. Confirm the exact site/theme versions are public-installable without npm credentials.
167
+ 2. Apply the package names to one healthy `rover:default` canary.
168
+ 3. Reconcile the canary, push the generated output, and let build/deploy create its site image.
169
+ 4. Run `bunx brains-ops verify-user . <handle>`.
170
+ 5. Manually verify the site, theme, CMS, content sync, and passkey sign-in before adding more users.
171
+
172
+ To roll back, remove or change `siteOverride`, reconcile, and redeploy that user.
173
+ The default image and other users remain untouched.
174
+
135
175
  ## Setup email checklist
136
176
 
137
177
  Use this for browser/CMS-first users who should receive their own first-passkey setup link by email.