Introduction

DeepSeek Harness (DSH) extends the web-connectivity capabilities of agents through its plugin mechanism. When processing X (Twitter) data, web scraping often faces issues such as broken links, truncated content, or messy formatting. The dsh-x-archive plugin calls the 2100laike X Archive (x.2100laike.com) service to convert tweets into permanently readable Markdown snapshots. It addresses the problem of inaccessible deleted or private tweets and provides structured data returns for Agents.

Core Features

The plugin mainly provides the following capabilities:

  • Archive and Read: Archives X tweets as permanent Markdown snapshots and supports direct retrieval of archived content.
  • Automated Processing: For unarchived tweets, the plugin automatically submits archive requests (images are preserved via CDN, and archived content remains accessible even if the original tweet is deleted or set to private).
  • Deduplication and Throttling: Archived tweets are returned directly; duplicate hits do not consume quota.
  • Version History: The refresh: true parameter can force re-fetching to obtain the latest version of a tweet.

Installation and Enablement

Installation must specify --profile; plugins are installed per profile. After installation, the dsh process must be restarted (for GUI users) for changes to take effect.

  1. Install the plugin:
# Web GUI 用户
dsh plugin --profile web add github:opencamel/dsh-x-archive#v0.1.2
# 纯 CLI 用户
dsh plugin --profile headless add github:opencamel/dsh-x-archive#v0.1.2
  1. Verify the installation:
dsh --profile <name> --dump-config | grep -A2 dsh-x-archive
# 预期输出:
# # == dsh-x-archive
# - id: dsh-x-archive
#   name: dsh-x-archive

Configuration

Configure the API address, authentication token, and timeout parameters in the profile’s cordis.patch.yml.

  1. Edit the configuration file:
    Path example: ~/.dsh/profiles/web/cordis.patch.yml (replace web with the actual profile name).

  2. Add the configuration content:

- insert:
  - id: dsh-x-archive
    name: dsh-x-archive
    config:
      apiBaseUrl: 'https://api.2100laike.com'  # 存档 API 地址
      token: ''                                # 可选 PAT,见下方额度说明
      waitTimeoutSec: 60                       # 新推文抓取轮询上限(秒)
      pollIntervalSec: 2                       # 轮询间隔(秒)
      maxContentChars: 30000                   # 返回正文最大字符数,超出截断并附快照链接
  1. Quota and authentication:
    * Anonymous quota: 8 times/day.
    * Increased quota: Register at app.2100laike.com/register and create a PAT (scope must include at least api:write), then fill it into token in the configuration. The quota is increased to 100 times/day.
    * Refresh limit: Using refresh: true to force re-fetching requires a configured PAT and is protected by a server-side 24-hour cooldown.

Tool Contract

When invoking the x_archive tool, use the following parameters and return values.

  • Tool name: x_archive
  • Parameters:
    • url (string, required): X tweet link.
    • refresh (boolean, optional, default false): whether to force a refresh to obtain the latest version.
  • Return values:
    • archive_id, url, title, author, version, fetched_at, deleted, refresh_skipped, snapshot_url, truncated, markdown, note.

Errors and Soft Failures

  • Errors: Direct invocation failures return error codes, such as RATE_LIMITED (quota exhausted) or FORCE_NOT_ALLOWED (PAT not configured).
  • Soft failures: Some cases do not throw errors; the note field provides hints:
    • New tweet fetching in progress: note indicates that fetching has not completed yet; retry later.
    • Content truncated: truncated: true; visit snapshot_url to view the full content.
    • Tweet unavailable: deleted: true or note prompts to retry later.

Use Cases and Notes

  • Environment dependencies: Requires dsh >= 0.1.0-rc.6, and pnpm must be included in the system PATH.
  • Configuration file: Only edit cordis.patch.yml; do not modify cordis.yml (this file is automatically rewritten by the system).
  • Process restart: After installing or uninstalling a plugin, you must restart the dsh process (in GUI mode, rerun dsh web) for the plugin to be loaded.
  • Privacy and security: The plugin only accesses the configured apiBaseUrl, does not read local credentials, and has no telemetry.