|
tools: list_tools defaults to the profile the run executes as
Asking "what tools do I have?" required the agent to know its own profile id
— and to be right about it after a switch_profile had moved the session. The
run knows: run_stream now publishes the active profile id (re-published when
switch_profile reloads the run) alongside the model, SubAgentRunner publishes
its own rather than inheriting the parent's, and ToolContext carries it into
every execute() call.
list_tools reads that when profile_id is omitted, so the bare call answers the
question, and it says which profile it assumed ("current profile") so the
answer cannot be mistaken for another profile's.
scope='agent'|'subagent' selects which of the profile's two toolsets to list —
the set spawn_agent would hand a sub-agent running that profile, which is a
different list and until now had no way to be inspected.
Item D of the list_tools plan, kept separate from the accuracy/compactness work.
|
|---|
|
|
| docs/agent.md |
|---|
| docs/architecture.md |
|---|
| docs/mechanics.md |
|---|
| docs/tools.md |
|---|
| navi/core/agent.py |
|---|
| navi/core/subagent_runner.py |
|---|
| navi/core/tasks.py |
|---|
| navi/tools/_internal/base.py |
|---|
| navi/tools/list_tools.py |
|---|
| tests/unit/tools/test_list_tools.py |
|---|