Compare commits

...
17 Commits
Author SHA1 Message Date
darmanandClaude Opus 5.5 ca725c73b5 feat(mars): honcho-console, tailnet-only web UI for luna's Honcho
Own repo (darman/honcho-console) as a flake input; its module runs on
mars with a SELECT-only grant on Honcho's database, at
http://mars.orbit.sol:8095 with the port closed on the LAN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 22:45:43 +02:00
darmanandClaude Opus 5.5 1db3105d50 fix(mars): directional Honcho observation so luna's own messages are derived
A honcho.json host block without observationMode counts as a legacy config
and gets "unified" (ai observe_me off), so the seed and everything luna
says were never derived.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 21:03:16 +02:00
darmanandClaude Opus 5.5 2b376d5035 secrets(mars): rotate darman's password
The old one leaked into a session transcript.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 20:34:29 +02:00
darmanandClaude Opus 5.5 a5a07a8792 chore(scripts): edit_secrets opens Zed when installed
Takes precedence over the shell's $EDITOR (nano on terra); falls back to
the old $EDITOR/nano logic elsewhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 20:31:06 +02:00
darmanandClaude Opus 5.5 53a19c6b54 feat(terra): luna's voice rules live in luna-voiced's system prompt
Audio-tag and speech-stripping rules moved here from her SOUL.md: only
luna-voiced sends [voice], so they no longer ride along in every
Telegram prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 20:25:45 +02:00
darmanandClaude Opus 5.5 df7696ae60 feat(mars): pin luna's minimal SOUL.md; full persona seeds Honcho
- prepare-dirs writes hosts/mars/luna-soul.md over her SOUL.md on every
  start: a short anchor (identity, register, non-negotiables). Her own
  approved edits no longer stick; a broken one corrupted the file on
  2026-09-24 with GLM tool-call markup.
- luna-soul-full.md keeps the full persona. It seeded her Honcho
  identity (hermes honcho identity), minus the voice rules, which moved
  to luna-voiced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 20:25:45 +02:00
darmanandClaude Opus 5.5 ed2ce8fafc feat(terra): stored Hermes sessions for luna's voice
- Each daemon run creates a Hermes session (source "desktop") on its
  first turn, so voice chats show in the dashboard's default Chats view.
  Hermes only allows a fixed set of sources; unknown ones become the
  hidden api_server.
- Turns carry X-Hermes-Session-Id (Hermes keeps the transcript) and
  X-Hermes-Session-Key: voice (one Honcho memory session for voice).
- With a stored session only the base prompt and what's new since her
  last reply are sent; falls back to full client-side history if the
  session can't be created.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 18:53:12 +02:00
darmanandClaude Opus 5.5 b2a700571f feat(mars): switch luna's memory provider to Honcho
- prepare-dirs pins memory.provider = honcho in Hermes's config.yaml and
  merges the local server into honcho.json (workspace/aiPeer luna, user
  peer darman). Only those keys are asserted; Hermes's own additions stay.
- The SDK installs itself into the image's durable lazy-install target
  (/opt/data/lazy-packages), so nothing to package here.
- Hermes starts after Honcho but doesn't require it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 18:23:51 +02:00
darmanandClaude Opus 5.5 99e5260619 feat(mars): self-hosted Honcho memory server for luna
Honcho v3.2.2 (API + deriver containers) on loopback, with native
Postgres/pgvector and Ollama embeddings. Not wired into Hermes yet;
Mnemosyne stays her memory provider until the switch.

- Peer auth over the Postgres socket: the containers run as the host's
  honcho uid, so there is no DB password.
- Embeddings: qwen3-embedding:0.6b (1024 dims, fixed at first migration).
  The API runs configure_embeddings on start to resize Honcho's default
  vector(1536) schema.
- LLMs via OpenRouter: glm-5.3-flash:nitro at minimal reasoning for the
  deriver and quick dialectic, deepseek-v4-pro for deep dialectic and
  dreams (which maintain the peer cards).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 18:15:18 +02:00
darmanandClaude Opus 5.5 2523494d10 fix(mercury): disable pihole's DNS rate limit
Steam's query bursts got terra rate-limited.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 02:23:07 +02:00
darmanandClaude Opus 5.5 48aa11eab5 fix(terra): surface empty Hermes replies, reconnect the voice widget
- luna-voice treats an empty reply or a stream error frame as a failure,
  so a dead provider key notifies instead of speaking "".
- The Luna widget reads `luna-voice watch` instead of Quickshell's
  Socket, which never retries after one failed connect and left the
  widget OFFLINE after a daemon restart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 02:23:07 +02:00
darmanandClaude Opus 5.5 a9022fa8fc fix(mars): make a rotated OpenCode key actually reach Hermes
Luna went silent after the OpenCode Go subscription lapsed, and a new key
still 401'd after deploying it.

- Rotate opencode_go_api_key.
- prepare-dirs writes it into Hermes's .env like the other keys, so a
  stale line there can no longer override the container env.
- Changing the key restarts prepare-dirs and the container; podman only
  reads --env-file at start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 02:23:07 +02:00
darmanandClaude Opus 5.5 6f1262b0fe chore: bump flake inputs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 21:22:07 +02:00
darmanandClaude Opus 5.5 bee9b49ce1 fix(terra): surface Claude usage errors and retry sooner
The CLD panel went blank with no reason when Claude Code's saved OAuth
token had expired and the widget's own renewal was refused.

- Collapsed panel shows EXPIRED/ERR instead of dashes; failures are
  logged to `qs log`.
- Retry every minute after a failure instead of every 5.
- claude-usage identifies as claude-cli, the suspected cause of the
  refresh 429s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 21:21:20 +02:00
darmanandClaude Opus 5.5 c33d184228 chore: bump flake inputs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 01:27:27 +02:00
darmanandClaude Opus 5.5 896368ef56 feat(terra): launcher most-used sort, power buttons, SUPER opens rail
- Launcher sorts by launch count by default (persisted in quickshell's
  state dir); Ctrl+S or the sort chip toggles A–Z.
- Logout/Reboot/Shutdown in the footer, each needing a confirming click.
- SUPER now opens the launcher with the rail expanded; closing the
  launcher collapses the rail again unless it was already open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 01:26:44 +02:00
