// data.h — HTTP client wrapper for kanban_cpp backend at :8403. // // Wraps fn_http::request() (cpp/functions/core/http_request.h) with // kanban-specific shapes (Card, Column, AgentRunSummary). #pragma once #include #include #include namespace kanban_cpp { struct Card { std::string id; std::string title; std::string description; std::string column_id; std::string priority; // low|medium|high|critical std::string status; // pending|doing|done|... int64_t position = 0; int64_t due_date = 0; // unix seconds, 0 = no due std::string assignee; std::vector labels; }; struct Column { std::string id; std::string name; int order = 0; }; struct AgentRunSummary { std::string id; std::string card_id; std::string branch; std::string status; int64_t started_at = 0; int64_t finished_at = 0; }; struct ClientConfig { std::string base_url = "http://127.0.0.1:8403"; std::string agent_runner_url = "http://127.0.0.1:8486"; int timeout_ms = 3000; }; // HTTP GETs --------------------------------------------------------------- std::vector list_cards(const ClientConfig& cfg, std::string& err); std::vector list_columns(const ClientConfig& cfg, std::string& err); bool health(const ClientConfig& cfg); // GET /health // HTTP mutations ---------------------------------------------------------- bool move_card(const ClientConfig& cfg, const std::string& card_id, const std::string& new_column_id, std::string& err); // agent_runner_api ------------------------------------------------------- std::vector list_runs(const ClientConfig& cfg, std::string& err); bool launch_workflow(const ClientConfig& cfg, const std::string& card_id, std::string& out_run_id, std::string& err); } // namespace kanban_cpp