Bug Description
The OpenViking memory provider plugin (plugins/memory/openviking/__init__.py) uses API endpoints that don't exist on the actual OpenViking server, causing viking_browse and viking_read tool calls to fail.
Issues
1. Wrong endpoint paths and HTTP methods
| Tool |
Current (broken) |
Correct |
viking_browse |
POST /api/v1/browse |
GET /api/v1/fs/ls?uri= / GET /api/v1/fs/tree?uri= |
viking_read (abstract) |
POST /api/v1/read/abstract |
GET /api/v1/content/abstract?uri= |
viking_read (read) |
POST /api/v1/read |
GET /api/v1/content/read?uri= |
viking_read (overview) |
POST /api/v1/read |
GET /api/v1/content/overview?uri= |
2. Wrong response parsing
result.get("children", 0) → API returns a list, should be len(result)
e.get("is_dir") → API uses camelCase: e.get("isDir")
result.get("content", "") → content endpoints return the string directly
3. Missing auth headers for trusted mode
The _VikingClient doesn't send X-OpenViking-Account or X-OpenViking-User headers, which are required when the server runs in auth_mode: trusted.
4. Background threads don't propagate auth
Client instances created in background threads (search, sync, write) only receive (endpoint, api_key) but not the account/user headers.
Steps to Reproduce
- Set up OpenViking server with
auth_mode: trusted
- Configure
memory.provider: openviking in Hermes
- Try
viking_browse viking:// → fails with 404 or method not allowed
- Try
viking_read on any URI → fails similarly
Environment
Bug Description
The OpenViking memory provider plugin (
plugins/memory/openviking/__init__.py) uses API endpoints that don't exist on the actual OpenViking server, causingviking_browseandviking_readtool calls to fail.Issues
1. Wrong endpoint paths and HTTP methods
viking_browsePOST /api/v1/browseGET /api/v1/fs/ls?uri=/GET /api/v1/fs/tree?uri=viking_read(abstract)POST /api/v1/read/abstractGET /api/v1/content/abstract?uri=viking_read(read)POST /api/v1/readGET /api/v1/content/read?uri=viking_read(overview)POST /api/v1/readGET /api/v1/content/overview?uri=2. Wrong response parsing
result.get("children", 0)→ API returns a list, should belen(result)e.get("is_dir")→ API uses camelCase:e.get("isDir")result.get("content", "")→ content endpoints return the string directly3. Missing auth headers for trusted mode
The
_VikingClientdoesn't sendX-OpenViking-AccountorX-OpenViking-Userheaders, which are required when the server runs inauth_mode: trusted.4. Background threads don't propagate auth
Client instances created in background threads (search, sync, write) only receive
(endpoint, api_key)but not the account/user headers.Steps to Reproduce
auth_mode: trustedmemory.provider: openvikingin Hermesviking_browse viking://→ fails with 404 or method not allowedviking_readon any URI → fails similarlyEnvironment