Add harness observability stack and realtime portal 9 months ago
Authored
mweinbach 2/11/2026, 7:23:28 PM Implement end-to-end harness observability and context controls with websocket-first wiring, local Docker stack management, smoke/full harness runners, SLO/query evaluation, desktop+tui surfaces, and protocol/docs/test updates.\n\nAdd a custom Next.js realtime portal under apps/portal to aggregate harness artifacts, stream run status over SSE, inspect run details, and query logs/metrics/traces live.\n\nInclude verbose operational documentation for running CLI/TUI in a target directory and watching live tracing, plus portal usage and endpoint behavior. Parent981ae65
54 files changed
.github/workflows/ci.yml +50 −0 AGENTS.md +2 −0 README.md +27 −0 apps/desktop/src/app/store.ts +194 −0 apps/desktop/src/app/types.ts +27 −1 apps/desktop/src/ui/ChatView.tsx +184 −0 apps/portal/.gitignore +2 −0 apps/portal/app/api/observability/query/route.ts +39 −0 apps/portal/app/api/observability/snapshot/route.ts +10
−0
apps/portal/app/api/runs/detail/route.ts +22 −0
apps/portal/app/api/runs/route.ts +14 −0
apps/portal/app/api/stream/runs/route.ts +79 −0
apps/portal/app/globals.css +508 −0
apps/portal/app/layout.tsx +16 −0
apps/portal/app/page.tsx +5 −0
apps/portal/bun.lock +138 −0
apps/portal/components/dashboard.tsx +642 −0
apps/portal/lib/harness.ts +422 −0
apps/portal/lib/observability.ts +431 −0
apps/portal/next-env.d.ts +5 −0
apps/portal/next.config.ts +9 −0
apps/portal/package.json +22 −0
apps/portal/tsconfig.json +24 −0
config/defaults.json +16 −1
config/observability/docker-compose.yml +32 −0
config/observability/vector/vector.toml +32 −0
docs/harness/context.md +27 −0
docs/harness/index.md +13 −0
docs/harness/observability.md +36 −0
docs/harness/runbook.md +883 −0
docs/harness/slo.md +32 −0
docs/websocket-protocol.md +190 −0
package.json +10 −1
scripts/check_docs.ts +77 −0
scripts/harness_smoke.ts +170 −0
scripts/observability_stack.ts +146 −0
scripts/run_raw_agent_loops.ts +409 −262
src/config.ts +68 −0
src/harness/contextStore.ts +42 −0
src/observability/otel.ts +98 −0
src/observability/query.ts +191 −0
src/observability/runtime.ts +124 −0
src/observability/slo.ts +131 −0
src/server/protocol.ts +135 −1
src/server/session.ts +81 −2
src/server/startServer.ts +22 −0
src/tui/index.tsx +283 −1
src/types.ts +105 −0
test/observability.otel.test.ts +122 −0
test/observability.slo.test.ts +150 −0
test/protocol.test.ts +132 −0
test/server.connect.test.ts +1 −1
test/server.test.ts +64 −5
test/session.test.ts +82 −0