feat(moments): skills and stored processes declare the moments they are for (milestone 458 step 5, #4923)
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 13s
CI & Build / TypeScript typecheck (push) Successful in 55s
CI & Build / integration (push) Successful in 1m3s
CI & Build / Python tests (push) Failing after 1m25s
CI & Build / Build & push image (push) Skipped
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 13s
CI & Build / TypeScript typecheck (push) Successful in 55s
CI & Build / integration (push) Successful in 1m3s
CI & Build / Python tests (push) Failing after 1m25s
CI & Build / Build & push image (push) Skipped
Loading a procedure now also reaches the moment it is for. Loading the reporting procedure is a report; loading the release procedure is a delivery. - Bundled skills: each SKILL.md declares `metadata: moments:`. The same declaration ships as Skill defaults (BUNDLED_SKILL_MOMENTS), because the server never sees the plugin's files. test_skill_moments holds the two together and pins the plugin name that qualifies the skill. - Stored processes: `moments` on create_process and update_process, stored in the note's data and returned by get_process. A `scribe-proc-<slug>` load resolves its process through the sync manifest at load time. The moments are not copied into the stub, which would go stale mid-session. - reachable_tools lists the skill loader whenever anything is mounted, since a process's moments are known only when it loads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -194,11 +194,17 @@ async def test_an_install_with_nothing_mounted_keeps_the_hook_off_the_wire():
|
||||
|
||||
|
||||
async def test_only_the_tools_whose_moments_carry_a_mount_are_listed():
|
||||
assert await _reachable({"work.deliver"}) == ["bash"]
|
||||
assert await _reachable({"work.finish"}) == ["update_milestone", "update_task"]
|
||||
assert await _reachable({"work.deliver"}) == ["bash", "skill"]
|
||||
assert await _reachable({"work.finish"}) == ["skill", "update_milestone", "update_task"]
|
||||
assert await _reachable({"skill.release"}) == ["skill"]
|
||||
|
||||
|
||||
async def test_the_skill_loader_counts_whenever_anything_is_mounted():
|
||||
"""A stored process declares its own moments, resolved only when it loads
|
||||
— so a mount on any moment may be reached by loading a procedure."""
|
||||
assert "skill" in await _reachable({"work.debug"})
|
||||
|
||||
|
||||
async def test_an_installs_own_mapping_and_removal_both_count():
|
||||
own = SimpleNamespace(tool="mcp__deploy__ship", match="", moment="work.deliver", effect="add")
|
||||
assert "ship" in await _reachable({"work.deliver"}, [own])
|
||||
|
||||
Reference in New Issue
Block a user