Skip to content

Upgrading ​

Install the new version and restart. A version that changes the database migrates it on the first start, and says so in the log. The changelog says what each version changed, including which ones migrate.

sh
npm install -g @agentdeploymentco/bishop@latest

In a container, pull the new image and start it against the same volumes.

Rolling back ​

Bishop copies the database before it migrates. The copy lands in .bishop/backups/, named for the schema it holds. To go back, stop Bishop, install the version you were on, and restore it:

sh
rm bishop.db bishop.db-wal bishop.db-shm
cp .bishop/backups/bishop.db.v8.backup bishop.db

Delete bishop.db-wal first, as above. Bishop runs the database in write-ahead logging mode, so recent changes live in that file rather than in bishop.db. A Bishop that stopped cleanly leaves nothing there, but one that was killed does, and SQLite replays it into whatever database file it finds beside it without checking that the two belong together. Restore without removing it and you get the migrated database back, looking exactly like a successful rollback. You can't tell which case you're in by looking, so remove them every time.

Nothing deletes the copies, and bishop gc leaves them alone. There's one per schema version this database has been migrated from, so a handful at most. Upgrading again from the same version replaces that version's copy, so if you restore, run the old version for a while and upgrade again, the copy covers that stretch too.

If Bishop can't take the copy it refuses to start and says nothing was migrated, which usually means the disk is full or something else is under that name. Nothing has changed at that point, so fix the reason and start again.

Interfaces need a config block ​

From 0.11, credentials alone don't start an interface. It also needs a block in .bishop/config.json, which bishop slack setup and bishop teams setup have always written. An interface you set up by hand, or Gmail, may have none. Startup logs a warning for each one, or fails if that leaves nothing to run, and either message names the block to add, like "gmail": {}. See Configuration.

From allow lists to permission levels ​

Permission levels replace slack.allow, gmail.allow and teams.allow, and a config that still has one stops at startup with the path to it. There's no import command, so move each entry by hand, then delete the allow keys.

  1. Make yourself an admin in permissions.admins, like "slack:[email protected]". Bishop won't start without an admin while the default is deny.
  2. Give each entry a level. Everyone on an old list could do everything the agent can, including change the agent itself. write is the closest match for most people, and admin for anyone who should change the agent or give others their levels.
  3. Write @domain entries as *@domain, like gmail:*@example.com.
  4. An interface with no list, or an empty one, was open to everyone. "permissions": { "default": "read" }, or whichever level you want, does the same for every interface at once.

From the shell, with Bishop stopped or running:

sh
bishop permissions set gmail:[email protected] write
bishop permissions set 'gmail:*@example.com' read
bishop permissions set teams:[email protected] write
bishop permissions set slack:<U0B4VE40BCH> write

The shell can't look up a Slack username, email or group name, so use the ID there (slack:<S0123ABC> for a user group), or start Bishop with yourself as admin and run `! permissions set @hayes write` in Slack, where names work. Entries in permissions.admins can be names too, since Bishop resolves them at startup.

A level on one interface doesn't carry to another, as an allow list didn't.

Teams ​

An upgrade that adds a Teams permission needs the app removed and installed again before the permission takes effect. See Microsoft Teams.