Repository navigation
Releases
OpenCode Piggy v0.2.0
中文
[0.2.0] - 2026-10-30
Features
- 第三方 agent 工作事件接口已转正,插件以正式版发布到 npm
latest,安装目标为opencode-piggy@latest。 - 跟进官方 dsh-piggy 0.37.2-rc.5(桌面外壳 0.6.8-rc.3),优先发现统一的
piggy/work-endpoint目录。 - Linux 游戏发现遵循绝对路径的
XDG_DATA_HOME,默认使用~/.local/share/piggy/work-endpoint。Windows 和 macOS 分别使用%APPDATA%/piggy/work-endpoint和~/Library/Application Support/piggy/work-endpoint。
Design Rationale
- 游戏数据目录由官方桌面外壳管理;插件跟随其默认位置,不迁移游戏数据或插件队列。
- 工作事件协议仍为 v1,事件格式、稳定 ID、提交确认与七天离线窗口保持不变。
Notes & Caveats
- 从
@next或固定 RC 版本升级时,先移除旧安装目标,再添加opencode-piggy@latest;插件队列保留。 - 新目录没有发现文件时,仍依次回退到旧配置目录下的
dsh-piggy/work-endpoint和dsh-piggy-desktop/work-endpoint。 gameDirectory和PIGGY_USERDATA保持优先;显式指向旧目录的配置需要随游戏实际位置更新。启动游戏时仍需--work-events。
安装
opencode plugin add opencode-piggy@latest离线归档
下载任一压缩包并解压,将 OpenCode 配置中插件项的 package 指向解压后 package/ 目录的绝对路径。
游戏要求与配置方法见 README。
English
[0.2.0] - 2026-10-30
Features
- With the third-party agent work-event API now stable, the plugin ships as a stable release on npm
latest, installed asopencode-piggy@latest. - Follow official dsh-piggy 0.37.2-rc.5 (desktop shell 0.6.8-rc.3), discovering the unified
piggy/work-endpointdirectory first. - Linux game discovery follows an absolute
XDG_DATA_HOME, defaulting to~/.local/share/piggy/work-endpoint. Windows and macOS use%APPDATA%/piggy/work-endpointand~/Library/Application Support/piggy/work-endpoint, respectively.
Design Rationale
- The official desktop shell manages game data paths; the plugin follows its defaults without migrating game data or the plugin queue.
- The work-event protocol remains v1, so event payloads, stable IDs, commit acknowledgements and the seven-day offline window stay unchanged.
Notes & Caveats
- To upgrade from
@nextor a pinned RC, remove the old install target before addingopencode-piggy@latest; the plugin queue is preserved. - If the new directory has no discovery file, discovery still falls back to
dsh-piggy/work-endpointand thendsh-piggy-desktop/work-endpointunder the old configuration root. gameDirectoryandPIGGY_USERDATAkeep taking priority; update explicit paths that still point to an old directory when the game moves. Start the game with--work-eventsas before.
Install
opencode plugin add opencode-piggy@latestOffline archives
Extract either archive and set the plugin entry’s package in your OpenCode configuration to the absolute path of the extracted package/ directory.
See the README for game requirements and configuration.
OpenCode Piggy v0.2.0-rc.2
中文
[0.2.0-rc.2] - 2026-10-16
Features
- 插件以预发布版本发布到 npm 的
next通道,包名opencode-piggy。用opencode plugin add opencode-piggy@next安装,用plugin update、plugin remove更新和移除;需要固定版本时安装opencode-piggy@0.2.0-rc.2。 - 不使用 npm 时,仍可通过 Git 子目录目标
github:WolalaQAQ/opencode-piggy#v0.2.0-rc.2::path:packages/opencode-piggy安装,GitHub Releases 的.tgz和.zip归档用于离线安装。 - 事件映射、投递、离线重试和目录发现与 0.2.0-rc.1 相同,游戏要求不变。
Design Rationale
- 下载、配置写入和更新交给 OpenCode 的插件管理,用户不必再手动解压或修改 JSON。
- 预发布版本放在
next通道,不占用 npm 默认的latest;正式版使用新的版本号,发布到latest时再转正。
Notes & Caveats
- 游戏仍需包含主线提交
8f72f17的工作事件接口,并以--work-events启动。 - 固定版本的安装目标不会自动跳到下一个版本,需要换成新版本号重新安装。
安装
opencode plugin add opencode-piggy@next离线归档
下载任一压缩包并解压,将 OpenCode 配置中插件项的 package 指向解压后 package/ 目录的绝对路径。
游戏要求与配置方法见 README。
English
[0.2.0-rc.2] - 2026-10-16
Features
- The plugin is published to npm as the prerelease package
opencode-piggyon thenexttag. Install it withopencode plugin add opencode-piggy@next, and update or remove it withplugin updateandplugin remove. To pin a version, installopencode-piggy@0.2.0-rc.2. - Without npm, you can still install from the Git subdirectory target
github:WolalaQAQ/opencode-piggy#v0.2.0-rc.2::path:packages/opencode-piggy; the.tgzand.ziparchives on GitHub Releases are for offline installation. - Event mapping, delivery, offline retries and directory discovery are the same as in 0.2.0-rc.1, and the game requirements are unchanged.
Design Rationale
- Downloading, writing configuration and updating are left to OpenCode's plugin management, so users no longer extract archives or edit JSON by hand.
- Prereleases live on the
nexttag and leave npm's defaultlatesttag alone; a stable release will use a new version number published tolatest.
Notes & Caveats
- The game must still include the work-event API from main commit
8f72f17and be started with--work-events. - A pinned install target does not move to the next version by itself; reinstall with the new version number.
Install
opencode plugin add opencode-piggy@nextOffline archives
Extract either archive and set the plugin entry’s package in your OpenCode configuration to the absolute path of the extracted package/ directory.
See the README for game requirements and configuration.
OpenCode Piggy v0.2.0-rc.1
中文
[0.2.0-rc.1] - 2026-10-16
Features
- 自包含 OpenCode V2 插件:订阅服务端公共事件,把工作记录映射成带稳定 ID 的事件,先异步写入持久发件箱,再通过 HTTP 投递给 dsh-piggy 的官方工作事件接口。Desktop 和 TUI 共用同一个插件,要求 OpenCode 2.0.26 或以上。
- 游戏关闭期间事件继续落盘,重开后补投;每 5 秒重试,收到
applied、duplicate或ignored后才移除。超过官方 7 天接收窗口的事件停止自动投递并保留在磁盘上。 - 同一 OpenCode 服务中的多个项目共用一个投递器,最后一个插件卸载时停止;新项目会等待在途的关闭完成后再接手。
- 自动发现游戏的
work-endpoint:先找安装版的dsh-piggy,其发现文件不存在时再找源码版的dsh-piggy-desktop。可用PIGGY_USERDATA、插件选项gameDirectory或安装参数--game-endpoint覆盖,显式设置优先。队列默认位于配置根目录下的opencode-piggy-plugin/,可用directory或--directory指定。 - 以
.tgz和.zip两种归档发布到 GitHub Releases,顶层目录统一为package/,内容仅为插件代码、许可和 README。npm run pack:plugin生成这两个归档。 - GitHub Actions 在推送
v*标签时运行检查、打包并创建 Release,手动运行可以只生成草稿。
Design Rationale
- 官方游戏提供了与框架无关的持久接收接口,插件在 OpenCode 一侧完成映射和可靠投递即可,不需要中间进程。发件箱放在 OpenCode 一侧,游戏断开时工作记录不丢失,重试沿用原事件 ID,游戏端去重。
- 插件只使用 Node 内置模块并保持目录自包含,使用者无需额外运行时。游戏由用户自己启动,插件不注册模型工具、不改模型上下文。
Notes & Caveats
- 游戏需要包含主线提交
8f72f17的工作事件接口,并以--work-events启动。 directory指插件队列目录,gameDirectory指游戏的work-endpoint/目录,两者互相独立。
下载与使用
下载任一压缩包并解压,将 OpenCode 配置中插件项的 package 指向解压后 package/ 目录的绝对路径。
游戏要求与配置方法见 README。
English
[0.2.0-rc.1] - 2026-10-16
Features
- A self-contained OpenCode V2 plugin. It subscribes to public server events, maps work records to events with stable IDs, writes them asynchronously to a persistent outbox and delivers them over HTTP to dsh-piggy's official work-event API. Desktop and the TUI share the plugin; OpenCode 2.0.26 or later is required.
- Events keep being persisted while the game is closed and are delivered when it reopens. Delivery retries every 5 seconds and an event is removed only after the game returns
applied,duplicateorignored. Events older than the game's 7-day acceptance window stop being sent automatically and stay on disk. - Projects in one OpenCode service share a single dispatcher that stops when the last plugin unloads. A new project waits for an in-flight shutdown to finish before taking over.
- Automatic discovery of the game's
work-endpoint: the installed build'sdsh-piggyfirst, then the source build'sdsh-piggy-desktopwhen the former has no discovery file.PIGGY_USERDATA, thegameDirectoryplugin option and the--game-endpointinstaller flag override it, with explicit settings taking priority. The queue defaults toopencode-piggy-plugin/under the configuration root and can be set withdirectoryor--directory. - Released on GitHub Releases as both
.tgzand.ziparchives with a common top-levelpackage/directory, containing only the plugin code, license and README.npm run pack:pluginbuilds both archives. - GitHub Actions runs checks, packages and creates a Release when a
v*tag is pushed; a manual run can produce just a draft.
Design Rationale
- The official game provides a framework-neutral durable ingestion API, so the plugin can map and deliver reliably from the OpenCode side without an intermediate process. The outbox sits on the OpenCode side so work records survive the game being closed, and retries reuse the original event ID so the game can deduplicate.
- The plugin uses only Node built-in modules and stays self-contained, so users need no extra runtime. The user starts the game; the plugin registers no model tools and changes no model context.
Notes & Caveats
- The game must include the work-event API from main commit
8f72f17and be started with--work-events. directoryis the plugin queue directory andgameDirectoryis the game'swork-endpoint/directory; they are independent.
Download and use
Extract either archive and set the plugin entry’s package in your OpenCode configuration to the absolute path of the extracted package/ directory.
See the README for game requirements and configuration.
OpenCode Piggy v0.1.0-rc.3
[0.1.0-rc.3] - 2026-10-12
Features
- 上游子模块升级并固定到 dsh-piggy
0.36.1(329be94),桌面外壳适配版本为0.6.5-rc.2。 - 提供 Windows x64 安装包,内含游戏、Electron、独立 Node 桥运行时和插件。按当前用户安装,无需管理员权限,自动启用全局插件并创建桌面和开始菜单快捷方式。
- 安装版双击进入游戏接收模式。小猪由用户自行开关,安装不会启动它;卸载保留存档和桥队列,只移除属于该安装目录的全局插件入口。
- 新增 GitHub Actions Release 工作流:推送版本标签后构建 Windows x64 安装包并发布,也可手动运行并只生成草稿。
- 新增
scripts/prepare-release.mjs,按固定清单准备 Electron、运行依赖和类型检查依赖。
Design Rationale
- 安装包负责依赖准备和启动入口;插件、桥和桌宠仍各自管理生命周期,插件不启动桌宠。
- 沿用子模块的原目录布局和加载时接入方式,原版文件只在构建产物里复制,不重建客户端。
- 插件作为普通磁盘文件交给 OpenCode 加载,桥使用随包的独立 Node 运行时;安装程序由 NSIS 直接生成。
Notes & Caveats
- 项目里已启用源码插件入口时,先将其停用,避免与安装包的全局入口重复加载。
- 升级和卸载前退出小猪,并停止占用安装目录运行时的 OpenCode 后台服务。
下载与使用
Windows x64:下载 opencode-piggy-setup-game-0.36.1-0.1.0-rc.3-x64.exe,双击安装。需要 OpenCode V2 2.0.26 或以上;不需要另装 Node.js。
安装后重新加载 OpenCode 项目,从桌面快捷方式打开小猪。插件只启动后台桥,不自动启动小猪。
升级前退出小猪并停止使用插件的 OpenCode 后台服务,再运行新安装包。卸载保留存档与桥队列。
安装包未签名,包含固定 dsh-piggy 游戏及 OpenCode 接收适配。