[dotnet-port-api] Port shelltool metadata overrides - #997
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
LocalConfig.toolName() checks TrimSpace but returns the untrimmed name, which can silently introduce invalid/undesired tool identifiers with leading/trailing whitespace.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Ports the upstream .NET shell tool “metadata override” capability into the Go shelltool package, allowing callers to override the model-facing tool name and description via shelltool.LocalConfig, and updates docs/tests accordingly.
Changes:
- Add
LocalConfig.Name/LocalConfig.Descriptionand routeLocal.Name()/Local.Description()through these overrides (with defaults preserved). - Add a focused unit test covering custom name/description overrides.
- Update the .NET vs Go feature-comparison documentation to reflect configurable shelltool metadata.
File summaries
| File | Description |
|---|---|
| docs/dotnet-go-sdk-feature-comparison.md | Documents shelltool parity including configurable tool name/description. |
| tool/shelltool/localshell.go | Adds config fields and uses them to provide overridable tool Name()/Description(). |
| tool/shelltool/shelltool_test.go | Adds coverage ensuring custom name/description overrides are surfaced. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Scope: public API Changed Go contract: Upstream evidence reviewed: microsoft/agent-framework#6880 ( Result: aligned. Both new fields are optional, default to empty string, and preserve existing default behavior ( This PR adds new exported fields ( Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
[!TIP] tools:
github:
mode: gh-proxySee GitHub Tools for more information on To allow these domains, add them to the network:
allowed:
- defaults
- "api.github.com"See Network Configuration for more information.
|
Summary
Port shell-tool metadata overrides from the upstream .NET harness work by letting
shelltool.LocalConfigoverride the model-facing tool name and description. Go previously hard-codedrun_shelland always synthesized the default description; now callers can keep the defaults or set custom metadata explicitly. The shelltool parity row in the feature-comparison doc was updated to reflect the aligned surface.Ported .NET PRs
48436f8ab644cfff8466ab838983f89bf414db45Breaking Changes
No. Existing callers keep the same default tool name (
run_shell) and generated description unless they opt into the newLocalConfigfields.Tests and Examples
go test ./tool/shelltoolNotes
upstream-agent-framework/mainat1da571860a60f0da4f060bd60c8e7ee8d092cd32; the remote refresh step itself was blocked in this environment, so selection used the locally available upstream reference plus GitHub read-only source inspection.Closes #788