Repository navigation
fix(bootstraps): keep the user key out of hand-offs, persist BAND_BASE_URL, OpenClaw consent and gateway fixes - #41
Open
nir-singher-band wants to merge 5 commits into
Open
nir-singher-band wants to merge 5 commits into
nir-singher-band wants to merge 5 commits into
Conversation
Agent names are unique per account, so the fixed "Band agent" default failed with HTTP 422 on the second registration whenever the prompt was accepted or no terminal was attached. Default to "Band Agent (<host> <timestamp>)", matching the Hermes bootstrap, which stays within Band's name rules.
… BAND_BASE_URL, accept SHA refs - The web-app-exported BAND_USER_API_KEY stayed in the environment of install.sh and of `hermes chat -s band:add-band`. Read the key into an unexported variable, unset BAND_USER_API_KEY and BAND_API_KEY at once, and pass it only to register-agent.sh for that one command. - A non-default BAND_BASE_URL was used for registration but never persisted, so the plugin connected to app.band.ai. Save it to the gateway .env through hermes_cli's save_env_value with the agent creds. - `git clone --branch` rejects commit SHAs. Fetch BAND_HERMES_REF into an empty repo and check out FETCH_HEAD, which accepts a branch, a tag, or a full commit SHA. - README: the bootstrap does three things, not two; document BAND_BASE_URL and the BAND_USER_API_KEY precedence.
…cret to BAND_BASE_URL, keep the user key out of the hand-off - On a fresh host the bootstrap stopped at the OneCLI check with a pointer to /init-onecli, although `bash nanoclaw.sh` is what installs OneCLI at NanoClaw's pinned version; with OneCLI present it registered and then handed off to `claude /add-band` with no image or service for the skill to rebuild and restart. Gate on base setup before the OneCLI check and stop with the exact `cd <home> && bash nanoclaw.sh` command. Setup detection now also covers the root systemd unit and the nohup wrapper setup writes without systemd, and ~/.local/bin (where setup installs onecli) is on PATH for the check. - A checkout that can't merge band-ai/main (an upstream clone ahead of the fork) is told to run from an empty directory instead of `git merge band-ai/main`, which conflicts. - The OneCLI secret's --host-pattern is derived from BAND_BASE_URL's host instead of hard-coded app.band.ai, and a non-default BAND_BASE_URL is written to .env, which the host adapter reads. - The user key is read once (web-app placeholder, then BAND_USER_API_KEY, then BAND_API_KEY), removed from the environment, and passed only to register-agent.sh. Before, a re-run on a wired host handed BAND_USER_API_KEY to the Claude session.
…g gateway service, keep the user key out of openclaw
- OpenClaw >= 2026.8.1 refuses a non-interactive plugin install without
--accept-capabilities, while older releases in the plugin's peer range
reject the flag. Pass it only when `openclaw plugins install --help`
offers it.
- With no installed gateway service, newer CLIs exit non-zero from
`openclaw gateway restart` ("Gateway service disabled."), which killed
the run under set -e after registration and config had succeeded. When
`gateway status --json` reports the service not loaded, finish with the
success line and how to start the gateway; other restart failures stay
fatal.
- BAND_USER_API_KEY stayed exported to every openclaw process (npm plugin
install, gateway). Hold the key in an unexported variable and unset
both names up front; only curl's stdin config sees it.
- Default the agent name to "OpenClaw Agent (<host> <timestamp>)" so a
second run doesn't collide.
- Point the source link and manifest repo at band-sdk-typescript
plugins/openclaw (band-ai/openclaw-channel-band is empty), and drop the
stale thenvoi.com schema-default comment.
nir-singher-band
marked this pull request as ready for review
October 6, 2026 18:32
…dapter commit a7bf188c was dropped when band/adapter was rebased onto the re-rooted main on Aug 31, so GitHub no longer serves it and the NanoClaw prepare step fails with 'not our ref'. 06b87dc0 is the same change after the rebase (identical range-diff).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bootstrap fixes found while reviewing the personal-agent docs (thenvoi/fern#347). Each fix was smoke-run in a clean container with stub binaries: the old script reproduced the bug and the new one fixed it. The OpenClaw changes were also run against the real
openclawCLI at 2026.7.35 and 2026.9.8.hermes chat,claude /add-band,openclaw). Before, a full-accessBAND_USER_API_KEYexported by the web-app command stayed in the agent session's environment.plugins installpasses--accept-capabilitieswhen the CLI offers it, detected from--help. OpenClaw 2026.8.1 and later otherwise abort withrequires capability consentundercurl | bash.gateway restartexits 1 withGateway service disabled.. The bootstrap now treats that as success, prints thegateway install/gateway runhints and exits 0. Any other restart failure still fails.OpenClaw Agent (<host> <timestamp>).band-sdk-typescript/plugins/openclaw;band-ai/openclaw-channel-bandis empty.BAND_BASE_URLused for registration is now persisted for the runtime. NanoClaw's vault--host-patternis derived from it.BAND_HERMES_REFaccepts a branch, a tag, or a full 40-character SHA. A short SHA gets a clear error.cd <home> && bash nanoclaw.sh. Before, it registered and then launchedclaude /add-bandwith no image or service to build into.band-ai/mainis told to run from an empty directory.scripts/register-agent.sh(canonical copy): unique default agent name per run, so a second install no longer gets HTTP 422.Merge order
Merge this first. band-ai/hermes-band-platform#69 and band-ai/nanoclaw-band#36 copy
scripts/register-agent.shfrom this branch byte for byte (blob 8214bc97). Open PRs #26 and #19 touch neighbouring lines and will need a rebase.Verification
bash -npasses on all changed scripts.mainalready has.python3 scripts/check.py: OK.pytest tests/ -q: 20 passed.Refs thenvoi/fern#347