A2A 面板原生化 + a2a.json 全可视化管理 - #3
Merged
Merged
Conversation
…-dir config - server.ts: add updateCard()/getBaseUrl()/rebuildInterfaceUrls() so the advertised AgentCard identity (name/description/version/baseUrl/endpointPath/ skills) can change at runtime, in place. - dashboard.ts: add setServerIdentity/updateAgent hooks + set-server-identity/ update-agent control actions. - index.ts: always mount the server effect (gate routes on enabled=wantsServer) so a client-only profile can create+enable the A2A server from the UI with no restart; persist server.enabled; wire the new hooks; serverCard() reads live values (fixes stale advertised baseUrl); baseUrl '' clears the pin and re-infers from the real listen address. - a2a-config.ts: when no a2a.json exists yet, write to the --profile dir instead of cwd, so a UI-generated config lands where dsh reads it on next launch. - test: cover the profile-dir fallback (+2 cases).
…ement - New dashboard.css.ts: idempotent stylesheet built on --dsw-alias-* tokens, with @container (not @media) responsive breakpoints keyed to the settings drawer's own width, plus smooth transitions. Fixes the cramped input+button and value+copy rows by moving the aggressive full-width wraps to a <440px band. - Merge the three tabs into two by role: 「连接的 Agent」(client) and 「对外服务」(server), the latter folding in serve config + inbound peers. - Serve identity: read-only view + inline edit form with full skill add/edit/ remove; guided first-run setup pre-filled with sensible defaults (「创建并上线」) so a new user configures everything without touching JSON. - Per-agent advanced settings (timeout/mapSkills/token) via a 设置 form. - baseUrl field: blank = auto-infer; always sent so the host can clear the pin.
Rebuilt lib/ (client.js bundle, index.js, type declarations) for the host and UI changes above. tsconfig: add DOM/DOM.Iterable libs — the client half now uses document/navigator directly.
- Rewrite the connection-dashboard section for the two role tabs and the fully-visual a2a.json management (guided setup, identity/skill editing, per-agent settings). - Clarify baseUrl auto-inference (blank = infer real listen address) and that UI-generated configs omit the optional mode field. - Replace the four stale three-block screenshots with two current tab shots.
The plugin marketplace moved from a shared data/screenshots.json to per-repo declaration. Point at the two current panel screenshots, relative to this file at the repo root.
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.
概述
把 A2A 设置面板重构为 DSH 原生风格,并让
a2a.json的连接级配置完全可视化——新用户无需手改配置文件即可完成配置与上线。同时修复了几个存量问题。改动(按层)
feat(host)
0e9c867server.ts:新增updateCard()/getBaseUrl()/rebuildInterfaceUrls(),支持运行时就地修改对外身份(名称/描述/版本/baseUrl/端点/skills),重建 AgentCard 即时生效。dashboard.ts:新增setServerIdentity/updateAgenthook 与set-server-identity/update-agent控制动作。index.ts:server 效果总是挂载(路由注册由enabled=wantsServer门控),使 client-only profile 也能从 UI 运行时创建并上线服务、无需重启;持久化server.enabled;serverCard()读实时值(修复广告了过期 baseUrl 的存量 bug);baseUrl 传空串=清 pin 并按真实监听地址重新推导。a2a-config.ts:修复——无现存a2a.json时,写入落到--profile指定的 profile 目录而非 cwd,保证 UI 生成的配置落在 dsh 下次会读的位置(否则重启即丢)。feat(ui)
75e5cc6dashboard.css.ts:基于--dsw-alias-*token 的幂等样式表,响应式改用@container(按面板真实宽度而非视口),修复窄面板下输入框+按钮/URL+复制被拆行的拥挤问题。a2a.json并启动。build
7c34f78重新编译
lib/;tsconfig增加 DOM/DOM.Iterable(client 半区直接用 document/navigator)。docs
1b7b5dbREADME 中英更新为两 tab + 全可视化;澄清 baseUrl 自动推导与可选的 mode 字段;替换 4 张旧截图为 2 张最新截图。
测试
npm test:46 用例全过(含新增的 profile-dir 兜底 +2 用例)+ client bundle 冒烟。