Remove the MCP server and split NordPool today/tomorrow fetch decisions
- Drop the HomeAssistant.McpServer wiring from opencode.json along with the Cursor live-validation hook, rule and skill; update AGENTS.md and README - Rename ShouldFetchNewPrices to ShouldFetchTodaysPrices and add a separate ShouldFetchTomorrowPrice that waits until the CET publish hour (TomorrowPricesPublishHour) - Inject TimeProvider into NordPoolPriceService, use the CET zone for the current date and record fetch timestamps from it - Rework the NordPool tests around FakeTimeProvider and cover fetching only today before the publish hour
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"version": 1,
|
||||
"hooks": {
|
||||
"afterShellExecution": [
|
||||
{
|
||||
"command": "powershell -ExecutionPolicy Bypass -File .cursor/hooks/scripts/after-build-validate.ps1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
$input = [Console]::In.ReadToEnd()
|
||||
$context = $input | ConvertFrom-Json
|
||||
|
||||
$command = $context.command
|
||||
if (-not $command) { exit 0 }
|
||||
|
||||
$buildPatterns = @('dotnet build', 'dotnet run', 'dotnet publish')
|
||||
$isBuildCommand = $false
|
||||
|
||||
foreach ($pattern in $buildPatterns) {
|
||||
if ($command -match [regex]::Escape($pattern)) {
|
||||
$isBuildCommand = $true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $isBuildCommand) { exit 0 }
|
||||
|
||||
$response = @{
|
||||
message = "[Live Validation] Build command detected. Run live environment validation using the homeassistant MCP tools: 1) check_api to verify HA is reachable, 2) RunSmokeTest for a full health check, 3) ValidateEntities for the critical entities of the changed service."
|
||||
} | ConvertTo-Json -Compress
|
||||
|
||||
Write-Output $response
|
||||
exit 0
|
||||
Reference in New Issue
Block a user