Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
Merge commit 'refs/lane3/docs' into capy/large-pages-policy
garrytan7ffcccff0196
diff --cc src/core/persistence/import-prepare.tsindex c132120714,e2995b6b54..110137d019--- a/src/core/persistence/import-prepare.ts+++ b/src/core/persistence/import-prepare.ts@@@ -51,9 -51,9 +51,9 @@@ export function readImportBytes(path: sthrow opError('source_changed', 'Managed import refuses symlinked files or ancestors. Use the real source path.',`${path} is a symlink or sits under one, so it was not imported. Import the file at its real location (or copy it into the source) instead.`);}- const maxBytes = isImageFilePath(path) ? MAX_IMAGE_BYTES : MAX_FILE_SIZE;+ const maxBytes = isImageFilePath(path) ? MAX_IMAGE_BYTES : importSizeLimit(path);if (lstatSync(path).size > maxBytes) throw opError('invalid_params', `File too large (max ${maxBytes} bytes).`,- `${basename(path)} is over the ${maxBytes}-byte import limit and was not imported. Split it into smaller files or leave it out of the import.`);+ `${basename(path)} is over the ${maxBytes}-byte import limit and was not imported. Files under the limit import normally; leave this one out of the import, or split it into files under the limit.`);return readFileSync(path);}diff --cc test/import-screen.test.tsindex 7e2edb88f2,5856dc5ca4..8493bdb4f9--- a/test/import-screen.test.ts+++ b/test/import-screen.test.ts@@@ -14,10 -14,9 +14,10 @@@ import { tmpdir } from 'node:os'import { join } from 'node:path';import type { BrainEngine } from '../src/core/engine.ts';import { importFromContent, MAX_FILE_SIZE } from '../src/core/import-file.ts';- import { isContentRefusal, screenImportContent, type ImportSanityConfig } from '../src/core/import-screen.ts';+ import { contentRefusalFromReceipt, isContentRefusal, screenImportContent, type ImportSanityConfig } from '../src/core/import-screen.ts';import { managedImportContent, readImportBytes } from '../src/core/persistence/import-prepare.ts';import { readSyncFile } from '../src/core/persistence/sync-discovery.ts';+import { SYNC_READ_BOUND } from '../src/core/persistence/sync-blobs.ts';import { frontmatterSlugConflictMessage } from '../src/core/persistence/verb-errors.ts';import { OperationError } from '../src/core/ops/contract.ts';