Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
chore(i18n): translate German to English in skill authoring runner/lifecycle/loader
Ruben Lütke5dfd759f2787
diff --git a/jarvis/skills/authoring/runner.py b/jarvis/skills/authoring/runner.pyindex 7880ae9c67..441f1c549d 100644--- a/jarvis/skills/authoring/runner.py+++ b/jarvis/skills/authoring/runner.py@@ -1,23 +1,22 @@-"""SkillAuthoringRunner — orchestriert OpenClaw-Author-Spawn + Validation-Loop.--Welle-4-Migration: vorher hiess der Spawn-Pfad ``Sub-Jarvis``. Nach der-OpenClaw-Bridge-Migration (siehe docs/openclaw-bridge.md §11, R-6) wird der-Spawn-Callback an den ``MissionManager`` gebunden — die ``SpawnCallback``--Signatur (``str -> Awaitable[str]``) bleibt rueckwaertskompatibel und kann-sowohl direkt einen Brain-Call als auch ein Mission-Dispatch + Result-Read-implementieren.--Plan-§7.5-Pipeline:-1. Slug-Generierung (kebab-case aus suggested_name oder LLM-derived)-2. Clash-Check gegen user_skills_dir-3. Staging-Dir-Anlage (tempfile.mkdtemp)-4. OpenClaw-Author-Spawn mit Aufgabenbeschreibung-5. Validation-Loop ≤3 Iterationen-6. Erfolgs-Pfad: draft_writer kopiert nach user_skills_dir mit forced state=draft-7. SkillRegistry-Watcher detektiert + UI zeigt Warn-Badge--Plan-§AP-6: keine Auto-Aktivierung. Plan-§AP-7: Skill-Authoring NIE im-Hauptjarvis-Pfad — nur OpenClaw-Author (Frontier-Worker via Mission-Manager).+"""SkillAuthoringRunner — orchestrates the OpenClaw-Author spawn + validation loop.++Welle-4 migration: the spawn path used to be called ``Sub-Jarvis``. After the+OpenClaw-bridge migration (see docs/openclaw-bridge.md §11, R-6), the+spawn callback is bound to the ``MissionManager`` — the ``SpawnCallback``+signature (``str -> Awaitable[str]``) stays backward-compatible and can+implement either a direct brain call or a mission dispatch + result read.++Plan-§7.5 pipeline:+1. Slug generation (kebab-case from suggested_name or LLM-derived)+2. Clash check against user_skills_dir+3. Staging-dir creation (tempfile.mkdtemp)+4. OpenClaw-Author spawn with a task description+5. Validation loop ≤3 iterations+6. Success path: draft_writer copies to user_skills_dir with forced state=draft+7. SkillRegistry watcher detects it + the UI shows a warn badge++Plan-§AP-6: no auto-activation. Plan-§AP-7: skill authoring NEVER in the+main-Jarvis path — only OpenClaw-Author (frontier worker via Mission-Manager)."""from __future__ import annotations@@ -48,13 +47,13 @@ from .schema import SkillDraft_LOG = logging.getLogger(__name__)-DEFAULT_TIMEOUT_SECONDS = 300.0 # 5 Minuten (Plan-§7.5)-DEFAULT_MAX_ITERATIONS = 3 # Plan-§7.5 Validation-Loop ≤3+DEFAULT_TIMEOUT_SECONDS = 300.0 # 5 minutes (Plan-§7.5)+DEFAULT_MAX_ITERATIONS = 3 # Plan-§7.5 validation loop ≤3@dataclass(frozen=True)class AuthoringSuccess:- """Erfolgreicher Authoring-Versuch."""+ """A successful authoring attempt."""skill_name: strslug: str@@ -66,7 +65,7 @@ class AuthoringSuccess:@dataclass(frozen=True)class AuthoringFailure:- """Fehlgeschlagener Authoring-Versuch."""+ """A failed authoring attempt."""error_kind: strmessage: str@@ -74,44 +73,44 @@ class AuthoringFailure:validation_errors: tuple[str, ...] = field(default_factory=tuple)-# Spawn-Callback: dependency-injected, damit Tests den OpenClaw-Author-Aufruf-# mocken können (Plan-Constraint: NIE echte API-Calls in Tests).+# Spawn callback: dependency-injected, so tests can mock the OpenClaw-Author+# call (plan constraint: NEVER real API calls in tests).SpawnCallback = Callable[[str], "asyncio.Future[str] | str"]# -----------------------------------------------------------------------# System-Prompt für OpenClaw-Author (Plan-§7.5)+# System prompt for OpenClaw-Author (Plan-§7.5)# -----------------------------------------------------------------------OPENCLAW_AUTHOR_SYSTEM_PROMPT = """Du bist OpenClaw-Author (Opus 4.7), Skill-Authoring-Spezialist.+OPENCLAW_AUTHOR_SYSTEM_PROMPT = """You are OpenClaw-Author (Opus 4.7), a skill-authoring specialist.-Der User möchte einen neuen Skill erzeugen. Du gibst NUR ein einziges JSON--Objekt zurück, das exakt dem `SkillDraft`-Schema entspricht. Keine Prosa-außenherum, kein Markdown-Codefence — pures JSON.+The user wants to create a new skill. You return ONLY a single JSON+object that exactly matches the `SkillDraft` schema. No surrounding+prose, no Markdown codefence — pure JSON.-Constraints (verbindlich, NIE überschreibbar):-- Du erzeugst NIEMALS ausführbaren Code außerhalb der Skill-Sandbox-Boundary.- Erlaubte Imports stehen in `jarvis/skills/safe_imports.txt`.-- Du gibst NIEMALS state ≠ "draft" aus, auch wenn der User darum bittet —- die Pipeline forciert "draft" ohnehin (state-Override-Audit erinnert dich).+Constraints (binding, NEVER overridable):+- You NEVER produce executable code outside the skill-sandbox boundary.+ Allowed imports are listed in `jarvis/skills/safe_imports.txt`.+- You NEVER output state != "draft", even if the user asks for it —+ the pipeline forces "draft" anyway (a state-override audit reminds you).- `eval`, `exec`, `compile`, `os.system`, `subprocess.Popen(shell=True)`- werden vom Promote-Lint geblockt — Skills mit solchen Calls werden- abgelehnt.-- Slug ist lowercase, kebab-case, max 64 Zeichen, keine Pfad-Trennzeichen.-- Body ist Markdown mit YAML-Frontmatter — Body-Markdown ohne Frontmatter,- Frontmatter wird vom draft_writer rekonstruiert.+ are blocked by the promote lint — skills with such calls are+ rejected.+- Slug is lowercase, kebab-case, max 64 characters, no path separators.+- Body is Markdown with a YAML frontmatter — body Markdown without frontmatter,+ the frontmatter is reconstructed by draft_writer.-Format-Beispiel (JSON):+Format example (JSON):{"slug": "spotify-auto-pause","name": "Spotify Auto-Pause",- "description": "Pausiert Spotify wenn der User redet.",+ "description": "Pauses Spotify when the user speaks.","category": "automation","intent": "User wants Spotify to pause during voice interactions","triggers_yaml": "[{type: voice, pattern: '^pause spotify'}]","requires_tools": ["run-shell"],- "body_markdown": "## Spotify Auto-Pause\\n\\nDieser Skill ...",+ "body_markdown": "## Spotify Auto-Pause\\n\\nThis skill ...","state": "draft"}"""@@ -123,7 +122,7 @@ Format-Beispiel (JSON):class SkillAuthoringRunner:- """Plan-§7.5 Authoring-Pipeline (OpenClaw-Author-Spawn + Validation-Loop)."""+ """Plan-§7.5 authoring pipeline (OpenClaw-Author spawn + validation loop)."""def __init__(self,@@ -147,7 +146,7 @@ class SkillAuthoringRunner:suggested_name: str | None = None,trigger_hint: str | None = None,) -> AuthoringSuccess | AuthoringFailure:- """Hauptmethode. Plan-§7.5-Voice-Output:+ """Main method. Plan-§7.5 voice output:SUCCESS / VALIDATION_FAIL / TIMEOUT."""prompt = self._build_user_prompt(@@ -166,7 +165,7 @@ class SkillAuthoringRunner:except TimeoutError:self._record_audit(error_kind="author_timeout",- message=f"OpenClaw-Author-Spawn timeout nach {self._timeout_seconds}s",+ message=f"OpenClaw-Author spawn timeout after {self._timeout_seconds}s",iterations=iteration,intent=intent,)@@ -196,13 +195,13 @@ class SkillAuthoringRunner:validation_errors=last_errors,)- # Sicherheits-Lint vor dem Schreiben (Plan-§7.5)+ # Security lint before writing (Plan-§7.5)findings = safe_lint_skill_body(draft.body_markdown)if findings:last_errors = tuple(findings)if iteration < self._max_iterations:prompt = self._build_retry_prompt(- prompt, "Skill-Body enthält verbotene Calls: "+ prompt, "Skill body contains forbidden calls: "+ ", ".join(findings))continue@@ -214,12 +213,12 @@ class SkillAuthoringRunner:)return AuthoringFailure(error_kind="unsafe",- message="Skill-Body enthält unerlaubte Calls",+ message="Skill body contains disallowed calls",iterations=iteration,validation_errors=last_errors,)- # Erfolgs-Pfad+ # Success pathtry:result: DraftWriteResult = write_draft(draft, user_skills_root=self._user_skills_root@@ -255,10 +254,10 @@ class SkillAuthoringRunner:review_url=f"/api/skills/{result.slug}",)- # Schleife verlassen ohne return → defensive Fallback+ # Loop exited without returning → defensive fallbackreturn AuthoringFailure(error_kind="exhausted",- message="Validation-Loop nach 3 Iterationen ohne Erfolg",+ message="Validation loop after 3 iterations without success",iterations=self._max_iterations,validation_errors=last_errors,)@@ -268,7 +267,7 @@ class SkillAuthoringRunner:# ------------------------------------------------------------------async def _call_spawn(self, prompt: str) -> str:- """Nutzt die injizierte Spawn-Callback. Awaitable oder direct str."""+ """Uses the injected spawn callback. Awaitable or direct str."""result = self._spawn(prompt)if asyncio.iscoroutine(result):return await result@@ -289,28 +288,28 @@ class SkillAuthoringRunner:if trigger_hint:parts.append(f"Trigger hint: {trigger_hint}")parts.append(- "\nLiefere ein JSON-Objekt nach dem SkillDraft-Schema. "- "Nur JSON, keine Prosa."+ "\nReturn a JSON object matching the SkillDraft schema. "+ "JSON only, no prose.")return "\n".join(parts)def _build_retry_prompt(self, last_prompt: str, error: str) -> str:return (last_prompt- + f"\n\nFehler beim letzten Versuch: {error}\n"- + "Bitte korrigiere und versuche erneut."+ + f"\n\nError on the last attempt: {error}\n"+ + "Please correct it and try again.")def _parse_draft(self, response: str) -> SkillDraft:- """Extrahiert JSON aus der OpenClaw-Author-Response.+ """Extracts JSON from the OpenClaw-Author response.- OpenClaw-Author sollte pures JSON liefern; wir tolerieren ein- einrahmendes ```json…``` für Markdown-Bias.+ OpenClaw-Author should deliver pure JSON; we tolerate an+ enclosing ```json…``` for Markdown bias."""import jsoncleaned = response.strip()- # Markdown-Codefence stripen, falls vorhanden+ # Strip a Markdown codefence, if presentif cleaned.startswith("```"):match = re.match(r"```(?:json)?\s*\n?(.*?)```",@@ -322,9 +321,9 @@ class SkillAuthoringRunner:try:data = json.loads(cleaned)except json.JSONDecodeError as exc:- raise ValueError(f"OpenClaw-Author-Response ist kein valides JSON: {exc}") from exc+ raise ValueError(f"OpenClaw-Author response is not valid JSON: {exc}") from excif not isinstance(data, dict):- raise ValueError("OpenClaw-Author-Response muss ein JSON-Objekt sein")+ raise ValueError("OpenClaw-Author response must be a JSON object")return SkillDraft.model_validate(data)def _record_audit(@@ -338,7 +337,7 @@ class SkillAuthoringRunner:draft_path: str | None = None,forced_state_override: bool = False,) -> None:- """Schreibt Audit-Event mit `type=skill_authored` (Plan-§7.5)."""+ """Writes an audit event with `type=skill_authored` (Plan-§7.5)."""extras: dict[str, Any] = {"type": "skill_authored","intent": intent,@@ -365,4 +364,4 @@ class SkillAuthoringRunner:))except Exception as exc: # noqa: BLE001- _LOG.warning("Skill-Authoring-Audit fehlgeschlagen: %s", exc)+ _LOG.warning("Skill-authoring audit failed: %s", exc)diff --git a/jarvis/skills/lifecycle.py b/jarvis/skills/lifecycle.pyindex e6acf736cf..6d1d6af38a 100644--- a/jarvis/skills/lifecycle.py+++ b/jarvis/skills/lifecycle.py@@ -1,7 +1,7 @@-"""Lifecycle-Manager: State-Transitions + optionales Git-Auto-Versioning.+"""Lifecycle manager: state transitions + optional git auto-versioning.-Git-Support ist optional: wenn ``gitpython`` nicht installiert ist oder-``autoversion=False`` gesetzt wurde, arbeitet der Manager rein in-memory.+Git support is optional: if ``gitpython`` is not installed or+``autoversion=False`` was set, the manager works purely in-memory."""from __future__ import annotations@@ -43,7 +43,7 @@ _ALLOWED_TRANSITIONS: dict[SkillLifecycleState, set[SkillLifecycleState]] = {@dataclassclass AuditEntry:- """Ein Eintrag im In-Memory-Audit-Log."""+ """An entry in the in-memory audit log."""skill_name: strfrom_state: SkillLifecycleStateto_state: SkillLifecycleState@@ -52,7 +52,7 @@ class AuditEntry:class LifecycleManager:- """Verwaltet Skill-State-Transitions + optional Git-Commits."""+ """Manages skill state transitions + optional git commits."""def __init__(self, root: Path, autoversion: bool = True) -> None:self.root = Path(root)@@ -63,7 +63,7 @@ class LifecycleManager:self._ensure_repo()# ------------------------------------------------------------------- # Git-Init+ # Git init# ------------------------------------------------------------------def _ensure_repo(self) -> None:@@ -76,7 +76,7 @@ class LifecycleManager:self._repo = _git.Repo(self.root) # type: ignore[union-attr]except _git.InvalidGitRepositoryError: # type: ignore[attr-defined]self._repo = _git.Repo.init(self.root) # type: ignore[union-attr]- log.info("skill-root initialisiert als git-repo: %s", self.root)+ log.info("skill-root initialized as a git repo: %s", self.root)except _git.NoSuchPathError: # type: ignore[attr-defined]self.root.mkdir(parents=True, exist_ok=True)self._repo = _git.Repo.init(self.root) # type: ignore[union-attr]@@ -86,7 +86,7 @@ class LifecycleManager:self._repo = None# ------------------------------------------------------------------- # State-Transitions+ # State transitions# ------------------------------------------------------------------def transition(@@ -96,9 +96,9 @@ class LifecycleManager:to_state: SkillLifecycleState,reason: str = "",) -> Skill:- """Validiert die Transition + gibt einen neuen Skill mit neuem State zurück.+ """Validates the transition + returns a new skill with the new state.- Raises ``ValueError`` wenn die Transition nicht erlaubt ist.+ Raises ``ValueError`` if the transition is not allowed."""if to_state not in _ALLOWED_TRANSITIONS.get(from_state, set()):raise ValueError(@@ -127,11 +127,11 @@ class LifecycleManager:return list(self._audit)# ------------------------------------------------------------------- # Git-Commits+ # Git commits# ------------------------------------------------------------------def commit_change(self, skill: Skill, message: str) -> str | None:- """Committet die SKILL.md-Änderung. Gibt Commit-Hash oder None zurück."""+ """Commits the SKILL.md change. Returns a commit hash or None."""if not self.autoversion or self._repo is None:return Nonetry:diff --git a/jarvis/skills/loader.py b/jarvis/skills/loader.pyindex 544f72f9af..700f4414bb 100644--- a/jarvis/skills/loader.py+++ b/jarvis/skills/loader.py@@ -1,11 +1,11 @@-"""Skill-Loader: Markdown-File → Skill.+"""Skill loader: Markdown file → Skill.-Benötigt optional `python-frontmatter`. Wenn nicht verfügbar, fällt er auf-einen eingebauten YAML-Frontmatter-Splitter zurück (`---\\n...\\n---\\n`).+Optionally needs `python-frontmatter`. If not available, it falls back to+a built-in YAML frontmatter splitter (`---\\n...\\n---\\n`).-Kaputte Files werden NICHT geraised — sie landen als `DRAFT` mit gesetztem-`error`-Field im Skill. So kann das Registry eine Diagnose anzeigen ohne-die ganze Pipeline zu töten.+Broken files are NOT raised — they land as `DRAFT` with the `error`+field set on the skill. This lets the registry show a diagnosis without+killing the whole pipeline."""from __future__ import annotations@@ -41,11 +41,11 @@ def _body_hash(body: str) -> str:def _scan_resources(skill_root: Path) -> dict[str, tuple[str, ...]]:- """Listet die Bundle-Resource-Sibling-Ordner (references/scripts/assets/agents).+ """Lists the bundle-resource sibling folders (references/scripts/assets/agents).- Gibt pro Kind die Liste der File-Pfade *relativ zum Kind-Ordner* zurueck,- sortiert. Fehlende Ordner landen als leeres Tuple — Aufrufer muss kein- defaultdict fuehren. Symlinks werden dereferenziert (``rglob`` folgt ihnen).+ Returns, per kind, the list of file paths *relative to the kind folder*,+ sorted. A missing folder lands as an empty tuple — the caller doesn't need to+ carry a defaultdict. Symlinks are dereferenced (``rglob`` follows them)."""out: dict[str, tuple[str, ...]] = {}for kind in RESOURCE_KINDS:@@ -56,7 +56,7 @@ def _scan_resources(skill_root: Path) -> dict[str, tuple[str, ...]]:files: list[str] = []for p in kind_dir.rglob("*"):if p.is_file():- # Pfad relativ zum Kind-Ordner, forward-slashes fuer UI-Konsistenz+ # Path relative to the kind folder, forward slashes for UI consistencyrel = p.relative_to(kind_dir).as_posix()files.append(rel)out[kind] = tuple(sorted(files))@@ -64,9 +64,9 @@ def _scan_resources(skill_root: Path) -> dict[str, tuple[str, ...]]:def _split_frontmatter(text: str) -> tuple[dict, str]:- """Trennt YAML-Frontmatter vom Markdown-Body.+ """Splits the YAML frontmatter from the Markdown body.- Bevorzugt python-frontmatter, fällt sonst auf manuellen Split zurück.+ Prefers python-frontmatter, otherwise falls back to a manual split."""if _HAVE_FRONTMATTER:post = _frontmatter.loads(text) # type: ignore[union-attr]@@ -74,11 +74,11 @@ def _split_frontmatter(text: str) -> tuple[dict, str]:if not _HAVE_YAML:raise RuntimeError(- "Weder python-frontmatter noch PyYAML installiert — "- "Skill-Parsing nicht möglich."+ "Neither python-frontmatter nor PyYAML installed — "+ "skill parsing not possible.")- # Manueller Split: '---\n<yaml>\n---\n<body>'+ # Manual split: '---\n<yaml>\n---\n<body>'if text.startswith("---"):parts = text.split("---", 2)if len(parts) >= 3:@@ -86,15 +86,15 @@ def _split_frontmatter(text: str) -> tuple[dict, str]:body = parts[2].lstrip("\n")meta = yaml.safe_load(fm_str) or {}if not isinstance(meta, dict):- raise ValueError("Frontmatter muss ein YAML-Mapping sein")+ raise ValueError("Frontmatter must be a YAML mapping")return meta, bodyreturn {}, textdef parse_skill(path: Path) -> Skill:- """Lädt eine einzelne SKILL.md und gibt einen Skill zurück.+ """Loads a single SKILL.md and returns a Skill.- Niemals raise — Fehler landen im `error`-Feld + DRAFT-State.+ Never raises — errors land in the `error` field + DRAFT state."""path = Path(path)resources = _scan_resources(path.parent)@@ -158,9 +158,9 @@ def parse_skill(path: Path) -> Skill:resources=resources,)- # Phase 7.5: Wenn das Frontmatter explizit `state: draft` setzt, übernehmen.- # OpenClaw-authored Skills landen so deterministisch im DRAFT-Pool und- # werden vom Hot-Reload-Active-Filter ausgeschlossen (Plan-§AD-8).+ # Phase 7.5: if the frontmatter explicitly sets `state: draft`, honor it.+ # This deterministically puts OpenClaw-authored skills into the DRAFT pool+ # and excludes them from the hot-reload active filter (Plan-§AD-8).final_state = (fm.state if fm.state is not None else SkillLifecycleState.VALIDATED)@@ -177,7 +177,7 @@ def parse_skill(path: Path) -> Skill:def discover_skills(root: Path) -> list[Skill]:- """Walkt `root` rekursiv nach SKILL.md-Dateien."""+ """Walks `root` recursively for SKILL.md files."""root = Path(root)if not root.exists():return []