🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

opencode-ralph-loop

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opencode-ralph-loop - npm Package Compare versions

Comparing version
1.0.2
to
1.0.3
+1
-1
package.json
{
"name": "opencode-ralph-loop",
"version": "1.0.2",
"version": "1.0.3",
"description": "Minimal Ralph Loop plugin for opencode - auto-continues until task completion",

@@ -5,0 +5,0 @@ "main": "src/index.ts",

@@ -179,2 +179,3 @@ import { existsSync, readFileSync, writeFileSync, mkdirSync, unlinkSync, readdirSync, cpSync } from "fs";

const directory = ctx.directory || process.cwd();
const client = ctx.client;

@@ -274,2 +275,3 @@ // Auto-setup skills and commands on first run

if (!state.active) return;
if (!sessionId) return;
if (state.sessionId && state.sessionId !== sessionId) return;

@@ -292,5 +294,16 @@

return {
inject: `Continue from where you left off. (Iteration ${newState.iteration}/${newState.maxIterations})\n\nWhen the task is fully complete, output: <promise>DONE</promise>`
};
// Inject continuation prompt using client.session.prompt()
const continuationPrompt = `Continue from where you left off. (Iteration ${newState.iteration}/${newState.maxIterations})\n\nWhen the task is fully complete, output: <promise>DONE</promise>`;
try {
await client.session.prompt({
path: { id: sessionId },
body: {
parts: [{ type: "text", text: continuationPrompt }]
}
});
console.log(`[ralph-loop] Injected continuation (iteration ${newState.iteration})`);
} catch (e) {
console.error("[ralph-loop] Failed to inject continuation:", e);
}
}

@@ -297,0 +310,0 @@