# `WardrikWorkspace.Spec`

What an agent's file tools reach.

  * `:store` - the `WardrikStore` the files are kept in.
  * `:own` - the agent's own `WardrikWorkspace.Mount`.
  * `:shared` - mounts shared with the agent, each under `shared/<name>/`.

# `t`

```elixir
@type t() :: %WardrikWorkspace.Spec{
  own: WardrikWorkspace.Mount.t(),
  shared: [WardrikWorkspace.Mount.t()],
  store: WardrikStore.t()
}
```

# `mounts`

```elixir
@spec mounts(t()) :: [WardrikWorkspace.Mount.t()]
```

Returns every mount the spec reaches, its own first.

# `new`

```elixir
@spec new(keyword()) :: t()
```

Builds a spec from `WardrikWorkspace`'s options: `:store`, `:tree` and `:shared`.

# `resolve`

```elixir
@spec resolve(t(), term()) ::
  {:ok, WardrikWorkspace.Mount.t(), String.t()} | {:error, String.t()}
```

Returns the mount `path` is in and the path within its tree, or `{:error, reason}`.

# `shown`

```elixir
@spec shown(WardrikWorkspace.Mount.t(), String.t()) :: String.t()
```

Returns `path` as the agent sees it, prefixed with `shared/<name>/` for a shared mount.

---

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