test(ralph-loop): remove unsafe fixture assertions

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-05-12 14:22:18 +09:00
parent 23211159c9
commit 0787867384
5 changed files with 8 additions and 8 deletions
@@ -0,0 +1,23 @@
/// <reference types="bun-types" />
import type { PluginInput } from "@opencode-ai/plugin"
export type SessionMessage = {
info?: { role?: string }
parts?: Array<{ type: string; text?: string }>
}
export function createPluginInput(messages: SessionMessage[]): PluginInput {
const pluginInput = {
client: { session: {} } as PluginInput["client"],
project: {} as PluginInput["project"],
directory: "/tmp",
worktree: "/tmp",
serverUrl: new URL("http://localhost"),
$: {} as PluginInput["$"],
} as PluginInput
const messagesFunction = testCoerce<PluginInput["client"]["session"]["messages"]>(async () => ({ data: messages }))
pluginInput.client.session.messages = messagesFunction
return pluginInput
}