fix(runtime-fallback): inject pluginConfig and defer cleanup interval to first event

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-04-18 14:12:41 +09:00
parent d8e00ebfbc
commit 76e8508fa4
2 changed files with 22 additions and 17 deletions
+2 -1
View File
@@ -107,9 +107,10 @@ describe("createRuntimeFallbackHook dispose", () => {
globalThis.clearTimeout = originalClearTimeout
})
test("#given runtime-fallback hook created #when dispose() is called #then cleanup interval is cleared", () => {
test("#given runtime-fallback hook handles its first event #when dispose() is called #then cleanup interval is cleared", async () => {
// given
const hook = createRuntimeFallbackHook(createMockContext(), { pluginConfig: {} })
await hook.event({ event: { type: "session.created", properties: {} } })
// when
hook.dispose?.()