Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/gen_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def generate_docfile(directory: Path) -> None:
for file in files:
if file.endswith(".py"):
print(f"## [{file}]({file})", file=indexfile)
print(file=indexfile)
with open(file, encoding="utf-8") as fin:
source = fin.read()
try:
Expand Down
9 changes: 9 additions & 0 deletions src/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
# List of source files stored in `src` directory

## [__init__.py](__init__.py)

Main classes for the Lightspeed Core Stack REST API service.

## [client.py](client.py)

Llama Stack client retrieval class.

## [configuration.py](configuration.py)

Configuration loader.

## [constants.py](constants.py)

Constants used in business logic.

## [lightspeed_stack.py](lightspeed_stack.py)

Entry point to the Lightspeed Core Stack REST API service.

## [llama_stack_configuration.py](llama_stack_configuration.py)

Llama Stack configuration enrichment and synthesis.

## [log.py](log.py)

Log utilities.

## [sentry.py](sentry.py)

Sentry error tracking initialization and configuration.

## [version.py](version.py)

Service version that is read by project manager tools.

6 changes: 6 additions & 0 deletions src/a2a_storage/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
# List of source files stored in `src/a2a_storage` directory

## [__init__.py](__init__.py)

A2A protocol persistent storage components.

## [context_store.py](context_store.py)

Abstract base class for A2A context-to-conversation mapping storage.

## [in_memory_context_store.py](in_memory_context_store.py)

In-memory implementation of A2A context store.

## [postgres_context_store.py](postgres_context_store.py)

PostgreSQL implementation of A2A context store.

## [sqlite_context_store.py](sqlite_context_store.py)

SQLite implementation of A2A context store.

## [storage_factory.py](storage_factory.py)

Factory for creating A2A storage backends.

4 changes: 4 additions & 0 deletions src/app/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# List of source files stored in `src/app` directory

## [__init__.py](__init__.py)

REST API service based on FastAPI.

## [database.py](database.py)

Database engine management.

## [main.py](main.py)

Definition of FastAPI based web service.

@coderabbitai coderabbitai Bot Aug 6, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Correct compound modifiers in the generated descriptions.

  • src/app/README.md#L13-L13: Use FastAPI-based web service in the source description, then regenerate the README.
  • src/authentication/README.md#L17-L17: Use JWK-based JWT auth in the source description, then regenerate the README.
🧰 Tools
🪛 LanguageTool

[grammar] ~13-~13: Use a hyphen to join words.
Context: ...main.py](main.py) Definition of FastAPI based web service. ## [routers.py](rout...

(QB_NEW_EN_HYPHEN)

