Metadata-Version: 2.4
Name: jusi
Version: 0.1.0
Summary: Standalone backend for Jusivim notebook execution
Project-URL: Homepage, https://github.com/notawhaleble/jusi
Project-URL: Repository, https://github.com/notawhaleble/jusi
Project-URL: Issues, https://github.com/notawhaleble/jusi/issues
Author: OpenAI Codex
Author-email: notawhaleble <ponival@gmail.com>
Maintainer-email: notawhaleble <ponival@gmail.com>
License: MIT License
        
        Copyright (c) 2024 notawhaleble
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: jupyter,neovim,notebook,vim
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Editors
Requires-Python: >=3.9
Requires-Dist: ipykernel<7,>=6
Requires-Dist: jupyter-client<9,>=8
Requires-Dist: visidata<4,>=3
Description-Content-Type: text/markdown

# Jusi

Jusi is the Python backend for notebook-style execution used by the `jusivim` Vim/Neovim plugin.

It is responsible for:

- kernel lifecycle management
- notebook execution coordination
- per-cell client lifecycle
- plugin handler supervision
- protocol events and transport metadata for the editor side

Jusi is designed as part of a two-component system:

- `jusivim` editor plugin
- Jusi backend

The backend may run locally or remotely depending on the selected session target.

## Entrypoints

Primary editor-facing entrypoint:

- backend root process: `python -m jusi`

Internal/support entrypoints used by the backend and `jusivim`:

- native terminal attach: `python -m jusi client-process terminal-attach`
- plugin runtime starter: `python -m jusi plugin-runtime`
- transcript runtime entrypoint: `python -m jusi client-runtime`

Normal usage is through `jusivim`, which starts and talks to the backend over the Jusi protocol.

## Protocol Features

The backend protocol supports:

- session start and attach
- cell execution
- interrupt and input reply
- disconnect and reconnect
- client inspection and shutdown
- structured handler messaging for plugin follow-up and completion
- native terminal transport advertisement for interactive handlers

Session metadata may also include:

- `plugin_specs`
  - editor-facing presentation defaults keyed by magic name
- `palette`
  - editor-facing plugin creation metadata keyed by magic name

Cell metadata may include:

- `presentation`
  - authoritative post-handoff presentation metadata for an executed cell
- `runtime_mode`
  - backend-owned runtime mode such as `transcript` or `handler`

## Repository Layout

- `src/jusi/domain/`
  - core models and policies
- `src/jusi/application/`
  - use cases and service interfaces
- `src/jusi/infrastructure/`
  - Jupyter/runtime integration and process management
- `src/jusi/interfaces/`
  - protocol parsing and server entrypoints
- `src/jusi_vd/`
  - bundled first-party `%%vd` plugin
- `docs/`
  - protocol and architecture reference
- `tests/`
  - backend test suite

## Documentation

- [Protocol](docs/protocol.md)
- [Session Lifecycle](docs/session-lifecycle.md)
- [Plugin Contract](docs/plugins.md)
- [Architecture](docs/architecture.md)
- [Backend Map](docs/backend-map.md)

## Contributing

Development workflow and contributor notes live in [CONTRIBUTING.md](CONTRIBUTING.md).
