MCPcopy
hub / github.com/shareAI-lab/learn-claude-code / create

Method create

agents/s12_worktree_task_isolation.py:149–163  ·  view source on GitHub ↗
(self, subject: str, description: str = "")

Source from the content-addressed store, hash-verified

147 self._path(task["id"]).write_text(json.dumps(task, indent=2))
148
149 def create(self, subject: str, description: str = "") -> str:
150 task = {
151 "id": self._next_id,
152 "subject": subject,
153 "description": description,
154 "status": "pending",
155 "owner": "",
156 "worktree": "",
157 "blockedBy": [],
158 "created_at": time.time(),
159 "updated_at": time.time(),
160 }
161 self._save(task)
162 self._next_id += 1
163 return json.dumps(task, indent=2)
164
165 def get(self, task_id: int) -> str:
166 return json.dumps(self._load(task_id), indent=2)

Callers 2

agent_loopFunction · 0.45

Calls 1

_saveMethod · 0.95

Tested by

no test coverage detected