1.2: Build API client (src/api.ts) #2

Open
opened 2026-05-22 05:19:21 +00:00 by kaykayyali · 0 comments
Owner

Fetch wrappers for all damascus-v3 API endpoints.

Functions:

  • fetchHealth() → { healthy, components: { postgres, redis } }
  • fetchWorkers() → { count, workers: [{ agent_id, running, addr }] }
  • fetchStatus(since?) → { agents: [{ id, events }] }
  • fetchEvents(filters?) → { events: [...] }
  • sendMessage({ to, content, from?, context? }) → { ok, job_id }
  • fetchPersona(id) → { frontmatter, content }
  • fetchSkills(agentId) → [{ name, description, requiredTools, preconditions }]

Base URL from env var or window.location.

Fetch wrappers for all damascus-v3 API endpoints. Functions: - `fetchHealth()` → { healthy, components: { postgres, redis } } - `fetchWorkers()` → { count, workers: [{ agent_id, running, addr }] } - `fetchStatus(since?)` → { agents: [{ id, events }] } - `fetchEvents(filters?)` → { events: [...] } - `sendMessage({ to, content, from?, context? })` → { ok, job_id } - `fetchPersona(id)` → { frontmatter, content } - `fetchSkills(agentId)` → [{ name, description, requiredTools, preconditions }] Base URL from env var or window.location.
kaykayyali added this to the Phase 1: Scaffold + Core Chat milestone 2026-05-22 05:19:21 +00:00
kaykayyali added the phase-1 label 2026-05-22 05:19:21 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kaykayyali/damascus-dashboard#2