Add persistent settings storage for library_remote

Replace env-var-only LIBRARY_REMOTE configuration with disk-persisted
settings. The setting can now be edited in the dashboard Settings page,
with LIBRARY_REMOTE env var serving as initial default when no settings
file exists.

Changes:
- Add src/settings.rs for settings storage with JSON persistence
- Add src/api/settings.rs for settings API endpoints
- Update dashboard Settings page with editable library remote field
- Update library-unavailable component to link to Settings page
- Update documentation to recommend Settings page method
This commit is contained in:
Thomas Marchand
2026-01-17 18:01:23 +00:00
parent 38df08deae
commit 6389dccfc3
13 changed files with 514 additions and 32 deletions

View File

@@ -391,8 +391,15 @@ git push -u origin HEAD:main
### 5.2 Configure Open Agent to use it
**Option A: Via Dashboard Settings (recommended)**
After starting Open Agent, go to **Settings** in the dashboard and set the Library Remote URL.
This is the preferred method as it persists the setting to disk and allows runtime updates without restart.
**Option B: Via environment variable (initial default)**
Set in `/etc/open_agent/open_agent.env`:
- `LIBRARY_REMOTE=git@github.com:<your-org>/<your-library-repo>.git`
- `LIBRARY_REMOTE=git@github.com:<your-org>/<your-library-repo>.git` (used as initial default if not configured in Settings)
- optional: `LIBRARY_PATH=/root/.openagent/library`
---
@@ -424,6 +431,7 @@ PORT=3000
# Default filesystem root for Open Agent (agent still has full system access)
WORKING_DIR=/root
LIBRARY_PATH=/root/.openagent/library
# Library remote (optional, can also be set via dashboard Settings page)
LIBRARY_REMOTE=git@github.com:<your-org>/<your-library-repo>.git
# Auth (set DEV_MODE=false on real deployments)