Repository navigation
Shared config with the MCP server, scopes for 3.5.2, logout revokes - #8
Merged
Merged
Conversation
…request publish and media delete - config writes are atomic (temp file, fsync, rename with retry) and go through a lock file with owner ids and stale-lock takeover, the protocol the MCP server follows too - invalid YAML is an error, never an empty config that the next save would write over - unknown keys are preserved; instances record the OAuth2 client their token belongs to - token refresh runs under the lock against the stored instance, reuses a token another process renewed, and never falls back to an expired token - DefaultScopes adds content:publish and media:delete (restore, clean) - clean and restore --clean stop instead of looping when media cannot be deleted; backup fails instead of writing an archive without media (#7) - every test package runs against a throwaway HOME
…us; safer browser open - login refuses a name already used by a different instance - removing the default instance makes the remaining one default only if it is the only one - instance names include the port and skip www, matching the Trokky MCP server - OpenBrowser opens only http(s) URLs - lock waiters outlast the stale threshold (75s)
RFC 7009 revoke with the refresh token (or access token), 10s timeout; the note tells an unreachable instance from a refusal. A 401 on a browser sign-in hints to run trokky login.
Device-flow requests send trokky-cli/<version> (macOS; host), recorded with the grant for Studio's Connected applications; other requests send trokky-cli/<version>.
Device-flow requests send trokky-cli/<version> (OS; host); every other request sends trokky-cli/<version>, keeping the machine name out of proxy logs. The host is reduced to printable ASCII without comment syntax.
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.
Goes with Trokky 3.5.2 (Trokky/trokky#62, on npm). Released as v0.3.0.
Shared config with the Trokky MCP server
~/.trokky/config.yamlis shared with@trokky/mcp, so a site signed in with either tool works in both.clientIdthey signed in with.Scopes
content:publishandmedia:delete, which 3.5.2 enforces forrestoreandclean.Logout and sign-in
trokky logoutrevokes the sign-in on the instance (RFC 7009), so it disappears from the Studio's Connected applications. An instance that can't be reached, or refuses, is still logged out locally, with a note saying which happened.trokky login: the sign-in may have been revoked in Studio, or predate the upgrade.trokky-cli/<version> (OS; host), which Studio shows under Connected applications. Every other request sends onlytrokky-cli/<version>.Upgrading
Run
trokky loginagain for each browser-signed-in instance once its server is on 3.5.2. Tokens issued before 3.5.2 carry no grant and are refused.Verification
go vetandgo test ./...pass. Every test package pins HOME to a temp dir, so tests never touch the real config.