mirror of
https://github.com/Heretek-AI/opencode.git
synced 2026-11-22 08:59:26 -10:00
20 lines
643 B
TypeScript
20 lines
643 B
TypeScript
import { Rpc } from "@opencode/schema/rpc"
|
|
import { Session } from "@opencode/schema/session"
|
|
import { Schema } from "effect"
|
|
|
|
export const Smoke = Rpc.define({
|
|
id: "browser.smoke",
|
|
methods: {
|
|
execute: {
|
|
input: Schema.Struct({ sessionID: Session.ID, code: Schema.String }),
|
|
output: Schema.Struct({ output: Schema.String, error: Schema.optionalKey(Schema.Boolean) }),
|
|
},
|
|
write: {
|
|
input: Schema.Struct({ text: Schema.String, name: Schema.optionalKey(Schema.String) }),
|
|
output: Schema.String,
|
|
},
|
|
read: { input: Schema.Struct({ path: Schema.String }), output: Schema.String },
|
|
},
|
|
events: {},
|
|
})
|