Repository navigation
feat(codersdk/workspacesdk): parse custom agent definition files - #31
Conversation
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f6737fdb98
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ted MCP servers Claude Code names the reasoning level `effort`; accept it, with `reasoning_effort` taking precedence. Claude Code's `mcpServers` adds servers to the inherited set instead of restricting it, so it no longer switches the definition to a named allowlist.
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Merged after checking the exact head 5106aaf: fork-ci green, Codex clean on 5106aaf, 0 unresolved threads. UAT round 1 (on 8071f13, which contains f6737fd) passed every parser criterion; its one defect was in the follow-up discovery PR. This PR adds a library with no runtime caller yet, so the deploy does not change behavior. The 5106aaf parser change has unit tests and is smoke-tested by round 2, which gates the discovery PR. |
Part of #7 (first PR of the custom agent types stack).
Adds
workspacesdk.ParseAgentDefinition, which parses a Claude Code or Cursor agent markdown file (YAML front-matter plus a prompt body) into anAgentDefinition: name, description, prompt, model, reasoning effort, tool allow and deny lists,readonly, MCP mode, and base type (generalorexplore).ErrNotAgentDefinition, so a README in anagents/directory is skipped rather than reported as broken.is_backgroundandcolorare dropped silently. Known keys with the wrong type, a non-kebab-case name, or an empty body are errors.effortis accepted as an alias ofreasoning_effort(which wins when both are set). Claude Code'smcpServerskeeps the inherited MCP servers, matching Claude Code, where it only adds servers; the Codermcpkey (inherit,none, or a list of names) restricts them.This PR has no runtime caller. The next PR wires it into workspace agent discovery, and the dogfood UAT for that PR exercises this parser end to end against real pstack definitions (
poteto-agent,comment-sicko).Validation:
go test ./codersdk/workspacesdk/,go vet,gofmt.