Skip to main content

API

Documentation Map

API

Scope

This file summarizes the stable and relevant HTTP surfaces for jhf-warp. It does not replace the live OpenAPI document at /openapi.json.

Canonical Self-Description Endpoints

EndpointMethodPurposeStabilityAuth
/healthGETliveness checkstabledeployment-time protection if needed
/readyGETreadiness plus warnings/capabilities/self-description hintsstabledeployment-time protection if needed
/versionGETcanonical version endpoint plus manifest/version-source hintsstabledeployment-time protection if needed
/fabric-manifest.jsonGETread-only machine-readable repository/service manifeststabledeployment-time protection if needed
/api/v1/versionGETversioned API variant plus manifest/version-source hintsstabledeployment-time protection if needed
/openapi.jsonGETmachine-readable OpenAPI documentstabledeployment-time protection if needed

These endpoints are read-only. They may sit behind the same operator/internal gateway boundary as the rest of the service, but they are the only endpoints that should ever be considered for broader read-only exposure. Their shared-host publication contract is explicit:

  • jhf-warp-api is static-required on host port 18086
  • the machine-readable publication source is GET /fabric-manifest.json -> runtime_contract.port_policy
  • Fabric and other consumers must not infer live ingress ports from Docker or ad-hoc host scans

Auth Boundary Classes

  • self-description:
    • /health
    • /ready
    • /version
    • /openapi.json
    • /fabric-manifest.json
  • internal operator reads:
    • runtime, topology, drift, audit, rollout, control-agent reads, persistent-agent reads, and /metrics
  • internal control or mutation:
    • patch plan/apply
    • execution apply routes
    • control-agent reconcile and dispatch preview
    • persistent-agent learning proposal writes and review writes

The application requires a Bearer token for internal routes and consumes projected authority context without turning Warp into a local IAM or governance authority. Heddle remains the upstream identity/auth truth, Fabric remains the current projection/composition layer, and future normative governance belongs to Spine. Self-description routes stay open. Outside development and test, mutating routes fail closed when the projected authority context is unavailable or incomplete.

Treat the second and third classes as deployment-protected internal surfaces even with the built-in token gate.

Primary API Groups

Classification and Setup

Endpoint groupMethodsAuthStability
/api/v1/classifyPOSTBearer token + projected authority contextstable
/api/v1/setup/previewPOSTBearer token + projected authority contextstable
/api/v1/domainsGETBearer token + projected authority contextstable
/api/v1/domains/{domain_id}/profilesGETBearer token + projected authority contextstable
/api/v1/domains/{domain_id}/setupPOSTBearer token + projected authority contextstable

Runtime / Topology / Drift

Endpoint groupMethodsAuthStability
/api/v1/runtime/inventoryGETBearer token + projected authority contextstable
/api/v1/topology/currentGETBearer token + projected authority contextstable
/api/v1/topology/diffGETBearer token + projected authority contextstable
/api/v1/drift/summaryGETBearer token + projected authority contextstable
/metricsGETBearer token + projected authority contextstable
/api/v1/openclaw/patch/planPOSTBearer token + projected write authorizationstable
/api/v1/openclaw/patch/applyPOSTBearer token + projected write authorizationstable

Agent Federation Runtime

Endpoint groupMethodsAuthStability
/api/v1/agent-runtime/catalogGETBearer token + projected authority contextstable
/api/v1/agent-runtime/catalog/{agent_id}GETBearer token + projected authority contextstable
/api/v1/agent-runtime/team-handoff-policiesGETBearer token + projected authority contextstable
/api/v1/agent-runtime/team-handoff-policies/{agent_slug}GETBearer token + projected authority contextstable
/api/v1/agent-runtime/delegationsGETBearer token + projected authority contextstable
/api/v1/agent-runtime/delegation-stateGETBearer token + projected authority contextstable
/api/v1/agent-runtime/readinessGETBearer token + projected authority contextstable

These routes are the deterministic federation read contract for Heddle/Fabric-facing consumers. They expose root agent ids, parentage status, runtime federation state, class-transition state, and fail-closed markers so downstream consumers do not need local heuristics for ambiguous parentage, multiple roots, degraded fallback, or zombie lockout.

GET /api/v1/agent-runtime/team-handoff-policies is the canonical ACP-W4 read-only surface for:

  • explicit team assignment mode
  • delegation scope and max depth
  • same-team versus cross-team handoff posture
  • accept/reject/expire/escalate transitions
  • circular-handoff fail-closed behavior
  • missing/stale/conflicting projection fail-closed posture

Audit / Rollout

Endpoint groupMethodsAuthStability
/api/v1/audit/eventsGETBearer token + projected authority contextstable
/api/v1/rollouts/auditGETBearer token + projected authority contextstable
/api/v1/rollouts/historyGETBearer token + projected authority contextstable

