You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d9d3eb7
Browse filesBrowse the repository at this point in the historyBrowse files
feat(app-shell): Connect an Agent marks claude.ai (web) and Doubao cloud tasks as not available on a non-public address (#30973)
<!-- claude-projects-attribution: {"github_login":"os-tesla"} -->
_Requested by **Tesla** · [project
thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6Jao4R5vgzn4JR1Ewtt4rWD5cr)_Fixes#30897
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:「连接 AI 助手」页显示的地址不是公网 HTTPS(http://、localhost、内网地址)时,claude.ai
网页版和豆包工作的云端任务会标出「此部署不可用」,一句话说明原因(写出该地址),并说明怎样才能用(把系统部署到公网 HTTPS 地址)。
- 为什么改:公司在内网试用时照着 claude.ai 步骤粘贴地址,连接失败却没有可执行的原因;页面本来就知道自己显示的地址,可以先说清楚。
- 风险与回滚:只在页面显示层判断地址,不改任何服务端行为;Claude Desktop、Claude Code、Codex、Cursor
等本地客户端的步骤不变;公网 HTTPS 地址下页面与之前完全一样。回滚即 revert 本 PR。
-
先看:`ui/packages/app-shell/src/console/connect/deploymentReach.ts`(地址判定)、`ConnectAgentWidget.tsx`
里的 `Unavailable` 与两处使用、测试文件末尾新增的 describe。
- 两分钟验证:本地部署打开 设置 → 连接 AI 助手:Claude 页签下 claude.ai
一栏出现虚线框「claude.ai(网页版):此部署不可用」,切到「豆包工作」出现「云端任务:此部署不可用」,切到 Codex 没有提示。
- 需要你做的:无,席位落地。
- **席位意见**:ui 席 2 对照 head `a70c0f26` 的 diff 复核:15 个文件、+293 /
−9,无受治理路径。新增 `deploymentReach.ts` 的 `isPublicHttpsAddress` 判定公网
HTTPS(`http://`、`localhost`、单标签或 `.local`/`.internal`
主机、回环/私网/链路本地/CGNAT 的 IPv4 与 IPv6 字面量,含 IPv4 映射形式,均判为不可达);地址不可达时
claude.ai(网页版)与豆包工作的云端任务显示「此部署不可用」、原因(点名地址)与补救,其他客户端不变,公网 HTTPS 下与 main
相同。五条文案进所有语言包,繁体由简体生成。CI 全绿,Clause-② no,不欠契约复审。同意落地。
## What changes
- `deploymentReach.ts` (new): `isPublicHttpsAddress(address)` — false
for a non-`https:` address, `localhost` / `*.localhost`, a single-label
host, `.local` / `.internal`, and loopback, private (10/8, 172.16/12,
192.168/16), link-local, CGNAT and unspecified IPv4 literals, plus
`::1`, `fc00::/7`, `fe80::/10` and IPv4-mapped private IPv6. A host name
with a dot is taken as public (the page cannot see the reader's DNS).
- `ConnectAgentWidget.tsx`: when the MCP address is not public HTTPS,
the claude.ai / Claude Desktop column shows an `Unavailable` note
(title, one-sentence reason naming the address's origin, remedy) in
place of the static reachability small print, and the Doubao Work steps
gain the same note for cloud tasks. Claude Desktop's steps, Claude Code,
Codex, Cursor, WorkBuddy and QwenWork are unchanged. On a public HTTPS
address nothing renders differently from `main`.
- i18n: five new keys under `connectAgent.unreachable` in all ten
console packs (PR #30902 is not on `main`: today's `zh.ts` / `pt.ts`).
- Root changeset `.changeset/30897-connect-agent-unreachable-address.md`
(`@object-ui/app-shell`, `@object-ui/i18n`: patch).
## Tests
In `ConnectAgentWidget.keyName-13355.test.tsx` (the component's one
harness file), a new top-level describe: the address classification
table (16 non-public, 5 public); on `http://localhost:3000` the
claude.ai note with the address and the Doubao cloud-task note render,
Claude Desktop / Claude Code steps stay, Codex and Cursor carry no note;
on `https://crm.example.com` no note renders and the original
reachability line is back. The test `t` mock now echoes the `address`
option beside `name`.
## Acceptance notes
- The page judges only the address it shows (the discovery-relative MCP
route resolved against the console's origin). A public-looking domain
that resolves to a private IP on the reader's network is taken as
public: the page cannot see DNS.
- The Doubao hint keeps its last sentence about cloud tasks needing
public HTTPS; on a non-public address the note now says so first, for
this deployment.
- The fallback hints that say "create a key below" are unchanged here;
#30898 rewrites that copy and will name Advanced.
- The Claude column keeps its heading "claude.ai / Claude Desktop"; only
the web half (claude.ai) is marked unavailable, per the card's Expected.
(Seat note at ACCEPT.)
## Verification
Head `1851c124`: branch restarted on `main` `6ddf8272` (PR #30943's
merge), this card's commit re-applied cleanly; full `pnpm build` on that
base (118/118).
<details><summary>Live check on a local deployment (showcase with the
fresh flag, console Vite dev, admin)</summary>
- before (`main`): on `http://localhost` the claude.ai column shows the
address with a copy button and the static small print "claude.ai (web)
connects from Anthropic's servers — the deployment must be reachable
over public HTTPS"; the Doubao steps carry the same kind of static line.
Nothing reacts to the address.
- after: Claude tab — a note "claude.ai (web): not available for this
deployment / claude.ai connects from Anthropic's servers, and they
cannot reach http://localhost:5197: only a public HTTPS address is
reachable from there. / Serve this system at a public HTTPS address
(https:// on a domain the internet can reach) to make it available.";
Doubao Work tab — "Cloud tasks: not available for this deployment" with
the same reason shape and remedy; Codex tab — no note.
</details>
<details><summary>Local tests and gates</summary>
- `pnpm --dir ui exec vitest run packages/app-shell/src/console/connect/
packages/i18n/
packages/app-shell/src/__tests__/product-neutral-renderer.ratchet.test.ts`
→ 99 files, 1565 passed, 13 skipped (widget file 12/12)
- `pnpm --filter @object-ui/i18n run type-check && pnpm --filter
@object-ui/app-shell run type-check` → exit 0
- eslint `packages/app-shell/src/console/connect/` → 0 errors (3
pre-existing `no-explicit-any` warnings); `pnpm
check:new-line-citations` → 0 new
- `dispatch-gates --commands` derived 36 commands on 1851c12; all 36
exit 0 (incl. `node scripts/check-sdui-manifest.mjs`, `pnpm --dir ui
exec vitest run scripts/` 170 files passed); `--ran` reconciliation: 36
run, 0 NOT-MEASURED, 0 UNRUN.
</details>
<!-- signed: domain:ui#2 · os-tesla · session_01L9qibw7DekEe3wx5f3zphf
-->
---------
Co-authored-by: Claude <noreply@anthropic.com>
feat(app-shell): Connect an Agent marks claude.ai (web) and Doubao cloud tasks as not available on an address that is not public HTTPS
7
+
8
+
Clause-②: no
9
+
Metadata-protocol: none
10
+
11
+
claude.ai on the web and Doubao Work's cloud tasks connect from their vendor's servers, which reach only a public HTTPS address. When the address Connect an Agent shows is an `http://` address, `localhost`, a single-label or `.local` host, or a private, loopback or link-local IP, those two ways in now carry a "not available for this deployment" note with the reason in one sentence (naming the address) and what makes them available (serving the system at a public HTTPS address). Claude Desktop, Claude Code, Codex, Cursor and the other clients stay as they are, and on a public HTTPS address nothing changes. The five new strings ship in every console language pack, Traditional Chinese generated from Simplified.
Copy file name to clipboardExpand all lines: ui/packages/i18n/src/locales/ar.ts
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4137,6 +4137,13 @@ const ar = {
4137
4137
advanced: {
4138
4138
title: 'متقدم: البرامج النصية وCI',
4139
4139
},
4140
+
unreachable: {
4141
+
claudeWebTitle: 'claude.ai (الويب): غير متاح لهذا النشر',
4142
+
claudeWebReason: 'يتصل claude.ai من خوادم Anthropic، وهي لا تستطيع الوصول إلى {{address}}: لا يمكن الوصول من هناك إلا إلى عنوان HTTPS عام.',
4143
+
doubaoCloudTitle: 'مهام السحابة: غير متاحة لهذا النشر',
4144
+
doubaoCloudReason: 'يشغّل Doubao Work مهام السحابة من خوادمه الخاصة، وهي لا تستطيع الوصول إلى {{address}}: لا يمكن الوصول من هناك إلا إلى عنوان HTTPS عام.',
4145
+
remedy: 'قدّم هذا النظام على عنوان HTTPS عام (https:// على نطاق يمكن الوصول إليه من الإنترنت) ليصبح متاحًا.',
Copy file name to clipboardExpand all lines: ui/packages/i18n/src/locales/de.ts
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3832,6 +3832,13 @@ const de = {
3832
3832
advanced: {
3833
3833
title: 'Erweitert: Skripte und CI',
3834
3834
},
3835
+
unreachable: {
3836
+
claudeWebTitle: 'claude.ai (Web): für diese Bereitstellung nicht verfügbar',
3837
+
claudeWebReason: 'claude.ai verbindet sich von den Servern von Anthropic, und diese erreichen {{address}} nicht: Von dort ist nur eine öffentliche HTTPS-Adresse erreichbar.',
3838
+
doubaoCloudTitle: 'Cloud-Aufgaben: für diese Bereitstellung nicht verfügbar',
3839
+
doubaoCloudReason: 'Doubao Work führt Cloud-Aufgaben auf den eigenen Servern aus, und diese erreichen {{address}} nicht: Von dort ist nur eine öffentliche HTTPS-Adresse erreichbar.',
3840
+
remedy: 'Stellen Sie dieses System unter einer öffentlichen HTTPS-Adresse bereit (https:// auf einer aus dem Internet erreichbaren Domain), um es verfügbar zu machen.',
Copy file name to clipboardExpand all lines: ui/packages/i18n/src/locales/en.ts
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4639,6 +4639,13 @@ const en = {
4639
4639
advanced: {
4640
4640
title: 'Advanced: scripts and CI',
4641
4641
},
4642
+
unreachable: {
4643
+
claudeWebTitle: 'claude.ai (web): not available for this deployment',
4644
+
claudeWebReason: 'claude.ai connects from Anthropic\'s servers, and they cannot reach {{address}}: only a public HTTPS address is reachable from there.',
4645
+
doubaoCloudTitle: 'Cloud tasks: not available for this deployment',
4646
+
doubaoCloudReason: 'Doubao Work runs cloud tasks from its own servers, and they cannot reach {{address}}: only a public HTTPS address is reachable from there.',
4647
+
remedy: 'Serve this system at a public HTTPS address (https:// on a domain the internet can reach) to make it available.',
Copy file name to clipboardExpand all lines: ui/packages/i18n/src/locales/es.ts
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3909,6 +3909,13 @@ const es = {
3909
3909
advanced: {
3910
3910
title: 'Avanzado: scripts y CI',
3911
3911
},
3912
+
unreachable: {
3913
+
claudeWebTitle: 'claude.ai (web): no disponible para esta implementación',
3914
+
claudeWebReason: 'claude.ai se conecta desde los servidores de Anthropic, y estos no pueden alcanzar {{address}}: desde allí solo se alcanza una dirección HTTPS pública.',
3915
+
doubaoCloudTitle: 'Tareas en la nube: no disponibles para esta implementación',
3916
+
doubaoCloudReason: 'Doubao Work ejecuta las tareas en la nube desde sus propios servidores, y estos no pueden alcanzar {{address}}: desde allí solo se alcanza una dirección HTTPS pública.',
3917
+
remedy: 'Sirve este sistema en una dirección HTTPS pública (https:// en un dominio accesible desde Internet) para que esté disponible.',
Copy file name to clipboardExpand all lines: ui/packages/i18n/src/locales/fr.ts
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3905,6 +3905,13 @@ const fr = {
3905
3905
advanced: {
3906
3906
title: 'Avancé : scripts et CI',
3907
3907
},
3908
+
unreachable: {
3909
+
claudeWebTitle: 'claude.ai (web) : indisponible pour ce déploiement',
3910
+
claudeWebReason: 'claude.ai se connecte depuis les serveurs d’Anthropic, qui ne peuvent pas atteindre {{address}} : seule une adresse HTTPS publique est joignable depuis là-bas.',
3911
+
doubaoCloudTitle: 'Tâches cloud : indisponibles pour ce déploiement',
3912
+
doubaoCloudReason: 'Doubao Work exécute les tâches cloud depuis ses propres serveurs, qui ne peuvent pas atteindre {{address}} : seule une adresse HTTPS publique est joignable depuis là-bas.',
3913
+
remedy: 'Servez ce système à une adresse HTTPS publique (https:// sur un domaine joignable depuis Internet) pour le rendre disponible.',
0 commit comments