MCPcopy Create free account
hub / github.com/Claw-AI-Lab/Claw-AI-Lab / Task

Class Task

backend/services/agent_bridge.py:568–598  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

566
567# ── Data structures ─────────────────────────────────────────────────────────
568
569@dataclass
570class Task:
571 id: str
572 project_id: str
573 run_dir: str
574 config_path: str
575 source_layer: str
576 target_layer: str
577 topic: str = ""
578 status: str = "pending" # pending | assigned | completed | failed
579 assigned_to: str | None = None
580 created_at: int = 0
581 assigned_at: int = 0
582 completed_at: int = 0
583
584 def to_dict(self) -> dict:
585 return {k: v for k, v in self.__dict__.items()}
586
587 @staticmethod
588 def from_dict(d: dict) -> "Task":
589 t = Task(
590 id=d["id"], project_id=d["project_id"], run_dir=d["run_dir"],
591 config_path=d.get("config_path", ""),
592 source_layer=d["source_layer"], target_layer=d["target_layer"],
593 topic=d.get("topic", ""),
594 )
595 t.status = d.get("status", "pending")
596 t.assigned_to = d.get("assigned_to")
597 t.created_at = d.get("created_at", 0)
598 t.assigned_at = d.get("assigned_at", 0)
599 t.completed_at = d.get("completed_at", 0)
600 return t
601

Callers 8

from_dictMethod · 0.85
submit_new_projectFunction · 0.85
on_agent_doneFunction · 0.85
resume_projectFunction · 0.85
quick_submit_projectFunction · 0.85
_launch_idea_factory_runFunction · 0.85
_on_idea_factory_doneFunction · 0.85
_on_discussion_s8_doneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected