Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion LAZURIO.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ turn stays byte-identical to upstream.
- **Steward team**: [`lazurio/teams/steward.openmaus.json`](lazurio/teams/steward.openmaus.json),
a leader (Henry, Chief of Staff) and three workers who review pull
requests on their exact head and publish only on an explicit instruction.
Import it (Templates → Import, or `POST /api/teams/import`) and point
Releases ship it inside the archive at `package/lazurio/teams/`, so an
Environment imports it from the installed release. Import it (Templates →
Import, or `POST /api/teams/import`) and point
`OMB_GITHUB_INTAKE_BOT` at the leader. Another persona (Pablo) imports the
same file and renames the leader; nothing in the instructions names the
persona. Imported bots start on Ask, so unattended work waits for
Expand Down
10 changes: 6 additions & 4 deletions docs/operations/lazurio-fork-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ upstream's `scripts/build-npm-package.mjs` exactly as upstream's
`npm-package.yml` builds `openmausbot` for npm, and packed with `npm pack`.
Its layout is therefore the npm layout: everything under `package/`
(`cli.js`, `dist-server/`, `dist/`, `skills/`, `enterprise/`,
`package.json`, `LICENSE`, `README.md`), no `node_modules`, run with Node 24
or newer. The only differences from the upstream npm tarball are the
version in `package/package.json` (the release version) and the Lazurio
overlay in the code. The same bytes also install with
`lazurio/teams/`, `package.json`, `LICENSE`, `README.md`), no `node_modules`,
run with Node 24 or newer. The only differences from the upstream npm tarball
are the version in `package/package.json` (the release version), the Lazurio
overlay in the code, and `lazurio/teams/` with the Steward team file
(`package/lazurio/teams/steward.openmaus.json`), which an Environment imports
from the installed release. The same bytes also install with
`npm install -g ./openmausbot-<version>-linux-x64.tar.gz`.

The JavaScript is platform independent; `linux-x64` names the platform the
Expand Down
16 changes: 15 additions & 1 deletion scripts/lazurio-release-archive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,19 @@ VERSION="$VERSION" node -e '
pnpm build:server
pnpm exec vite build
node scripts/build-npm-package.mjs
# Lazurio's team definitions ship inside the package, so an Environment can
# import the Steward team from the installed release without the repository
# (the Steward preset, decision 0169). Only this generated package changes;
# upstream's build script and package.json stay untouched.
mkdir -p release/npm/lazurio
cp -R lazurio/teams release/npm/lazurio/teams
node -e '
const fs = require("node:fs");
const path = "release/npm/package.json";
const pkg = JSON.parse(fs.readFileSync(path, "utf8"));
if (!pkg.files.includes("lazurio")) pkg.files.push("lazurio");
fs.writeFileSync(path, JSON.stringify(pkg, null, 2) + "\n");
'
(cd release/npm && npm pack --silent --pack-destination "$work" >/dev/null)
packed="$work/openmausbot-$VERSION.tgz"
test -f "$packed"
Expand All @@ -73,10 +86,11 @@ mkdir -p "$work/run" "$work/home" "$work/data" "$work/folder"
tar -xzf "$packed" -C "$work/run"
pkg="$work/run/package"
test ! -d "$pkg/node_modules"
for required in cli.js dist-server/index.js dist-server/openmausbot.js dist/index.html package.json LICENSE; do
for required in cli.js dist-server/index.js dist-server/openmausbot.js dist/index.html package.json LICENSE lazurio/teams/steward.openmaus.json; do
test -f "$pkg/$required" || { echo "archive is missing package/$required" >&2; exit 1; }
done
test "$(node -p 'require(process.argv[1]).version' "$pkg/package.json")" = "$VERSION"
node -e 'JSON.parse(require("node:fs").readFileSync(process.argv[1], "utf8"))' "$pkg/lazurio/teams/steward.openmaus.json"
help="$(node "$pkg/cli.js" --help)"
grep -q "openmausbot serve" <<< "$help"

Expand Down