Add native OBW editor POC with shared MCP session (by Codex)
This commit is contained in:
1 parent
6e5fa72ed5
commit
bde8b10762
48 files changed
+5614
-1
No files matched your search
@@ -0,0 +1,28 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
#pragma once
|
||||
#include "editor/options.hpp"
|
||||
#include "editor/session.hpp"
|
||||
#include <memory>
|
||||
|
||||
namespace bmh::editor {
|
||||
// A local Streamable HTTP MCP endpoint. GUI and MCP own no separate world
|
||||
// state. Protocol 2025-11-25 (also negotiates 2025-06-18), no optional
|
||||
// SSE/session state.
|
||||
class McpServer {
|
||||
public:
|
||||
explicit McpServer(Session &);
|
||||
~McpServer();
|
||||
McpServer(const McpServer &) = delete;
|
||||
void start(const Options &);
|
||||
void stop();
|
||||
int port() const;
|
||||
bool running() const;
|
||||
Json connection(const Options &) const;
|
||||
static Json tools();
|
||||
Json dispatch(const Json &request);
|
||||
|
||||
private:
|
||||
struct Impl;
|
||||
std::unique_ptr<Impl> impl_;
|
||||
};
|
||||
} // namespace bmh::editor
|
||||
Reference in new issue
Block a user