Standalone WebUI
Scope
Sharelife WebUI runs standalone; you do not need AstrBot Dashboard embedding. This public page documents the public/member experience only:
- Spotlight-style market search
- local installation management
- template upload and profile-pack community submission
- task/result tracking on the member side
Privileged moderation and operator workflows are intentionally documented in private docs only.
Config
json
{
"webui": {
"enabled": true,
"host": "127.0.0.1",
"port": 8106,
"cors": {
"allow_origins": ""
},
"security_headers": {
"enabled": true,
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "DENY",
"Referrer-Policy": "no-referrer",
"Permissions-Policy": "camera=(), microphone=(), geolocation=()",
"Content-Security-Policy": "default-src 'self'; base-uri 'self'; frame-ancestors 'none'; object-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; connect-src 'self'; form-action 'self'"
},
"auth": {
"member_password": "",
"token_ttl_seconds": 7200,
"allow_query_token": false,
"allow_anonymous_member": false,
"anonymous_member_user_id": "webui-user",
"anonymous_member_allowlist": [
"POST /api/trial",
"GET /api/trial/status",
"POST /api/templates/install",
"GET /api/member/installations",
"POST /api/member/installations/refresh",
"GET /api/preferences",
"POST /api/preferences/mode",
"POST /api/preferences/observe"
],
"login_rate_limit_window_seconds": 60,
"login_rate_limit_max_attempts": 10,
"api_rate_limit_window_seconds": 60,
"api_rate_limit_max_requests": 600
},
"observability": {
"metrics_max_paths": 128,
"metrics_overflow_path_label": "/__other__"
}
}
}Auth behavior
- Empty auth fields keep the public/member surface available.
member_passwordenables login gating for protected member actions.GET /api/ui/capabilitiesstays readable before login so the UI can capability-gate controls.- Query token auth is off by default; use
Authorization: Bearer <token>. - Login attempts are rate-limited by
login_rate_limit_*. - API requests are rate-limited by
api_rate_limit_*(client + role + pathscope). - Default responses include
security_headers, includingContent-Security-Policy. - If
allow_anonymous_member=true, only the configured anonymous allowlist can run without login, and requests stay pinned toanonymous_member_user_id. - Privileged auth procedures, secret material, and backup/restore runbooks stay in private docs.
- Standalone local AstrBot import is disabled by default for safer host deployments. Enable only when required:
- CLI:
python3 scripts/run_sharelife_webui_standalone.py --enable-local-astrbot-import - Env:
SHARELIFE_ENABLE_LOCAL_ASTRBOT_IMPORT=1 - Optional anonymous local import:
--allow-anonymous-local-astrbot-import/SHARELIFE_ALLOW_ANONYMOUS_LOCAL_ASTRBOT_IMPORT=1
- Local AstrBot auto-detection accepts optional host hints:
SHARELIFE_ASTRBOT_CONFIG_PATH=/absolute/path/to/cmd_config.jsonSHARELIFE_ASTRBOT_CONFIG_PATH=/path/a:/path/b(Windows uses;)SHARELIFE_ASTRBOT_SEARCH_ROOTS=/path/root-a:/path/root-b(Windows uses;)SHARELIFE_ASTRBOT_HOME=/path/to/astrbot
Start and routes
- Plugin startup attempts to launch WebUI automatically.
- Run
/sharelife_webuito get the URL. - Public/member-facing routes:
/integrated entry/membermember-focused console/marketstandalone market page
- Restricted operator routes exist, but they are intentionally not described in the public docs.
Container quick start
bash
docker compose up -d --buildThen open http://127.0.0.1:8106. Data is persisted under ./output/docker-data. Compose defaults to state_store.backend=sqlite with ./output/docker-data/sharelife_state.sqlite3.
Member workflows
1. Store Search + Trial Status
/memberand/marketboth lead with a spotlight-style search surface.- Search feeds catalog cards, detail, and compare.
Trial Statusshowsnot_started|active|expired, plusttl_secondsandremaining_seconds.
2. Manage Installations
- Load your local installation list.
- Use
Refresh Local Installationsto resync the visible state. - Per-installation actions include:
ReinstallUninstall
- Install controls support:
preflightforce_reinstallsource_preference=auto|uploaded_submission|generated
3. Template Upload Chain
- Open the upload area in
/member. - Select a file or use generated package output.
- Direct package upload is capped at
20 MiB. - Upload options:
scan_mode=strict|balancedvisibility=community|privatereplace_existing=true|false
- After submit, open
My Submissionsto inspect detail and download your own original package.
4. Profile-Pack Community Submission Chain
- Prepare a profile-pack artifact and copy its
artifact_id. - In
/member, imported draft cards open Upload Details directly for review-first submission. - Upload Details remembers per-draft review state (
selected unit/node, section checks, andreplace_existing) across modal reopen and page refresh in the same browser session. - Submit from
/memberor/market. - Submit options:
pack_typeselected_sectionsredaction_modereplace_existing
- Open
My Profile-Pack Submissionsto inspect detail and download your own export.
5. Capability Gating and Error Model
- Button-level operations are gated from backend policy via
/api/ui/capabilities. - Auth/rate-limit/internal failures return a unified shape:
{"ok": false, "error": {"code": "...", "message": "..."}} - Owner mismatch returns
permission_denied. - Oversized template uploads return
package_too_large. - Risk scan hits such as
prompt_injection_detectedare surfaced as review signals, not silent deletion.
Public/private boundary
- Public docs cover search, install, upload, and member-scoped submission management.
- Public docs do not expose moderation actions, privileged apply/rollback, secret handling, or backup/restore SOP.
Troubleshooting
401: auth is enabled and the protected member action requires login.permission_denied: the current token cannot access the requesteduser_idor action.package_too_large: uploaded template package exceeded the20 MiBlimit.prompt_injection_detected: the package was flagged and escalated for review.- Wrong locale after manual browser storage edits: remove
sharelife.uiLocaleand refresh. - Wrong developer-mode state after manual browser storage edits: remove
sharelife.developerModeand refresh.