[dotnet-code] Clarify file script run internals#534
[dotnet-code] Clarify file script run internals#534michelle-clayton-work wants to merge 1 commit into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Refactors the file-backed script Run closure in fsskills into small unexported helpers to make the guard/validation sequence clearer and closer in shape to the referenced .NET implementation, without changing the public Go API.
Changes:
- Extracted the inline
Runclosure intonewFileScriptRunFunc(...). - Centralized the “owner must be a file-backed skill” validation into
requireFileSkill(...).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
API Consistency Review: ✅ No parity issuesThis PR refactors unexported internals in Scope verdict: Out of scope for cross-repo consistency review. The change is a pure internal refactor that intentionally mirrors the guard-sequence structure of the .NET
|
Summary
Extracted the file-backed script run closure into small unexported helpers. This keeps the Go file-skill script execution shape closer to the .NET
AgentFileSkillScript.RunAsyncguard sequence while preserving the existing public API and behavior..NET Reference
dotnet/src/Microsoft.Agents.AI/Skills/File/AgentFileSkillScript.cs- validates the owning file skill, checks for a configured runner, then invokes the file script runner.Public API and Behavior
No public Go API changed. No intentional behavior change was made.
Tests
go test ./agent/skills/...gofmt -w agent/skills/fsskills/source.goNotes
Rejected candidates:
dotnet/src/Microsoft.Agents.AI/Skills/Programmatic/AgentInlineSkillResource.cs- Go inline skills are represented directly byskills.Skillvalues and test helpers rather than a corresponding internal resource type, so there was no narrow production cleanup to make.dotnet/src/Microsoft.Agents.AI/Evaluation/ExpectedToolCall.cs- no matching Go evaluation surface was present in the sampled implementation, so changing Go would risk adding a missing feature rather than refactoring existing internals.dotnet/src/Microsoft.Agents.AI.Workflows/ExternalResponse.cs- the close Go equivalent would require adding exported convenience methods toworkflow.ExternalResponse, which would change the public Go API and violate the task constraints.Open
[dotnet-code]PRs were checked before editing; the existing workflow edge PR does not cover this file-skill script candidate.Closes #499