Skip to content
Back to search

ops-agent

AI ops/SRE agent for self-hosted infra: read-only diagnosis through an MCP server (Postgres, Kubernetes)

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/cosmin-mavrichi--ops-agent/badge.svg)](/listings/cosmin-mavrichi--ops-agent)

HTML

<a href="/listings/cosmin-mavrichi--ops-agent"><img src="/api/listings/cosmin-mavrichi--ops-agent/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Node version is pinned in `.nvmrc` (Node 26 LTS); package manager is pnpm (pinned in `package.json`).

nvm use            # or: nvm install
npm i -g pnpm@12   # once per Node version (Node 26 has no corepack)
pnpm install       # from the repo root; it is a pnpm workspace

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 47 lines
  1. # ops-agent
  2. Own AI ops agent for self-hosted infra. v1 = read-only diagnosis.
  3. ## Setup
  4. Node version is pinned in `.nvmrc` (Node 26 LTS); package manager is pnpm (pinned in `package.json`).
  5. ```
  6. nvm use # or: nvm install
  7. npm i -g pnpm@12 # once per Node version (Node 26 has no corepack)
  8. pnpm install # from the repo root; it is a pnpm workspace
  9. ```
  10. ## Layout (so far)
  11. ```
  12. packages/mcp-server/ the only code that touches infra
  13. src/registry.ts level gating + call pipeline (validate → timeout → redact → truncate → audit)
  14. src/adapters/pg.ts read-only pool (ops_ro role, read-only session, statement timeout)
  15. src/adapters/k8s.ts read-only Kubernetes client (GET only, ServiceAccount token)
  16. src/tools/postgres/slow-queries.ts pg_slow_queries — the reference tool; copy its shape
  17. src/tools/postgres/ shared (session columns), activity, blocking
  18. src/tools/k8s/ shared (namespace allowlist), pods, events, logs
  19. src/lib/sql-text.ts strips literals/comments from live query text
  20. test/harness.ts real MCP server + client over in-memory transport (useHarness in tests)
  21. test/{unit,integration}/<area>/ tests grouped by area: core, postgres, k8s
  22. lab/scenarios/<area>/ fault lab scenarios
  23. deploy/sql/ops_ro.sql one-time Postgres role setup
  24. deploy/k8s/ops-ro.yaml read-only ServiceAccount + RBAC for the agent
  25. ```
  26. ## Tests
  27. | Layer | Command | Needs | What it proves |
  28. | -------------- | --------------------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------- |
  29. | 1. Unit | `pnpm test` | nothing | gating, input validation, redaction, timeouts, error hiding, SQL whitelisting |
  30. | 2. Integration | `pnpm test:int` | Docker | each tool against the real service in a throwaway container (Testcontainers) |
  31. | 3. Fault lab | `pnpm lab` (`SCENARIO=…` for one) | Docker | break one thing in a fresh k3s + Postgres; the tools must surface the evidence, no planted secret may leak |
  32. | 4. Agent evals | `pnpm eval` (later) | Docker + API key | the model finds the root cause, uses only allowed tools, stays under budget |
  33. Rule for adding a tool: unit test with a fake adapter + integration test against the real
  34. service + at least one secret planted in its fixture that must not come out.
  35. ## License
  36. Proprietary. Copyright (c) 2026 Cosmin Mavrichi, all rights reserved. The source is public for reference only; no use, copying, modification or distribution is permitted without written permission. See [LICENSE](LICENSE).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.