@rizom/ops 0.2.0-alpha.44 → 0.2.0-alpha.441
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/README.md +82 -1
- package/dist/age-key-bootstrap.d.ts +1 -1
- package/dist/brains-ops.js +736 -335
- package/dist/capability-bundle-migration.d.ts +22 -0
- package/dist/cert-bootstrap.d.ts +4 -2
- package/dist/content-repo-ref.d.ts +10 -0
- package/dist/content-repo.d.ts +1 -1
- package/dist/deploy.js +110 -166
- package/dist/directory-sync-stress-system.d.ts +75 -0
- package/dist/directory-sync-stress.d.ts +117 -0
- package/dist/entries/deploy.d.ts +4 -2
- package/dist/health-watchdog-smoke.d.ts +54 -0
- package/dist/image-inventory.d.ts +4 -0
- package/dist/image-types.d.ts +7 -0
- package/dist/images.d.ts +82 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +736 -323
- package/dist/legacy-pilot-migration.d.ts +11 -0
- package/dist/legacy-projection-job-recovery.d.ts +29 -0
- package/dist/load-registry.d.ts +61 -6
- package/dist/observed-status.d.ts +1 -1
- package/dist/parse-args.d.ts +2 -12
- package/dist/preview-domain.d.ts +9 -0
- package/dist/reconcile-dry-run.d.ts +9 -0
- package/dist/run-command.d.ts +20 -4
- package/dist/schema.d.ts +126 -163
- package/dist/secrets-encrypt.d.ts +7 -13
- package/dist/secrets-push.d.ts +1 -1
- package/dist/ssh-key-bootstrap.d.ts +1 -26
- package/dist/stage-legacy-crossover.d.ts +25 -0
- package/dist/stress-command.d.ts +14 -0
- package/dist/stress-git-checkout.d.ts +21 -0
- package/dist/stress-health-monitor.d.ts +46 -0
- package/dist/upgrade.d.ts +10 -0
- package/dist/user-offboard.d.ts +61 -0
- package/dist/verify-user.d.ts +22 -0
- package/package.json +50 -42
- package/templates/rover-pilot/.env.schema +20 -5
- package/templates/rover-pilot/.github/actions/varlock-env/action.yml +47 -0
- package/templates/rover-pilot/.github/workflows/build.yml +70 -17
- package/templates/rover-pilot/.github/workflows/deploy.yml +74 -57
- package/templates/rover-pilot/.github/workflows/directory-sync-stress.yml +119 -0
- package/templates/rover-pilot/.github/workflows/health-watchdog-smoke.yml +95 -0
- package/templates/rover-pilot/.github/workflows/offboard.yml +107 -0
- package/templates/rover-pilot/.github/workflows/reconcile.yml +10 -4
- package/templates/rover-pilot/.github/workflows/upgrade.yml +104 -0
- package/templates/rover-pilot/README.md +13 -5
- package/templates/rover-pilot/deploy/scripts/create-predeploy-backup.ts +936 -0
- package/templates/rover-pilot/deploy/scripts/decrypt-user-secrets.ts +80 -24
- package/templates/rover-pilot/deploy/scripts/helpers.ts +2 -0
- package/templates/rover-pilot/deploy/scripts/install-health-watchdog.ts +144 -0
- package/templates/rover-pilot/deploy/scripts/provision-server.ts +51 -21
- package/templates/rover-pilot/deploy/scripts/resolve-deploy-handles.ts +4 -0
- package/templates/rover-pilot/deploy/scripts/resolve-missing-images.ts +13 -0
- package/templates/rover-pilot/deploy/scripts/resolve-user-config.ts +40 -9
- package/templates/rover-pilot/deploy/scripts/sync-content-repo.ts +51 -47
- package/templates/rover-pilot/deploy/scripts/update-dns.ts +72 -16
- package/templates/rover-pilot/deploy/scripts/validate-secrets.ts +12 -1
- package/templates/rover-pilot/deploy/scripts/verify-runtime-image.ts +18 -0
- package/templates/rover-pilot/docs/canonical-crossover-record.md +107 -0
- package/templates/rover-pilot/docs/onboarding-checklist.md +23 -14
- package/templates/rover-pilot/docs/operator-playbook.md +357 -29
- package/templates/rover-pilot/docs/user-onboarding.md +48 -463
- package/templates/rover-pilot/package.json +1 -0
- package/templates/rover-pilot/pilot.yaml +6 -4
- package/dist/origin-ca.d.ts +0 -1
- package/dist/push-secrets.d.ts +0 -9
- package/dist/push-target.d.ts +0 -2
- package/dist/run-subprocess.d.ts +0 -6
- package/templates/rover-pilot/.kamal/hooks/pre-deploy +0 -9
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { FetchLike } from "@brains/utils/fetch-like";
|
|
2
|
+
import { type DirectorySyncStressPhase, type DirectorySyncStressPlan, type DirectorySyncStressProfile, type DirectorySyncStressReport, type StressRuntimeSample } from "./directory-sync-stress";
|
|
3
|
+
import { type StressCommandRunner } from "./stress-command";
|
|
4
|
+
export { runStressCommand, type StressCommandOptions, type StressCommandResult, type StressCommandRunner, } from "./stress-command";
|
|
5
|
+
export interface DeployedDirectorySyncStressOptions {
|
|
6
|
+
rootDir: string;
|
|
7
|
+
handle: string;
|
|
8
|
+
profile: DirectorySyncStressProfile;
|
|
9
|
+
plan?: DirectorySyncStressPlan;
|
|
10
|
+
confirmation: string;
|
|
11
|
+
artifactsDir?: string;
|
|
12
|
+
env?: NodeJS.ProcessEnv;
|
|
13
|
+
fetchImpl?: FetchLike;
|
|
14
|
+
commandRunner?: StressCommandRunner;
|
|
15
|
+
logger?: (message: string) => void;
|
|
16
|
+
now?: () => Date;
|
|
17
|
+
sleep?: (milliseconds: number) => Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
export interface VerifyDirectorySyncStressAccessOptions {
|
|
20
|
+
rootDir: string;
|
|
21
|
+
handle: string;
|
|
22
|
+
confirmation: string;
|
|
23
|
+
artifactsDir?: string;
|
|
24
|
+
env?: NodeJS.ProcessEnv;
|
|
25
|
+
commandRunner?: StressCommandRunner;
|
|
26
|
+
now?: () => Date;
|
|
27
|
+
}
|
|
28
|
+
export interface CleanupDirectorySyncStressOptions {
|
|
29
|
+
rootDir: string;
|
|
30
|
+
handle: string;
|
|
31
|
+
confirmation: string;
|
|
32
|
+
artifactsDir?: string;
|
|
33
|
+
env?: NodeJS.ProcessEnv;
|
|
34
|
+
commandRunner?: StressCommandRunner;
|
|
35
|
+
logger?: (message: string) => void;
|
|
36
|
+
now?: () => Date;
|
|
37
|
+
}
|
|
38
|
+
export interface DeployedDirectorySyncStressResult {
|
|
39
|
+
runId: string;
|
|
40
|
+
artifactsDir: string;
|
|
41
|
+
target: {
|
|
42
|
+
handle: string;
|
|
43
|
+
domain: string;
|
|
44
|
+
contentRepo: string;
|
|
45
|
+
};
|
|
46
|
+
startedAt: string;
|
|
47
|
+
completedAt: string;
|
|
48
|
+
report: DirectorySyncStressReport;
|
|
49
|
+
}
|
|
50
|
+
export interface VerifyDirectorySyncStressAccessResult {
|
|
51
|
+
success: true;
|
|
52
|
+
artifactsDir: string;
|
|
53
|
+
checkedAt: string;
|
|
54
|
+
remoteHead: string;
|
|
55
|
+
target: {
|
|
56
|
+
handle: string;
|
|
57
|
+
domain: string;
|
|
58
|
+
contentRepo: string;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export interface CleanupDirectorySyncStressResult {
|
|
62
|
+
success: boolean;
|
|
63
|
+
artifactsDir: string;
|
|
64
|
+
probesRemoved: number;
|
|
65
|
+
probesRemaining: number;
|
|
66
|
+
backupBranchesDeleted: string[];
|
|
67
|
+
cleanupCommit?: string;
|
|
68
|
+
}
|
|
69
|
+
export declare function runDeployedDirectorySyncStress(options: DeployedDirectorySyncStressOptions): Promise<DeployedDirectorySyncStressResult>;
|
|
70
|
+
export declare function verifyDirectorySyncStressAccess(options: VerifyDirectorySyncStressAccessOptions): Promise<VerifyDirectorySyncStressAccessResult>;
|
|
71
|
+
export declare function cleanupDirectorySyncStress(options: CleanupDirectorySyncStressOptions): Promise<CleanupDirectorySyncStressResult>;
|
|
72
|
+
export declare function applyDirectorySyncStressPhase(checkoutDir: string, phase: DirectorySyncStressPhase): Promise<void>;
|
|
73
|
+
export declare function listProbeFiles(checkoutDir: string): Promise<string[]>;
|
|
74
|
+
export declare function removeProbeFiles(checkoutDir: string): Promise<number>;
|
|
75
|
+
export declare function parseStressRuntimeSample(output: string, timestamp: string): StressRuntimeSample | undefined;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { FetchLike } from "@brains/utils/fetch-like";
|
|
2
|
+
import { z } from "@brains/utils/zod";
|
|
3
|
+
export declare const directorySyncStressProfileSchema: z.ZodEnum<{
|
|
4
|
+
regression: "regression";
|
|
5
|
+
load: "load";
|
|
6
|
+
stress: "stress";
|
|
7
|
+
}>;
|
|
8
|
+
export type DirectorySyncStressProfile = z.output<typeof directorySyncStressProfileSchema>;
|
|
9
|
+
export declare const directorySyncStressOperationSchema: z.ZodEnum<{
|
|
10
|
+
add: "add";
|
|
11
|
+
update: "update";
|
|
12
|
+
rename: "rename";
|
|
13
|
+
delete: "delete";
|
|
14
|
+
}>;
|
|
15
|
+
export type DirectorySyncStressOperation = z.output<typeof directorySyncStressOperationSchema>;
|
|
16
|
+
export declare const directorySyncStressPhaseSchema: z.ZodObject<{
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
operation: typeof directorySyncStressOperationSchema;
|
|
19
|
+
count: z.ZodNumber;
|
|
20
|
+
targetProbeCount: z.ZodNumber;
|
|
21
|
+
settleMs: z.ZodNumber;
|
|
22
|
+
}>;
|
|
23
|
+
export type DirectorySyncStressPhase = z.output<typeof directorySyncStressPhaseSchema>;
|
|
24
|
+
export declare const directorySyncStressPlanSchema: z.ZodObject<{
|
|
25
|
+
profile: typeof directorySyncStressProfileSchema;
|
|
26
|
+
maximumProbeCount: z.ZodNumber;
|
|
27
|
+
maximumExternalAiCalls: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
phases: z.ZodArray<typeof directorySyncStressPhaseSchema>;
|
|
29
|
+
}>;
|
|
30
|
+
export type DirectorySyncStressPlan = z.output<typeof directorySyncStressPlanSchema>;
|
|
31
|
+
export declare const stressBaselineSchema: z.ZodObject<{
|
|
32
|
+
entities: z.ZodNumber;
|
|
33
|
+
notes: z.ZodNumber;
|
|
34
|
+
version: z.ZodString;
|
|
35
|
+
}>;
|
|
36
|
+
export type StressBaseline = z.output<typeof stressBaselineSchema>;
|
|
37
|
+
export declare const stressHealthSampleSchema: z.ZodObject<{
|
|
38
|
+
timestamp: z.ZodISODateTime;
|
|
39
|
+
endpoint: z.ZodString;
|
|
40
|
+
status: z.ZodNumber;
|
|
41
|
+
durationMs: z.ZodNumber;
|
|
42
|
+
ok: z.ZodBoolean;
|
|
43
|
+
error: z.ZodOptional<z.ZodString>;
|
|
44
|
+
}>;
|
|
45
|
+
export type StressHealthSample = z.output<typeof stressHealthSampleSchema>;
|
|
46
|
+
export declare const stressRuntimeSampleSchema: z.ZodObject<{
|
|
47
|
+
timestamp: z.ZodISODateTime;
|
|
48
|
+
cpuPercent: z.ZodNumber;
|
|
49
|
+
memoryPercent: z.ZodNumber;
|
|
50
|
+
pids: z.ZodNumber;
|
|
51
|
+
}>;
|
|
52
|
+
export type StressRuntimeSample = z.output<typeof stressRuntimeSampleSchema>;
|
|
53
|
+
export declare const stressPhaseResultSchema: z.ZodObject<{
|
|
54
|
+
id: z.ZodString;
|
|
55
|
+
operation: typeof directorySyncStressOperationSchema;
|
|
56
|
+
count: z.ZodNumber;
|
|
57
|
+
success: z.ZodBoolean;
|
|
58
|
+
commitLatencyMs: z.ZodOptional<z.ZodNumber>;
|
|
59
|
+
persistenceLatencyMs: z.ZodOptional<z.ZodNumber>;
|
|
60
|
+
error: z.ZodOptional<z.ZodString>;
|
|
61
|
+
}>;
|
|
62
|
+
export type StressPhaseResult = z.output<typeof stressPhaseResultSchema>;
|
|
63
|
+
export declare const stressCleanupResultSchema: z.ZodObject<{
|
|
64
|
+
success: z.ZodBoolean;
|
|
65
|
+
probesRemaining: z.ZodNumber;
|
|
66
|
+
finalEntities: z.ZodOptional<z.ZodNumber>;
|
|
67
|
+
finalNotes: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
contentTreeRestored: z.ZodOptional<z.ZodBoolean>;
|
|
69
|
+
error: z.ZodOptional<z.ZodString>;
|
|
70
|
+
}>;
|
|
71
|
+
export type StressCleanupResult = z.output<typeof stressCleanupResultSchema>;
|
|
72
|
+
export declare const stressContainerStateSchema: z.ZodObject<{
|
|
73
|
+
status: z.ZodString;
|
|
74
|
+
restartCount: z.ZodNumber;
|
|
75
|
+
oomKilled: z.ZodBoolean;
|
|
76
|
+
}>;
|
|
77
|
+
export type StressContainerState = z.output<typeof stressContainerStateSchema>;
|
|
78
|
+
export declare const stressMetricsSchema: z.ZodObject<{
|
|
79
|
+
health: z.ZodArray<typeof stressHealthSampleSchema>;
|
|
80
|
+
runtime: z.ZodArray<typeof stressRuntimeSampleSchema>;
|
|
81
|
+
externalAiCalls: z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
container: z.ZodOptional<typeof stressContainerStateSchema>;
|
|
83
|
+
}>;
|
|
84
|
+
export type StressMetrics = z.output<typeof stressMetricsSchema>;
|
|
85
|
+
export declare const directorySyncStressReportSchema: z.ZodObject<{
|
|
86
|
+
profile: typeof directorySyncStressProfileSchema;
|
|
87
|
+
success: z.ZodBoolean;
|
|
88
|
+
baseline: typeof stressBaselineSchema;
|
|
89
|
+
phases: z.ZodArray<typeof stressPhaseResultSchema>;
|
|
90
|
+
cleanup: typeof stressCleanupResultSchema;
|
|
91
|
+
metrics: typeof stressMetricsSchema;
|
|
92
|
+
failure: z.ZodOptional<z.ZodString>;
|
|
93
|
+
}>;
|
|
94
|
+
export type DirectorySyncStressReport = z.output<typeof directorySyncStressReportSchema>;
|
|
95
|
+
export interface DirectorySyncStressTarget {
|
|
96
|
+
handle: string;
|
|
97
|
+
domain: string;
|
|
98
|
+
contentRepo: string;
|
|
99
|
+
confirmation: string;
|
|
100
|
+
}
|
|
101
|
+
export interface DirectorySyncStressDriver {
|
|
102
|
+
prepare(plan: DirectorySyncStressPlan): Promise<StressBaseline>;
|
|
103
|
+
startMonitoring(): Promise<void>;
|
|
104
|
+
executePhase(phase: DirectorySyncStressPhase, baseline: StressBaseline): Promise<StressPhaseResult>;
|
|
105
|
+
cleanup(baseline: StressBaseline): Promise<StressCleanupResult>;
|
|
106
|
+
stopMonitoring(): Promise<StressMetrics>;
|
|
107
|
+
}
|
|
108
|
+
export declare function resolveDirectorySyncStressPlan(profile: DirectorySyncStressProfile): DirectorySyncStressPlan;
|
|
109
|
+
export declare function assertDirectorySyncStressTarget(target: DirectorySyncStressTarget): void;
|
|
110
|
+
export interface SampleStressHealthOptions {
|
|
111
|
+
fetchImpl?: FetchLike;
|
|
112
|
+
now?: () => Date;
|
|
113
|
+
timeoutMs?: number;
|
|
114
|
+
}
|
|
115
|
+
export declare function sampleStressHealth(url: string, options?: SampleStressHealthOptions): Promise<StressHealthSample>;
|
|
116
|
+
export declare function runDirectorySyncStressPlan(plan: DirectorySyncStressPlan, driver: DirectorySyncStressDriver): Promise<DirectorySyncStressReport>;
|
|
117
|
+
export declare function stressMetricsFailure(metrics: StressMetrics, maximumExternalAiCalls?: number): string | undefined;
|
package/dist/entries/deploy.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export { readJsonResponse, parseEnvFile, parseEnvSchema, parseEnvSchemaFile, requireEnv, writeGitHubOutput, writeGitHubEnv, } from "@brains/
|
|
2
|
-
export
|
|
1
|
+
export { readJsonResponse, parseEnvFile, parseEnvSchema, parseEnvSchemaFile, requireEnv, writeGitHubOutput, writeGitHubEnv, } from "@brains/deploy-support";
|
|
2
|
+
export { verifyRuntimeImage } from "../image-inventory";
|
|
3
|
+
export type { EnvSchemaEntry } from "@brains/deploy-support";
|
|
4
|
+
export { runtimeImageTag, sitePackagesFor, requiredImages, resolveImageBuilds, runResolveMissingImages, type ImageRequirementSource, type RequiredImage, type ResolveImageBuildsOptions, type RunResolveMissingImagesOptions, } from "../images";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { FetchLike } from "@brains/utils/fetch-like";
|
|
2
|
+
import { type StressCommandRunner } from "./stress-command";
|
|
3
|
+
export interface HealthWatchdogSmokeTarget {
|
|
4
|
+
handle: string;
|
|
5
|
+
domain: string;
|
|
6
|
+
confirmation: string;
|
|
7
|
+
runId: string;
|
|
8
|
+
}
|
|
9
|
+
export interface HealthWatchdogSmokeOptions {
|
|
10
|
+
rootDir: string;
|
|
11
|
+
handle: string;
|
|
12
|
+
confirmation: string;
|
|
13
|
+
runId: string;
|
|
14
|
+
artifactsDir?: string | undefined;
|
|
15
|
+
env?: NodeJS.ProcessEnv | undefined;
|
|
16
|
+
fetchImpl?: FetchLike | undefined;
|
|
17
|
+
commandRunner?: StressCommandRunner | undefined;
|
|
18
|
+
logger?: ((message: string) => void) | undefined;
|
|
19
|
+
}
|
|
20
|
+
export interface HealthWatchdogSmokeResult {
|
|
21
|
+
success: true;
|
|
22
|
+
runId: string;
|
|
23
|
+
artifactsDir: string;
|
|
24
|
+
target: {
|
|
25
|
+
handle: string;
|
|
26
|
+
domain: string;
|
|
27
|
+
serverIp: string;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface CleanupHealthWatchdogSmokeOptions {
|
|
31
|
+
rootDir: string;
|
|
32
|
+
handle: string;
|
|
33
|
+
confirmation: string;
|
|
34
|
+
runId: string;
|
|
35
|
+
artifactsDir?: string | undefined;
|
|
36
|
+
env?: NodeJS.ProcessEnv | undefined;
|
|
37
|
+
fetchImpl?: FetchLike | undefined;
|
|
38
|
+
commandRunner?: StressCommandRunner | undefined;
|
|
39
|
+
logger?: ((message: string) => void) | undefined;
|
|
40
|
+
}
|
|
41
|
+
export interface CleanupHealthWatchdogSmokeResult {
|
|
42
|
+
success: true;
|
|
43
|
+
runId: string;
|
|
44
|
+
artifactsDir: string;
|
|
45
|
+
target: {
|
|
46
|
+
handle: string;
|
|
47
|
+
domain: string;
|
|
48
|
+
serverIp: string;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export declare function assertHealthWatchdogSmokeTarget(target: HealthWatchdogSmokeTarget): void;
|
|
52
|
+
export declare function renderHealthWatchdogSmokeRemoteScript(): string;
|
|
53
|
+
export declare function runHealthWatchdogSmoke(options: HealthWatchdogSmokeOptions): Promise<HealthWatchdogSmokeResult>;
|
|
54
|
+
export declare function cleanupHealthWatchdogSmoke(options: CleanupHealthWatchdogSmokeOptions): Promise<CleanupHealthWatchdogSmokeResult>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { RequiredImage } from "./image-types";
|
|
2
|
+
import { type RunCommand } from "@brains/deploy-support/run-subprocess";
|
|
3
|
+
/** Verify a published image without starting an app or touching a fleet host. */
|
|
4
|
+
export declare function verifyRuntimeImage(imageRepository: string, image: RequiredImage, run?: RunCommand): Promise<void>;
|
package/dist/images.d.ts
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { RequiredImage } from "./image-types";
|
|
2
|
+
export type { RequiredImage } from "./image-types";
|
|
3
|
+
import { type ResolvedSiteOverride } from "./load-registry";
|
|
4
|
+
import { type RunCommand } from "@brains/deploy-support/run-subprocess";
|
|
5
|
+
/**
|
|
6
|
+
* Resolve the immutable runtime image shared by every fleet instance on one
|
|
7
|
+
* Brain version. Build and Deploy both import this function so their tags can
|
|
8
|
+
* never disagree.
|
|
9
|
+
*/
|
|
10
|
+
export declare function runtimeImageTag(brainVersion: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* The npm packages a site override contributes to every new fleet image.
|
|
13
|
+
* A @rizom-scoped theme is independently published and installs at its own
|
|
14
|
+
* explicit version; @brains/* themes are bundled inside @rizom/brain and must
|
|
15
|
+
* not be npm-installed.
|
|
16
|
+
*/
|
|
17
|
+
export declare function sitePackagesFor(siteOverride: ResolvedSiteOverride | undefined): string[];
|
|
18
|
+
/** The per-user slice of the registry that determines which image it runs. */
|
|
19
|
+
export interface ImageRequirementSource {
|
|
20
|
+
brainVersion: string;
|
|
21
|
+
siteOverride?: ResolvedSiteOverride | undefined;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Derive one immutable image per effective Brain version. Each image contains
|
|
25
|
+
* the union of exact site/theme package pins across the entire fleet, including
|
|
26
|
+
* instances still on older Brain versions. Promotion must not change an image.
|
|
27
|
+
*/
|
|
28
|
+
export declare function requiredImages(users: ImageRequirementSource[]): RequiredImage[];
|
|
29
|
+
export interface ResolveImageBuildsOptions {
|
|
30
|
+
users: ImageRequirementSource[];
|
|
31
|
+
/**
|
|
32
|
+
* Explicit dispatch override — the manual/backfill path. When set, exactly
|
|
33
|
+
* this one version is built with the fleet union plus explicit extra pins. Published
|
|
34
|
+
* tags stay immutable: a same-tag rebuild from a newer Dockerfile can
|
|
35
|
+
* strand the tag boot-broken, so rebuilding needs allowTagOverwrite.
|
|
36
|
+
*/
|
|
37
|
+
brainVersionInput?: string | undefined;
|
|
38
|
+
sitePackagesInput?: string | undefined;
|
|
39
|
+
allowTagOverwrite?: boolean | undefined;
|
|
40
|
+
imageExists: (tag: string) => Promise<boolean>;
|
|
41
|
+
/** Fail closed if a published image cannot serve its assigned instances. */
|
|
42
|
+
verifyImage: (image: RequiredImage) => Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Decide which images a Build run must produce: the declared required set
|
|
46
|
+
* filtered to tags the registry does not already hold, or the single image an
|
|
47
|
+
* explicit dispatch input forces.
|
|
48
|
+
*/
|
|
49
|
+
export declare function resolveImageBuilds(options: ResolveImageBuildsOptions): Promise<RequiredImage[]>;
|
|
50
|
+
export interface RunResolveMissingImagesOptions {
|
|
51
|
+
rootDir: string;
|
|
52
|
+
/** e.g. `ghcr.io/rizom-ai/rover-pilot` */
|
|
53
|
+
imageRepository: string;
|
|
54
|
+
env?: NodeJS.ProcessEnv;
|
|
55
|
+
runCommand?: RunCommand;
|
|
56
|
+
writeOutput: (key: string, value: string) => void;
|
|
57
|
+
log?: (line: string) => void;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Whether the registry already holds this tag.
|
|
61
|
+
*
|
|
62
|
+
* `docker manifest inspect` exits non-zero when the manifest is unknown, so a
|
|
63
|
+
* command failure is the "absent" answer. A failure to run docker at all is
|
|
64
|
+
* not: answering false there would let resolveImageBuilds past its
|
|
65
|
+
* tag-immutability guard and overwrite a published tag, which is exactly what
|
|
66
|
+
* that guard exists to prevent. Those propagate.
|
|
67
|
+
*
|
|
68
|
+
* A non-zero exit caused by an auth or network problem is still read as
|
|
69
|
+
* absent — docker reports it the same way it reports an unknown manifest, and
|
|
70
|
+
* telling them apart means matching stderr text that shifts between versions.
|
|
71
|
+
*/
|
|
72
|
+
export declare function imageTagExists(run: RunCommand, imageRepository: string, tag: string): Promise<boolean>;
|
|
73
|
+
/**
|
|
74
|
+
* The Build workflow's resolve step: derive the image set the declared fleet
|
|
75
|
+
* state (pilot.yaml + cohorts + users) requires, probe the container registry
|
|
76
|
+
* for each tag, and emit the missing ones as a GitHub Actions build matrix
|
|
77
|
+
* (`images_json`, entries `{tag, brain_version, site_packages}`). Dispatch
|
|
78
|
+
* inputs `BRAIN_VERSION_INPUT`/`SITE_PACKAGES_INPUT` force a single explicit
|
|
79
|
+
* build instead. Deriving and probing here means a config push builds exactly
|
|
80
|
+
* what it declares — nothing reactive, nothing manual.
|
|
81
|
+
*/
|
|
82
|
+
export declare function runResolveMissingImages(options: RunResolveMissingImagesOptions): Promise<RequiredImage[]>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export { initPilotRepo } from "./init";
|
|
2
2
|
export { loadPilotRegistry, type LoadPilotRegistryOptions, } from "./load-registry";
|
|
3
|
+
export { runtimeImageTag, sitePackagesFor, requiredImages, resolveImageBuilds, runResolveMissingImages, type ImageRequirementSource, type RequiredImage, type ResolveImageBuildsOptions, type RunResolveMissingImagesOptions, } from "./images";
|
|
4
|
+
export { derivePreviewDomain, type PreviewDomainOptions, } from "./preview-domain";
|
|
3
5
|
export { writeUsersTable } from "./render-users-table";
|
|
4
6
|
export { onboardUser } from "./onboard-user";
|
|
5
7
|
export { addPilotUser } from "./user-add";
|
|
8
|
+
export { assertPilotUsersRemoved, createPilotOffboardDriver, offboardPilotUsers, type OffboardPilotUserPlan, type OffboardPilotUsersOptions, type OffboardPilotUsersResult, type PilotOffboardDnsRecord, type PilotOffboardDriver, type PilotOffboardInspection, type PilotOffboardServer, type PilotOffboardTarget, } from "./user-offboard";
|
|
6
9
|
export { reconcileCohort } from "./reconcile-cohort";
|
|
7
10
|
export { reconcileAll } from "./reconcile-all";
|
|
8
11
|
export { parseArgs, type ParsedArgs } from "./parse-args";
|
|
@@ -11,4 +14,9 @@ export { bootstrapPilotSshKey, runPilotSshKeyBootstrap, } from "./ssh-key-bootst
|
|
|
11
14
|
export { bootstrapPilotOriginCertificate, runPilotCertBootstrap, } from "./cert-bootstrap";
|
|
12
15
|
export { encryptPilotSecrets } from "./secrets-encrypt";
|
|
13
16
|
export { pushPilotSecrets } from "./secrets-push";
|
|
17
|
+
export { verifyPilotUser } from "./verify-user";
|
|
18
|
+
export { assertDirectorySyncStressTarget, directorySyncStressPlanSchema, directorySyncStressProfileSchema, directorySyncStressReportSchema, resolveDirectorySyncStressPlan, runDirectorySyncStressPlan, sampleStressHealth, stressMetricsFailure, type DirectorySyncStressDriver, type DirectorySyncStressPhase, type DirectorySyncStressPlan, type DirectorySyncStressProfile, type DirectorySyncStressReport, } from "./directory-sync-stress";
|
|
19
|
+
export { cleanupDirectorySyncStress, runDeployedDirectorySyncStress, verifyDirectorySyncStressAccess, type CleanupDirectorySyncStressOptions, type CleanupDirectorySyncStressResult, type DeployedDirectorySyncStressOptions, type DeployedDirectorySyncStressResult, type VerifyDirectorySyncStressAccessOptions, type VerifyDirectorySyncStressAccessResult, } from "./directory-sync-stress-system";
|
|
20
|
+
export { assertHealthWatchdogSmokeTarget, cleanupHealthWatchdogSmoke, renderHealthWatchdogSmokeRemoteScript, runHealthWatchdogSmoke, type CleanupHealthWatchdogSmokeOptions, type CleanupHealthWatchdogSmokeResult, type HealthWatchdogSmokeOptions, type HealthWatchdogSmokeResult, type HealthWatchdogSmokeTarget, } from "./health-watchdog-smoke";
|
|
14
21
|
export { runCommand, type CommandResult } from "./run-command";
|
|
22
|
+
export { pilotSchema, cohortSchema, canonicalBundleIdSchema, CAPABILITY_BUNDLE_CONTRACT, type PilotConfig, type CohortConfig, } from "./schema";
|