@jakevin7: 我居然在Deepseek Harness里面发现了 OAR!! DSH的代码里面居然在尝试用 OAR 在做 subaget https://github.com/botiverse/oar OAR(Open Agent Runtime)是…
摘要
用户发现 DeepSeek Harness 代码中集成了 OAR(Open Agent Runtime),用于实现 subagent。OAR 是一个厂商无关的统一 TS API,可驱动 Claude Code、Codex、Grok、Kimi 等多种编程 agent 运行时。
查看缓存全文
缓存时间: 2026/10/28 09:36
我居然在Deepseek Harness里面发现了 OAR!! DSH的代码里面居然在尝试用 OAR 在做 subaget https://github.com/botiverse/oar
OAR(Open Agent Runtime)是一个与厂商无关的统一接口:它让用一套 TS API 驱动 CC、Codex、Grok、Kimi 等各类编程 agent 运行时,不再需要逐个编写集成;它通过无损带归属的事件流,实现会话的开、控、观、测和恢复。
https://github.com/deepseek-ai/deepseek-harness/blob/f3803c96974ad4a94195fb97e5c637e9c2a3afe3/packages/experimental/subagent-oar/README.zh.md…
botiverse/oar
Source: https://github.com/botiverse/oar
OAR - programming interface for all agent harnesses
OAR (Open Agent Runtime) is a provider-independent programming interface for coding-agent runtimes: a solid foundation for building agent workspaces and other applications.
Delete harness logic and focus on outcomes and UX.
Supported runtimes
|
Antigravity |
Claude Code |
Codex |
Cursor |
Grok Build |
Kimi Code |
OpenCode |
Pi |
Qwen Code |
Qoder |
Pi Durable also runs through a host-owned Harness,
including in a browser via @botiverse/oar/pi-durable and the portable
core in @botiverse/oar/browser. The host installs its optional native peers.
Try the browser demo with pnpm durable-demo.
Library
One API drives every runtime: swap "claude" for "codex", "grok" or
"pi" (with a model it has) and the code stays the same. An option a
runtime cannot honor is refused before anything opens, never silently
dropped.
import { defaultRuntimes, promptAndWait } from "@botiverse/oar";
const claude = defaultRuntimes.require("claude");
const installation = await claude.installation?.();
if (installation?.kind !== "available") throw new Error("claude is not installed");
const session = await claude.session(installation, {
cwd: process.cwd(),
model: "sonnet",
effort: "high",
appendSystemPrompt: "Run the tests before you say you are done.",
mcpServers: [{ name: "fs", command: "npx", args: ["-y", "@modelcontextprotocol/server-filesystem", "."] }],
});
session.events((event) => {
// Every event says which agent it came from: [] is the root, a subagent has its own path.
const who = event.agentPath.length === 0 ? "" : `[${event.agentPath.join(" > ")}] `;
switch (event.kind) {
case "text_delta": if (who === "") process.stdout.write(event.text); break;
case "tool_call_started": console.log(`${who}${event.tool}`); break;
case "turn_ended": console.log(`${who}${event.outcome.kind}`); break;
}
});
const run = promptAndWait(session, "Find and fix the flaky test", { timeoutMs: 600_000 });
// Meanwhile, from your UI: steers the running turn, or queues it where the runtime cannot steer.
await session.deliver("Leave the snapshots alone.");
console.log(await run);
console.log(session.status().value, session.usage().value.total, session.contextUsage().value);
await session.dispose();
// Later, even from another process: the same conversation, picked up where it stopped.
const resumed = await claude.session(installation, { cwd: process.cwd(), resume: session.id });
Hand work to other runtimes as subagents; each report wakes the session that is waiting for it:
import { createSubagents, formatReport, reportOrigin } from "@botiverse/oar/agents";
const crew = createSubagents({ maxRunning: 4 });
crew.onReport((report) => {
void resumed.deliver(formatReport(report), { origin: reportOrigin(report) });
});
await crew.spawn({ runtime: "codex", task: "Review the diff on this branch for race conditions" });
await crew.spawn({ runtime: "pi", task: "Write the changelog entry for this branch" });
What else a session gives you:
- Every fact, attributed.
events()is oneEventper fact (native user message echoes, text, reasoning, tool calls with their later input, progress, end and any exit code the runtime reports, background tasks, turns, usage, model, effort, compaction, retries, app requests, control rejections, the process exit), each withseqandagentPath.{ coalesceText: true }gives text in blocks.rawEvents()andrecords()keep every native payload verbatim. - Control with honest answers.
prompt,steer,queue,withdrawandaborteach answer accepted or rejected with a typed code (busy,no_active_turn,runtime_exited, …); where input landed is read from the events, never guessed. - Your own tools on any runtime.
serveMcpToolsserves tools your host implements as an MCP server a session attaches like any other; replace the list mid-session whereRuntime.mcpToolsListChangedsays the running session sees it (reference). - Projections for UIs.
@botiverse/oar/observefolds records into a conversation (reduceConversation,viewOf), status, tasks and stalls, with no Node imports, so it runs in a browser. - Recording and tests.
openVoyagewrites a session’s records to a JSONL log as they happen, so the same folds can read it back later, and@botiverse/oar/testinggives a scripted runtime with realSessionsemantics and no binary or login.
The package README lists the public entry points.
defaultRuntimes holds the built-in Node runtimes; @botiverse/oar/runtimes/<id>
loads one of them without the others. Cursor needs the SDK you install and hand
over: createRuntimeRegistry([...defaultRuntimes.list(), createCursorRuntime({ sdk: () => import("@cursor/sdk") })])
(why). Pi Durable needs
createPiDurableRuntime({ harness, models }) with the host’s already-open Harness
and its Models.
Handy utilities, no session needed
OAR also offers a set of handy utilities you can use without running an agent at all: is it installed, is it signed in (and sign it in or out), which account and how much quota is left, which models it can run, is there an update (and install it), what skills and tools it has. One API covers every supported runtime, so a dashboard, a setup wizard or a quota monitor needs no per-runtime code.
import { defaultRuntimes } from "@botiverse/oar";
for (const runtime of defaultRuntimes.list()) {
const installation = await runtime.installation?.();
if (installation?.kind === "available") {
const [usage, models, update] = await Promise.all([
runtime.accountUsage?.(installation),
runtime.listModels?.(installation),
runtime.checkUpdate?.(installation),
]);
console.log(runtime.id, usage?.kind, models?.kind, update?.kind);
}
}
- Orientation:
orient(defaultRuntimes)combines installation and evidenced local account metadata. Choosedepth: "account"for native credential/usage I/O, or"models"for catalogs;usability(snapshot)projects readiness. Partial failures retain their own status and time (reference). - Installation:
installation()finds the runtime on this machine and reports its version, with no account or network calls. When PATH found it,shadowedlists the other copies on PATH after it, which never run. - Install:
installPlan()says what installing a runtime would run (the vendor’s documented installer, with its source page) or why nothing would run, andinstall()runs it for a runtime not found, judged byinstallation()afterwards (claude, codex, grok, kimi, and opencode’sv1orv2line as the host chooses; reference). - Login:
login()signs a runtime in through its own login without a terminal: it relays the sign-in URL or device code, and a code the person pastes back goes to the runtime only.authStatus()says whether it is signed in, andlogout()signs it out through its own logout (claude, codex, cursor; reference). oar never handles the tokens. - Account usage:
accountUsage()reads the plan and quota windows with their reset times (claude, codex, grok, kimi; reference). - Models:
listModels()lists the models the installation can run now (in a given workspace, withcwd), with their effort levels and service tiers; not being logged in is its own answer, not an empty list. - Setup forms:
@botiverse/oar/formsdescribes a runtime’s settings as data a setup UI renders and may only narrow, with validation and the mapping to session options; it loads no runtime SDK (Grok so far; reference). - Updates:
checkUpdate()reports the version the runtime’s own updater would install, andupgrade()runs that updater and judges it by the version afterwards (reference). - Inventories:
skills(),commands(),mcpServers()andtools()read what the runtime has configured natively (reference). - Session options:
refusedSessionOptionssays which session options a runtime refuses, before anything opens;session()rejects them with anUnsupportedOptionErrorrather than drop them (reference).mcpServersattaches MCP servers to one session (except Cursor and Pi Durable).nametitles a session in the runtime’s own list where it has one. A resume the runtime declines for now (the conversation is archived or open elsewhere) rejects withSessionUnavailableError.
The CLI exposes the same queries: oar installation, oar login
(--status only reports), oar logout, oar usage, oar models,
oar upgrade --check, and oar skills, oar commands, oar mcps and oar tools.
CLI
npx @botiverse/oar-cli list
oar run claude "What does this repo do?" --record run.jsonl
Every command: packages/cli (published as @botiverse/oar-cli).
Docs
- Design: why oar exists, its decisions and what comes next.
- Spec: the record stream and every contract built on it.
- Runtimes: what each runtime says natively and how oar maps it.
- Prior art: related projects compared feature by feature.
- Development: working in this repo.
ESM-only, Node entry requires Node.js 24+; the browser entry needs a modern browser with Web Crypto. Apache-2.0.
相似文章
@jakevin7: https://x.com/jakevin7/status/2086031167040426488
Maka 是一个开源 Agent Harness,通过日志即运行时、上下文剪枝、thinking 回传等机制,将同一 DeepSeek 任务的成本降至 OpenCode 的 1/8,并在 Terminal-Bench 上以更低成本取得更高通过率。
@seekjourney: 大家可能忽略了 DeepSeek Harness 昨天发布时的一个隐藏宝藏: .agents/skills/ 里面直接放了 11 个真实工程 Skill: Code Review、Pre-push Checks、找过度设计、Stacked…
介绍 DeepSeek Harness 发布中包含的 .agents/skills/ 目录,内含 11 个真实工程 Skill(如代码审查、提交前检查、CoT 泄漏清理等),相当于开源了部分工程规范和 Agent SOP。
DeepSeek Harness
DeepSeek AI 开源了 DeepSeek Harness (dsh),一个基于 Cordis 的插件架构智能体框架,目前处于开发者预览阶段,预计会有破坏性更改。
@Saccc_c: Deepseek harness 的轨迹模式太有意思了,现在完全可以知道 Agent 的工作进展,你的 Agent 员工再也不敢摸鱼了 其具体的思考步骤,调用工具,工具返回结果都清晰可见。最有意思的是,它会用不同颜色区分 AI 执行任务时…
DeepSeek Harness 发布了,带有轨迹模式,可以可视化 Agent 的思考步骤、工具调用和返回结果,并用颜色区分不同类型内容。可通过 npm 安装使用,适合开发者观察 Agent 工作进展。
@Saccc_c: 我用 Codex 对 DeepSeek Harness的GitHub仓库进行了详细分析 发现其大量使用Codex进行辅助开发,也少量的使用了 Claude Code 总结而言,Deepseek 官方都认可了 Codex 和 Claude,…
作者用 Codex 分析了 DeepSeek Harness 的 GitHub 仓库,发现其大量使用 Codex 和少量 Claude Code 进行辅助开发,暗示 DeepSeek 官方认可这些 AI 编码工具。