Repository navigation
feat(coderd/x/chatd): offer project agent definitions to spawn_agent - #90
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. |
|
Codex Review: Didn't find any major issues. Keep them coming! 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". |
Closing and reopening only to make GitHub recompute the merge ref against current main ( |
The merge ref now points at current main ( |
Merge evidence for head
|
Part of #7
With
fork-agent-definitionson,spawn_agentnow offers the enabled agent definitions of the chat's project, next to the workspace, personal and organization types. #72 added the project-tier queries and #77 adds their routes, but chatd never read the project tier, so a project's types could be stored and never spawned.Change
storedAgentTypesresolves the chat's project withresolveUsableChatProjectID, the check project instructions and skills use. A child chat uses its root chat's project, and a project the owner can no longer use (not owned, not shared) contributes no types.ListProjectAgentDefinitionMetadataand loaded on spawn withGetProjectAgentDefinitionByName. Both run as chatd after the usable-project check, like project skills, so role grants alone do not expose a project's types. Disabled rows are skipped.project/<name>and the other tier-qualified names.docs/fork/pstack-adapter.mddescribes the project tier.Tests
TestForkAgentDefinitionProjectTier: a projectreviewerandprojbotsit next to a workspacereviewer. The tool description listsproject/reviewer,workspace/reviewerand bareprojbot, both project types spawn with their own prompts, and a child chat, which carries no project, still offersprojbotfrom its root chat's project.TestForkAgentDefinitionProjectTierUsable: the project owner and a user the project is shared with seeprojbot; an unshared member and a site owner see nothing.resolveChatProjectIDinstead of the usable check turnsProjectTierUsablered; dropping the project tier from the merge turns both red.go test ./coderd/x/chatd/, ok on the merge with main 873db0e. golangci-lint and go vet found nothing.Size
About 165 changed lines: about 45 implementation, about 120 tests, and a few doc lines.