Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
fix(w15): integration fixes across groups: frontmatter-keys sweep reads managed mode fail-closed (#6482), halt-reasons stub answers the mode read, list_skills limit text keeps the starter list under 25,000 chars
garrytan1bdf40fc8f46
diff --git a/src/core/operation-manifest.generated.ts b/src/core/operation-manifest.generated.tsindex 67dfb16887..4ffff38307 100644--- a/src/core/operation-manifest.generated.ts+++ b/src/core/operation-manifest.generated.ts@@ -2081,7 +2081,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [},"limit": {"type": "number",- "description": "Page size or ranked count (1-100)."+ "description": "Page size or rank cap (1-100)."},"cursor": {"type": "string",diff --git a/src/core/ops/skills-catalog.ts b/src/core/ops/skills-catalog.tsindex 28f82ec217..a627530d15 100644--- a/src/core/ops/skills-catalog.ts+++ b/src/core/ops/skills-catalog.ts@@ -30,7 +30,7 @@ const list_skills: Operation = {publishGateKey: 'mcp.publish_skills',params: {schema_version: { type: 'number', description: '2 for the source-qualified catalog.' },- limit: { type: 'number', description: 'Page size or ranked count (1-100).' },+ limit: { type: 'number', description: 'Page size or rank cap (1-100).' },cursor: { type: 'string', description: 'Version 2 cursor.' },source_id: { type: 'string', description: 'Version 2: one source.' },section: {diff --git a/src/core/repair/frontmatter-keys.ts b/src/core/repair/frontmatter-keys.tsindex 14f64e9b42..8380973e6d 100644--- a/src/core/repair/frontmatter-keys.ts+++ b/src/core/repair/frontmatter-keys.ts@@ -17,6 +17,7 @@ import type { BrainEngine } from '../engine.ts';import { OperationError } from '../ops/contract.ts';import { maintenanceAttribution } from '../persistence/attribution.ts';import { withCoordinatedWrite } from '../persistence/context.ts';+import { readManagedMode } from '../persistence/managed-mode.ts';import { clearApprovedSet, loadApprovedSet, previewChangedError, previewHash, saveApprovedSet } from '../persistence/preview-approval.ts';import { afterCursor, type RepairHandler, type RepairItem, type RepairItemOutcome, type RepairPlan, type RepairScope } from './core.ts';@@ -97,12 +98,12 @@ export const frontmatterKeysRepair: RepairHandler = {async apply(ctx, entry): Promise<RepairItemOutcome> {const { batch, hash, last } = entry as BatchItem;const stripped = await ctx.engine.transaction(async tx => {- const [brain] = await tx.executeRaw<{ enabled: boolean }>('SELECT enabled FROM persistence_brain WHERE singleton=1');+ const managed = await readManagedMode(tx, { refusal: { subject: 'repair frontmatter-keys' } });const strip = async () => {await tx.lockPageKeys(batch.rows.map(row => ({ sourceId: batch.source_id, slug: row.slug })));return tx.stripStaleFrontmatterKeys({ sourceId: batch.source_id, ids: batch.rows.map(row => row.id) });};- return brain?.enabled ? withCoordinatedWrite(tx, [batch.source_id], strip, await maintenanceAttribution(tx)) : strip();+ return managed ? withCoordinatedWrite(tx, [batch.source_id], strip, await maintenanceAttribution(tx)) : strip();});if (last) await clearApprovedSet(ctx.engine, { command: 'frontmatter-keys', hash });return stripped > 0 ? { applied: true, outcome: 'stripped', reason: `${stripped} of ${batch.rows.length} page(s)`, detail: { pages: stripped } }diff --git a/test/extract-rollup-halt-reasons-5495.test.ts b/test/extract-rollup-halt-reasons-5495.test.tsindex e8682e5129..920010e172 100644--- a/test/extract-rollup-halt-reasons-5495.test.ts+++ b/test/extract-rollup-halt-reasons-5495.test.ts@@ -190,6 +190,7 @@ test('extract_atoms records a credentials abort as provider_auth; extract_factsasync executeRaw(sql: string, params: unknown[] = []) {calls.push({ sql: sql.replace(/\s+/g, ' '), params });if (/COUNT\(\*\) AS n/.test(sql)) return [{ n: '3' }];+ if (sql.includes('FROM persistence_brain')) return [{ enabled: false }];return [];},async getAllSlugs() { return []; }, async getPage() { return null; },diff --git a/test/fixtures/goldens/cli/tools-json.json b/test/fixtures/goldens/cli/tools-json.jsonindex b0f25df4a5..c516012960 100644--- a/test/fixtures/goldens/cli/tools-json.json+++ b/test/fixtures/goldens/cli/tools-json.json@@ -2,8 +2,8 @@"golden": {"exitCode": 0,"stderr": "",- "stdoutBytes": 231144,- "stdoutSha256": "ad06c7c7bf057d364d0eba396ecab9ef15c3ef440fd2256d5f9887a7eb6afa5a",+ "stdoutBytes": 231140,+ "stdoutSha256": "bb979a78c5e89bb88016cc8af97c2215136976a11b8fdba6de37d572d83dc54d","toolNames": ["remember","entity",@@ -2526,7 +2526,7 @@"type": "string"},"limit": {- "description": "Page size or ranked count (1-100).",+ "description": "Page size or rank cap (1-100).","type": "number"},"query": {