mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-18 04:41:56 +00:00
fix(kanban): reject toolset names in task skills
This commit is contained in:
parent
a91e5a8759
commit
673418dfa1
4 changed files with 39 additions and 0 deletions
|
|
@ -83,6 +83,8 @@ from dataclasses import dataclass, field
|
|||
from pathlib import Path
|
||||
from typing import Any, Iterable, Optional
|
||||
|
||||
from toolsets import get_toolset_names
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Constants
|
||||
|
|
@ -90,6 +92,7 @@ from typing import Any, Iterable, Optional
|
|||
|
||||
VALID_STATUSES = {"triage", "todo", "ready", "running", "blocked", "done", "archived"}
|
||||
VALID_WORKSPACE_KINDS = {"scratch", "worktree", "dir"}
|
||||
KNOWN_TOOLSET_NAMES = frozenset(name.casefold() for name in get_toolset_names())
|
||||
|
||||
# A running task's claim is valid for 15 minutes; after that the next
|
||||
# dispatcher tick reclaims it. Workers that outlive this window should call
|
||||
|
|
@ -1283,6 +1286,11 @@ def create_task(
|
|||
f"skill name cannot contain comma: {name!r} "
|
||||
f"(pass a list of separate names instead of a comma-joined string)"
|
||||
)
|
||||
if name.casefold() in KNOWN_TOOLSET_NAMES:
|
||||
raise ValueError(
|
||||
f"{name!r} is a toolset name, not a skill name. "
|
||||
"Put it in the assignee profile's toolsets instead of task skills."
|
||||
)
|
||||
if name in seen:
|
||||
continue
|
||||
seen.add(name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue