Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@epoch-agent/server

Latest version: v6.9.1

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
npm package Publisher: ddbor
59 Versions
4.1K Downloads

Scan summary

@epoch-agent/server was last scanned on 24 Nov 2026 at version 6.9.1. Risk score 0 of 100. High-severity rules fired.

  • Releases: 59 versions; the latest 5 were published within 7 days (18–24 Nov 2026).
  • Findings: 1 rule fired in version 6.9.1 (1 high). The score describes this version only.
  • Downloads: 4,083 downloads.

Versions

59 versions published
Versions and the rules that fired in each
VersionPublishedStatus
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

Rules fired in 6.9.1: 1

Findings

1 High

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 suspicious behaviors form a known attack pattern

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.

HIGH
Checking access…

🔒 Create a free account to see all 1 finding with descriptions and instance counts

The score describes 6.9.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@epoch-agent/server

本地 HTTP + SSE 服务端。epoch web 的后半截——给浏览器的那一层。

  • ✅ 做:node:http 手写路由、SessionHub 扇出、SSE 续传、cookie 鉴权 + Origin 校验、静态产物托管
  • ❌ 不做:
    • 不许 import core。与 examples/electron-minimal 同规矩:需要什么能力 就让 runtime 转出来,这里出现 core 就是接口设计漏了一块(check:layers 会红)
    • 不许写 console。地址打给谁看是宿主的事(同样 check:layers 会红)
    • 不引第三方 HTTP 框架
  • 依赖:protocol + runtime

谁会用它

两类宿主,接法完全一样:

  • cli:epoch web——起服务、打印地址、开浏览器、接 Ctrl+C
  • 嵌入宿主:Electron / VS Code 扩展里要现成界面的那一类(不想自己把 AgentEvent 翻译成组件树)。约定见 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。

端点

OX Radar and Response Center

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.

Where it’s listed

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).

  • npm @epoch-agent/server

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Vulnerability Insights

Compromised Claude Code extensions (versions 2.1.312 & 2.1.313) in Cursor try to install a backdoor

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Frame 2085668439 (1)
Group 1261154229