📍 Affects 2 files
  • src/app/README.md#L13-L13 (this comment)
  • src/authentication/README.md#L17-L17
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/README.md` at line 13, Update the source descriptions generating
src/app/README.md at lines 13-13 and src/authentication/README.md at lines 17-17
to use the compound modifiers “FastAPI-based web service” and “JWK-based JWT
auth” respectively, then regenerate both README files so the generated
descriptions reflect those corrections.

Source: Linters/SAST tools

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coderabbitai create issue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="lightspeed-core/lightspeed-stack"
issue_body=$(cat <<'EOF'
## Summary

Correct compound modifiers in the source descriptions that generate README documentation.

## Required changes

- Change the `src/app` description to `FastAPI-based web service`.
- Change the `src/authentication` description to `JWK-based JWT auth`.
- Regenerate `src/app/README.md` and `src/authentication/README.md` after updating the source descriptions.

## Rationale

Hyphenated compound modifiers improve grammar and maintain consistent generated documentation.

## Affected areas

- Documentation source for `src/app/README.md`
- Documentation source for `src/authentication/README.md`
- Generated README files: `src/app/README.md` and `src/authentication/README.md`

## Acceptance criteria

- The generated `main.py` entry in `src/app/README.md` contains `Definition of FastAPI-based web service.`
- The generated authentication entry contains `JWK-based JWT auth`.
- The README generator produces the corrected descriptions without manual edits to generated files.

## Backlinks

- Pull request: https://github.com/lightspeed-core/lightspeed-stack/pull/2367
- Review comment: https://github.com/lightspeed-core/lightspeed-stack/pull/2367#discussion_r3730106861
- Requested by: `@tisnik`
EOF
)

gh issue create \
  --repo "$repo" \
  --title "Correct compound modifiers in generated README descriptions" \
  --body "$issue_body" \
  --assignee "tisnik"

Length of output: 1669


@tisnik Created follow-up issue #2369: Correct compound modifiers in generated README descriptions.

You are interacting with an AI system.


## [routers.py](routers.py)

REST API routers.

28 changes: 28 additions & 0 deletions src/app/endpoints/README.md
Original file line number Diff line number Diff line change
@@ -1,86 +1,114 @@
# List of source files stored in `src/app/endpoints` directory

## [__init__.py](__init__.py)

Implementation of all endpoints.

## [a2a.py](a2a.py)

Handler for A2A (Agent-to-Agent) protocol endpoints using Responses API.

## [a2a_openapi.py](a2a_openapi.py)

OpenAPI-only metadata for A2A JSON-RPC routes.

## [authorized.py](authorized.py)

Handler for REST API call to authorized endpoint.

## [config.py](config.py)

Handler for REST API call to retrieve service configuration.

## [conversations_v1.py](conversations_v1.py)

Handler for REST API calls to manage conversation history using Conversations API.

## [conversations_v2.py](conversations_v2.py)

Handler for REST API calls to manage conversation history.

## [feedback.py](feedback.py)

Handler for REST API endpoint for user feedback.

## [health.py](health.py)

Handlers for health REST API endpoints.

## [info.py](info.py)

Handler for REST API call to provide info.

## [mcp_auth.py](mcp_auth.py)

Handler for REST API calls related to MCP server authentication.

## [mcp_servers.py](mcp_servers.py)

Handler for REST API calls to dynamically manage MCP servers.

@coderabbitai coderabbitai Bot Aug 6, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Improve the adverb placement.

Use Handler for REST API calls to manage MCP servers dynamically. This avoids the split infinitive and keeps the meaning clear.

🧰 Tools
🪛 LanguageTool

[style] ~49-~49: Try moving the adverb to make the sentence clearer.
Context: ...](mcp_servers.py) Handler for REST API calls to dynamically manage MCP servers. ## metrics.py Handler ...

(SPLIT_INFINITIVE)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/endpoints/README.md` at line 49, Update the README description for
the REST API handler to place “dynamically” after “manage MCP servers,”
preserving the existing meaning and wording otherwise.

Source: Linters/SAST tools

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coderabbitai create issue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="lightspeed-core/lightspeed-stack"

gh issue create \
  --repo "$repo" \
  --title "Improve adverb placement in the MCP servers endpoint README entry" \
  --assignee "tisnik" \
  --body "$(cat <<'EOF'
## Summary

Update the `mcp_servers.py` description in `src/app/endpoints/README.md`.

## Required change

Replace:

`Handler for REST API calls to dynamically manage MCP servers.`

With:

`Handler for REST API calls to manage MCP servers dynamically.`

## Rationale

The revised sentence has clearer adverb placement and preserves the existing meaning.

## Affected area

- `src/app/endpoints/README.md`

## Acceptance criteria

- The `mcp_servers.py` README entry uses the revised sentence.
- The generated README remains consistent with the documentation generator output.

## Backlinks

- Pull request: https://github.com/lightspeed-core/lightspeed-stack/pull/2367
- Review comment: https://github.com/lightspeed-core/lightspeed-stack/pull/2367#discussion_r3730106847

Requested by: `@tisnik`
EOF
)"

Length of output: 1241


@tisnik, created follow-up issue #2368: Improve adverb placement in the MCP servers endpoint README entry.

You are interacting with an AI system.


## [metrics.py](metrics.py)

Handler for REST API call to provide metrics.

## [models.py](models.py)

Handler for REST API call to list available models.

## [prompts.py](prompts.py)

Handler for REST API calls to manage Llama Stack stored prompt templates.

## [providers.py](providers.py)

Handler for REST API calls to list and retrieve available providers.

## [query.py](query.py)

Handler for REST API call to provide answer to query using Response API.

## [rags.py](rags.py)

Handler for REST API calls to list and retrieve available RAGs.

## [responses.py](responses.py)

Handler for REST API call to provide answer using Responses API (LCORE specification).

## [responses_telemetry.py](responses_telemetry.py)

Splunk telemetry helpers for the Responses API endpoint.

## [rlsapi_v1.py](rlsapi_v1.py)

Handler for RHEL Lightspeed rlsapi v1 REST API endpoints.

## [root.py](root.py)

Handler for the / endpoint.

## [saved_prompts.py](saved_prompts.py)

Handler for REST API calls to manage saved prompts.

## [shields.py](shields.py)

Handler for REST API call to list available shields.

## [stream_interrupt.py](stream_interrupt.py)

Endpoint for interrupting in-progress streaming query requests.

## [streaming_query.py](streaming_query.py)

Streaming query handler using Responses API.

## [tools.py](tools.py)

