dshbase

插件目录 / Automation / dsh-agent-arcade

dsh-agent-arcade

已验证 · 实测可装 fff122

✓ 持续维护 基于 2 个官方 DSH 包 纯 TypeScript

查看 GitHub ↗ ← 返回插件目录

1Stars
0Forks
0未关闭 issue
TypeScript语言
2026-08-15最近推送
跨平台平台

功能简介

dsh-agent-arcade — DSH 插件(编排)

✅
我们的评价
可用 — 实测通过,早期项目

dsh-agent-arcade — DSH 插件(编排) 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-agent-arcade

A small deterministic Snake game for DeepSeek Harness. The Agent chooses a direction on every turn, while the user can watch the ASCII board, score, status, and reasoning returned by each step.

The game runs entirely in memory. It does not use the network, save files, or execute shell commands. A fixed seed makes food placement and a replayed sequence reproducible.

Quick install

Requirements

You need Node.js 22 or newer, pnpm, and a DeepSeek Harness installation that supports JavaScript or TypeScript plugins.

Step 1: Download and build

Copy and run:

git clone https://github.com/fff122/dsh-agent-arcade.git
cd dsh-agent-arcade
pnpm install
pnpm build

Step 2: Create the plugin configuration

Run this command from the repository root:

cat > agent-arcade.patch.yml <<EOF
- insert:
    - id: dsh-agent-arcade
      name: '$PWD/dist/src/index.js'
EOF

The plugin path is absolute because the Harness patch loader requires an absolute path.

Step 3: Start Harness with the plugin

If Harness is installed as a command:

dsh web --patch "$PWD/agent-arcade.patch.yml"

Otherwise, run:

npx @deepseek-ai/dsh web --patch "$PWD/agent-arcade.patch.yml"

Verify the installation

Ask the Agent:

开始一局 12×8 的贪吃蛇,随机种子用 42。每一步都告诉我棋盘、分数和你的决策理由。

The Agent should call arcade_snake_new, then alternate arcade_snake_step and arcade_snake_render. Ask for arcade_snake_history at any time to review the full sequence of decisions.

Available tools

Tool Purpose
arcade_snake_new Start or restart a deterministic game with optional width, height, and seed.
arcade_snake_step Let the Agent choose a safe direction toward food and advance one turn.
arcade_snake_render Return the current board as ASCII art with score and status.
arcade_snake_history Return every turn, direction, reason, position, score, and outcome.

Board and replay rules

The board dimensions range from 5 to 30 cells in each direction. The default board is 12 by 8, and the default seed is 1. The snake starts in the center heading right. H marks the head, o marks the body, and * marks the food.

The Agent uses a simple deterministic policy: it compares legal directions by Manhattan distance to the food, then applies a stable tie-break order. The policy is intentionally easy to read and modify; it is not intended to be a competitive game-playing algorithm.

To reproduce a run, call arcade_snake_new with the same dimensions and seed, then replay the same manual directions. A game ends when the snake hits a wall or itself, or when the board is filled.

Updating the plugin

From the cloned repository:

git pull
pnpm install
pnpm build

Restart Harness with the same patch command after rebuilding.

Development

Run the complete package quality gate from the repository root:

pnpm run format:check
pnpm run typecheck
pnpm run test
pnpm run build

The implementation is split into small modules:

src/
  index.ts       # Harness entry point and tool registration
  snake-game.ts  # Deterministic game rules, policy, rendering, and history

test/
  index.test.ts
  mount.test.ts
  snake-game.test.ts

For the plugin model and patch overlay format, see the official DeepSeek Harness plugin guide.

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-agent-arcade」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:fff122/dsh-agent-arcade

Headless(CLI)profile:

dsh plugin --profile headless add github:fff122/dsh-agent-arcade

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

使用场景

自动化一项重复工作——调度、串联任务或响应事件——不用你亲手启动。

适合谁

有周期性工作、想 cron 式无人值守而非手动触发的人。

二次开发建议

触发器和任务模板是缝——加事件驱动或文件监听触发,以及更丰富的流程编排。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Automation 里更多

浏览全部 7797 个插件 →