glassbrain 0.1.2 → 0.1.4
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 +27 -53
- package/dist/chunks/{chunk-3CNKH3HB.js → chunk-CAXDADCO.js} +706 -293
- package/dist/chunks/{chunk-UJCALP4P.js → chunk-VCM766BZ.js} +265 -190
- package/dist/cli/glassbrain.js +51 -41
- package/dist/cli/viewer.js +284 -241
- package/dist/core.js +3 -1
- package/dist/index.js +4 -2
- package/dist/internal.d.ts +2 -0
- package/dist/internal.js +9 -3
- package/dist/react/GraphCanvas.d.ts +1 -1
- package/dist/react/GraphCanvas.js +2 -2
- package/dist/react/input.d.ts +11 -0
- package/dist/react/placement.d.ts +17 -0
- package/dist/react/touch.d.ts +29 -0
- package/dist/style.d.ts +5 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -5,12 +5,9 @@
|
|
|
5
5
|
Your agent keeps knowledge graphs: of your code, your docs, its research, its own plans. glassbrain
|
|
6
6
|
lets you read one at a glance, and when the agent learns something, shows you exactly what changed.
|
|
7
7
|
|
|
8
|
-

|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
npx glassbrain kg/ # open a graph in the browser (kg/ = JSON files, or one folder per version)
|
|
12
|
-
npx glassbrain diff HEAD~1 kg/ # what changed in the last commit
|
|
13
|
-
```
|
|
10
|
+

|
|
14
11
|
|
|
15
12
|
[**Live demo**](https://voidixyn.github.io/glassbrain/) · [Agents write it](#1-a-brain-your-agent-can-write) ·
|
|
16
13
|
[Humans read it](#2-read-it-like-a-brain-scan) · [Every brain](#3-every-brain-on-demand) ·
|
|
@@ -155,67 +152,44 @@ Each tool's own notion of "inside" becomes the structure; everything else become
|
|
|
155
152
|
|
|
156
153
|
## 4. Try it yourself
|
|
157
154
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
- **One file out.** `npx glassbrain` writes a single html page (about 1 MB plus your data): no
|
|
161
|
-
server, no database, no requests of its own, opens from `file://`, can be sent to anyone.
|
|
162
|
-
(Images that node descriptions link to load from their URLs.)
|
|
163
|
-
- **Your data stays plain.** JSON files you can read, diff in git and edit by hand. Nothing
|
|
164
|
-
derived (flags, validation, layout) is ever written back into them.
|
|
165
|
-
- **No lock-in, no key.** Every supported format comes in, `convert` writes plain JSON out, and
|
|
166
|
-
everything runs locally.
|
|
167
|
-
|
|
168
|
-
**Three ways in:**
|
|
155
|
+
Four ways to try glassbrain—pick whichever fits.
|
|
169
156
|
|
|
170
|
-
|
|
171
|
-
2. Point it at something you have: `npx glassbrain <file-or-folder>`.
|
|
172
|
-
3. Ask your agent, no skill needed:
|
|
157
|
+
- **Demo.** Explore the [live demo](https://voidixyn.github.io/glassbrain/).
|
|
173
158
|
|
|
174
|
-
|
|
159
|
+
- **Agent + npx.** In any context, add **"... using `npx glassbrain`."** to your prompt.
|
|
160
|
+
Skill-free and model-agnostic — any agent that can run terminal commands can use it.
|
|
161
|
+
You get a standalone HTML file to open locally and share.
|
|
175
162
|
|
|
176
|
-
|
|
177
|
-
agent needs nothing else.
|
|
163
|
+
For example:
|
|
178
164
|
|
|
179
|
-
|
|
165
|
+
> Map the detailed plot and character relationships in *Pride and Prejudice*, using `npx glassbrain`.
|
|
180
166
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
```bash
|
|
184
|
-
npm i glassbrain cytoscape cytoscape-fcose cytoscape-cose-bilkent
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
```tsx
|
|
188
|
-
import { parseSources, diffModels, GraphCanvas } from 'glassbrain';
|
|
189
|
-
|
|
190
|
-
const model = parseSources([{ origin: 'graph.json', text }]);
|
|
191
|
-
<GraphCanvas model={model} /> // browse
|
|
192
|
-
<GraphCanvas model={after} diff={diffModels(before, after)} /> // compare
|
|
193
|
-
```
|
|
167
|
+
> This refactor changed a lot. Show the architecture before and after, organized into layers, using `npx glassbrain`.
|
|
194
168
|
|
|
195
|
-
|
|
196
|
-
editable and hands you each edit as a patch. All of it is in [the guide](https://github.com/voidixyn/glassbrain/blob/main/docs/guide.md).
|
|
169
|
+
> Turn these research notes into a graph of ideas, evidence, and open questions, using `npx glassbrain`.
|
|
197
170
|
|
|
198
|
-
|
|
171
|
+
- **CLI.** Open or diff a graph you already have:
|
|
199
172
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
| 10,000 nodes | 9.7 s | 30 fps |
|
|
173
|
+
```bash
|
|
174
|
+
npx glassbrain kg/ # open a graph in the browser (kg/ = JSON files, or one folder per version)
|
|
175
|
+
npx glassbrain diff HEAD~1 kg/ # what changed in the last commit
|
|
176
|
+
```
|
|
205
177
|
|
|
206
|
-
|
|
178
|
+
- **React.** Embed the graph component in your own app:
|
|
207
179
|
|
|
208
|
-
|
|
180
|
+
```bash
|
|
181
|
+
npm i glassbrain cytoscape cytoscape-fcose cytoscape-cose-bilkent
|
|
182
|
+
```
|
|
209
183
|
|
|
210
|
-
|
|
211
|
-
|
|
184
|
+
```tsx
|
|
185
|
+
import { parseSources, diffModels, GraphCanvas } from 'glassbrain';
|
|
212
186
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
187
|
+
const model = parseSources([{ origin: 'graph.json', text }]);
|
|
188
|
+
<GraphCanvas model={model} /> // browse
|
|
189
|
+
<GraphCanvas model={after} diff={diffModels(before, after)} /> // compare
|
|
190
|
+
```
|
|
216
191
|
|
|
217
|
-
|
|
218
|
-
small operations, so they can be replayed after the agent regenerates the graph.
|
|
192
|
+
Customize colors, layers, fields and editing in [the guide](https://github.com/voidixyn/glassbrain/blob/main/docs/guide.md).
|
|
219
193
|
|
|
220
194
|
## Docs
|
|
221
195
|
|