@rizom/ops 0.2.0-alpha.68 → 0.2.0-alpha.681

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.
Files changed (72) hide show
  1. package/README.md +83 -2
  2. package/dist/age-key-bootstrap.d.ts +1 -1
  3. package/dist/brains-ops.js +675 -200
  4. package/dist/capability-bundle-migration.d.ts +26 -0
  5. package/dist/cert-bootstrap.d.ts +4 -2
  6. package/dist/content-repo-ref.d.ts +10 -0
  7. package/dist/content-repo.d.ts +1 -1
  8. package/dist/deploy.js +114 -3
  9. package/dist/directory-sync-stress-system.d.ts +75 -0
  10. package/dist/directory-sync-stress.d.ts +117 -0
  11. package/dist/entries/deploy.d.ts +2 -0
  12. package/dist/health-watchdog-smoke.d.ts +54 -0
  13. package/dist/image-inventory.d.ts +4 -0
  14. package/dist/image-types.d.ts +7 -0
  15. package/dist/images.d.ts +89 -0
  16. package/dist/index.d.ts +8 -0
  17. package/dist/index.js +685 -198
  18. package/dist/legacy-pilot-migration.d.ts +11 -0
  19. package/dist/legacy-projection-job-recovery.d.ts +29 -0
  20. package/dist/load-registry.d.ts +75 -7
  21. package/dist/observed-status.d.ts +1 -1
  22. package/dist/parse-args.d.ts +2 -12
  23. package/dist/preview-domain.d.ts +9 -0
  24. package/dist/reconcile-dry-run.d.ts +9 -0
  25. package/dist/run-command.d.ts +22 -5
  26. package/dist/runtime-image-lock.d.ts +12 -0
  27. package/dist/schema.d.ts +137 -163
  28. package/dist/secrets-encrypt.d.ts +7 -13
  29. package/dist/secrets-push.d.ts +1 -1
  30. package/dist/ssh-key-bootstrap.d.ts +1 -26
  31. package/dist/stage-legacy-crossover.d.ts +25 -0
  32. package/dist/stress-command.d.ts +14 -0
  33. package/dist/stress-git-checkout.d.ts +21 -0
  34. package/dist/stress-health-monitor.d.ts +56 -0
  35. package/dist/upgrade.d.ts +10 -0
  36. package/dist/user-add.d.ts +1 -0
  37. package/dist/user-offboard.d.ts +61 -0
  38. package/dist/verify-user.d.ts +22 -0
  39. package/package.json +51 -44
  40. package/templates/rover-pilot/.env.schema +20 -5
  41. package/templates/rover-pilot/.github/actions/varlock-env/action.yml +47 -0
  42. package/templates/rover-pilot/.github/workflows/build.yml +67 -13
  43. package/templates/rover-pilot/.github/workflows/deploy.yml +93 -70
  44. package/templates/rover-pilot/.github/workflows/directory-sync-stress.yml +119 -0
  45. package/templates/rover-pilot/.github/workflows/health-watchdog-smoke.yml +95 -0
  46. package/templates/rover-pilot/.github/workflows/offboard.yml +107 -0
  47. package/templates/rover-pilot/.github/workflows/reconcile.yml +10 -4
  48. package/templates/rover-pilot/.github/workflows/upgrade.yml +104 -0
  49. package/templates/rover-pilot/README.md +14 -6
  50. package/templates/rover-pilot/deploy/scripts/create-predeploy-backup.ts +962 -0
  51. package/templates/rover-pilot/deploy/scripts/decrypt-user-secrets.ts +80 -24
  52. package/templates/rover-pilot/deploy/scripts/helpers.ts +3 -0
  53. package/templates/rover-pilot/deploy/scripts/install-health-watchdog.ts +144 -0
  54. package/templates/rover-pilot/deploy/scripts/provision-server.ts +51 -21
  55. package/templates/rover-pilot/deploy/scripts/pull-local-models.ts +69 -0
  56. package/templates/rover-pilot/deploy/scripts/resolve-deploy-handles.ts +4 -0
  57. package/templates/rover-pilot/deploy/scripts/resolve-missing-images.ts +13 -0
  58. package/templates/rover-pilot/deploy/scripts/resolve-user-config.ts +66 -9
  59. package/templates/rover-pilot/deploy/scripts/sync-content-repo.ts +51 -47
  60. package/templates/rover-pilot/deploy/scripts/update-dns.ts +58 -12
  61. package/templates/rover-pilot/deploy/scripts/validate-secrets.ts +12 -1
  62. package/templates/rover-pilot/deploy/scripts/verify-runtime-image.ts +18 -0
  63. package/templates/rover-pilot/docs/canonical-crossover-record.md +107 -0
  64. package/templates/rover-pilot/docs/onboarding-checklist.md +24 -15
  65. package/templates/rover-pilot/docs/operator-playbook.md +396 -35
  66. package/templates/rover-pilot/docs/user-onboarding.md +48 -463
  67. package/templates/rover-pilot/package.json +1 -0
  68. package/templates/rover-pilot/pilot.yaml +6 -4
  69. package/dist/origin-ca.d.ts +0 -1
  70. package/dist/push-secrets.d.ts +0 -9
  71. package/dist/push-target.d.ts +0 -2
  72. package/dist/run-subprocess.d.ts +0 -6
