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

推荐订阅源

月光博客
月光博客
小众软件
小众软件
爱范儿
爱范儿
Y
Y Combinator Blog
博客园 - Franky
美团技术团队
博客园 - 【当耐特】
The Cloudflare Blog
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
Jina AI
Jina AI
IT之家
IT之家
人人都是产品经理
人人都是产品经理
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
WordPress大学
WordPress大学
V
Visual Studio Blog
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
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
perf(gateway): defer startup warning fallback imports · o...
steipete · 2026-05-27 · via Recent Commits to openclaw:main

@@ -1,112 +1,20 @@

11

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

2-

import {

3-

normalizeSortedUniqueStringEntries,

4-

normalizeStringEntries,

5-

} from "../shared/string-normalization.js";

6-

import { isRecord } from "../utils.js";

2+

import { normalizeSortedUniqueStringEntries } from "../shared/string-normalization.js";

73

import { discoverOpenClawPlugins, type PluginDiscoveryResult } from "./discovery.js";

84

import { loadPluginManifestRegistry } from "./manifest-registry.js";

95

import type { PluginManifestConfigContracts } from "./manifest.js";

106

import type { PluginOrigin } from "./plugin-origin.types.js";

117

import { loadPluginManifestRegistryForPluginRegistry } from "./plugin-registry.js";

12-13-

export type PluginConfigContractMatch = {

14-

path: string;

15-

value: unknown;

16-

};

8+

export {

9+

collectPluginConfigContractMatches,

10+

type PluginConfigContractMatch,

11+

} from "./config-contract-matches.js";

17121813

export type PluginConfigContractMetadata = {

1914

origin: PluginOrigin;

2015

configContracts: PluginManifestConfigContracts;

2116

};

221723-

type TraversalState = {

24-

segments: string[];

25-

value: unknown;

26-

};

27-28-

function normalizePathPattern(pathPattern: string): string[] {

29-

return normalizeStringEntries(pathPattern.split("."));

30-

}

31-32-

function appendPathSegment(path: string, segment: string): string {

33-

if (!path) {

34-

return segment;

35-

}

36-

return /^\d+$/.test(segment) ? `${path}[${segment}]` : `${path}.${segment}`;

37-

}

38-39-

function parseCanonicalArrayIndex(segment: string, length: number): number | null {

40-

if (!/^(0|[1-9]\d*)$/.test(segment)) {

41-

return null;

42-

}

43-

const index = Number(segment);

44-

return Number.isSafeInteger(index) && index >= 0 && index < length ? index : null;

45-

}

46-47-

export function collectPluginConfigContractMatches(params: {

48-

root: unknown;

49-

pathPattern: string;

50-

}): PluginConfigContractMatch[] {

51-

const pattern = normalizePathPattern(params.pathPattern);

52-

if (pattern.length === 0) {

53-

return [];

54-

}

55-56-

let states: TraversalState[] = [{ segments: [], value: params.root }];

57-

for (const segment of pattern) {

58-

const nextStates: TraversalState[] = [];

59-

for (const state of states) {

60-

if (segment === "*") {

61-

if (Array.isArray(state.value)) {

62-

for (const [index, value] of state.value.entries()) {

63-

nextStates.push({

64-

segments: [...state.segments, String(index)],

65-

value,

66-

});

67-

}

68-

continue;

69-

}

70-

if (isRecord(state.value)) {

71-

for (const [key, value] of Object.entries(state.value)) {

72-

nextStates.push({

73-

segments: [...state.segments, key],

74-

value,

75-

});

76-

}

77-

}

78-

continue;

79-

}

80-

if (Array.isArray(state.value)) {

81-

const index = parseCanonicalArrayIndex(segment, state.value.length);

82-

if (index !== null) {

83-

nextStates.push({

84-

segments: [...state.segments, segment],

85-

value: state.value[index],

86-

});

87-

}

88-

continue;

89-

}

90-

if (!isRecord(state.value) || !Object.prototype.hasOwnProperty.call(state.value, segment)) {

91-

continue;

92-

}

93-

nextStates.push({

94-

segments: [...state.segments, segment],

95-

value: state.value[segment],

96-

});

97-

}

98-

states = nextStates;

99-

if (states.length === 0) {

100-

break;

101-

}

102-

}

103-104-

return states.map((state) => ({

105-

path: state.segments.reduce(appendPathSegment, ""),

106-

value: state.value,

107-

}));

108-

}

109-11018

export function resolvePluginConfigContractsById(params: {

11119

config?: OpenClawConfig;

11220

workspaceDir?: string;