# `AgentSessionManager.Workspace.Workspace`
[🔗](https://github.com/nshkrdotcom/agent_session_manager/blob/v0.8.0/lib/agent_session_manager/workspace/workspace.ex#L1)

Public workspace service that delegates to git/hash backends.

# `backend_for_path`

```elixir
@spec backend_for_path(
  String.t(),
  keyword()
) :: :git | :hash
```

# `detect_backend`

```elixir
@spec detect_backend(String.t()) :: :git | :hash
```

# `diff`

```elixir
@spec diff(
  AgentSessionManager.Workspace.Snapshot.t(),
  AgentSessionManager.Workspace.Snapshot.t(),
  keyword()
) ::
  {:ok, AgentSessionManager.Workspace.Diff.t()}
  | {:error, AgentSessionManager.Core.Error.t()}
```

# `rollback`

```elixir
@spec rollback(
  AgentSessionManager.Workspace.Snapshot.t(),
  keyword()
) :: :ok | {:error, AgentSessionManager.Core.Error.t()}
```

# `take_snapshot`

```elixir
@spec take_snapshot(
  String.t(),
  keyword()
) ::
  {:ok, AgentSessionManager.Workspace.Snapshot.t()}
  | {:error, AgentSessionManager.Core.Error.t()}
```

---

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