fix: expose public status endpoints in all modes and enable vector sync (#637)
Make /api/v1/status and /api/v1/vector-sync/status available in all non-Smithery deployment modes so Astrolabe can show server status even in single-user BasicAuth mode. Previously these were only mounted when OAuth or multi-user BasicAuth with offline access was enabled. - Split management API routes into public (Tier 1) and authenticated (Tier 2+) - Enable semantic search with in-memory Qdrant for single-user docker service - Update astrolabe submodule with admin settings fix Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
6f645ecdce
commit
331abdd00a
+2
-2
@@ -90,7 +90,7 @@ services:
|
|||||||
- NEXTCLOUD_PUBLIC_ISSUER_URL=http://localhost:8080
|
- NEXTCLOUD_PUBLIC_ISSUER_URL=http://localhost:8080
|
||||||
|
|
||||||
# Semantic search configuration (ADR-007, ADR-021)
|
# Semantic search configuration (ADR-007, ADR-021)
|
||||||
#- ENABLE_SEMANTIC_SEARCH=true
|
- ENABLE_SEMANTIC_SEARCH=true
|
||||||
- VECTOR_SYNC_SCAN_INTERVAL=60
|
- VECTOR_SYNC_SCAN_INTERVAL=60
|
||||||
- VECTOR_SYNC_PROCESSOR_WORKERS=1
|
- VECTOR_SYNC_PROCESSOR_WORKERS=1
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ services:
|
|||||||
# 1. Network mode: Set QDRANT_URL=http://qdrant:6333 (requires qdrant service)
|
# 1. Network mode: Set QDRANT_URL=http://qdrant:6333 (requires qdrant service)
|
||||||
# 2. In-memory mode: Set QDRANT_LOCATION=:memory: (default if nothing set)
|
# 2. In-memory mode: Set QDRANT_LOCATION=:memory: (default if nothing set)
|
||||||
# 3. Persistent local: Set QDRANT_LOCATION=/app/data/qdrant (stored in mcp-data volume)
|
# 3. Persistent local: Set QDRANT_LOCATION=/app/data/qdrant (stored in mcp-data volume)
|
||||||
#- QDRANT_LOCATION=/app/data/qdrant # In-memory mode used if not set
|
- QDRANT_LOCATION=":memory:"
|
||||||
#- QDRANT_URL=http://qdrant:6333 # Uncomment for network mode
|
#- QDRANT_URL=http://qdrant:6333 # Uncomment for network mode
|
||||||
#- QDRANT_API_KEY=${QDRANT_API_KEY:-my_secret_api_key} # Only for network mode
|
#- QDRANT_API_KEY=${QDRANT_API_KEY:-my_secret_api_key} # Only for network mode
|
||||||
|
|
||||||
|
|||||||
@@ -2187,11 +2187,9 @@ def get_app(transport: str = "streamable-http", enabled_apps: list[str] | None =
|
|||||||
logger.info("Test webhook endpoint enabled: /webhooks/nextcloud")
|
logger.info("Test webhook endpoint enabled: /webhooks/nextcloud")
|
||||||
|
|
||||||
# Add management API endpoints for Nextcloud PHP app
|
# Add management API endpoints for Nextcloud PHP app
|
||||||
# Available in: OAuth modes OR multi-user BasicAuth with offline access (for Astrolabe integration)
|
# Tier 1: Public endpoints (no auth required) - available in all non-Smithery modes
|
||||||
enable_management_apis = oauth_enabled or (
|
# These let Astrolabe show basic server status even in single-user BasicAuth mode
|
||||||
settings.enable_multi_user_basic_auth and settings.enable_offline_access
|
if deployment_mode != DeploymentMode.SMITHERY_STATELESS:
|
||||||
)
|
|
||||||
if enable_management_apis:
|
|
||||||
routes.append(Route("/api/v1/status", get_server_status, methods=["GET"]))
|
routes.append(Route("/api/v1/status", get_server_status, methods=["GET"]))
|
||||||
routes.append(
|
routes.append(
|
||||||
Route(
|
Route(
|
||||||
@@ -2200,6 +2198,16 @@ def get_app(transport: str = "streamable-http", enabled_apps: list[str] | None =
|
|||||||
methods=["GET"],
|
methods=["GET"],
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
logger.info(
|
||||||
|
"Public management API endpoints enabled: /api/v1/status, /api/v1/vector-sync/status"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Tier 2+: Authenticated management endpoints (OAuth required)
|
||||||
|
# Available in: OAuth modes OR multi-user BasicAuth with offline access
|
||||||
|
enable_authenticated_management_apis = oauth_enabled or (
|
||||||
|
settings.enable_multi_user_basic_auth and settings.enable_offline_access
|
||||||
|
)
|
||||||
|
if enable_authenticated_management_apis:
|
||||||
routes.append(
|
routes.append(
|
||||||
Route(
|
Route(
|
||||||
"/api/v1/users/{user_id}/session",
|
"/api/v1/users/{user_id}/session",
|
||||||
@@ -2270,7 +2278,7 @@ def get_app(transport: str = "streamable-http", enabled_apps: list[str] | None =
|
|||||||
)
|
)
|
||||||
routes.append(Route("/api/v1/scopes", list_supported_scopes, methods=["GET"]))
|
routes.append(Route("/api/v1/scopes", list_supported_scopes, methods=["GET"]))
|
||||||
logger.info(
|
logger.info(
|
||||||
"Management API endpoints enabled: /api/v1/status, /api/v1/vector-sync/status, "
|
"Authenticated management API endpoints enabled: "
|
||||||
"/api/v1/users/{user_id}/session, /api/v1/users/{user_id}/revoke, "
|
"/api/v1/users/{user_id}/session, /api/v1/users/{user_id}/revoke, "
|
||||||
"/api/v1/users/{user_id}/app-password, /api/v1/users/{user_id}/access, "
|
"/api/v1/users/{user_id}/app-password, /api/v1/users/{user_id}/access, "
|
||||||
"/api/v1/users/{user_id}/scopes, /api/v1/scopes, "
|
"/api/v1/users/{user_id}/scopes, /api/v1/scopes, "
|
||||||
|
|||||||
Vendored
+1
-1
Submodule third_party/astrolabe updated: af53f1c02f...41d4a409c5
Reference in New Issue
Block a user