docs(rfc): RFC-0060 Agent Mode Declaration for OpenCode At-Mention Visibility - #376
Open
Million-mo wants to merge 2 commits into
Open
docs(rfc): RFC-0060 Agent Mode Declaration for OpenCode At-Mention Visibility#376Million-mo wants to merge 2 commits into
Million-mo wants to merge 2 commits into
Conversation
… (RFC-0060) Add a configurable mode field (primary/subagent/all, default primary) to agent manifests. list_agents now returns each agent's declared mode instead of the hardcoded 'primary', so OpenCode clients correctly place subagents in the @-mention popup and primary agents in the switcher. - Define AgentMode in wolfharness_config.nodes (config layer, avoids core->server circular import) and re-export from opencode server model - Add mode to BaseAgentConfig, inherited by NativeAgentConfig - Update tests (manifest parsing + list_agents routes) and docs
Collaborator
Author
|
存在遗留问题,就是@subagent,应该转换成什么prompt,要让主agent知道要委派,要让subagent知道具体的任务。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds RFC-0060: Agent Mode Declaration for OpenCode At-Mention Visibility — a DRAFT proposal to fix the inability to delegate to custom agents via at-mention (
@agent) in the OpenCode integration.Problem
wolfharness's OpenCode server hardcodes every manifest agent as
mode="primary"(agent_routes.py:154), while the OpenCode client's at-mention popup filters candidates tomode !== "primary"(prompt-input-v2.tsx:275). Result: custom agents likevisionarynever appear in the@popup, making@visionary-style delegation impossible.Proposed Solution
Add a
modefield to the manifest agent config (NativeAgentConfig) with vocabularysubagent | primary | all:primary→ switcher only (backward-compatible default)subagent→ at-mention popup onlyall→ bothlist_agentsreads the declared mode instead of the hardcoded literal. The wireAgent.modefield already supports the full vocabulary.RFC Contents
AgentModeshould live to avoid core→server import inversion)Note
This is a DRAFT RFC for review only — no implementation code is included. Per the project pipeline (
docs/rfcs/STATUS.md), once accepted it moves to an OpenSpec change.