Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
Loading...
Searching...
No Matches
main.cpp File Reference

sonde: drive a Qt application with Sonde in it, for an AI agent (designs 0028 and 0030). More...

#include "arguments.h"
#include "bridgecommand.h"
#include "client.h"
#include "common.h"
#include "endpoints.h"
#include "commands.h"
#include "completion.h"
#include "manpage.h"
#include "migrate.h"
#include "project.h"
#include "run.h"
#include "symbolize.h"
#include "trustcommand.h"
#include <QtCore/QCoreApplication>
#include <QtCore/QProcess>
#include <QtCore/QStandardPaths>
#include <cstdio>
#include <cstring>

Functions

Options anonymous_namespace{main.cpp}::takeOptions (QStringList &args)
 Takes the options before the command off the front of args.
int anonymous_namespace{main.cpp}::runExternal (const QString &command, const QStringList &rest)
 Runs sonde-<command> from PATH with rest, as git does, and returns its exit status.
bool anonymous_namespace{main.cpp}::isApplicationCommand (const QString &command)
 Whether command runs or watches the application, or says its endpoints.
void anonymous_namespace{main.cpp}::applicationCommand (const Options &options, const QString &command, const QStringList &rest)
 sonde start, restart, stop, status, log or endpoint, with the arguments after it in rest, on the project of options.
int anonymous_namespace{main.cpp}::run (QStringList args)
 Runs the command in args (the arguments after the program's name).
void anonymous_namespace{main.cpp}::filterQtMessages (QtMsgType type, const QMessageLogContext &context, const QString &message)
 Passes Qt's messages on, except its own about how logging is set up: with QT_LOGGING_DEBUG in the environment (meant for the application, which sonde starts with the same environment), they would mix with sonde's output.
int main (int argc, char **argv)
 The entry point: runs the command, and turns an Exit into its message and status.

Variables

QtMessageHandler anonymous_namespace{main.cpp}::g_previousHandler = nullptr
 The message handler in place before ours.

Detailed Description

sonde: drive a Qt application with Sonde in it, for an AI agent (designs 0028 and 0030).

The options before the command, and which command runs.