openclaw/src/hooks
Tomas Hajek 19ae7a4e17 fix(session-memory): fallback to rotated transcript after /new
When /new rotates <session>.jsonl to <session>.jsonl.reset.*, the session-memory hook may read an empty active transcript and write header-only memory entries.

Add fallback logic to read the latest .jsonl.reset.* sibling when the primary file has no usable content.

Also add a unit test covering the rotated transcript path.

Fixes #18088
Refs #17563
2026-02-16 23:49:41 +01:00
..
bundled fix(session-memory): fallback to rotated transcript after /new 2026-02-16 23:49:41 +01:00
bundled-dir.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
config.ts refactor(shared): dedupe config path eval 2026-02-14 15:39:45 +00:00
frontmatter.test.ts fix(docs): update outdated hooks documentation URLs (#16165) 2026-02-14 13:05:37 +01:00
frontmatter.ts refactor(core): dedupe shared config and runtime helpers 2026-02-16 14:59:30 +00:00
gmail-ops.ts refactor(hooks): dedupe gmail option types 2026-02-15 16:10:17 +00:00
gmail-setup-utils.test.ts perf(test): eliminate resetModules via injectable seams 2026-02-13 16:20:37 +00:00
gmail-setup-utils.ts perf(test): eliminate resetModules via injectable seams 2026-02-13 16:20:37 +00:00
gmail-watcher.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
gmail.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
gmail.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
hooks-install.e2e.test.ts perf(test): replace module resets with direct spies and runtime seams 2026-02-13 16:04:49 +00:00
hooks-status.ts refactor(status): reuse Requirements types 2026-02-15 18:50:36 +00:00
hooks.ts refactor: rename hooks docs and add tests 2026-01-17 07:32:54 +00:00
install.test.ts refactor(hooks): share install temp-dir and archive fixtures 2026-02-16 17:57:45 +00:00
install.ts refactor(hooks): share install temp-dir and archive fixtures 2026-02-16 17:57:45 +00:00
installs.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
internal-hooks.test.ts test: drop duplicate internal hook lifecycle case 2026-02-16 06:14:23 +00:00
internal-hooks.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
llm-slug-generator.ts fix: guard resolveUserPath against undefined input (#10176) 2026-02-06 13:16:58 -05:00
loader.test.ts perf(test): speed up suites and reduce fs churn 2026-02-15 19:29:27 +00:00
loader.ts fix(security): harden hooks module loading 2026-02-14 15:03:27 +01:00
plugin-hooks.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
types.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
workspace.test.ts fix(security): block hook manifest path escapes 2026-02-14 14:00:37 +01:00
workspace.ts fix(security): block hook manifest path escapes 2026-02-14 14:00:37 +01:00