@troed/oc-done (0.1.12)

Published 2026-07-24 15:35:37 +02:00 by troed in troed/oc-done

Installation

@troed:registry=
npm install @troed/oc-done@0.1.12
"@troed/oc-done": "0.1.12"

About this package

oc-done

A plugin for OpenCode that registers a done() tool to signal agent completion.

When an agent finishes its tasks, it calls done() to exit with a status code indicating success or failure. This allows parent shell scripts or orchestration to detect completion and handle the result accordingly.

Installation

opencode plugin @troed/oc-done@latest --global

Usage

The plugin registers a single tool: done().

await done({
  success?: boolean,  // default: true
  message?: string,   // optional summary
});

Examples

// Signal success (default)
await done();

// Signal success with message
await done({ message: "All tasks completed" });

// Signal failure
await done({ success: false, message: "Something went wrong" });

Exit Codes

  • 0 — success (default)
  • 1 — failure (when success: false)

Output

[done] SUCCESS: All tasks completed
[done] FAILURE: Something went wrong
[done] 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
npm
2026-07-24 15:35:37 +02:00
1
CC0
2.3 KiB
Assets (1)
Versions (24) View all
0.1.23 2026-07-24
0.1.22 2026-07-24
0.1.21 2026-07-24
0.1.20 2026-07-24
0.1.19 2026-07-24