Files
javadandCursor b93ecf1691 Initial commit of the Kamidso API.
Keep source, config, and deploy files. Leave runtime data, uploads, and logs out of git.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-10 13:43:09 +03:30

35 lines
1.3 KiB
PowerShell

# Quick Kamidso API status check. Run from the backend repository root.
$ErrorActionPreference = 'Continue'
$Base = 'http://127.0.0.1:5670'
function Show-Json($Label, $Url) {
Write-Host "`n=== $Label ===" -ForegroundColor Cyan
Write-Host "GET $Url"
try {
$resp = Invoke-WebRequest -Uri $Url -UseBasicParsing -TimeoutSec 3
Write-Host $resp.Content
} catch {
Write-Host "FAIL: $($_.Exception.Message)" -ForegroundColor Red
}
}
Write-Host 'Kamidso status' -ForegroundColor Yellow
$conn = Get-NetTCPConnection -LocalPort 5670 -State Listen -ErrorAction SilentlyContinue
if ($conn) {
$pids = @($conn | ForEach-Object { $_.OwningProcess } | Sort-Object -Unique)
Write-Host "Port 5670: LISTENING (PID $($pids -join ', '))" -ForegroundColor Green
} else {
Write-Host 'Port 5670: NOT LISTENING' -ForegroundColor Red
Write-Host 'Start backend: .\scripts\start-backend.ps1'
exit 1
}
Show-Json 'Live probe' "$Base/health/live"
Show-Json 'Ready probe (full stack)' "$Base/health/ready"
Show-Json 'Product health' "$Base/api/kamidso/v1/health"
Write-Host "`nLegend:" -ForegroundColor Yellow
Write-Host ' status=ready -> Kamidso API + engine OK'
Write-Host ' status=degraded -> API up, engine or Mongo issue (see engine.error)'
Write-Host ' engine=unavailable -> chat/agent will NOT work'