Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 36 additions & 4 deletions docs/en/docs/integrations/dsh.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ native MCP discovery before validating capture and recall.

The same package also exposes an independent browser entry, `./client`. After restart, DSH Web and Desktop show a
PowerContext status control above the account area. If the control is absent, the host did not load the browser
entry; existing tools and lifecycle behavior remain available, so this is not a Server failure. The control is not
a Dashboard replacement: clicking it opens connection diagnostics only. Dashboard embedding remains future work.
entry; existing tools and lifecycle behavior remain available, so this is not a Server failure. Click the control
for connection diagnostics and the **Open Dashboard** action. With a selected conversation, the existing Dashboard
opens in DSH's right sidebar.

The npm version follows the PowerContext Release: `1.6.0rc1` maps to `1.6.0-rc.1`, with equivalent `alpha` and
`beta` suffixes. Stable releases use `latest`; prereleases use `next`. Verify the selected npm version exists
Expand Down Expand Up @@ -205,7 +206,7 @@ POWERCONTEXT_DSH_OWNER_LOCAL=true dsh web
```

Do not set this for a remote, shared, container, or SSH-forwarded host. The bridge does not add launch, install,
target, or Dashboard routes.
or target routes.

While the page is visible, the client refreshes every ten seconds. It pauses while hidden, re-verifies immediately
on return, backs off from two to thirty seconds after a failure, and marks a success older than thirty seconds as
Expand All @@ -216,9 +217,40 @@ session and invalidates responses from the previous selection. With no conversat
not create one.

Updating the plugin is an install-and-restart operation; the existing profile and connection settings are
preserved. Uninstalling it removes the browser entry, the `/powercontext/status` route, subscriptions, and
preserved. Uninstalling it removes the browser entry, the `/powercontext/status` and `/powercontext/dashboard` routes, subscriptions, and
timers. A headless host or a package without the browser entry keeps the tools and lifecycle hooks.

## Open the Dashboard in DSH

Enable the [PowerContext Server Dashboard](../operate/configuration.md) explicitly before using this entry. From a
selected DSH conversation, click **PowerContext** above the account area, then **Open Dashboard**. The existing
Dashboard opens in the right sidebar: DSH Web uses its Browser iframe, while the 0.2.2-rc.1 Desktop release uses
an isolated Browser webview. The diagnostics panel remains available from the same PowerContext control. The
Dashboard's own permissions and write confirmations still apply.

The selected conversation's workspace binding determines its Scope. Switching conversations and opening the
Dashboard again selects the new Scope. If no conversation is selected, the panel offers **Open in browser** for
the Server's default Dashboard entry; it does not create a conversation. The local Host checks Dashboard
availability through the DSH-authenticated `GET /powercontext/dashboard` route. The returned URL contains only
the Dashboard path and selected Scope, never a token. The Browser signs in directly to PowerContext when Server
token authentication is enabled; DSH's Server credential is not copied into the page. Sign-in returns to the
selected Scope. A failed sign-in stays on the Dashboard login page for correction.

For local DSH Web, use the same scheme and loopback hostname for DSH and the Server Dashboard; the ports may
differ. For example, use `http://127.0.0.1` for both. If one uses `localhost` and the other uses `127.0.0.1`,
the iframe cannot keep the Dashboard sign-in cookie. The panel explains the mismatch and offers **Open in browser**
for the same Scope.

If Dashboard is disabled, the panel says to enable it in Server configuration. A rejected Host credential or an
unavailable Server is reported separately; the API connection status is not changed by Dashboard availability.
If the DSH Browser container is unavailable, the panel keeps diagnostics open, reports that it could not open
the sidebar, and offers **Open in browser**. A Browser navigation failure is shown by DSH's Browser tab; refresh
it after restoring the Server.
PowerContext Server rejects Dashboard startup with a custom authentication Provider; diagnose that Server startup
error separately from Browser loading. This plugin neither enables Dashboard nor changes Server authentication.
The browser entry has been exercised on the official DSH 0.2.2-rc.1 Web and Desktop release; other host releases
need their own container acceptance.

## Diagnose the running configuration

Run `/pc doctor` inside the affected DSH session. Its report identifies configuration provenance and checks
Expand Down
30 changes: 27 additions & 3 deletions docs/zh/docs/integrations/dsh.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ status: community

同一个包还导出独立的浏览器入口 `./client`。重启后,DSH Web 和 Desktop 会在账号区域上方显示 PowerContext
状态控件。没有显示时说明宿主没有加载浏览器入口;已有工具和生命周期行为仍可用,因此这不是 Server 故障。
这个控件不是 Dashboard 替代品:点击只打开连接诊断,Dashboard 内嵌属于后续工作。
点击控件可查看连接诊断,并选择“打开 Dashboard”;选中会话时,现有 Dashboard 会在 DSH 右侧栏打开。

npm 版本跟随 PowerContext Release:`1.6.0rc1` 对应 `1.6.0-rc.1`,alpha、beta 同样转换。
正式版本使用 `latest` 标签,预发布版本使用 `next`;安装前先确认目标 npm 版本已经发布。
Expand Down Expand Up @@ -166,16 +166,40 @@ Web 和 Desktop 共用已保存的 `hosts.dsh` 连接设置及 `$DSH_HOME/powerc
POWERCONTEXT_DSH_OWNER_LOCAL=true dsh web
```

