refactor: rename to openclaw

This commit is contained in:
Peter Steinberger
2026-01-30 03:15:10 +01:00
parent 4583f88626
commit 9a7160786a
2357 changed files with 16688 additions and 16788 deletions
@@ -0,0 +1,44 @@
import OpenClawProtocol
import Foundation
import Testing
@testable import OpenClaw
@Suite
@MainActor
struct AgentEventStoreTests {
@Test
func appendAndClear() {
let store = AgentEventStore()
#expect(store.events.isEmpty)
store.append(ControlAgentEvent(
runId: "run",
seq: 1,
stream: "test",
ts: 0,
data: [:] as [String: OpenClawProtocol.AnyCodable],
summary: nil))
#expect(store.events.count == 1)
store.clear()
#expect(store.events.isEmpty)
}
@Test
func trimsToMaxEvents() {
let store = AgentEventStore()
for i in 1...401 {
store.append(ControlAgentEvent(
runId: "run",
seq: i,
stream: "test",
ts: Double(i),
data: [:] as [String: OpenClawProtocol.AnyCodable],
summary: nil))
}
#expect(store.events.count == 400)
#expect(store.events.first?.seq == 2)
#expect(store.events.last?.seq == 401)
}
}