MCPcopy Create free account
hub / github.com/ForgeAILab/forge / parse_executor_kind

Function parse_executor_kind

crates/api/src/routes/agents.rs:446–450  ·  view source on GitHub ↗
(value: &str)

Source from the content-addressed store, hash-verified

444}
445
446fn parse_executor_kind(value: &str) -> ApiResult<ExecutorKind> {
447 value
448 .parse()
449 .map_err(|_| ApiError::bad_request(format!("invalid executor_type: {value}")))
450}
451
452fn can_view_agent(agent: &Agent, user: &AuthenticatedUser) -> bool {
453 agent.visibility == "global" || agent.owner_id.as_deref() == Some(&user.user_id)

Callers 1

agent_discovered_optionsFunction · 0.70

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected