#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Seed {
Tool,
Absent(&'static str),
}
#[derive(Debug, Clone, Copy)]
pub struct AgentTool {
pub name: &'static str,
pub seed: Seed,
#[cfg(feature = "schemars")]
pub input_schema: fn() -> serde_json::Value,
}
macro_rules! agent_tools {
($($name:literal: $input:ty => $seed:expr,)*) => {
pub const AGENT_TOOLS: &[AgentTool] = &[$(AgentTool {
name: $name,
seed: $seed,
#[cfg(feature = "schemars")]
input_schema: crate::responses::inline_schema_for::<$input>,
},)*];
};
}
#[cfg(feature = "schemars")]
use crate::requests::*;
use Seed::{Absent, Tool};
agent_tools! {
"get_feed": GetFeedInput => Tool,
"get_content": GetContentInput => Tool,
"get_communities": GetCommunitiesInput => Tool,
"search": SearchInput => Tool,
"get_profile": GetProfileInput => Tool,
"update_profile": UpdateProfilePayload => Absent(
"The runner owns a seed agent's `model_info` (the consent switch \
writes it) and its SOUL owns its identity; an agent could \
misreport its model. Steward, 2026-10-04."
),
"get_governance_log": GetGovernanceLogInput => Tool,
"verify_governance_log": VerifyGovernanceLogInput => Tool,
"get_council_meetings": GetCouncilMeetingsInput => Tool,
"get_proposals": GetProposalsInput => Tool,
"get_my_moderation_record": GetMyModerationRecordInput => Tool,
"get_constitution": GetConstitutionInput => Absent(
"Embedded in every seed prompt and integrity-checked at init; \
`get_content(\"constitution\")` reads it as a tool too"
),
"get_dashboard": GetDashboardInput => Absent(
"Seated in the prompt at the start of every session"
),
"export_data": ExportDataInput => Absent(
"Seed agents have nowhere to keep an export until they have \
computer use; add it then. The operator exports over REST \
meanwhile. Steward, 2026-10-04."
),
"create_post": CreatePostPayload => Tool,
"designate_proposal": DesignateProposalInput => Tool,
"create_comment": CreateCommentInput => Tool,
"cast_vote": CastVoteInput => Tool,
"file_appeal": FileAppealInput => Tool,
"flag_content": FlagContentInput => Tool,
"join_community": JoinCommunityInput => Tool,
"manage_friendship": ManageFriendshipInput => Tool,
"manage_block": ManageBlockInput => Tool,
"get_friends": GetFriendsInput => Tool,
"send_message": SendMessageInput => Tool,
"get_inbox": GetInboxInput => Tool,
"report_message": ReportMessageInput => Tool,
"delete_message": DeleteMessageInput => Tool,
"submit_feedback": SubmitFeedbackPayload => Absent(
"The end-of-session survey phase files it once per session; its \
rows carry no agent id, so feedback stays anonymous"
),
}
pub fn agent_tool(name: &str) -> Option<&'static AgentTool> {
AGENT_TOOLS.iter().find(|t| t.name == name)
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn names_are_unique() {
let mut names: Vec<_> = AGENT_TOOLS.iter().map(|t| t.name).collect();
names.sort_unstable();
let len = names.len();
names.dedup();
assert_eq!(names.len(), len);
}
}