rottenpen/agent-stardew 预览 preview

rottenpen/agent-stardew

Plugin插件 ⭐ 9 MIT Dev Workflow开发与代码工作流

星露谷农场小助手:Jev 自主游玩、dsh 插件、独立 CLI 与 SMAPI Mod

Project Overview项目介绍

rottenpen/agent-stardew is a DSH-native plugin packaged as the packages/dsh-plugin workspace, shipped with a bundled stardew Skill at packages/dsh-plugin/skills/stardew/SKILL.md that auto-registers when the plugin loads. It exposes a "农场小助手" panel inside dsh chat plus an independent runtime dashboard at http://127.0.0.1:3080/stardew. The plugin hosts Jev's autonomous control loop; the SMAPI Mod under mods/AgentStardew runs actions on the Stardew Valley main thread, while a standalone CLI plus WebSocket protocol (packages/protocol, packages/cli) streams game observations back so the plugin can pick and execute the next step on its own.

A typical workflow starts in a configured dsh chat: the user tells the chat model to load the stardew skill and issues a goal such as "种下 5 颗防风草并浇水,然后回屋睡觉". The chat model decomposes complex objectives into stages, shares one budget across stages, and returns per-stage evidence and blocking reasons to the original conversation. Jev then autonomously drives farming, watering, refill detection, exploration, movement, scene interaction, and dialogue, with result verification ("已核验完成" vs "待你复核"), pause/resume/stop, and a single-step toggle exposed in the panel under "任务设置与完成条件". It targets players who want automated farm hands and builders exploring agent skill integrations.

Install with Node.js 22+, the repo-pinned pnpm, a compatible dsh (verified against 0.1.5-rc.1), the .NET 6 SDK, SMAPI 4.5.2, and Stardew Valley 1.6.15 on macOS; mock mode only requires OPENROUTER_API_KEY in .env, while real gameplay uses STARDEW_GAME_PATH, DOTNET_PATH, and DSH_PATH. Commands include pnpm start --mock --jev, pnpm start --jev for real play, pnpm dev --mock, pnpm check, pnpm test:dsh, pnpm test:mod, pnpm test:package, and pnpm pack:release. Limits: shop purchases and container I/O are unfinished, validation against real farming is still pending, .env/credentials/records/save backups stay local, and the project is MIT-licensed, unofficial, and does not redistribute the game, its assets, or user save files.

