You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Current package version:****0.8.0** — bump this line when you release; [`package.json`](package.json)`"version"` is what npm publishes.
29
+
-**Policy:**[Semantic versioning](https://semver.org/) — **MAJOR** / **MINOR** / **PATCH** as usual. CLI and MCP tool names and shapes are treated as stable within a major line unless release notes say otherwise.
30
+
31
+
To ship: set `"version"` in `package.json`, note changes (e.g. `release-notes-v*.md`), run `npm run build`, `npm test`, and `npm run test:daemon`, then `npm publish` — see [Publishing (npm)](#publishing-npm).
32
+
8
33
## Requirements
9
34
10
-
-**Node.js20+**
11
-
-**Kuzu**(built via`npm install` or `node node_modules/kuzu/install.js` if you use`--ignore-scripts`)
-**setup-lsp** installs the SysML LSP in **`lsp/`** so the indexer can use it. No need to set `SYSMLLSP_SERVER_PATH` when using this default. See [docs/INSTALL.md](docs/INSTALL.md) and [docs/PLAN_INDEPENDENT_LSP.md](docs/PLAN_INDEPENDENT_LSP.md).
57
+
After **setup-lsp**, you usually do **not** need **`SYSMLLSP_SERVER_PATH`**. Details: [docs/INSTALL.md](docs/INSTALL.md), [docs/PLAN_INDEPENDENT_LSP.md](docs/PLAN_INDEPENDENT_LSP.md).
58
+
59
+
## Quick start
60
+
61
+
From a **clone** (after install + build + setup-lsp):
62
+
63
+
```bash
64
+
npx sysmledgraph analyze test/fixtures/sysml
65
+
npx sysmledgraph graph map graph-map.md
66
+
```
67
+
68
+
Or one step from repo root: `npm run index-and-map` (optional path argument).
**`worker start` exit codes:****0** started · **2** already running (TCP up) · **1** other failure (e.g. not built, stale port + live PID). **`worker stop`:****1** if no **`worker.port`**. **`worker status`:****1** when not running.
43
108
44
-
-`npm run index-and-map [path]` — Index path (default `test/fixtures/sysml`), then write **graph-map.md**
45
-
-`npm run generate-map [out.md]` — Generate map from existing DB
46
-
-`npm run setup-lsp` — Install LSP in `lsp/` (Option C, see plan)
This repo runs as an **MCP server**so Cursor AI can query the graph (query, context, impact, generate_map, indexDbGraph, cypher, etc.). Add **sysmledgraph** to `.cursor/mcp.json`; see [docs/MCP_SERVER_FOR_CURSOR.md](docs/MCP_SERVER_FOR_CURSOR.md).
113
+
If **`worker.port`** exists or **`SYSMLEGRAPH_WORKER_URL`**is set, the CLI uses the **long-lived worker** and avoids opening Kuzu in-process. See [docs/INSTALL.md](docs/INSTALL.md).
51
114
52
-
**Storage:** Default `~/.sysmledgraph`. Override with `SYSMEDGRAPH_STORAGE_ROOT`. Only one process should open the same DB at a time (see [docs/MCP_INTERACTION_GUIDE.md](docs/MCP_INTERACTION_GUIDE.md) §8).
115
+
### MCP binary (`sysmledgraph-mcp`)
53
116
54
-
## Docs
117
+
| Command | Description |
118
+
|---------|-------------|
119
+
|`npx sysmledgraph-mcp`| MCP server on **stdio** (Cursor, etc.). |
120
+
|`npm run mcp`| Same from a clone (**requires**`npm run build`). |
121
+
122
+
### npm scripts (repository / package.json)
123
+
124
+
| Script | Command | Description |
125
+
|--------|---------|-------------|
126
+
|`build`|`tsc`| Compile → **`dist/`**. |
127
+
|`clean`|`node scripts/clean.mjs`| Clean artifacts (see script). |
**Resources:**`sysmledgraph://context`, `sysmledgraph://schema`, plus per-indexed-path **`sysmledgraph://context/...`** and **`sysmledgraph://schema/...`**.
166
+
167
+
**Kuzu lock:** Prefer one mode per storage root — e.g. run **`sysmledgraph worker start --detach`** and share **`SYSMEDGRAPH_STORAGE_ROOT`** with MCP, or see [docs/MCP_INTERACTION_GUIDE.md](docs/MCP_INTERACTION_GUIDE.md) §6.1 and §8.
[`.github/workflows/ci.yml`](.github/workflows/ci.yml) runs **`npm ci`**, **`npm run build`**, **`npm test`**, and **`npm run test:daemon`** on **windows-latest** (Node 20).
63
186
64
187
## Publishing (npm)
65
188
66
-
You can publish this package to npm so others can install it with `npm install sysmledgraph` or `npx sysmledgraph analyze <path>`.
189
+
Others can install with **`npm install sysmledgraph`** or run **`npx sysmledgraph analyze <path>`**.
67
190
68
-
1.**Name:**The package name is **`sysmledgraph`**. If it is already taken, use a scoped name (e.g. `@yourusername/sysmledgraph`) and set it in `package.json``"name"`.
69
-
2.**Build:**`prepublishOnly` runs `npm run build` before packing, so **dist/**is included in the tarball.
70
-
3.**Included files:**Only**dist**, **scripts**, **lsp**, **README.md**, and **docs** are published (see `package.json``"files"`). Users run **`npm run setup-lsp`**after install to install the LSP in**lsp/**.
71
-
4.**Publish:** From a clean build, run:
191
+
1.**Name:****`sysmledgraph`** in `package.json` (or a scoped name if needed).
192
+
2.**Build:****`prepublishOnly`** runs **`npm run build`**so **`dist/`**ships in the tarball.
193
+
3.**Files:****`package.json`****`files`**lists**`dist`**, **`scripts`**, **`lsp`**, **`README.md`**, **`docs`**. Consumers run **`npm run setup-lsp`**inside the package for**`lsp/`**.
194
+
4.**Publish:**
72
195
```bash
73
196
npm login
74
197
npm publish
75
198
```
76
-
For a scoped package (e.g. `@user/sysmledgraph`), use `npm publish --access public` the first time.
199
+
Scoped packages: **`npm publish --access public`** the first time.
77
200
78
-
After publish, users can install with `npm install sysmledgraph`, then run **`npm run setup-lsp`**from the installed package directory (e.g. `cd node_modules/sysmledgraph && npm run setup-lsp`) so the LSP is available. When using **npx sysmledgraph** from another project, the default LSP path is resolved from the **current working directory** (that project’s `lsp/` or `node_modules/sysml-v2-lsp`). So either run setup-lsp inside the sysmledgraph package and set **SYSMLLSP_SERVER_PATH** to that `lsp/node_modules/.../server.js`, or install**sysml-v2-lsp**in the consumer project so the fallback finds it.
201
+
**Consumer LSP resolution:****`npx sysmledgraph`** from another project resolves LSP paths from **that project’s cwd** (`lsp/` or **`node_modules/sysml-v2-lsp`**). Either run **setup-lsp** inside the installed package and set **`SYSMLLSP_SERVER_PATH`**, or add**sysml-v2-lsp**to the consumer project.
0 commit comments