17 lines
732 B
C++
17 lines
732 B
C++
#pragma once
|
|
// Client side of the grr TUI control socket (tai.py 35479-35726): path lookup
|
|
// and one JSON request/reply over the unix socket. The server side belongs to
|
|
// the TUI module; this is only what the tui_* tools and the tool gate need.
|
|
#include "../llm/json.h"
|
|
#include <string>
|
|
namespace detz::agent {
|
|
|
|
inline constexpr int GRR_CONTROL_WAIT_MAX = 60;
|
|
// TAI_TUI_SOCK or <TAI_HOME or ~/.tai>/tui.sock
|
|
std::string grr_control_path();
|
|
// grr_control_call(payload): the reply as an object; failures are
|
|
// {"state": "error", "error": "..."} exactly like tai.py.
|
|
json::Value grr_control_call(const json::Value& payload, const std::string& path = "", double timeout = GRR_CONTROL_WAIT_MAX + 10);
|
|
|
|
} // namespace detz::agent
|