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

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
Jina AI
Jina AI
C
Check Point Blog
V
V2EX
H
Help Net Security
Microsoft Azure Blog
Microsoft Azure Blog
P
Proofpoint News Feed
A
About on SuperTechFans
D
DataBreaches.Net
腾讯CDC
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
IT之家
IT之家
WordPress大学
WordPress大学
人人都是产品经理
人人都是产品经理
T
The Blog of Author Tim Ferriss
Recent Announcements
Recent Announcements
Google DeepMind News
Google DeepMind News
云风的 BLOG
云风的 BLOG
MongoDB | Blog
MongoDB | Blog
J
Java Code Geeks
博客园_首页
T
Tailwind CSS Blog
M
MIT News - Artificial intelligence
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

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: keep tool detail redaction canonical · openclaw/open...
steipete · 2026-06-01 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -3,7 +3,7 @@ import {

33

normalizeOptionalString,

44

} from "@openclaw/normalization-core/string-coerce";

55

import { parseStrictFiniteNumber } from "../infra/parse-finite-number.js";

6-

import { redactToolDetail } from "../logging/redact.js";

6+

import { redactToolPayloadText } from "../logging/redact.js";

77

import { resolveExecDetail, type ToolDetailMode } from "./tool-display-exec.js";

88

import { asRecord } from "./tool-display-record.js";

99

@@ -121,7 +121,7 @@ function coerceDisplayValue(

121121

if (!rawLine) {

122122

return undefined;

123123

}

124-

const firstLine = redactToolDetail(rawLine);

124+

const firstLine = redactToolPayloadText(rawLine);

125125

if (firstLine.length > maxStringChars) {

126126

const half = Math.floor((maxStringChars - 1) / 2);

127127

return `${firstLine.slice(0, half)}${firstLine.slice(-(maxStringChars - 1 - half))}`;

Original file line numberDiff line numberDiff line change

@@ -1,4 +1,4 @@

1-

import { redactToolDetail } from "../logging/redact.js";

1+

import { redactToolPayloadText } from "../logging/redact.js";

22

import {

33

binaryName,

44

firstPositional,

@@ -427,7 +427,7 @@ function isGenericSummary(summary: string): boolean {

427427

}

428428
429429

function compactRawCommand(raw: string, maxLength = 120): string {

430-

const oneLine = redactToolDetail(

430+

const oneLine = redactToolPayloadText(

431431

raw

432432

.replace(/\s*\n\s*/g, " ")

433433

.replace(/\s{2,}/g, " ")

Original file line numberDiff line numberDiff line change

@@ -532,6 +532,15 @@ describe("compactRawCommand middle truncation", () => {

532532

// The sk- prefixed token must be redacted (masked) before truncation

533533

expect(result).not.toContain("ABCDEFGHIJKLMNOP1234567890abcdefghij");

534534

});

535+
536+

it("uses the canonical tool payload redactor before compacting raw commands", () => {

537+

const longCommand =

538+

"/opt/custom/bin/deploy --aws-key AKIDABCDEFGHIJKLMNOP1234567890 --output /data/results/deploy-output.json";

539+

const result = resolveExecDetail({ command: longCommand });

540+
541+

expect(result).not.toContain("AKIDABCDEFGHIJKLMNOP1234567890");

542+

expect(result).toContain("AKIDAB…7890");

543+

});

535544

});

536545
537546

describe("coerceDisplayValue middle truncation", () => {

@@ -582,4 +591,20 @@ describe("coerceDisplayValue middle truncation", () => {

582591

// The ghp_ token must be redacted before truncation

583592

expect(detail).not.toContain("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnop");

584593

});

594+
595+

it("uses the canonical tool payload redactor before compacting string details", () => {

596+

const longValue =

597+

"Deploying with AWS key AKIDABCDEFGHIJKLMNOP1234567890 and " +

598+

"x".repeat(200) +

599+

" final-step";

600+

const detail = formatToolDetail(

601+

resolveToolDisplay({

602+

name: "sessions_spawn",

603+

args: { task: longValue },

604+

}),

605+

);

606+
607+

expect(detail).not.toContain("AKIDABCDEFGHIJKLMNOP1234567890");

608+

expect(detail).toContain("AKIDAB…7890");

609+

});

585610

});

Original file line numberDiff line numberDiff line change

@@ -1,7 +1,11 @@

1-

import type { UpdateAvailable } from "../infra/update-startup.js";

2-
31

export const GATEWAY_EVENT_UPDATE_AVAILABLE = "update.available" as const;

42
3+

export type UpdateAvailableEventData = {

4+

currentVersion: string;

5+

latestVersion: string;

6+

channel: string;

7+

};

8+
59

export type GatewayUpdateAvailableEventPayload = {

6-

updateAvailable: UpdateAvailable | null;

10+

updateAvailable: UpdateAvailableEventData | null;

711

};

Original file line numberDiff line numberDiff line change

@@ -1,5 +1,5 @@

11

import { describe, expect, it } from "vitest";

2-

import { redactToolDetail } from "./browser-redact.ts";

2+

import { redactToolDetail, redactToolPayloadText } from "./browser-redact.ts";

33
44

describe("browser tool detail redaction", () => {

55

it("redacts tool detail credential families without Node config imports", () => {

@@ -29,4 +29,10 @@ describe("browser tool detail redaction", () => {

2929

expect(redacted).not.toContain("abc123");

3030

expect(redacted).not.toContain("verySensitiveCookieValue");

3131

});

32+
33+

it("exposes the tool payload redaction name used by shared display modules", () => {

34+

expect(redactToolPayloadText("OPENAI_API_KEY=sk-1234567890abcdef")).toBe(

35+

"OPENAI_API_KEY=sk-123...cdef",

36+

);

37+

});

3238

});

Original file line numberDiff line numberDiff line change

@@ -74,3 +74,5 @@ export function redactToolDetail(detail: string): string {

7474

}

7575

return redacted;

7676

}

77+
78+

export const redactToolPayloadText = redactToolDetail;