@rizom/ops 0.2.0-alpha.263 → 0.2.0-alpha.264
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/dist/brains-ops.js +146 -146
- package/dist/index.js +164 -164
- package/dist/upgrade.d.ts +10 -0
- package/package.json +1 -1
- package/templates/rover-pilot/.github/workflows/upgrade.yml +58 -0
- package/templates/rover-pilot/README.md +1 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type UpgradeExec = (command: string[], cwd: string) => Promise<void>;
|
|
2
|
+
export interface UpgradeOptions {
|
|
3
|
+
exec?: UpgradeExec | undefined;
|
|
4
|
+
version?: string | undefined;
|
|
5
|
+
}
|
|
6
|
+
export interface UpgradeResult {
|
|
7
|
+
from: string;
|
|
8
|
+
to: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function upgradePilotRepo(rootDir: string, options?: UpgradeOptions): Promise<UpgradeResult>;
|
package/package.json
CHANGED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: Upgrade
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
version:
|
|
7
|
+
description: Explicit @rizom/ops version (empty means latest)
|
|
8
|
+
required: false
|
|
9
|
+
type: string
|
|
10
|
+
schedule:
|
|
11
|
+
# Weekday morning check for new operator tooling releases.
|
|
12
|
+
- cron: "17 6 * * 1-5"
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: write
|
|
16
|
+
pull-requests: write
|
|
17
|
+
|
|
18
|
+
concurrency:
|
|
19
|
+
group: upgrade
|
|
20
|
+
cancel-in-progress: false
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
upgrade:
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v5
|
|
27
|
+
|
|
28
|
+
- uses: oven-sh/setup-bun@v2
|
|
29
|
+
|
|
30
|
+
- name: Install operator tooling
|
|
31
|
+
run: bun install
|
|
32
|
+
|
|
33
|
+
- name: Upgrade operator tooling
|
|
34
|
+
env:
|
|
35
|
+
VERSION_INPUT: ${{ inputs.version }}
|
|
36
|
+
run: bunx brains-ops upgrade . --to "${VERSION_INPUT:-latest}"
|
|
37
|
+
|
|
38
|
+
- name: Open upgrade PR
|
|
39
|
+
env:
|
|
40
|
+
GH_TOKEN: ${{ github.token }}
|
|
41
|
+
run: |
|
|
42
|
+
if [ -z "$(git status --porcelain)" ]; then
|
|
43
|
+
echo "Already up to date."
|
|
44
|
+
exit 0
|
|
45
|
+
fi
|
|
46
|
+
VERSION=$(bun -e 'console.log(JSON.parse(await Bun.file("package.json").text()).devDependencies["@rizom/ops"])')
|
|
47
|
+
BRANCH="ops/upgrade-rizom-ops-$VERSION"
|
|
48
|
+
git config user.name "github-actions[bot]"
|
|
49
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
50
|
+
git checkout -B "$BRANCH"
|
|
51
|
+
git add -A
|
|
52
|
+
git commit -m "chore(ops): upgrade @rizom/ops to $VERSION"
|
|
53
|
+
git push --force -u origin "$BRANCH"
|
|
54
|
+
gh pr create \
|
|
55
|
+
--title "chore(ops): upgrade @rizom/ops to $VERSION" \
|
|
56
|
+
--body "Automated operator tooling upgrade. Review the scaffold diff, then merge; deploys stay operator-dispatched." \
|
|
57
|
+
--head "$BRANCH" \
|
|
58
|
+
|| echo "PR already open for $BRANCH"
|
|
@@ -37,6 +37,7 @@ When a push changes only deploy contract files, CI prints `No affected user conf
|
|
|
37
37
|
## Commands
|
|
38
38
|
|
|
39
39
|
- `brains-ops init <repo>`
|
|
40
|
+
- `brains-ops upgrade <repo>` — bumps `@rizom/ops` (or `--to <version>`) and refreshes the generated scaffold; the Upgrade workflow runs this on a schedule and opens a PR
|
|
40
41
|
- `brains-ops render <repo>` — regenerates `views/users.md` with live DNS, `/health/ready`, and unauthenticated `/mcp` status checks
|
|
41
42
|
- `brains-ops user:add <repo> <handle> --cohort <cohort>` — scaffolds a user file, per-user secrets template, and cohort membership
|
|
42
43
|
- `brains-ops onboard <repo> <handle>` — creates/seeds the user's content repo with separate admin and sync tokens
|