mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
- split installation.md into installation/deployment/notifications - merge cursor/grok guides into new agents.md with full support matrix - sidebar: grouped sections; add namespace, deployment, notifications, native companion contract - fix license footer (AGPL-3.0), settings schema fields and $id - fix drift in pwa, faq, namespace, how-it-works, voice-assistant, quick-start, native-companion-contract - move mermaid lightbox dogfood doc to localdocs (untracked) - README: complete agent list, replace dead cursor/grok links
1.3 KiB
1.3 KiB
Namespace (Advanced)
Namespaces are intended for small teams sharing a single public HAPI hub. Each team member uses a different namespace to isolate their sessions and machines without running separate hubs.
This is not a default setup path for most users.
How it works
- The hub uses a single base
CLI_API_TOKEN. - Clients append
:<namespace>to the token for isolation.
Setup
- On the hub, configure only the base token:
CLI_API_TOKEN="your-base-token"
- For each user, append a namespace in the client token:
CLI_API_TOKEN="your-base-token:alice"
- Web login and Telegram binding should use the same
base:namespacetoken.
Limitations and gotchas
- Hub-side
CLI_API_TOKENmust not include:<namespace>. The hub validates the token from both the environment variable andsettings.json, and refuses to start with an error if a suffix is present. - Namespaces are isolated: sessions, machines, and users are not visible across namespaces.
- One machine ID cannot be reused across namespaces.
- To run multiple namespaces on one machine, use a separate
HAPI_HOMEper namespace, or clear the machine ID withhapi auth logoutbefore switching.
- To run multiple namespaces on one machine, use a separate
- Remote spawn is namespace-scoped. If you need remote spawning for multiple namespaces on the same machine, run a separate runner per namespace (use separate
HAPI_HOME).