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

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.
@@ -1,3 +1,4 @@
1
1
  export { readJsonResponse, parseEnvFile, parseEnvSchema, parseEnvSchemaFile, requireEnv, writeGitHubOutput, writeGitHubEnv, } from "@brains/deploy-support";
2
2
  export type { EnvSchemaEntry } from "@brains/deploy-support";
3
- export { siteImageTag, sitePackagesFor, requiredImages, resolveImageBuilds, runResolveMissingImages, type ImageRequirementSource, type RequiredImage, type ResolveImageBuildsOptions, type RunResolveMissingImagesOptions, } from "../images";
3
+ export { siteImageTag, runtimeImageTag, sitePackagesFor, requiredImages, resolveImageBuilds, runResolveMissingImages, type ImageRequirementSource, type RequiredImage, type ResolveImageBuildsOptions, type RunResolveMissingImagesOptions, } from "../images";
4
+ export { SHARED_FLEET_IMAGE_CONTRACT, ISOLATED_SITE_IMAGE_CONTRACT, imageContractSchema, type ImageContract, } from "../schema";
package/dist/images.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { type ResolvedSiteOverride } from "./load-registry";
2
2
  import { type RunCommand } from "./run-subprocess";
3
+ import { type ImageContract } from "./schema";
3
4
  /**
4
5
  * Resolve a fleet image tag as a pure function of a single instance's own
5
6
  * config. This is the shared contract between the build (which tags the image
@@ -13,6 +14,8 @@ import { type RunCommand } from "./run-subprocess";
13
14
  * never collide with — or leak into — the shared default image.
14
15
  */
15
16
  export declare function siteImageTag(brainVersion: string, sitePackages: string[]): string;
17
+ /** Resolve the runtime tag selected by the pilot's explicit image contract. */
18
+ export declare function runtimeImageTag(imageContract: ImageContract, brainVersion: string, sitePackages: string[]): string;
16
19
  /**
17
20
  * The npm packages a site override installs into its per-instance image.
18
21
  * A @rizom-scoped theme is independently published and installs at its own
@@ -28,19 +31,19 @@ export interface ImageRequirementSource {
28
31
  export interface RequiredImage {
29
32
  tag: string;
30
33
  brainVersion: string;
31
- /** Sorted, deduped — build args for the image, empty for the default. */
34
+ /** Sorted, deduped package specs installed into this runtime image. */
32
35
  sitePackages: string[];
33
36
  }
34
37
  /**
35
- * The image set the declared fleet state requires: one default
36
- * `brain-{version}` per distinct brain version in use, plus one
37
- * `brain-{version}-sites-{hash}` per distinct site-override package set.
38
- * Derived purely from resolved users (pass `registry.users`), so CI can build
39
- * exactly what a config push declares — nothing reactive, nothing manual.
38
+ * Derive the immutable images required by the declared fleet. Shared fleets
39
+ * get one image per Brain version containing the union of packages required by
40
+ * every instance on that version. Fleets that explicitly retain isolated site
41
+ * images get one tag per distinct version/package set.
40
42
  */
41
- export declare function requiredImages(users: ImageRequirementSource[]): RequiredImage[];
43
+ export declare function requiredImages(users: ImageRequirementSource[], imageContract?: ImageContract): RequiredImage[];
42
44
  export interface ResolveImageBuildsOptions {
43
45
  users: ImageRequirementSource[];
46
+ imageContract?: ImageContract | undefined;
44
47
  /**
45
48
  * Explicit dispatch override — the manual/backfill path. When set, exactly
46
49
  * this one image is built, skipping the registry-derived resolve. Published
@@ -72,8 +75,8 @@ export interface RunResolveMissingImagesOptions {
72
75
  * state (pilot.yaml + cohorts + users) requires, probe the container registry
73
76
  * for each tag, and emit the missing ones as a GitHub Actions build matrix
74
77
  * (`images_json`, entries `{tag, brain_version, site_packages}`). Dispatch
75
- * inputs `BRAIN_VERSION_INPUT`/`SITE_PACKAGES_INPUT` force a single explicit
76
- * build instead. Deriving and probing here means a config push builds exactly
78
+ * inputs `BRAIN_VERSION_INPUT`/`SITE_PACKAGES_INPUT`/`IMAGE_CONTRACT_INPUT`
79
+ * force a single explicit build instead. Deriving and probing here means a config push builds exactly
77
80
  * what it declares — nothing reactive, nothing manual.
78
81
  */
79
82
  export declare function runResolveMissingImages(options: RunResolveMissingImagesOptions): Promise<RequiredImage[]>;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { initPilotRepo } from "./init";
2
2
  export { loadPilotRegistry, type LoadPilotRegistryOptions, } from "./load-registry";
3
- export { siteImageTag, sitePackagesFor, requiredImages, resolveImageBuilds, runResolveMissingImages, type ImageRequirementSource, type RequiredImage, type ResolveImageBuildsOptions, type RunResolveMissingImagesOptions, } from "./images";
3
+ export { siteImageTag, runtimeImageTag, sitePackagesFor, requiredImages, resolveImageBuilds, runResolveMissingImages, type ImageRequirementSource, type RequiredImage, type ResolveImageBuildsOptions, type RunResolveMissingImagesOptions, } from "./images";
4
4
  export { derivePreviewDomain, type PreviewDomainOptions, } from "./preview-domain";
5
5
  export { writeUsersTable } from "./render-users-table";
6
6
  export { onboardUser } from "./onboard-user";
@@ -18,4 +18,4 @@ export { assertDirectorySyncStressTarget, directorySyncStressPlanSchema, directo
18
18
  export { cleanupDirectorySyncStress, runDeployedDirectorySyncStress, verifyDirectorySyncStressAccess, type CleanupDirectorySyncStressOptions, type CleanupDirectorySyncStressResult, type DeployedDirectorySyncStressOptions, type DeployedDirectorySyncStressResult, type VerifyDirectorySyncStressAccessOptions, type VerifyDirectorySyncStressAccessResult, } from "./directory-sync-stress-system";
19
19
  export { assertHealthWatchdogSmokeTarget, cleanupHealthWatchdogSmoke, renderHealthWatchdogSmokeRemoteScript, runHealthWatchdogSmoke, type CleanupHealthWatchdogSmokeOptions, type CleanupHealthWatchdogSmokeResult, type HealthWatchdogSmokeOptions, type HealthWatchdogSmokeResult, type HealthWatchdogSmokeTarget, } from "./health-watchdog-smoke";
20
20
  export { runCommand, type CommandResult } from "./run-command";
21
- export { pilotSchema, cohortSchema, canonicalBundleIdSchema, CAPABILITY_BUNDLE_CONTRACT, type PilotConfig, type CohortConfig, } from "./schema";
21
+ export { pilotSchema, cohortSchema, canonicalBundleIdSchema, CAPABILITY_BUNDLE_CONTRACT, SHARED_FLEET_IMAGE_CONTRACT, ISOLATED_SITE_IMAGE_CONTRACT, imageContractSchema, type ImageContract, type PilotConfig, type CohortConfig, } from "./schema";