HTTP Server API
SemanticSpacetime.serve — Function
serve(store::AbstractSSTStore; port::Int=8080, host::String="127.0.0.1",
verbose::Bool=true, resources::String="/tmp") -> AnyStart a Genie-based HTTP server exposing the SST graph via a JSON API.
Endpoints (backward compatible)
GET /health— health check ({"status":"ok"})GET /search?q=<query>— text search across nodesGET /node/:class/:cptr— get node details by NodePtrGET /links/:class/:cptr— get links for a nodeGET /cone/:class/:cptr?direction=forward&depth=5&limit=100— cone searchGET /graph— graph summary (node/link counts, centrality)
New endpoints (Go parity)
GET|POST /searchN4L?name=<query>— unified search dispatchGET /api/search?q=<query>— text searchGET /api/orbit/:class/:cptr— node orbit with neighbour ringsGET /api/cone/:class/:cptr— causal cone as WebPath tracesGET /api/paths?from_class=&from_cptr=&to_class=&to_cptr=— path solvingGET /api/chapters— list chaptersGET /api/contexts— list contextsGET /api/stats— graph statisticsGET /api/pagemap?chapter=X— page-map viewGET /api/stories?name=X— story/sequence following
Arguments
store: anyAbstractSSTStore(MemoryStore or SSTConnection)port: TCP port to listen on (default 8080)host: host address (default "127.0.0.1")verbose: print startup messageresources: directory for resources (default "/tmp")
Returns
A server handle. Call stop_server() to shut down.
Example
store = MemoryStore()
serve(store; port=9090)
# ... server is running ...
stop_server()SemanticSpacetime.stop_server — Function
stop_server()Shut down the running Genie server and clear the server state.
SemanticSpacetime.handle_search_dispatch — Function
handle_search_dispatch(store, search, line) -> DictDispatch a parsed SearchParameters to the appropriate handler, mirroring the Go HandleSearch logic.
Web Types
SemanticSpacetime.WebConePaths — Type
WebConePathsJSON-serializable response for causal cone queries, containing the origin node, its ST type, and a nested vector of WebPath traces.
SemanticSpacetime.PageView — Type
PageViewJSON-serializable response for page-map / notes display, containing a title, context string, and note lines as WebPath vectors.
SemanticSpacetime.SearchResponse — Type
SearchResponseJSON-serializable wrapper for search results, carrying the response type, content, ambient context, intent, and search key.
SemanticSpacetime.coords_to_dict — Function
coords_to_dict(c::Coords) -> DictConvert a Coords struct to a JSON-serializable dictionary.
SemanticSpacetime.webpath_to_dict — Function
webpath_to_dict(wp::WebPath) -> DictConvert a WebPath struct to a JSON-serializable dictionary.
SemanticSpacetime.orbit_to_dict — Function
orbit_to_dict(o::Orbit) -> DictConvert an Orbit struct to a JSON-serializable dictionary.
SemanticSpacetime.node_event_to_dict — Function
node_event_to_dict(ne::NodeEvent) -> DictConvert a NodeEvent struct to a JSON-serializable dictionary.
SemanticSpacetime.json_node_event — Function
json_node_event(store::AbstractSSTStore, nptr::NodePtr, xyz::Coords,
orbits::Vector{Vector{Orbit}}) -> NodeEventBuild a NodeEvent from a node pointer by looking up the node data in the store and combining it with the supplied coordinates and orbits.
SemanticSpacetime.link_web_paths — Function
link_web_paths(store::MemoryStore, cone::Vector{Vector{Link}};
chapter::String="", context::Vector{String}=String[],
limit::Int=100) -> Vector{Vector{WebPath}}Convert a vector of cone link-paths to WebPath format, resolving node names, arrow types, and context strings from the store.
SemanticSpacetime.json_page — Function
json_page(store::MemoryStore, maplines::Vector{PageMap}) -> DictBuild a PageView-like dictionary from page map lines for JSON rendering.
SemanticSpacetime.package_response — Function
package_response(store::AbstractSSTStore, search::SearchParameters,
response_type::String, content::String) -> DictWrap a search result with ambient context metadata, mirroring the Go PackageResponse function.