refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import Testing
|
||||
@testable import ClawdbotChatUI
|
||||
@testable import MoltbotChatUI
|
||||
|
||||
@Suite struct AssistantTextParserTests {
|
||||
@Test func splitsThinkAndFinalSegments() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import ClawdbotKit
|
||||
import MoltbotKit
|
||||
import Testing
|
||||
|
||||
@Suite struct BonjourEscapesTests {
|
||||
@@ -8,7 +8,7 @@ import Testing
|
||||
}
|
||||
|
||||
@Test func decodeSpaces() {
|
||||
#expect(BonjourEscapes.decode("Clawdbot\\032Gateway") == "Clawdbot Gateway")
|
||||
#expect(BonjourEscapes.decode("Moltbot\\032Gateway") == "Moltbot Gateway")
|
||||
}
|
||||
|
||||
@Test func decodeMultipleEscapes() {
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
import ClawdbotKit
|
||||
import MoltbotKit
|
||||
import Foundation
|
||||
import Testing
|
||||
|
||||
@Suite struct CanvasA2UIActionTests {
|
||||
@Test func sanitizeTagValueIsStable() {
|
||||
#expect(ClawdbotCanvasA2UIAction.sanitizeTagValue("Hello World!") == "Hello_World_")
|
||||
#expect(ClawdbotCanvasA2UIAction.sanitizeTagValue(" ") == "-")
|
||||
#expect(ClawdbotCanvasA2UIAction.sanitizeTagValue("macOS 26.2") == "macOS_26.2")
|
||||
#expect(MoltbotCanvasA2UIAction.sanitizeTagValue("Hello World!") == "Hello_World_")
|
||||
#expect(MoltbotCanvasA2UIAction.sanitizeTagValue(" ") == "-")
|
||||
#expect(MoltbotCanvasA2UIAction.sanitizeTagValue("macOS 26.2") == "macOS_26.2")
|
||||
}
|
||||
|
||||
@Test func extractActionNameAcceptsNameOrAction() {
|
||||
#expect(ClawdbotCanvasA2UIAction.extractActionName(["name": "Hello"]) == "Hello")
|
||||
#expect(ClawdbotCanvasA2UIAction.extractActionName(["action": "Wave"]) == "Wave")
|
||||
#expect(ClawdbotCanvasA2UIAction.extractActionName(["name": " ", "action": "Fallback"]) == "Fallback")
|
||||
#expect(ClawdbotCanvasA2UIAction.extractActionName(["action": " "]) == nil)
|
||||
#expect(MoltbotCanvasA2UIAction.extractActionName(["name": "Hello"]) == "Hello")
|
||||
#expect(MoltbotCanvasA2UIAction.extractActionName(["action": "Wave"]) == "Wave")
|
||||
#expect(MoltbotCanvasA2UIAction.extractActionName(["name": " ", "action": "Fallback"]) == "Fallback")
|
||||
#expect(MoltbotCanvasA2UIAction.extractActionName(["action": " "]) == nil)
|
||||
}
|
||||
|
||||
@Test func formatAgentMessageIsTokenEfficientAndUnambiguous() {
|
||||
let messageContext = ClawdbotCanvasA2UIAction.AgentMessageContext(
|
||||
let messageContext = MoltbotCanvasA2UIAction.AgentMessageContext(
|
||||
actionName: "Get Weather",
|
||||
session: .init(key: "main", surfaceId: "main"),
|
||||
component: .init(id: "btnWeather", host: "Peter’s iPad", instanceId: "ipad16,6"),
|
||||
contextJSON: "{\"city\":\"Vienna\"}")
|
||||
let msg = ClawdbotCanvasA2UIAction.formatAgentMessage(messageContext)
|
||||
let msg = MoltbotCanvasA2UIAction.formatAgentMessage(messageContext)
|
||||
|
||||
#expect(msg.contains("CANVAS_A2UI "))
|
||||
#expect(msg.contains("action=Get_Weather"))
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import ClawdbotKit
|
||||
import MoltbotKit
|
||||
import Testing
|
||||
|
||||
@Suite struct CanvasA2UITests {
|
||||
@Test func commandStringsAreStable() {
|
||||
#expect(ClawdbotCanvasA2UICommand.push.rawValue == "canvas.a2ui.push")
|
||||
#expect(ClawdbotCanvasA2UICommand.pushJSONL.rawValue == "canvas.a2ui.pushJSONL")
|
||||
#expect(ClawdbotCanvasA2UICommand.reset.rawValue == "canvas.a2ui.reset")
|
||||
#expect(MoltbotCanvasA2UICommand.push.rawValue == "canvas.a2ui.push")
|
||||
#expect(MoltbotCanvasA2UICommand.pushJSONL.rawValue == "canvas.a2ui.pushJSONL")
|
||||
#expect(MoltbotCanvasA2UICommand.reset.rawValue == "canvas.a2ui.reset")
|
||||
}
|
||||
|
||||
@Test func jsonlDecodesAndValidatesV0_8() throws {
|
||||
@@ -16,7 +16,7 @@ import Testing
|
||||
{"deleteSurface":{"surfaceId":"main"}}
|
||||
"""
|
||||
|
||||
let messages = try ClawdbotCanvasA2UIJSONL.decodeMessagesFromJSONL(jsonl)
|
||||
let messages = try MoltbotCanvasA2UIJSONL.decodeMessagesFromJSONL(jsonl)
|
||||
#expect(messages.count == 4)
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ import Testing
|
||||
"""
|
||||
|
||||
#expect(throws: Error.self) {
|
||||
_ = try ClawdbotCanvasA2UIJSONL.decodeMessagesFromJSONL(jsonl)
|
||||
_ = try MoltbotCanvasA2UIJSONL.decodeMessagesFromJSONL(jsonl)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ import Testing
|
||||
"""
|
||||
|
||||
#expect(throws: Error.self) {
|
||||
_ = try ClawdbotCanvasA2UIJSONL.decodeMessagesFromJSONL(jsonl)
|
||||
_ = try MoltbotCanvasA2UIJSONL.decodeMessagesFromJSONL(jsonl)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import ClawdbotKit
|
||||
import MoltbotKit
|
||||
import Foundation
|
||||
import Testing
|
||||
|
||||
@Suite struct CanvasSnapshotFormatTests {
|
||||
@Test func acceptsJpgAlias() throws {
|
||||
struct Wrapper: Codable {
|
||||
var format: ClawdbotCanvasSnapshotFormat
|
||||
var format: MoltbotCanvasSnapshotFormat
|
||||
}
|
||||
|
||||
let data = try #require("{\"format\":\"jpg\"}".data(using: .utf8))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Testing
|
||||
@testable import ClawdbotChatUI
|
||||
@testable import MoltbotChatUI
|
||||
|
||||
@Suite("ChatMarkdownPreprocessor")
|
||||
struct ChatMarkdownPreprocessorTests {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Foundation
|
||||
import Testing
|
||||
@testable import ClawdbotChatUI
|
||||
@testable import MoltbotChatUI
|
||||
|
||||
#if os(macOS)
|
||||
import AppKit
|
||||
@@ -19,8 +19,8 @@ private func luminance(_ color: NSColor) throws -> CGFloat {
|
||||
let lightAppearance = try #require(NSAppearance(named: .aqua))
|
||||
let darkAppearance = try #require(NSAppearance(named: .darkAqua))
|
||||
|
||||
let lightResolved = ClawdbotChatTheme.resolvedAssistantBubbleColor(for: lightAppearance)
|
||||
let darkResolved = ClawdbotChatTheme.resolvedAssistantBubbleColor(for: darkAppearance)
|
||||
let lightResolved = MoltbotChatTheme.resolvedAssistantBubbleColor(for: lightAppearance)
|
||||
let darkResolved = MoltbotChatTheme.resolvedAssistantBubbleColor(for: darkAppearance)
|
||||
#expect(try luminance(lightResolved) > luminance(darkResolved))
|
||||
#else
|
||||
#expect(Bool(true))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import ClawdbotKit
|
||||
import MoltbotKit
|
||||
import Foundation
|
||||
import Testing
|
||||
@testable import ClawdbotChatUI
|
||||
@testable import MoltbotChatUI
|
||||
|
||||
private struct TimeoutError: Error, CustomStringConvertible {
|
||||
let label: String
|
||||
@@ -31,40 +31,40 @@ private actor TestChatTransportState {
|
||||
var abortedRunIds: [String] = []
|
||||
}
|
||||
|
||||
private final class TestChatTransport: @unchecked Sendable, ClawdbotChatTransport {
|
||||
private final class TestChatTransport: @unchecked Sendable, MoltbotChatTransport {
|
||||
private let state = TestChatTransportState()
|
||||
private let historyResponses: [ClawdbotChatHistoryPayload]
|
||||
private let sessionsResponses: [ClawdbotChatSessionsListResponse]
|
||||
private let historyResponses: [MoltbotChatHistoryPayload]
|
||||
private let sessionsResponses: [MoltbotChatSessionsListResponse]
|
||||
|
||||
private let stream: AsyncStream<ClawdbotChatTransportEvent>
|
||||
private let continuation: AsyncStream<ClawdbotChatTransportEvent>.Continuation
|
||||
private let stream: AsyncStream<MoltbotChatTransportEvent>
|
||||
private let continuation: AsyncStream<MoltbotChatTransportEvent>.Continuation
|
||||
|
||||
init(
|
||||
historyResponses: [ClawdbotChatHistoryPayload],
|
||||
sessionsResponses: [ClawdbotChatSessionsListResponse] = [])
|
||||
historyResponses: [MoltbotChatHistoryPayload],
|
||||
sessionsResponses: [MoltbotChatSessionsListResponse] = [])
|
||||
{
|
||||
self.historyResponses = historyResponses
|
||||
self.sessionsResponses = sessionsResponses
|
||||
var cont: AsyncStream<ClawdbotChatTransportEvent>.Continuation!
|
||||
var cont: AsyncStream<MoltbotChatTransportEvent>.Continuation!
|
||||
self.stream = AsyncStream { c in
|
||||
cont = c
|
||||
}
|
||||
self.continuation = cont
|
||||
}
|
||||
|
||||
func events() -> AsyncStream<ClawdbotChatTransportEvent> {
|
||||
func events() -> AsyncStream<MoltbotChatTransportEvent> {
|
||||
self.stream
|
||||
}
|
||||
|
||||
func setActiveSessionKey(_: String) async throws {}
|
||||
|
||||
func requestHistory(sessionKey: String) async throws -> ClawdbotChatHistoryPayload {
|
||||
func requestHistory(sessionKey: String) async throws -> MoltbotChatHistoryPayload {
|
||||
let idx = await self.state.historyCallCount
|
||||
await self.state.setHistoryCallCount(idx + 1)
|
||||
if idx < self.historyResponses.count {
|
||||
return self.historyResponses[idx]
|
||||
}
|
||||
return self.historyResponses.last ?? ClawdbotChatHistoryPayload(
|
||||
return self.historyResponses.last ?? MoltbotChatHistoryPayload(
|
||||
sessionKey: sessionKey,
|
||||
sessionId: nil,
|
||||
messages: [],
|
||||
@@ -76,23 +76,23 @@ private final class TestChatTransport: @unchecked Sendable, ClawdbotChatTranspor
|
||||
message _: String,
|
||||
thinking _: String,
|
||||
idempotencyKey: String,
|
||||
attachments _: [ClawdbotChatAttachmentPayload]) async throws -> ClawdbotChatSendResponse
|
||||
attachments _: [MoltbotChatAttachmentPayload]) async throws -> MoltbotChatSendResponse
|
||||
{
|
||||
await self.state.sentRunIdsAppend(idempotencyKey)
|
||||
return ClawdbotChatSendResponse(runId: idempotencyKey, status: "ok")
|
||||
return MoltbotChatSendResponse(runId: idempotencyKey, status: "ok")
|
||||
}
|
||||
|
||||
func abortRun(sessionKey _: String, runId: String) async throws {
|
||||
await self.state.abortedRunIdsAppend(runId)
|
||||
}
|
||||
|
||||
func listSessions(limit _: Int?) async throws -> ClawdbotChatSessionsListResponse {
|
||||
func listSessions(limit _: Int?) async throws -> MoltbotChatSessionsListResponse {
|
||||
let idx = await self.state.sessionsCallCount
|
||||
await self.state.setSessionsCallCount(idx + 1)
|
||||
if idx < self.sessionsResponses.count {
|
||||
return self.sessionsResponses[idx]
|
||||
}
|
||||
return self.sessionsResponses.last ?? ClawdbotChatSessionsListResponse(
|
||||
return self.sessionsResponses.last ?? MoltbotChatSessionsListResponse(
|
||||
ts: nil,
|
||||
path: nil,
|
||||
count: 0,
|
||||
@@ -104,7 +104,7 @@ private final class TestChatTransport: @unchecked Sendable, ClawdbotChatTranspor
|
||||
true
|
||||
}
|
||||
|
||||
func emit(_ evt: ClawdbotChatTransportEvent) {
|
||||
func emit(_ evt: MoltbotChatTransportEvent) {
|
||||
self.continuation.yield(evt)
|
||||
}
|
||||
|
||||
@@ -139,12 +139,12 @@ extension TestChatTransportState {
|
||||
@Suite struct ChatViewModelTests {
|
||||
@Test func streamsAssistantAndClearsOnFinal() async throws {
|
||||
let sessionId = "sess-main"
|
||||
let history1 = ClawdbotChatHistoryPayload(
|
||||
let history1 = MoltbotChatHistoryPayload(
|
||||
sessionKey: "main",
|
||||
sessionId: sessionId,
|
||||
messages: [],
|
||||
thinkingLevel: "off")
|
||||
let history2 = ClawdbotChatHistoryPayload(
|
||||
let history2 = MoltbotChatHistoryPayload(
|
||||
sessionKey: "main",
|
||||
sessionId: sessionId,
|
||||
messages: [
|
||||
@@ -157,7 +157,7 @@ extension TestChatTransportState {
|
||||
thinkingLevel: "off")
|
||||
|
||||
let transport = TestChatTransport(historyResponses: [history1, history2])
|
||||
let vm = await MainActor.run { ClawdbotChatViewModel(sessionKey: "main", transport: transport) }
|
||||
let vm = await MainActor.run { MoltbotChatViewModel(sessionKey: "main", transport: transport) }
|
||||
|
||||
await MainActor.run { vm.load() }
|
||||
try await waitUntil("bootstrap") { await MainActor.run { vm.healthOK && vm.sessionId == sessionId } }
|
||||
@@ -170,7 +170,7 @@ extension TestChatTransportState {
|
||||
|
||||
transport.emit(
|
||||
.agent(
|
||||
ClawdbotAgentEventPayload(
|
||||
MoltbotAgentEventPayload(
|
||||
runId: sessionId,
|
||||
seq: 1,
|
||||
stream: "assistant",
|
||||
@@ -183,7 +183,7 @@ extension TestChatTransportState {
|
||||
|
||||
transport.emit(
|
||||
.agent(
|
||||
ClawdbotAgentEventPayload(
|
||||
MoltbotAgentEventPayload(
|
||||
runId: sessionId,
|
||||
seq: 2,
|
||||
stream: "tool",
|
||||
@@ -200,7 +200,7 @@ extension TestChatTransportState {
|
||||
let runId = try #require(await transport.lastSentRunId())
|
||||
transport.emit(
|
||||
.chat(
|
||||
ClawdbotChatEventPayload(
|
||||
MoltbotChatEventPayload(
|
||||
runId: runId,
|
||||
sessionKey: "main",
|
||||
state: "final",
|
||||
@@ -217,20 +217,20 @@ extension TestChatTransportState {
|
||||
|
||||
@Test func clearsStreamingOnExternalFinalEvent() async throws {
|
||||
let sessionId = "sess-main"
|
||||
let history = ClawdbotChatHistoryPayload(
|
||||
let history = MoltbotChatHistoryPayload(
|
||||
sessionKey: "main",
|
||||
sessionId: sessionId,
|
||||
messages: [],
|
||||
thinkingLevel: "off")
|
||||
let transport = TestChatTransport(historyResponses: [history, history])
|
||||
let vm = await MainActor.run { ClawdbotChatViewModel(sessionKey: "main", transport: transport) }
|
||||
let vm = await MainActor.run { MoltbotChatViewModel(sessionKey: "main", transport: transport) }
|
||||
|
||||
await MainActor.run { vm.load() }
|
||||
try await waitUntil("bootstrap") { await MainActor.run { vm.healthOK && vm.sessionId == sessionId } }
|
||||
|
||||
transport.emit(
|
||||
.agent(
|
||||
ClawdbotAgentEventPayload(
|
||||
MoltbotAgentEventPayload(
|
||||
runId: sessionId,
|
||||
seq: 1,
|
||||
stream: "assistant",
|
||||
@@ -239,7 +239,7 @@ extension TestChatTransportState {
|
||||
|
||||
transport.emit(
|
||||
.agent(
|
||||
ClawdbotAgentEventPayload(
|
||||
MoltbotAgentEventPayload(
|
||||
runId: sessionId,
|
||||
seq: 2,
|
||||
stream: "tool",
|
||||
@@ -258,7 +258,7 @@ extension TestChatTransportState {
|
||||
|
||||
transport.emit(
|
||||
.chat(
|
||||
ClawdbotChatEventPayload(
|
||||
MoltbotChatEventPayload(
|
||||
runId: "other-run",
|
||||
sessionKey: "main",
|
||||
state: "final",
|
||||
@@ -274,18 +274,18 @@ extension TestChatTransportState {
|
||||
let recent = now - (2 * 60 * 60 * 1000)
|
||||
let recentOlder = now - (5 * 60 * 60 * 1000)
|
||||
let stale = now - (26 * 60 * 60 * 1000)
|
||||
let history = ClawdbotChatHistoryPayload(
|
||||
let history = MoltbotChatHistoryPayload(
|
||||
sessionKey: "main",
|
||||
sessionId: "sess-main",
|
||||
messages: [],
|
||||
thinkingLevel: "off")
|
||||
let sessions = ClawdbotChatSessionsListResponse(
|
||||
let sessions = MoltbotChatSessionsListResponse(
|
||||
ts: now,
|
||||
path: nil,
|
||||
count: 4,
|
||||
defaults: nil,
|
||||
sessions: [
|
||||
ClawdbotChatSessionEntry(
|
||||
MoltbotChatSessionEntry(
|
||||
key: "recent-1",
|
||||
kind: nil,
|
||||
displayName: nil,
|
||||
@@ -304,7 +304,7 @@ extension TestChatTransportState {
|
||||
totalTokens: nil,
|
||||
model: nil,
|
||||
contextTokens: nil),
|
||||
ClawdbotChatSessionEntry(
|
||||
MoltbotChatSessionEntry(
|
||||
key: "main",
|
||||
kind: nil,
|
||||
displayName: nil,
|
||||
@@ -323,7 +323,7 @@ extension TestChatTransportState {
|
||||
totalTokens: nil,
|
||||
model: nil,
|
||||
contextTokens: nil),
|
||||
ClawdbotChatSessionEntry(
|
||||
MoltbotChatSessionEntry(
|
||||
key: "recent-2",
|
||||
kind: nil,
|
||||
displayName: nil,
|
||||
@@ -342,7 +342,7 @@ extension TestChatTransportState {
|
||||
totalTokens: nil,
|
||||
model: nil,
|
||||
contextTokens: nil),
|
||||
ClawdbotChatSessionEntry(
|
||||
MoltbotChatSessionEntry(
|
||||
key: "old-1",
|
||||
kind: nil,
|
||||
displayName: nil,
|
||||
@@ -366,7 +366,7 @@ extension TestChatTransportState {
|
||||
let transport = TestChatTransport(
|
||||
historyResponses: [history],
|
||||
sessionsResponses: [sessions])
|
||||
let vm = await MainActor.run { ClawdbotChatViewModel(sessionKey: "main", transport: transport) }
|
||||
let vm = await MainActor.run { MoltbotChatViewModel(sessionKey: "main", transport: transport) }
|
||||
await MainActor.run { vm.load() }
|
||||
try await waitUntil("sessions loaded") { await MainActor.run { !vm.sessions.isEmpty } }
|
||||
|
||||
@@ -377,18 +377,18 @@ extension TestChatTransportState {
|
||||
@Test func sessionChoicesIncludeCurrentWhenMissing() async throws {
|
||||
let now = Date().timeIntervalSince1970 * 1000
|
||||
let recent = now - (30 * 60 * 1000)
|
||||
let history = ClawdbotChatHistoryPayload(
|
||||
let history = MoltbotChatHistoryPayload(
|
||||
sessionKey: "custom",
|
||||
sessionId: "sess-custom",
|
||||
messages: [],
|
||||
thinkingLevel: "off")
|
||||
let sessions = ClawdbotChatSessionsListResponse(
|
||||
let sessions = MoltbotChatSessionsListResponse(
|
||||
ts: now,
|
||||
path: nil,
|
||||
count: 1,
|
||||
defaults: nil,
|
||||
sessions: [
|
||||
ClawdbotChatSessionEntry(
|
||||
MoltbotChatSessionEntry(
|
||||
key: "main",
|
||||
kind: nil,
|
||||
displayName: nil,
|
||||
@@ -412,7 +412,7 @@ extension TestChatTransportState {
|
||||
let transport = TestChatTransport(
|
||||
historyResponses: [history],
|
||||
sessionsResponses: [sessions])
|
||||
let vm = await MainActor.run { ClawdbotChatViewModel(sessionKey: "custom", transport: transport) }
|
||||
let vm = await MainActor.run { MoltbotChatViewModel(sessionKey: "custom", transport: transport) }
|
||||
await MainActor.run { vm.load() }
|
||||
try await waitUntil("sessions loaded") { await MainActor.run { !vm.sessions.isEmpty } }
|
||||
|
||||
@@ -422,20 +422,20 @@ extension TestChatTransportState {
|
||||
|
||||
@Test func clearsStreamingOnExternalErrorEvent() async throws {
|
||||
let sessionId = "sess-main"
|
||||
let history = ClawdbotChatHistoryPayload(
|
||||
let history = MoltbotChatHistoryPayload(
|
||||
sessionKey: "main",
|
||||
sessionId: sessionId,
|
||||
messages: [],
|
||||
thinkingLevel: "off")
|
||||
let transport = TestChatTransport(historyResponses: [history, history])
|
||||
let vm = await MainActor.run { ClawdbotChatViewModel(sessionKey: "main", transport: transport) }
|
||||
let vm = await MainActor.run { MoltbotChatViewModel(sessionKey: "main", transport: transport) }
|
||||
|
||||
await MainActor.run { vm.load() }
|
||||
try await waitUntil("bootstrap") { await MainActor.run { vm.healthOK && vm.sessionId == sessionId } }
|
||||
|
||||
transport.emit(
|
||||
.agent(
|
||||
ClawdbotAgentEventPayload(
|
||||
MoltbotAgentEventPayload(
|
||||
runId: sessionId,
|
||||
seq: 1,
|
||||
stream: "assistant",
|
||||
@@ -448,7 +448,7 @@ extension TestChatTransportState {
|
||||
|
||||
transport.emit(
|
||||
.chat(
|
||||
ClawdbotChatEventPayload(
|
||||
MoltbotChatEventPayload(
|
||||
runId: "other-run",
|
||||
sessionKey: "main",
|
||||
state: "error",
|
||||
@@ -460,13 +460,13 @@ extension TestChatTransportState {
|
||||
|
||||
@Test func abortRequestsDoNotClearPendingUntilAbortedEvent() async throws {
|
||||
let sessionId = "sess-main"
|
||||
let history = ClawdbotChatHistoryPayload(
|
||||
let history = MoltbotChatHistoryPayload(
|
||||
sessionKey: "main",
|
||||
sessionId: sessionId,
|
||||
messages: [],
|
||||
thinkingLevel: "off")
|
||||
let transport = TestChatTransport(historyResponses: [history, history])
|
||||
let vm = await MainActor.run { ClawdbotChatViewModel(sessionKey: "main", transport: transport) }
|
||||
let vm = await MainActor.run { MoltbotChatViewModel(sessionKey: "main", transport: transport) }
|
||||
|
||||
await MainActor.run { vm.load() }
|
||||
try await waitUntil("bootstrap") { await MainActor.run { vm.healthOK && vm.sessionId == sessionId } }
|
||||
@@ -490,7 +490,7 @@ extension TestChatTransportState {
|
||||
|
||||
transport.emit(
|
||||
.chat(
|
||||
ClawdbotChatEventPayload(
|
||||
MoltbotChatEventPayload(
|
||||
runId: runId,
|
||||
sessionKey: "main",
|
||||
state: "aborted",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import XCTest
|
||||
@testable import ClawdbotKit
|
||||
@testable import MoltbotKit
|
||||
|
||||
final class ElevenLabsTTSValidationTests: XCTestCase {
|
||||
func testValidatedOutputFormatAllowsOnlyMp3Presets() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Foundation
|
||||
import Testing
|
||||
@testable import ClawdbotKit
|
||||
import ClawdbotProtocol
|
||||
@testable import MoltbotKit
|
||||
import MoltbotProtocol
|
||||
|
||||
struct GatewayNodeSessionTests {
|
||||
@Test
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import ClawdbotKit
|
||||
import MoltbotKit
|
||||
import CoreGraphics
|
||||
import ImageIO
|
||||
import Testing
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import XCTest
|
||||
@testable import ClawdbotKit
|
||||
@testable import MoltbotKit
|
||||
|
||||
final class TalkDirectiveTests: XCTestCase {
|
||||
func testParsesDirectiveAndStripsLine() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import XCTest
|
||||
@testable import ClawdbotKit
|
||||
@testable import MoltbotKit
|
||||
|
||||
final class TalkHistoryTimestampTests: XCTestCase {
|
||||
func testSecondsTimestampsAreAcceptedWithSmallTolerance() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import XCTest
|
||||
@testable import ClawdbotKit
|
||||
@testable import MoltbotKit
|
||||
|
||||
final class TalkPromptBuilderTests: XCTestCase {
|
||||
func testBuildIncludesTranscript() {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import ClawdbotKit
|
||||
import MoltbotKit
|
||||
import Foundation
|
||||
import Testing
|
||||
|
||||
@Suite struct ToolDisplayRegistryTests {
|
||||
@Test func loadsToolDisplayConfigFromBundle() {
|
||||
let url = ClawdbotKitResources.bundle.url(forResource: "tool-display", withExtension: "json")
|
||||
let url = MoltbotKitResources.bundle.url(forResource: "tool-display", withExtension: "json")
|
||||
#expect(url != nil)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user