glassbrain 0.1.4 → 0.2.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -22,24 +22,30 @@ lets you read one at a glance, and when the agent learns something, shows you ex
22
22
  ```json
23
23
  {
24
24
  "nodes": [
25
- { "id": "src", "label": "src", "kind": "folder" },
26
- { "id": "src/auth", "label": "auth", "kind": "folder", "parent": "src" },
25
+ { "id": "src", "label": "src", "kind": "folder", "parent": null },
26
+ { "id": "src/auth", "label": "auth", "kind": "folder", "parent": "src", "order": 1 },
27
27
  { "id": "src/auth/login.ts", "label": "login.ts", "kind": "file", "parent": "src/auth" },
28
- { "id": "src/db.ts", "label": "db.ts", "kind": "file", "parent": "src" }
28
+ { "id": "src/db.ts", "label": "db.ts", "kind": "file", "parent": "src", "order": 2 }
29
29
  ],
30
30
  "edges": [{ "source": "src/auth/login.ts", "target": "src/db.ts", "kind": "uses" }]
31
31
  }
32
32
  ```
33
33
 
34
- `parent` says what sits inside what; that is the whole structure. Everything else is an edge.
34
+ `parent` is required on every node (null for the one root) and says what sits inside what: that is
35
+ the whole structure. `order`, optional, turns the children of one node into a numbered list — the
36
+ layout reads it clockwise, and a numbered root *is* the 2.5D layer view. There is no layer field.
35
37
  A [JSON Schema](https://github.com/voidixyn/glassbrain/blob/main/schema/graph.schema.json) describes every field, and the CLI answers in a form an
36
- agent can act on:
38
+ agent can act on — every finding carries its repair:
37
39
 
38
40
  ```text
39
41
  $ npx glassbrain validate kg
40
- warn 2-filled/ Dangling edge: points to missing node src/session
42
+ error dangling-edge graph.json edge src/auth/login.ts → src/session points at the missing node src/session
43
+ an edge can only join nodes that exist. Add the node, or repoint the edge:
44
+ - { "source": "src/auth/login.ts", "target": "src/session" }
45
+ + { "source": "src/auth/login.ts", "target": "EXISTING_ID" }
41
46
 
42
- kg: 2 versions, 3 nodes, 1 edge — 0 errors, 1 warning
47
+ kg: 1 node, 1 edge — 1 error · 0 warnings · 0 infos
48
+ structure: 1 root · depth 2 · 1/1 parented · isomorphism 1.00
43
49
 
44
50
  $ npx glassbrain diff kg/1-skeleton kg/2-filled
45
51
  1-skeleton → 2-filled
@@ -82,7 +88,7 @@ That makes change the main event:
82
88
 
83
89
  Search ranks by how well a node matches, the detail panel renders the node's markdown, labels
84
90
  make room for each other instead of piling up, and [dark mode is computed](https://github.com/voidixyn/glassbrain/blob/main/docs/guide.md#color-hue-is-configured-everything-else-is-computed)
85
- from the light palette. Graphs with layers can be stood up in 2.5D:
91
+ from the light palette. A root whose children carry `order` opens as floors in 2.5D:
86
92
 
87
93
  ![Protocols, building blocks and products of the agent ecosystem, stacked in 2.5D](https://raw.githubusercontent.com/voidixyn/glassbrain/main/docs/media/layers.png)
88
94