NewStdioServer creates a new STDIO-based API server.
(options *StdioServerOptions)
| 44 | |
| 45 | // NewStdioServer creates a new STDIO-based API server. |
| 46 | func NewStdioServer(options *StdioServerOptions) *StdioServer { |
| 47 | if options.Cwd == "" { |
| 48 | panic("StdioServerOptions.Cwd is required") |
| 49 | } |
| 50 | |
| 51 | return &StdioServer{ |
| 52 | options: options, |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | // Run starts the server and blocks until the connection closes. |
| 57 | func (s *StdioServer) Run(ctx context.Context) error { |