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

推荐订阅源

WordPress大学
WordPress大学
The Cloudflare Blog
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
V
Visual Studio Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 司徒正美
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
酷 壳 – CoolShell
酷 壳 – CoolShell
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
The GitHub Blog
The GitHub Blog
L
LangChain Blog
D
DataBreaches.Net
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
博客园 - Franky
阮一峰的网络日志
阮一峰的网络日志
GbyAI
GbyAI
Apple Machine Learning Research
Apple Machine Learning Research
宝玉的分享
宝玉的分享
Engineering at Meta
Engineering at Meta
V
V2EX
MyScale Blog
MyScale Blog

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(records): reuse canonical object guard · opencla...
vincentkoc · 2026-06-23 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

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

1+

import { isRecord } from "@openclaw/normalization-core/record-coerce";

12

import { projectRuntimeToolInputSchema } from "./tool-schema-json-projection.js";

23
34

type AnthropicToolDescriptor = {

@@ -33,10 +34,6 @@ export type AnthropicProjectedToolChoice =

3334

| { readonly type: "none" }

3435

| ({ readonly type: "tool"; readonly name: string } & AnthropicParallelToolChoice);

3536
36-

function isRecord(value: unknown): value is Record<string, unknown> {

37-

return Boolean(value) && typeof value === "object" && !Array.isArray(value);

38-

}

39-
4037

function isProviderSupportedViolation(violation: string): boolean {

4138

return violation.endsWith(".$dynamicRef") || violation.endsWith(".$dynamicAnchor");

4239

}

Original file line numberDiff line numberDiff line change

@@ -2,6 +2,7 @@

22

* Claude CLI argument helpers for OpenClaw-managed bundle MCP config.

33

*/

44

import fs from "node:fs/promises";

5+

import { isRecord } from "@openclaw/normalization-core/record-coerce";

56

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

67
78

/** Find an existing Claude `--mcp-config` argument value. */

@@ -45,10 +46,6 @@ export function injectClaudeMcpConfigArgs(

4546

return next;

4647

}

4748
48-

function isRecord(value: unknown): value is Record<string, unknown> {

49-

return typeof value === "object" && value !== null && !Array.isArray(value);

50-

}

51-
5249

/** Writes the active per-attempt capture token into OpenClaw's generated Claude MCP config. */

5350

export async function writeClaudeMcpCaptureConfig(params: {

5451

mcpConfigPath: string;

Original file line numberDiff line numberDiff line change

@@ -2,6 +2,7 @@

22

* Manages reusable Claude CLI stdio sessions for CLI-backed agent turns.

33

*/

44

import crypto from "node:crypto";

5+

import { isRecord } from "@openclaw/normalization-core/record-coerce";

56

import type { ReplyBackendHandle } from "../../auto-reply/reply/reply-run-registry.js";

67

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

78

import {

@@ -731,10 +732,6 @@ function parseSessionId(parsed: Record<string, unknown>): string | undefined {

731732

return sessionId || undefined;

732733

}

733734
734-

function isRecord(value: unknown): value is Record<string, unknown> {

735-

return Boolean(value && typeof value === "object" && !Array.isArray(value));

736-

}

737-
738735

function normalizePositiveInt(

739736

value: number | undefined,

740737

fallback: number,

Original file line numberDiff line numberDiff line change

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

1+

import { isRecord } from "@openclaw/normalization-core/record-coerce";

12

/**

23

* Emits diagnostic model-call events around embedded-agent stream functions.

34

*/

@@ -107,10 +108,6 @@ function assignRequestPayloadBytes(state: ModelCallObservationState, payload: un

107108

}

108109

}

109110
110-

function isRecord(value: unknown): value is Record<string, unknown> {

111-

return Boolean(value) && typeof value === "object" && !Array.isArray(value);

112-

}

113-
114111

function utf8StringByteLength(value: string): number {

115112

return Buffer.byteLength(value, "utf8");

116113

}

Original file line numberDiff line numberDiff line change

@@ -2,6 +2,7 @@

22

* Prepares session managers and transcript state before embedded runs.

33

*/

44

import fs from "node:fs/promises";

5+

import { isRecord } from "@openclaw/normalization-core/record-coerce";

56

import { serializeJsonlLine, writeJsonlLines } from "../../config/sessions/transcript-jsonl.js";

67

import { invalidateSessionFileRepairCache } from "../session-file-repair.js";

78

@@ -13,10 +14,6 @@ type SessionHeaderEntry = {

1314

};

1415

type SessionMessageEntry = { type: "message"; message?: { role?: string } };

1516
16-

function isRecord(value: unknown): value is Record<string, unknown> {

17-

return typeof value === "object" && value !== null && !Array.isArray(value);

18-

}

19-
2017

async function assertExistingHeaderIsReadable(sessionFile: string): Promise<void> {

2118

const content = await fs.readFile(sessionFile, "utf-8");

2219

const firstLine = content.split("\n").find((line) => line.trim());

Original file line numberDiff line numberDiff line change

@@ -4,6 +4,7 @@

44

import { randomUUID } from "node:crypto";

55

import fs from "node:fs/promises";

66

import path from "node:path";

7+

import { isRecord } from "@openclaw/normalization-core/record-coerce";

78

import { isSessionTranscriptSideAppendEntry } from "../../config/sessions/transcript-tree.js";

89

import { CURRENT_SESSION_VERSION } from "../../config/sessions/version.js";

910

import { appendRegularFile } from "../../infra/fs-safe.js";

@@ -65,10 +66,6 @@ const repairableToolCallContentTypes = new Set([

6566
6667

const invalidJsonlSlotType = "__openclaw_invalid_jsonl_slot";

6768
68-

function isRecord(value: unknown): value is Record<string, unknown> {

69-

return Boolean(value) && typeof value === "object" && !Array.isArray(value);

70-

}

71-
7269

function isString(value: unknown): value is string {

7370

return typeof value === "string" && value.trim() !== "";

7471

}