embed stores one vector per open role; score rates every open role for every enabled agent from require and prefer gates, fit against the agent's intent, recency and company affinity, keeping gated rows with a reason. Schema v3 adds vectors and the cached intent vector. The page gets an agent order, the score on each row, and an Agents tab. Two starter agents in roles.yaml are imported once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
32 lines
1.2 KiB
Python
32 lines
1.2 KiB
Python
"""The work roledesk queues. Importing this package registers every job and
|
|
every task in `pipeline.TASKS`.
|
|
|
|
pull.py read every configured plugin and store the roles it yields
|
|
extract.py title and description into the gate columns, on Haiku
|
|
embed.py one vector per open role, for fit
|
|
score.py every open role scored for every enabled search agent
|
|
cascade.py pull → extract → embed → score, and what `TASKS` offers
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from roledesk.jobs import cascade, embed, extract, pull, score
|
|
from roledesk.jobs.score import seed_agents
|
|
|
|
#: What `JobQueue(bootstrap=...)` and `pipeline.worker --bootstrap` are given.
|
|
BOOTSTRAP = "roledesk.jobs:bootstrap"
|
|
|
|
|
|
def bootstrap(config_path: str = "") -> tuple[object, object]:
|
|
"""roledesk's `(config, store)` from the config file alone, for a job run
|
|
in its own process or by `python -m pipeline.worker`."""
|
|
from roledesk import config as config_mod
|
|
from roledesk.storage import Store
|
|
|
|
config = config_mod.load(config_path or None)
|
|
return config, Store(config.database)
|
|
|
|
|
|
__all__ = ["BOOTSTRAP", "bootstrap", "cascade", "embed", "extract", "pull", "score",
|
|
"seed_agents"]
|