mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-07-10 00:14:38 +00:00
Manifest-backed MCP tools, prompts, and resources with surface affordance contracts; agent capability manifest and governance projection; API contract tests and capability route projection; operations-loop and intelligence-funnel telemetry; release-control subsystem documentation, registry, and tooling; licensing and configuration.
26 lines
876 B
Go
26 lines
876 B
Go
package api
|
|
|
|
import (
|
|
"encoding/json"
|
|
"net/http"
|
|
|
|
"github.com/rcourtman/pulse-go-rewrite/internal/agentcapabilities"
|
|
)
|
|
|
|
type AgentCapability = agentcapabilities.Capability
|
|
type AgentCapabilitiesManifest = agentcapabilities.Manifest
|
|
|
|
// HandleAgentCapabilitiesManifest serves
|
|
// `GET /api/agent/capabilities` — the discovery document for Pulse's
|
|
// agent surface. Cacheable, unauthenticated (the underlying
|
|
// capabilities have their own scopes); agents fetch this once and
|
|
// learn what's available.
|
|
func HandleAgentCapabilitiesManifest(w http.ResponseWriter, r *http.Request) {
|
|
if r.Method != http.MethodGet {
|
|
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
|
|
return
|
|
}
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.Header().Set("Cache-Control", "public, max-age=300")
|
|
_ = json.NewEncoder(w).Encode(agentcapabilities.CanonicalManifest())
|
|
}
|