Handler for REST API call to list available tools from MCP servers.

## [vector_stores.py](vector_stores.py)

Handler for REST API calls to manage vector stores and files.

10 changes: 10 additions & 0 deletions src/authentication/README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,42 @@
# List of source files stored in `src/authentication` directory

## [__init__.py](__init__.py)

This package contains authentication code and modules.

## [api_key_token.py](api_key_token.py)

Authentication flow for FastAPI endpoints with a provided API key.

## [interface.py](interface.py)

Abstract base class for all authentication method implementations.

## [jwk_token.py](jwk_token.py)

Manage authentication flow for FastAPI endpoints with JWK based JWT auth.

## [k8s.py](k8s.py)

Manage authentication flow for FastAPI endpoints with K8S/OCP.

## [noop.py](noop.py)

Manage authentication flow for FastAPI endpoints with no-op auth.

## [noop_with_token.py](noop_with_token.py)

Manage authentication flow for FastAPI endpoints with no-op auth and provided user token.

## [rh_identity.py](rh_identity.py)

Red Hat Identity header authentication for FastAPI endpoints.

## [trusted_proxy.py](trusted_proxy.py)

Trusted-proxy authentication module for requests forwarded by a K8s proxy.

## [utils.py](utils.py)

Authentication utility functions.

4 changes: 4 additions & 0 deletions src/authorization/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# List of source files stored in `src/authorization` directory

## [__init__.py](__init__.py)

Authorization module for role-based access control.

## [azure_token_manager.py](azure_token_manager.py)

Azure Entra ID token manager for Azure OpenAI authentication.

## [middleware.py](middleware.py)

Authorization middleware and decorators.

## [resolvers.py](resolvers.py)

Authorization resolvers for role evaluation and access control.

9 changes: 9 additions & 0 deletions src/cache/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
# List of source files stored in `src/cache` directory

## [__init__.py](__init__.py)

Various cache implementations.

## [cache.py](cache.py)

Abstract class that is parent for all cache implementations.

## [cache_entry.py](cache_entry.py)

Model for conversation history cache entry.

## [cache_error.py](cache_error.py)

Any exception that can occur during cache operations.

## [cache_factory.py](cache_factory.py)

Cache factory class.

## [in_memory_cache.py](in_memory_cache.py)

In-memory cache implementation.

## [noop_cache.py](noop_cache.py)

No-operation cache implementation.

## [postgres_cache.py](postgres_cache.py)

PostgreSQL cache implementation.

## [sqlite_cache.py](sqlite_cache.py)

Cache that uses SQLite to store cached values.

1 change: 1 addition & 0 deletions src/data/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# List of source files stored in `src/data` directory

## [__init__.py](__init__.py)

Package-shipped data files for Lightspeed Core Stack.

3 changes: 3 additions & 0 deletions src/metrics/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# List of source files stored in `src/metrics` directory

## [__init__.py](__init__.py)

Metrics module for Lightspeed Core Stack.

## [recording.py](recording.py)

Recording helpers for Prometheus metrics.

## [utils.py](utils.py)

Utility functions for metrics handling.

3 changes: 3 additions & 0 deletions src/models/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# List of source files stored in `src/models` directory

## [__init__.py](__init__.py)

Pydantic models.

## [compaction.py](compaction.py)

Pydantic models for conversation compaction.

## [config.py](config.py)

Model with service configuration.

1 change: 1 addition & 0 deletions src/models/api/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# List of source files stored in `src/models/api` directory

## [__init__.py](__init__.py)

Typed HTTP API models (OpenAPI-oriented) for FastAPI routes.

11 changes: 11 additions & 0 deletions src/models/api/requests/README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,46 @@
# List of source files stored in `src/models/api/requests` directory

## [__init__.py](__init__.py)

Concrete REST API request models grouped by domain.

## [catalog.py](catalog.py)

Request models for catalog-related endpoints.

## [conversations.py](conversations.py)

Request models for conversation endpoints.

## [feedback.py](feedback.py)

Request models for feedback endpoints.

## [mcp_servers.py](mcp_servers.py)

Request models for MCP server registration.

## [prompts.py](prompts.py)

Request models for prompt template endpoints.

## [query.py](query.py)

Request models for query and streaming interrupt endpoints.

## [responses_openai.py](responses_openai.py)

Request model for the OpenAI-compatible Responses API.

## [rlsapi.py](rlsapi.py)

Models for rlsapi v1 REST API requests.

## [saved_prompts.py](saved_prompts.py)

Request models for saved prompts endpoints.

## [vector_stores.py](vector_stores.py)

Request models for vector store and file endpoints.

Loading
Loading