@rizom/ops 0.2.0-alpha.351 → 0.2.0-alpha.352

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
@@ -4,13 +4,6 @@ export declare const handleSchema: z.ZodString;
4
4
  export declare const secretNameSchema: z.ZodString;
5
5
  export declare const agePublicKeySchema: z.ZodString;
6
6
  export declare const CAPABILITY_BUNDLE_CONTRACT: "capability-bundles-v1";
7
- export declare const SHARED_FLEET_IMAGE_CONTRACT: "shared-fleet-v1";
8
- export declare const ISOLATED_SITE_IMAGE_CONTRACT: "isolated-sites-v1";
9
- export declare const imageContractSchema: z.ZodEnum<{
10
- "shared-fleet-v1": "shared-fleet-v1";
11
- "isolated-sites-v1": "isolated-sites-v1";
12
- }>;
13
- export type ImageContract = z.output<typeof imageContractSchema>;
14
7
  export declare const canonicalBundleIdSchema: z.ZodEnum<{
15
8
  core: "core";
16
9
  media: "media";
@@ -35,39 +28,34 @@ export declare const profileKindSchema: z.ZodEnum<{
35
28
  team: "team";
36
29
  organization: "organization";
37
30
  }>;
38
- export interface PilotConfig {
39
- brainVersion: string;
40
- bundleContract: typeof CAPABILITY_BUNDLE_CONTRACT;
41
- imageContract: ImageContract;
42
- bundles: CanonicalBundleId[];
43
- add?: string[] | undefined;
44
- remove?: string[] | undefined;
45
- githubOrg: string;
46
- contentRepoPrefix: string;
47
- domainSuffix: string;
48
- aiApiKey: string;
49
- gitSyncToken: string;
50
- contentRepoAdminToken: string;
51
- agePublicKey: string;
52
- }
53
- export interface SiteOverrideConfig {
54
- package: string;
55
- version: string;
56
- theme?: string | undefined;
57
- themeVersion?: string | undefined;
58
- }
59
- export interface CohortConfig {
60
- members: string[];
61
- brainVersionOverride?: string | undefined;
62
- bundlesOverride?: CanonicalBundleId[] | undefined;
63
- addOverride?: string[] | undefined;
64
- removeOverride?: string[] | undefined;
65
- aiApiKeyOverride?: string | undefined;
66
- gitSyncTokenOverride?: string | undefined;
67
- }
31
+ declare const canonicalBundlesSchema: z.ZodArray<typeof canonicalBundleIdSchema>;
32
+ declare const memberIdsSchema: z.ZodArray<z.ZodString>;
68
33
  /** Sole active desired-state contract for the canonical brain. */
69
- export declare const pilotSchema: z.ZodType<PilotConfig>;
70
- export declare const cohortSchema: z.ZodType<CohortConfig>;
34
+ export declare const pilotSchema: z.ZodObject<{
35
+ brainVersion: z.ZodString;
36
+ bundleContract: z.ZodLiteral<typeof CAPABILITY_BUNDLE_CONTRACT>;
37
+ bundles: typeof canonicalBundlesSchema;
38
+ add: z.ZodOptional<typeof memberIdsSchema>;
39
+ remove: z.ZodOptional<typeof memberIdsSchema>;
40
+ githubOrg: z.ZodString;
41
+ contentRepoPrefix: z.ZodString;
42
+ domainSuffix: z.ZodString;
43
+ aiApiKey: z.ZodString;
44
+ gitSyncToken: z.ZodString;
45
+ contentRepoAdminToken: z.ZodString;
46
+ agePublicKey: z.ZodString;
47
+ }, z.core.$strict>;
48
+ export type PilotConfig = z.output<typeof pilotSchema>;
49
+ export declare const cohortSchema: z.ZodObject<{
50
+ members: z.ZodArray<z.ZodString>;
51
+ brainVersionOverride: z.ZodOptional<z.ZodString>;
52
+ bundlesOverride: z.ZodOptional<typeof canonicalBundlesSchema>;
53
+ addOverride: z.ZodOptional<typeof memberIdsSchema>;
54
+ removeOverride: z.ZodOptional<typeof memberIdsSchema>;
55
+ aiApiKeyOverride: z.ZodOptional<z.ZodString>;
56
+ gitSyncTokenOverride: z.ZodOptional<z.ZodString>;
57
+ }, z.core.$strict>;
58
+ export type CohortConfig = z.output<typeof cohortSchema>;
71
59
  declare const anchorProfileSocialLinkSchema: z.ZodObject<{
72
60
  platform: z.ZodEnum<{
73
61
  github: "github";
@@ -117,7 +105,13 @@ declare const atprotoSchema: z.ZodObject<{
117
105
  lexiconAuthority: z.ZodOptional<z.ZodBoolean>;
118
106
  jetstream: z.ZodOptional<typeof atprotoJetstreamSchema>;
119
107
  }>;
120
- export declare const siteOverrideSchema: z.ZodType<SiteOverrideConfig>;
108
+ export declare const siteOverrideSchema: z.ZodObject<{
109
+ package: z.ZodString;
110
+ version: z.ZodString;
111
+ theme: z.ZodOptional<z.ZodString>;
112
+ themeVersion: z.ZodOptional<z.ZodString>;
113
+ }, z.core.$strict>;
114
+ export type SiteOverrideConfig = z.output<typeof siteOverrideSchema>;
121
115
  declare const playbooksSchema: z.ZodObject<{
122
116
  onboarding: z.ZodOptional<z.ZodBoolean>;
123
117
  }>;
@@ -1,12 +1,14 @@
1
+ import { z } from "@brains/utils/zod";
1
2
  import { type CapabilityBundleReview } from "./capability-bundle-migration";
2
- import { type SiteOverrideConfig } from "./schema";
3
+ import { siteOverrideSchema } from "./schema";
3
4
  export interface StagedCrossover {
4
5
  outputDir: string;
5
6
  changedFiles: string[];
6
7
  }
7
- interface ReviewedSitePinManifest {
8
- sites: Record<string, SiteOverrideConfig>;
9
- }
8
+ declare const reviewedSitePinsSchema: z.ZodObject<{
9
+ sites: z.ZodRecord<z.ZodString, typeof siteOverrideSchema>;
10
+ }, z.core.$strict>;
11
+ type ReviewedSitePinManifest = z.output<typeof reviewedSitePinsSchema>;
10
12
  export type ReviewedSitePins = ReviewedSitePinManifest["sites"];
11
13
  export interface StageLegacyCrossoverOptions {
12
14
  sitePins?: ReviewedSitePins | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rizom/ops",
3
- "version": "0.2.0-alpha.351",
3
+ "version": "0.2.0-alpha.352",
4
4
  "description": "Operator CLI for managing private brain fleet registry repos",
5
5
  "keywords": [
6
6
  "brains",
@@ -11,14 +11,6 @@ on:
11
11
  description: "Space-separated exact site/theme packages for one explicit image build. Shared-fleet automatic builds derive the version-wide package union from desired state."
12
12
  required: false
13
13
  type: string
14
- image_contract:
15
- description: Image contract for an explicit version build
16
- required: false
17
- type: choice
18
- options:
19
- - isolated-sites-v1
20
- - shared-fleet-v1
21
- default: isolated-sites-v1
22
14
  overwrite:
23
15
  description: Rebuild an existing tag in place. Published tags are immutable; confirm only when replacing a tag whose containers were never deployed.
24
16
  required: false
@@ -67,7 +59,6 @@ jobs:
67
59
  env:
68
60
  BRAIN_VERSION_INPUT: ${{ inputs.brain_version || '' }}
69
61
  SITE_PACKAGES_INPUT: ${{ inputs.site_packages || '' }}
70
- IMAGE_CONTRACT_INPUT: ${{ inputs.image_contract || 'isolated-sites-v1' }}
71
62
  ALLOW_TAG_OVERWRITE: ${{ inputs.overwrite && 'true' || 'false' }}
72
63
  run: bun deploy/scripts/resolve-missing-images.ts
73
64
 
@@ -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
- `pilot.yaml.imageContract` makes image topology explicit. The default `shared-fleet-v1` contract publishes one `brain-${brainVersion}` image per effective Brain version and installs the union of exact site/theme package pins required by instances on that version. `isolated-sites-v1` remains available only for fleets that deliberately require package-isolated images.
34
- When an effective brain version (`pilot.yaml.brainVersion`, or a cohort override) changes and you push, CI builds every missing shared version image, refreshes generated user env files, and redeploys affected users. Every external site and theme package keeps its own exact version pin; under the shared contract, change that package set only together with a fresh Brain version so published tags remain immutable.
33
+ The fleet publishes one `brain-${brainVersion}` image per effective Brain version and installs the union of exact site/theme package pins required by instances on that version.
34
+ When an effective brain version (`pilot.yaml.brainVersion`, or a cohort override) changes and you push, CI builds every missing version image, refreshes generated user env files, and redeploys affected users. Every external site and theme package keeps its own exact version pin; change that package set only together with a fresh Brain version so published tags remain immutable.
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
@@ -6,9 +6,7 @@ export {
6
6
  requireEnv,
7
7
  writeGitHubOutput,
8
8
  writeGitHubEnv,
9
- siteImageTag,
10
9
  runtimeImageTag,
11
- sitePackagesFor,
12
10
  runResolveMissingImages,
13
11
  } from "@rizom/ops/deploy";
14
12
  export type { EnvSchemaEntry } from "@rizom/ops/deploy";
@@ -6,7 +6,6 @@ import {
6
6
  parseEnvFile,
7
7
  requireEnv,
8
8
  runtimeImageTag,
9
- sitePackagesFor,
10
9
  writeGitHubOutput,
11
10
  } from "./helpers";
12
11
 
@@ -43,15 +42,9 @@ const wwwDomain = isFleetDomain(
43
42
 
44
43
  const brainVersion = envEntries["BRAIN_VERSION"] ?? "";
45
44
 
46
- // Build and deploy share one tag function. A shared fleet always resolves to
47
- // `brain-{version}`; an explicitly isolated fleet may include the instance's
48
- // exact site package set in its tag.
49
- const sitePackages = sitePackagesFor(user.siteOverride);
50
- const imageTag = runtimeImageTag(
51
- registry.pilot.imageContract,
52
- brainVersion,
53
- sitePackages,
54
- );
45
+ // Build and Deploy share one tag function: every instance on a Brain version
46
+ // runs the same immutable fleet image.
47
+ const imageTag = runtimeImageTag(brainVersion);
55
48
 
56
49
  const outputs: Record<string, string> = {
57
50
  brain_version: brainVersion,
@@ -16,12 +16,11 @@ Treat these as checked-in deploy artifacts in the pilot repo:
16
16
  `.env.schema` is the single source of truth for required and sensitive deploy vars.
17
17
  The deploy scripts and workflows should read from that contract instead of inventing a second list.
18
18
 
19
- The pilot declares its image topology with `pilot.yaml.imageContract`:
19
+ The fleet has one image topology:
20
20
 
21
- - `shared-fleet-v1` publishes one `brain-${brainVersion}` image for each effective Brain version
22
- - each shared image contains the union of exact site/theme package pins required by instances on that version
21
+ - one immutable `brain-${brainVersion}` image is published for each effective Brain version
22
+ - each image contains the union of exact site/theme package pins required by instances on that version
23
23
  - conflicting versions of one package fail image resolution before build
24
- - `isolated-sites-v1` is an explicit alternative for fleets that require package-isolated tags
25
24
  - generated `users/<handle>/.env` carries `BRAIN_VERSION=<brainVersion>`
26
25
  - build and deploy derive the same effective image tag from the resolved registry
27
26
 
@@ -262,12 +261,12 @@ siteOverride:
262
261
  themeVersion: <exact-theme-version>
263
262
  ```
264
263
 
265
- Missing external package versions fail desired-state validation. Under
266
- `shared-fleet-v1`, every instance on one Brain version uses the same image and exact
267
- package union. Change a site/theme package pin only together with a fresh Brain version;
268
- published `brain-${brainVersion}` tags remain immutable. Conflicting pins for one package
269
- on the same Brain version fail before build. Bundled `@brains/*` themes omit
270
- `themeVersion` because they are not installed as separate packages.
264
+ Missing external package versions fail desired-state validation. Every instance on one
265
+ Brain version uses the same image and exact package union. Change a site/theme package
266
+ pin only together with a fresh Brain version; published `brain-${brainVersion}` tags
267
+ remain immutable. Conflicting pins for one package on the same Brain version fail before
268
+ build. Bundled `@brains/*` themes omit `themeVersion` because they are not installed as
269
+ separate packages.
271
270
 
272
271
  ### Custom-package canary and rollback
273
272
 
@@ -277,8 +276,9 @@ on the same Brain version fail before build. Bundled `@brains/*` themes omit
277
276
  4. Run `bunx brains-ops verify-user . <handle>`.
278
277
  5. Manually verify the site, theme, Studio, content sync, and passkey sign-in before adding more users.
279
278
 
280
- To roll back, remove or change `siteOverride`, reconcile, and redeploy that user.
281
- The default image and other users remain untouched.
279
+ To roll back, remove or change `siteOverride` while selecting a fresh Brain version,
280
+ then reconcile and redeploy that user. Never mutate an existing image tag; coordinate any
281
+ other users intentionally sharing the selected version.
282
282
 
283
283
  ## Setup email checklist
284
284
 
@@ -1,6 +1,5 @@
1
1
  brainVersion: 0.1.1-alpha.14
2
2
  bundleContract: capability-bundles-v1
3
- imageContract: shared-fleet-v1
4
3
  githubOrg: <github-org>
5
4
  contentRepoPrefix: rover-
6
5
  domainSuffix: .rizom.ai