stellavault 0.5.2 → 0.5.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 +1 -1
- package/dist/graph-ui/assets/camera_utils-D_AxFqU7.js +1 -0
- package/dist/graph-ui/assets/hands-BumW2WNg.js +18 -0
- package/dist/graph-ui/assets/index-DdorzFNd.js +4426 -0
- package/dist/graph-ui/assets/layout.worker-DbKCEFTz.js +1 -0
- package/dist/graph-ui/index.html +21 -0
- package/dist/graph-ui/manifest.json +11 -0
- package/dist/graph-ui/sw.js +17 -0
- package/dist/stellavault.js +44 -9
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){"use strict";const q={iterations:200,repulsion:800,attraction:.005,damping:.92,brainScale:[250,180,200]};self.onmessage=m=>{if(m.data.type!=="init")return;const{nodes:u,edges:A,options:F}=m.data,i={...q,...F},d=u.length;if(d===0){self.postMessage({type:"done",positions:[]});return}const y=new Map;u.forEach((o,f)=>y.set(o.id,f));const I=A.map(o=>({s:y.get(o.source)??-1,t:y.get(o.target)??-1,w:o.weight})).filter(o=>o.s>=0&&o.t>=0),s=new Float64Array(d*3),e=new Float64Array(d*3),[x,w,z]=i.brainScale;for(let o=0;o<d;o++){const f=Math.acos(2*Math.random()-1),p=Math.random()*2*Math.PI,t=.5+.5*Math.random(),n=1+.1*Math.sin(5*f)*Math.cos(3*p);s[o*3]=x*t*Math.sin(f)*Math.cos(p)*n,s[o*3+1]=w*t*Math.cos(f)*n,s[o*3+2]=z*t*Math.sin(f)*Math.sin(p)*n;const a=u[o].clusterId/10*2*Math.PI;s[o*3]+=30*Math.cos(a),s[o*3+2]+=30*Math.sin(a)}for(let o=0;o<i.iterations;o++){const f=1-o/i.iterations,p=i.repulsion*f;for(let t=0;t<d;t++)for(let n=t+1;n<d;n++){const r=s[n*3]-s[t*3],a=s[n*3+1]-s[t*3+1],l=s[n*3+2]-s[t*3+2],c=r*r+a*a+l*l+.01,h=p/c,M=r*h/Math.sqrt(c),g=a*h/Math.sqrt(c),b=l*h/Math.sqrt(c);e[t*3]-=M,e[t*3+1]-=g,e[t*3+2]-=b,e[n*3]+=M,e[n*3+1]+=g,e[n*3+2]+=b}for(const t of I){const n=s[t.t*3]-s[t.s*3],r=s[t.t*3+1]-s[t.s*3+1],a=s[t.t*3+2]-s[t.s*3+2],l=Math.sqrt(n*n+r*r+a*a)+.01,c=i.attraction*l*t.w,h=n/l*c,M=r/l*c,g=a/l*c;e[t.s*3]+=h,e[t.s*3+1]+=M,e[t.s*3+2]+=g,e[t.t*3]-=h,e[t.t*3+1]-=M,e[t.t*3+2]-=g}for(let t=0;t<d;t++){const n=s[t*3],r=s[t*3+1],a=s[t*3+2],l=(n/x)**2+(r/w)**2+(a/z)**2;if(l>1){const c=.3*(l-1);e[t*3]-=n*c*.01,e[t*3+1]-=r*c*.01,e[t*3+2]-=a*c*.01}s[t*3]+=e[t*3],s[t*3+1]+=e[t*3+1],s[t*3+2]+=e[t*3+2],e[t*3]*=i.damping,e[t*3+1]*=i.damping,e[t*3+2]*=i.damping}if(o%20===0||o===i.iterations-1){const t=[];for(let n=0;n<d;n++)t.push([s[n*3],s[n*3+1],s[n*3+2]]);self.postMessage({type:o===i.iterations-1?"done":"progress",positions:t,iteration:o,total:i.iterations})}}}})();
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="ko">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
|
6
|
+
<meta name="theme-color" content="#6366f1" />
|
|
7
|
+
<link rel="manifest" href="/manifest.json" />
|
|
8
|
+
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
9
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
|
10
|
+
<title>Stellavault — 3D Knowledge Graph</title>
|
|
11
|
+
<style>
|
|
12
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
13
|
+
html, body, #root { width: 100%; height: 100%; overflow: hidden; }
|
|
14
|
+
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #0a0a0f; color: #e0e0e0; }
|
|
15
|
+
</style>
|
|
16
|
+
<script type="module" crossorigin src="/assets/index-DdorzFNd.js"></script>
|
|
17
|
+
</head>
|
|
18
|
+
<body>
|
|
19
|
+
<div id="root"></div>
|
|
20
|
+
</body>
|
|
21
|
+
</html>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Stellavault",
|
|
3
|
+
"short_name": "Stellavault",
|
|
4
|
+
"description": "3D neural knowledge graph for your Obsidian vault",
|
|
5
|
+
"start_url": "/",
|
|
6
|
+
"display": "standalone",
|
|
7
|
+
"background_color": "#050510",
|
|
8
|
+
"theme_color": "#6366f1",
|
|
9
|
+
"orientation": "any",
|
|
10
|
+
"icons": []
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Minimal service worker for Stellavault PWA install prompt support.
|
|
2
|
+
// We don't cache anything — every fetch goes straight to the network.
|
|
3
|
+
// The presence of this file is enough for browsers to consider the page
|
|
4
|
+
// installable as a PWA, while keeping local-first behavior intact.
|
|
5
|
+
|
|
6
|
+
self.addEventListener('install', (event) => {
|
|
7
|
+
self.skipWaiting();
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
self.addEventListener('activate', (event) => {
|
|
11
|
+
event.waitUntil(self.clients.claim());
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
// Pass-through fetch — no caching, no interception
|
|
15
|
+
self.addEventListener('fetch', (event) => {
|
|
16
|
+
// Let the browser handle the request normally
|
|
17
|
+
});
|
package/dist/stellavault.js
CHANGED
|
@@ -4896,10 +4896,13 @@ function cosineSimilarity2(a, b) {
|
|
|
4896
4896
|
|
|
4897
4897
|
// packages/core/dist/api/server.js
|
|
4898
4898
|
function createApiServer(options) {
|
|
4899
|
-
const { store, searchEngine, port = 3333, vaultName = "", vaultPath = "", decayEngine } = options;
|
|
4899
|
+
const { store, searchEngine, port = 3333, vaultName = "", vaultPath = "", decayEngine, graphUiPath } = options;
|
|
4900
4900
|
const app = express();
|
|
4901
4901
|
app.use(cors({ origin: ["http://localhost:5173", "http://127.0.0.1:5173"] }));
|
|
4902
4902
|
app.use(express.json());
|
|
4903
|
+
if (graphUiPath) {
|
|
4904
|
+
app.use(express.static(graphUiPath, { index: "index.html", extensions: ["html"] }));
|
|
4905
|
+
}
|
|
4903
4906
|
const graphCaches = /* @__PURE__ */ new Map();
|
|
4904
4907
|
app.get("/api/graph", async (req, res) => {
|
|
4905
4908
|
try {
|
|
@@ -5994,6 +5997,11 @@ ${content}`;
|
|
|
5994
5997
|
res.status(500).json({ success: false, error: err?.message || "Federation leave failed" });
|
|
5995
5998
|
}
|
|
5996
5999
|
});
|
|
6000
|
+
if (graphUiPath) {
|
|
6001
|
+
app.get(/^(?!\/api\/)(?!.*\.[a-z0-9]+$).*$/i, (_req, res) => {
|
|
6002
|
+
res.sendFile(`${graphUiPath}/index.html`);
|
|
6003
|
+
});
|
|
6004
|
+
}
|
|
5997
6005
|
return {
|
|
5998
6006
|
async start() {
|
|
5999
6007
|
return new Promise((resolve22) => {
|
|
@@ -6732,8 +6740,25 @@ async function statusCommand(_opts, cmd) {
|
|
|
6732
6740
|
// packages/cli/dist/commands/graph-cmd.js
|
|
6733
6741
|
import chalk5 from "chalk";
|
|
6734
6742
|
import { spawn } from "node:child_process";
|
|
6735
|
-
import { resolve as resolve11 } from "node:path";
|
|
6743
|
+
import { resolve as resolve11, dirname as dirname4 } from "node:path";
|
|
6736
6744
|
import { existsSync as existsSync15 } from "node:fs";
|
|
6745
|
+
import { fileURLToPath } from "node:url";
|
|
6746
|
+
function locateBundledGraphUi() {
|
|
6747
|
+
try {
|
|
6748
|
+
const here = dirname4(fileURLToPath(import.meta.url));
|
|
6749
|
+
const bundled = resolve11(here, "graph-ui");
|
|
6750
|
+
if (existsSync15(resolve11(bundled, "index.html")))
|
|
6751
|
+
return bundled;
|
|
6752
|
+
const monorepoGraphDist = resolve11(here, "..", "..", "..", "graph", "dist");
|
|
6753
|
+
if (existsSync15(resolve11(monorepoGraphDist, "index.html")))
|
|
6754
|
+
return monorepoGraphDist;
|
|
6755
|
+
const singleFileBundle = resolve11(here, "..", "dist", "graph-ui");
|
|
6756
|
+
if (existsSync15(resolve11(singleFileBundle, "index.html")))
|
|
6757
|
+
return singleFileBundle;
|
|
6758
|
+
} catch {
|
|
6759
|
+
}
|
|
6760
|
+
return null;
|
|
6761
|
+
}
|
|
6737
6762
|
async function graphCommand() {
|
|
6738
6763
|
const config = loadConfig();
|
|
6739
6764
|
const hub = createKnowledgeHub(config);
|
|
@@ -6747,12 +6772,14 @@ async function graphCommand() {
|
|
|
6747
6772
|
}
|
|
6748
6773
|
const port = config.mcp.port || 3333;
|
|
6749
6774
|
const vaultName = config.vaultPath ? config.vaultPath.replace(/\\/g, "/").replace(/\/$/, "").split("/").pop() ?? "" : "";
|
|
6775
|
+
const graphUiPath = locateBundledGraphUi();
|
|
6750
6776
|
const api = createApiServer({
|
|
6751
6777
|
store: hub.store,
|
|
6752
6778
|
searchEngine: hub.searchEngine,
|
|
6753
6779
|
port,
|
|
6754
6780
|
vaultName,
|
|
6755
|
-
vaultPath: config.vaultPath
|
|
6781
|
+
vaultPath: config.vaultPath,
|
|
6782
|
+
graphUiPath: graphUiPath ?? void 0
|
|
6756
6783
|
});
|
|
6757
6784
|
try {
|
|
6758
6785
|
await api.start();
|
|
@@ -6768,12 +6795,20 @@ async function graphCommand() {
|
|
|
6768
6795
|
console.error(chalk5.green("\u{1F9E0} Stellavault \u2014 Neural Knowledge Graph"));
|
|
6769
6796
|
console.error(` \u{1F4DA} ${stats.documentCount} documents | ${stats.chunkCount} chunks`);
|
|
6770
6797
|
console.error(` \u{1F310} API: http://127.0.0.1:${port}`);
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6798
|
+
if (graphUiPath) {
|
|
6799
|
+
const url = `http://127.0.0.1:${port}/`;
|
|
6800
|
+
console.error(chalk5.green(` \u{1F52E} Graph: ${url}`));
|
|
6801
|
+
console.error(chalk5.dim(` Press Ctrl+C to stop`));
|
|
6802
|
+
openBrowser(url);
|
|
6803
|
+
process.on("SIGINT", () => process.exit(0));
|
|
6804
|
+
return;
|
|
6805
|
+
}
|
|
6806
|
+
const devGraphDir = resolve11(process.cwd(), "packages/graph");
|
|
6807
|
+
const hasDevGraph = existsSync15(resolve11(devGraphDir, "package.json"));
|
|
6808
|
+
if (hasDevGraph) {
|
|
6774
6809
|
console.error(chalk5.dim(" \u{1F680} Starting Vite dev server..."));
|
|
6775
6810
|
const vite = spawn("npx", ["vite", "--host"], {
|
|
6776
|
-
cwd:
|
|
6811
|
+
cwd: devGraphDir,
|
|
6777
6812
|
stdio: ["ignore", "pipe", "pipe"],
|
|
6778
6813
|
shell: true
|
|
6779
6814
|
});
|
|
@@ -6794,7 +6829,7 @@ async function graphCommand() {
|
|
|
6794
6829
|
process.exit(0);
|
|
6795
6830
|
});
|
|
6796
6831
|
} else {
|
|
6797
|
-
console.error(chalk5.
|
|
6832
|
+
console.error(chalk5.yellow(" \u26A0 Bundled graph UI missing. Reinstall stellavault: npm i -g stellavault@latest"));
|
|
6798
6833
|
}
|
|
6799
6834
|
console.error(chalk5.dim(" Press Ctrl+C to stop"));
|
|
6800
6835
|
}
|
|
@@ -9066,7 +9101,7 @@ async function autopilotCommand(options) {
|
|
|
9066
9101
|
|
|
9067
9102
|
// packages/cli/dist/index.js
|
|
9068
9103
|
var program = new Command();
|
|
9069
|
-
var SV_VERSION = true ? "0.5.
|
|
9104
|
+
var SV_VERSION = true ? "0.5.4" : "0.0.0-dev";
|
|
9070
9105
|
program.name("stellavault").description("Stellavault \u2014 Turn your Obsidian vault into a 3D neural knowledge graph").version(SV_VERSION).option("--json", "Output in JSON format (for scripting)").option("--quiet", "Suppress non-essential output");
|
|
9071
9106
|
program.command("init").description("Interactive setup wizard \u2014 get started in 3 minutes").action(initCommand);
|
|
9072
9107
|
program.command("index [vault-path]").description("Obsidian vault\uB97C \uBCA1\uD130\uD654\uD558\uC5EC \uC778\uB371\uC2F1\uD569\uB2C8\uB2E4").action(indexCommand);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stellavault",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "Drop anything. It compiles itself into knowledge. Claude remembers everything you know. Local-first MCP server, vault files never modified.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"dist/stellavault.js",
|
|
32
|
+
"dist/graph-ui/**",
|
|
32
33
|
"README.md",
|
|
33
34
|
"LICENSE",
|
|
34
35
|
"SECURITY.md"
|