惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
J
Java Code Geeks
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
Docker
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 聂微东
MyScale Blog
MyScale Blog
H
Help Net Security
Last Week in AI
Last Week in AI
T
The Blog of Author Tim Ferriss
M
MIT News - Artificial intelligence
大猫的无限游戏
大猫的无限游戏
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
P
Proofpoint News Feed
博客园 - 叶小钗
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
F
Fortinet All Blogs
Martin Fowler
Martin Fowler
Microsoft Security Blog
Microsoft Security Blog
T
Tailwind CSS Blog
aimingoo的专栏
aimingoo的专栏

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(gateway): preserve owner MCP tools for agent RPC · op...
vincentkoc · 2026-06-22 · via Recent Commits to openclaw:main

@@ -33,6 +33,7 @@ import {

3333

} from "../cli-output.js";

3434

import { classifyFailoverReason } from "../embedded-agent-helpers.js";

3535

import { FailoverError, resolveFailoverStatus } from "../failover-error.js";

36+

import { prepareCliBundleMcpCaptureAttempt } from "./bundle-mcp.js";

3637

import { buildClaudeOwnerKey } from "./helpers.js";

3738

import { cliBackendLog, formatCliBackendOutputDigest } from "./log.js";

3839

import type { PreparedCliRunContext } from "./types.js";

@@ -1063,39 +1064,49 @@ async function createClaudeLiveSession(params: {

10631064

cleanup: () => Promise<void>;

10641065

}): Promise<ClaudeLiveSession> {

10651066

let session: ClaudeLiveSession | null = null;

1066-

const managedRun = await params.supervisor.spawn({

1067-

sessionId: params.context.params.sessionId,

1068-

backendId: params.context.backendResolved.id,

1069-

scopeKey: `claude-live:${params.key}`,

1070-

replaceExistingScope: true,

1071-

mode: "child",

1072-

argv: params.argv,

1073-

cwd: params.context.cwd ?? params.context.workspaceDir,

1074-

env: params.mcpCaptureKey

1075-

? { ...params.env, OPENCLAW_MCP_CLI_CAPTURE_KEY: params.mcpCaptureKey }

1076-

: params.env,

1077-

stdinMode: "pipe-open",

1078-

captureOutput: false,

1079-

onStdout: (chunk) => {

1080-

if (session) {

1081-

handleClaudeStdout(session, chunk);

1082-

}

1083-

},

1084-

onStderr: (chunk) => {

1085-

if (session) {

1086-

session.stderr += chunk;

1087-

if (session.stderr.length > CLAUDE_LIVE_MAX_STDERR_CHARS) {

1088-

closeLiveSession(

1089-

session,

1090-

"abort",

1091-

createOutputLimitError(session, "Claude CLI stderr exceeded limit."),

1092-

);

1093-

return;

1094-

}

1095-

resetNoOutputTimer(session);

1096-

}

1097-

},

1067+

const mcpCaptureAttempt = await prepareCliBundleMcpCaptureAttempt({

1068+

mode: params.context.backendResolved.bundleMcpMode,

1069+

backend: params.context.preparedBackend.backend,

1070+

env: params.env,

1071+

captureKey: params.mcpCaptureKey,

10981072

});

1073+

let managedRun: ManagedRun;

1074+

try {

1075+

managedRun = await params.supervisor.spawn({

1076+

sessionId: params.context.params.sessionId,

1077+

backendId: params.context.backendResolved.id,

1078+

scopeKey: `claude-live:${params.key}`,

1079+

replaceExistingScope: true,

1080+

mode: "child",

1081+

argv: params.argv,

1082+

cwd: params.context.cwd ?? params.context.workspaceDir,

1083+

env: mcpCaptureAttempt.env ?? params.env,

1084+

stdinMode: "pipe-open",

1085+

captureOutput: false,

1086+

onStdout: (chunk) => {

1087+

if (session) {

1088+

handleClaudeStdout(session, chunk);

1089+

}

1090+

},

1091+

onStderr: (chunk) => {

1092+

if (session) {

1093+

session.stderr += chunk;

1094+

if (session.stderr.length > CLAUDE_LIVE_MAX_STDERR_CHARS) {

1095+

closeLiveSession(

1096+

session,

1097+

"abort",

1098+

createOutputLimitError(session, "Claude CLI stderr exceeded limit."),

1099+

);

1100+

return;

1101+

}

1102+

resetNoOutputTimer(session);

1103+

}

1104+

},

1105+

});

1106+

} catch (error) {

1107+

await mcpCaptureAttempt.cleanup?.();

1108+

throw error;

1109+

}

10991110

session = {

11001111

key: params.key,

11011112

fingerprint: params.fingerprint,

@@ -1109,7 +1120,10 @@ async function createClaudeLiveSession(params: {

11091120

drainTimer: null,

11101121

drainingAbortedTurn: false,

11111122

idleTimer: null,

1112-

cleanup: params.cleanup,

1123+

cleanup: async () => {

1124+

await mcpCaptureAttempt.cleanup?.();

1125+

await params.cleanup();

1126+

},

11131127

cleanupPromise: null,

11141128

closing: false,

11151129

mcpCaptureKey: params.mcpCaptureKey,