Données et étiquettes hors du dépôt : data -> ~/aimsight-data/data, labeling -> ~/labeling (dépôts partagés) ; le pompage part dans aimsight-data
L'app ne résout plus les liens (les agents voient data/ et labeling/) et donne leur cible à claude -p par --add-dir. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
462ba9e9a1
commit
679a124fd3
66 files changed
+21
-3290
No files matched your search
@@ -28,7 +28,7 @@ AMELIORER = """/detectors:wf-improve DETECTORS: detectors/. STATION: {donnees}/{
|
||||
LABELS: {etiquettes}/auto/{station}.jsonl. REFERENCE: --labels {etiquettes}/auto --data {donnees}. \
|
||||
FAMILIES: {etiquettes}/familles.md. CONTEXT: {analyse}/rapport.md. OUT: {sortie}/. Caller's context: Diagnostic-app, \
|
||||
the detectors/ submodule; read-only on {donnees}/ and {etiquettes}/; commit only in detectors/, on its current branch; \
|
||||
OUT is in Diagnostic-app: do not commit it."""
|
||||
OUT is in the labeling repository (labeling/ is a link to it): do not commit it."""
|
||||
DEMANDE = """Station : data/{station}/. Plage : {debut} → {fin} (UTC). Indices de l'utilisateur : {indices}. \
|
||||
Dossier de sortie : {sortie}/."""
|
||||
|
||||
@@ -73,7 +73,7 @@ def travailler(nom, sortie, prompt, reprise=None):
|
||||
a = analyses[nom]
|
||||
try:
|
||||
p = subprocess.Popen(["claude", "-p", prompt, "--agent", "analyste", "--output-format", "stream-json", "--verbose",
|
||||
"--allowedTools", "Read,Write,Bash", "--permission-mode", "acceptEdits"]
|
||||
"--allowedTools", "Read,Write,Bash", "--permission-mode", "acceptEdits", *station.liens()]
|
||||
+ (["--resume", reprise] if reprise else []),
|
||||
cwd=station.RACINE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
|
||||
with open(sortie / "travail" / "journal.jsonl", "a", encoding="utf-8") as journal:
|
||||
@@ -275,7 +275,7 @@ def optimiser_fil(nom):
|
||||
[f"Analyse : {rel}/. Écris {rel}/outils.md.", "--agent", "tool-builder", "--allowedTools", "Read,Write,Edit,Bash"]]
|
||||
for prompt, *options in tours:
|
||||
p = subprocess.Popen(["claude", "-p", prompt, "--output-format", "stream-json", "--verbose",
|
||||
"--permission-mode", "acceptEdits", *options],
|
||||
"--permission-mode", "acceptEdits", *station.liens(), *options],
|
||||
cwd=station.RACINE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
|
||||
for ligne in p.stdout:
|
||||
flux.write(ligne)
|
||||
|
||||
+10
-2
@@ -20,8 +20,16 @@ sys.path[:0] = [str(RACINE / "agent-tools"), str(RACINE / "detectors" / "scripts
|
||||
import donnees # noqa: E402
|
||||
from categories import events # noqa: E402
|
||||
|
||||
DONNEES = Path(os.environ.get("AIMSIGHT_DATA", RACINE / "data")).resolve()
|
||||
ETIQUETTES = Path(os.environ.get("AIMSIGHT_LABELS", RACINE / "labeling")).resolve()
|
||||
# data/ et labeling/ sont des liens vers ~/aimsight-data/data et ~/labeling : pas de resolve(), les agents voient data/ et labeling/
|
||||
DONNEES = Path(os.environ.get("AIMSIGHT_DATA", RACINE / "data")).absolute()
|
||||
ETIQUETTES = Path(os.environ.get("AIMSIGHT_LABELS", RACINE / "labeling")).absolute()
|
||||
|
||||
|
||||
def liens():
|
||||
"""--add-dir pour claude -p : la cible réelle des liens data/ et labeling/, hors du dépôt."""
|
||||
return [a for d in (DONNEES, ETIQUETTES) for a in ("--add-dir", str(d.resolve()))]
|
||||
|
||||
|
||||
DOSSIERS = ("auto", "manual") # celles des agents et de la page (D-105), celles de l'expert (D-102)
|
||||
FAMILLES = ("Visibility", "Obstruction", "Thermal displacement", "Displacement", "Target issue", "No data", "None") # D-109
|
||||
FORMAT = "%Y-%m-%dT%H:%MZ"
|
||||
|
||||
Reference in new issue
Block a user