FrankenTerm

Observability Surfaces

309 words1 min read5 subsectionsFrom the README at ft 0.15.21

On this page5
1. Robot Mode (JSON / TOON)2. MCP server (stdio)3. Web API + SSE streaming (feature-gated)4. Prometheus metrics (when enabled)5. ft doctor --json + diagnostic bundles

ft is designed to be observable from the outside in five distinct ways. Each is useful in a different operational context.

1. Robot Mode (JSON / TOON)

Synchronous read/write API for AI agents. Every call returns a structured envelope. Used when a meta-agent needs to make a decision based on current state.

2. MCP server (stdio)

The MCP server (feature-gated) exposes Robot Mode operations as MCP tools. Use this when integrating with an MCP-aware agent host (Claude Desktop, Cursor, etc.).

3. Web API + SSE streaming (feature-gated)

GET /health
GET /panes
GET /events
GET /search?q=…
GET /stream/events       (channel=all|deltas|detections|signals, pane_id, max_hz, cursor)
GET /stream/deltas       (pane_id, max_hz)

/stream/* endpoints are Server-Sent Events with schema ft.stream.v1. Use this when wiring ft into a non-CLI tool (a dashboard, a webhook router, a downstream service).

4. Prometheus metrics (when enabled)

ft watch --metrics (built with the metrics feature) serves /metrics on localhost, every name under the configured [metrics] prefix:

  • Uptime, observed panes, capture queue depth and capacity, storage write queue depth
  • Segments persisted, events recorded, ingest lag (average, maximum, sum and count), age of the last DB write
  • Native output coalescing (input events and bytes, emitted batches and bytes, largest batch, coalesce ratio)
  • Event bus publish, drop, subscriber, lag and per-channel queue figures
  • verified_submit_receipts_total{agent_type,state}: verified-submit receipts built in the watcher process (workflow send_verified); the MCP server logs its wa.send receipts as frankenterm::verified_submit tracing events instead
  • verified_submit_idempotency_keys{state} and verified_submit_idempotency_oldest_unresolved_age_seconds: the wa.send idempotency store's keys per state and the age of its oldest unresolved key, from a census the watcher takes every 5 minutes; an in_doubt key never clears without wa.send reconcile. verified_submit_idempotency_census_age_seconds says how old that census is

5. ft doctor --json + diagnostic bundles

For point-in-time debugging:

  • ft doctor --json — per-subsystem health verdict
  • ft status --health — fleet snapshot
  • ft triage — issues summary
  • ft diag bundle --output /tmp/ft-diag — collect everything for handoff
  • ft reproduce export --kind crash — incident bundle for forensics

For continuous monitoring, prefer Prometheus + SSE. For incident response, prefer the bundle + cockpit data.