Repository navigation
feat(connect): create and update a Connect app from one.connect.ts (v2.10.0) - #217
Merged
Merged
Conversation
…2.10.0) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…v; the page makes the connect key Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t to .env; the page makes the connect key" This reverts commit 2e6c0c9.
…'t import it The config imports the SDK from the project, not from the CLI. Node's raw 'Cannot find package' error now reads as an instruction, and an SDK older than 0.19.0 (no /config export) says to upgrade. The skill and guide say to install the SDK before writing the file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… it should say connect create now opens /cli/connect/<id> (beside one login's /cli/auth) with ?env=<file>, so the page tells the developer where to paste the two secrets. Docs call it the setup page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… it with the API key connect create resolves the config to catalog ids, then opens the setup page with it in the link's fragment (/cli/connect/new, or the app's id to review changes) and waits on 127.0.0.1, like one login. The person approves with their dashboard session; the page reports the ids back and the CLI writes them to the env file. The API key only reads the catalog. Drops the create/update API methods. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he actions hint The handoff is deflated before base64url (the page inflates it with the browser's DecompressionStream), roughly halving long action lists. A config over 32,000 characters stops with a message instead of opening a link a terminal can't hand over, and on Windows a link too long for PowerShell is printed to open by hand. The unknown-action hint and README now name `one actions find`; `one actions search` no longer exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… test per project Windows writes the package path in ERR_PACKAGE_PATH_NOT_EXPORTED as @withone\connect, so the upgrade hint never showed there; the check now takes either separator. The test loaded one config file twice, which Node 22 answers from its cache of the first failed import; each case now gets its own project. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
paulkr
approved these changes
Oct 28, 2026
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.
Part of programmatic Connect app creation (
@withone/connect0.19.0 addsdefineConnectApp; the dashboard page is core-ui #1001). No backend change: the API key never creates or changes a Connect app (pica-v2 #1092 closed, per Sam's review).one connect createreadsone.connect.ts(also.mts,.mjs,.js) and resolves tool slugs and custom action names to catalog ids (the only API-key calls, all existing catalog reads). Then, likeone login, it listens on127.0.0.1and opens the setup page with the config in the link's fragment, deflated and base64url'd (about half the size; 400 custom actions make a 13.6 KB link). A config over 32,000 characters stops with a message; on Windows a link too long for PowerShell is printed to open by hand:The person approves with their dashboard session. The page reports the ids back (never a secret, checked against
state, plain ids only), and the CLI writesONE_CLIENT_ID,ONE_PERMISSION_SETandONE_REDIRECT_URIto.env.local(or.env), keeping every other line, then sends the browser to the summary. It waits up to 10 minutes; a cancel in the browser ends it at once. In--agentmode the link goes to stderr straight away and the JSON result (outcome:created|updated|unchanged) comes once approved.one connect typeswritesone-connect-env.d.ts, augmentingConnectRegistrywith every tool slug and action names for the tools the config asks for.policyToRuleFieldsin core-ui)..tsconfig loads natively on Node 22.18+; older Node gets a message pointing atone.connect.mjs. If the config can't import@withone/connect(not installed, or older than 0.19.0), it says to install it first. No new dependency.2.10.0.Tests:
connect-app.test.ts(rules, handoff encoding, missing SDK),connect-callback.test.ts(state, id checks, cancel, the redirect), and the setup/summary links.npm run typecheckandnpm run buildpass.npm testis 703/709: the 6resolveConfigfailures also fail on untouchedmainon this machine (they read the real~/.one). Checked end to end against local core with the dashboard: create, update and a no-change re-run.🤖 Generated with Claude Code