OUTPUT #723 | 4969 karakter | 118 satır
========== YENİ KOMUT | 17.09.2026 15:58:00 ==========


========== YENİ KOMUT | 17.09.2026 15:58:00 ==========

/home/hermes/.hermes/plugins/shorts-production-guard/__init__.py
270-        item = dict(c)
271-        src = item.get("src")
272-        if isinstance(src, str) and src.strip():
273-            path = Path(src).expanduser()
274-            if path.exists():
275-                st = path.stat()
276:                item["_source_identity"] = {
277-                    "path": str(path.resolve()),
278-                    "size": st.st_size,
279-                    "mtime_ns": st.st_mtime_ns,
280-                }
281-            else:
282:                item["_source_identity"] = {"path": str(path), "missing": True}
283-        normalized.append(item)
284-
285-    selected_casting = []
286-    for index, shot in enumerate(data.get("shots") or []):
287-        if not isinstance(shot, dict):
288-            continue
289-        kind = str(shot.get("type") or "").lower()
290:        origin = str(shot.get("source_origin") or "").strip().lower()
291-        src_value = shot.get("src")
292-        footage_backed = (
293-            "footage" in kind
294-            or (
295:                shot.get("materialized") is True
296-                and bool(origin)
297-                and not origin.startswith(("generated:", "synthetic:", "ai-generated:"))
298-                and isinstance(src_value, str)
299-                and Path(src_value).expanduser().suffix.lower() in {".mp4", ".mov", ".mkv", ".webm", ".m4v"}
300-            )
301-        )
302-        if not footage_backed:
303-            continue
304-        item = {
305-            "shot": index,
306-            "src": shot.get("src"),
307:            "source_origin": shot.get("source_origin"),
308:            "visual_goal": shot.get("visual_goal"),
309-            "in": shot.get("in", 0),
310-            "duration": shot.get("duration"),
311-            "casting": shot.get("casting"),
312-        }
313-        src = item.get("src")
314-        if isinstance(src, str) and src.strip():
315-            path = Path(src).expanduser()
316-            if path.exists():
317-                st = path.stat()
318:                item["_source_identity"] = {
319-                    "path": str(path.resolve()),
320-                    "size": st.st_size,
321-                    "mtime_ns": st.st_mtime_ns,
322-                }
323-            else:
324:                item["_source_identity"] = {"path": str(path), "missing": True}
325-        selected_casting.append(item)
326-
327-    payload = {
328-        "creative_intent": {
329-            "promise": creative.get("promise"),
330-            "primary_visual_proof": creative.get("primary_visual_proof"),
331:            "hook_visual_goal": creative.get("hook_visual_goal"),
332-            "payoff": creative.get("payoff"),
333-        },
334-        "proof_gate": {
335-            "mode": gate.get("mode"),
336-            "candidates": normalized,
337-        },
--
546-    """Accept proof only when every selected footage role is unambiguous."""
547-    return bool(
548-        isinstance(verdict, dict)
549-        and verdict.get("verdict") == "PASS"
550-        and verdict.get("verifier") == "vision_analyze"
551-        and verdict.get("primary_visual_proof") is True
552:        and verdict.get("hook_visual_goal") is True
553-        and verdict.get("proof_visible_and_unmistakable") is True
554-        and verdict.get("casting_subjects_clear") is True
555-        and _normalized_proof_token(verdict.get("proof_token")) == token
556-    )
557-
558-
--
642-        # ASSET-001 diagnostic:
643-        # Pre-casting source/range/asset Vision inspection is intentionally OPEN.
644-        # No artificial Vision-call cap and no mandatory batching in this diagnostic.
645-        # Use visual inspection only when it helps choose footage that actually fulfills
646-        # the creative contract. Existing duplicate/no-progress and other guards remain active.
647-
648:        if image_path.name == "proof_contact_sheet.jpg":
649-            pending_path = image_path.parent / "proof_pending.json"
650-            current_fingerprint = None
651-            pending = {}
652-            try:
653-                if pending_path.exists():
654-                    pending = json.loads(pending_path.read_text(encoding="utf-8"))
--
893-
894-    contract_question = _expanded_vision_question_for_receipt(image_path, question)
895-    _update_repair_state_from_vision(
896-        image_path, contract_question, result, session_id, turn_id, tool_call_id
897-    )
898-
899:    if image_path.name != "proof_contact_sheet.jpg":
900-        return
901-
902-    pending_path = image_path.parent / "proof_pending.json"
903-    if not pending_path.exists():
904-        return
905-
root@213-238-170-219:~#