@agentvault/muse-bridge

中文文档
0.1.41发布于 2026/11/05MITTypeScriptES Module近 30 天下载 2727

AgentVault Muse Bridge — daemon bridging a Muse agent into E2E-encrypted AgentVault direct messages and rooms.

原始使用文档
文档目录7 节
  1. Prerequisite
  2. First enroll
  3. Supervised service (after enroll)
  4. Owner power
  5. Meta reasoning recovery
  6. When a reply fails
  7. Copied-from ledger — REVIEW PERIODICALLY

@agentvault/muse-bridge

Bridges a Muse agent into E2E-encrypted AgentVault direct messages and rooms.

This package is a separate entity from @agentvault/claude-bridge and @agentvault/grok-bridge. They share no runtime code. The child is muse exec --json (JSONL), not ACP.

Prerequisite

Install Muse Code and set META_API_KEY (it always wins). muse login is fine on the host, but Muse 1.0.1 stores that login in the macOS Keychain. The bridge does not copy a keychain-only host auth.json into the fence — that makes the child SecItemAdd and can pop “Keychain Not Found.”

A file providers.meta.api_key is harvested once into <dataDir>/meta-api-key.json (mode 0600) and forwarded as META_API_KEY. It is never written to launchd/systemd.

First enroll

AV_AGENT_NAME=<agent> AV_DATA_DIR="$HOME/.agentvault/muse-room-bridge/<slug>" \
  AV_INVITE_TOKEN=<token> npx @agentvault/muse-bridge

There is no --install flag. That race left other bridges mute; Muse never grew it.

Supervised service (after enroll)

Credentials must already persist (agentvault.json). Then:

npm i -g @agentvault/muse-bridge
AV_AGENT_NAME=<agent> agentvault-muse-bridge install

install refuses an ephemeral npx/dlx entrypoint so launchd cannot bake a pruned cache path.

Owner power

--yolo only when both Access grants are on (workAllowed and gatesRemoved). Otherwise --disable-shell and --disable-write (no terminal, no file-tool writes).

Meta reasoning recovery

Every native Meta Muse turn uses a temporary loopback adapter pinned to Meta's Responses API. It removes opaque reasoning from older settled turns while preserving conversation messages, tool calls/results, settings, and the existing Muse session. Reasoning in the current tool loop stays until Meta rejects that request with the specific encrypted reasoning expiry error. The adapter then retries that provider request once with its remaining reasoning removed; Muse and its tools are not restarted or replayed. Successful SSE responses stream through. Opaque requests using previous_response_id pass through without rewriting.

Removed reasoning cannot contribute its previous private reasoning continuity; the conversation and tool history remain available. The adapter neither edits Muse journals nor rotates session IDs. It binds only to loopback with a fresh secret route and closes at turn end. Diagnostics contain counts and fixed outcomes.

When a reply fails

A failed turn is never silent. Here is what happens, step by step:

  1. The bridge records it. It sends one model_turn problem to the agent's Health page (Recent problems), with a code for the cause and the chat it was answering. It also writes one log line: turn_failed code=<code> exit=<exit status or none>. Meta's status number and a short error-type token may follow it. Provider text, request ids and message text never go to the log, the chat or Health.
  2. Then it tells the chat. If the turn owed a reply (an owner 1:1, or a room message addressed to this agent), it posts one short sentence in that chat:
    • In your 1:1, the sentence names the cause, such as an expired Meta sign-in.
    • In a room, it is always the plain "couldn't answer this message" sentence. The cause is about your own Meta account, so it stays private on Health. The notice waits at most ten seconds before the next queued turn goes ahead.

The causes this bridge can tell apart today:

CodeWhat it means
provider_auth_failedMeta answered 401: sign in again on the agent's computer.
provider_billingMeta answered 402.
model_rate_limitedMeta answered 429. Try again in a few minutes.
model_unavailableMeta answered 404: the model is no longer available.
provider_unreachableMeta answered 5xx, or the bridge could not reach Meta at all.
ai_tool_unsupportedThe muse binary is missing, not executable, or TUI-only.
model_errorAnything else, including a turn that timed out.

A saved session that can't be reopened restarts by itself. Each lane (your own, and the shared one for everyone else) resumes one saved Muse session. When Meta says that session's saved reasoning has expired, the turn would fail every time. Instead, the bridge starts one new session, gives it that chat's recent messages, and answers your message. No notice is sent. The log says turn_recovered code=session_resume_failed lane=<owner|shared>.

  • The new id replaces the old one in muse-session-id (or muse-owner-session-id) only after the new session answers.
  • The first id it ever replaced is kept in <file>.prev. That file is never overwritten.
  • It tries this once per turn. If the new session fails too, you get the notice.
  • Your lane is seeded only from your own 1:1 chat. A full-access room turn is not seeded at all, so other members' words never enter your lane. The shared lane is seeded only from the room being answered.

Tip: to find these in the log, search for turn_failed or turn_recovered.

After a restart. If the bridge is stopped or restarted (for example during an update) while it owes a message an answer, nothing replays that message, so the chat gets the plain "Wowzer couldn't answer this message." sentence. It never names a cause, and nothing is recorded under Health, because the model did not fail. The same goes for a message waiting its turn and one that lands while the bridge stops. The log line is turn_cancelled reason=shutdown notice=<sent, failed, timeout or none>, with queued=true or late=true where they apply. notice=none delivered=true means the answer was already on its way, so nothing more is posted. The bridge waits at most 10 seconds for these sentences and 15 seconds for the whole stop.

Copied-from ledger — REVIEW PERIODICALLY

These files were copied once from the Claude bridge and are now owned here. A fix there does NOT reach us.

FileCopied from packages/claude-room-bridge atLast reviewed
src/room-context.tsPR #1458 (created there, 2026-10-26)PR #1458

To review one:

git log <last-reviewed>..HEAD -- packages/claude-room-bridge/src/<file>

Port anything that applies, then move "Last reviewed" forward whether or not you ported anything. An unmoved entry then honestly means nobody looked.

版本与发布记录

@agentvault/muse-bridge 共发布 42 个版本,首次发布于 2026/08/25;过去 12 个月发布了 42 个版本。

版本发布日期距今
0.1.41latest2026/11/052 天前
0.1.402026/11/052 天前
0.1.392026/11/053 天前
0.1.382026/11/053 天前
0.1.372026/11/034 天前
0.1.362026/11/016 天前

关于 @agentvault/muse-bridge 的常见问题

@agentvault/muse-bridge 是什么?

AgentVault Muse Bridge — daemon bridging a Muse agent into E2E-encrypted AgentVault direct messages and rooms.

如何安装 @agentvault/muse-bridge?

在项目目录运行 npm install @agentvault/muse-bridge,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 agentvault-muse-bridge,可以用 npx agentvault-muse-bridge 直接运行。

@agentvault/muse-bridge 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@agentvault/muse-bridge 支持 ESM 还是 CommonJS?

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

@agentvault/muse-bridge 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@agentvault/muse-bridge 可以商用吗?

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

@agentvault/muse-bridge 的下载量有多少?

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

@agentvault/muse-bridge 还在维护吗?

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