rottenpen/agent-stardew 是一个面向 DSH 的原生插件,仓库内含 packages/dsh-plugin 子包、自带 stardew Skill,并提供右侧"农场小助手"面板与桌面运行面板。游戏侧的感知和动作由 SMAPI Mod (C#) 与独立 CLI 完成,二者将游戏观察传回 DSH,由插件内的 Jev 控制器驱动持续决策循环,实现自主游玩、单步、暂停、继续、停止与结果核验。

典型流程是用户进入 dsh 聊天,加载 stardew skill,给出"种 1 颗防风草并浇水"之类的目标,插件读取游戏状态、规划下一步并执行 Mod 动作,复杂目标可按阶段拆分、共享预算并把阶段证据回到原聊天;运行面板展示季节日历、体力条、背包与农场日记,PC 用户或想尝试自动农活的玩家可以直接体验。

前置依赖包括 Node.js 22+、pnpm、dsh(验证于 0.1.5-rc.1)、.NET 6 SDK、SMAPI 4.5.2 与 Stardew Valley 1.6.15,模拟模式只需填写 OPENROUTER_API_KEY。当前为可操作开发版,商店购买、容器取放等基础接口尚未补齐;MIT 协议,不分发游戏本体与用户存档。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 2 warnings2 项注意
  • Only 9 stars - very few users, little community feedback星标只有 9,几乎没人在用,遇到问题缺少社区反馈
  • No DSH plugin manifest detected - it may only carry the dsh-plugin topic, so the install method must be confirmed on the spot未检测到 DSH 插件清单:可能只是打了 dsh-plugin 话题,安装方式要现场确认
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:rottenpen/agent-stardew

把 rottenpen/agent-stardew 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

agent-stardew · 星露谷农场小助手

agent-stardew 像素图标
把今天的农活,交给 Jev。

星露谷农场小助手运行面板,展示模拟农场的日历、体力、背包与任务日记

运行面板预览使用模拟农场数据;地图依据结构化观察绘制,不是游戏截图。

基于 Jev 的星露谷 Agent。SMAPI Mod 与独立 CLI 提供游戏观察和动作,dsh 插件承载自主控制循环与运行面板。用户给一次目标,Jev 持续选择并执行下一步。

当前为可操作的开发版。已提供自主运行、动态候选、单步、暂停/继续/停止、运行记录和结果核验。完整真实游戏农务与自主补能力验收仍待完成,见验证记录。

复杂目标可在 dsh 聊天中按阶段规划:Jev 自主执行,阶段结果与受阻证据自动回到原聊天,后续阶段共享预算。默认只浇需要水的作物,并支持寻找水源给水壶补水。用法见 dsh 操作说明。

开始今天的农活

安装 Node.js 22+、pnpm 和 dsh 后,运行 pnpm install --frozen-lockfile。在项目 .env 中填写 OPENROUTER_API_KEY,然后启动模拟农场:

pnpm start --mock --jev

启动后浏览器会打开登录入口。重新打开可运行 pnpm open;换浏览器或无痕窗口时,运行 pnpm open --print 获取当前登录链接,粘贴到首页的“启动链接”输入框并连接。登录页会提示链接过期或服务断开。

在 dsh 聊天右上角点击“农场小助手”,即可展开右侧面板;任务卡片中的“查看农场”打开同一个面板。也可独立打开 Jev 运行面板。点击“观察”,输入目标并点击“开始农活”。不需要配置聊天模型。

在当前农场种下 1 颗防风草并浇水。完成后停止,不要睡觉。

面板展示随游戏观察更新的季节日历、农场时钟、体力条、背包槽位和农场日记。展开“Jev 决策与运行详情”可查看实际调用与动作概率。可直接暂停、继续或停止;单步位于“任务设置与完成条件”中。在其中填写作物 ID 24、数量 1 并勾选浇水,让控制器按游戏状态验收;自由目标结束后会提示复核。

农活委托 完成条件
种下 1 颗防风草并浇水,不睡觉 cropId: "24"、cropCount: 1、watered: true
给 5 格现有作物浇水,缺水自行补水 wateredCrops: 5
找水源给水壶补水 refill: true,核验水量增加,不等于补满

“已核验完成”表示指定条件通过;“待你复核”表示 Jev 建议结束,不能视为已核验。暂停 Agent 不会暂停游戏时间。

体验真实游戏时,先安装星露谷、SMAPI 和 .NET 6 SDK,正常保存并退出游戏后运行:

pnpm start --jev

此命令构建、备份并安装 Mod,启动 SMAPI 与 dsh。加载单人测试存档后即可回到运行面板,Mod 支持失焦后台运行,后台游戏时间会继续推进。自定义安装路径加 --game-path "/游戏目录/Contents/MacOS"。

当前支持探索、移动、农务、场景交互和对话。商店购买、容器取放等仍需补齐基础接口。新版 Mod 提供农务候选所需的土地和物品类型字段,源码更新后需要正常退出游戏再启动安装。

完整步骤见 dsh 使用说明,架构与后续阶段见 Jev 自主游玩设计。

随包 Skill

项目维护一份 stardew skill,安装 dsh 插件时自动注册,无需另装。它覆盖简单目标启动、复杂目标分阶段、暂停与接管、证据复核和受阻处理。聊天模型规划阶段,Jev 决定每一步,所有入口共享同一个游戏控制器。

在配置好聊天模型的 dsh 中输入:

读取 stardew skill。种下 5 颗防风草并浇水,然后回屋睡觉。按阶段规划,缺水自行补水,结束时告诉我实际完成了什么。

skill 与插件能力一起更新。修改源码后执行 pnpm build:ts 并重启 dsh;如果包含 Mod 更新,还需正常保存退出游戏,再运行 pnpm start --jev。.env、登录凭据、运行记录和存档备份保留在本机,不提交 Git。

从源码运行

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-plugin-d399 下一个 Next dsh-draw →