- Sidebar.svelte: defer healthStore.refresh() until feature flags confirm health_monitor is enabled; skip entirely when disabled - health.js: remove throw error from catch block — log and return null instead, preventing 'Uncaught (in promise)' on expected 404 - test_report_audit_immutability.py: fix mock assertions — audit_service uses logger.reason/reflect/explore, not logger.info - HealthStore and Sidebar now produce zero network noise when FEATURES__HEALTH_MONITOR=false
62 lines
2.2 KiB
Python
62 lines
2.2 KiB
Python
# #region TranslatePlugin [C:2] [TYPE Module] [SEMANTICS clickhouse, translate, sql, dashboard, dialect]
|
|
# @BRIEF TranslatePlugin skeleton for cross-dialect SQL and dashboard translation.
|
|
# @LAYER Domain
|
|
# @RELATION INHERITS -> [PluginBase]
|
|
# @RATIONALE Separate plugin avoids bloating LLMAnalysisPlugin beyond fractal limit (<400 lines).
|
|
# @REJECTED Extending LLMAnalysisPlugin would conflate two distinct feature domains.
|
|
|
|
from typing import Any
|
|
|
|
from ...core.plugin_base import PluginBase
|
|
|
|
|
|
# #region TranslatePlugin [TYPE Class]
|
|
# @BRIEF Plugin for translating SQL queries and dashboard definitions across database dialects.
|
|
# @RELATION IMPLEMENTS -> backend.src.core.plugin_base.PluginBase
|
|
class TranslatePlugin(PluginBase):
|
|
@property
|
|
def id(self) -> str:
|
|
return "translate"
|
|
|
|
@property
|
|
def name(self) -> str:
|
|
return "LLM Table Translation"
|
|
|
|
@property
|
|
def description(self) -> str:
|
|
return "Cross-dialect SQL and dashboard translation using LLMs."
|
|
|
|
@property
|
|
def version(self) -> str:
|
|
return "1.0.0"
|
|
|
|
def get_schema(self) -> dict[str, Any]:
|
|
return {
|
|
"type": "object",
|
|
"properties": {
|
|
"source_dialect": {
|
|
"type": "string",
|
|
"title": "Source Dialect",
|
|
"description": "Source database dialect (e.g. PostgreSQL, ClickHouse)",
|
|
},
|
|
"target_dialect": {
|
|
"type": "string",
|
|
"title": "Target Dialect",
|
|
"description": "Target database dialect (e.g. PostgreSQL, ClickHouse)",
|
|
},
|
|
"job_id": {
|
|
"type": "string",
|
|
"title": "Translation Job ID",
|
|
"description": "Existing translation job to execute",
|
|
},
|
|
},
|
|
"required": ["job_id"],
|
|
}
|
|
|
|
async def execute(self, params: dict[str, Any], context: Any | None = None):
|
|
"""Execute a translation job — implementation deferred to later phases."""
|
|
raise NotImplementedError("TranslatePlugin.execute not yet implemented")
|
|
# #endregion TranslatePlugin
|
|
|
|
# #endregion TranslatePlugin
|