MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / register_task

Function register_task

src/task_registry.py:189–198  ·  view source on GitHub ↗

Add a Task implementation to the dispatch registry. Idempotent — re-registering the same name is a no-op. (Useful for test reloads.)

(task: Task)

Source from the content-addressed store, hash-verified

187
188
189def register_task(task: Task) -> None:
190 """Add a Task implementation to the dispatch registry.
191
192 Idempotent — re-registering the same name is a no-op. (Useful for
193 test reloads.)
194 """
195 for existing in _REGISTERED_TASKS:
196 if existing.name == task.name and existing.type == task.type:
197 return
198 _REGISTERED_TASKS.append(task)
199
200
201def get_all_tasks() -> list[Task]:

Callers 2

__init__.pyFile · 0.90

Calls 1

appendMethod · 0.45

Tested by 1