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
Binary file modified docs/config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions docs/config.puml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
@startuml classes
set namespaceSeparator none
class "AccessRule" as src.models.config.AccessRule {
actions : list[Action]
role : str
}
class "Action" as src.models.config.Action {
name
}
Comment on lines +3 to +9
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Wire AccessRule.actions to Action and type Action.name

  • Add composition from AccessRule to Action for actions list.
  • Make Action.name typed for consistency.
 class "Action" as src.models.config.Action {
-  name
+  name : str
 }
+src.models.config.Action --* src.models.config.AccessRule : actions
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
class "AccessRule" as src.models.config.AccessRule {
actions : list[Action]
role : str
}
class "Action" as src.models.config.Action {
name
}
class "AccessRule" as src.models.config.AccessRule {
actions : list[Action]
role : str
}
class "Action" as src.models.config.Action {
name : str
}
src.models.config.Action --* src.models.config.AccessRule : actions
🤖 Prompt for AI Agents
In docs/config.puml around lines 3 to 9, the AccessRule.actions list is not
wired to the Action class and Action.name lacks a type; add a composition
relationship from AccessRule to Action for the actions collection (composition
that labels the association "actions" and implies multiplicity of many) and
update the Action class to declare name with an explicit type (string) so it
reads consistently with other attributes.

class "AuthenticationConfiguration" as src.models.config.AuthenticationConfiguration {
jwk_config : Optional[JwkConfiguration]
jwk_configuration
Expand All @@ -9,6 +16,9 @@ class "AuthenticationConfiguration" as src.models.config.AuthenticationConfigura
skip_tls_verification : bool
check_authentication_model() -> Self
}
class "AuthorizationConfiguration" as src.models.config.AuthorizationConfiguration {
access_rules : Optional[list[AccessRule]]
}
Comment on lines +19 to +21
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Missing association for Configuration.authorization

Configuration has authorization but there’s no composition line. Add it to keep diagram navigable.

+src.models.config.AuthorizationConfiguration --* src.models.config.Configuration : authorization
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
class "AuthorizationConfiguration" as src.models.config.AuthorizationConfiguration {
access_rules : Optional[list[AccessRule]]
}
class "AuthorizationConfiguration" as src.models.config.AuthorizationConfiguration {
access_rules : Optional[list[AccessRule]]
}
src.models.config.AuthorizationConfiguration --* src.models.config.Configuration : authorization
🤖 Prompt for AI Agents
In docs/config.puml around lines 19 to 21, the class AuthorizationConfiguration
is declared but there is no composition/association from the main Configuration
class; add a composition line from Configuration to AuthorizationConfiguration
(using the appropriate PlantUML composition notation) so Configuration shows it
contains the authorization configuration, and place it near the existing class
declarations to keep the diagram layout consistent and navigable.

class "CORSConfiguration" as src.models.config.CORSConfiguration {
allow_credentials : bool
allow_headers : list[str]
Expand All @@ -18,6 +28,7 @@ class "CORSConfiguration" as src.models.config.CORSConfiguration {
}
class "Configuration" as src.models.config.Configuration {
authentication
authorization : Optional[AuthorizationConfiguration]
customization : Optional[Customization]
database
inference
Expand All @@ -28,6 +39,9 @@ class "Configuration" as src.models.config.Configuration {
user_data_collection
dump(filename: str) -> None
}
class "ConfigurationBase" as src.models.config.ConfigurationBase {
model_config
}
class "Customization" as src.models.config.Customization {
disable_query_system_prompt : bool
system_prompt : Optional[str]
Expand All @@ -46,14 +60,27 @@ class "InferenceConfiguration" as src.models.config.InferenceConfiguration {
default_provider : Optional[str]
check_default_model_and_provider() -> Self
}
class "JsonPathOperator" as src.models.config.JsonPathOperator {
name
}
class "JwkConfiguration" as src.models.config.JwkConfiguration {
jwt_configuration
url : AnyHttpUrl
}
Comment on lines 66 to 69
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Misplaced and mistyped relationship between JWK and JWT

JwkConfiguration currently lists jwt_configuration (untyped). This is likely inverted and mistyped. Typically, JwtConfiguration contains a JwkConfiguration (jwk_configuration).

