Metadata-Version: 2.4
Name: jupyter-ai-acp-hub
Version: 0.1.1
Summary: Jupyter AI ACP personas with JupyterHub-safe session handling.
Author: Jupyter AI ACP Hub contributors
License: BSD-3-Clause
Requires-Python: >=3.10
Requires-Dist: jupyter-ai-acp-client<0.2,>=0.1.3
Requires-Dist: jupyter-ai-persona-manager<0.1,>=0.0.9
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Description-Content-Type: text/markdown

# jupyter-ai-acp-hub

Jupyter AI ACP personas that treat ACP sessions as ephemeral runtime state.

The visible Jupyter chat history remains in `.chat` files, but live ACP session
IDs are not persisted into chat metadata and are not loaded after restart. This
avoids stale `session/load` failures in JupyterHub pods where chat files survive
but agent subprocesses do not.

## Personas

- `@HubClaude`: wraps `claude-agent-acp`
- `@HubOpenCode`: wraps `opencode acp`

These personas are intentionally separate from upstream `@Claude` and
`@OpenCode` so they can be tested side by side.

## Install

```bash
pip install jupyter-ai-acp-hub
```

For a running notebook pod, install from a Git checkout or a published wheel:

```bash
pip install /path/to/jupyter-ai-acp-personas
```

Restart the Jupyter server process after installation so Jupyter AI reloads the
entry points.

The underlying agents still need to be available in the notebook image:

- `claude-agent-acp` for `@HubClaude`
- `opencode` for `@HubOpenCode`

## Behavior

- always creates a fresh ACP session for each live persona instance
- never writes `metadata.acp_session_ids` into `.chat`
- never loads `metadata.acp_session_ids` from `.chat`
- returns the live session ID from the current session future
- injects recent chat history once after creating a fresh session, using the
  bounded recovery context from `jupyter-ai-acp-client`

## Verify

```bash
python - <<'PY'
import importlib.metadata as metadata

for ep in metadata.entry_points(group="jupyter_ai.personas"):
    if ep.name.startswith("hub-"):
        print(ep.name, ep.value)
PY
```
