(directory: string)
| 74 | type MCPClient = Client |
| 75 | |
| 76 | function createClient(directory: string) { |
| 77 | const client = new Client({ name: "opencode", version: InstallationVersion }, CLIENT_OPTIONS) |
| 78 | client.setRequestHandler(ListRootsRequestSchema, () => |
| 79 | Promise.resolve({ roots: [{ uri: pathToFileURL(directory).href }] }), |
| 80 | ) |
| 81 | return client |
| 82 | } |
| 83 | |
| 84 | const StatusConnected = Schema.Struct({ status: Schema.Literal("connected") }).annotate({ |
| 85 | identifier: "MCPStatusConnected", |
no test coverage detected