httpserver

command
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Command httpserver is an example that serves agentwatch session state over HTTP and WebSocket. It combines the httpapi and wsapi transports on a single port, driven by one or more claude source directories.

Usage:

go run ./examples/httpserver -dir ~/.claude/projects

Flags:

-addr  listen address (default 127.0.0.1:8080)
-dir   source directory to scan, repeatable
-poll  source poll interval (default 2s)

Endpoints:

GET  /sessions      – list all sessions (JSON)
GET  /sessions/{id} – single session by ID (JSON)
GET  /healthz       – source health (JSON)
GET  /sources       – registered source names (JSON)
GET  /ws            – WebSocket event stream

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL