@rizom/ops 0.2.0-alpha.37 → 0.2.0-alpha.371
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 +66 -2
- package/dist/brains-ops.js +737 -332
- package/dist/capability-bundle-migration.d.ts +22 -0
- package/dist/cert-bootstrap.d.ts +3 -1
- package/dist/content-repo-ref.d.ts +10 -0
- package/dist/content-repo.d.ts +1 -0
- package/dist/deploy.js +98 -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 +3 -2
- package/dist/health-watchdog-smoke.d.ts +54 -0
- package/dist/images.d.ts +84 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +725 -320
- 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 +60 -6
- package/dist/observed-status.d.ts +1 -1
- package/dist/origin-ca.d.ts +2 -1
- package/dist/parse-args.d.ts +2 -10
- package/dist/preview-domain.d.ts +9 -0
- package/dist/push-secrets.d.ts +2 -9
- package/dist/push-target.d.ts +1 -2
- package/dist/reconcile-dry-run.d.ts +9 -0
- package/dist/run-command.d.ts +17 -3
- package/dist/run-subprocess.d.ts +1 -6
- package/dist/schema.d.ts +124 -161
- package/dist/secrets-encrypt.d.ts +7 -13
- 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-add.d.ts +15 -0
- package/dist/verify-user.d.ts +22 -0
- package/package.json +50 -42
- package/templates/rover-pilot/.env.schema +24 -3
- 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 +71 -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/reconcile.yml +10 -4
- package/templates/rover-pilot/.github/workflows/upgrade.yml +104 -0
- package/templates/rover-pilot/README.md +16 -6
- package/templates/rover-pilot/deploy/scripts/create-predeploy-backup.ts +894 -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-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/docs/canonical-crossover-record.md +107 -0
- package/templates/rover-pilot/docs/onboarding-checklist.md +28 -17
- package/templates/rover-pilot/docs/operator-playbook.md +311 -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 +7 -4
- package/templates/rover-pilot/.kamal/hooks/pre-deploy +0 -9
package/README.md
CHANGED
|
@@ -2,23 +2,87 @@
|
|
|
2
2
|
|
|
3
3
|
Operator CLI package for managing pilot brain fleet registry repos.
|
|
4
4
|
|
|
5
|
+
## Runtime images
|
|
6
|
+
|
|
7
|
+
The fleet builds one immutable `brain-${brainVersion}` image per effective Brain version. Each image contains the union of exact site and theme package pins used on that version, and conflicting package pins fail before build. Package-set changes require a fresh Brain version.
|
|
8
|
+
|
|
5
9
|
## Commands
|
|
6
10
|
|
|
7
11
|
- `brains-ops init <repo>`
|
|
8
|
-
- `brains-ops
|
|
9
|
-
- `brains-ops
|
|
12
|
+
- `brains-ops crossover:stage <source-repo> <output-dir> <bundle-review.yaml> [site-pins.yaml]` — creates a separate secret-free capability-bundle review copy without mutating the source; the bundle review must match every explicit source selection, and a reviewed pins file is required when hosted site overrides exist
|
|
13
|
+
- `brains-ops render <repo>` — regenerates `views/users.md` and fills status columns from built-in live probes (`DNS`, `/health/ready`, unauthenticated `/mcp`)
|
|
14
|
+
- `brains-ops user:add <repo> <handle> --cohort <cohort>` — scaffolds a user file, per-user secrets template, and cohort membership
|
|
15
|
+
- `brains-ops onboard <repo> <handle>` — creates/seeds the user's content repo using `CONTENT_REPO_ADMIN_TOKEN` for GitHub repo administration and `GIT_SYNC_TOKEN` for git clone/push
|
|
10
16
|
- `brains-ops age-key:bootstrap <repo>`
|
|
11
17
|
- `brains-ops ssh-key:bootstrap <repo>`
|
|
12
18
|
- `brains-ops cert:bootstrap <repo>`
|
|
13
19
|
- `brains-ops secrets:push <repo>`
|
|
14
20
|
- `brains-ops secrets:encrypt <repo> <handle>`
|
|
21
|
+
- `brains-ops verify-user <repo> <handle>` — checks `/health/operate`, unauthenticated `/mcp`, and site-enabled browser/Studio routes
|
|
22
|
+
- `brains-ops recover:retire-legacy-projection-job <database> <job-id> --type <legacy-type> --dry-run` — verifies that one exact pre-scheduler projection job has no owner or partial progress; replace `--dry-run` with `--confirm retire:<job-id>` only after reviewing the result
|
|
23
|
+
- `brains-ops stress:directory-sync <repo> <handle> --profile <regression|load|stress> --confirm stress:<handle>` — runs a smoke-only, reversible directory-sync workload and writes structured evidence
|
|
24
|
+
- `brains-ops stress:directory-sync:verify-access <repo> <handle> --confirm stress:<handle>` — clones the smoke content repository and verifies push authorization with `git push --dry-run`, without creating a ref or starting a workload
|
|
25
|
+
- `brains-ops stress:directory-sync:cleanup <repo> <handle> --confirm stress:<handle>` — idempotently removes residual stress probes
|
|
26
|
+
- `brains-ops smoke:health-watchdog <repo> <handle> --confirm watchdog-smoke:<handle> --run-id <id>` — verifies fleet watchdog selection and restart-budget isolation on the smoke host
|
|
27
|
+
- `brains-ops smoke:health-watchdog:cleanup <repo> <handle> --confirm watchdog-smoke:<handle> --run-id <id>` — removes deterministic residual watchdog smoke fixtures
|
|
15
28
|
- `brains-ops reconcile-cohort <repo> <cohort>`
|
|
16
29
|
- `brains-ops reconcile-all <repo>`
|
|
30
|
+
- `brains-ops reconcile-all <repo> --dry-run` — reconciles an isolated copy twice with external content-repository access blocked, lists both passes' changed files, and requires second-pass zero drift
|
|
31
|
+
|
|
32
|
+
`render` owns the observational `views/users.md` projection. Onboard and reconcile commands own generated per-user config and never rewrite live observed status in that view.
|
|
33
|
+
|
|
34
|
+
## Directory-sync stress profiles
|
|
35
|
+
|
|
36
|
+
Directory-sync stress is deliberately smoke-only. The handle, domain, and content repository must each identify smoke, and the operator must pass the exact `stress:<handle>` confirmation. The runner refuses production-like targets. The smoke user must also declare the hermetic posture below; reconcile and deploy it before running the workload:
|
|
37
|
+
|
|
38
|
+
```yaml
|
|
39
|
+
embeddingEnabled: false
|
|
40
|
+
topicExtractionEnabled: false
|
|
41
|
+
skillDerivationEnabled: false
|
|
42
|
+
swotDerivationEnabled: false
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
- `regression`: add 20 files, update all 20, then delete them;
|
|
46
|
+
- `load`: ramp through 50, 150, and 350 files, update 350, rename 100, update again, then delete all probes;
|
|
47
|
+
- `stress`: continue the same deterministic ramp to 700 files and 200 renames.
|
|
48
|
+
|
|
49
|
+
Each run creates a rollback branch, gates on health failures during the monitored workload window, preserves warmup and cleanup health samples as evidence without poisoning that gate, samples container CPU/memory/PIDs, detects watchdog restarts even when Docker's restart counter remains zero, rejects external AI usage, waits for Git and entity persistence, and always attempts cleanup. JSON, Markdown, runtime logs, and samples are written under `.brains-ops/stress/` unless `--artifacts-dir` is supplied. The scaffolded `Directory Sync Stress` workflow runs a weekly regression and supports manual profiles. Its manual `verify_only` mode exercises the Bitwarden/Varlock content credential path through clone and a dry-run push, skips the workload, and does not schedule cleanup. Workload runs retain a separate `always()` cleanup job. Successful idempotent cleanup also prunes retained stress backup branches; branches remain available when probes remain for recovery. The workflow never deploys or targets a non-smoke user.
|
|
50
|
+
|
|
51
|
+
## Health watchdog smoke
|
|
52
|
+
|
|
53
|
+
The scaffolded manual `Health Watchdog Smoke` workflow uses the same pilot desired state, Hetzner lookup, Bitwarden/Varlock deploy key, and `deploy-<handle>` concurrency boundary as fleet deployment. It refuses non-smoke handles/domains and requires `watchdog-smoke:<handle>` confirmation. The runner requires the installed watchdog to match the packaged canonical payload, exercises that installed script, and verifies the deployed image label, active timer, exact selector, liveness healthcheck, diagnostics, negative container isolation, and three-per-hour restart budget without restarting the deployed rover. Evidence is uploaded from `RUNNER_TEMP`; an independent `always()` cleanup job removes deterministic temporary containers and remote files.
|
|
17
54
|
|
|
18
55
|
## Scope
|
|
19
56
|
|
|
20
57
|
`brains-ops` lives in the `brains` monorepo and is consumed as a separate package.
|
|
21
58
|
|
|
59
|
+
The active loader accepts one schema requiring `bundleContract: capability-bundles-v1` and the nine capability/policy bundle IDs. Offline parsing of prior desired state is isolated to `crossover:stage` and is never used by render, verify, or reconciliation paths.
|
|
60
|
+
|
|
61
|
+
Crossover staging excludes source `.git`, `.operator`, `.brains-ops`, `.turbo`, `dist`, `node_modules`, plaintext `.env`/`.env.local`, and `*.secrets.yaml` artifacts. It generates fresh per-user `.env` selector files in the review copy without copying source secret values. A review manifest must name both sides of the pilot selection and every explicit cohort selection; source drift fails staging:
|
|
62
|
+
|
|
63
|
+
```yaml
|
|
64
|
+
bundleContract: capability-bundles-v1
|
|
65
|
+
pilot:
|
|
66
|
+
sourceBundles: [core]
|
|
67
|
+
targetBundles: [core, media, web, chat]
|
|
68
|
+
cohorts:
|
|
69
|
+
sites:
|
|
70
|
+
sourceBundles: [core, site, publishing]
|
|
71
|
+
targetBundles:
|
|
72
|
+
[core, media, automation, web, chat, site, publishing, federation]
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Hosted sites must also be enumerated in a separate reviewed file; staging rejects missing, extra, or identity-mismatched pins instead of inferring versions:
|
|
76
|
+
|
|
77
|
+
```yaml
|
|
78
|
+
sites:
|
|
79
|
+
example:
|
|
80
|
+
package: "@rizom/site-example"
|
|
81
|
+
version: 0.2.0-alpha.1
|
|
82
|
+
theme: "@rizom/theme-example"
|
|
83
|
+
themeVersion: 0.2.0-alpha.1
|
|
84
|
+
```
|
|
85
|
+
|
|
22
86
|
It operates on a separate private data repo, such as `rover-pilot/`, which stores:
|
|
23
87
|
|
|
24
88
|
- `pilot.yaml`
|