@@ -0,0 +1,26 @@
1
+ import { z } from "@brains/utils/zod";
2
+ import { CAPABILITY_BUNDLE_CONTRACT, canonicalBundleIdSchema, handleSchema } from "./schema";
3
+ declare const legacyBundleIdSchema: z.ZodEnum<{
4
+ core: "core";
5
+ site: "site";
6
+ publishing: "publishing";
7
+ team: "team";
8
+ }>;
9
+ declare const legacyBundlesSchema: z.ZodArray<typeof legacyBundleIdSchema>;
10
+ type SelectionRewriteSchema = z.ZodObject<{
11
+ sourceBundles: typeof legacyBundlesSchema;
12
+ targetBundles: z.ZodArray<typeof canonicalBundleIdSchema>;
13
+ }, z.core.$strict>;
14
+ declare const selectionRewriteSchema: SelectionRewriteSchema;
15
+ declare const capabilityBundleReviewSchema: z.ZodObject<{
16
+ bundleContract: z.ZodLiteral<typeof CAPABILITY_BUNDLE_CONTRACT>;
17
+ pilot: SelectionRewriteSchema;
18
+ cohorts: z.ZodRecord<typeof handleSchema, SelectionRewriteSchema>;
19
+ }, z.core.$strict>;
20
+ export type LegacyCanonicalBundleId = z.output<typeof legacyBundleIdSchema>;
21
+ export type SelectionRewrite = z.output<typeof selectionRewriteSchema>;
22
+ export type CapabilityBundleReview = z.output<typeof capabilityBundleReviewSchema>;
23
+ export declare function parseCapabilityBundleReview(input: string): CapabilityBundleReview;
24
+ export declare function migrateCanonicalPilotYaml(input: string, review: CapabilityBundleReview["pilot"]): string;
25
+ export declare function migrateCanonicalCohortYaml(input: string, cohortId: string, review: SelectionRewrite | undefined): string;
26
+ export {};
@@ -1,9 +1,10 @@
1
- import { type FetchLike } from "@brains/deploy-support/origin-ca";
2
- import { type RunCommand } from "./run-subprocess";
1
+ import type { FetchLike } from "@brains/utils/fetch-like";
2
+ import { type RunCommand } from "@brains/deploy-support/run-subprocess";
3
3
  export interface CertBootstrapOptions {
4
4
  env?: NodeJS.ProcessEnv | undefined;
5
5
  cfApiToken?: string | undefined;
6
6
  cfZoneId?: string | undefined;
7
+ handle?: string | undefined;
7
8
  fetchImpl?: FetchLike;
8
9
  logger?: (message: string) => void;
9
10
  pushTo?: string | undefined;
@@ -14,6 +15,7 @@ export interface CertBootstrapResult {
14
15
  certificatePath: string;
15
16
  privateKeyPath: string;
16
17
  certificatePem: string;
18
+ secretsSnippetPath: string;
17
19
  }
18
20
  export declare function runPilotCertBootstrap(rootDir: string, options?: CertBootstrapOptions): Promise<{
19
21
  success: boolean;
@@ -0,0 +1,10 @@
1
+ export interface ContentRepoRef {
2
+ org: string;
3
+ name: string;
4
+ }
5
+ /**
6
+ * A user's contentRepo is either a bare repo name (owned by the pilot
7
+ * org) or an org-qualified `org/name` override.
8
+ */
9
+ export declare function resolveContentRepoRef(contentRepo: string, githubOrg: string): ContentRepoRef;
10
+ export declare function renderContentRepoRef(contentRepo: string, githubOrg: string): string;
@@ -1,5 +1,5 @@
1
1
  import type { ResolvedUser } from "./load-registry";
2
- import { type RunCommand } from "./run-subprocess";
2
+ import { type RunCommand } from "@brains/deploy-support/run-subprocess";
3
3
  import type { ContentRepoFile } from "./user-runner";
4
4
  type FetchImpl = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
5
5
  export interface ContentRepoSyncOptions {