 class "JwkConfiguration" as src.models.config.JwkConfiguration {
-  jwt_configuration
   url : AnyHttpUrl
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
class "JwkConfiguration" as src.models.config.JwkConfiguration {
jwt_configuration
url : AnyHttpUrl
}
class "JwkConfiguration" as src.models.config.JwkConfiguration {
url : AnyHttpUrl
}
🤖 Prompt for AI Agents
In docs/config.puml around lines 66 to 69, the UML shows JwkConfiguration
containing an untyped and misplaced field "jwt_configuration"; instead model
JwtConfiguration as the owner of a JwkConfiguration. Remove the
jwt_configuration field from JwkConfiguration and add a properly typed field on
JwtConfiguration (e.g., jwk_configuration : JwkConfiguration or same fully
qualified type) so JwtConfiguration references JwkConfiguration with a clear
name and type.

class "JwtConfiguration" as src.models.config.JwtConfiguration {
role_rules : Optional[list[JwtRoleRule]]
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Add link from JwtConfiguration to JwtRoleRule (role_rules)

role_rules is a list but there’s no composition line; add it.

+src.models.config.JwtRoleRule --* src.models.config.JwtConfiguration : role_rules

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In docs/config.puml around line 71, the JwtConfiguration class documents
role_rules as Optional[list[JwtRoleRule]] but lacks a composition/association;
add a composition from JwtConfiguration to JwtRoleRule using PlantUML syntax
(filled diamond on JwtConfiguration side) and include multiplicity 0..* and the
role name/label (e.g., role_rules : Optional[list[JwtRoleRule]]), so the diagram
shows JwtConfiguration *-- "0..*" JwtRoleRule : role_rules.

user_id_claim : str
username_claim : str
}
class "JwtRoleRule" as src.models.config.JwtRoleRule {
jsonpath : str
negate : bool
operator
roles : list[str]
value : Any
check_jsonpath() -> Self
check_roles() -> Self
}
class "LlamaStackConfiguration" as src.models.config.LlamaStackConfiguration {
api_key : Optional[str]
library_client_config_path : Optional[str]
Expand Down Expand Up @@ -105,10 +132,29 @@ class "UserDataCollection" as src.models.config.UserDataCollection {
transcripts_storage : Optional[str]
check_storage_location_is_set_when_needed() -> Self
}
src.models.config.AccessRule --|> src.models.config.ConfigurationBase
src.models.config.AuthenticationConfiguration --|> src.models.config.ConfigurationBase
src.models.config.AuthorizationConfiguration --|> src.models.config.ConfigurationBase
src.models.config.CORSConfiguration --|> src.models.config.ConfigurationBase
src.models.config.Configuration --|> src.models.config.ConfigurationBase
src.models.config.Customization --|> src.models.config.ConfigurationBase
src.models.config.DatabaseConfiguration --|> src.models.config.ConfigurationBase
src.models.config.InferenceConfiguration --|> src.models.config.ConfigurationBase
src.models.config.JwkConfiguration --|> src.models.config.ConfigurationBase
src.models.config.JwtConfiguration --|> src.models.config.ConfigurationBase
src.models.config.JwtRoleRule --|> src.models.config.ConfigurationBase
src.models.config.LlamaStackConfiguration --|> src.models.config.ConfigurationBase
src.models.config.ModelContextProtocolServer --|> src.models.config.ConfigurationBase
src.models.config.PostgreSQLDatabaseConfiguration --|> src.models.config.ConfigurationBase
src.models.config.SQLiteDatabaseConfiguration --|> src.models.config.ConfigurationBase
src.models.config.ServiceConfiguration --|> src.models.config.ConfigurationBase
src.models.config.TLSConfiguration --|> src.models.config.ConfigurationBase
src.models.config.UserDataCollection --|> src.models.config.ConfigurationBase
src.models.config.AuthenticationConfiguration --* src.models.config.Configuration : authentication
src.models.config.CORSConfiguration --* src.models.config.ServiceConfiguration : cors
src.models.config.DatabaseConfiguration --* src.models.config.Configuration : database
src.models.config.InferenceConfiguration --* src.models.config.Configuration : inference
src.models.config.JsonPathOperator --* src.models.config.JwtRoleRule : operator
src.models.config.JwtConfiguration --* src.models.config.JwkConfiguration : jwt_configuration
src.models.config.LlamaStackConfiguration --* src.models.config.Configuration : llama_stack
Comment on lines +157 to 159
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Invert composition and fix label: jwk_configuration (not jwt_configuration)

Current line implies JwkConfiguration contains JwtConfiguration. In practice JwtConfiguration should contain JwkConfiguration and the role name should be jwk_configuration.

-src.models.config.JwtConfiguration --* src.models.config.JwkConfiguration : jwt_configuration
+src.models.config.JwkConfiguration --* src.models.config.JwtConfiguration : jwk_configuration
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
src.models.config.JsonPathOperator --* src.models.config.JwtRoleRule : operator
src.models.config.JwtConfiguration --* src.models.config.JwkConfiguration : jwt_configuration
src.models.config.LlamaStackConfiguration --* src.models.config.Configuration : llama_stack
src.models.config.JsonPathOperator --* src.models.config.JwtRoleRule : operator
src.models.config.JwkConfiguration --* src.models.config.JwtConfiguration : jwk_configuration
src.models.config.LlamaStackConfiguration --* src.models.config.Configuration : llama_stack
🤖 Prompt for AI Agents
In docs/config.puml around lines 157-159, invert the composition so
JwtConfiguration contains JwkConfiguration (i.e., ensure the composition edge
points from src.models.config.JwtConfiguration to
src.models.config.JwkConfiguration) and correct the role/label text from
"jwt_configuration" to "jwk_configuration".

src.models.config.SQLiteDatabaseConfiguration --* src.models.config.DatabaseConfiguration : sqlite
Expand Down
Loading