feat: add config_view and list_tools introspection tools - #177
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
odek | 679471a | Commit Preview URL Branch Preview URL |
Sep 03 2026, 05:38 AM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Gives the agent read access to its own resolved configuration — closing a real introspection gap: the agent could discover capability profiles (
list_subagent_profiles) but not the effective security posture, sub-agent budgets, or execution limits it operates under.New tools
config_view— sanitized resolved config (post five-layer merge), section-filterable:all | core | security | subagent | limits | memory | skills | background | maintenance. Secrets (api_key, base_url, env values) are structurally excluded — whitelist builders, no render-time filtering.list_tools— the live tool registry for this run (captured after all conditional registrations), enabled/disabled filter state, and MCP server posture with credential argv redacted (defense in depth: REST keeps verbatim argv behind CSRF; the model face redacts--api-key-style values).Design
buildConfigView/buildLimitsView/buildMCPServersVieware shared by the REST management API (/api/config,/api/limits,/api/mcp,/api/tools) and the tools. REST↔tool parity is pinned byTestRESTConfigViewMatchesToolAll+TestRESTLimitsMatchesSharedBuilder./api/configgains additivesubagent/background/limitskeys (same builder).config.ResolvedConfig— only pre-built views viatoolConfig.Introspection.safe-class: read-only, no approver, auto-available to sub-agents (children rerunbuiltinToolswith their own resolved config).Adversarial review
Reviewed by a sub-agent before this PR (per release gate). Findings fixed:
list_toolslive-registry capture was silently missing → empty listings in production. Fixed + wiring test through the realbuiltinToolspath.--api-key …) reached model context ungated. Fixed: credential-flag argv redaction on the tool face only, pinned byTestMCPServerArgsRedactedOnToolFaceincl. a wiring-path assertion./api/toolsnow applies the sharedtoolEnabledrule; staletrust_level=untrackednote corrected.Tests
RED-first: 11 new tests (sections, secret-leak pins, REST↔tool parity ×2, argv redaction, live-registry wiring, nil-view tolerance, reservation against MCP shadowing).
go vetclean; fullcmd/odeksuite green (75 s,-count=1);-raceclean on the new tests.Docs
AGENTS.md tool list, docs/TOOL_SELECTION.md, docs/CHEATSHEET.md, docs/MCP.md (reserved names), docs/WEBUI.md (
/api/configshape) — same commit.