cortexdb-client 0.2.0

Typed gRPC client for CortexDB (AI memory + knowledge graph sidecar)
Documentation
syntax = "proto3";
package cortexdb.v1;
option go_package = "github.com/liliang-cn/cortexdb/v2/pkg/rpc/v1;rpcv1";

message HealthRequest {}
message HealthResponse { bool ok = 1; }

message InfoRequest {}
message InfoResponse {
  string version = 1;
  string db_path = 2;
  bool has_embedder = 3;
  // embedder_healthy is false while calls to the embedder fail; memories saved
  // meanwhile are stored without a vector and embedded once it answers again.
  bool embedder_healthy = 4;
  string embedder_error = 5;
  // memories_without_vector are found by keyword search only until embedded.
  int64 memories_without_vector = 6;
}

// BackupRequest names the destination *relative to the server's backup
// directory*. Absolute paths and any path climbing out with ".." are refused:
// this RPC writes a complete copy of the brain onto the server's filesystem, and
// the caller choosing where is a different thing from the caller reading and
// writing rows, even though one bearer token grants both.
message BackupRequest { string path = 1; }
message BackupResponse {
  // path is where the file actually landed, absolute, so the operator does not
  // have to reconstruct the server's backup directory to find it.
  string path = 1;
  int64 size_bytes = 2;
}

service AdminService {
  rpc Health(HealthRequest) returns (HealthResponse);
  rpc Info(InfoRequest) returns (InfoResponse);
  // Backup snapshots the whole brain without stopping the server. Backends that
  // are backed up by their own tooling (PostgreSQL) fail it with UNIMPLEMENTED.
  rpc Backup(BackupRequest) returns (BackupResponse);
}