mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 05:37:20 +08:00
Clarify OpenHands naming (replace “OSS” wording in docs and backend) (#12235)
Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""Sandboxed Conversation router for OpenHands Server."""
|
||||
"""Sandboxed Conversation router for OpenHands App Server."""
|
||||
|
||||
import asyncio
|
||||
import logging
|
||||
|
||||
@@ -82,7 +82,7 @@ def get_openhands_provider_base_url() -> str | None:
|
||||
|
||||
def _get_default_lifespan():
|
||||
# Check legacy parameters for saas mode. If we are in SAAS mode do not apply
|
||||
# OSS alembic migrations
|
||||
# OpenHands alembic migrations
|
||||
if 'saas' in (os.getenv('OPENHANDS_CONFIG_CLS') or '').lower():
|
||||
return None
|
||||
return OssAppLifespanService()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Event router for OpenHands Server."""
|
||||
"""Event router for OpenHands App Server."""
|
||||
|
||||
from datetime import datetime
|
||||
from typing import Annotated
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Event Callback router for OpenHands Server."""
|
||||
"""Event Callback router for OpenHands App Server."""
|
||||
|
||||
import asyncio
|
||||
import importlib
|
||||
@@ -188,7 +188,7 @@ async def get_secret(
|
||||
if user_id:
|
||||
user_auth = await get_user_auth_for_user(user_id)
|
||||
else:
|
||||
# OSS mode - use default user auth
|
||||
# OpenHands (OSS mode) - use default user auth
|
||||
user_auth = DefaultUserAuth()
|
||||
|
||||
# Create UserContext directly
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Runtime Containers router for OpenHands Server."""
|
||||
"""Runtime Containers router for OpenHands App Server."""
|
||||
|
||||
from typing import Annotated
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Runtime Images router for OpenHands Server."""
|
||||
"""Runtime Images router for OpenHands App Server."""
|
||||
|
||||
from typing import Annotated
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Database configuration and session management for OpenHands Server."""
|
||||
"""Database configuration and session management for OpenHands App Server."""
|
||||
|
||||
import asyncio
|
||||
import logging
|
||||
|
||||
@@ -31,7 +31,7 @@ class AuthUserContext(UserContext):
|
||||
|
||||
async def get_user_id(self) -> str | None:
|
||||
# If you have an auth object here you are logged in. If user_id is None
|
||||
# it means we are in OSS mode.
|
||||
# it means we are in OpenHands (OSS mode).
|
||||
user_id = await self.user_auth.get_user_id()
|
||||
return user_id
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""User router for OpenHands Server. For the moment, this simply implements the /me endpoint."""
|
||||
"""User router for OpenHands App Server. For the moment, this simply implements the /me endpoint."""
|
||||
|
||||
from fastapi import APIRouter, HTTPException, status
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class AzureDevOpsReposMixin(AzureDevOpsMixinBase):
|
||||
sort: str = 'updated',
|
||||
order: str = 'desc',
|
||||
public: bool = False,
|
||||
app_mode: AppMode = AppMode.OSS,
|
||||
app_mode: AppMode = AppMode.OPENHANDS,
|
||||
) -> list[Repository]:
|
||||
"""Search for repositories in Azure DevOps."""
|
||||
# Get all repositories across all projects in the organization
|
||||
|
||||
@@ -75,7 +75,7 @@ class GitLabReposMixin(GitLabMixinBase):
|
||||
sort: str = 'updated',
|
||||
order: str = 'desc',
|
||||
public: bool = False,
|
||||
app_mode: AppMode = AppMode.OSS,
|
||||
app_mode: AppMode = AppMode.OPENHANDS,
|
||||
) -> list[Repository]:
|
||||
if public:
|
||||
# When public=True, query is a GitLab URL that we need to parse
|
||||
|
||||
@@ -96,7 +96,7 @@ app.include_router(conversation_api_router)
|
||||
app.include_router(manage_conversation_api_router)
|
||||
app.include_router(settings_router)
|
||||
app.include_router(secrets_router)
|
||||
if server_config.app_mode == AppMode.OSS:
|
||||
if server_config.app_mode == AppMode.OPENHANDS:
|
||||
app.include_router(git_api_router)
|
||||
if server_config.enable_v1:
|
||||
app.include_router(v1_router.router)
|
||||
|
||||
@@ -15,7 +15,7 @@ from openhands.utils.import_utils import get_impl
|
||||
|
||||
class ServerConfig(ServerConfigInterface):
|
||||
config_cls = os.environ.get('OPENHANDS_CONFIG_CLS', None)
|
||||
app_mode = AppMode.OSS
|
||||
app_mode = AppMode.OPENHANDS
|
||||
posthog_client_key = 'phc_3ESMmY9SgqEAGBB6sMGK5ayYHkeUuknH2vP6FmWH9RA'
|
||||
github_client_id = os.environ.get('GITHUB_APP_CLIENT_ID', '')
|
||||
enable_billing = os.environ.get('ENABLE_BILLING', 'false') == 'true'
|
||||
|
||||
@@ -12,9 +12,12 @@ from typing import Any, ClassVar, Protocol
|
||||
|
||||
|
||||
class AppMode(Enum):
|
||||
OSS = 'oss'
|
||||
OPENHANDS = 'oss'
|
||||
SAAS = 'saas'
|
||||
|
||||
# Backwards-compatible alias (deprecated): prefer AppMode.OPENHANDS
|
||||
OSS = 'oss'
|
||||
|
||||
|
||||
class SessionMiddlewareInterface(Protocol):
|
||||
"""Protocol for session middleware classes."""
|
||||
|
||||
Reference in New Issue
Block a user