feat(skills): Skill entscheidet selbst ob vorgelesen wird (manifest.speak)
Verallgemeinert das "run_* → stumm"-Heuristik: jeder Skill deklariert im Manifest ein speak-Flag. - speak=false (Default) = Steuerbefehl (Spotify, Licht) → kein TTS, App beendet direkt (STOP), wie bisher. - speak=true = Antwort-Skill (Info/Ergebnis) → Antwort wird vorgelesen + Gespraechs-Fenster bleibt offen. Gilt für BEIDE Pfade: Fast-Path (_fast_path_speak aus skill.speak) und lokale Skill-Ausführung (_local_turn_speak = _skill_speak_flag(run_*)). Info-Tools (web_search/memory_search/trigger_timer) bleiben gesprochen. - skills.py: speak in create_skill + update_skill-allowed. - agent.py: skill_create/skill_update Tool-Schema dokumentiert speak (damit ARIA es beim Skill-Bau setzen kann), Dispatch reicht es durch. - App: _isSilent nur noch speak===false (kein answeredBy=fast-path-Fallback mehr, sonst waere ein speak=true-Fast-Path faelschlich stumm). Bestehende Skills ohne Feld = false = stumm (kein Verhaltenswechsel). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -165,6 +165,7 @@ def create_skill(
|
||||
author: str = "aria",
|
||||
config_schema: Optional[list] = None,
|
||||
fast_patterns: Optional[list] = None,
|
||||
speak: bool = False,
|
||||
) -> dict:
|
||||
"""Legt einen neuen Skill an. Wirft ValueError bei ungueltigen Inputs.
|
||||
|
||||
@@ -215,6 +216,11 @@ def create_skill(
|
||||
"author": author,
|
||||
"config_schema": _normalize_config_schema(config_schema),
|
||||
"fast_patterns": _normalize_fast_patterns(fast_patterns),
|
||||
# speak: soll die Antwort dieses Skills vorgelesen werden (TTS)?
|
||||
# False (Default) = reiner Steuerbefehl (Spotify, Licht) → stumm, App
|
||||
# beendet direkt. True = Antwort-Skill (Info/Ergebnis) → vorlesen +
|
||||
# Gespraechs-Fenster. Gilt fuer Fast-Path UND local-Skill-Ausfuehrung.
|
||||
"speak": bool(speak),
|
||||
"version_history": [],
|
||||
}
|
||||
write_manifest(name, manifest)
|
||||
@@ -335,10 +341,12 @@ def update_skill(name: str, patch: dict) -> dict:
|
||||
# nach archive_current_version manifest neu laden (version_history geupdatet)
|
||||
manifest = read_manifest(name) or manifest
|
||||
|
||||
allowed = {"description", "args", "requires", "active", "version", "entry"}
|
||||
allowed = {"description", "args", "requires", "active", "version", "entry", "speak"}
|
||||
for k, v in patch.items():
|
||||
if k in allowed:
|
||||
manifest[k] = v
|
||||
if "speak" in patch:
|
||||
manifest["speak"] = bool(patch["speak"])
|
||||
if "config_schema" in patch:
|
||||
manifest["config_schema"] = _normalize_config_schema(patch["config_schema"])
|
||||
if "fast_patterns" in patch:
|
||||
|
||||
Reference in New Issue
Block a user