# @assistant-ui/pinboard

The pinned control plane: a stateless Node service that owns the directory of which backend holds which id and proxies every data-plane request to it. Any number of nodes behind one load balancer URL, coordinating through Redis. Part of [harness-sdk](https://github.com/assistant-ui/harness-sdk), with `statewire` and `pinned`.

## Install

```sh
pnpm add @assistant-ui/pinboard
```

## Use

```sh
npm install && npm run build
PINBOARD_TOKEN='...' \
PINBOARD_PASSPORT='{"providers":[{"type":"staticToken","id":"pinboard","keys":[{"name":"deployment","token":{"env":"PINBOARD_TOKEN"},"scopes":["pinboard:worker","pinboard:operator"],"claims":{"pinboard":{"namespaces":["*"],"allowedBackendHosts":["*"]}}}]}],"namespaces":{"*":{"allow":"anonymous"}}}' \
REDIS_URL=redis://localhost:6379 npm start
```

`REDIS_URL=memory:` runs an in-process store for dev and tests; `npm test` needs no Redis.

## Docs

- Get started: https://github.com/assistant-ui/harness-sdk/blob/main/apps/docs/app/docs/get-started/fleet/page.mdx
- Guide: https://github.com/assistant-ui/harness-sdk/blob/main/apps/docs/app/docs/guides/pinned/fleet/page.mdx
- Reference: https://github.com/assistant-ui/harness-sdk/blob/main/apps/docs/app/docs/reference/pinboard/page.mdx
- Spec: https://github.com/assistant-ui/harness-sdk/blob/main/apps/docs/app/docs/spec/pinboard-registry/page.mdx
