sliverp/DeepSeek-harness-weixin1

deepseek-harness-weixin

DeepSeek Harness 的微信 iLink 扫码登录文本与图片桥接插件。

AI 分析

核心用途是通过微信 iLink 渠道将个人微信与 DSH Agent 桥接,支持文本和图片交互。适合希望通过个人微信直接与 DSH 智能体对话的用户。首次使用需通过命令行执行扫码登录。

套件
deepseek-harness-weixin
版本
0.2.3
授權
NOASSERTION
最近更新
2026年8月14日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:sliverp/DeepSeek-harness-weixin

Configuration

The bundle inserts this row:

- id: weixin-channel
  name: deepseek-harness-weixin
  config:
    credentialRef: WEIXIN_ILINK_CREDENTIAL
    cwd: !!js process.env.DSH_WEIXIN_CWD ?? process.cwd()
    permissionPreset: workspace-write
    statePath: !!js process.env.DSH_WEIXIN_STATE_PATH ?? ''
    controlSocketPath: !!js process.env.DSH_WEIXIN_CONTROL_SOCKET ?? ''

Override the row in ~/.dsh/profiles/web/cordis.patch.yml when needed:

- id: weixin-channel
  name: deepseek-harness-weixin
  config:
    credentialRef: WEIXIN_ILINK_CREDENTIAL
    cwd: /absolute/path/the-agent-may-work-in
    agentPreset: standard
    permissionPreset: workspace-write
    statePath: /absolute/path/weixin-sync.json
    controlSocketPath: /absolute/path/weixin-control.sock
    autoLogin: false
    accessPolicy: allowlist
    allowFrom: [your-ilink-user-id]
    imageInputMode: auto
    responseTimeoutMs: 300000
    approvalTimeoutMs: 240000
    maxInFlightMessages: 8
    maxReplyImages: 4

When statePath is empty, the cursor is stored under ~/.dsh/weixin/. The plugin creates the file atomically with mode 0600.

When controlSocketPath is empty, it defaults to ~/.dsh/weixin/control.sock; the directory is mode 0700 and the socket is mode 0600. For a custom path, give the CLI the same DSH_WEIXIN_CONTROL_SOCKET environment variable or pass dsh-weixin login --socket .

autoLogin defaults to false: without a credential, the channel stays offline until the Linux command above requests QR login. Set it to true to restore automatic background QR display during Web startup; neither setting allows QR login to block Web.

imageInputMode defaults to auto: image-capable models receive a durable image block, while text-only models receive attachment metadata instead of failing the turn. Use always only with a route known to accept images, or never to force the fallback.

agentPreset is optional and defaults to the Harness preset roster's current default. A newly created session records the resolved preset in its header. Persistent resumes restore the preset recorded by the session (including later agent-preset/selected events); only a legacy session with no recorded preset uses the current configured/default fallback. If Web already has the same session loaded, the channel reuses that live Agent rather than creating a second writer.

permissionPreset is optional. When configured, it is validated against ctx.permissionPresets and pinned only while creating a new channel session; persisted resumes and borrowed live Agents keep the permission recorded in that session. When the Harness Agent Loop emits approval/request, the plugin sends the tool name and command from the structured tool/call to the Weixin chat that started the turn:

Bash 请求执行:ls -la
回复 /approve 123456 或 /reject 123456
该审批将在 240 秒后失效。

Only a matching code from the same Weixin conversation is accepted, and each code is one-shot. Approval returns allowed-once to Harness; rejection returns rejected; timeout, transport failure, cancellation, and shutdown fail closed. approvalTimeoutMs must be less than responseTimeoutMs, leaving time for the Agent Loop to execute the tool and produce its final response. Approval commands bypass the ordinary message concurrency limit.

This checkout uses workspace-write. If the host has no usable local sandbox backend, Bash may request a one-shot escalation to danger-full-access; it runs only after the matching /approve reply. Such an approval removes filesystem confinement for that tool call, so keep allowFrom narrow and inspect the command before approving it.