# `Wardrik.Resource`

Names what an action acts on, as IAM resources do.

| Resource | Names |
| --- | --- |
| `acme/agent/triage` | the agent `acme/triage` |
| `acme/@jon/agent/triage` | the agent `acme/@jon/triage` |
| `acme/mcp_server/linear` | the org's MCP server `linear` |
| `acme/@jon/connection/github` | Jon's GitHub account |
| `deployment` | the deployment |

# `agent`

```elixir
@spec agent(String.t()) :: {:ok, String.t()} | :error
```

Returns the resource for the agent `id`, or `:error` if it isn't an agent ID.

    Wardrik.Resource.agent("acme/triage")
    #=> {:ok, "acme/agent/triage"}

    Wardrik.Resource.agent("acme/triage/C1-1696.1234")
    #=> {:ok, "acme/agent/triage/conversation/C1-1696.1234"}

# `deployment`

```elixir
@spec deployment() :: String.t()
```

Returns the deployment's resource.

# `owned`

```elixir
@spec owned(String.t(), String.t(), String.t() | nil) :: String.t()
```

Returns the resource for something `owner` holds: every item of `kind`, or the one `name`d.

    Wardrik.Resource.owned("acme", "mcp_server", "linear")
    #=> "acme/mcp_server/linear"

---

*Consult [api-reference.md](api-reference.md) for complete listing*
