feat: Add a download_manifests tool to our agent harness mcp server#3558
Conversation
This should:
take a cluster handle + service name and fetch the manifests using our service files gql api.
place those files in a separate subdirectory (use the {handle}-{name} syntax to make it semantically meaningful perhaps)
instruct the agent harness that the files are located there and it can inspect them as it wishes
This will help agents better understand both plural's gitops system + things like external charts without mistakenly guessing via web searches.
Greptile SummaryThis PR adds a
Confidence Score: 5/5Safe to merge; all previously flagged issues are resolved and the new tool is consistently wired across all agent harnesses. The implementation is well-guarded: path traversal is prevented with securejoin, directory names are sanitized with a tight regex, and base64 handling now tolerates both padded and unpadded encodings. All four agent harness integrations are consistent. The one remaining note (aborting vs. skipping on empty file paths) is a minor behavioural preference and does not affect correctness in the happy path. No files require special attention.
|
| Filename | Overview |
|---|---|
| go/deployment-operator/internal/mcpserver/agent/tool/downloadmanifests.go | New MCP tool implementing download_manifests; previous review issues (dots in safeNamePattern, agentRunID param, base64 encoding, arg count) are all addressed in this revision |
| go/deployment-operator/pkg/client/service.go | Adds GetServiceDeploymentByHandle and GetServiceTarball client methods with proper nil guards |
| go/deployment-operator/pkg/agentrun-harness/tool/claude/claude.go | downloadServiceManifests added to all three Claude run modes (analyze, write, babysit) |
| go/deployment-operator/pkg/agentrun-harness/tool/gemini/settings_test.go | Test updated to verify both tools are present in ANALYZE mode includeTools; logic is correct |
Reviews (4): Last reviewed commit: "fix import name" | Re-trigger Greptile
…anifests.go Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…ub.com/pluralsh/console into add-download-manifests-tool-to-console
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This should:
take a cluster handle + service name and fetch the manifests using our service files gql api.
place those files in a separate subdirectory (use the {handle}-{name} syntax to make it semantically meaningful perhaps)
instruct the agent harness that the files are located there and it can inspect them as it wishes
This will help agents better understand both plural's gitops system + things like external charts without mistakenly guessing via web searches.
Test Plan
Test environment: https://jbdemo.console.cloud.plural.sh/
verifed with https://jbdemo.console.cloud.plural.sh/ai/agent-runs/49dfb980-21a3-4cf5-83a8-0d72f6f412b1
Checklist
Plural Flow: console