feat: upgrade investigation and presentation runtime
This commit is contained in:
@@ -40,12 +40,12 @@ describe("OpenCode 2 business tool registration", () => {
|
||||
rpc: { register: async (_definition: unknown, handlers: { list: () => Promise<unknown>; read_todos: (input: { session_id: string }) => Promise<unknown> }) => { rpcList = handlers.list; readTodos = handlers.read_todos; } },
|
||||
storage: { set: async (key: string, value: unknown) => storage.set(key, value), get: async (key: string) => storage.get(key) },
|
||||
} as never);
|
||||
expect(tools.get("render_scada_analysis").options).toEqual({ codemode: false, permission: "render_scada_analysis" });
|
||||
expect(tools.get("present_view").options).toEqual({ codemode: false, permission: "present_view" });
|
||||
for (const name of ["publish_task_progress", "publish_task_presentation"]) {
|
||||
expect(tools.get(name).options).toEqual({ codemode: false, permission: name });
|
||||
}
|
||||
const render = tools.get("render_scada_analysis");
|
||||
await expect(render.execute({ reason: "test", items: [{ device_id: "x", level: "wrong" }] }, { sessionID: "s", id: "call-native" })).rejects.toThrow();
|
||||
const render = tools.get("present_view");
|
||||
await expect(render.execute({ reason: "test", command: { action: "render_scada_analysis", items: [{ device_id: "x", level: "wrong" }] } }, { sessionID: "s", id: "call-native" })).rejects.toThrow();
|
||||
const todo = tools.get("todowrite");
|
||||
const todos = [{ content: "check", status: "pending" }];
|
||||
await todo.execute({ todos }, { sessionID: "s" });
|
||||
|
||||
Reference in New Issue
Block a user