@felipejesus/openloop
v0.1.1
Published
Ralph Loop plugin for OpenCode with automatic continuation until completion.
Maintainers
Readme
@felipejesus/openloop
Ralph Loop for OpenCode: start a task once, then let the plugin keep nudging the session forward until it truthfully emits <promise>DONE</promise>.
What it does
- adds
/ralph-loopto start an auto-continuation loop - adds
/cancel-ralphto stop an active loop - adds
/ralph-helpfor a quick reference - stores loop state in
.opencode/ralph-loop.local.md - watches for
session.idle, checks the last assistant reply, and continues the session if the task is not done yet
Install
Add the plugin name to your OpenCode config after publishing or installing it as a dependency:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@felipejesus/openloop"]
}On first load, the plugin copies its commands and skills into your OpenCode config directory so the slash commands are available globally.
For this repository specifically, a project-local loader lives at .opencode/plugins/ralph-loop.ts, so opening this repo in OpenCode will also load the plugin directly from source.
Commands
/ralph-loop Build a REST API with authentication
/cancel-ralph
/ralph-helpHow it works
/ralph-loopwrites.opencode/ralph-loop.local.md- the plugin binds that loop to the current OpenCode session
- when the session goes idle, the plugin checks the latest assistant text for
<promise>DONE</promise> - if the promise is missing and the iteration cap is not reached, the plugin sends a continuation prompt back into the same session
- the loop stops when the promise appears, the loop is cancelled, or
maxIterationsis reached
Development
npm install
npm run release:checkRelease pipeline
GitHub Actions is configured with:
/.github/workflows/ci.ymlto run type-checking and package validation on pushes and pull requests/.github/workflows/release.ymlto publish to npm and create a GitHub Release when av*tag is pushed
Release migration plan:
- Publish the first version of
@felipejesus/openloopwith the existingNPM_TOKEN - Open the
@felipejesus/openlooppackage settings on npm - Add a GitHub Actions trusted publisher
- Use
felipepiresdejesusas the owner,openloopas the repository, andrelease.ymlas the workflow filename - After trusted publishing is working, delete the old
NPM_TOKENGitHub secret
The release workflow is compatible with both stages: npm will use the token for the first publish, then switch to GitHub OIDC once trusted publishing is configured.
To cut a release:
git tag v0.1.0
git push origin v0.1.0Repo layout
src/index.ts Main plugin implementation
commands/ Slash commands installed into OpenCode
skills/ Lazy-loaded skills installed into OpenCode