@one-agent/ria-proxy
v0.0.1-beta.2
Published
Non-invasive Re in Act proxy for openai-compatible, OpenAI, and Anthropic runtimes.
Maintainers
Readme
@one-agent/ria-proxy
Non-invasive Re in Act plugin for OpenAI-compatible tool runtimes.
This package provides a PTC-style adapter for servers built on @mcpc-tech/aiyo.
It rewrites ordinary function tools into a single Re in Act wrapper tool, executes
TypeScript/JavaScript inside a bounded runtime with built-in reason(), act(),
and optional agent(), and preserves execution state across multiple request / response turns.
It also provides a fast proxy launcher on top of @mcpc-tech/aiyo-cli, so you can
launch tools like OpenCode or Claude through a Re in Act-enabled proxy.
Install
pnpm add @one-agent/ria-proxyQuick start
import { createOpenAI } from "@ai-sdk/openai";
import { createAiyo } from "@mcpc-tech/aiyo";
import { createReInActPlugin } from "@one-agent/ria-proxy";
const openai = createOpenAI({ apiKey: process.env.OPENAI_API_KEY! });
const adapter = createAiyo({
defaultModel: "gpt-4.1",
runtimeFactory: ({ modelId }) => ({
model: openai.chat(modelId || "gpt-4.1"),
modelName: modelId || "gpt-4.1",
}),
plugins: [
createReInActPlugin({
toolNames: ["read_file", "write_file", "list_dir"],
}),
],
});Fast proxy launch
npx @one-agent/ria-proxy launch opencodeOr use the launcher helpers directly:
import { launchWithRiaProxy } from "@one-agent/ria-proxy";
await launchWithRiaProxy("opencode", {
model: "gpt-4.1",
});What it does
- Rewrites matching function tools into one top-level wrapper tool.
- Teaches the model to write code in Re in Act style.
- Injects
reason(prompt, example),act(name, args), andagent(prompt, config?)into the runtime. - Suspends execution only when
act()needs a real external tool result. - Resumes the same execution session when the next tool result arrives.
Main export
createReInActPlugincreateRiaProxyPluginsstartRiaProxyServerlaunchWithRiaProxyrunCli
CLI commands
ria-proxy serveria-proxy launch opencoderia-proxy launch claude
