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

推荐订阅源

博客园_首页
J
Java Code Geeks
博客园 - 聂微东
量子位
C
Check Point Blog
T
The Blog of Author Tim Ferriss
T
Tailwind CSS Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
B
Blog
罗磊的独立博客
腾讯CDC
GbyAI
GbyAI
博客园 - 【当耐特】
A
About on SuperTechFans
M
MIT News - Artificial intelligence
U
Unit 42
D
Docker
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Y
Y Combinator Blog
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
S
SegmentFault 最新的问题
有赞技术团队
有赞技术团队

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
refactor(acp): reuse shared error normalization · opencla...
vincentkoc · 2026-06-22 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

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

77

} from "@openclaw/acp-core/runtime/types";

88

import type { OpenClawConfig } from "../../config/types.openclaw.js";

99

import { logVerbose } from "../../globals.js";

10+

import { toErrorObject } from "../../infra/errors.js";

1011

import { isAcpSessionKey } from "../../sessions/session-key-utils.js";

1112

import { AcpRuntimeError } from "../runtime/errors.js";

1213

import { runManagerCancelSession } from "./manager.cancel-session.js";

@@ -584,7 +585,7 @@ export class AcpSessionManager {

584585

}

585586

settled = true;

586587

cleanup();

587-

reject(toLintErrorObject(error, "Non-Error rejection"));

588+

reject(toErrorObject(error, "Non-Error rejection"));

588589

};

589590

const onAbort = () => {

590591

if (actorStarted) {

@@ -612,17 +613,3 @@ export class AcpSessionManager {

612613

throw new AcpRuntimeError("ACP_TURN_FAILED", "ACP operation aborted.");

613614

}

614615

}

615-
616-

function toLintErrorObject(value: unknown, fallbackMessage: string): Error {

617-

if (value instanceof Error) {

618-

return value;

619-

}

620-

if (typeof value === "string") {

621-

return new Error(value);

622-

}

623-

const error = new Error(fallbackMessage, { cause: value });

624-

if ((typeof value === "object" && value !== null) || typeof value === "function") {

625-

Object.assign(error, value);

626-

}

627-

return error;

628-

}

Original file line numberDiff line numberDiff line change

@@ -3,7 +3,7 @@ import { resolveSessionIdentityFromMeta } from "@openclaw/acp-core/runtime/sessi

33

import type { AcpRuntime } from "@openclaw/acp-core/runtime/types";

44

import type { OpenClawConfig } from "../../config/types.openclaw.js";

55

import { logVerbose } from "../../globals.js";

6-

import { formatErrorMessage } from "../../infra/errors.js";

6+

import { formatErrorMessage, toErrorObject } from "../../infra/errors.js";

77

import type { AcpRuntimeError } from "../runtime/errors.js";

88

import type { ManagerRuntimeHandleCache } from "./manager.runtime-handle-cache.js";

99

import type {

@@ -188,7 +188,7 @@ export async function tryPrepareFreshManagerRuntimeSession(params: {

188188

const backend = params.deps.getRuntimeBackend(configuredBackend || undefined);

189189

if (!backend) {

190190

if (params.missingBackendError) {

191-

throw toLintErrorObject(params.missingBackendError, "Non-Error thrown");

191+

throw toErrorObject(params.missingBackendError, "Non-Error thrown");

192192

}

193193

return;

194194

}

@@ -201,17 +201,3 @@ export async function tryPrepareFreshManagerRuntimeSession(params: {

201201

);

202202

}

203203

}

204-
205-

function toLintErrorObject(value: unknown, fallbackMessage: string): Error {

206-

if (value instanceof Error) {

207-

return value;

208-

}

209-

if (typeof value === "string") {

210-

return new Error(value);

211-

}

212-

const error = new Error(fallbackMessage, { cause: value });

213-

if ((typeof value === "object" && value !== null) || typeof value === "function") {

214-

Object.assign(error, value);

215-

}

216-

return error;

217-

}

Original file line numberDiff line numberDiff line change

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

77

} from "../../config/sessions/main-session.js";

88

import type { SessionAcpMeta } from "../../config/sessions/types.js";

99

import type { OpenClawConfig } from "../../config/types.openclaw.js";

10+

import { toErrorObject } from "../../infra/errors.js";

1011

import {

1112

normalizeAgentId,

1213

normalizeMainKey,

@@ -49,7 +50,7 @@ export function requireReadySessionMeta(resolution: AcpSessionResolution): Sessi

4950

if (resolution.kind === "ready") {

5051

return resolution.meta;

5152

}

52-

throw toLintErrorObject(resolveAcpSessionResolutionError(resolution), "Non-Error thrown");

53+

throw toErrorObject(resolveAcpSessionResolutionError(resolution), "Non-Error thrown");

5354

}

5455
5556

function normalizeSessionKey(sessionKey: string): string {

@@ -129,17 +130,3 @@ export function hasLegacyAcpIdentityProjection(meta: SessionAcpMeta): boolean {

129130

Object.hasOwn(raw, "sessionIdsProvisional")

130131

);

131132

}

132-
133-

function toLintErrorObject(value: unknown, fallbackMessage: string): Error {

134-

if (value instanceof Error) {

135-

return value;

136-

}

137-

if (typeof value === "string") {

138-

return new Error(value);

139-

}

140-

const error = new Error(fallbackMessage, { cause: value });

141-

if ((typeof value === "object" && value !== null) || typeof value === "function") {

142-

Object.assign(error, value);

143-

}

144-

return error;

145-

}