fix(#1021): error on unauthorized target (not silent ignore); allow child targeting without cap
This commit is contained in:
parent
4834ca413c
commit
d35b7ab9b4
3 changed files with 44 additions and 38 deletions
|
|
@ -662,9 +662,9 @@ impl AgentServer {
|
|||
inbox history. Output is a short bulleted list with ids, ages in seconds, and \
|
||||
the relevant context. Each `question` or `reminder` row can be cancelled by \
|
||||
passing its id + kind to `cancel_loose_end`. Empty result is reported clearly.\n\
|
||||
Pass `agent: \"<name>\"` to inspect a specific peer agent's threads — requires \
|
||||
the `query_agent_state` capability; without it the field is ignored and results \
|
||||
are scoped to you."
|
||||
Pass `agent: \"<name>\"` to inspect a specific peer agent's threads. Direct \
|
||||
child agents are always accessible. For non-children, the `query_agent_state` \
|
||||
capability is required — without it the request is rejected with an error."
|
||||
)]
|
||||
async fn get_loose_ends(&self, Parameters(args): Parameters<AgentGetLooseEndsArgs>) -> String {
|
||||
run_tool_envelope("get_loose_ends", String::new(), async move {
|
||||
|
|
@ -1061,12 +1061,12 @@ pub struct GetLooseEndsArgs {
|
|||
|
||||
#[derive(Debug, serde::Deserialize, schemars::JsonSchema)]
|
||||
pub struct AgentGetLooseEndsArgs {
|
||||
/// Whose loose ends to list. Omit (or `null`) for your own. Pass a
|
||||
/// specific agent name to inspect that agent's threads — requires
|
||||
/// the `query_agent_state` capability; without it the field is
|
||||
/// ignored and results are scoped to you. The `"*"` hive-wide value
|
||||
/// is not available on the agent socket; use the manager socket for
|
||||
/// swarm-wide scans.
|
||||
/// Whose loose ends to list. Omit (or `null`) for your own. You may
|
||||
/// also pass a direct child agent's name without any extra capability.
|
||||
/// Pass any other agent name to inspect their threads — requires the
|
||||
/// `query_agent_state` capability; without it the request is rejected
|
||||
/// with an error. The `"*"` hive-wide value is not available on the
|
||||
/// agent socket; use the manager socket for swarm-wide scans.
|
||||
#[serde(default)]
|
||||
pub agent: Option<String>,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue