skills: read-only catalog for introspection bodies
An ordinary skill body may not reach into the agent (`ctx.admin` is the housekeeping-only mutation surface), but a body that reports the agent's own capabilities legitimately needs to see the tree. Add that sanctioned surface: - `SkillCatalog` (skills.py): a read-only view — `categories()` (id -> scope description) and `skills(category)` (leaf names) — over a live provider. - `ActionContext.catalog`: supplied by the scheduler as a locked tree snapshot, passed to every body. - The runner now passes `admin` only to the `housekeeping` category (it was previously handed to every body despite the documented rule); ordinary bodies get `catalog` instead. Consumed by the essentials pack's new `skills.list_categories` / `skills.list_skills` seeds. Docs (CODEGEN.md, AGENTS.md, README.md) updated; tests cover the catalog, the catalog/admin split on the run context, and the new pack seeds.
This commit is contained in:
1 parent
ed894bd329
commit
ec3e6b1b97
8 files changed
+126
-13
No files matched your search
@@ -34,6 +34,7 @@ from .log import DecisionLog
|
||||
from .skills import (
|
||||
CANNED_CATEGORIES,
|
||||
DETERMINISTIC_CATEGORIES,
|
||||
HOUSEKEEPING_CATEGORY,
|
||||
ActionContext,
|
||||
Skill,
|
||||
SkillStore,
|
||||
@@ -147,7 +148,11 @@ class SkillRunner:
|
||||
engine=self.ctx.engine,
|
||||
config=merged,
|
||||
timers=self.ctx.timers,
|
||||
admin=self.ctx.admin,
|
||||
# `admin` (mutation of the agent) is reserved for the built-in
|
||||
# housekeeping meta skills; an ordinary body only ever gets the
|
||||
# read-only `catalog`.
|
||||
admin=self.ctx.admin if skill.category == HOUSEKEEPING_CATEGORY else None,
|
||||
catalog=self.ctx.catalog,
|
||||
)
|
||||
|
||||
def _unresolved(self, skill: Skill, request: Request) -> list[str]:
|
||||
|
||||
Reference in new issue
Block a user