Repository navigation
docs(agent): complete DeclaredCaps exclusion list - #2028
MuskanPaliwal wants to merge 10 commits into
Conversation
DeclaredCaps exclusion list
…uiltins # Conflicts: # cmd/entire/cli/agent/capabilities.go
|
Verified every entry against the source - an One still missing: Not really your miss, though: Which is the more useful thing here. This list is hand-maintained with no sync mechanism and has now rotted twice, and all 10 ungated helpers already carry their own, more detailed rationale next to the code - Two ways to make this the last fix needed:
Happy to take either, or just the one-word addition if you'd rather keep it simple. |
Entire-Checkpoint: 01M1CNZ77673NNRFWM43E4EH3T
|
Thanks @Soph, good catch. I went with the AST-backed option. The follow-up commit makes every package-level I also added The guard currently covers all 23 I’ve updated the PR description to match the new scope. |
Entire-Checkpoint: 01M2SQ87FWMD6R4JSCHWBXQE3H
|
hi @Soph , i have this open for a long, would love to get your feedback here and get it merged . thanks :)) |
DeclaredCapsmaintains the inventory of capabilities that built-in agents can expose without advertising them throughDeclaredCapabilities. That inventory had already drifted more than once: the original documentation missed several helpers, andToolInvocationScannerwas added after this PR opened without updating the list.This makes the inventory an enforced architectural invariant instead of relying on reviewers to maintain it manually.
What changed
Every package-level
As*capability helper now resolves directly through one of the two standard paths:builtinCapabilityfor capabilities that do not require declarationdeclaredCapabilityfor capabilities gated byDeclaredCapsThe existing
SidecarImageProvider,StreamingTextGenerator,ContextInjector, andModelListerhelpers were normalized to that shape without changing their signatures or behavior.A package-wide AST test now scans production files in the top-level
agentpackage and verifies that:As*helper uses one of the standard resolvers;builtinCapabilityexactly match the list documented aboveDeclaredCaps;This covers helpers outside
capabilities.go, includingAsContextInjectorandAsModelLister, and catches future additions such asToolInvocationScannerautomatically.Compatibility
There are no public API or protocol-schema changes. The normalized helpers preserve their existing return values and declaration-gating behavior.
Verification
mise run checkToolInvocationScannerfrom the documentation caused the architecture test to fail with the expected inventory mismatch