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.
npm install -g @agentdeploymentco/bishop@latestIn 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:
rm bishop.db bishop.db-wal bishop.db-shm
cp .bishop/backups/bishop.db.v8.backup bishop.dbDelete 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.
- Make yourself an admin in
permissions.admins, like"slack:[email protected]". Bishop won't start without an admin while the default is deny. - Give each entry a level. Everyone on an old list could do everything the agent can, including change the agent itself.
writeis the closest match for most people, andadminfor anyone who should change the agent or give others their levels. - Write
@domainentries as*@domain, likegmail:*@example.com. - 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:
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> writeThe 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.