ghostos
v0.2.32
Published
A reference LEAF graph parser implementation used by leafgon.com
Maintainers
Readme
ghostos
A reference LEAF parser implementation used by leafgon.com
Canonical LEAFlisp node data
The standard leaflisp scaffold always includes leaf.object, initialized to
null. Graph mutation clients must preserve that field alongside
leaf.logic.args.lispexpression; Leaf Server materializes its value from the
expression when the node has no incoming data-edge connection.
Node setup
npm i ghostosgetting graph data from leafgon.com
gq https://www.leafgon.com/qmgraphql -q 'query {graph: getGraph(domain: "breezyforest", appid: "testbed", filter: {}) {domain appid nodes {uuid leafnodetype out_edges {uuid source {uuid} target {uuid} data} data} edges { uuid source {uuid} target {uuid} } }}' > ./tests/breezyforest-testbed.jsonOverride Endpoint URIs
You can override the default GraphQL URIs at runtime:
import { setLEAFgqlEndpoints, initializeLEAFlakeGQLClient } from "ghostos/core";
setLEAFgqlEndpoints({
endpoint_subs: "https://example.com/sgraphql",
websocket_subs: "wss://example.com/sgraphql",
endpoint_qm: "https://example.com/qmgraphql",
});
initializeLEAFlakeGQLClient({
_clientConfig: {
dburi_subs: "https://example.com/sgraphql",
dburi_subs_ws: "wss://example.com/sgraphql",
dburi_qm: "https://example.com/qmgraphql",
},
});GitHub-hosted leafgraphs
Leafgraphs can be loaded from GitHub raw JSON by using github as the domain and a repo filepath as the appid.
Format:
github/<github-user>/<repo>/<path>github/<github-user>/<repo>@<ref>/<path>(optional ref, defaultmain)github/<github-user>/<repo>/<path>?token=<some token>
Example:
github/leafgon/leafgraphs/tests/breezyforest-testbedgithub/leafgon/leafgraphs@dev/tests/breezyforest-testbedgithub/leafgon/leafgraphs/tests/breezyforest-testbed?token=abc123
See docs/github-leafgraphs.md for end-user documentation.
Leafgon-hosted leafgraphs
See docs/leafgon-leafgraphs.md for end-user documentation.
