feat(agent): add tool availability controls - #353
Merged
Conversation
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.
What does this PR do?
Adds DC5's availability-first Tool catalog for Chat and Analyze. OSS now owns a
complete grouped catalog, server-resolved requirements and health, durable
per-org/per-agent toggles, model filtering, admin APIs, and the
/agent/toolsworkspace.
The catalog enumerates 22 known tools across
versus,common, andk8s. Thefive Kubernetes entries are requirement metadata only; this PR does not add
Kubernetes reads or data-source binding.
Why?
Tools were previously omitted silently when a dependency was missing. Operators
could not discover the complete tool surface or tell whether a tool was disabled,
unconfigured, unhealthy, or license-gated.
DC5 creates one server-owned state machine shared by the API, UI, toggle
preconditions, Chat registration/seeding, and Analyze registration. This makes
tool availability truthful before DC6 adds Kubernetes capabilities and DC7 adds
source binding.
How to test
Backend
Focused checks:
go test -race ./pkg/agent/ai/tools ./pkg/agent/ai/chat \ ./pkg/agent ./pkg/controllers ./cmdUI
Validated results:
Manual checks:
/agent/toolswhile the agent is disabled and confirm the catalog isreadable.
agent.
the other agent remains unchanged.
409with a bounded actionable reason.versus,common,k8sorder.another replica uses the new policy.
The Agent Tools Playwright spec is tracked and both desktop/mobile cases are
discovered. Its real-server rerun remains a release-process condition after the
separate gateway-session/authentication work stabilizes: current attempts stop
in the authentication helper before any Tool catalog assertion.
Staging note
The workspace contains concurrent gateway-session/authentication changes that
are not part of DC5. Stage only DC5 hunks in mixed files such as
ui/src/lib/api.ts,cmd/main.go, Enterprise's composition root, and operatordocumentation. Exclude auth behavior and generated
tsbuildinfo, Playwrightreports/results/cache, and
tests/e2e/screenshots/. Verify the isolated stagedtree with the commands above.
Type of change
Checklist
go test ./...passes locallygo vet ./...is cleangofmt'dsrc/if behavior changesROADMAP.mdif this closes a roadmap itemROADMAP.mdis unchanged because DC5 is tracked inplans/status/devops-chat-implementation.mdrather than the public roadmap.