@rizom/ops 0.2.0-alpha.169 → 0.2.0-alpha.170

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,2 +1,3 @@
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";
package/dist/images.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import type { ResolvedSiteOverride } from "./load-registry";
1
+ import { type ResolvedSiteOverride } from "./load-registry";
2
+ import { type RunCommand } from "./run-subprocess";
2
3
  /**
3
4
  * Resolve a fleet image tag as a pure function of a single instance's own
4
5
  * config. This is the shared contract between the build (which tags the image
@@ -38,3 +39,38 @@ export interface RequiredImage {
38
39
  * exactly what a config push declares — nothing reactive, nothing manual.
39
40
  */
40
41
  export declare function requiredImages(users: ImageRequirementSource[]): RequiredImage[];
42
+ export interface ResolveImageBuildsOptions {
43
+ users: ImageRequirementSource[];
44
+ /**
45
+ * Explicit dispatch override — the manual/backfill path. When set, exactly
46
+ * this one image is built, skipping both the registry and the exists check.
47
+ */
48
+ brainVersionInput?: string | undefined;
49
+ sitePackagesInput?: string | undefined;
50
+ imageExists: (tag: string) => Promise<boolean>;
51
+ }
52
+ /**
53
+ * Decide which images a Build run must produce: the declared required set
54
+ * filtered to tags the registry does not already hold, or the single image an
55
+ * explicit dispatch input forces.
56
+ */
57
+ export declare function resolveImageBuilds(options: ResolveImageBuildsOptions): Promise<RequiredImage[]>;
58
+ export interface RunResolveMissingImagesOptions {
59
+ rootDir: string;
60
+ /** e.g. `ghcr.io/rizom-ai/rover-pilot` */
61
+ imageRepository: string;
62
+ env?: NodeJS.ProcessEnv;
63
+ runCommand?: RunCommand;
64
+ writeOutput: (key: string, value: string) => void;
65
+ log?: (line: string) => void;
66
+ }
67
+ /**
68
+ * The Build workflow's resolve step: derive the image set the declared fleet
69
+ * state (pilot.yaml + cohorts + users) requires, probe the container registry
70
+ * for each tag, and emit the missing ones as a GitHub Actions build matrix
71
+ * (`images_json`, entries `{tag, brain_version, site_packages}`). Dispatch
72
+ * inputs `BRAIN_VERSION_INPUT`/`SITE_PACKAGES_INPUT` force a single explicit
73
+ * build instead. Deriving and probing here means a config push builds exactly
74
+ * what it declares — nothing reactive, nothing manual.
75
+ */
76
+ 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, type ImageRequirementSource, type RequiredImage, } from "./images";
3
+ export { siteImageTag, sitePackagesFor, requiredImages, resolveImageBuilds, runResolveMissingImages, type ImageRequirementSource, type RequiredImage, type ResolveImageBuildsOptions, type RunResolveMissingImagesOptions, } from "./images";
4
4
  export { writeUsersTable } from "./render-users-table";
5
5
  export { onboardUser } from "./onboard-user";
6
6
  export { addPilotUser } from "./user-add";