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
25 changes: 13 additions & 12 deletions integrations/dsh-doca/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ The official Doca plugin for DeepSeek Harness (DSH). Inside a DSH conversation t
## What it does

- **MCP bridge.** Registers the connected site's MCP server in DSH, so the model reaches Doca through its meta-tools (`doca_tools`, `doca_describe_tools`, `doca_call`, `doca_skills`, `doca_load_skill`, `doca_context_close`) and a bundled skill.
- **Confirmation before structural changes.** Operations that create, move or delete go through a DSH confirmation card; content edits too only when the profile's confirmation mode is `write`; read-only calls do not.
- **File transfer.** `doca_put_files` uploads files from the session workspace to Doca. Paths must be workspace-relative: absolute, home-prefixed and parent-escaping paths are rejected before anything is read. `doca_get_file` saves a Doca text file into the session workspace and never replaces an existing file. Both are confirmed like other writes and appear in the session activity.
- **Confirmation before structural changes.** Operations that create, move or delete go through a DSH confirmation card; content edits too only when the profile's confirmation mode is `write`; read-only calls do not. With the mode `none` these pass without a card, but a request for access to a document, an HTTP request made through Doca and an operation the plugin does not know are confirmed in every mode.
- **File transfer.** `doca_put_files` uploads files from the session workspace to Doca. Paths must be workspace-relative: absolute, home-prefixed and parent-escaping paths are rejected before anything is read. `doca_get_file` saves a Doca text file into the session workspace and never replaces an existing file. Both are confirmed like other writes and appear in the session activity. A file over 20 MiB is refused in either direction. Without a `path`, `doca_get_file` saves under the configured download directory, `doca-downloads` in the session workspace by default.
- **Reading pane.** A document the model opens can be read in a native Doca tab (rich text and Markdown; the structure of spreadsheets, slides and canvases), with a link to the full document on the site.
- **The Doca site in DSH.** The site opens in a narrow layout made for the DSH surfaces, signed in with the same account as the plugin.
- **Identities.** Save several Doca sites with their username and password, and switch between them.
Expand All @@ -20,29 +20,29 @@ The official Doca plugin for DeepSeek Harness (DSH). Inside a DSH conversation t
Three Doca entries share one logic and differ only in where the site appears:

- **Left sidebar, Doca** opens the site in the main column.
- **Doca next to the conversation title** switches the site between the main column and the right sidebar. With neither open it opens the right sidebar, unless the site was last shown in the sidebar — then it opens the main column. Closing the sidebar tab does not change which.
- **Start pane, Doca** opens the site in the right sidebar. The tab header offers the session activity, the identity surface, and a return to the main column.
- **Doca next to the conversation title** switches the site between the main column and the right sidebar. With neither open it opens the right sidebar, unless this button or the main column's 在右侧打开 (Open in the sidebar) last put the site there — then it opens the main column. The main column is remembered whichever entry showed it; closing the sidebar tab does not change which. A tab opened from the Start pane is not remembered: with it showing and the main column closed, the first click only brings that tab to the front and the second opens the main column.
- **Start pane, Doca documents** opens the site in the right sidebar, in a tab titled Doca. The tab header offers the session activity, a reload of the embedded page, the identity surface, and a return to the main column.

Switching between the main column and the sidebar keeps the page that was open. A link inside the site that opens a new window stays in the embedded site when it is one of the site's own pages (a document, the ticket list). Anything else opens outside it: an attachment of the site or another site opens in a dock Browser tab, which shares the website session — except a link to another site followed from the main-column view, which goes to the system browser so that the site view stays open.
Moving the site to the sidebar keeps the page that was open, and so does bringing it back to the main column, whether with 在中间打开 (Open in the main view) in the sidebar tab's header or with Doca next to the conversation title. Both site views have a **Reload the page** button in their header that reloads the embedded page where it stands, to pick up a Doca site that was updated on the server while the view stayed open. A link inside the site that opens a new window stays in the embedded site when it is one of the site's own pages (a document, the ticket list). Anything else opens outside it: an attachment of the site or another site opens in a dock Browser tab, which shares the website session. From the main-column view the conversation comes back first to make room for that tab — except for a link to another site, which goes to the system browser instead, so that the site view stays open.

## Connecting a site

The identity surface lists the saved sites, one row each: the username over the site address, and under them a password pill, an MCP key pill and the row's actions. Click a pill to reveal its value, click again to copy the full value to the clipboard, click once more to hide it. The MCP key is shown by its last eight characters only.
The identity surface lists the saved sites, one row each: the username over the site address, and under them a password pill, an MCP key pill and the row's actions. The MCP key pill is shown only when the card is wide enough: in the main column, and in a right sidebar that is wide enough for it. A narrow right sidebar shows the password pill alone. Click a pill to reveal its value, click again to copy the full value to the clipboard, click once more to hide it. The MCP key is shown by its last eight characters only.

