Introduction¶
The plugin architecture of DeepSeek Harness (DSH) allows agents to load capabilities on demand. For scenarios that require interacting with Confluence, existing approaches often rely on external scripts, API wrappers, or manual CLI invocations—resulting in long chains and difficult-to-guarantee consistency. dsh-confluence encapsulates Confluence operations—pages, comments, attachments, and properties—into a set of typed DSH tools, and provides connection and write-policy configuration on the Settings page, turning Confluence into a local resource within DSH sessions.
Plugin Positioning¶
This is a DeepSeek Harness Bundle maintained by liujia1128. It executes operations by invoking confluence-cli in child processes, so authentication, rate limiting, Markdown-to-storage format conversion, and JSON wrapping all behave identically to the CLI in a terminal. The CLI serves as the single implementation layer for the Confluence API.
Toolset¶
The plugin registers 29 confluence_* tools and 1 confluence skill, divided into read and write categories.
Read Tools (13)¶
| Tool Name | Description |
|---|---|
confluence_read |
Read page body |
confluence_search |
Search pages |
confluence_info |
Get page metadata |
confluence_find |
Find content within a page |
confluence_spaces |
List spaces |
confluence_children |
Get child pages |
confluence_export |
Export a page |
confluence_convert |
Markdown conversion |
confluence_versions |
View version history |
confluence_comments |
List comments |
confluence_attachments |
List attachments |
confluence_property_list |
List properties |
confluence_property_get |
Get a property |
Write Tools (16)¶
| Tool Name | Description |
|---|---|
confluence_create |
Create a page |
confluence_create_child |
Create a child page |
confluence_update |
Update a page |
confluence_move |
Move a page |
confluence_delete |
Delete a page |
confluence_comment_create |
Create a comment |
confluence_comment_delete |
Delete a comment |
confluence_property_set |
Set a property |
confluence_property_delete |
Delete a property |
confluence_attachment_upload |
Upload an attachment |
confluence_attachment_delete |
Delete an attachment |
confluence_version_delete |
Delete a version |
confluence_copy_tree_preview / confluence_copy_tree |
Copy a page tree (preview/execute) |
confluence_versions_purge_preview / confluence_versions_purge |
Purge version history (preview/execute) |
Write tools are not registered by default. They must be enabled on the plugin row and configured with an allowed-spaces list. Each write operation first runs a local preflight check (resolving title, ID, and space), verifies the allowlist, and then requests a one-time approval from the Harness. Batch operations follow a two-step “preview → execute” flow: the preview tool resolves the scope of impact and returns a one-time approval ID; the execute tool no longer accepts additional parameters.
All results are marked as “untrusted external content.”
Dependencies and Runtime Environment¶
- DeepSeek Harness 0.2.2 (tested version)
- Node.js 20 or later
- Confluence authentication:
CONFLUENCE_*environment variables,confluence init, macOS Keychain, or~/.netrc. The plugin itself does not store credentials.
Installation¶
Install from Repository URL¶
Add via the DSH plugin manager:
Plugins → Add plugin → https://github.com/liujia1128/dsh-confluence
Or via plugin_manager in an Agent session:
plugin_manager:
action: install_bundle
target: https://github.com/liujia1128/dsh-confluence
Install from a Local Clone (Development or Pinned Version)¶
git clone https://github.com/liujia1128/dsh-confluence
cd dsh-confluence
npm install # Install dependencies when using local linking
Then add the checked-out directory as a plugin. Local directory installation links the folder, so changes take effect after reloading the plugin.
Offline / Air-Gapped Environments¶
Runtime dependencies are bundled in the repository—no network access required for installation:
# In the repository directory on the offline machine
node scripts/install-offline.mjs # Validates and extracts deps/node_modules.tar.gz
Then add this directory as a plugin (local directory install). Do not add the GitHub URL on the offline machine, as that path triggers a network-based install.
Configuration¶
Open Settings → Confluence in DSH and fill in the following three fields to get started:
- Site URL: The full Confluence URL (e.g.,
https://company.atlassian.net) - Email: Login email (Cloud)
- API token: API token
For Server 6.x without a PAT, you can use Username + Password and set the auth type to basic.
The Settings page automatically derives the hostname and REST base path from the Site URL; override fields only when necessary.
Write Permission Configuration¶
In the confluence config on the plugin row:
| Setting | Description |
|---|---|
writes |
Whether to register write tools (default: false) |
spaces |
List of allowed space keys; wildcards not supported. Empty list disables write tools |
confirm |
ask (require approval for each write) or never (skip approval) |
After saving, the confluence entry for that profile is written into cordis.patch.yml. The loader syncs the toolset immediately—no restart required.
Manual Config Row Example¶
- id: confluence
name: dsh-plugin-confluence
config:
writes: true
spaces: [ENG, DOCS]
confirm: ask
confluence:
domain: company.atlassian.net
apiPath: /wiki/rest/api
authType: basic
email: you@company.com
env:
CONFLUENCE_API_TOKEN: !!js process.env.CONFLUENCE_API_TOKEN
Common Configuration Keys¶
| Key | Default | Description |
|---|---|---|
siteUrl / domain |
— | Site URL or hostname. Site URL alone is sufficient; other fields are derived automatically |
apiPath |
— | /wiki/rest/api for Cloud; /rest/api for Server/Data Center |
authType |
basic |
basic (email + token) or bearer (Data Center PAT) |
email / username |
— | Identity for basic authentication |
token |
— | API token; takes priority over env vars, Keychain, and ~/.netrc |
profile |
— | Named profile for confluence-cli |
preflightTtlMs |
300000 |
Approval ID validity period (milliseconds) |
packageRoot |
auto | confluence-cli package directory, for specifying a particular copy |
nodePath |
auto-discovered | Node.js path used by child processes, to resolve Electron mode issues |
skill |
true |
Register the confluence skill |
Setting CONFLUENCE_READ_ONLY=true forces write tools to be disabled.
Security Model¶
- Write tools are only registered when explicitly enabled and the allowed-spaces list is non-empty.
- Regular write operations first run a local preflight check (resolving the actual title, ID, and space), verify the allowlist, and then request a one-time approval from the Harness. The preflight summary serves as the basis for approval.
- Batch operations follow a two-step “preview → execute” flow: the preview resolves all affected pages and returns a one-time approval ID; the execute tool accepts no additional parameters, and if the preflight results have changed, it returns
STALE_PREFLIGHT. - File hashes are computed before writing and again after approval. If the hashes do not match, the write fails and returns
STALE_FILE. - Writes that time out or are interrupted are marked as
UNKNOWN_RESULTand are not automatically retried. - The Settings API uses same-origin routing and performs a
connectionservice denial check (Host/Origin validation) before each request. Each route requires the page’sx-dsh-confluenceheader and a loopback Host, and rejects mismatched Origins.
Technical Details¶
Which confluence-cli Is Used?¶
Candidates are resolved by priority:
packageRooton the plugin row- Environment variable
CONFLUENCE_CLI_ROOT - The parent directory of the package (two levels up,
..twice) - The
confluence-clidependency installed with the plugin
If no valid candidate is found, an error is reported at activation time with guidance—no silent fallback to a wrong copy.
Tech Stack and Versions¶
confluence-cli^2.31.2@deepseek-ai/schemastery~3.19.0- Node.js >= 20
- Jest for testing
Use Cases¶
- Creating, updating, and searching Confluence pages and comments within DSH sessions.
- Batch operations on page trees or purging version history.
- Unifying the Confluence API implementation layer to avoid redundant wrappers inside the Harness.
- Deploying Confluence capabilities in offline or network-restricted environments.
Notes¶
- Write operations execute with the permissions of the current DSH process. Ensure the configured allowed spaces match the account’s permissions.
- The plugin is open-sourced under the MIT license. Review the source code and license before installing.
- Depends on
confluence-cli. If the runtime environment differs from the plugin’s bundled Node version, specify the correct runtime vianodePath.
Summary¶
dsh-confluence integrates core Confluence operations into DSH as typed tools, providing a secure workflow from reads and writes to batch previews, with connection and write policies managed uniformly through the Settings page. For developers who frequently interact with Confluence in agent workflows, this is a ready-to-use foundational capability.