Skip to content

Commit 3680402

Browse files
committed
Update imports and mocks
1 parent 0a1d925 commit 3680402

357 files changed

Lines changed: 3029 additions & 3029 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

scripts/generate_openapi_schema.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
from fastapi.openapi.utils import get_openapi
99

10-
from client import AsyncLlamaStackClientHolder
10+
from lightspeed_stack.client import AsyncLlamaStackClientHolder
1111

1212
# it is needed to read proper configuration in order to start the app to generate schema
13-
from configuration import configuration
13+
from lightspeed_stack.configuration import configuration
1414

1515
cfg_file = "lightspeed-stack.yaml"
1616
configuration.load_configuration(cfg_file)
@@ -20,7 +20,7 @@
2020

2121
asyncio.run(AsyncLlamaStackClientHolder().load(configuration.configuration.llama_stack))
2222

23-
from app.main import app # noqa: E402 pylint: disable=C0413
23+
from lightspeed_stack.app.main import app # noqa: E402 pylint: disable=C0413
2424

2525

2626
def read_version_from_openapi(filename: str) -> str:

src/lightspeed_stack/__main__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
from lightspeed_stack.cli import main
44

5-
main()
5+
if __name__ == "__main__":
6+
main()

src/lightspeed_stack/a2a_storage/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
state is shared across all workers.
99
"""
1010

11-
from a2a_storage.context_store import A2AContextStore
12-
from a2a_storage.in_memory_context_store import InMemoryA2AContextStore
13-
from a2a_storage.postgres_context_store import PostgresA2AContextStore
14-
from a2a_storage.sqlite_context_store import SQLiteA2AContextStore
15-
from a2a_storage.storage_factory import A2AStorageFactory
11+
from lightspeed_stack.a2a_storage.context_store import A2AContextStore
12+
from lightspeed_stack.a2a_storage.in_memory_context_store import InMemoryA2AContextStore
13+
from lightspeed_stack.a2a_storage.postgres_context_store import PostgresA2AContextStore
14+
from lightspeed_stack.a2a_storage.sqlite_context_store import SQLiteA2AContextStore
15+
from lightspeed_stack.a2a_storage.storage_factory import A2AStorageFactory
1616

1717
__all__ = [
1818
"A2AContextStore",

src/lightspeed_stack/a2a_storage/in_memory_context_store.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import asyncio
44
from typing import Optional
55

6-
from a2a_storage.context_store import A2AContextStore
7-
from log import get_logger
6+
from lightspeed_stack.a2a_storage.context_store import A2AContextStore
7+
from lightspeed_stack.log import get_logger
88

99
logger = get_logger(__name__)
1010

src/lightspeed_stack/a2a_storage/postgres_context_store.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
from sqlalchemy.dialects.postgresql import insert as pg_insert
77
from sqlalchemy.ext.asyncio import AsyncEngine, async_sessionmaker
88

9-
from a2a_storage.context_store import A2AContextStore
10-
from log import get_logger
9+
from lightspeed_stack.a2a_storage.context_store import A2AContextStore
10+
from lightspeed_stack.log import get_logger
1111

1212
logger = get_logger(__name__)
1313

src/lightspeed_stack/a2a_storage/sqlite_context_store.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from sqlalchemy import Column, MetaData, String, Table, delete, select
66
from sqlalchemy.ext.asyncio import AsyncEngine, async_sessionmaker
77

8-
from a2a_storage.context_store import A2AContextStore
9-
from log import get_logger
8+
from lightspeed_stack.a2a_storage.context_store import A2AContextStore
9+
from lightspeed_stack.log import get_logger
1010

1111
logger = get_logger(__name__)
1212

src/lightspeed_stack/a2a_storage/storage_factory.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
from a2a.server.tasks import DatabaseTaskStore, InMemoryTaskStore, TaskStore
77
from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine
88

9-
from a2a_storage.context_store import A2AContextStore
10-
from a2a_storage.in_memory_context_store import InMemoryA2AContextStore
11-
from a2a_storage.postgres_context_store import PostgresA2AContextStore
12-
from a2a_storage.sqlite_context_store import SQLiteA2AContextStore
13-
from log import get_logger
14-
from models.config import A2AStateConfiguration
9+
from lightspeed_stack.a2a_storage.context_store import A2AContextStore
10+
from lightspeed_stack.a2a_storage.in_memory_context_store import InMemoryA2AContextStore
11+
from lightspeed_stack.a2a_storage.postgres_context_store import PostgresA2AContextStore
12+
from lightspeed_stack.a2a_storage.sqlite_context_store import SQLiteA2AContextStore
13+
from lightspeed_stack.log import get_logger
14+
from lightspeed_stack.models.config import A2AStateConfiguration
1515

1616
logger = get_logger(__name__)
1717

src/lightspeed_stack/app/database.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
from sqlalchemy.engine.base import Engine
99
from sqlalchemy.orm import Session, sessionmaker
1010

11-
from configuration import configuration
12-
from log import get_logger
13-
from models.config import PostgreSQLDatabaseConfiguration, SQLiteDatabaseConfiguration
14-
from models.database.base import Base
11+
from lightspeed_stack.configuration import configuration
12+
from lightspeed_stack.log import get_logger
13+
from lightspeed_stack.models.config import PostgreSQLDatabaseConfiguration, SQLiteDatabaseConfiguration
14+
from lightspeed_stack.models.database.base import Base
1515

1616
logger = get_logger(__name__)
1717

src/lightspeed_stack/app/endpoints/a2a.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,24 @@
4949
from pydantic_ai.run import AgentRunResult
5050
from starlette.responses import Response, StreamingResponse
5151

52-
from a2a_storage import A2AContextStore, A2AStorageFactory
53-
from app.endpoints.a2a_openapi import a2a_jsonrpc_responses
54-
from authentication import get_auth_dependency
55-
from authentication.interface import AuthTuple
56-
from authorization.middleware import authorize
57-
from client import AsyncLlamaStackClientHolder
58-
from configuration import configuration
59-
from constants import MEDIA_TYPE_EVENT_STREAM
60-
from log import get_logger
61-
from models.api.requests import QueryRequest
62-
from models.config import Action
63-
from utils.agents.query import map_agent_inference_error
64-
from utils.conversation_compaction import apply_compaction_blocking
65-
from utils.mcp_headers import McpHeaders, mcp_headers_dependency
66-
from utils.pydantic_ai_helpers import build_agent
67-
from utils.responses import prepare_responses_params
68-
from utils.suid import normalize_conversation_id
69-
from version import __version__
52+
from lightspeed_stack.a2a_storage import A2AContextStore, A2AStorageFactory
53+
from lightspeed_stack.app.endpoints.a2a_openapi import a2a_jsonrpc_responses
54+
from lightspeed_stack.authentication import get_auth_dependency
55+
from lightspeed_stack.authentication.interface import AuthTuple
56+
from lightspeed_stack.authorization.middleware import authorize
57+
from lightspeed_stack.client import AsyncLlamaStackClientHolder
58+
from lightspeed_stack.configuration import configuration
59+
from lightspeed_stack.constants import MEDIA_TYPE_EVENT_STREAM
60+
from lightspeed_stack.log import get_logger
61+
from lightspeed_stack.models.api.requests import QueryRequest
62+
from lightspeed_stack.models.config import Action
63+
from lightspeed_stack.utils.agents.query import map_agent_inference_error
64+
from lightspeed_stack.utils.conversation_compaction import apply_compaction_blocking
65+
from lightspeed_stack.utils.mcp_headers import McpHeaders, mcp_headers_dependency
66+
from lightspeed_stack.utils.pydantic_ai_helpers import build_agent
67+
from lightspeed_stack.utils.responses import prepare_responses_params
68+
from lightspeed_stack.utils.suid import normalize_conversation_id
69+
from lightspeed_stack.version import __version__
7070

7171
logger = get_logger(__name__)
7272
router = APIRouter(tags=["a2a"])

src/lightspeed_stack/app/endpoints/a2a_openapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from typing import Any, Final
44

5-
from constants import MEDIA_TYPE_EVENT_STREAM, MEDIA_TYPE_JSON
5+
from lightspeed_stack.constants import MEDIA_TYPE_EVENT_STREAM, MEDIA_TYPE_JSON
66

77
# 200 may be buffered JSON-RPC (application/json) or SSE (text/event-stream).
88
a2a_jsonrpc_responses: Final[dict[int | str, dict[str, Any]]] = {

0 commit comments

Comments
 (0)