a76ec74338
C++ ImGui kanban for steering LLM agents. Six panels (Board, Calendar, Dashboard, Agent runs, Worktrees, DoD inspector) wired to registry functions http_request, kpi_card, sparkline, agent_runs_timeline, dod_evidence_panel. Backend Go on :8403 (independent operations.db from kanban_web).
62 lines
1.9 KiB
C++
62 lines
1.9 KiB
C++
// 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 <string>
|
|
#include <vector>
|
|
#include <cstdint>
|
|
|
|
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<std::string> 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<Card> list_cards(const ClientConfig& cfg, std::string& err);
|
|
std::vector<Column> 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<AgentRunSummary> 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
|