- **First use** opens the connection form over an empty list. Enter the service address, the username and the password; the address is empty by default, and everything but a loopback address must use HTTPS.
- **+** adds a site the same way. A new site is verified before it becomes the current connection; the previous connection is not touched while verification runs.
- **+** adds a site through the same form. With a site connected, the form opens with its address and the login saved for it filled in; change the address and the filled-in username and password are cleared with it. A new site is verified before it becomes the current connection; the previous connection is not touched while verification runs.
- **选择** (Select) on a row switches to that site. The current row is marked 当前 (Current).
- **✕** on a row deletes the saved site and its stored credentials. It asks for a second click, and cannot be undone.
- **✕** on a row deletes the saved site and its stored credentials. It asks for a second click, and cannot be undone. The current row has no ✕: switch to another site first, or add one with **+** if it is the only saved site.
- **连接** (Connect) on the current row signs in to that site again and enters it on its document list. It is offered when a password is stored for the site and its session is gone: after you signed out, and after the site refused the stored login — then Connect tries that password once more.
- **Why the site is not signed in** is written under the rows: the site refused the stored login (connect again to update the password), or no password is stored for it. The second case is what you see when the plugin was connected by hand in DSH Settings, with an address and a token reference but no saved site. There the connection form opens over the empty list with the address filled in: sign in there to save the site. Data written by earlier development builds of the plugin is not converted.
- **Why the site is not signed in** is written under the rows: the site refused the stored login (connect again to update the password), or no password is stored for it. The second case is what you see when the plugin was connected by hand in DSH Settings, with an address and a token reference but no saved site. There the connection form opens over the empty list with the address filled in, and that explanation gives way to it: sign in there to save the site. Data written by earlier development builds of the plugin is not converted.
- **When the site cannot be connected at all** — it cannot be reached, Doca did not allow MCP access, or the saved token is no longer in the credential store — the surface names the reason instead of the list's Connect, and 重新连接 (Connect again) opens the connection form with the address filled in.

Each connection creates a personal MCP service on the Doca site, named `DeepSeek Harness`. A site you delete here keeps its MCP service; revoke it on the site's MCP settings page if you no longer want it.

## Where credentials live

- **MCP tokens and website passwords** are stored in the Harness credential store (`.credentials.yaml` in the DSH home), as local plaintext, each under a reference name. The list of saved sites is stored there too. Anyone with access to that file can read them. The store belongs to the DSH home, not to a profile: every profile under that home shares the saved sites, the passwords and the MCP tokens. Only the current connection is per profile.
- **The plugin configuration** (one row per profile) holds the current site address and the reference names only.
- **The plugin configuration** (one row per profile) holds the current site address and the MCP token's reference name, and no credentials; its other fields are plugin settings such as the confirmation mode.
- **The website session** lives in the browser storage partition that the embedded site shares with the dock's Browser tab. The partition is kept in memory: after an app restart the plugin signs the site in again with the stored password. Until the site is signed in, a cover hides the page, however long the site takes to load: the site's own login page is never what you see. (When the site has loaded but its API does not answer, the cover lifts after a few seconds onto the site's own offline page.)
- **A logout you perform inside the site** is respected for the rest of the run. The identity surface takes over at once, and the site is signed in again only when you connect, switch, or restart the app.
- **Credentials stay with their site.** The plugin sends a stored password only to the site it was saved for, including while a switch is still in progress. A password the site refuses is not sent again until you connect, select an identity, sign in or restart the app: Doca limits login attempts per IP address, and signing in by hand shares that limit.
Expand All @@ -51,9 +51,10 @@ Each connection creates a personal MCP service on the Doca site, named `DeepSeek

- **Password sign-in only.** A site that signs users in through an external provider cannot be connected, and the site's own login page is never shown inside the plugin.
- **Company-service profiles** (a configured user ID) keep their fixed connection. They cannot switch identities, and the hosted website is not signed in from the plugin: the surface says so instead, and the connection form does not open by itself there.
- **The narrow layout ships with a Doca release.** A site that runs an older Doca shows its ordinary layout on the same address.
- **The narrow layout ships with a Doca release** (0.3.2 was the first). A site that runs an older Doca shows its ordinary layout on the same address.
- **Harness Desktop only** for the embedded site. Without the desktop browser bridge the Doca entries offer the connection and identity surfaces but no site view.
- **Attachments that download rather than display** (a PDF, an archive) cannot be saved from inside DSH: its embedded browser cancels downloads.
- **Copying inside the site is limited.** DSH denies its embedded pages the Clipboard API. On a site that runs Doca 0.3.6 or later, copy and cut in a spreadsheet (and the share dialog's copy-link button while a sheet is open) reach the clipboard through the browser's older copy path; on an older Doca they fail with the sheet's 无法访问剪贴板 (“Permission Denied”) warning and copy nothing. Copying an image, and the copy buttons of other pages (the MCP token on the site's settings page, share links outside a sheet), fail on every version.
- **An identity is saved by signing in to its site.** Changing its username or password means connecting again.

## Development
Expand Down Expand Up @@ -84,5 +85,5 @@ The tests keep this directory's own `vitest.config.ts` and vitest version. The r
## Version constraints

- `engines.dsh` is pinned to `>=0.2.2-rc.2 <0.3.0`. The pre-release tag has to be part of the range, otherwise `0.2.2-rc.x` does not match `>=0.2.2`. Verify before widening it after a DSH upgrade.
- Runtime dependencies are pinned exactly. `@deepseek-ai/cordis` is a development dependency only: at run time DSH provides Cordis, so the plugin's DSH types are written by hand in `src/dsh-types.ts` and checked against the DSH source on every upgrade.
- Runtime dependencies are pinned exactly. `@deepseek-ai/cordis` is a development dependency only: at run time DSH provides Cordis, so the plugin's DSH types are written by hand and checked against the DSH source on every upgrade: `src/dsh-types.ts` for the host half, and `client/index.ts`, `client/tabs.tsx` and `dsh-primitives.d.ts` for the client half. The Typert protocol's own types are not re-declared; they come from the pinned `@deepseek-ai/dsh-typert-protocol`.
- `engines.node` is `>=24.9` because DSH requires it. On an older Node, pnpm reports an unsupported engine for this package during `pnpm install` and whenever one of its scripts runs. That is a warning: neither the install nor the checks are stopped by it.
Loading
Loading