feat: v0.1.0 — client Sailfish per hermes-webui con voce

- ApiClient HTTP/SSE: login, sessioni, chat/start, stream SSE, transcribe, tts
- ChatModel: streaming live + risincronizzazione dallo stato del server
- CookieJar persistente (0600, mai la password); Settings
- Recorder OGG/Opus (fallback WAV/PCM, retry); Player TTS (QMediaPlayer)
- UI Silica: splash, login, sessioni, chat (dettatura + read-aloud), settings, cover
- Sailjail Internet;Audio;Microphone; icone; spec RPM; docs PROTOCOL/BUILD
- tests/core_test: unit parser SSE + integrazione live (probe :8899)
This commit is contained in:
2026-09-12 07:11:20 +02:00
commit 9c6a1242f7
36 changed files with 2954 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
#include <QGuiApplication>
#include <QQmlContext>
#include <QQuickView>
#include <QDebug>
#include <sailfishapp.h>
#include "apiclient.h"
#include "chatmodel.h"
#include "player.h"
#include "recorder.h"
#include "settings.h"
Q_DECL_EXPORT int main(int argc, char *argv[])
{
QGuiApplication *app = SailfishApp::application(argc, argv);
// Identita' allineata al profilo X-Sailjail del desktop file:
// AppConfigLocation = ~/.config/harbour/hermes (zona persistente della sandbox).
app->setOrganizationName(QStringLiteral("harbour"));
app->setApplicationName(QStringLiteral("hermes"));
app->setApplicationVersion(QStringLiteral("0.1.0"));
qDebug() << "harbour-hermes v0.1.0 build" << __DATE__ << __TIME__;
Settings settings;
ApiClient api(&settings);
ChatModel chat(&api);
Recorder recorder;
Player player;
// Flusso voce: registrazione -> trascrizione; TTS pronto -> riproduzione.
QObject::connect(&recorder, &Recorder::finished, &api, &ApiClient::transcribeFile);
QObject::connect(&api, &ApiClient::ttsReady, &player, &Player::play);
QQuickView *view = SailfishApp::createView();
view->rootContext()->setContextProperty(QStringLiteral("appSettings"), &settings);
view->rootContext()->setContextProperty(QStringLiteral("api"), &api);
view->rootContext()->setContextProperty(QStringLiteral("chat"), &chat);
view->rootContext()->setContextProperty(QStringLiteral("recorder"), &recorder);
view->rootContext()->setContextProperty(QStringLiteral("player"), &player);
view->rootContext()->setContextProperty(QStringLiteral("appVersion"),
QCoreApplication::applicationVersion());
view->setSource(SailfishApp::pathTo(QStringLiteral("qml/harbour-hermes.qml")));
view->show();
return app->exec();
}