1bbdd7acba
- Add apps/api/ — Hono REST API server for managing pentest scans via K8s Jobs - POST/GET /api/scans, GET /api/scans/:id, cancel, report endpoints - Bearer token auth, Temporal client integration, K8s Job builder - Dockerfile, Kustomize manifests (Deployment, Service, RBAC) - Add CLI orchestrator abstraction (docker.ts → Orchestrator interface) - DockerOrchestrator and K8sOrchestrator implementations - Backend detection via SHANNON_BACKEND env var or --backend flag - Add CI workflow: type-check + lint on PR, build+push both images on main - Switch all workflows to self-hosted runners (runners-farhoodliquor) - Add shannon-api image build to release and release-beta workflows - Add root infra/kustomization.yaml as Flux entry point - Export PipelineProgress from @shannon/worker/pipeline Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
27 lines
681 B
TypeScript
27 lines
681 B
TypeScript
/**
|
|
* `shannon status` command — show running workers and Temporal health.
|
|
*/
|
|
|
|
import { getOrchestrator } from '../backend.js';
|
|
|
|
export async function status(): Promise<void> {
|
|
const orchestrator = await getOrchestrator();
|
|
|
|
// 1. Temporal health
|
|
const temporalUp = orchestrator.isTemporalReady();
|
|
console.log(`Temporal: ${temporalUp ? 'running' : 'not running'}`);
|
|
if (temporalUp) {
|
|
console.log(' Web UI: http://localhost:8233');
|
|
}
|
|
console.log('');
|
|
|
|
// 2. Running workers
|
|
const workers = orchestrator.listRunningWorkers();
|
|
if (workers) {
|
|
console.log('Workers:');
|
|
console.log(workers);
|
|
} else {
|
|
console.log('Workers: none running');
|
|
}
|
|
}
|