不要在远程、共享、容器或 SSH 转发的宿主上设置。桥接不增加 launch、install、target 或 Dashboard 路由。
不要在远程、共享、容器或 SSH 转发的宿主上设置。桥接不增加 launch、install 或 target 路由。

页面可见时每十秒刷新;隐藏时暂停,恢复可见后立即重新核对;失败后从 2 秒退避到 30 秒;成功观测超过 30 秒
会标为过期而不是继续显示绿色。DSH 的 401/403、Server 离线、readiness 依赖失败或缺少 context schema 分别显示
不同诊断。面板只展示允许字段,不打印启动 token、Authorization 值或 Bearer header。切换会话会更新观测会话并
丢弃上一会话的迟到响应;没有会话时如实显示,不创建会话。

更新插件是重新安装并重启,保留已有 profile 和连接设置。卸载会移除浏览器入口、`/powercontext/status` 路由、
更新插件是重新安装并重启,保留已有 profile 和连接设置。卸载会移除浏览器入口、`/powercontext/status` 和
`/powercontext/dashboard` 路由、
订阅和定时器;无界面宿主或没有浏览器入口的包继续保留工具和生命周期 hook。

## 在 DSH 中打开 Dashboard

先明确开启 [PowerContext Server Dashboard](../operate/configuration.md)。在选中的 DSH 会话里,点击账号区域上方的
**PowerContext**,再点击**打开 Dashboard**。现有 Dashboard 会进入右侧栏:DSH Web 使用自带 Browser iframe,
0.2.2-rc.1 Desktop 发行版使用隔离的 Browser webview。同一 PowerContext 控件仍可打开连接诊断;Dashboard
原有的权限和写操作确认继续生效。

当前会话的工作区绑定决定 Scope。切换会话后再次打开 Dashboard,会选择新会话的 Scope。没有选中会话时,面板提供
**在浏览器中打开**,进入 Server 的默认 Dashboard;插件不会创建空会话。Host 通过经 DSH 认证的
`GET /powercontext/dashboard` 检查可用性,返回 URL 只包含 Dashboard 路径和所选 Scope,不包含 token。Server
启用 token 认证时,用户直接在 Dashboard 浏览器容器内登录;DSH 的 Server 凭据不会注入页面。登录后返回
所选 Scope;登录失败可在原登录页更正。

在本地使用 DSH Web 时,DSH 与 Server Dashboard 应使用相同的协议和回环主机名,端口可以不同。例如,两者都用
`http://127.0.0.1`。若一边用 `localhost`、另一边用 `127.0.0.1`,内嵌页面无法保持 Dashboard 登录。
面板会提示地址不匹配,并提供**在浏览器中打开**,保留所选 Scope。

Dashboard 未开启时,面板提示在 Server 配置中开启。Host 凭据被拒绝或 Server 不可用会分别提示;Dashboard
可用性不会改变 API 连接状态。DSH Browser 容器不可用时,面板保留诊断入口、提示无法打开侧栏,并提供
**在浏览器中打开**。Browser 导航失败由 DSH Browser 标签页显示,恢复 Server 后可刷新。PowerContext Server 不支持 Dashboard 与自定义认证
Provider 同时启动;应将该 Server 启动错误与 Browser 加载失败分开排查。插件不会自行开启 Dashboard 或降低认证要求。
此浏览器入口已在官方 DSH 0.2.2-rc.1 Web 和 Desktop 发行版中实测;其他宿主版本需要分别验收容器。

## 诊断运行中的配置

在出现问题的 DSH 会话内运行 `/pc doctor`。报告显示配置来源,分别检查 liveness、readiness、运行能力、
Expand Down
7 changes: 7 additions & 0 deletions integrations/dsh/plugins/powercontext/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ and the existing liveness, readiness, and capability operations for connectivity
managed `desktop` profile context; an Electron executable running a Web profile is not Desktop authority.
SSH-forwarded, remote, shared, and unconfigured Web hosts are rejected rather than labeled local.

With the Server Dashboard explicitly enabled, click the sidebar PowerContext control and **Open Dashboard** to
use the existing Dashboard in DSH's right Browser panel. The selected conversation supplies the Scope; without
one, the panel offers an external browser entry and creates no conversation. The Host-only authenticated
`GET /powercontext/dashboard` check reports disabled, authentication, and loading states independently of API
health. DSH Web uses its Browser iframe; the 0.2.2-rc.1 Desktop release uses an isolated Browser webview. Token
authentication uses the Dashboard's own sign-in page, with no token in the browser URL or plugin script.

## Install from npm

Once the desired version is published on npm, open **Plugins → Add plugin** in DeepSeek Harness Web or Desktop,
Expand Down
5 changes: 5 additions & 0 deletions integrations/dsh/plugins/powercontext/cordis.patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@
maxBytes: 8000
capturePrompts: true
flushOnCapture: false

# The packaged Browser supplies the Web iframe and Desktop isolated webview.
# Profile/home patches applied later may still disable it explicitly.
- id: ui-sidebar-browser
disabled: false
1 change: 1 addition & 0 deletions integrations/dsh/plugins/powercontext/lib/client.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ interface StatusFace {
};
setSession: (sessionId: string | undefined) => void;
refresh: () => void;
openDashboard: (url: string) => boolean;
}
interface FooterActionProps {
wide: boolean;
Expand Down
Loading
Loading