Add bot <name> and trust the bots' dir #28
No reviewers
Labels
No labels
ready-for-agent
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bryan/dotfiles!28
Loading…
Reference in a new issue
No description provided.
Delete branch "w35-3-bot-alias"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of bryan/dotfiles-workspace#35 (W35.3: the
bot <name>alias generated from the bot directories, and trust for the bots' parent directory).What
bot <name>(dot-config/shell/aliases.sh+dot-config/shell/bot-tab.py, bash and zsh): shows that bot's tab in thebotsRex session that pi-bots keeps (one tab per bot, named after it).botalone lists the bots.$PI_BOTS_DIR(default~/code/pi-bots/bots) that hold anAGENTS.mdand have a valid pi-bots name. They are read on every call and every completion, so a bot made or retired withpi-bots bot create/retireis picked up without a new shell..retired/is never listed.bot bobmakes Bob's tab the active tab of thebotssession (rex window focus). It then asks one Rex app to show it (session.select): the calling pane's block owner, or else the only connected app. A refusal (Remote Control off) still leaves the tab active, and exits 0 with a note.botssession, no tab yet or an unknown name, it says so and changes nothing.python3exist, so it does nothing on other hosts.Pi trust for the bots' parent (
scripts/reconcile-pi-bots-trust.mjs, run bysetup-platform-configs.sh):.pi/settings.jsonuntil the project is trusted. This script saves a trust decision for the bots' parent through Pi's own exportedProjectTrustStore, found from thepionPATH, so a Pi started in a bot's directory uses that bot's model settings. The bot service's own Pis already pass--approve.--checkreports drift. It skips when the bots or Pi are missing.Tests
bash tests/test-bot-alias.sh(82 checks, both shells): a fakerexrecords calls and answers from fixtures, and a stand-in Pi package mirrors the store's nearest-ancestor and real-path rules. The cases covered are:rex;$and a backtick;Every guard was mutated (21 mutations), and each mutation fails a test. The real Pi 1.5.2 store was checked in a scratch agent directory: after
--apply, a Pi in a bot directory took that bot's thinking level.tests/test-pi-seat-wrapper.shandtests/test-reconcile-shell-additions.shstill pass.Review
A visible, read-only Pi reviewer requested changes:
botrefuses;evalexpanded the checkout path;All are fixed with tests in the second commit. The re-review approved on correction 1, with one nit: zsh's
nomatchprinted an error when completing with no bots. That nit is fixed with a test in the third commit (mutation checked).Add bot <name> and Pi trust for the bots' parentto WIP: Add bot <name> and Pi trust for the bots' parentWIP: Add bot <name> and Pi trust for the bots' parentto Add bot <name> and Pi trust for the bots' parentAdd bot <name> and Pi trust for the bots' parentto Add bot <name> and trust the bots' dir