devsmind-mcp 4.1.1 → 4.3.0
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 +66 -17
- package/dist/cli/activity.js +1 -1
- package/dist/cli/activity.js.map +1 -1
- package/dist/cli/add-repo.d.ts +20 -0
- package/dist/cli/add-repo.js +171 -0
- package/dist/cli/add-repo.js.map +1 -0
- package/dist/cli/analyze.js +11 -1
- package/dist/cli/analyze.js.map +1 -1
- package/dist/cli/branch.d.ts +24 -0
- package/dist/cli/branch.js +148 -0
- package/dist/cli/branch.js.map +1 -0
- package/dist/cli/index.js +56 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init.js +27 -39
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/integrations/memory-topics.js +1 -1
- package/dist/cli/integrations/memory-topics.js.map +1 -1
- package/dist/cli/integrations/prompt.d.ts +9 -0
- package/dist/cli/integrations/prompt.js +26 -1
- package/dist/cli/integrations/prompt.js.map +1 -1
- package/dist/cli/integrations/registry.d.ts +23 -7
- package/dist/cli/integrations/registry.js +69 -8
- package/dist/cli/integrations/registry.js.map +1 -1
- package/dist/cli/integrations/skill.d.ts +16 -10
- package/dist/cli/integrations/skill.js +108 -22
- package/dist/cli/integrations/skill.js.map +1 -1
- package/dist/cli/llm-client.js +15 -7
- package/dist/cli/llm-client.js.map +1 -1
- package/dist/cli/prune.js +3 -15
- package/dist/cli/prune.js.map +1 -1
- package/dist/cli/rule.js +2 -2
- package/dist/cli/rule.js.map +1 -1
- package/dist/cli/runner.d.ts +8 -0
- package/dist/cli/runner.js +12 -5
- package/dist/cli/runner.js.map +1 -1
- package/dist/cli/sync.d.ts +16 -0
- package/dist/cli/sync.js +80 -0
- package/dist/cli/sync.js.map +1 -1
- package/dist/cli/view.js +3 -19
- package/dist/cli/view.js.map +1 -1
- package/dist/db/analyze.d.ts +5 -0
- package/dist/db/analyze.js +23 -0
- package/dist/db/analyze.js.map +1 -1
- package/dist/db/database.d.ts +56 -0
- package/dist/db/database.js +124 -6
- package/dist/db/database.js.map +1 -1
- package/dist/db/grep.js +1 -1
- package/dist/db/grep.js.map +1 -1
- package/dist/db/indexer.d.ts +1 -1
- package/dist/db/indexer.js +3 -3
- package/dist/db/indexer.js.map +1 -1
- package/dist/mcp/server.js +359 -60
- package/dist/mcp/server.js.map +1 -1
- package/dist/utils/config.d.ts +76 -6
- package/dist/utils/config.js +110 -12
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/devsmind-branch.d.ts +55 -0
- package/dist/utils/devsmind-branch.js +244 -0
- package/dist/utils/devsmind-branch.js.map +1 -0
- package/dist/utils/scanner.js +1 -1
- package/dist/utils/scanner.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,27 +24,47 @@ Git tells you **WHAT** changed. **DevsMind tells your AI agent WHY it changed, W
|
|
|
24
24
|
│ one bound server per project
|
|
25
25
|
┌─────────────────┴─────────────────┐
|
|
26
26
|
▼ ▼
|
|
27
|
-
c:\work\my-project\.
|
|
27
|
+
c:\work\my-project\.devsmind\ c:\work\other-project\.devsmind\
|
|
28
28
|
brain.db brain.db
|
|
29
29
|
(Project A team brain) (Project B team brain)
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
> 📖 Looking for the exhaustive version (every flag, every schema field)? See [detailExplanation.md](detailExplanation.md). This file is the fast path.
|
|
33
33
|
|
|
34
|
+
<details open>
|
|
35
|
+
<summary><strong>📑 Index</strong></summary>
|
|
36
|
+
|
|
37
|
+
- [How it works](#how-it-works)
|
|
38
|
+
- [🛠️ Architecture: The `.devsmind/` Directory](#-architecture-the-devsmind-directory)
|
|
39
|
+
- [Flexibility: Where should the brain live?](#flexibility-where-should-the-brain-live)
|
|
40
|
+
- [🚀 Why teams use it](#-why-teams-use-it)
|
|
41
|
+
- [⚡ Quick Start](#-quick-start)
|
|
42
|
+
- [🔌 The four setup commands, and why there are four](#-the-four-setup-commands-and-why-there-are-four)
|
|
43
|
+
- [📇 Indexing your codebase: `index` vs `reindex`](#-indexing-your-codebase-index-vs-reindex)
|
|
44
|
+
- [🖥️ Other commands (cheat sheet)](#-other-commands-cheat-sheet)
|
|
45
|
+
- [🔌 MCP tools, grouped by purpose](#-mcp-tools-grouped-by-purpose)
|
|
46
|
+
- [🗄️ Storage model, briefly](#-storage-model-briefly)
|
|
47
|
+
- [Changelog](#changelog)
|
|
48
|
+
- [📄 License](#-license)
|
|
49
|
+
|
|
50
|
+
</details>
|
|
51
|
+
|
|
34
52
|
---
|
|
35
53
|
|
|
36
54
|
## How it works
|
|
37
55
|
|
|
38
|
-
Run `devsmind init` once per project → creates `.
|
|
56
|
+
Run `devsmind init` once per project → creates `.devsmind/`. Commit it. Every teammate's agent reads and writes the same graph.
|
|
39
57
|
|
|
40
58
|
---
|
|
41
59
|
|
|
42
|
-
## 🛠️ Architecture: The `.
|
|
60
|
+
## 🛠️ Architecture: The `.devsmind/` Directory
|
|
43
61
|
|
|
44
|
-
Running `devsmind init` creates a `.
|
|
62
|
+
Running `devsmind init` creates a `.devsmind/` directory in your workspace. This folder contains the configuration, distributed graph database, and local cache:
|
|
63
|
+
|
|
64
|
+
> **Renamed in 4.2.0 — nothing to migrate.** This directory used to be called `.devmind/`, one letter off from an unrelated npm package. Existing `.devmind/` brains are still read, forever: every lookup tries `.devsmind` first and falls back. Only `devsmind init` on a **brand-new** project uses the new name, and re-running `init` on an existing brain repairs it in place under whatever name it already has — it will never create a second one. The only thing to know: a brain created on 4.2.0+ needs **devsmind-mcp ≥ 4.2.0** on every teammate's machine, since an older install doesn't know to look for `.devsmind`.
|
|
45
65
|
|
|
46
66
|
```
|
|
47
|
-
.
|
|
67
|
+
.devsmind/
|
|
48
68
|
├── .gitignore ← Written by init; ignores everything marked LOCAL below
|
|
49
69
|
├── config.json ← Project metadata & repository mapping (COMMITTED)
|
|
50
70
|
├── graph/ ← Distributed graph structure JSON (COMMITTED)
|
|
@@ -66,6 +86,8 @@ Running `devsmind init` creates a `.devmind/` directory in your workspace. This
|
|
|
66
86
|
|
|
67
87
|
**COMMITTED vs LOCAL is the whole storage design.** Committed is the *team's* shared brain — graph, reasoning, feature timelines. Local is either derivable (`brain.db` is a cache; delete it and `devsmind sync` rebuilds it) or genuinely personal (`local/` holds your verbatim requests and revert backups, which only mean anything on the machine that wrote them).
|
|
68
88
|
|
|
89
|
+
> **COMMITTED, but not necessarily to your code branch as of 4.3.0.** By default `graph/`/`history/`/`vectors/`/`workflows/` still commit onto whatever branch you're on. Run `devsmind push` and they move to a dedicated `devsmind` branch instead, so a PR diff isn't drowned in graph/history churn — `devsmind pull` brings them back down. `config.json` always stays on your code branch; see [Other commands](#-other-commands-cheat-sheet).
|
|
90
|
+
|
|
69
91
|
### Flexibility: Where should the brain live?
|
|
70
92
|
|
|
71
93
|
DevsMind supports two deployment topologies depending on your team's workflow:
|
|
@@ -73,14 +95,14 @@ DevsMind supports two deployment topologies depending on your team's workflow:
|
|
|
73
95
|
* **Option A: Inside the workspace/project root directory (Shared with team)**
|
|
74
96
|
```
|
|
75
97
|
c:\work\my-project\
|
|
76
|
-
├── .
|
|
98
|
+
├── .devsmind\ ← Config and distributed JSON database live here
|
|
77
99
|
├── backend-service\
|
|
78
100
|
└── frontend-web\
|
|
79
101
|
```
|
|
80
102
|
* **Option B: Standalone folder (Fully separated)**
|
|
81
103
|
```
|
|
82
104
|
c:\Users\username\brains\my-project\
|
|
83
|
-
└── .
|
|
105
|
+
└── .devsmind\ ← Brain is kept separate from code folders
|
|
84
106
|
```
|
|
85
107
|
|
|
86
108
|
---
|
|
@@ -110,14 +132,14 @@ npm install -g devsmind-mcp
|
|
|
110
132
|
### Starting a brand-new brain
|
|
111
133
|
|
|
112
134
|
```bash
|
|
113
|
-
devsmind init # 1. Create .
|
|
135
|
+
devsmind init # 1. Create .devsmind/ — interactive: project name, repos, tech stack
|
|
114
136
|
devsmind mcp # 2. Connect your IDE/CLI to the MCP server
|
|
115
137
|
devsmind rule # 3. Paste the workspace rule — this is what teaches your agent to actually use it
|
|
116
138
|
devsmind memory # 4. Print a prompt to paste into your AI chat, asking it to remember the workflow
|
|
117
139
|
devsmind skill # 5. (optional) Write it as an explicitly-invokable /devsmind skill file too
|
|
118
140
|
devsmind start # 6. Start the server (skip if your IDE launches it via stdio)
|
|
119
141
|
devsmind index --run --provider gemini --key YOUR_KEY # 7. (optional) index the codebase now
|
|
120
|
-
git add .
|
|
142
|
+
git add .devsmind && git commit -m "Add DevsMind brain" # 8. share it
|
|
121
143
|
```
|
|
122
144
|
|
|
123
145
|
> **Step 4 is the one people skip and then wonder why the agent drifts.** A pasted rule is a file *you* maintain and it's always loaded — that part isn't optional. `devsmind memory` is a second, complementary lever: it writes nothing, it just prints a natural-language block framed as an explicit "remember this" request, because that's the one thing that actually gets an AI's own memory feature to save something reliably (background/automatic memory turns out to be discretionary almost everywhere — several tools say so in their own docs). Paste it once and ask your AI to remember it. Not every tool has a memory feature to ask that of, though — for those, `devsmind memory` says so and points at step 5's `devsmind skill` instead, which works the same regardless.
|
|
@@ -125,7 +147,7 @@ git add .devmind && git commit -m "Add DevsMind brain" # 8. share it
|
|
|
125
147
|
### Joining a brain a teammate already created
|
|
126
148
|
|
|
127
149
|
```bash
|
|
128
|
-
git pull # 1. .
|
|
150
|
+
git pull # 1. .devsmind/ is already in the repo
|
|
129
151
|
devsmind init # 2. sets up YOUR machine only (dev identity, local paths) — doesn't touch the shared graph
|
|
130
152
|
devsmind mcp # 3. connect your IDE/CLI
|
|
131
153
|
devsmind rule # 4. paste the workspace rule
|
|
@@ -146,6 +168,28 @@ devsmind start # 8. start the server (skip if stdio)
|
|
|
146
168
|
>
|
|
147
169
|
> **This mattered most jumping to 4.0.0**, which *removed* `stage_change` (folded into `edit_node`) and changed the indexing protocol — a rule written against an older version told your agent to call a tool that no longer existed. `stage_change` is back since then, but with a different signature (it now recovers an edit already made outside `edit_node`, rather than being a second way to make one) — a rule from between 4.0.0 and now that never mentions it just won't tell your agent about the recovery path, not break anything. Check the [Changelog](CHANGELOG.md) after any upgrade — some releases need a re-paste, some don't.
|
|
148
170
|
|
|
171
|
+
> 🪝 **Optional: auto-sync after every `git pull`**
|
|
172
|
+
>
|
|
173
|
+
> Step 7 above (`devsmind sync`) is easy to forget — and a stale local cache just means your agent's `search_nodes` results are behind what teammates already committed. A git `post-merge` hook runs it automatically every time `git pull` brings in new commits.
|
|
174
|
+
>
|
|
175
|
+
> ```sh
|
|
176
|
+
> #!/bin/sh
|
|
177
|
+
> # post-merge — runs after every `git pull` / `git merge`.
|
|
178
|
+
> # BRAIN_DIR only needs adjusting if .devsmind/ does NOT live at your repo root — devsmind
|
|
179
|
+
> # auto-detects .devsmind (and a legacy .devmind) by walking UP from wherever it's run, never
|
|
180
|
+
> # down, so a brain dir in a
|
|
181
|
+
> # sibling/nested folder (a dedicated "brains" repo, a monorepo subpackage, …) needs an explicit
|
|
182
|
+
> # cd here (or pass --path to both commands below instead).
|
|
183
|
+
> BRAIN_DIR="$(git rev-parse --show-toplevel)"
|
|
184
|
+
>
|
|
185
|
+
> cd "$BRAIN_DIR" || exit 1
|
|
186
|
+
> devsmind analyze --fix && devsmind sync
|
|
187
|
+
> ```
|
|
188
|
+
>
|
|
189
|
+
> **Two ways to install it, in order of how much it's worth doing:**
|
|
190
|
+
> - **Quick, just for you:** save the script above as `.git/hooks/post-merge` and `chmod +x` it. Nothing to commit — `.git/hooks/` is never tracked by git, so this is per-machine only, and every teammate (and every fresh clone of yours) has to redo it by hand.
|
|
191
|
+
> - **Shared with the whole team:** a hooks directory doesn't have to live inside `.git/` — that's just the default. Put the script in a tracked folder instead (e.g. `.githooks/post-merge`), commit and push it like any other file, then have everyone run **once**: `git config core.hooksPath .githooks`. From then on it fires automatically for anyone who ran that command, and updating the hook is just a normal commit everyone pulls — no manual re-copying.
|
|
192
|
+
|
|
149
193
|
---
|
|
150
194
|
|
|
151
195
|
## 🔌 The four setup commands, and why there are four
|
|
@@ -189,13 +233,13 @@ Antigravity (IDE + CLI), Codex, and Kiro have no real background-memory mechanis
|
|
|
189
233
|
>
|
|
190
234
|
> - `devsmind analyze --fix` — free local health check. Finds god entities, cycles, orphans, dangling edges, duplicates; auto-applies only the safe fixes.
|
|
191
235
|
> - Ask your agent to fix what it hits: `record_alias` (same symbol, another name), `link_nodes` (a real edge the AST missed), `merge_nodes` / `split_node`, `create_missing_node`.
|
|
192
|
-
> - Every `commit_changes` also **reports** problems it noticed into `.
|
|
236
|
+
> - Every `commit_changes` also **reports** problems it noticed into `.devsmind/local/feedback_graph.jsonl`. Read them back with `devsmind feedback`, or have an agent drain the queue: `read_graph_feedback` → verify → fix → `mark_graph_feedback_processed`.
|
|
193
237
|
>
|
|
194
238
|
> Nothing here needs an API key, and none of it is auto-applied behind your back.
|
|
195
239
|
|
|
196
240
|
> 💛 **And there's feedback about DevsMind itself — please share it.**
|
|
197
241
|
>
|
|
198
|
-
> The same `commit_changes` call asks your agent three questions that aren't about your graph at all: which tools actually helped, what it reached for *instead* of a DevsMind tool and why, and one concrete thing that would have made the task easier. Those land in `.
|
|
242
|
+
> The same `commit_changes` call asks your agent three questions that aren't about your graph at all: which tools actually helped, what it reached for *instead* of a DevsMind tool and why, and one concrete thing that would have made the task easier. Those land in `.devsmind/local/feedback_product.jsonl`.
|
|
199
243
|
>
|
|
200
244
|
> It's **gitignored and never uploaded** — DevsMind has no telemetry, so unless you send it, nobody sees it. But it's the most useful bug report there is: a log of where a real agent, on real code, gave up on a DevsMind tool and did it the old way. Run `devsmind feedback`, and if anything in there looks like a pattern, [open an issue](https://github.com/Abialidr/devsmind-mcp/issues) with it. That's how this gets better.
|
|
201
245
|
|
|
@@ -266,7 +310,7 @@ Rough benchmark (~1,080-file repo, informal): local Ollama model took ~15h at ~5
|
|
|
266
310
|
| Command | What it does |
|
|
267
311
|
|---|---|
|
|
268
312
|
| `devsmind start [--stdio] [-p <port>]` | Run the MCP server |
|
|
269
|
-
| `devsmind sync [--analyze] [--fix]` | Pull committed graph changes into your local cache |
|
|
313
|
+
| `devsmind sync [--analyze] [--fix]` | Pull committed graph changes into your local cache. *(4.3.0)* Also catches a repo added elsewhere first — standalone mode, no-op when nothing's missing |
|
|
270
314
|
| `devsmind describe [--provider …] [--key …] [--dry-run]` | Backfill natural-language descriptions for nodes that have none — what `search_nodes` needs to match a plain-English query. `--dry-run` lists the backlog without an API key. Safe to re-run |
|
|
271
315
|
| `devsmind embed [--force] [--dry-run]` | Turn those descriptions into semantic vectors, **fully local** — on-device ONNX, no credentials, no network. `--force` re-embeds everything after a model upgrade. Safe to re-run |
|
|
272
316
|
| `devsmind feedback [--since <days>] [--all]` | Read what your agent reported via `commit_changes` — graph problems, product feedback, indexer-rule candidates. Local, never pushed |
|
|
@@ -278,12 +322,15 @@ Rough benchmark (~1,080-file repo, informal): local Ollama model took ~15h at ~5
|
|
|
278
322
|
| `devsmind prune` | Interactive review + permanent delete of nodes/history |
|
|
279
323
|
| `devsmind workflow` | Interactive view of multi-day feature workflows |
|
|
280
324
|
| `devsmind workflow-import <path>` | Import existing flow docs as resumable workflows |
|
|
325
|
+
| `devsmind push [-m <message>]` | *(4.3.0)* Commit `graph/history/vectors/workflows` onto a dedicated `devsmind` branch and push — keeps that churn out of your code branch's PR diff. Your checked-out branch is never touched |
|
|
326
|
+
| `devsmind pull` | *(4.3.0)* Sync `graph/history/vectors/workflows` down from the `devsmind` branch into `.devsmind/` and re-sync `brain.db` — the read side of `push`. Runs the same repo-added-elsewhere check `sync` does |
|
|
327
|
+
| `devsmind add-repo` | *(4.3.0, standalone mode)* Add ONE repo to an existing brain and index just that repo, without re-running `init`. Resumable if interrupted |
|
|
281
328
|
|
|
282
329
|
---
|
|
283
330
|
|
|
284
331
|
## 🔌 MCP tools, grouped by purpose
|
|
285
332
|
|
|
286
|
-
DevsMind exposes
|
|
333
|
+
DevsMind exposes 38 tools to the agent. The ones you'll see referenced most:
|
|
287
334
|
|
|
288
335
|
| Group | Tools |
|
|
289
336
|
|---|---|
|
|
@@ -293,6 +340,8 @@ DevsMind exposes 35 tools to the agent. The ones you'll see referenced most:
|
|
|
293
340
|
| **Write (the important one)** | `edit_node` — the write path to use, for every file. Edits any file, traces what changed, and **returns the red/green diff of what it changed** so you see it in the session — all in one call. `stage_change` catches up when a file already got edited WITHOUT `edit_node` — same shape, but it locates `new_string` already on disk instead of writing it. `commit_changes` flushes everything staged and takes the one `reasoning` (why/goal) that gets recorded against all of it — **not git**, despite the name: it never runs a git command, it only writes into DevsMind's own local graph. Your actual `git commit`/`git push` is still a separate step you (or your agent, if you ask it to) do yourself. |
|
|
294
341
|
| **Maintenance** | `analyze_graph` (zero-token health check), `recheck_graph`, `rename_node`/`deprecate_node`, and the feedback loop: `read_graph_feedback` → fix → `mark_graph_feedback_processed` |
|
|
295
342
|
| **Multi-day workflows** | `workflow_create`, `workflow_bind` (per session, local to you), `workflow_list`, `workflow_get_context`, `workflow_add_step`, `workflow_sync`, `workflow_archive`, `workflow_import` |
|
|
343
|
+
| **The `devsmind` branch** *(4.3.0)* | `push_devsmind_branch` — **unlike `commit_changes`, this one DOES run real git** (commit + push), but only ever on the dedicated `devsmind` branch; your checked-out branch is never touched. `pull_devsmind_branch` reads it back down and re-syncs `brain.db` |
|
|
344
|
+
| **Adding a repo** *(4.3.0, standalone mode)* | `add_repo` — registers one new repo and indexes it, same local extraction `index_start` uses, scoped to just that repo. Continue with `index_continue`/`index_complete`, passing the `scratchpad` value it returns |
|
|
296
345
|
|
|
297
346
|
Full descriptions and token-cost notes: see [detailExplanation.md § MCP Tool Reference](detailExplanation.md#-mcp-tool-reference).
|
|
298
347
|
|
|
@@ -302,15 +351,15 @@ The server also declares the MCP **`prompts`** capability, separate from tools:
|
|
|
302
351
|
|
|
303
352
|
## 🗄️ Storage model, briefly
|
|
304
353
|
|
|
305
|
-
The layout is up top under [Architecture](#-architecture-the-
|
|
354
|
+
The layout is up top under [Architecture](#-architecture-the-devsmind-directory). What matters about it:
|
|
306
355
|
|
|
307
356
|
**The JSON is the source of truth, not the database.** `graph/`, `history/`, `vectors/` and `workflows/` are line-oriented JSON — git-mergeable, reviewable in a PR. `brain.db` is a disposable local cache rebuilt from them by `devsmind sync` or on server start, which is why it's gitignored: sharing a SQLite binary would conflict on every merge.
|
|
308
357
|
|
|
309
358
|
**`local/` is the one thing nothing can regenerate.** Your requests, revert backups and feedback exist only there, on your machine, by design.
|
|
310
359
|
|
|
311
|
-
**`devsmind init` writes `.
|
|
360
|
+
**`devsmind init` writes `.devsmind/.gitignore`** covering every LOCAL entry and repairs it on each re-run, so a brain from an older version can't leave something exposed. It appends rather than rewrites, so lines you added yourself survive.
|
|
312
361
|
|
|
313
|
-
`brain.db` has 9 tables — 7 documented in [detailExplanation.md § Database Schema](detailExplanation.md#-database-schema-
|
|
362
|
+
`brain.db` has 9 tables — 7 documented in [detailExplanation.md § Database Schema](detailExplanation.md#-database-schema-devsmindbraindb), plus `node_tokens` and `node_vectors`, which are derived search indexes rebuilt from the nodes themselves.
|
|
314
363
|
|
|
315
364
|
---
|
|
316
365
|
|
package/dist/cli/activity.js
CHANGED
|
@@ -27,7 +27,7 @@ function dayLabel(dateStr) {
|
|
|
27
27
|
async function handleActivity(opts) {
|
|
28
28
|
const devmindDir = (0, config_1.resolveDevmindDir)(opts.path);
|
|
29
29
|
if (!devmindDir) {
|
|
30
|
-
console.error(`❌ No .
|
|
30
|
+
console.error(`❌ No .devsmind directory found (nor a legacy .devmind one).\n` +
|
|
31
31
|
` Run from inside a DevsMind brain folder, or pass --path <devmind_path>.`);
|
|
32
32
|
process.exit(1);
|
|
33
33
|
}
|
package/dist/cli/activity.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity.js","sourceRoot":"","sources":["../../src/cli/activity.ts"],"names":[],"mappings":";;AAwBA,wCAiDC;AAzED,4CAAoD;AACpD,6CAA+D;AAE/D,MAAM,GAAG,GAAG,SAAS,CAAC;AACtB,MAAM,IAAI,GAAG,SAAS,CAAC;AACvB,MAAM,GAAG,GAAG,UAAU,CAAC;AACvB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CAAC,UAAU,CAAC,GAAG,KAAK,KAAK,GAAG,GAAG,WAAW,CAAC,MAAM,cAAc,KAAK,EAAE,CAAC,CAAC;QACrH,KAAK,MAAM,CAAC,IAAI,WAAW,EAAE,CAAC;YAC5B,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,kBAAkB,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;YACnG,MAAM,KAAK,GAAG,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,IAAI,mBAAmB,CAAC;YAC5D,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,GAAG,aAAa,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAChF,OAAO,CAAC,GAAG,CAAC,KAAK,GAAG,GAAG,IAAI,GAAG,KAAK,KAAK,KAAK,GAAG,WAAW,EAAE,CAAC,CAAC;YAC/D,OAAO,CAAC,GAAG,CAAC,KAAK,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,gBAAgB,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;QACnG,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAClB,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,gDAAgD,KAAK,IAAI,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `devsmind add-repo` — adds ONE repo to an existing STANDALONE brain (prompting for its name
|
|
3
|
+
* and local path, same as `devsmind init`'s existing-brain path-repair step) and indexes just
|
|
4
|
+
* that repo, reusing `index --run`'s own machinery via `runBackgroundIndexing({ repos: [name] })`.
|
|
5
|
+
*
|
|
6
|
+
* Resumable: if a previous run was interrupted mid-index, re-running this command detects the
|
|
7
|
+
* pending marker and continues that repo's indexing directly — no name/path prompt again.
|
|
8
|
+
*/
|
|
9
|
+
export declare function handleAddRepo(opts: {
|
|
10
|
+
path?: string;
|
|
11
|
+
provider?: string;
|
|
12
|
+
model?: string;
|
|
13
|
+
key?: string;
|
|
14
|
+
url?: string;
|
|
15
|
+
chunkSize?: string;
|
|
16
|
+
chunkOverlap?: string;
|
|
17
|
+
describeBatchSize?: string;
|
|
18
|
+
rpm?: string;
|
|
19
|
+
yes?: boolean;
|
|
20
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.handleAddRepo = handleAddRepo;
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
const config_1 = require("../utils/config");
|
|
40
|
+
const prompt_1 = require("./integrations/prompt");
|
|
41
|
+
const runner_1 = require("./runner");
|
|
42
|
+
const indexer_1 = require("../db/indexer");
|
|
43
|
+
/** `IndexScratchpad`'s own progress file for this repo's indexing run — kept resumable via
|
|
44
|
+
* `runBackgroundIndexing`'s `padFile` override (see runner.ts). Dedicated to `add-repo` alone,
|
|
45
|
+
* so resuming it can never collide with (or accidentally resume) an unrelated `--repos` run. */
|
|
46
|
+
const ADD_REPO_INDEX_SCRATCHPAD = 'add_repo_scratchpad.json';
|
|
47
|
+
/**
|
|
48
|
+
* A tiny marker recording WHICH repo an interrupted `add-repo` run was for — separate from the
|
|
49
|
+
* indexing scratchpad above, because `config.json`/`.env` are written BEFORE indexing starts, so
|
|
50
|
+
* a crash in that narrow window (before the indexer has touched a single file, when
|
|
51
|
+
* `IndexScratchpad.current_repo` is still null) would otherwise leave nothing to resume from.
|
|
52
|
+
* Deleted once indexing actually reaches `status: 'complete'`.
|
|
53
|
+
*/
|
|
54
|
+
const ADD_REPO_PENDING_FILE = 'add_repo_pending.json';
|
|
55
|
+
function pendingPath(devmindDir) {
|
|
56
|
+
return path.join(devmindDir, ADD_REPO_PENDING_FILE);
|
|
57
|
+
}
|
|
58
|
+
function readPending(devmindDir) {
|
|
59
|
+
const p = pendingPath(devmindDir);
|
|
60
|
+
if (!fs.existsSync(p))
|
|
61
|
+
return null;
|
|
62
|
+
try {
|
|
63
|
+
return JSON.parse(fs.readFileSync(p, 'utf-8'));
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* `devsmind add-repo` — adds ONE repo to an existing STANDALONE brain (prompting for its name
|
|
71
|
+
* and local path, same as `devsmind init`'s existing-brain path-repair step) and indexes just
|
|
72
|
+
* that repo, reusing `index --run`'s own machinery via `runBackgroundIndexing({ repos: [name] })`.
|
|
73
|
+
*
|
|
74
|
+
* Resumable: if a previous run was interrupted mid-index, re-running this command detects the
|
|
75
|
+
* pending marker and continues that repo's indexing directly — no name/path prompt again.
|
|
76
|
+
*/
|
|
77
|
+
async function handleAddRepo(opts) {
|
|
78
|
+
const devmindDir = (0, config_1.resolveDevmindDir)(opts.path);
|
|
79
|
+
if (!devmindDir) {
|
|
80
|
+
console.error(`❌ No .devsmind directory found (nor a legacy .devmind one).\n` +
|
|
81
|
+
` Run from inside a DevsMind brain folder, or pass --path <devmind_path>.`);
|
|
82
|
+
process.exit(1);
|
|
83
|
+
}
|
|
84
|
+
const ctx = (0, config_1.loadProjectContext)(devmindDir);
|
|
85
|
+
if (!(0, config_1.isStandaloneMode)(ctx.config)) {
|
|
86
|
+
console.error(`❌ devsmind add-repo is only available in standalone mode.\n` +
|
|
87
|
+
` An embedded brain already covers exactly the one repo it lives inside — there's nothing to add.`);
|
|
88
|
+
process.exit(1);
|
|
89
|
+
}
|
|
90
|
+
const indexOpts = {
|
|
91
|
+
devmindPath: devmindDir,
|
|
92
|
+
provider: opts.provider ?? 'gemini',
|
|
93
|
+
model: opts.model,
|
|
94
|
+
key: opts.key,
|
|
95
|
+
url: opts.url,
|
|
96
|
+
chunkSize: opts.chunkSize ? parseInt(opts.chunkSize, 10) : undefined,
|
|
97
|
+
chunkOverlap: opts.chunkOverlap ? parseInt(opts.chunkOverlap, 10) : undefined,
|
|
98
|
+
describeBatchSize: opts.describeBatchSize ? parseInt(opts.describeBatchSize, 10) : undefined,
|
|
99
|
+
rpm: opts.rpm ? parseInt(opts.rpm, 10) : undefined,
|
|
100
|
+
yes: !!opts.yes,
|
|
101
|
+
padFile: ADD_REPO_INDEX_SCRATCHPAD
|
|
102
|
+
};
|
|
103
|
+
const pending = readPending(devmindDir);
|
|
104
|
+
let repoName;
|
|
105
|
+
if (pending) {
|
|
106
|
+
repoName = pending.repo_name;
|
|
107
|
+
console.log(`\n🔁 DevsMind — Resuming add-repo for "${repoName}"`);
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
console.log(`\n➕ DevsMind — Add a repo to this brain`);
|
|
111
|
+
try {
|
|
112
|
+
repoName = await (0, prompt_1.textPrompt)('Repository name?', {
|
|
113
|
+
validate: v => {
|
|
114
|
+
const trimmed = v.trim();
|
|
115
|
+
if (!trimmed)
|
|
116
|
+
return 'A name is required.';
|
|
117
|
+
if (ctx.config.repos.some(r => r.name === trimmed))
|
|
118
|
+
return `A repo named "${trimmed}" already exists in this brain.`;
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
catch (err) {
|
|
124
|
+
if (err instanceof prompt_1.CancelledError) {
|
|
125
|
+
console.log('\nCancelled.');
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
throw err;
|
|
129
|
+
}
|
|
130
|
+
const localPath = await (0, prompt_1.browseForDir)(`Select the local folder for repository "${repoName}"`, process.cwd());
|
|
131
|
+
if (localPath === null) {
|
|
132
|
+
console.log('\nCancelled.');
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const pathKey = `REPO_${repoName.toUpperCase().replace(/[^A-Z0-9]/g, '_')}`;
|
|
136
|
+
const newRepo = { name: repoName, path_key: pathKey };
|
|
137
|
+
const configPath = path.join(devmindDir, 'config.json');
|
|
138
|
+
ctx.config.repos.push(newRepo);
|
|
139
|
+
fs.writeFileSync(configPath, JSON.stringify(ctx.config, null, 2) + '\n', 'utf-8');
|
|
140
|
+
console.log(`\n💾 Added "${repoName}" to ${configPath.replace(/\\/g, '/')}`);
|
|
141
|
+
const envPath = path.join(devmindDir, '.env');
|
|
142
|
+
const envLines = fs.existsSync(envPath)
|
|
143
|
+
? fs.readFileSync(envPath, 'utf-8').split('\n').filter(l => l.trim())
|
|
144
|
+
: [];
|
|
145
|
+
envLines.push(`${pathKey}=${localPath}`);
|
|
146
|
+
fs.writeFileSync(envPath, envLines.join('\n') + '\n', 'utf-8');
|
|
147
|
+
console.log(`💾 Updated ${envPath.replace(/\\/g, '/')}`);
|
|
148
|
+
fs.writeFileSync(pendingPath(devmindDir), JSON.stringify({ repo_name: repoName }, null, 2), 'utf-8');
|
|
149
|
+
}
|
|
150
|
+
console.log(`\n🧠 Indexing "${repoName}"...`);
|
|
151
|
+
try {
|
|
152
|
+
await (0, runner_1.runBackgroundIndexing)({ ...indexOpts, repos: [repoName] });
|
|
153
|
+
}
|
|
154
|
+
catch (err) {
|
|
155
|
+
console.error(`\n⚠️ Indexing stopped: ${err.message}`);
|
|
156
|
+
console.error(` Re-run "devsmind add-repo" to continue — it will resume "${repoName}" automatically.`);
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
const pad = (0, indexer_1.readScratchpad)(devmindDir, ADD_REPO_INDEX_SCRATCHPAD);
|
|
160
|
+
if (pad && pad.status === 'complete') {
|
|
161
|
+
try {
|
|
162
|
+
fs.unlinkSync(pendingPath(devmindDir));
|
|
163
|
+
}
|
|
164
|
+
catch { /* best-effort */ }
|
|
165
|
+
console.log(`\n✅ "${repoName}" added and indexed.`);
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
console.log(`\nℹ️ Indexing for "${repoName}" is not finished yet. Re-run "devsmind add-repo" to continue.`);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=add-repo.js.map
|
|
@@ -0,0 +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Q,CAAC,EAAE,CAAC,CAAC;IACnE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,2BAA4B,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;QACnE,OAAO,CAAC,KAAK,CAAC,+DAA+D,QAAQ,kBAAkB,CAAC,CAAC;QACzG,OAAO;IACT,CAAC;IAED,MAAM,GAAG,GAAG,IAAA,wBAAc,EAAC,UAAU,EAAE,yBAAyB,CAAC,CAAC;IAClE,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;QACrC,IAAI,CAAC;YAAC,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC;QAC3E,OAAO,CAAC,GAAG,CAAC,QAAQ,QAAQ,sBAAsB,CAAC,CAAC;IACtD,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,uBAAuB,QAAQ,gEAAgE,CAAC,CAAC;IAC/G,CAAC;AACH,CAAC"}
|
package/dist/cli/analyze.js
CHANGED
|
@@ -39,6 +39,7 @@ const path = __importStar(require("path"));
|
|
|
39
39
|
const config_1 = require("../utils/config");
|
|
40
40
|
const database_1 = require("../db/database");
|
|
41
41
|
const analyze_1 = require("../db/analyze");
|
|
42
|
+
const sync_progress_1 = require("./sync-progress");
|
|
42
43
|
/**
|
|
43
44
|
* `devsmind analyze` — local, zero-AI graph health check (Phase 1 of the roadmap's
|
|
44
45
|
* `analyze_graph`). Pure SQLite queries, filesystem checks, and `git log` — no LLM
|
|
@@ -57,8 +58,14 @@ async function handleAnalyze(opts) {
|
|
|
57
58
|
const godEntityThreshold = opts.godEntityThreshold ? parseInt(opts.godEntityThreshold, 10) : undefined;
|
|
58
59
|
console.log(`\n🩺 DevsMind — Analyze graph health${opts.fix ? ' (--fix)' : ''}`);
|
|
59
60
|
console.log(` Brain : ${devmindDir.replace(/\\/g, '/')}`);
|
|
60
|
-
|
|
61
|
+
// Opening the DB runs a full syncFromDisk() pass — on a large brain that reads every
|
|
62
|
+
// graph/history/vectors/workflows JSON file back into SQLite, and was previously silent here
|
|
63
|
+
// (unlike `sync`/`describe`/`embed`, which already wire this same progress line), so it looked
|
|
64
|
+
// hung instead of working on a many-thousand-node brain.
|
|
65
|
+
const db = new database_1.DevMindDatabase(dbPath, { onSyncProgress: sync_progress_1.renderSyncProgress });
|
|
66
|
+
(0, sync_progress_1.clearSyncProgressLine)();
|
|
61
67
|
try {
|
|
68
|
+
console.log(' Running health checks...');
|
|
62
69
|
const report = (0, analyze_1.runAnalysis)(db, workspaceRoot, { fix: opts.fix === true, godEntityThreshold });
|
|
63
70
|
printReport(report);
|
|
64
71
|
}
|
|
@@ -78,6 +85,7 @@ const SECTIONS = [
|
|
|
78
85
|
{ key: 'missing_files', label: 'Nodes with missing files', fixable: true },
|
|
79
86
|
{ key: 'renamed_files', label: 'Renamed files (git-detected)', fixable: true },
|
|
80
87
|
{ key: 'untracked_files', label: 'Git-tracked files with zero graph nodes', fixable: false },
|
|
88
|
+
{ key: 'stray_output_dirs', label: 'Stray .devmind output directories blocking sync', fixable: true },
|
|
81
89
|
];
|
|
82
90
|
const MAX_ROWS = 20;
|
|
83
91
|
function printReport(report) {
|
|
@@ -136,6 +144,8 @@ function formatRow(key, row) {
|
|
|
136
144
|
return `[${row.repo}] ${row.from} → ${row.to}${row.migrated ? ' (migrated)' : ''}`;
|
|
137
145
|
case 'untracked_files':
|
|
138
146
|
return `[${row.repo}] ${row.file}`;
|
|
147
|
+
case 'stray_output_dirs':
|
|
148
|
+
return `${row.kind} — ${row.target} (blocked writes for ${row.file_path})`;
|
|
139
149
|
default:
|
|
140
150
|
return JSON.stringify(row);
|
|
141
151
|
}
|
package/dist/cli/analyze.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyze.js","sourceRoot":"","sources":["../../src/cli/analy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AAc,GAAG,CAAC,MAAM,EAAE,CAAC;QAC1D,KAAK,uBAAuB;YAC1B,OAAQ,GAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvC,KAAK,gBAAgB,CAAC;QACtB,KAAK,gBAAgB,CAAC;QACtB,KAAK,eAAe;YAClB,OAAO,GAAG,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,OAAO,GAAG,CAAC,SAAS,IAAI,SAAS,EAAE,CAAC;QACnE,KAAK,gBAAgB;YACnB,OAAO,GAAG,GAAG,CAAC,cAAc,MAAM,GAAG,CAAC,cAAc,EAAE,CAAC;QACzD,KAAK,eAAe;YAClB,OAAO,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC7B,KAAK,+BAA+B,CAAC;QACrC,KAAK,sBAAsB;YACzB,OAAO,GAAG,GAAG,CAAC,OAAO,aAAa,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,UAAU,GAAG,CAAC;QACjE,KAAK,eAAe;YAClB,OAAO,IAAI,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,MAAM,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QACrF,KAAK,iBAAiB;YACpB,OAAO,IAAI,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,EAAE,CAAC;QACrC,KAAK,mBAAmB;YACtB,OAAO,GAAG,GAAG,CAAC,IAAI,MAAM,GAAG,CAAC,MAAM,wBAAwB,GAAG,CAAC,SAAS,GAAG,CAAC;QAC7E;YACE,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `devsmind push` — commits the current graph/history/vectors/workflows onto the dedicated
|
|
3
|
+
* `devsmind` branch and pushes it, leaving your actual checked-out branch untouched. See
|
|
4
|
+
* `utils/devsmind-branch.ts` for why: this is what keeps a PR diff to your real code changes
|
|
5
|
+
* instead of the hundreds of graph/history files DevsMind itself writes.
|
|
6
|
+
*/
|
|
7
|
+
export declare function handlePush(opts: {
|
|
8
|
+
path?: string;
|
|
9
|
+
message?: string;
|
|
10
|
+
}): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* `devsmind pull` — the read side of `devsmind push`: copies graph/history/vectors/workflows
|
|
13
|
+
* down from the `devsmind` branch (preferring the remote-tracking ref when a remote exists)
|
|
14
|
+
* into the real `.devsmind/` on disk, then fully re-syncs `brain.db` from it (both directions,
|
|
15
|
+
* same as `devsmind sync`). Needed because a fresh clone of the code branch alone no longer
|
|
16
|
+
* carries that data — see CHANGELOG 4.3.0.
|
|
17
|
+
*
|
|
18
|
+
* Runs the SAME `reconcileRepoPaths` pre-flight `devsmind sync` does — a pull is exactly the
|
|
19
|
+
* other moment (besides a plain `sync`) a repo a teammate added elsewhere would first become
|
|
20
|
+
* visible on this machine, so it needs the same catch-up walkthrough, not a thinner copy of it.
|
|
21
|
+
*/
|
|
22
|
+
export declare function handlePull(opts: {
|
|
23
|
+
path?: string;
|
|
24
|
+
}): Promise<void>;
|