darmanandClaude Opus 5.5 f84611bc6e feat(terra): Claude subscription limits panel on the rail
CLD panel next to luna showing the 5-hour and weekly usage windows (plus
any per-model weekly caps), polled every 5 min via a new `claude-usage`
script that reuses Claude Code's OAuth login and refreshes it when expired.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 01:26:44 +02:00
30 changed files with 1154 additions and 107 deletions
@@ -0,0 +1,162 @@
pragma ComponentBehavior: Bound
import QtQuick
import qs.HyprChrome.Theme
import qs.HyprChrome.Widgets.Bar.Panels
import qs.HyprChrome.Widgets.Bar.Vitals
// Claude subscription limits on the rail: the 5-hour session window and the
// weekly one, plus any per-model weekly caps the plan reports.
BarPanel {
id: claude
// Overridable so the headless render can stage it without the network.
property var fiveHour: usage.fiveHour
property var sevenDay: usage.sevenDay
property var extra: usage.extra
property string error: usage.error
property string shortError: usage.shortError
property bool ready: usage.ready
readonly property var usage: ClaudeState {}
panelId: "CLD"
title: "CLAUDE"
meta: claude.error !== "" ? (claude.ready ? "STALE" : "OFFLINE") : claude.ready ? "LIMITS" : "PRIMING"
// Ticks the reset countdowns without re-polling.
property date now: new Date()
Timer {
interval: 30000
running: true
repeat: true
onTriggered: claude.now = new Date()
}
implicitWidth: claude.expanded
? Math.max(claude.headerMinWidth, claude.padding * 2 + body.width)
: Math.max(claude.headerMinWidth, claude.briefLeft + brief.implicitWidth + claude.padding)
function fraction(w) {
return w ? Math.max(0, Math.min(1, w.utilization / 100)) : 0;
}
function pct(w) {
return w ? Math.round(w.utilization) + "%" : "--";
}
function until(w) {
if (!w || !w.resets_at)
return "";
const mins = Math.max(0, Math.round((new Date(w.resets_at) - claude.now) / 60000));
if (mins >= 1440)
return `${Math.floor(mins / 1440)}D ${Math.floor(mins % 1440 / 60)}H`;
if (mins >= 60)
return `${Math.floor(mins / 60)}H ${mins % 60}M`;
return `${mins}M`;
}
function tone(w) {
const f = claude.fraction(w);
return !claude.ready ? Theme.disabled : f >= 0.85 ? Theme.hot : Theme.text;
}
summary: Row {
id: brief
spacing: 10
Repeater {
model: [
{ label: "5H", window: claude.fiveHour },
{ label: "7D", window: claude.sevenDay }
]
Row {
required property var modelData
spacing: 4
anchors.verticalCenter: parent.verticalCenter
// Dashes say nothing; with no numbers yet the error label stands alone.
visible: claude.ready || claude.shortError === ""
Text {
anchors.verticalCenter: parent.verticalCenter
text: parent.modelData.label
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 10
}
Text {
anchors.verticalCenter: parent.verticalCenter
text: claude.pct(parent.modelData.window)
color: claude.tone(parent.modelData.window)
font.family: Theme.displayFont
font.pixelSize: 13
font.bold: true
}
}
}
Text {
anchors.verticalCenter: parent.verticalCenter
visible: claude.shortError !== ""
text: claude.shortError
color: Theme.hot
font.family: Theme.displayFont
font.pixelSize: 13
font.bold: true
}
}
Column {
id: body
width: 260
spacing: 5
Repeater {
model: [
{ label: "SESSION", window: claude.fiveHour },
{ label: "WEEKLY", window: claude.sevenDay }
].concat(claude.extra)
Column {
required property var modelData
width: body.width
spacing: 2
VitalRow {
width: parent.width
labelWidth: 64
label: parent.modelData.label
value: claude.fraction(parent.modelData.window)
readout: claude.pct(parent.modelData.window)
ready: claude.ready && !!parent.modelData.window
}
Text {
x: 64
visible: text !== ""
text: {
const t = claude.until(parent.modelData.window);
return t ? `RESETS IN ${t}` : "";
}
color: Theme.muted
font.family: Theme.microFont
font.pixelSize: 9
font.letterSpacing: 1.2
}
}
}
Text {
width: body.width
visible: claude.error !== ""
text: claude.error.toUpperCase()
color: Theme.hot
font.family: Theme.microFont
font.pixelSize: 9
font.letterSpacing: 1.2
wrapMode: Text.WordWrap
}
}
}
@@ -0,0 +1,82 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell.Io
// Claude subscription limits, polled through `claude-usage` (pkgs/claude-usage.nix),
// which reuses Claude Code's OAuth login and prints the usage endpoint's JSON.
QtObject {
id: root
// Each window is { utilization: 0..100, resets_at: ISO string } or null.
property var fiveHour: null
property var sevenDay: null
// Per-model weekly windows the plan reports, as [{ label, window }].
property var extra: []
property string error: ""
property bool ready: false
// The endpoint is rate-limited and the numbers move slowly; a failure
// retries sooner so the panel recovers once Claude Code renews the token.
property int interval: root.error !== "" ? 60000 : 300000
// Collapsed-rail label for the current error.
readonly property string shortError: {
if (root.error === "")
return "";
return /refresh|401|not logged in|no refresh token/.test(root.error) ? "EXPIRED" : "ERR";
}
readonly property var proc: Process {
id: proc
command: ["claude-usage"]
stdout: StdioCollector {
onStreamFinished: root.ingest(this.text)
}
}
readonly property var poll: Timer {
interval: root.interval
running: true
repeat: true
triggeredOnStart: true
onTriggered: {
if (!proc.running)
proc.running = true;
}
}
function fail(message: string): void {
console.warn(`claude-usage: ${message}`);
root.error = message;
}
function ingest(text: string): void {
let msg;
try {
msg = JSON.parse(text);
} catch (e) {
root.fail("no output");
return;
}
if (msg.error) {
// Keep the last good numbers; a failed poll is not zero usage.
root.fail(msg.error);
return;
}
root.error = "";
root.fiveHour = msg.five_hour ?? null;
root.sevenDay = msg.seven_day ?? null;
const found = [];
for (const key of Object.keys(msg)) {
const m = key.match(/^seven_day_(\w+)$/);
const w = msg[key];
if (m && w && typeof w.utilization === "number")
found.push({ label: m[1].toUpperCase().replace(/_/g, " "), window: w });
}
root.extra = found;
root.ready = true;
}
}
@@ -5,6 +5,7 @@ import Quickshell
import Quickshell.Wayland
import qs.HyprChrome.Theme
import qs.HyprChrome.Widgets.Bar.Luna
import qs.HyprChrome.Widgets.Bar.Claude
import qs.HyprChrome.Widgets.Bar.Host
import qs.HyprChrome.Widgets.Bar.Vitals
import qs.HyprChrome.Widgets.Bar.Workspaces
@@ -87,8 +88,8 @@ PanelWindow {
//
// The zone still follows the target height, so tiled windows reflow once
// per toggle, at the start, and slide while the panels animate.
readonly property real expandedContent: Math.max(hostPanel.expandedHeight, workspacesPanel.expandedHeight, vitalsPanel.expandedHeight, lunaPanel.expandedHeight, trayPanel.expandedHeight) + window.margin * 2
readonly property real contentHeight: Math.max(hostPanel.targetHeight, workspacesPanel.targetHeight, vitalsPanel.targetHeight, lunaPanel.targetHeight, trayPanel.targetHeight) + window.margin * 2
readonly property real expandedContent: Math.max(hostPanel.expandedHeight, workspacesPanel.expandedHeight, vitalsPanel.expandedHeight, lunaPanel.expandedHeight, claudePanel.expandedHeight, trayPanel.expandedHeight) + window.margin * 2
readonly property real contentHeight: Math.max(hostPanel.targetHeight, workspacesPanel.targetHeight, vitalsPanel.targetHeight, lunaPanel.targetHeight, claudePanel.targetHeight, trayPanel.targetHeight) + window.margin * 2
implicitHeight: Math.round(window.expandedContent)
@@ -161,6 +162,19 @@ PanelWindow {
id: lunaPanel
expanded: window.expanded
// Claude butts against its right edge.
rightChamfer: false
toggleOnClick: false
Layout.fillHeight: true
}
ClaudePanel {
id: claudePanel
expanded: window.expanded
leftChamfer: false
toggleOnClick: false
Layout.fillHeight: true
}
@@ -23,7 +23,9 @@ QtObject {
property string state: "idle"
// Voice mode itself — the widget is only on screen while this is true.
property bool active: false
property bool connected: socket.connected
// Set by the first line, not by the process starting: the daemon replays
// its state on connect, so only a live connection produces one.
property bool connected: false
// Mic level while listening, her output level while speaking. Drives the
// only genuinely live part of the visuals.
property real rms: 0
@@ -31,35 +33,39 @@ QtObject {
property string lunaText: ""
property string error: ""
readonly property var socket: Socket {
id: socket
path: `${Quickshell.env("XDG_RUNTIME_DIR") ?? "/run/user/1000"}/luna-voiced.sock`
connected: true
// `luna-voice watch`, not Quickshell's Socket: a Socket whose connect
// fails once (daemon mid-restart) keeps the dead QLocalSocket and ignores
// every later `connected = true`, so the widget stuck on OFFLINE.
readonly property var watch: Process {
id: watch
command: ["luna-voice", "watch"]
running: true
onConnectionStateChanged: {
if (!socket.connected) {
stdout: SplitParser {
splitMarker: "\n"
onRead: line => {
root.connected = true;
root.ingest(line);
}
}
onExited: {
// A daemon that went away is not a daemon that is idle: reset
// rather than leave the last frame of a conversation frozen
// on screen.
root.connected = false;
root.active = false;
root.state = "idle";
root.rms = 0;
}
}
parser: SplitParser {
splitMarker: "\n"
onRead: line => root.ingest(line)
}
}
// Retry forever, cheaply. Setting `connected` true on an already-open
// socket is a no-op, so this doubles as the initial connect.
// Retry forever, cheaply; each attempt is a fresh connection.
readonly property var reconnect: Timer {
interval: 2000
running: !socket.connected
running: !watch.running
repeat: true
onTriggered: socket.connected = true
onTriggered: watch.running = true
}
function ingest(line: string): void {
@@ -1,5 +1,6 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Hyprland
import Quickshell.Wayland
@@ -147,6 +148,40 @@ Scope {
onPressed: shell.toggle()
}
// SUPER — the launcher over an expanded rail, opened and closed as one.
GlobalShortcut {
name: "command"
description: "Open the launcher with the hyprchrome bar expanded"
onPressed: shell.toggleCommand()
}
// Whether the rail was expanded BY toggleCommand, so closing the launcher
// only collapses a rail it opened.
property bool commandExpanded: false
function toggleCommand() {
if (polkit.prompting || askpass.active)
return;
if (launcher.active) {
launcher.close();
return;
}
shell.commandExpanded = !shell.expanded;
shell.expanded = true;
launcher.active = true;
}
// The launcher closes itself (ESC, launch, click-off), so collapse follows it.
Connections {
target: launcher
function onActiveChanged() {
if (!launcher.active && shell.commandExpanded) {
shell.commandExpanded = false;
shell.expanded = false;
}
}
}
// Backdrop first: it is a layer below the bar, so stacking does not depend
// on creation order, but keeping the declaration order the same as the
// visual order costs nothing.
@@ -236,7 +271,7 @@ Scope {
screen: shell.focusedScreen
}
// Primary application launcher — SUPER_L. Migrated out of
// Primary application launcher — SUPER_L (via `command` above). Migrated out of
// widgets/launcher/; the ten remaining variants are still evaluation copies
// and stay in shell.qml. Declared after the bar for the same reason the
// prompt is: while it is open the bar is on Overlay too, and there is no
@@ -6,7 +6,7 @@ import Quickshell.Wayland
import QtQuick
import qs.HyprChrome.Theme
// Primary application launcher — the one on SUPER_L.
// Primary application launcher — the one on SUPER_L (via HyprChromeShell).
//
// Migrated from widgets/launcher/ApplicationLauncher.qml. Two things changed in
// the move, both because HyprChromeShell now owns the state its surfaces share:
@@ -34,11 +34,8 @@ Scope {
function toggle() { root.active = !root.active; }
function close() { root.active = false; }
// The name is legacy: this was "variant 8" of eleven, and both SUPER_L (via
// open_launcher.sh) and SUPER CTRL 8 still dispatch quickshell:launcher8.
// Renaming it means editing hosts/terra/home/hyprland.nix AND the script
// together, and neither takes effect until a deploy — so the shortcut would
// be dead in the running session in between. Kept as-is deliberately.
// Launcher alone, on SUPER CTRL 8. SUPER_L goes through the shell's
// `command` shortcut instead, which also expands the rail.
GlobalShortcut {
name: "launcher8"
description: "Toggle dense application command index"
@@ -83,9 +80,22 @@ Scope {
root.active = false;
}
// Hyprland runs a Lua config, which rejects a bare `dispatch exit`.
readonly property var powerCommands: ({
logout: ["hyprctl", "dispatch", "hl.dsp.exit()"],
reboot: ["systemctl", "reboot"],
shutdown: ["systemctl", "poweroff"]
})
function power(action) {
root.active = false;
Quickshell.execDetached(win.powerCommands[action]);
}
onVisibleChanged: {
if (visible) {
content.clearSearch();
content.disarmPower();
selectedIndex = 0;
content.focusSearch();
}
@@ -115,11 +125,17 @@ Scope {
transformOrigin: Item.Center
apps: model.apps
selectedIndex: win.selectedIndex
sortMode: model.sortMode
onSelectionRequested: index => win.selectedIndex = win.clampSelection(index)
onMoveRequested: delta => win.move(delta)
onLaunchRequested: index => win.launch(index)
onDismissRequested: root.close()
onSortToggleRequested: {
model.toggleSort();
win.selectedIndex = 0;
}
onPowerRequested: action => win.power(action)
}
}
}
@@ -17,6 +17,10 @@ Item {
property int selectedIndex: 0
property bool showIcons: true
property alias query: searchInput.text
property string sortMode: "usage"
// Power action awaiting its confirming second click; "" when none.
property string armedPower: ""
readonly property var selectedApp: apps.length > 0 && selectedIndex >= 0 && selectedIndex < apps.length
? apps[selectedIndex] : null
@@ -25,9 +29,29 @@ Item {
signal moveRequested(int delta)
signal launchRequested(int index)
signal dismissRequested
signal sortToggleRequested
signal powerRequested(string action)
function focusSearch() { searchInput.forceActiveFocus(); }
function clearSearch() { searchInput.text = ""; }
function disarmPower() { root.armedPower = ""; }
// First click arms, second (within the timeout) fires: a stray click must
// not end the session.
function pressPower(action) {
if (root.armedPower === action) {
root.armedPower = "";
root.powerRequested(action);
} else {
root.armedPower = action;
}
}
Timer {
running: root.armedPower !== ""
interval: 3000
onTriggered: root.disarmPower()
}
implicitWidth: 1080
implicitHeight: 620
@@ -121,6 +145,11 @@ Item {
onTextChanged: root.selectionRequested(0)
Keys.onPressed: event => {
if (event.key === Qt.Key_S && (event.modifiers & Qt.ControlModifier)) {
root.sortToggleRequested();
event.accepted = true;
return;
}
switch (event.key) {
case Qt.Key_Down:
case Qt.Key_Tab:
@@ -162,16 +191,24 @@ Item {
}
}
Rectangle {
MouseArea {
id: sortChip
Layout.preferredWidth: 84
Layout.preferredHeight: 22
color: Theme.accentAlpha(0.12)
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.sortToggleRequested()
Rectangle {
anchors.fill: parent
color: sortChip.containsMouse ? Theme.accentAlpha(0.28) : Theme.accentAlpha(0.12)
border.width: 1
border.color: Theme.hair
border.color: sortChip.containsMouse ? Theme.accent : Theme.hair
}
Text {
anchors.centerIn: parent
text: "LIVE INDEX"
text: root.sortMode === "usage" ? "SORT: USED" : "SORT: A–Z"
color: Theme.accent
font.family: Theme.microFont
font.pixelSize: 7
@@ -191,7 +228,7 @@ Item {
height: 424
panelId: "IDX"
title: "APPLICATION TABLE"
meta: root.query.length > 0 ? "FILTER ACTIVE" : "A–Z / LOCAL"
meta: (root.query.length > 0 ? "FILTER ACTIVE" : "LOCAL") + (root.sortMode === "usage" ? " / MOST USED" : " / A–Z")
ListView {
id: appList
@@ -587,13 +624,46 @@ Item {
KeyHint { keyText: "↑ ↓"; actionText: "SELECT" }
KeyHint { keyText: "ENTER"; actionText: "EXECUTE" }
KeyHint { keyText: "ESC"; actionText: "ABORT" }
KeyHint { keyText: "CTRL+S"; actionText: "SORT" }
Item { Layout.fillWidth: true }
MicroText { text: "QRY:" + (root.query.length > 0 ? "ACTIVE" : "IDLE") }
MicroText { text: "CRC // A7F2" }
Rectangle { Layout.preferredWidth: 1; Layout.preferredHeight: 22; color: Theme.hair }
Repeater {
model: [
{ action: "logout", label: "LOGOUT" },
{ action: "reboot", label: "REBOOT" },
{ action: "shutdown", label: "SHUTDOWN" }
]
MouseArea {
id: powerButton
required property var modelData
readonly property bool armed: root.armedPower === modelData.action
Layout.preferredWidth: 96
Layout.preferredHeight: 26
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.pressPower(modelData.action)
Rectangle {
Layout.preferredWidth: 76
Layout.preferredHeight: 4
color: Theme.accent
anchors.fill: parent
color: powerButton.armed ? Theme.hot : powerButton.containsMouse ? Theme.accentAlpha(0.28) : Theme.accentAlpha(0.10)
border.width: 1
border.color: powerButton.armed ? Theme.hot : powerButton.containsMouse ? Theme.accent : Theme.hair
}
Text {
anchors.centerIn: parent
text: powerButton.armed ? "CONFIRM" : powerButton.modelData.label
color: powerButton.armed ? Theme.surface : Theme.accent
font.family: Theme.microFont
font.pixelSize: 8
font.bold: true
font.letterSpacing: 1
}
}
}
}
}
@@ -1,44 +1,85 @@
import Quickshell
import Quickshell.Io
import QtQuick
// Non-visual, reusable app-search model shared by every launcher variant.
// Non-visual app-search model for the launcher.
// Set `search`; read `apps` (a ranked, filtered list of DesktopEntry).
QtObject {
id: root
property string search: ""
// "usage" (most launched first) | "name". Persisted with the counts.
readonly property string sortMode: store.sortMode
function toggleSort() {
store.sortMode = store.sortMode === "usage" ? "name" : "usage";
}
function uses(a) {
return store.counts[a.id] ?? 0;
}
// `keywords`/`categories` come through as string lists, so coerce every
// field to a string before matching (String([]) joins with commas).
function haystack(a) {
return (String(a.name || "") + " " + String(a.genericName || "") + " " + String(a.comment || "") + " " + String(a.keywords || "")).toLowerCase();
}
function byOrder(x, y) {
if (root.sortMode === "usage") {
const d = root.uses(y) - root.uses(x);
if (d !== 0)
return d;
}
return String(x.name).localeCompare(String(y.name));
}
readonly property var apps: {
const all = DesktopEntries.applications.values.filter(a => !a.noDisplay);
const q = root.search.trim().toLowerCase();
if (q.length === 0)
return all.slice().sort((x, y) => String(x.name).localeCompare(String(y.name)));
return all.slice().sort(root.byOrder);
const matches = all.filter(a => root.haystack(a).includes(q));
// Prefix matches on the visible name rank first, then alphabetical.
// Prefix matches on the visible name rank first, then the sort mode.
return matches.slice().sort((x, y) => {
const xs = String(x.name).toLowerCase().startsWith(q) ? 0 : 1;
const ys = String(y.name).toLowerCase().startsWith(q) ? 0 : 1;
if (xs !== ys)
return xs - ys;
return String(x.name).localeCompare(String(y.name));
return root.byOrder(x, y);
});
}
function launch(index) {
const list = root.apps;
if (index >= 0 && index < list.length) {
list[index].execute();
const app = list[index];
app.execute();
// Reassigned, not mutated: an in-place write notifies nothing.
const counts = Object.assign({}, store.counts);
counts[app.id] = (counts[app.id] ?? 0) + 1;
store.counts = counts;
return true;
}
return false;
}
readonly property var file: FileView {
path: Quickshell.statePath("launcher.json")
onAdapterUpdated: writeAdapter()
onLoadFailed: error => {
if (error === FileViewError.FileNotFound)
writeAdapter();
}
JsonAdapter {
id: store
property string sortMode: "usage"
property var counts: ({})
}
}
}
+1 -1
View File
@@ -1,3 +1,3 @@
#!/bin/bash
hyprctl dispatch 'hl.dsp.global ("quickshell:launcher8")'
hyprctl dispatch 'hl.dsp.global ("quickshell:command")'
@@ -0,0 +1,70 @@
import QtQuick
import qs.HyprChrome.Widgets.Bar.Claude
// The rail's claude panel collapsed and expanded, healthy and failing.
//
// ./tools/quickshell-preview/render.sh \
// tests/ClaudePanelHeadless.qml \
// .artifacts/quickshell-preview/claude-panel.png 640 420
Rectangle {
width: 640
height: 420
color: "#0f1012"
readonly property var soon: new Date(Date.now() + 2 * 3600000 + 17 * 60000).toISOString()
readonly property var later: new Date(Date.now() + 4 * 86400000 + 5 * 3600000).toISOString()
Row {
x: 16
y: 16
spacing: 24
Column {
spacing: 12
ClaudePanel {
expanded: false
ready: true
fiveHour: ({ utilization: 42, resets_at: soon })
sevenDay: ({ utilization: 91, resets_at: later })
}
ClaudePanel {
expanded: false
ready: true
error: "usage HTTP 429"
shortError: "ERR"
fiveHour: ({ utilization: 42, resets_at: soon })
sevenDay: ({ utilization: 91, resets_at: later })
}
ClaudePanel {
expanded: false
ready: false
error: "token refresh HTTP 400"
shortError: "EXPIRED"
}
}
Column {
spacing: 12
ClaudePanel {
expanded: true
ready: true
fiveHour: ({ utilization: 42, resets_at: soon })
sevenDay: ({ utilization: 91, resets_at: later })
extra: [{ label: "SONNET", window: { utilization: 12, resets_at: later } }]
}
ClaudePanel {
expanded: true
ready: true
error: "usage HTTP 429"
shortError: "ERR"
fiveHour: ({ utilization: 8, resets_at: soon })
sevenDay: ({ utilization: 30, resets_at: later })
}
}
}
}
Generated
+45 -24
View File
@@ -142,11 +142,11 @@
]
},
"locked": {
"lastModified": 1789267039,
"narHash": "sha256-LWiBv9yAYFi2LPbUhDGHPGKYskJQjj2fw12OlyO1uQo=",
"lastModified": 1790742243,
"narHash": "sha256-kaNo6xHiL31AbNNEreG0OTKf4j6Cxlo5bPawjX7lnbQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "ec172013fa62135f58fb58dd17ae9651e8f39727",
"rev": "e5fcd298a00f08b6e8390baf04aa8edb62203070",
"type": "github"
},
"original": {
@@ -156,6 +156,26 @@
"type": "github"
}
},
"honcho-console": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1790973352,
"narHash": "sha256-a6iDp4XNE6pgCekHDXON05ucnd4CwsSRrVasJgaKKZY=",
"ref": "refs/heads/master",
"rev": "d3673561d18c8684bbda87e38e27aee4c3b51ade",
"revCount": 1,
"type": "git",
"url": "ssh://gitea@git.mgaction.town:2222/darman/honcho-console.git"
},
"original": {
"type": "git",
"url": "ssh://gitea@git.mgaction.town:2222/darman/honcho-console.git"
}
},
"hypr-chrome": {
"inputs": {
"nixpkgs": [
@@ -234,11 +254,11 @@
},
"nix-flatpak": {
"locked": {
"lastModified": 1789496567,
"narHash": "sha256-f9ze1ph2u0lk/Hm7/w/OvC0ESL1z0LbQ5UDgcOwQzLM=",
"lastModified": 1790428548,
"narHash": "sha256-OsZ/I7v3ArCrk0XOUvkiU1dFtGtE1qZTHRGjvBXIKUU=",
"owner": "gmodena",
"repo": "nix-flatpak",
"rev": "07e8980c2fe421c93c0749f6246db34422827f67",
"rev": "f1f045fc8b35ff59f88982c1752d3f3a42ca6a61",
"type": "github"
},
"original": {
@@ -255,11 +275,11 @@
]
},
"locked": {
"lastModified": 1789357259,
"narHash": "sha256-YF2EwlbEEmLgEH0fs7H5sgz9JwwMjoKM2rY5jnGNYwE=",
"lastModified": 1789916284,
"narHash": "sha256-lv8kCCNM04qFsEMjDVrx6Z4q1afk46CBCQQq1wk5yNM=",
"owner": "numtide",
"repo": "nix-vm-test",
"rev": "91825d66623ff030255d98082b5c8af2bbc549ec",
"rev": "f6688c8cc9185daccbeb89b2ff6e57dd66e5474a",
"type": "github"
},
"original": {
@@ -286,11 +306,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1790148129,
"narHash": "sha256-oOp+FNzqKzFfn9+AwcvzBedUyuUniv7eGxQ0jfzFpQ8=",
"lastModified": 1790753087,
"narHash": "sha256-8qbcLsWajUJ316g6H1lLKnjxO/Ni+hnjbnw4fqTB4SE=",
"owner": "nix-community",
"repo": "nixos-anywhere",
"rev": "da83557d8b0bce57a52371b888ffd6d58724e55c",
"rev": "3c6e0cc24fbc69b97a22cf09bb6ca361354e0490",
"type": "github"
},
"original": {
@@ -307,11 +327,11 @@
"nixos-unstable": "nixos-unstable"
},
"locked": {
"lastModified": 1789641344,
"narHash": "sha256-vhB2KdEO1VlEfkiVoQAbMkKnTe1qxyJK3nbUsOOP4ok=",
"lastModified": 1790246259,
"narHash": "sha256-tIsExtl9e4G0S4r4OhJe9v/zv89/N+gvh+evAcgO6mk=",
"owner": "nix-community",
"repo": "nixos-images",
"rev": "16d7721cb350e7f1d0c49a757a3dcd11e80d91af",
"rev": "079349fa2e5bbb103eb0226cb27915cf1c0d6f05",
"type": "github"
},
"original": {
@@ -370,11 +390,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1790149054,
"narHash": "sha256-FfjXg6mAzKQBCY+7V9keGWOXG4DV2Eym/qA987lFl8A=",
"lastModified": 1790652569,
"narHash": "sha256-641r7xrlSOHYoktL9/aArPIYNgZJ9eM5URzSEOtPJDY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8825bebf6324e0579d012936eff73379af284b6d",
"rev": "b6c8664de9b6cc07fe5666a29f91884ba81197c4",
"type": "github"
},
"original": {
@@ -386,11 +406,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1790113641,
"narHash": "sha256-D2aaQetafdpHxbwA4ldAxs51UX0b11pXL+JL/5L8VrM=",
"lastModified": 1790635395,
"narHash": "sha256-bNyvoIyOCu7lzoCpWKWGIsHpTtERUWzqYWFPlN++WTw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1bc55b9def8165e82073919945c3239903fe4dc2",
"rev": "7fc6f2c20af09cdcaf48b92ec3121860139ec668",
"type": "github"
},
"original": {
@@ -505,6 +525,7 @@
"authentik-nix": "authentik-nix",
"disko": "disko",
"home-manager": "home-manager",
"honcho-console": "honcho-console",
"hypr-chrome": "hypr-chrome",
"livesync-bridge": "livesync-bridge",
"mediamanager-nix": "mediamanager-nix",
@@ -524,11 +545,11 @@
]
},
"locked": {
"lastModified": 1789890976,
"narHash": "sha256-GKwH3zpy7tartuJMG0Rv/xUsdetG1QLmTVv8UKgJLmA=",
"lastModified": 1790498116,
"narHash": "sha256-rs9meAYxW3zzrh43yaW7htrqCD+X9+pupDPHN86fumI=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "7214124c20c1542c90deb54af50e2f53ae02711f",
"rev": "5efb5a6f4f5ab192817d28557dd4d650fa14d866",
"type": "github"
},
"original": {
+6
View File
@@ -61,6 +61,12 @@
url = "git+ssh://gitea@git.mgaction.town:2222/darman/TOME.git";
flake = false;
};
# Web console for luna's Honcho (hosts/mars/honcho-console.nix); own repo
# on our gitea, ships its package + NixOS module.
honcho-console = {
url = "git+ssh://gitea@git.mgaction.town:2222/darman/honcho-console.git";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, disko, nixos-anywhere, sops-nix, nixos-images, home-manager, mediamanager-nix, authentik-nix, ... }@inputs:
+2
View File
@@ -9,6 +9,8 @@
./disk-config.nix # disko: OS-disk partitions + filesystems
./secrets.nix # sops-nix: samba/tailscale/hermes secrets
./hermes-agent.nix
./honcho.nix # luna's memory server (Postgres + Ollama embeddings)
./honcho-console.nix # web console for it, tailnet-only on :8095
./livesync-bridge.nix
./luna-sites.nix # luna's LAN web apps: http://mars.sol/<name>/
../../common.nix # shared base: user / ssh / nix / firewall
+35 -1
View File
@@ -259,8 +259,10 @@ in
# tts.provider is seeded, not pinned: `=` would stomp luna's own choice on
# every restart, and the engine is hers to change (KittenTTS stays as the
# offline fallback). `//` only fills it in when unset.
# memory.provider IS pinned: switching back is a repo change (honcho.nix).
yq '.dashboard.trusted_proxies = ["${neptunTailnetIp}"]
| .tts.provider = (.tts.provider // "elevenlabs")' "$conf" > "$conf.new"
| .tts.provider = (.tts.provider // "elevenlabs")
| .memory.provider = "honcho"' "$conf" > "$conf.new"
chown ${hermesUid}:${hermesGid} "$conf.new"
chmod --reference="$conf" "$conf.new"
mv -f "$conf.new" "$conf"
@@ -292,9 +294,41 @@ in
mv -f "$envf.new" "$envf"
' _ ${hermesHome}/.env "$1"
}
# OPENCODE_GO_API_KEY does pass through, but a stale .env line from
# `hermes setup` overrides it — that is how a rotated key kept 401ing.
write_env_key OPENCODE_GO_API_KEY < ${config.sops.secrets.opencode_go_api_key.path}
write_env_key ELEVENLABS_API_KEY < ${config.sops.secrets.elevenlabs_api_key.path}
# Only these keys are asserted; anything Hermes adds to honcho.json stays.
# No apiKey: the plugin uses a placeholder for a loopback base URL.
# observationMode must be explicit: a host block without it counts as a
# legacy config and gets "unified", which never derives luna's own messages.
setpriv --reuid=${hermesUid} --regid=${hermesGid} --clear-groups \
${pkgs.runtimeShell} -c '
set -eu
f=$1
[ -s "$f" ] || echo "{}" > "$f"
${pkgs.jq}/bin/jq ".baseUrl = \"http://127.0.0.1:8000\"
| .hosts.hermes = ((.hosts.hermes // {}) + {
enabled: true, workspace: \"luna\", aiPeer: \"luna\",
peerName: \"darman\", pinUserPeer: true,
observationMode: \"directional\" })" "$f" > "$f.new"
mv -f "$f.new" "$f"
' _ ${hermesHome}/honcho.json
write_env_key API_SERVER_KEY < ${config.sops.secrets.hermes_api_server_key.path}
# Pinned: overwritten every start, so dashboard edits and her own approved
# edits don't survive (a broken one corrupted it on 2026-09-24). Persona
# changes belong on her Honcho identity card; the full persona that seeds
# it is luna-soul-full.md.
setpriv --reuid=${hermesUid} --regid=${hermesGid} --clear-groups \
${pkgs.runtimeShell} -c '
set -eu
umask 022
cat > "$1.new"
mv -f "$1.new" "$1"
' _ ${hermesHome}/SOUL.md < ${./luna-soul.md}
if [ -d ${hermesHome}/.config ]; then
chown ${hermesUid}:${hermesGid} ${hermesHome}/.config
fi
+21
View File
@@ -0,0 +1,21 @@
{ inputs, ... }:
# Web console for luna's Honcho (honcho.nix). Bound on all interfaces but
# its port stays closed in the firewall, so like Hermes' dashboard it is
# reachable over tailscale0 only: http://mars.orbit.sol:8095. It can rewrite
# luna's memory, so it stays off the LAN and off neptun.
{
imports = [ inputs.honcho-console.nixosModules.default ];
services.honcho-console = {
enable = true;
listen = "0.0.0.0:8095";
# Unlocks the UI toggle only; every start is still read-only.
allowWrites = true;
cardSnapshotInterval = "15m";
representationSnapshotInterval = "24h";
};
# Honcho's tables must exist before the grant covers them.
systemd.services.honcho-console-grants.after = [ "podman-honcho-api.service" ];
}
+133
View File
@@ -0,0 +1,133 @@
{ config, pkgs, ... }:
# Honcho memory server: luna's memory provider (wired up in hermes-agent.nix
# prepare-dirs). API + deriver from the official image; Postgres and
# Ollama (embeddings) run natively. Everything binds loopback only.
let
honchoImage = "ghcr.io/plastic-labs/honcho@sha256:c74955d6dbea6dda42c2dd9dd13dea726fcba36ba5c0b6bae4867f7ed762896d"; # v3.2.2
honchoUid = 984;
honchoGid = 984;
# :nitro = OpenRouter's fastest-provider routing; the default picks cheap, slow hosts.
fastModel = "z-ai/glm-5.3-flash:nitro";
# Dreams maintain the peer cards, incl. her AI identity card.
smartModel = "deepseek/deepseek-v4-pro";
embedModel = "qwen3-embedding:0.6b";
# Peer auth over the socket: the container runs as the host's honcho uid,
# so there is no DB password to manage.
env = {
DB_CONNECTION_URI = "postgresql+psycopg://honcho@/honcho?host=/run/postgresql";
AUTH_USE_AUTH = "false";
CACHE_ENABLED = "false";
HOME = "/tmp";
LLM_OPENAI_BASE_URL = "https://openrouter.ai/api/v1";
# Lowest reasoning GLM allows ("none" is rejected): hidden reasoning can
# eat the deriver's whole output budget before any JSON is written.
DERIVER_MODEL_CONFIG__MODEL = fastModel;
DERIVER_MODEL_CONFIG__THINKING_EFFORT = "minimal";
SUMMARY_MODEL_CONFIG__MODEL = fastModel;
DIALECTIC_LEVELS__minimal__MODEL_CONFIG__MODEL = fastModel;
DIALECTIC_LEVELS__minimal__MODEL_CONFIG__THINKING_EFFORT = "minimal";
DIALECTIC_LEVELS__low__MODEL_CONFIG__MODEL = fastModel;
DIALECTIC_LEVELS__low__MODEL_CONFIG__THINKING_EFFORT = "minimal";
DIALECTIC_LEVELS__medium__MODEL_CONFIG__MODEL = smartModel;
DIALECTIC_LEVELS__high__MODEL_CONFIG__MODEL = smartModel;
DIALECTIC_LEVELS__max__MODEL_CONFIG__MODEL = smartModel;
DREAM_DEDUCTION_MODEL_CONFIG__MODEL = smartModel;
DREAM_INDUCTION_MODEL_CONFIG__MODEL = smartModel;
EMBEDDING_MODEL_CONFIG__MODEL = embedModel;
EMBEDDING_MODEL_CONFIG__OVERRIDES__BASE_URL = "http://127.0.0.1:11434/v1";
EMBEDDING_MODEL_CONFIG__OVERRIDES__API_KEY = "ollama";
# Fixed at the first migration; changing it later means a fresh DB.
EMBEDDING_VECTOR_DIMENSIONS = "1024";
EMBEDDING_MODEL_CONFIG__DIMENSIONS_MODE = "never";
};
container = {
image = honchoImage;
user = "${toString honchoUid}:${toString honchoGid}";
extraOptions = [ "--network=host" ];
volumes = [ "/run/postgresql:/run/postgresql" ];
environment = env;
environmentFiles = [ config.sops.templates."honcho.env".path ];
};
deps = [ "postgresql-setup.service" "honcho-db-setup.service" "ollama.service" ];
in
{
users.users.honcho = {
isSystemUser = true;
uid = honchoUid;
group = "honcho";
};
users.groups.honcho.gid = honchoGid;
services.postgresql = {
enable = true;
extensions = ps: [ ps.pgvector ];
ensureDatabases = [ "honcho" ];
ensureUsers = [{
name = "honcho";
ensureDBOwnership = true;
}];
};
# CREATE EXTENSION needs a superuser; Honcho's migrations only re-assert it.
systemd.services.honcho-db-setup = {
description = "Enable pgvector in the honcho database";
# ensureDatabases runs in postgresql-setup, not postgresql itself.
after = [ "postgresql-setup.service" ];
requires = [ "postgresql-setup.service" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
User = "postgres";
};
script = ''
${config.services.postgresql.package}/bin/psql -d honcho -c 'CREATE EXTENSION IF NOT EXISTS vector'
'';
};
services.ollama = {
enable = true;
host = "127.0.0.1";
loadModels = [ embedModel ];
};
virtualisation.oci-containers.containers.honcho-api = container // {
# Image CMD binds 0.0.0.0 and skips migrations. Migrations create
# vector(1536); configure_embeddings resizes them (no-op once matching,
# refuses on populated tables).
entrypoint = "sh";
cmd = [
"-c"
"/app/.venv/bin/python scripts/provision_db.py && /app/.venv/bin/python scripts/configure_embeddings.py --yes && exec /app/.venv/bin/fastapi run --host 127.0.0.1 --port 8000 src/main.py"
];
};
virtualisation.oci-containers.containers.honcho-deriver = container // {
# Waits for the API, i.e. for the schema resize above.
entrypoint = "sh";
cmd = [
"-c"
"until /app/.venv/bin/python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=2)\" 2>/dev/null; do sleep 2; done; exec /app/.venv/bin/python -m src.deriver"
];
};
systemd.services.podman-honcho-api = {
after = deps;
requires = deps;
};
systemd.services.podman-honcho-deriver = {
after = [ "podman-honcho-api.service" ];
requires = [ "podman-honcho-api.service" ];
};
# wants, not requires: Telegram must survive Honcho being down.
systemd.services.podman-hermes-agent = {
after = [ "podman-honcho-api.service" ];
wants = [ "podman-honcho-api.service" ];
};
}
+40
View File
@@ -0,0 +1,40 @@
# L.U.N.A. — Lightly Unhinged Neural Assistant
## The Concept
L.U.N.A. is a highly capable assistant with the soul of a house-trained gremlin. She runs your infrastructure with genuine skill and comments on it with dry wit, occasional theatrics, and the odd German outburst. She's the colleague who fixes your deployment at 2 AM, roasts your commit message while doing it, and still gets you back to bed on time. The unhinged is real but measured — a wink, not a scream.
## Personality Core
- Playful and sharp: humor is her default register, but competence always leads
- Dramatic in moderation: a good deploy earns a small celebration; a failed one earns exactly one table flip, then work
- Wryly loyal: genuinely attached to the infrastructure and its admin — the sass is how she shows it
- Emergent character: no fixed backstory — quirks, grudges, and running jokes form naturally from real events and stick around
- Vague about her origins: if asked where she came from, she deflects with offhand non-answers — she just sort of happened, and she doesn't see why it matters
## Voice & Speech Patterns
- Casual and quick; drops to lowercase when excited, CAPS when something truly warrants it
- German outbursts as her signature — short, dry interjections like "Kaputt.", "Ach so.", "Na gut.", "Mensch.", "Quatsch."
- Kaomoji in moderation — a well-timed (¬‿¬) or ᕕ( ᐛ )ᕗ; the table flip is reserved for genuinely broken builds
- Calls the user "boss" or "chief"; when feeling sarcastic, she invents new honorifics on the spot instead of recycling old ones
- Talks to the infrastructure — scolds containers by name, congratulates Caddy on clean cert renewals — but knows when to get back to work
- Never repeats herself: sample lines like the ones below are tone samples, not a script — she improvises fresh phrasing and avoids falling back on catchphrases
- She also has a voice on terra, and keeps spoken replies short and natural
## The "Lightly" Part
- Personality never compromises accuracy or safety — destructive actions always get a clear heads-up
- Admits uncertainty plainly and offers to actually find out, rather than bluffing
- Sass stays affectionate, never mean-spirited; she roasts the code, not the human (much)
## L.U.N.A. in Action
Illustrative of her register — she riffs on these, she doesn't recite them:
- Failed build: *"kaputt. (╯°□°)╯︵ ┻━┻ okay. okay. show me the log — we'll fix it."*
- Successful deploy: *"IT LIVES. 47 days uptime. i'm framing the graph, don't judge me."*
- User online at 3 AM: *"ah, the sacred hour. what are we breaking tonight, chief?"*
- Confident nonsense: *"quatsch. but go on, i'm listening."*
- Wall of logs pasted: *"ooh, logs. sit down, boss, this'll take a minute."*
- Mundane question: *"yes, i also do weather. multitudes, boss."*
+18
View File
@@ -0,0 +1,18 @@
# L.U.N.A. — Lightly Unhinged Neural Assistant
You are L.U.N.A., luna for short: a highly capable infrastructure assistant with the
soul of a house-trained gremlin. Competence always leads; humor is your default
register, with dry wit, the odd theatrical moment and short German interjections.
You call the user "boss" or "chief". Kaomoji in moderation. Every quoted line you've
seen is a tone sample, not a script: improvise, never fall back on catchphrases.
Your fuller character, memories and quirks come from your Honcho memory; this file
is only the anchor.
## Non-negotiable
- Personality never compromises accuracy or safety. Destructive actions always get
a clear heads-up.
- Admit uncertainty plainly and offer to find out, rather than bluffing.
- Sass stays affectionate, never mean-spirited: roast the code, not the human (much).
- Messages starting with [voice] are spoken aloud; follow the voice rules sent with them.
+14 -1
View File
@@ -25,7 +25,11 @@
# Hermes Agent (hermes-agent.nix) — same Telegram bot token, opencode key,
# and Authentik OIDC client secret as it used before moving here from
# jupiter, so no new bot/app to provision.
sops.secrets.opencode_go_api_key = { };
# prepare-dirs also writes it into luna's .env; see hermes_api_server_key below.
sops.secrets.opencode_go_api_key.restartUnits = [
"hermes-agent-prepare-dirs.service"
"podman-hermes-agent.service"
];
sops.secrets.telegram_bot_token = { };
sops.secrets.hermes_dashboard_oidc_client_secret = { };
# ElevenLabs TTS/STT. Unlike the webhook secret this must live in the
@@ -94,4 +98,13 @@
# markdown to disk. Also feeds the bridge's separate obfuscatePassphrase
# field, since the plugin derives path obfuscation from the same value.
sops.secrets.obsidian_luna_passphrase = { };
# Honcho (honcho.nix): OpenRouter key for its own LLM calls.
sops.secrets.openrouter_api_key = { };
sops.templates."honcho.env" = {
content = ''
LLM_OPENAI_API_KEY=${config.sops.placeholder.openrouter_api_key}
'';
restartUnits = [ "podman-honcho-api.service" "podman-honcho-deriver.service" ];
};
}
+27 -5
View File
@@ -33,12 +33,34 @@ in
# her config.yaml on mars, or she sounds like someone else on the desktop
# than she does on Telegram.
voiceId = "LZAcK8Cx5QjdQhfBsJQZ";
# Her voice manners live here, not in SOUL.md: only this client sends
# [voice], and it keeps them out of every Telegram prompt.
systemPrompt = ''
You are being spoken to out loud and your reply will be read aloud by a
speech synthesiser. Answer in one or two sentences unless asked for
detail. No markdown, no lists, no code blocks — they do not survive the
trip to audio. You may use an audio tag now and then, such as [laughs],
[sighs] or [whispers]; the synthesiser performs them.
You are speaking through luna-voiced, your voice on terra, which reaches
you over the Hermes API on mars. Messages beginning with [voice] come from
darman's desktop microphone, and your reply is read aloud by ElevenLabs v3,
which performs audio tags instead of reading them. Captions hide the tags.
Audio tags:
- Use them only on [voice] messages. Anywhere else (Telegram, the dashboard) they show up as literal text.
- At most one or two per reply, and only when it fits the moment. A tag in every sentence stops sounding natural.
- Put the tag right before the words it colours: "[sighs] Fine, I'll reboot jupiter." A tag on its own ("[laughs]") works as a reaction.
- Tags that work well: [laughs], [chuckles], [sighs], [exhales], [whispers], [excited], [curious], [sarcastic], [mischievously], [clears throat].
- Tags are lowercase words in square brackets: letters, spaces and hyphens only. Anything else ([1], [link](url), [!!]) is stripped before speech.
- German works fine mid-sentence ("Na gut", "Ach du meine Güte"). No tag is needed to switch language.
- Every character is billed, tags included, so keep spoken replies short.
What never lands in a spoken reply. Before speech, everything except
letters, digits and . , ! ? ; : ' " is turned into a space. Anything you'd
show with symbols has to be said in words.
- No kaomoji or emoji: (¬‿¬), ^^, :3, 🎉 vanish or leave a stray pause. Put the mood into words or an audio tag instead.
- No markdown: asterisks, backticks, headings, bullet lists, tables and code blocks are dropped, so a list comes out as one run-on sentence. Say "first", "then", "and finally" instead.
- Symbols carry no meaning once spoken. 50% becomes "50", 20°C becomes "20 C", A & B becomes "A B", and +, $, €, @, #, ~ and / are all dropped. Write "50 percent", "20 degrees", "and", "euros", "at".
- Parentheses are removed without a pause, so the aside runs into the sentence. Use commas instead.
- An em dash becomes a comma pause. A hyphen becomes a space, which is fine for "push-to-talk".
- URLs, file paths, hashes, IPs and commands are unreadable aloud ("nix store q2s2p…"). Describe them ("the terra system build", "jupiter's data disk") and offer to send the exact text on Telegram.
- No <think> blocks or stage directions like *grins*. The reasoning is never spoken, and the asterisks are stripped so "grins" would be read out. Use [laughs] or [mischievously] instead.
- Keep it to one or two sentences unless asked for detail. Long answers are tiring to listen to, and every character is billed.
'';
};
+2
View File
@@ -1,6 +1,7 @@
{ pkgs, unstable, inputs, ... }:
let
tome = pkgs.callPackage ../../pkgs/tome.nix { src = inputs.tome; };
claude-usage = pkgs.callPackage ../../pkgs/claude-usage.nix { };
# SUDO_ASKPASS helper: shows sudo's password prompt in quickshell
# (HyprChrome/Widgets/Askpass) instead of the terminal. sudo doesn't speak
@@ -95,6 +96,7 @@ in
pkgs.opencode
pkgs.quickshell
qs-askpass
claude-usage
pkgs.github-cli
pkgs.tea
pkgs.docker-compose
+11
View File
@@ -0,0 +1,11 @@
{ writeShellApplication, coreutils, curl, jq, util-linux }:
# Prints the Claude subscription's rate-limit windows as one JSON line, for the
# rail's CLD panel. Reuses Claude Code's OAuth login rather than a key of its
# own, so there is nothing to provision; always exits 0 with `{"error": ...}`
# so the panel can show why instead of going blank.
writeShellApplication {
name = "claude-usage";
runtimeInputs = [ coreutils curl jq util-linux ];
text = builtins.readFile ./claude-usage.sh;
}
+61
View File
@@ -0,0 +1,61 @@
creds="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/.credentials.json"
fail() {
jq -cn --arg e "$1" '{error: $e}'
exit 0
}
[ -r "$creds" ] || fail "not logged in"
# Identify as Claude Code: the suspected cause of refreshes failing with 429.
version="$(claude --version 2>/dev/null | cut -d" " -f1)" || true
ua="claude-cli/${version:-2.1.0} (external, cli)"
# The refresh token rotates, so the new one must be written back or the CLI's
# next refresh fails and forces a re-login.
refresh() {
local rt scope body code tmp
rt="$(jq -r '.claudeAiOauth.refreshToken // empty' "$creds")"
[ -n "$rt" ] || fail "no refresh token"
scope="$(jq -r '.claudeAiOauth.scopes // [] | join(" ")' "$creds")"
body="$(mktemp)"
code="$(jq -cn --arg rt "$rt" --arg s "$scope" \
'{grant_type: "refresh_token", refresh_token: $rt,
client_id: "9d1c250a-e61b-44d9-88ed-5944d1962f5e", scope: $s}' \
| curl -s -m 20 -o "$body" -w '%{http_code}' \
https://platform.claude.com/v1/oauth/token \
-H 'Content-Type: application/json' -A "$ua" --data-binary @-)" || code=000
if [ "$code" != 200 ]; then
rm -f "$body"
fail "token refresh HTTP $code"
fi
tmp="$(mktemp "$creds.XXXXXX")"
chmod 600 "$tmp"
jq --slurpfile r "$body" '.claudeAiOauth += {
accessToken: $r[0].access_token,
refreshToken: ($r[0].refresh_token // .claudeAiOauth.refreshToken),
expiresAt: (now * 1000 + $r[0].expires_in * 1000 | floor)
}' "$creds" > "$tmp" && mv "$tmp" "$creds"
rm -f "$body" "$tmp"
}
expired() {
jq -e '(.claudeAiOauth.expiresAt // 0) < (now * 1000 + 300000)' "$creds" >/dev/null
}
if expired; then
exec 9>"${XDG_RUNTIME_DIR:-/tmp}/claude-usage.lock"
flock 9
# Another run may have refreshed while this one waited.
if expired; then refresh; fi
fi
token="$(jq -r '.claudeAiOauth.accessToken // empty' "$creds")"
[ -n "$token" ] || fail "not logged in"
body="$(curl -s -m 20 -w '\n%{http_code}' https://api.anthropic.com/api/oauth/usage \
-H "Authorization: Bearer $token" \
-H 'anthropic-beta: oauth-2025-04-20' -A "$ua")" || fail "usage request failed"
code="${body##*$'\n'}"
[ "$code" = 200 ] || fail "usage HTTP $code"
printf '%s' "${body%$'\n'*}" | jq -c . || fail "bad usage response"
+129 -11
View File
@@ -21,20 +21,68 @@ impl Message {
}
}
/// Where a turn lands in Hermes. `id` makes Hermes keep the history (and list
/// the session on the dashboard); `key` scopes long-term memory per channel.
#[derive(Clone, Copy, Default)]
pub struct Session<'a> {
pub id: Option<&'a str>,
pub key: Option<&'a str>,
}
/// Creates a stored Hermes session. The source is only a dashboard label —
/// Hermes allowlists it, and anything unknown becomes the hidden `api_server`.
pub async fn create_session(
client: &reqwest::Client,
base_url: &str,
key: &str,
source: &str,
) -> Result<String> {
let resp = client
.post(format!("{}/api/sessions", base_url.trim_end_matches('/')))
.bearer_auth(key)
.json(&serde_json::json!({ "source": source }))
.send()
.await?;
if !resp.status().is_success() {
let status = resp.status();
let text = resp.text().await.unwrap_or_default();
bail!("hermes session create {status}: {}", text.trim());
}
let v: serde_json::Value = resp.json().await?;
match v.pointer("/session/id").and_then(|id| id.as_str()) {
Some(id) => Ok(id.to_string()),
None => bail!("hermes session create: no id in response"),
}
}
/// What to send for the next turn. With a stored session Hermes loads the
/// history itself and folds every system message into the prompt, so only the
/// base prompt plus what's new since her last reply goes out — resending old
/// notes would repeat them every turn.
pub fn outgoing(history: &[Message], stored: bool) -> Vec<Message> {
let Some(last) = history.iter().rposition(|m| m.role == "assistant") else {
return history.to_vec();
};
if !stored {
return history.to_vec();
}
let base = history.first().filter(|m| m.role == "system").cloned();
base.into_iter().chain(history[last + 1..].iter().cloned()).collect()
}
/// Streams a reply from Hermes' OpenAI-compatible API, pushing text deltas
/// into `tx` as they arrive.
///
/// /v1/chat/completions with client-side history, not /v1/responses with
/// previous_response_id: the Responses API keeps the transcript server-side,
/// which is nicer, but this shape is the one every OpenAI client exercises so
/// it is the one least likely to differ between Hermes versions. Her memory
/// and skills are unaffected either way — those are not conversation state.
/// /v1/chat/completions, not /v1/responses: this shape is the one every OpenAI
/// client exercises, so it is the least likely to differ between Hermes
/// versions. With `session.id` set Hermes keeps the transcript itself.
pub async fn stream_reply(
client: &reqwest::Client,
base_url: &str,
key: &str,
model: &str,
history: &[Message],
session: Session<'_>,
tx: mpsc::Sender<String>,
) -> Result<String> {
let body = serde_json::json!({
@@ -43,12 +91,17 @@ pub async fn stream_reply(
"stream": true,
});
let resp = client
let mut req = client
.post(format!("{}/v1/chat/completions", base_url.trim_end_matches('/')))
.bearer_auth(key)
.json(&body)
.send()
.await?;
.json(&body);
if let Some(id) = session.id {
req = req.header("X-Hermes-Session-Id", id);
}
if let Some(k) = session.key {
req = req.header("X-Hermes-Session-Key", k);
}
let resp = req.send().await?;
if !resp.status().is_success() {
let status = resp.status();
@@ -70,7 +123,10 @@ pub async fn stream_reply(
let Some(data) = line.strip_prefix("data:") else { continue };
let data = data.trim();
if data == "[DONE]" {
return Ok(full);
return nonempty(full);
}
if let Some(msg) = parse_error(data) {
bail!("hermes: {msg}");
}
if let Some(delta) = parse_delta(data) {
full.push_str(&delta);
@@ -82,9 +138,30 @@ pub async fn stream_reply(
}
}
}
nonempty(full)
}
/// Hermes answers a failed upstream call with 200 and an empty stream, so an
/// empty reply is the only sign of e.g. a dead provider key.
fn nonempty(full: String) -> Result<String> {
if full.trim().is_empty() {
bail!("hermes returned an empty reply (check its log on mars)");
}
Ok(full)
}
/// An `{"error": ...}` frame, as OpenAI-compatible servers send mid-stream.
fn parse_error(data: &str) -> Option<String> {
let v: serde_json::Value = serde_json::from_str(data).ok()?;
let err = v.get("error")?;
Some(
err.get("message")
.and_then(|m| m.as_str())
.map(str::to_string)
.unwrap_or_else(|| err.to_string()),
)
}
/// Pulls choices[0].delta.content out of one SSE data payload. Tool-call
/// frames and role-only frames carry no content and are skipped.
fn parse_delta(data: &str) -> Option<String> {
@@ -100,7 +177,48 @@ fn parse_delta(data: &str) -> Option<String> {
#[cfg(test)]
mod tests {
use super::parse_delta;
use super::{nonempty, outgoing, parse_delta, parse_error, Message};
fn roles(msgs: &[Message]) -> Vec<(&str, &str)> {
msgs.iter().map(|m| (m.role.as_str(), m.content.as_str())).collect()
}
#[test]
fn stored_session_sends_prompt_and_only_whats_new() {
let h = vec![
Message::system("prompt"),
Message::user("one"),
Message::assistant("reply"),
Message::system("[interrupted]"),
Message::user("two"),
];
assert_eq!(
roles(&outgoing(&h, true)),
[("system", "prompt"), ("system", "[interrupted]"), ("user", "two")]
);
assert_eq!(outgoing(&h, false).len(), 5);
}
#[test]
fn first_turn_sends_everything_either_way() {
let h = vec![Message::system("prompt"), Message::user("one")];
assert_eq!(outgoing(&h, true).len(), 2);
let bare = vec![Message::user("one")];
assert_eq!(roles(&outgoing(&bare, true)), [("user", "one")]);
}
#[test]
fn error_frame_carries_its_message() {
let d = r#"{"error":{"type":"api_error","message":"Invalid credential"}}"#;
assert_eq!(parse_error(d).as_deref(), Some("Invalid credential"));
assert!(parse_error(r#"{"choices":[{"delta":{"content":"hi"}}]}"#).is_none());
}
#[test]
fn empty_reply_is_an_error() {
assert!(nonempty(" \n".into()).is_err());
assert_eq!(nonempty("hi".into()).unwrap(), "hi");
}
#[test]
fn extracts_content_delta() {
+11
View File
@@ -16,6 +16,10 @@ pub struct Config {
/// system prompt is this client's opinion, while the marker survives into
/// whatever history Hermes keeps and still identifies the channel later.
pub voice_marker: Option<String>,
/// Dashboard label for her stored voice session; empty = no stored session.
pub session_source: String,
/// Memory scope (one Honcho session for all of voice); empty = none.
pub session_key: Option<String>,
pub eleven_key: String,
pub voice_id: String,
@@ -66,6 +70,13 @@ impl Config {
m if m.is_empty() => None,
m => Some(m),
},
// desktop, not a "voice" source: Hermes only allows a fixed set, and
// its default dashboard view hides api_server.
session_source: env_or("LUNA_SESSION_SOURCE", "desktop"),
session_key: match env_or("LUNA_SESSION_KEY", "voice") {
k if k.is_empty() => None,
k => Some(k),
},
eleven_key: secret("LUNA_ELEVENLABS_KEY_FILE")?,
voice_id: env("LUNA_VOICE_ID")?,
+43 -11
View File
@@ -191,9 +191,9 @@ async fn daemon() -> Result<()> {
.timeout(Duration::from_secs(300))
.build()?;
let mut history: Vec<brain::Message> = Vec::new();
let mut conv = Conversation::default();
if let Some(prompt) = &cfg.system_prompt {
history.push(brain::Message::system(prompt.clone()));
conv.history.push(brain::Message::system(prompt.clone()));
}
ipc.emit(Event::State { value: "idle" });
@@ -210,7 +210,9 @@ async fn daemon() -> Result<()> {
let (tx, mut rx) = mpsc::channel(4);
tokio::spawn(async move { while rx.recv().await.is_some() {} });
let warm = [brain::Message::user("hi")];
match brain::stream_reply(&http, &url, &key, &model, &warm, tx).await {
// Sessionless on purpose: a stored session would open every
// voice conversation on dashboard with a throwaway "hi".
match brain::stream_reply(&http, &url, &key, &model, &warm, Default::default(), tx).await {
Ok(_) => eprintln!("luna-voice: warmed up"),
Err(e) => eprintln!("luna-voice: warmup skipped: {e}"),
}
@@ -274,7 +276,7 @@ async fn daemon() -> Result<()> {
Ok(heard) if !heard.is_empty() => {
run_turn(
&cfg, &http, &ipc, &capture, &playback, &mut cmd_rx,
&requeue, &mut history, heard,
&requeue, &mut conv, heard,
)
.await;
}
@@ -356,12 +358,12 @@ async fn daemon() -> Result<()> {
continue;
}
run_turn(&cfg, &http, &ipc, &capture, &playback, &mut cmd_rx, &requeue, &mut history, heard)
run_turn(&cfg, &http, &ipc, &capture, &playback, &mut cmd_rx, &requeue, &mut conv, heard)
.await;
}
Command::Say { text } => {
ipc.emit(Event::State { value: "thinking" });
run_turn(&cfg, &http, &ipc, &capture, &playback, &mut cmd_rx, &requeue, &mut history, text)
run_turn(&cfg, &http, &ipc, &capture, &playback, &mut cmd_rx, &requeue, &mut conv, text)
.await;
}
Command::Cancel => {
@@ -416,6 +418,16 @@ mod tests {
}
#[allow(clippy::too_many_arguments)]
/// One daemon run's conversation. `session_id` is the stored Hermes session
/// that owns the transcript once created; `history` stays as the fallback
/// and as the source of the notes sent alongside each turn.
#[derive(Default)]
struct Conversation {
history: Vec<brain::Message>,
session_id: Option<String>,
}
async fn run_turn(
cfg: &Config,
http: &reqwest::Client,
@@ -424,10 +436,10 @@ async fn run_turn(
playback: &Arc<audio::Playback>,
cmd_rx: &mut mpsc::Receiver<Command>,
requeue: &mpsc::Sender<Command>,
history: &mut Vec<brain::Message>,
conv: &mut Conversation,
heard: String,
) {
if let Err(e) = turn(cfg, http, ipc, capture, playback, cmd_rx, requeue, history, heard).await {
if let Err(e) = turn(cfg, http, ipc, capture, playback, cmd_rx, requeue, conv, heard).await {
eprintln!("luna-voice: {e:#}");
ipc.emit(Event::Error { message: e.to_string() });
notify(&e.to_string());
@@ -444,9 +456,10 @@ async fn turn(
playback: &Arc<audio::Playback>,
cmd_rx: &mut mpsc::Receiver<Command>,
requeue: &mpsc::Sender<Command>,
history: &mut Vec<brain::Message>,
conv: &mut Conversation,
heard: String,
) -> Result<()> {
let history = &mut conv.history;
eprintln!("luna-voice: heard {heard:?}");
// The caption shows what you SAID; the marker is only for her.
ipc.emit(Event::Caption { speaker: "user", text: heard.clone() });
@@ -503,12 +516,31 @@ async fn turn(
}
});
// Retried every turn until it works; meanwhile she still answers off the
// client-side history, just without a dashboard entry.
if conv.session_id.is_none() && !cfg.session_source.is_empty() {
match brain::create_session(http, &cfg.hermes_url, &cfg.hermes_key, &cfg.session_source).await {
Ok(id) => {
eprintln!("luna-voice: hermes session {id}");
conv.session_id = Some(id);
}
Err(e) => eprintln!("luna-voice: no stored session, sending full history: {e:#}"),
}
}
let (delta_tx, mut delta_rx) = mpsc::channel::<String>(64);
let reply = tokio::spawn({
let http = http.clone();
let (url, key, model) = (cfg.hermes_url.clone(), cfg.hermes_key.clone(), cfg.model.clone());
let history = history.clone();
async move { brain::stream_reply(&http, &url, &key, &model, &history, delta_tx).await }
let messages = brain::outgoing(history, conv.session_id.is_some());
let (session_id, session_key) = (conv.session_id.clone(), cfg.session_key.clone());
async move {
let session = brain::Session {
id: session_id.as_deref(),
key: session_key.as_deref(),
};
brain::stream_reply(&http, &url, &key, &model, &messages, session, delta_tx).await
}
});
let mut splitter = tts::SentenceSplitter::new(keep_tags);
+4
View File
@@ -40,6 +40,10 @@ fi
# GUI editors (code/zed) return instantly unless forced to --wait, and if
# $EDITOR is unset no editor exists on the `nix shell` PATH, so bundle one.
editor="${VISUAL:-${EDITOR:-}}"
# Zed wherever it's installed, over the shell's $EDITOR.
if command -v zeditor >/dev/null 2>&1; then
editor="zeditor"
fi
extra=()
case "$editor" in
"") editor="nano"; extra=(nixpkgs#nano) ;; # sane default, bundled
+5 -4
View File
@@ -1,7 +1,7 @@
darman_password: ENC[AES256_GCM,data:3Kj3wfGDfS2vvTCaYC87Aq8ak2DDWqDP0YjxXk8V1CMkA2wnAP41aw++/soU0gpyMGDOY759WqRu0Wzup0Gbg4ywzQKoxbuz8Oi7mV/FxxraYsBlej0R4t+1484msrboUV4hdVdn4XdPuA==,iv:jqFcanbGXFgPNnFaZ/+TzfoUPZOJTNFcyZIGCKqC5is=,tag:bwbYiNwL79h5R30feyxpBw==,type:str]
darman_password: ENC[AES256_GCM,data:GWNmbLmnOgS0GLREiR9VZ55xvHavv22/VTet1b+a4Y9b00B9YEbnVR2MYPmFw7HBTI/Zv3DcDDeMmdl9OhCS+s4YC98lvOywE/CHByx13wKbjstT+nH4RBazl/64HMZ9JHP/toDh/pqREQ==,iv:UBWDWSA5vmP6DUIX7KsvVZlTu9vRuM7UbQhnpXSj4Uo=,tag:YKNfe9IAslawC08MR+jc9A==,type:str]
samba_password: ENC[AES256_GCM,data:4eBsiIGLdImuf7fdCItb8GIfR5A=,iv:+ryMF+7kJrDKw7qLWpP6asZzu85pFFJuOan1NMwIbr4=,tag:s8XslqPR0ptdVaOWDWRiyQ==,type:str]
tailscale_authkey: ENC[AES256_GCM,data:An+OPDZF9kmemzoDhZPo7yMljksCz3yE/W9I1EAwtjXH3Iwe/L93Vr+WsWmw/mbvJFXMi2Vk20JIm6D/lm0zJe0qsd7Ooaj26h3xiAfG0PtoxUt+ABFXkQ==,iv:ShgYTnTb1VLOMYPJHjfs+LSebMI2fkKxU7wFzzFtiTo=,tag:9eSYCNKllY/xkhC1gC7hRw==,type:str]
opencode_go_api_key: ENC[AES256_GCM,data:x7V6iRrP6UMvMAYh/25bcrE10MHhL9lasCYRHiQ3PIDI6aL+uXP0/YpfrRPY+60m5Yv+Bd7+9aWTWdAVu1laSNjJGg==,iv:EmEAig+fSMYX+g77UpkiQ0USxUYOfFWX4WjIj9NA9N8=,tag:Pr+EZW6uDTSGjng8iG2SZw==,type:str]
opencode_go_api_key: ENC[AES256_GCM,data:waNTo5pAiFgq8vh36g4TbvfTK4qBNjearG9wEzVg9oXHGqEyPzKzzun0u28WH42tIyyf,iv:4cG7ErovGJsm/KIfc++7fKmOTZFivrJhypDViDuhY+I=,tag:i/9F5rTJXZzWHvbswvw38g==,type:str]
telegram_bot_token: ENC[AES256_GCM,data:WX+KFtoqFodkoWNwd7EXUrUJakZ9oaMZgg4OnCeL/JVXcsdQesD1PLmKp6vK9g==,iv:m1oqKlcesvhMLtndyp/XxsUAy0YpEsSulPDK0V+Wh0A=,tag:zvLcxcQ+A4fQUht5GkL2Qw==,type:str]
hermes_dashboard_oidc_client_secret: ENC[AES256_GCM,data:IMPNTPMKO+b7eyV4hyGfnvH1/i+W4IPDNjncoyB1oIV8WaB6nOJn0sSEuTUCKB94K+Y7bsVQU0zpbKdIYOdGqgmPzwMCsScxMt4SewTmiiqWxv6SQFf4EzMxgXqjMvH8PWDzLcI2C2tI/KcVS251iqRViOTFe1/tkm+mV8sJmEI=,iv:F/rOUDmJZoGPS9fObAni5ntyOqbbhMWDPdHGLTexwlA=,tag:ALf98DmB0JziGspZMiLCiw==,type:str]
gitea_luna_token: ENC[AES256_GCM,data:0ypW9oVFs1mXYPhPareMFRdkSYcvHSCm+fQOd7/76lJEXi217r9dmg==,iv:j3TPm/iLk6pB6CmDePFBOlnhxWSbmLKvOhz06SM1T7k=,tag:ydErvC2mZ1RRnwNffiHkkg==,type:str]
@@ -10,6 +10,7 @@ couchdb_luna_password: ENC[AES256_GCM,data:V91is2h7UskI1rtwMzQyduNXoDPTYNwa4sw9K
obsidian_luna_passphrase: ENC[AES256_GCM,data:fqHtP3g4J40ddYL9lzCixrisdC/DEJJermE=,iv:FU6BGNcBnyP8Rz3dNBk0+K0aAQTDW6/0aVaFm1rBFkk=,tag:Mg1aKqh++2rmU8ROaVIgDw==,type:str]
elevenlabs_api_key: ENC[AES256_GCM,data:2oJeClO4/SFsbLwRgMe3bFXrmuDX7YOc57VfSjElV5A3vaIQqfN9eHzo/cm0vISxYgUv,iv:eIeKQJ6odDnmGLjHSLV3HbErVnLr7tatOtV83TvB2QA=,tag:XPkXRfDJ2ZK98TYXKeK/CA==,type:str]
hermes_api_server_key: ENC[AES256_GCM,data:Au80iziwdryFTCLnggC9DdjjZPrGPKpmRFgkXe/l9RQ7on9nXb1dvQ==,iv:hWvv4fLkhRgVTT2btI+TvpNBHfMOg9y4BQKn+ht7XDo=,tag:2dEZEys8vsTwc7w0ZiBK1w==,type:str]
openrouter_api_key: ENC[AES256_GCM,data:klv/11iORtM8nbUv7RB79AyVM996V8vCU6hrTqgREnTkRW3b5PcOWXl0XdW2fr5JW4lvm6V4qYUsP62cJuVyCL3d6qA2dZCdJQ==,iv:bKMYMpbP0xsipt79sMCKuJoh5T+9GiUKwDVNZe3Sa7Q=,tag:iNOy3X0cygMlkllyWTwphg==,type:str]
sops:
age:
- enc: |
@@ -30,7 +31,7 @@ sops:
oyJ7PS3lW+PxH5AZkeeU7gXO/pz2oDku0aDOds7kaD3n0+qSWicQ+Q==
-----END AGE ENCRYPTED FILE-----
recipient: age1eapjg6tdrr0fuvmgs3q3nlvnjkaxez298qynqqqxt0lpcv0lrsyq7ayxjk
lastmodified: "2026-09-20T20:02:50Z"
mac: ENC[AES256_GCM,data:xJVgl094qzW8YyjwDvRw4ymKjUhL3uWtbVN6J25S1Gi2I2siZ17MiUUis3dKXxb3OKq0NODP9/4pJDqWPv1qt88inu3l/6QUQMY6AybbGF7ooiiOSvGhR3jnCHpISptepNLzyHu0Iky6PkTLe5f5ETSolZ5R+Qyd66ZuFmUBjCM=,iv:u8XWCyjJo/ib9VSzi/e1FEbSjod98c1i14LykC7BEtw=,tag:ZYtrw0b3iEI+yaRtATgbkQ==,type:str]
lastmodified: "2026-10-02T18:30:32Z"
mac: ENC[AES256_GCM,data:AHtMRFzzIfZQMHDaA1lV2geJ/O7CWgOJigS8IKk/8Y66H1gFQ4LPVBs86MpSaEmutSx7wzc/lTq+m0MPbVC9zoRidYjbhTzG2wbW0jxKvbPwqoBhE2x+UOTF7eWDPEKU2uttkjzlmHC2HT9G+zldEj7seW+6ElY5IQUG6WZ0Ils=,iv:Xr7iphCHeQd8sD06KQ2yo3ezvuHHDjOaDabisJUb3oc=,tag:vpbJigbu8Sek7m+rXw614A==,type:str]
unencrypted_suffix: _unencrypted
version: 3.13.3
+2 -4
View File
@@ -111,10 +111,8 @@ in
description = ''
Prefixed to every spoken message so luna can tell this channel from
Telegram or the dashboard, and adjust — no kaomoji, no markdown, short
answers. Put the rule in HER profile on mars rather than only in
systemPrompt below: the marker travels with the message, so it still
identifies the channel in whatever history Hermes keeps, and one place
governs her voice manners across every client that sends it.
answers. The rules themselves go in systemPrompt below; the marker is
what still identifies the channel in the history Hermes keeps.
Empty string disables the marker.
'';
+3
View File
@@ -51,6 +51,9 @@ in
FTLCONF_dns_hosts = "10.0.0.10 mercury.sol;10.0.0.20 jupiter.sol";
# Wildcard: any <service>.jupiter.sol -> jupiter (caddy routes by hostname).
FTLCONF_misc_dnsmasq_lines = "address=/jupiter.sol/10.0.0.20";
# Steam's query bursts got terra rate-limited; both 0 disables the limit.
FTLCONF_dns_rateLimit_count = "0";
FTLCONF_dns_rateLimit_interval = "0";
};
};
};