10#include <QtCore/QObject>
24 Q_DISABLE_COPY_MOVE(
Asker)
34 std::function<
void(
bool)> answer) = 0;
51 bool start(
const QString &name);
60 QList<Sonde::SessionInfo>
clients()
const;
Whatever asks the user: dialogs in the application, a script in its tests.
Definition automation.h:18
virtual ~Asker()=default
Destroys it.
Asker()=default
Creates it.
virtual void askToConnect(const Sonde::SessionRequest &request)=0
A client asks to connect: approve or deny request, now or later.
virtual void askToDelete(const QString &title, const Sonde::ToolCall &call, std::function< void(bool)> answer)=0
A client asks to delete note title, in tool call call: call answer with whether the user agreed,...
void stop()
Stops listening, and disconnects every client.
Definition automation.cpp:64
NotesStore * m_store
The notes.
Definition automation.h:74
Asker * m_asker
Asks the user.
Definition automation.h:75
void addTools()
Registers note_list, note_read, note_append and note_delete.
Definition automation.cpp:93
Automation(NotesStore *store, Asker *asker, QObject *parent=nullptr)
The interface over store, asking asker; not listening yet.
Definition automation.cpp:37
void clientsChanged()
A client was let in, or left.
bool isRunning() const
Whether it is listening.
Definition automation.cpp:73
void disconnectClient(const QString &id)
Disconnects client id.
Definition automation.cpp:88
bool start(const QString &name)
Starts listening on local socket name, which only this user can open.
Definition automation.cpp:54
QList< Sonde::SessionInfo > clients() const
The connected clients that were let in.
Definition automation.cpp:83
void runningChanged(bool running)
It started or stopped.
QString endpoint() const
The socket's full path or pipe name, for the user's MCP client.
Definition automation.cpp:78
Sonde::Server m_server
The MCP server.
Definition automation.h:76
The notes, in order, changed only through undoable commands, so a change made by an AI assistant can ...
Definition notesstore.h:22
An embeddable Model Context Protocol server.
Definition server.h:92
Embeddable Model Context Protocol server for Qt applications.
Definition dispatch.cpp:10
Sonde::Server, the embeddable MCP server.