@awebai/oats-pi

中文文档
0.69.12发布于 2026/11/04MITES Module零依赖近 30 天下载 7030

OATS pi runtime bridge — memory session events and pre-workspace bootstrap over the runtime-neutral @awebai/oats kernel

原始使用文档

@awebai/oats-pi

Pi harness bridge for OATS.

The runtime-neutral kernel and universal oats CLI live in @awebai/oats. Publishes in lockstep with the kernel (same version from the same release tag). This bridge registers no operational tools. It only:

  • exposes oats-getting-started before an OATS workspace exists (the acquisition funnel);
  • contributes the instance-local .agents/skills set inside a spawned instance;
  • holds an instance's opening task (@TASK.md) on pi's own path until no turn another extension started is active, so pi runs it exactly once, as its input processing made it, instead of refusing it. It never waits for the task's own run: pi 1.2 and later count that run as active from before its before_agent_start, and queue a message sent meanwhile into it, after the task. It never sends, re-sends or alters a message. The exception: an extension loaded behind the bridge that starts a turn (or awaits I/O while one starts) inside its own input handling of the opening prompt, or on a pi before 1.2 in its before_agent_start, can still make pi refuse it, because pi's interactive mode sends the initial message with no streamingBehavior. @awebai/pi has no such handler. A session that shuts down (a reload, say) releases the hold, and pi then runs or refuses the task by its own rules;
  • reports a turn that ended in a provider error, once pi has stopped retrying and recovering (agent_settled, pi 0.80.4 and later): a waiting claim through oats instance waiting, producer oats.pi, cleared by the next run, so the instance shows as needing input instead of idling unseen;
  • journals compaction summaries and sends resume nudges when the active knowledge capability created STATE.md/log.md. A startup gets the nudge only when pi kept an earlier session of the home (pi files a session once it holds a message), so a fresh home's first turn is its opening task. What STATE.md says decides nothing, and the bridge writes nothing to tell. Knowledge ownership, read/capture instructions, judgment and delivery remain capability-owned.

Skill resolution itself is owned by the kernel: spawn materializes the exact kernel + soul + active-capability set into each instance's .agents/skills and launches pi with that directory as an explicit skill path. Ambient skills (user-level, packages, work tree) coexist with the OATS-composed set.

npm install -g @awebai/oats
pi install npm:@awebai/oats-pi

OATS publishes both packages from the same version tag. Reload pi after an adapter install or upgrade.

Which kernel the bridge loads. The bridge imports the kernel's lib/core.mjs, from the first of:

  1. OATS_PKG_ROOT, the kernel's package directory (a checkout of awebai/oats, say), when it is one;
  2. inside an OATS instance, the kernel that launched it: the home's own oats ($OATS_INSTANCE_HOME/.oats/bin/oats), a link the kernel writes at every launch. A home therefore needs no global install, whatever PATH pi runs with, when its kernel runs from a checkout or a local install;
  3. the oats on PATH, when its real path lies in the kernel's package: the global install's, or a checkout's after npm link. An oats that is a script running the kernel from elsewhere names no package and is passed over;
  4. @awebai/oats in npm's global folder (npm root -g).

Outside an instance with none of these, pi reports the extension as failing to load, with "OATS kernel not found" and the three ways out: npm install -g @awebai/oats, an oats on PATH that links to the kernel, or OATS_PKG_ROOT.

All lifecycle/config/package operations use the shell-visible CLI: oats status, oats spawn, oats doctor, oats install, oats trust, oats use, and oats retire.

With OKF v2, state/log/notes stay episodic while accepted expertise lives in external bases exposed as immutable reader views. The Pi bridge is not a harvester or knowledge store. Independent workers select their own harness/model; source retirement relies on durable evidence custody, not this adapter's presence. V0.23.1 integration is prepared, not yet a publication claim.

版本与发布记录

@awebai/oats-pi 共发布 133 个版本,首次发布于 2026/09/04;过去 12 个月发布了 133 个版本。

版本发布日期距今
0.69.12latest2026/11/043 天前
0.69.112026/11/034 天前
0.69.102026/11/034 天前
0.69.92026/11/025 天前
0.69.82026/10/317 天前
0.69.72026/10/317 天前

关于 @awebai/oats-pi 的常见问题

@awebai/oats-pi 是什么?

OATS pi runtime bridge — memory session events and pre-workspace bootstrap over the runtime-neutral @awebai/oats kernel

如何安装 @awebai/oats-pi?

在项目目录运行 npm install @awebai/oats-pi,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:typebox(*)、@earendil-works/pi-ai(*)、@earendil-works/pi-coding-agent(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@awebai/oats-pi 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/awebai__oats-pi 是否存在。

@awebai/oats-pi 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@awebai/oats-pi 可以商用吗?

@awebai/oats-pi 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@awebai/oats-pi 的下载量有多少?

根据 npm 官方下载统计,@awebai/oats-pi 在 2026/10/07 – 2026/11/05 这 30 天内被下载 7,030 次,日均约 234 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@awebai/oats-pi 还在维护吗?

最新版本 0.69.12 发布于 2026/11/04(3 天前);至今共发布 133 个版本,其中过去 12 个月发布了 133 个;首次发布于 2026/09/04。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。