remove redundant marauder wrappers and anthropic dependency
memory.py and marauder_cart.py were subprocess wrappers around marauder CLI — redundant now that the opencode chat agent has native EEMS tools. Also remove custom TOOLS dict, EEMS context injection at session start, marauder_cart.create() in calibration_done, and anthropic dep/env vars. Inline slug() as _slug() in calibration.py.
This commit is contained in:
+17
-3
@@ -62,6 +62,7 @@ from __future__ import annotations
|
||||
import logging
|
||||
import os
|
||||
import random
|
||||
import re
|
||||
from dataclasses import dataclass, field
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
@@ -733,11 +734,24 @@ def step(state: CalibrationState, answer: str) -> list[dict[str, Any]]:
|
||||
return [_question_message(questions[state.step], lang=lang)]
|
||||
|
||||
|
||||
def _slug(s: str) -> str:
|
||||
"""Slugify for cart tags. Lowercase, ASCII-only, dash-separated."""
|
||||
if not s:
|
||||
return ""
|
||||
s = s.lower().strip()
|
||||
table = str.maketrans({
|
||||
"ą": "a", "ć": "c", "ę": "e", "ł": "l", "ń": "n",
|
||||
"ó": "o", "ś": "s", "ź": "z", "ż": "z",
|
||||
})
|
||||
s = s.translate(table)
|
||||
s = re.sub(r"[^a-z0-9]+", "-", s)
|
||||
return s.strip("-")
|
||||
|
||||
|
||||
def _make_tag(persona_name: str, operator_email: str) -> str:
|
||||
"""`<persona-slug>-<operator-slug>` — e.g. samantha-adam."""
|
||||
from app.marauder_cart import slug
|
||||
op_slug = slug(operator_email.split("@", 1)[0])
|
||||
persona_slug = slug(persona_name) or "companion"
|
||||
op_slug = _slug(operator_email.split("@", 1)[0])
|
||||
persona_slug = _slug(persona_name) or "companion"
|
||||
return f"{persona_slug}-{op_slug}" if op_slug else persona_slug
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user