Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What this does
An app built on
@withone/connectcan now run the CLI as one of its users. SetONE_SECRETto the app's Connect key andONE_CONNECT_USER_IDto the user'scu_…id, in the env or.onerc.x-one-connect-user-idbesidex-one-secret: API calls, knowledge loads and passthrough. One then holds the call to that user's grant, as it does for the SDK.--headersand flow steps can't set, so nothing can switch the connected user mid-run.one listreads/v1/connections/reachableunder a grant./v1/vault/connections,/v1/access/meand/v1/connectionsall refuse a grant. Each reachable row carries what the grant gives on it and the user's share level, so the listing shows the grant's access withaccessSource: "server". Every otherlistConnectionscaller (flows, sync, find's platform list) reads the same route.one whoamishows the connected user andconnectUserId.one guide, the skill and--help. Version 2.18.0.ONE_CONNECT_USER_IDis never written to config. One refuses a Connect key without it, and an ordinary key with it (GrantBearerRequired), so a stray value in a cloned.onercmakes calls fail rather than widen what a key reaches.What a grant can run today
whoami/v1/users/whoamilist/v1/connections/reachableactions load/v1/knowledgeactions execute/v1/passthroughactions find/v1/available-actions/findadd,remove, relaysNo CLI change is needed for
findonce core accepts a grant: it already sends the header.Out of scope: Connect's token mode (a minted bearer). Its tokens are short-lived, so it doesn't fit a CLI config.
Checks
New tests: 7, in
src/lib/connect-grant.test.ts. They cover:listConnectionspaging/connections/reachable;one listshows;.onerc;The header, listing and refusal tests fail without the change.
Full suite: 944 of 952 pass. The 6 failures are the
resolveConfigtests, which fail the same way on a cleanmainon this machine. CI is green onmain.Typecheck and build: pass.
Not yet run live against dev with a real Connect key and
cu_…id.🤖 Generated with Claude Code