Scan your whole stack
From OX Research Newsroom
Are you using @epoch-agent/server?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v6.9.1
@epoch-agent/server was last scanned on 24 Nov 2026 at version 6.9.1. Risk score 0 of 100. High-severity rules fired.
| Version | Published | Status |
|---|---|---|
| 6.9.1 LATEST | 24 Nov 2026 | 1 rule fired |
| 6.9.0 | 23 Nov 2026 | 1 rule fired |
| 6.8.0 | 20 Nov 2026 | 1 rule fired |
| 6.7.0 | 20 Nov 2026 | Not shown |
| 6.6.0 | 18 Nov 2026 | Not shown |
Findings for v6.9.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
Several behaviors that are each common on their own, such as reading registry credentials, contacting a variable host or running shell commands, appear together in this package in a combination associated with attacks. The finding message lists the behaviors that were combined.
HIGHThe score describes 6.9.1; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
本地 HTTP + SSE 服务端。epoch web 的后半截——给浏览器的那一层。
node:http 手写路由、SessionHub 扇出、SSE 续传、cookie 鉴权 + Origin 校验、静态产物托管examples/electron-minimal 同规矩:需要什么能力
就让 runtime 转出来,这里出现 core 就是接口设计漏了一块(check:layers 会红)console。地址打给谁看是宿主的事(同样 check:layers 会红)两类宿主,接法完全一样:
epoch web——起服务、打印地址、开浏览器、接 Ctrl+CAgentEvent 翻译成组件树)。约定见 docs/EMBEDDING.md §9自己画 UI 的同进程宿主不需要这一层:跨一层 HTTP 是白付的序列化成本,直接依赖 runtime 就好。
const created = await createWebServer({ runtime, version, port: 0 });
if (!created.ok) throw new Error(created.error); // 失败是返回值,不是异常
created.server.url; // 含一次性 ?token=,首屏换 HttpOnly cookie
created.server.port; // `port: 0` 时内核分配的真实端口——**别写死 4400**
created.server.token; // 宿主自己发请求时用,不必去正则 url
created.server.webRoot; // undefined = 这次发的是占位页(没构建过前端)
created.server.observe(fn); // 同进程旁听**广播层**的 wire 帧,**不算一条连接**
created.server.snapshot(); // 首屏那张状态快照(SSE 上的 session-state 只发变化)
await created.server.close(); // 幂等
⚠️ observe() 只看得见「由 hub 驱动」的会话。 它挂在广播层上(wire 帧、
序列化之后),所以宿主自己 for-await session.run() 的那半边它一帧都收不到。
那一半走 runtime 的 EpochRuntime.events(方案 61)——
两者的取舍表在 EMBEDDING §13.5。
主题和语言给 ui,别去写浏览器的 localStorage(2026-08-15,方案 54 §七):
const created = await createWebServer({
runtime,
version,
port: 0,
ui: { theme: 'dark', lang: 'zh' },
});
created.server.url; // http://127.0.0.1:52341/?token=…&theme=dark&lang=zh
界面在第一帧之前读这两个参数(index.html 文档头里那段内联脚本,它存在的理由
就是深色下不先闪一帧白),认出来就写进自己的 localStorage 再按现有逻辑走。
在它之前,宿主唯一能落地的做法是给 webview 挂一个 preload 手写 localStorage ——
而那两个 key 是 @epoch-agent/web 的导出常量,那个包 private: true、
宿主 import 不到,只能抄一个我们随时能改的字符串。
三条边界:是初值不是锁(用户在设置页照样改得动,刻意没有「强制主题」的开关)、
一次性(界面吃掉之后把这两个参数从地址栏抹掉,否则每次刷新都会覆盖用户的选择)、
认不出来的值当没给。参数名和值域在 bind.ts,
和 web 那两份的一致性由 packages/web/__tests__/prefs.test.ts 钉着。
artifactsRoot 不用传(2026-08-15 起可选):缺省取 runtime.artifactsRoot,
也就是引擎真往里写产物的那个目录。以前它是必填的,而宿主没有任何办法验证自己算的
和引擎算的是不是同一个 —— 分叉的表现是产物栏点开 404,而服务、日志、状态码、诊断
全部正常,一个字不报(方案 54 §二)。真想让界面从别处读才传它,那时对不上是
宿主自己的选择。server 不许 import infra,所以这个字符串只能由 runtime 报。
dist/web 是 web 的构建产物,由 scripts/copy-web-assets.mjs
在构建期拷进来,GET /* 托管的就是它。不传 webRoot 就是它——想换成自己那套
前端才传。
产物落在这个包而不是 cli(2026-08-14 改的):嵌入宿主依赖的是本包,
产物留在 cli 里的时候,它们不额外装一个 CLI 包并猜出 dist/web 这个内部路径就只能
拿到占位页,而且服务、日志、状态码全都正常。verify:pack 有一条断言守着
tarball 里真的有那些字节。
⚠️ 必须走根目录的
pnpm build。pnpm --filter @epoch-agent/server build绕过 turbo,@epoch-agent/server#build → @epoch-agent/web#build这条依赖不生效, 拷贝脚本会报「packages/web/dist里没有 index.html」。⚠️ 构建期的
clean不许删dist/web(tsup.config.ts的clean: ['!web', …])。 它是拷进来的,不是 tsup 的产物;而那次删除发生在构建开头、拷回来是最后一步, 中间那几十秒里pnpm epoch:dev web起不来真界面、刷新也 404。配套的另一半是: 服务端按请求重算静态根(routes.ts的handleStatic),所以构建完了刷新一下就 接上,不用重启。两半各有一条用例:build-clean-keeps-web/web-root-late。
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.