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

推荐订阅源

Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
Vercel News
Vercel News
D
DataBreaches.Net
MongoDB | Blog
MongoDB | Blog
H
Help Net Security
小众软件
小众软件
美团技术团队
T
The Blog of Author Tim Ferriss
爱范儿
爱范儿
D
Docker
Martin Fowler
Martin Fowler
大猫的无限游戏
大猫的无限游戏
博客园 - 聂微东
Blog — PlanetScale
Blog — PlanetScale
H
Hackread – Cybersecurity News, Data Breaches, AI and More
罗磊的独立博客
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
S
SegmentFault 最新的问题
云风的 BLOG
云风的 BLOG
B
Blog
雷峰网
雷峰网
The Cloudflare 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
fix: lint centralized skills subsystem · openclaw/opencla...
shakkernerd · 2026-05-30 · via Recent Commits to openclaw:main

@@ -65,12 +65,14 @@ function resolveCompactHomePrefixes(): string[] {

6565

const realHomes = resolvedHomes

6666

.map((home) => tryRealpath(home))

6767

.filter((home): home is string => !!home);

68-

return uniqueStrings([...resolvedHomes, ...realHomes]).sort((a, b) => b.length - a.length);

68+

return uniqueStrings([...resolvedHomes, ...realHomes]).toSorted((a, b) => b.length - a.length);

6969

}

70707171

function compactSkillPaths(skills: Skill[]): Skill[] {

7272

const homes = resolveCompactHomePrefixes();

73-

if (homes.length === 0) return skills;

73+

if (homes.length === 0) {

74+

return skills;

75+

}

7476

return skills.map((s) => ({

7577

...s,

7678

filePath: compactHomePath(s.filePath, homes),

@@ -106,12 +108,12 @@ function compactPathForConsoleMessage(filePath: string): string {

106108107109

function isSkillVisibleInAvailableSkillsPrompt(entry: SkillEntry): boolean {

108110

if (entry.exposure) {

109-

return entry.exposure.includeInAvailableSkillsPrompt !== false;

111+

return entry.exposure.includeInAvailableSkillsPrompt ?? true;

110112

}

111113

if (entry.invocation) {

112-

return entry.invocation.disableModelInvocation !== true;

114+

return !entry.invocation.disableModelInvocation;

113115

}

114-

return entry.skill.disableModelInvocation !== true;

116+

return !entry.skill.disableModelInvocation;

115117

}

116118117119

function filterSkillEntries(

@@ -839,8 +841,7 @@ function loadGeneratedPluginSkillRecords(params: {

839841840842

if (loadedSkills.length > maxSkillsLoadedPerSource) {

841843

return loadedSkills

842-

.slice()

843-

.sort((a, b) => a.skill.name.localeCompare(b.skill.name, "en"))

844+

.toSorted((a, b) => a.skill.name.localeCompare(b.skill.name, "en"))

844845

.slice(0, maxSkillsLoadedPerSource);

845846

}

846847

return loadedSkills;

@@ -1107,8 +1108,7 @@ function loadSkillEntries(

1107110811081109

if (loadedSkills.length > maxSkillsLoadedPerSource) {

11091110

return loadedSkills

1110-

.slice()

1111-

.sort((a, b) => a.skill.name.localeCompare(b.skill.name, "en"))

1111+

.toSorted((a, b) => a.skill.name.localeCompare(b.skill.name, "en"))

11121112

.slice(0, maxSkillsLoadedPerSource);

11131113

}

11141114

@@ -1193,7 +1193,7 @@ function loadSkillEntries(

11931193

}

1194119411951195

const skillEntries: SkillEntry[] = Array.from(merged.values())

1196-

.sort((a, b) => a.skill.name.localeCompare(b.skill.name, "en"))

1196+

.toSorted((a, b) => a.skill.name.localeCompare(b.skill.name, "en"))

11971197

.map((record) => {

11981198

const skill = record.skill;

11991199

const frontmatter =

@@ -1205,22 +1205,27 @@ function loadSkillEntries(

12051205

}) ??

12061206

({} as ParsedSkillFrontmatter);

12071207

const invocation = resolveSkillInvocationPolicy(frontmatter);

1208-

return {

1208+

const entry: SkillEntry = {

12091209

skill,

12101210

frontmatter,

12111211

metadata: resolveSkillEntryMetadata({ frontmatter, skillDir: skill.baseDir }),

12121212

invocation,

1213-

...(record.syncSourceDir !== undefined ? { syncSourceDir: record.syncSourceDir } : {}),

1214-

...(record.syncDirName !== undefined ? { syncDirName: record.syncDirName } : {}),

12151213

exposure: {

12161214

includeInRuntimeRegistry: true,

12171215

// Freshly loaded entries preserve the documented disable-model-invocation

12181216

// contract, while legacy entries without exposure metadata still use the

12191217

// fallback in isSkillVisibleInAvailableSkillsPrompt().

1220-

includeInAvailableSkillsPrompt: invocation.disableModelInvocation !== true,

1221-

userInvocable: invocation.userInvocable !== false,

1218+

includeInAvailableSkillsPrompt: !invocation.disableModelInvocation,

1219+

userInvocable: invocation.userInvocable ?? true,

12221220

},

12231221

};

1222+

if (record.syncSourceDir !== undefined) {

1223+

entry.syncSourceDir = record.syncSourceDir;

1224+

}

1225+

if (record.syncDirName !== undefined) {

1226+

entry.syncDirName = record.syncDirName;

1227+

}

1228+

return entry;

12241229

});

12251230

return skillEntries;

12261231

}

@@ -1240,7 +1245,9 @@ function escapeXml(str: string): string {

12401245

* preserving awareness of all skills before resorting to dropping.

12411246

*/

12421247

export function formatSkillsCompact(skills: Skill[]): string {

1243-

if (skills.length === 0) return "";

1248+

if (skills.length === 0) {

1249+

return "";

1250+

}

12441251

const lines = [

12451252

"\n\nThe following skills provide specialized instructions for specific tasks.",

12461253

"Use the read tool to load a skill's file when the task matches its name.",

@@ -1392,9 +1399,9 @@ function resolveWorkspaceSkillPromptState(

13921399

// Budget checks and final render both use this same representation so the

13931400

// tier decision is based on the exact strings that end up in the prompt.

13941401

// resolvedSkills keeps canonical paths for snapshot / runtime consumers.

1395-

const promptSkills = compactSkillPaths(resolvedSkills)

1396-

.slice()

1397-

.sort((a, b) => a.name.localeCompare(b.name, "en"));

1402+

const promptSkills = compactSkillPaths(resolvedSkills).toSorted((a, b) =>

1403+

a.name.localeCompare(b.name, "en"),

1404+

);

13981405

const { skillsForPrompt, truncated, compact } = applySkillsPromptLimits({

13991406

skills: promptSkills,

14001407

config: opts?.config,