Repository navigation
Conversation
`orrery add --claude` works end to end again. It stopped short after accounts moved to the plugin, because `AccountLoginFlow` needs orrery's own `Account` — staging dirs, a Keychain item name — and none of that exists for an account the plugin owns. The split falls where the knowledge does. `stageLogin` runs the tool's login against a throwaway directory: giving a subprocess a terminal is the host's job, and the tool-specific inputs come off the tool's own description, so orrery needs to know nothing else to do it. Then it hands the directory over and asks nothing. `ClaudeCredentials` is the other half, and it is claude knowledge that never was a path. On macOS the credential is a keychain item under a service name derived from the config directory — the directory only names it, and a host copying files would move nothing. Elsewhere it is `.credentials.json` inside. `.claude.json` travels either way: an account holding a working credential that cannot say whose it is lists with a blank identity and looks broken. The keychain primitives live here now rather than being borrowed from the host. The host having them was the arrangement this replaces — it had to know claude's service-name derivation to use them, which is exactly the knowledge that belongs on this side. A failed login leaves the account in place. Created and not logged in is a state `orrery list` shows honestly, and the person can retry without losing the name they chose; deleting it behind them would be worse. The staging directory is removed either way, including on failure — it holds a credential. dev.12 removed `AIToolStateTransfer`, so orrery's dead plumbing for it goes: `RemoteStateTransfer`, the capability optional, and `ToolCapability.stateTransfer`, which never had a call site. `ToolCapabilityTests` kept its subject — how a capability is reconciled across the boundary — and changed its example to accounts. It gained one: a plugin advertising six of the seven account methods does not have the capability, because a pool that can be filled and never emptied is worse than none. 671 tests pass.
This branch has not been deployed
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.
orrery add --claudeworks end to end again. It stopped short after accounts moved to the plugin, becauseAccountLoginFlowneeds orrery's ownAccount— staging dirs, a Keychain item name — and none of that exists for an account the plugin owns.The split falls where the knowledge does
stageLoginruns the tool's login against a throwaway directory. Giving a subprocess a terminal is the host's job, and the tool-specific inputs — the login command, the variable pointing at a config directory — come off the tool's own description. orrery needs to know nothing else to do it. Then it hands the directory over and asks nothing.ClaudeCredentialsis the other half, and it is claude knowledge that never was a path:.credentials.jsoninside the directory.claude.jsontravels too: an account holding a working credential that cannot say whose it is lists with a blank identity and looks brokenThe keychain primitives live in the plugin now rather than being borrowed from the host. The host having them was the arrangement this replaces — it had to know claude's service-name derivation to use them, which is exactly the knowledge that belongs on the other side.
A failed login leaves the account
Created and not logged in is a state
orrery listshows honestly, and the person can retry without losing the name they chose. Deleting it behind them would be worse. The staging directory is removed either way, including on failure — it holds a credential.Dead plumbing goes with dev.12
AIToolStateTransferwas removed upstream, so orrery's side of it goes:RemoteStateTransfer, the capability optional, andToolCapability.stateTransfer, which never had a call site.ToolCapabilityTestskept its subject — how a capability is reconciled across the boundary — and changed its example from state transfer to accounts. It gained one case: a plugin advertising six of the seven account methods does not have the capability, because a pool that can be filled and never emptied is worse than no pool.Verification
671 tests pass.
Checked on a Linux installation as well, driving the plugin over its own protocol with a hand-made staging directory —
orrery addlaunches the tool interactively and cannot run unattended, but the half worth testing is the one that moves the credential.orrery listshowsworkwith no identitytool/adoptLogin{"result":{}}.claude.jsonand.credentials.json; list showswork adopted@example.invalidno claude login was found in /tmp/…The last two rows are the point: a login that did not arrive is never reported as done, and a failed attempt does not damage the one already there.
🤖 Generated with Claude Code