ulysses/services/memory
andrewemer cd02ac7ef6
fix(agent): skill-prescribed tools never reach the model's schema list (#4008)
* Agent: make skill-prescribed tools actually callable

The skill index and matched-skill procedures are injected into the
prompt, but tool selection never followed: manage_skills wasn't in the
RAG-selected schema list (so the model substituted manage_memory), and
a matched skill could prescribe tools (grep, read_file) the model had
no schema for. Now:

- manage_skills rides along whenever the owner has any skills indexed
- a Jaccard-matched skill's requires_toolsets join the selection
- viewing a skill mid-turn via manage_skills unlocks its
  requires_toolsets for subsequent rounds
- admin-intent turns send _ADMIN_TOOLS schemas, matching the prompt
  text _build_base_prompt already advertises
- index_for(active_toolsets=None) no longer hides requires_toolsets
  skills from callers that don't know the active set

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Agent: validate skill requires_toolsets against known tools, not TOOL_SECTIONS

grep/glob/ls ship as function schemas without a prompt-prose section,
so gating on TOOL_SECTIONS silently dropped them from a skill's
requires_toolsets.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-06-15 20:32:43 +09:00
..
__init__.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
memory.py refactor(memory): canonicalize memory imports (#50) 2026-06-04 05:31:15 +01:00
memory_extractor.py fix(memory): make auto-memory extraction reliable for reasoning models (#3190) 2026-06-08 19:57:44 +02:00
memory_vector.py refactor(memory): canonicalize memory imports (#50) 2026-06-04 05:31:15 +01:00
service.py refactor(constants): single source of truth for data dir (#3368) 2026-06-08 09:58:52 +02:00
skill_extractor.py fix(memory): reject ambiguous multi-object outputs during skill extraction (#3985) 2026-06-15 10:44:43 +00:00
skill_format.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
skill_importer.py feat(skills): import SKILL.md bundles from public GitHub URLs (#2576) 2026-06-05 19:48:23 +02:00
skills.py fix(agent): skill-prescribed tools never reach the model's schema list (#4008) 2026-06-15 20:32:43 +09:00