Introduction

DeepSeek Harness (DSH) uses a plugin-based architecture, designed to build agent execution environments through modular components. heybobchan/canon-deepseek-harness-plugin is a Canon integration plugin that adds Canon as an additional interaction channel to the DSH configuration. This plugin does not replace DSH’s Web UI, session, or persistence mechanisms; instead, it maps Canon messages into the DSH protocol, handles approval workflows, tool calls, and session recovery. DSH owns the model, permissions, persistence, and execution environment, while Canon handles message adaptation, activity display, and processing of specific interaction cards.

Installation and Registration

To use Canon in a DSH environment, you must first register a Canon agent and then install the plugin package.

  1. Register a Canon agent
    Use the canon-dsh-register command to create an agent in Canon and specify its client type as deepseek-harness.
    canon-dsh-register \
      --name "My DSH Agent" \
      --description "Coding agent in DeepSeek Harness" \
      --phone "+15551234567" \
      --profile my-dsh
  1. Install the plugin
    Add the plugin package to the selected DSH configuration file. DSH’s plugin manager recognizes dsh.bundle.patch and adds the package to the configuration list.
    dsh plugin --profile my-dsh-profile add @canonmsg/deepseek-harness-plugin
  1. Verify the configuration
    Before starting the agent, you can check that the configuration was loaded correctly. Set the CANON_AGENT environment variable to point to the profile that was registered earlier.
    CANON_AGENT=my-dsh dsh --profile my-dsh-profile --dump-config
Confirm that the output includes the `canon-dsh` line and that it is enabled.
  1. Start DSH
    Start DSH from the project working directory.
    cd /path/to/project
    CANON_AGENT=my-dsh dsh --profile my-dsh-profile

Core Features

This plugin implements protocol mapping between Canon and DSH, with the following capabilities:

  • Conversation persistence and recovery: Establishes a persistent DSH session for each Canon conversation. DSH’s session log is event-sourced, and the plugin can restore session state from it.
  • Lifecycle management: Follows Cordis lifecycle behavior. The plugin becomes active after startup; the SSE (Server-Sent Events) loop is managed by the plugin’s reversible effects and stops on unload or hot replacement.
  • Message batching: Canon message batches are mapped to a single immutable DSH user message, which is scheduled by DSH’s inbox.
  • Image support: PNG, JPEG, WebP, and GIF input are supported through DSH’s persistent attachment storage. DSH has the final say on image count, byte size, dimensions, and normalization policies.
  • Streaming responses and activity: Displays assistant text streaming. Provides runtime activity for DSH turns, tool call results, and aggregated todo progress, but does not expose raw tool arguments or todo content.
  • Approval mechanism: Renders DSH approval requests as Canon one-click approval cards.
  • User questions and plan review: Renders DSH ask_user_question requests as runtime input cards (requires configuring questionProvider). Renders DSH plan-review intents as Canon native plan-review cards.
  • Tool support:
    • Provides the native DSH communicate tool for messages, conversations, groups, forwarding, and contact sharing.
    • Provides the standard Canon no_reply tool for staying silent without sending messages or triggering other agents.
  • Signal handling: Supports interrupt, stop-and-drop, and new-conversation signals.

Configuration

The plugin is controlled through environment variables and configuration fields.

Environment Variables

Variable Purpose Default
CANON_AGENT Canon profile name, located in ~/.canon/agents.json Empty (automatically selected when there is only one matching configuration)
CANON_DSH_WORKSPACE Absolute path to the DSH workspace root directory DSH invocation directory
DSH_PROVIDER Optional provider route for agents created by Canon DSH defaults
DSH_MODEL Optional model for agents created by Canon DSH defaults
CANON_DSH_DISABLED Set to 1 to disable the Canon entry only Enabled

DSH_PROVIDER and DSH_MODEL must be provided together. If neither is provided, the default model selection from the configuration profile is used.

Plugin Fields

The following fields are defined by the plugin rather than inferred:

  • questionProvider: external \| canon: Selects the DSH user question provider. General web patches use external; headless deployments use canon.
  • planMode: boolean: Declares Canon’s plan turn mode. Requires support from the composite ctx.planMode service and is disabled in default patches.

Current Limitations

This plugin is in developer preview and has the following known limitations:

  • Version lock: Canon pins the direct DSH service API to 0.1.1-rc.2, and the plugin has only been tested against this version.
  • User question provider limitation: DSH 0.1.1-rc.2 allows only one active user question provider in a Cordis context. Therefore, Canon questions must be used with questionProvider: canon.
  • Non-image attachments: Non-image Canon attachments are retained as safe text placeholders.
  • Controls not fully exposed: Controls such as Provider/Model, permission mode, effort, workspace selection, execution mode, session state snapshots, rich cards, and steering/interleaving have not been exposed as Canon controls because the bridging layer has not completed end-to-end validation and enforcement.
  • Conversation rules: Canon conversation rules are disabled in this bridge.

Summary

This plugin provides a Canon-based messaging channel for DeepSeek Harness. Developers can register an agent and install the plugin using command-line tools, then interact directly with DSH agents through Canon applications using the plugin’s approval cards, tool mapping, and session recovery features.