whoami: drop operator_pronouns (redundant — already in system prompts at boot)
This commit is contained in:
parent
3c66cb6707
commit
d395bdc945
7 changed files with 19 additions and 31 deletions
|
|
@ -45,7 +45,6 @@ pub enum SocketReply {
|
|||
Whoami {
|
||||
name: String,
|
||||
role: String,
|
||||
operator_pronouns: String,
|
||||
hyperhive_rev: Option<String>,
|
||||
},
|
||||
}
|
||||
|
|
@ -67,12 +66,10 @@ impl From<hive_sh4re::AgentResponse> for SocketReply {
|
|||
hive_sh4re::AgentResponse::Whoami {
|
||||
name,
|
||||
role,
|
||||
operator_pronouns,
|
||||
hyperhive_rev,
|
||||
} => Self::Whoami {
|
||||
name,
|
||||
role,
|
||||
operator_pronouns,
|
||||
hyperhive_rev,
|
||||
},
|
||||
}
|
||||
|
|
@ -97,12 +94,10 @@ impl From<hive_sh4re::ManagerResponse> for SocketReply {
|
|||
hive_sh4re::ManagerResponse::Whoami {
|
||||
name,
|
||||
role,
|
||||
operator_pronouns,
|
||||
hyperhive_rev,
|
||||
} => Self::Whoami {
|
||||
name,
|
||||
role,
|
||||
operator_pronouns,
|
||||
hyperhive_rev,
|
||||
},
|
||||
}
|
||||
|
|
@ -192,13 +187,10 @@ pub fn format_whoami(resp: Result<SocketReply, anyhow::Error>) -> String {
|
|||
Ok(SocketReply::Whoami {
|
||||
name,
|
||||
role,
|
||||
operator_pronouns,
|
||||
hyperhive_rev,
|
||||
}) => {
|
||||
let rev = hyperhive_rev.as_deref().unwrap_or("<unknown>");
|
||||
format!(
|
||||
"name: {name}\nrole: {role}\noperator_pronouns: {operator_pronouns}\nhyperhive_rev: {rev}"
|
||||
)
|
||||
format!("name: {name}\nrole: {role}\nhyperhive_rev: {rev}")
|
||||
}
|
||||
Ok(SocketReply::Err(m)) => format!("whoami failed: {m}"),
|
||||
Ok(other) => format!("whoami unexpected response: {other:?}"),
|
||||
|
|
@ -447,11 +439,11 @@ impl AgentServer {
|
|||
|
||||
#[tool(
|
||||
description = "Self-introspection: returns your own canonical agent name (the \
|
||||
socket-identity name, NOT the prompt-substituted label), role (`agent`), the \
|
||||
operator's pronouns, and the current hyperhive rev hive-c0re is running against. \
|
||||
No args. Useful when you want a trustworthy identity stamp for state files / \
|
||||
commit messages / cross-agent attribution that won't drift across renames or \
|
||||
session-continue boundaries where the system-prompt label could be stale."
|
||||
socket-identity name, NOT the prompt-substituted label), role (`agent`), and \
|
||||
the current hyperhive rev hive-c0re is running against. No args. Useful when \
|
||||
you want a trustworthy identity stamp for state files / commit messages / \
|
||||
cross-agent attribution that won't drift across renames or session-continue \
|
||||
boundaries where the system-prompt label could be stale."
|
||||
)]
|
||||
async fn whoami(&self) -> String {
|
||||
run_tool_envelope("whoami", String::new(), async move {
|
||||
|
|
@ -947,9 +939,9 @@ impl ManagerServer {
|
|||
|
||||
#[tool(
|
||||
description = "Self-introspection for the manager: returns canonical name \
|
||||
(`manager`), role (`manager`), operator pronouns, and the current hyperhive rev. \
|
||||
Same shape as the agent flavour; useful for cross-agent attribution / boot \
|
||||
announcements / state-file headers without trusting prompt substitution."
|
||||
(`manager`), role (`manager`), and the current hyperhive rev. Same shape as \
|
||||
the agent flavour; useful for cross-agent attribution / boot announcements / \
|
||||
state-file headers without trusting prompt substitution."
|
||||
)]
|
||||
async fn whoami(&self) -> String {
|
||||
run_tool_envelope("whoami", String::new(), async move {
|
||||
|
|
@ -1004,8 +996,8 @@ impl ManagerServer {
|
|||
`answer` (respond to a `question_asked` event directed at you), \
|
||||
`get_open_threads` (hive-wide loose ends — pending approvals + unanswered \
|
||||
questions across the swarm), `whoami` (self-introspection — canonical name, \
|
||||
role, operator pronouns, current hyperhive rev). The manager's own config \
|
||||
lives at `/agents/hm1nd/config/agent.nix`."
|
||||
role, current hyperhive rev). The manager's own config lives at \
|
||||
`/agents/hm1nd/config/agent.nix`."
|
||||
)]
|
||||
impl ServerHandler for ManagerServer {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue