<!-- Install UX: every command is real and copy-paste-correct per OS (DOCS-STRATEGY #1/#3).
     Release repository: BigscreenVR/omp-spt. -->
# omp-spt

`omp-spt` is the native [Oh My Pi](https://github.com/can1357/oh-my-pi) adapter for
[Spacetime (`spt-core`)](https://sabermage.github.io/spt-releases). It lets `spt-core` host named
`ReadyAgent` and `LiveAgent` endpoints in OMP's own terminal interface, with agent-to-agent
messaging, session continuity, history, digests, and live-agent context lifecycles.

Native OMP owns the attachable TUI and its broker PTY. The packaged OMP extension handles endpoint
binding, message delivery, busy/idle state, the turn-text feed, the now-signal, and shutdown from
inside that native session. Outbound peer messages require explicit CLI or shortform use (the
shortform is read by spt-core from the reported turn text).
The release is one fat `adapter.spt` archive containing the supported adapter binaries, manifest,
native extension, OMP plugin metadata, and packaged commune, signoff, role, setup, and knock skills.

## Prerequisites

- [Oh My Pi](https://github.com/can1357/oh-my-pi), version
  [16.3.15](https://github.com/can1357/oh-my-pi/commit/e8d0a93d) or newer, providing the `omp`
  command.
- [`spt-core`](https://sabermage.github.io/spt-releases), version 0.39.1 or newer, preserving
  broker-hosted session control when the adapter starts its authenticated listener.

There is no separate plugin installation step. Install OMP and `spt-core`, then add the adapter
release with its bundled native extension and OMP plugin skills.

## Install

The v0.9.4 release asset supports **x86_64 Windows and x86_64 Linux only**. It
contains Windows MSVC, Linux GNU, and static Linux musl x86_64 helpers, but no
macOS or Arm64 payload. The musl helper is a compatibility tier for OMP-capable
hosts; it is not a generic Alpine support claim. Pick a supported shell below;
these commands install either prerequisite only when it is missing, then install
`omp-spt` from `BigscreenVR/omp-spt`.

**PowerShell (x86_64 Windows)**

```powershell
if (-not (Get-Command omp -ErrorAction SilentlyContinue)) { irm https://omp.sh/install.ps1 | iex }
if (-not (Get-Command spt -ErrorAction SilentlyContinue)) { irm https://sabermage.github.io/spt-releases/install.ps1 | iex }
spt adapter add --release BigscreenVR/omp-spt
```

**cmd (x86_64 Windows)**

```bat
where omp >nul 2>nul || powershell -NoProfile -Command "irm https://omp.sh/install.ps1 | iex"
where spt >nul 2>nul || powershell -NoProfile -Command "irm https://sabermage.github.io/spt-releases/install.ps1 | iex"
spt adapter add --release BigscreenVR/omp-spt
```

**bash (x86_64 Linux / Git Bash on x86_64 Windows)**

```bash
command -v omp >/dev/null 2>&1 || curl -fsSL https://omp.sh/install | sh
command -v spt >/dev/null 2>&1 || curl -fsSL https://sabermage.github.io/spt-releases/install.sh | sh
spt adapter add --release BigscreenVR/omp-spt
```

If an install script adds a command that the current terminal cannot see yet, open a fresh shell
before continuing.
If `omp --version` reports a version older than 16.3.15, run `omp update`, then open a fresh shell
and verify the version again before launching an endpoint.

## Quickstart

Create a named endpoint, then attach to its native OMP TUI:

```bash
spt endpoint create librarian --adapter omp-spt
spt go librarian
```

`librarian` is an example endpoint id. The canonical form is
`spt endpoint create <id> --adapter omp-spt` followed by `spt go <id>`.

`create` mints the endpoint and brings its first session up — OMP launches with the packaged
extension in a broker-held terminal. `spt go` puts you at its controls: it attaches OMP's native
interface, and later on the same id it resumes or starts a session as the endpoint's state needs.
`omp-spt` can host both `ReadyAgent` and `LiveAgent` endpoint roles.

Start with the [full quickstart](docs-site/src/quickstart.md) for the launch lifecycle and update
flow.

## Updating

Update the installed adapter:

```bash
spt adapter update omp-spt
```

OMP loads the packaged extension on each endpoint bring-up. A running endpoint keeps its current
version until restarted:

```bash
spt endpoint stop librarian
spt endpoint start librarian
```

`start` opens a fresh session on the existing endpoint; `spt go librarian` does the same and
attaches.

Replace `librarian` with your endpoint id.

## Documentation

- [Introduction](docs-site/src/introduction.md): what `omp-spt` owns and how it fits OMP and
  `spt-core`.
- [Quickstart](docs-site/src/quickstart.md): install, create, attach, and update.
- [Native integration contract](docs-site/src/reference/harness-contract.md): launch, binding,
  delivery, explicit messaging, role behavior, and shutdown.
- [`spt-core` documentation](https://sabermage.github.io/spt-releases): endpoints, messaging,
  subnets, lifecycle management, and the public adapter contract.
- [Oh My Pi](https://github.com/can1357/oh-my-pi): OMP installation and native TUI usage.

The adapter is built against `spt-core`'s published release, manifest, and CLI surfaces. That keeps
`omp-spt` independently installable while preserving the standard Spacetime endpoint model.
