Context
RuntimeLogger exposes an optional level property, and ConsoleRuntimeLogger honors a minimum level via shouldLog() (see src/logger/runtime-logger.ts). InMemoryRuntimeLogger only supports maxEntries and records every call regardless of severity, so consumers using it as the injected logger for an AgentRuntime (as many tests and harnesses do) cannot filter debug noise from info/error entries.
Proposed Change
Add a level option to InMemoryRuntimeLoggerOptions, store the minimum level, and skip entries below it so the two shipped logger implementations behave consistently.
Acceptance Criteria
- A unit test constructs
new InMemoryRuntimeLogger({ level: "warn" }), logs debug/info/warn/error, and asserts only warn and error entries are recorded.
- Default construction (no options) still records all levels so existing tests pass unchanged.
logger.size() reflects only retained entries after filtering.
- Behavior is documented on the options interface alongside
maxEntries.
Suggested Label
enhancement
ETA: 24 hours
Context
RuntimeLoggerexposes an optionallevelproperty, andConsoleRuntimeLoggerhonors a minimum level viashouldLog()(seesrc/logger/runtime-logger.ts).InMemoryRuntimeLoggeronly supportsmaxEntriesand records every call regardless of severity, so consumers using it as the injected logger for anAgentRuntime(as many tests and harnesses do) cannot filter debug noise from info/error entries.Proposed Change
Add a
leveloption toInMemoryRuntimeLoggerOptions, store the minimum level, and skip entries below it so the two shipped logger implementations behave consistently.Acceptance Criteria
new InMemoryRuntimeLogger({ level: "warn" }), logs debug/info/warn/error, and asserts only warn and error entries are recorded.logger.size()reflects only retained entries after filtering.maxEntries.Suggested Label
enhancement
ETA: 24 hours