feat: Workspace-Umbau Schritt 6 — QEMU fuer alle Architekturen + set_project_kind
QEMU auf dem Host + ARIA-Anbindung:
- host-provisioning/qemu-setup.sh: installiert qemu-system-* (x86/arm/mips/ppc/
sparc/misc), qemu-utils, Firmware, socat, imagemagick + den aria-vm-Helper.
- host-provisioning/aria-vm: VM-Verwaltung fuer JEDE Architektur (create/boot/
screenshot/list/stop/rm). VNC bindet nur 127.0.0.1:<display> (Tunnel via
Bridge), KVM nur fuer x86-Gaeste, sonst TCG.
- Brain: Projekt-Modell bekommt kind ('chat'|'code'); neues Tool
set_project_kind markiert das aktive Projekt (blendet Editor/Desktop in der
App ein) + feuert project_changed.
- Seed-Regel: ARIA weiss jetzt, dass Code unter /shared/projects/<id>/ gehoert
und wie sie per `ssh aria-wohnung aria-vm ...` VMs baut/testet; VNC landet
automatisch in der Desktop-Kachel.
py-compile clean, Host-Skripte bash -n OK.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1080,6 +1080,28 @@ META_TOOLS = [
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": "set_project_kind",
|
||||
"description": (
|
||||
"Markiert das AKTUELLE Projekt als Code-Projekt ('code') oder "
|
||||
"normalen Chat ('chat'). Bei 'code' blendet die App zusaetzlich "
|
||||
"einen Live-Code-Editor und den QEMU-Desktop (VNC) ein. Rufe es auf, "
|
||||
"sobald aus einem Gespraech ein Programmier-/Bau-Projekt wird (Du "
|
||||
"faengst an Code zu schreiben, eine VM zu bauen, etc.). Dein "
|
||||
"Arbeitsverzeichnis fuer Code-Dateien ist dann /shared/projects/"
|
||||
"<projekt-id>/ — nur was Du DORT schreibst erscheint im Editor."
|
||||
),
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {"type": "string", "enum": ["code", "chat"], "description": "'code' oder 'chat'."},
|
||||
},
|
||||
"required": ["kind"],
|
||||
},
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
@@ -2576,6 +2598,27 @@ class Agent:
|
||||
"action": "ended",
|
||||
})
|
||||
return f"OK — Projekt '{p['name']}' beendet (id={p['id']}). Bleibt in der Liste, aktiv ist jetzt der Hauptthread."
|
||||
if name == "set_project_kind":
|
||||
kind = (arguments.get("kind") or "").strip().lower()
|
||||
if kind not in ("code", "chat"):
|
||||
return "FEHLER: kind muss 'code' oder 'chat' sein."
|
||||
active_id = projects_mod.get_active()
|
||||
if not active_id:
|
||||
return ("Kein aktives Projekt — Du bist im Hauptthread. Erst ein Projekt "
|
||||
"anlegen/betreten (project_create/project_enter), dann set_project_kind.")
|
||||
updated = projects_mod.update_project(active_id, {"kind": kind})
|
||||
if not updated:
|
||||
return f"FEHLER: aktives Projekt '{active_id}' nicht gefunden."
|
||||
self._pending_events.append({
|
||||
"type": "project_changed",
|
||||
"project": updated,
|
||||
"action": "kind_changed",
|
||||
})
|
||||
if kind == "code":
|
||||
return (f"OK — Projekt '{updated['name']}' ist jetzt ein Code-Projekt. "
|
||||
f"Editor + Desktop erscheinen in der App. Code-Dateien unter "
|
||||
f"/shared/projects/{active_id}/ schreiben, damit sie im Editor auftauchen.")
|
||||
return f"OK — Projekt '{updated['name']}' ist wieder ein normaler Chat."
|
||||
return f"Unbekanntes Tool: {name}"
|
||||
except Exception as exc:
|
||||
logger.exception("Tool '%s' fehlgeschlagen", name)
|
||||
|
||||
Reference in New Issue
Block a user