@takeokunn/gbrainx 0.0.0-stage → 0.1.1

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.
Files changed (32) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +58 -2
  3. package/dist/core.mjs +1346 -0
  4. package/dist/gbrainx.mjs +7097 -0
  5. package/dist/web/client/assets/api-BvRk9kiK.js +0 -0
  6. package/dist/web/client/assets/demo-G0WCPBHC.js +10 -0
  7. package/dist/web/client/assets/entry.client-BMJZABtH.js +9 -0
  8. package/dist/web/client/assets/gbrainx-DfnQgPxe.js +49 -0
  9. package/dist/web/client/assets/health-BvRk9kiK.js +0 -0
  10. package/dist/web/client/assets/home-DSGr2mzJ.js +7 -0
  11. package/dist/web/client/assets/i18n-CbBRRmtS.js +1 -0
  12. package/dist/web/client/assets/jsx-runtime-C8YK_IxR.js +16 -0
  13. package/dist/web/client/assets/lib-C32AnKSP.js +1 -0
  14. package/dist/web/client/assets/manifest-813cc1a4.js +1 -0
  15. package/dist/web/client/assets/root-C-cLqVHP.js +1 -0
  16. package/dist/web/client/assets/root-D4kqIC2S.css +2 -0
  17. package/dist/web/client/assets/root-i18n-_0Yddpt_.js +1 -0
  18. package/dist/web/client/assets/sell-CxnwvqXu.css +1 -0
  19. package/dist/web/client/assets/sell-DbbNBdAa.js +1 -0
  20. package/dist/web/client/assets/use-lp-language-ij45BzB4.js +1 -0
  21. package/dist/web/client/avatars/aiko.svg +7 -0
  22. package/dist/web/client/avatars/daniel.svg +7 -0
  23. package/dist/web/client/avatars/ken.svg +7 -0
  24. package/dist/web/client/avatars/leo.svg +7 -0
  25. package/dist/web/client/avatars/yui.svg +7 -0
  26. package/dist/web/client/demo.mp4 +0 -0
  27. package/dist/web/client/favicon.ico +0 -0
  28. package/dist/web/server/assets/cloudflare-context-CIZdXilT.js +3426 -0
  29. package/dist/web/server/assets/rolldown-runtime-nwr4M8im.js +34 -0
  30. package/dist/web/server/assets/server-build-2JeuoODN.css +2 -0
  31. package/dist/web/server/assets/server-build-B915Unu9.js +22845 -0
  32. package/package.json +13 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 takeokunn
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,59 @@
1
- # Temporary Holding Version
1
+ # @takeokunn/gbrainx
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The local app and command line for GbrainX, a marketplace for verified, secret-scrubbed [GBrain](https://github.com/garrytan/gbrain) memory packs. Run it on your machine to turn exported GBrain pages into knowledge packs, to serve packs to Claude Code through [`@takeokunn/gbrainx-mcp`](https://www.npmjs.com/package/@takeokunn/gbrainx-mcp), and to import purchased packs back into a GBrain folder.
4
+
5
+ ## What it does
6
+
7
+ - Serves the app and its local API on `127.0.0.1:4747`. The API offers search, buy and load for packs, and four compile gates: pruning (classify), secret scrubbing, distillation and evaluation.
8
+ - Seeds its store from a folder of exported Markdown pages when you pass one on first start.
9
+ - Imports a purchased pack into a folder as Markdown files with front matter, keeping `[[wikilinks]]`.
10
+
11
+ ## Quick start
12
+
13
+ Requires Node.js 22.13 or later.
14
+
15
+ ```sh
16
+ npx -y @takeokunn/gbrainx [brain-directory]
17
+ ```
18
+
19
+ Open <http://127.0.0.1:4747/app> in your browser. The optional `brain-directory` is a folder of Markdown pages, for example from `gbrain export --dir ./my-brain-export`. It only seeds a store that does not exist yet.
20
+
21
+ To let Claude Code search, buy and load packs from the running app, register the MCP server:
22
+
23
+ ```sh
24
+ claude mcp add gbrainx -- npx -y @takeokunn/gbrainx-mcp
25
+ ```
26
+
27
+ The MCP server offers `gbrainx.search`, `gbrainx.buy` and `gbrainx.load`. Keep the local app running while you use it.
28
+
29
+ ## Commands
30
+
31
+ | Command | What it does |
32
+ | --- | --- |
33
+ | `npx -y @takeokunn/gbrainx [brain-directory]` | Start the local app on `127.0.0.1:4747`. |
34
+ | `npx -y @takeokunn/gbrainx import <packId> [--to <dir>] [--force]` | Write a purchased pack into `<dir>` (default `~/brain`). It stops when a file already exists; `--force` overwrites. It prints the `gbrain import` command to run next and never writes into GBrain itself. |
35
+ | `npx -y @takeokunn/gbrainx cache clear` | Delete `~/.gbrainx/cache`, where the MCP server saves loaded pack content. |
36
+
37
+ `import` reads the store, so start the app and buy the pack first. Imported pages carry `source: gbrainx` and are left out when you compile your own packs.
38
+
39
+ ## Where data lives
40
+
41
+ - `~/.gbrainx/store.json` holds the pages, packs, wallet and purchases. Set `GBRAINX_STORE_DIR` to use another folder.
42
+ - `~/.gbrainx/cache/` holds content the MCP server has loaded.
43
+ - Pack content is not sent anywhere unless you use the model-assisted gates (see Limits).
44
+
45
+ ## Limits
46
+
47
+ - The app listens on `127.0.0.1` only, on port 4747.
48
+ - Purchases move a balance inside the local store. No real payment is made. A purchase is refused when the match score is below 0.5, or when it exceeds the per-purchase or session cap, or the balance.
49
+ - The model-assisted gate endpoints (`/api/claude/*`) run `claude -p`, so they need Claude Code installed and logged in, and they send page text to the model. `GBRAINX_CLAUDE_EXECUTABLE` selects a different executable.
50
+ - The `/app` screen keeps its packs and purchases in browser storage. It does not call the model-assisted gates or share data with the local store.
51
+
52
+ ## Links
53
+
54
+ - Source and issues: <https://github.com/takeokunn/gbrainx>
55
+ - MCP server: <https://www.npmjs.com/package/@takeokunn/gbrainx-mcp>
56
+
57
+ ## License
58
+
59
+ MIT