@troed/oc-done (0.1.23)
Installation
@troed:registry=npm install @troed/oc-done@0.1.23"@troed/oc-done": "0.1.23"About this package
oc-done
A plugin for OpenCode that registers an exit() tool to signal agent completion.
When an agent finishes its tasks, it calls exit() to exit opencode with a status code indicating success or failure. This allows parent shell scripts or orchestration to detect completion and handle the result accordingly.
The tool uses the opencode plugin API's input.exit() method for clean shutdown, rather than killing processes externally.
Installation
opencode plugin @troed/oc-done@latest --global
Usage
The plugin registers a single tool: exit().
await exit({
success?: boolean, // default: true
message?: string, // optional summary
});
Examples
// Signal success (default)
await exit();
// Signal success with message
await exit({ message: "All tasks completed" });
// Signal failure
await exit({ success: false, message: "Something went wrong" });
Exit Codes
0— success (default)1— failure (whensuccess: false)
Output
[exit] SUCCESS: All tasks completed
[exit] FAILURE: Something went wrong
[exit] SUCCESS: (no message)
Source code repo
For known issues, posting new ones, forking or contributing:
https://git.sync.wtf/troed/oc-done
License
Creative Commons Zero (CC0 1.0 Universal) — https://creativecommons.org/publicdomain/zero/1.0/
Dependencies
Development dependencies
| ID | Version |
|---|---|
| @types/node | ^26.1.1 |
| typescript | ^5.0.0 |
Peer dependencies
| ID | Version |
|---|---|
| @opencode-ai/plugin | >=1.0.0 |
Details
Assets (1)
Versions (24)
View all
oc-done-0.1.23.tgz
1.8 KiB