Control Agent

Endpoint groupMethodsAuthStability
/api/v1/control-agent/statusGETBearer token + projected authority contextstable
/api/v1/control-agent/reconcilePOSTBearer token + projected write authorizationstable
/api/v1/control-agent/leasesGETBearer token + projected authority contextstable
/api/v1/control-agent/watchdogGETBearer token + projected authority contextstable
/api/v1/control-agent/scheduleGETBearer token + projected authority contextstable
/api/v1/control-agent/dispatch-previewPOSTBearer token + projected write authorizationstable

Persistent Domain Agents

Endpoint groupMethodsAuthStability
/api/v1/persistent-agentsGETBearer token + projected authority contextstable
/api/v1/persistent-agents/{agent_slug}GETBearer token + projected authority contextstable
/api/v1/persistent-agents/{agent_slug}/learning-proposalsGET, POSTGET projected authority, POST projected write authorizationstable
/api/v1/persistent-agents/{agent_slug}/learning-proposals/{proposal_id}/reviewPOSTBearer token + projected write authorizationstable
/api/v1/tool-profilesGETBearer token + projected authority contextstable
/api/v1/agent-tool-policiesGETBearer token + projected authority contextstable
/api/v1/agent-tool-policies/{agent_slug}GETBearer token + projected authority contextstable
/api/v1/voice/targetsGETBearer token + projected authority contextstable
/api/v1/voice/targets/defaultGETBearer token + projected authority contextstable
/api/v1/voice/targets/{agent_slug}GETBearer token + projected authority contextstable
/api/v1/voice/library-governanceGETBearer token + projected authority contextstable
/api/v1/workspaces/persistentGETBearer token + projected authority contextstable

Learning proposal governance is fail-closed: review is required before activation, self-activation is disallowed, and approved/rejected proposals are terminal (a new change requires a new proposal).

GET /api/v1/voice/library-governance is the canonical read-only governance surface for:

  • voice identity lifecycle state
  • consent expiry and re-consent triggers
  • re-record and re-clone triggers
  • brand voice pack binding
  • tenant/team inheritance posture
  • retention, deletion, and audit history references

GET /api/v1/agent-tool-policies is the canonical ACP-W3 read-only surface for:

  • sandbox approval posture
  • bounded-change scope
  • escalation mode and escalation target
  • fail-closed stale-projection action

Registration note:

  • there is still no shipped POST /api/v1/persistent-agents create/adopt endpoint
  • any future create/adopt endpoint must first pass the Spindle-backed registration validator defined in docs/SPINDLE_AGENT_REGISTRATION_REQUEST_CONTRACT.md

Auth

Inbound auth accepts:

  • Authorization: Bearer <token>

Self-description endpoints are open. Internal routes require a Bearer token and consume projected authority context. Exception: internal-read routes also allow the admitted agent lane without Bearer when X-JHF-Acting-Agent-Id (or X-JHF-Actor-Subject-Ref) and X-JHF-Policy-Projection-Version match Warp-owned tool-policy projection truth; missing or stale projection stays fail-closed. Internal write surfaces fail closed when the projected authority path is unavailable. Read-only routes may remain available in a clearly marked degraded mode when the projection layer is unavailable.

Deployment boundary protection is still required around all internal surfaces.

GET /metrics exports a minimal Prometheus-style text payload for service, persistence, runtime, drift, outbox, control-agent, and persistent-governance signals.

Request / Response Format

  • JSON over HTTP
  • schema contracts are defined by Pydantic models and surfaced through /openapi.json

Versioning Logic

  • API path version anchor: /api/v1/...
  • manifest schema anchor:
    • fabric-manifest.json -> manifest_version
  • package version source:
    • pyproject.toml
    • src/oc_agent_manager/__init__.py
  • compatibility signals:
    • fabric-manifest.json -> compatibility
    • fabric-manifest.json -> compatibility.manifest_v2_claim_owner_projection
    • fabric-manifest.json -> compatibility.agent_tool_policy_projection
    • immutable OCI tags sha-<12> plus branch tag main
    • Alembic migration lineage alembic/head

Example Calls

curl http://<internal-runtime-redacted>:8080/health
curl http://<internal-runtime-redacted>:8080/ready
curl http://<internal-runtime-redacted>:8080/version
curl -H "Authorization: Bearer ${JHF_HEDDLE_ACCESS_TOKEN}" http://<internal-runtime-redacted>:8080/metrics
curl `api/v`1/runtime/inventory
curl http://<internal-runtime-redacted>:8080/openapi.json

Stability Notes

  • self-description endpoints are intended to be stable
  • runtime/topology/drift endpoints are active/stable internal service contracts
  • MCP wrappers are not separate network API endpoints
  • no webhook signature standard exists yet

License

AGPLv3. See ../LICENSE (LICENSE). Learn more at helpifyr.com.