super-log

v0.4.1
com.super-log/super-log Checked 4 hours ago Published 2 months ago

Query your local super-log bench from an AI agent - read-only log tools over the hub.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

hub_status

Check whether the super-log hub is running and how much traffic it has seen. Call this first when logs seem missing - it distinguishes "the bench is down" from "the app logged nothing".

agent_report

Put yourself on the bench's AGENTS blotter: say who you are, which LLM you run on, what you are doing, and how often to expect you. For a long job (an 8-hour build, an overnight proof search), call this on a schedule - every interval_s, default 900 (15 minutes) - AND on events: milestones, errors (level WARN/ERROR), and done. The blotter shows your last status and greys you when you miss your own promised cadence, so a silent agent LOOKS silent. This is the single deliberate write this otherwise read-only server performs, and it can only land on agent.* status topics.

ParameterTypeDescription
agent *stringYour name on the blotter (e.g. "proof-search", "nightly-builder")
llm *stringThe model you run on (e.g. "claude-fable-5") - the blotter displays it
status *stringOne line: what is happening right now
interval_snumberHow often you promise to report (default 900); the blotter greys you at 2x
levelstringDefault INFO; WARN/ERROR when the status IS the problem
pctnumberPercent complete, when the job has a shape
taskstringThe overall job (e.g. "8h proof search, mathlib bump")

list_webhooks

List the alarm gateway's routes: the production alarm door and every provisioned webhook endpoint (capture / relay / forward) with its PUBLIC URL, health light, ping latency and kind. Use this to find the URL to hand a webhook sender (Stripe, GitHub, a partner) - deliveries then arrive as wh.<name> events (tail_logs with topic wh.<name>; fields carry the signature verdict, relay status and up to 32KB of body). Ask stream_guide about "wh" for how to read them.

list_streams

Summarise which log streams (topics) are active and their level mix. Cheap orientation - call this before tail_logs so you know what topics exist and where the errors are, instead of guessing topic names.

ParameterTypeDescription
windownumberHow many recent events to summarise (default 1000, max 1000)

tail_logs

Read recent log events, newest last. ALWAYS narrow with topic and/or level - the firehose can be thousands of events per second. Returns a cursor; pass it back as `since` to read only what is new since your last call.

ParameterTypeDescription
containsstringOnly events whose text contains this (case-insensitive)
levelstringMinimum level; ERROR is the usual choice when hunting a bug
limitnumberMax events (default 50, cap 200)
sincenumberCursor from a previous call; 0 or omitted starts from the oldest kept
topicstringExact topic (cpp.clock), a prefix ending in a dot (cpp. matches all cpp streams), or * for all
tracestringFollow ONE user action across every stream by its correlation id. This is the best tool for "what happened when X was pressed" - it deliberately ignores topic.

search_logs

Find events matching text across the recent window - use when you know what the message says (an exception, an order id, a URL) but not which stream it is in.

ParameterTypeDescription
contains *stringText to find (case-insensitive)
levelstringOptional minimum level
limitnumberMax matches (default 50, cap 200)
topicstringOptional topic or prefix to narrow the search

search_history

Search the on-disk journal: hours or days of history, not the few minutes the hub keeps in memory. This is the tool for "what happened at 3am" or anything older than the live ring - tail_logs and search_logs cannot see that far back. Needs superlog-journal to have been running at the time.

ParameterTypeDescription
containsstringCase-insensitive substring of the whole event, fields included
dirstringJournal directory (default ./superlog-journal, or $SUPER_LOG_JOURNAL)
levelstringMinimum level
limitnumberMax events (default 50, cap 200); the NEWEST matches
sincestringStart of the window: 30m, 2h, 3d, 03:00 (today, UTC), 2026-08-22, or a full ISO timestamp. Windows on hub arrival time, which is the only reliable clock across streams
topicstringExact topic (cpp.clock), a prefix ending in a dot (expo. matches every device stream), or *
tracestringOne correlation id, across every stream
untilstringEnd of the window, same forms as since

wait_for

Block until a matching event appears, then return it. This is the one to use after you trigger something: start the action, then wait for its log line or error rather than sleeping and hoping. Returns promptly on the first match.

ParameterTypeDescription
containsstringText the event must contain (case-insensitive)
levelstringOptional minimum level, e.g. ERROR
sincenumberOnly consider events after this cursor. Take a cursor BEFORE triggering your action so you cannot match something old.
timeout_msnumberHow long to wait (default 30000, max 120000)
topicstringOptional topic or prefix

stream_guide

Detailed documentation for a bench capability, before working with an unfamiliar topic: what its events and metrics mean, how to read them, and the gotchas (what a stall escalation is, why power says not root, why a diff can be silent). No arguments lists everything; name one entry or a playbook for the detail.

ParameterTypeDescription
namestringA stream entry (power, dl, build, fs, vitals, gpu, os-app, net, history) or a playbook (triage, follow-a-trace, silent-stream, power-incident, watch-a-download)