feat(cloud-connection): self-hosted credential loop + SDUI binding surface#1766
Merged
Conversation
…rface - ConnectionCredentialStore: persists the one-time oscc_ runtime bearer from the bind response (0600 file, env-local); bind/poll stores it and STRIPS it from the browser-facing response; environment id persists with it so OS_ENVIRONMENT_ID is only needed for the first bind. - All control-plane forwards (status/install/installation/installed/ org-packages) resolve their credential per-request: service key (cloud-hosted) → stored bearer (self-hosted). - New POST /cloud-connection/unbind: best-effort control-plane revoke + local credential clear. - install-local catalog fetch presents the credential so a bound runtime resolves its own org/private package manifests. - SDUI surface (ADR-0029 K2): the plugin registers a cloud_connection_settings page + Setup-nav contribution as metadata; the console provides only the cloud-connection:panel widget. - 36/36 package tests (store round-trip/0600, persist+strip, stored- bearer forwards, unbind, bundle registration). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| try { | ||
| const resp = await fetch(`${cloudUrl}/api/v1/cloud-connection/status?environment_id=${encodeURIComponent(environmentId)}`, { | ||
| headers: cloudApiKey ? { Authorization: `Bearer ${cloudApiKey}` } : {}, | ||
| headers: authHeaders(), |
| body: JSON.stringify({ environment_id: environmentId }), | ||
| }); | ||
| revoked = resp.ok; | ||
| } catch { /* control plane unreachable — local clear still proceeds */ } |
| const resp = await fetch(attempt.url, { headers: { 'Accept': 'application/json' } }); | ||
| const headers: Record<string, string> = { Accept: 'application/json' }; | ||
| if (attempt.label === 'cloud' && cloudCredential) headers.Authorization = `Bearer ${cloudCredential}`; | ||
| const resp = await fetch(attempt.url, { headers }); |
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.
自托管闭环 B + 绑定 UI 的 SDUI 元数据(framework 侧)
配套 cloud#253(bind mint oscc_ + 控制面受理)。
B — 凭据通道
ConnectionCredentialStore(.objectstack/cloud-connection.json,0600):bind/poll 把一次性runtime_token存本地并从浏览器响应剥离(SPA 永不持凭据);环境 id 一并持久化(首绑后不再需要 OS_ENVIRONMENT_ID)POST /cloud-connection/unbind(控制面 revoke best-effort + 本地清除)SDUI(渐进混合方案——绑定 UI 不硬写 React)
manifest.register自带cloud_connection_settingspage + Setup nav contribution(ADR-0029 K2)cloud-connection:panelwidget(objectui 另 PR)验证
🤖 Generated with Claude Code