Merge pull request 'engram: expose the geometry so the frame can be verified' (#156) from fix/geometry-readable into dev
El SDK CI - dev / build-and-test (push) Failing after 4m7s
El SDK CI - dev / build-and-test (push) Failing after 4m7s
This commit was merged in pull request #156.
This commit is contained in:
@@ -1025,6 +1025,22 @@ fn route_similarity(method: String, path: String, body: String) -> String {
|
||||
// nothing on request. NOTE: the offline reify WRITER (engram_geo_reify_store) is
|
||||
// currently unwired, so on the live store the resident index is empty and the
|
||||
// list returns [] until reification runs — see the cutover report.
|
||||
// route_scan_emb — GET /api/nodes/emb?limit=&offset= — read the raw geometry.
|
||||
//
|
||||
// engram_scan_nodes_emb_json has existed as a builtin with NO ROUTE, so the
|
||||
// embeddings — the actual positions every distance, angle, membership and
|
||||
// grounding is computed from — were unreadable from outside the process. You
|
||||
// cannot verify a coordinate system you cannot see, and every claim about the
|
||||
// frame (isotropy, centering, what the origin is) was therefore unfalsifiable
|
||||
// from the API. Read-only.
|
||||
fn route_scan_emb(method: String, path: String, body: String) -> String {
|
||||
let l_raw: String = query_param(path, "limit")
|
||||
let o_raw: String = query_param(path, "offset")
|
||||
let l: Int = if str_eq(l_raw, "") { 200 } else { str_to_int(l_raw) }
|
||||
let o: Int = if str_eq(o_raw, "") { 0 } else { str_to_int(o_raw) }
|
||||
return engram_scan_nodes_emb_json(l, o)
|
||||
}
|
||||
|
||||
fn route_neighborhoods(method: String, path: String, body: String) -> String {
|
||||
engram_geo_reify_list_json()
|
||||
}
|
||||
@@ -1796,6 +1812,9 @@ fn handle_request(method: String, path: String, body: String) -> String {
|
||||
if str_eq(method, "GET") && (str_eq(clean, "/api/edges") || str_eq(clean, "/edges")) {
|
||||
return route_scan_edges(method, path, body)
|
||||
}
|
||||
if str_eq(method, "GET") && (str_eq(clean, "/api/nodes/emb") || str_eq(clean, "/nodes/emb")) {
|
||||
return route_scan_emb(method, path, body)
|
||||
}
|
||||
if str_eq(method, "GET") && str_starts_with(clean, "/api/nodes/") {
|
||||
return route_get_node(method, path, body)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user