@fingerskier/augment 0.2.1 → 0.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/docs/FEATURES.md CHANGED
@@ -95,6 +95,29 @@ full index rebuild. Relative paths remain the durable identity.
95
95
  and DB row are removed and inbound frontmatter links in other memories are
96
96
  scrubbed). Delete is deliberately **not** exposed as an MCP tool.
97
97
 
98
+ ## Git auto-commit
99
+
100
+ When the memory root is itself a git repository, the daemon auto-commits
101
+ augment's own writes so the corpus carries its own version history — no manual
102
+ snapshotting required.
103
+
104
+ - **Enabled by default**; disable with `AUGMENT_GIT_AUTOCOMMIT=0` (also `false`,
105
+ `no`, `off`).
106
+ - **Daemon-side and debounced.** Only augment's own mutations (upsert, delete,
107
+ link, unlink) schedule a commit; a burst of writes coalesces into one snapshot
108
+ commit. External/editor/Dropbox edits are *not* committed.
109
+ - **Markdown only.** It stages `*.md` (`git add -A -- '*.md'`), so a nested state
110
+ dir or unrelated files are never swept in, and every memory mutation — including
111
+ deletes and link scrubs — is captured.
112
+ - **Root-repo only.** It engages only when the memory root is the git worktree
113
+ root, never when it merely sits inside a larger project repo.
114
+ - **Never pushes, always fails open.** Commits stay local; any git failure is
115
+ logged once and swallowed so a snapshot can never break a write. A fresh
116
+ `git init` with no configured identity still commits (a fallback
117
+ `Augment <augment@localhost>` identity is used only when none is set).
118
+ - The check runs **once at daemon startup**, so enabling the flag or `git init`-ing
119
+ the memory root takes effect on the next daemon restart.
120
+
98
121
  ## Dashboard
99
122
 
100
123
  A daemon-served single-page web UI for browsing and editing memories as a graph:
@@ -327,6 +350,71 @@ groups a future `sleep` pass would distill into SPEC/ARCH records.
327
350
  - Mutates nothing. The write-back (`sleep_apply`) is deferred behind the
328
351
  Phase-2 dogfood go/no-go and does not exist.
329
352
 
