No domain logic in the app: labels checked by labeling (validate.check, ids.assign), client message and action by labeling/client.py, events by categories.window, references by data.is_reference; manual/ no longer written
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7332306b79
commit
a733575d65
7 files changed
+63
-109
No files matched your search
@@ -55,7 +55,7 @@ def _optimizing():
|
||||
|
||||
def launch(body):
|
||||
st, start, end = body.get("station"), body.get("start"), body.get("end")
|
||||
station._validate({"description": "-"}, start, end)
|
||||
station.checked_range(start, end)
|
||||
station.folder(st)
|
||||
if not (AGENTS / ".claude-plugin" / "plugin.json").exists():
|
||||
raise station.Refusal("no agents in agents/ (the link: README.md)")
|
||||
@@ -156,8 +156,9 @@ def submit(st, name, out):
|
||||
for l in text.split("\n"):
|
||||
if l.strip():
|
||||
e = json.loads(l)
|
||||
station._validate(e, e.get("start"), e.get("end"))
|
||||
new.append({k: e[k] for k in ("start", "end", "family", "description") if k in e} | {"analysis": name})
|
||||
label = {k: e[k] for k in ("start", "end", "family", "description") if k in e}
|
||||
station.checked(label)
|
||||
new.append(label | {"analysis": name})
|
||||
if copy.exists() and copy.read_text(encoding="utf-8") == text:
|
||||
return len(new)
|
||||
# ponytail: removed then put back, the labels of the analysis lose the edits made in the page; keeping them would
|
||||
@@ -166,7 +167,7 @@ def submit(st, name, out):
|
||||
f = station.label_file(st, "auto") # the other lines stay as they are
|
||||
kept = [l for l in (f.read_text(encoding="utf-8").split("\n") if f.exists() else [])
|
||||
if l.strip() and json.loads(l).get("analysis") != name]
|
||||
station.assign_ids(st, [json.loads(l) for l in kept] + new)
|
||||
station.ids.assign(st, [json.loads(l) for l in kept] + new)
|
||||
temp = f.with_name(f.name + ".tmp")
|
||||
temp.write_text("".join(l + "\n" for l in kept + [json.dumps(e, ensure_ascii=False) for e in new]), encoding="utf-8")
|
||||
os.replace(temp, f)
|
||||
|
||||
Reference in new issue
Block a user