353
+ ### `memory_insights`
354
+
355
+ Aggregates a project's memory graph into dashboard insights.
356
+
357
+ Inputs:
358
+
359
+ ```ts
360
+ { project_name?: string }
361
+ ```
362
+
363
+ Behavior:
364
+
365
+ - Resolves the project strictly (exact name, or a single unambiguous substring
366
+ match) — unlike `init_project` it never creates anything.
367
+ - Returns a text summary (always) plus `structuredContent` with: totals
368
+ (memories/links/distinct tags/chars), counts by kind, links by type, top tags,
369
+ 12 weekly activity buckets (created vs updated), most-connected memories,
370
+ orphan count, freshest memory, and the recall-quality tally when available.
371
+ - In MCP Apps hosts (see below) the result renders as an interactive dashboard
372
+ snippet.
373
+
374
+ ### `memory_graph`
375
+
376
+ Returns a project's memory graph for visualization.
377
+
378
+ Inputs:
379
+
380
+ ```ts
381
+ { project_name?: string }
382
+ ```
383
+
384
+ Behavior:
385
+
386
+ - Text summary (node/link counts, top hubs) is always returned and points at
387
+ `augment dashboard` for the full experience.
388
+ - The compact node/edge payload (capped at the 300 most recently updated
389
+ memories) is attached as `structuredContent` **only** when the client
390
+ negotiated the MCP Apps extension or `AUGMENT_MCP_UI_EMBED=1` is set — in a
391
+ text-only host it would only burn model context.
392
+
393
+ ## MCP Apps Dashboard Snippets (SEP-1865)
394
+
395
+ The MCP server implements the [MCP Apps extension](https://github.com/modelcontextprotocol/ext-apps)
396
+ (`io.modelcontextprotocol/ui`, spec version 2026-01-26):
397
+
398
+ - Two UI templates are predeclared as resources with mime type
399
+ `text/html;profile=mcp-app`: `ui://augment/insights.html` and
400
+ `ui://augment/graph.html`. Both are fully self-contained HTML documents
401
+ (inline CSS/JS, Cytoscape inlined from `node_modules` at read time) so they
402
+ work offline under the extension's default CSP.
403
+ - `memory_insights` / `memory_graph` reference their template via
404
+ `_meta.ui.resourceUri`; UI-capable hosts render the tool result in a sandboxed
405
+ iframe and stream data in over the spec's postMessage JSON-RPC
406
+ (`ui/initialize` → `ui/notifications/initialized` →
407
+ `ui/notifications/tool-result`). The snippets adapt to the host theme
408
+ (`hostContext.theme` + host CSS variables), auto-resize via
409
+ `ui/notifications/size-changed`, and the insights snippet can refresh itself
410
+ through the host-proxied `tools/call`.
411
+ - Hosts without the extension ignore the metadata entirely and get the text
412
+ fallback — the tools stay useful in text-only hosts like CLIs.
413
+ - Classic MCP-UI hosts (embedded-block renderers that never negotiate the
414
+ extension): set `AUGMENT_MCP_UI_EMBED=1` to append a self-contained
415
+ `type: "resource"` HTML block (data inlined, `mimeType: text/html`) to tool
416
+ results when — and only when — the client did not negotiate the extension.
417
+
330
418
  ## Configuration
331
419
 
332
420
  Resolution order:
@@ -340,6 +428,11 @@ Environment variables:
340
428
  - `AUGMENT_MEMORY_ROOT`
341
429
  - `AUGMENT_STATE_DIR`
342
430
  - `AUGMENT_DAEMON_PORT`
431
+ - `AUGMENT_GIT_AUTOCOMMIT` — default on; set `0`/`false`/`no`/`off` to disable the
432
+ daemon's [git auto-commit](#git-auto-commit) of memory writes.
433
+ - `AUGMENT_MCP_UI_EMBED` — set `1` to embed classic MCP-UI HTML blocks in
434
+ `memory_insights`/`memory_graph` results for hosts that render embedded
435
+ `ui://` resources but do not negotiate the MCP Apps extension.
343
436
 
344
437
  Defaults:
345
438
 
@@ -13,6 +13,14 @@ Use this skill when working in a repository with the Augment MCP server availabl
13
13
  2. Call `search` with the user's task summary.
14
14
  3. Read exact memories when search results identify likely governing context.
15
15
 
16
+ ## Memory Insights
17
+
18
+ When the user asks for memory insights, stats, health, or an overview of what
19
+ Augment knows, call `memory_insights` (and `memory_graph` when they want to see
20
+ how memories connect). In hosts that support MCP Apps these render interactive
21
+ dashboard snippets; elsewhere they return a text summary — either way, relay the
22
+ findings rather than re-deriving them from raw memories.
23
+
16
24
  ## Before Code Changes
17
25
 
18
26
  1. Search for the file, component, command, error, or behavior being touched.
@@ -1,17 +1,17 @@
1
- {
2
- "mcpServers": {
3
- "augment": {
4
- "command": "npm",
5
- "args": [
6
- "exec",
7
- "--prefix",
8
- "C:\\Users\\you\\.augment\\npm-exec",
9
- "--",
10
- "augment-mcp"
11
- ],
12
- "env": {
13
- "AUGMENT_MEMORY_ROOT": "C:\\Users\\you\\Dropbox\\augment-memories"
14
- }
15
- }
16
- }
17
- }
1
+ {
2
+ "mcpServers": {
3
+ "augment": {
4
+ "command": "npm",
5
+ "args": [
6
+ "exec",
7
+ "--prefix",
8
+ "C:\\Users\\you\\.augment\\npm-exec",
9
+ "--",
10
+ "augment-mcp"
11
+ ],
12
+ "env": {
13
+ "AUGMENT_MEMORY_ROOT": "C:\\Users\\you\\Dropbox\\augment-memories"
14
+ }
15
+ }
16
+ }
17
+ }
@@ -1,17 +1,17 @@
1
- {
2
- "mcpServers": {
3
- "augment": {
4
- "command": "npm",
5
- "args": [
6
- "exec",
7
- "--prefix",
8
- "C:\\Users\\you\\.augment\\npm-exec",
9
- "--",
10
- "augment-mcp"
11
- ],
12
- "env": {
13
- "AUGMENT_MEMORY_ROOT": "C:\\Users\\you\\Dropbox\\augment-memories"
14
- }
15
- }
16
- }
17
- }
1
+ {
2
+ "mcpServers": {
3
+ "augment": {
4
+ "command": "npm",
5
+ "args": [
6
+ "exec",
7
+ "--prefix",
8
+ "C:\\Users\\you\\.augment\\npm-exec",
9
+ "--",
10
+ "augment-mcp"
11
+ ],
12
+ "env": {
13
+ "AUGMENT_MEMORY_ROOT": "C:\\Users\\you\\Dropbox\\augment-memories"
14
+ }
15
+ }
16
+ }
17
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fingerskier/augment",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Local RAG memory system for coding agents",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -29,7 +29,7 @@
29
29
  "dependencies": {
30
30
  "@huggingface/transformers": "^3.8.0",
31
31
  "@libsql/client": "^0.15.15",
32
- "@modelcontextprotocol/sdk": "^1.23.0",
32
+ "@modelcontextprotocol/sdk": "^1.29.0",
33
33
  "chokidar": "^4.0.3",
34
34
  "cytoscape": "^3.34.0",
35
35
  "gray-matter": "^4.0.3",