Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/AGENT-SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ Install Engram's Pi package, the MCP adapter, and Pi MCP config:
engram setup pi
```

`engram setup pi` runs `pi install npm:gentle-engram@0.1.7` and `pi install npm:pi-mcp-adapter`, then ensures Pi settings contain both packages and writes `mcpServers.engram` in the Pi agent MCP config when no Engram server is already configured. Existing `mcpServers.engram` entries are preserved.
`engram setup pi` runs `pi install npm:gentle-engram@0.1.8` and `pi install npm:pi-mcp-adapter`, then ensures Pi settings contain both packages and writes `mcpServers.engram` in the Pi agent MCP config when no Engram server is already configured. Existing `mcpServers.engram` entries are preserved.

When [mise](https://mise.jdx.dev/) is detected in `PATH`, `engram setup pi` also auto-pins `npmCommand` in Pi's `settings.json` to `["mise", "exec", "node@<version>", "--", "npm"]`, preventing Node version drift from silently changing which npm root Pi uses. If `npmCommand` already exists in `settings.json`, the existing value is preserved. This step is a no-op when mise is not installed.

Manual equivalent:

```bash
pi install npm:gentle-engram@0.1.7
pi install npm:gentle-engram@0.1.8
pi install npm:pi-mcp-adapter
pi-engram init
```
Expand Down
2 changes: 1 addition & 1 deletion internal/setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const claudeCodeMarketplace = "Gentleman-Programming/engram"

const openCodeSubagentStatuslinePlugin = "opencode-subagent-statusline"

const piGentleEngramPackage = "npm:gentle-engram@0.1.7"
const piGentleEngramPackage = "npm:gentle-engram@0.1.8"
const piMCPAdapterPackage = "npm:pi-mcp-adapter"

// claudeCodeMCPTools are the MCP tool permission names for the agent profile
Expand Down
8 changes: 4 additions & 4 deletions internal/setup/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ func TestInstallPiInstallsPackagesAndWritesConfig(t *testing.T) {
if result.Agent != "pi" || result.Destination != agentDir || result.Files != 2 {
t.Fatalf("unexpected install result: %#v", result)
}
wantCommands := []string{"pi install npm:gentle-engram@0.1.7", "pi install npm:pi-mcp-adapter"}
wantCommands := []string{"pi install npm:gentle-engram@0.1.8", "pi install npm:pi-mcp-adapter"}
if !reflect.DeepEqual(commands, wantCommands) {
t.Fatalf("unexpected pi install commands: got %#v want %#v", commands, wantCommands)
}
Expand All @@ -332,7 +332,7 @@ func TestInstallPiInstallsPackagesAndWritesConfig(t *testing.T) {
if err := json.Unmarshal(settingsRaw, &settings); err != nil {
t.Fatalf("parse settings: %v", err)
}
for _, pkg := range []string{"npm:gentle-engram@0.1.7", "npm:pi-mcp-adapter"} {
for _, pkg := range []string{"npm:gentle-engram@0.1.8", "npm:pi-mcp-adapter"} {
if !slices.Contains(settings.Packages, pkg) {
t.Fatalf("expected settings packages to include %q, got %#v", pkg, settings.Packages)
}
Expand Down Expand Up @@ -400,7 +400,7 @@ func TestInstallPiPreservesExistingEngramMCPServer(t *testing.T) {
if err != nil {
t.Fatalf("read settings after install: %v", err)
}
if !strings.Contains(string(settingsRaw), "npm:existing") || !strings.Contains(string(settingsRaw), "npm:gentle-engram@0.1.7") || !strings.Contains(string(settingsRaw), "npm:pi-mcp-adapter") {
if !strings.Contains(string(settingsRaw), "npm:existing") || !strings.Contains(string(settingsRaw), "npm:gentle-engram@0.1.8") || !strings.Contains(string(settingsRaw), "npm:pi-mcp-adapter") {
t.Fatalf("expected settings packages to be preserved and extended, got %s", settingsRaw)
}
}
Expand All @@ -411,7 +411,7 @@ func TestInstallPiCommandFailure(t *testing.T) {
return []byte("boom"), errors.New("exit 1")
}
_, err := Install("pi")
if err == nil || !strings.Contains(err.Error(), "install npm:gentle-engram@0.1.7") {
if err == nil || !strings.Contains(err.Error(), "install npm:gentle-engram@0.1.8") {
t.Fatalf("expected pi install error, got %v", err)
}
}
Expand Down
6 changes: 3 additions & 3 deletions plugin/pi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Engram includes a terminal UI for browsing sessions, observations, prompts, proj
## Quick start

```bash
pi install npm:gentle-engram@0.1.7
pi install npm:gentle-engram@0.1.8
pi install npm:pi-mcp-adapter
pi-engram init
```
Expand Down Expand Up @@ -208,7 +208,7 @@ If the binary is missing, Pi keeps running and memory degrades instead of crashi

`pi-engram init` writes Pi-owned config in the Pi agent directory:

- `settings.json`: ensures `npm:pi-mcp-adapter` and `npm:gentle-engram@0.1.7` are declared.
- `settings.json`: ensures `npm:pi-mcp-adapter` and `npm:gentle-engram@0.1.8` are declared.
- `mcp.json`: adds an `engram` MCP server that launches `engram mcp --tools=agent` through a safe Node wrapper with `directTools: false`, so MCP remains available through the gateway without duplicating Pi-native `mem_*` tools.

`engram setup pi` also auto-pins `npmCommand` in Pi's `settings.json` when [mise](https://mise.jdx.dev/) is detected in `PATH`. It sets `npmCommand` to `["mise", "exec", "node@<version>", "--", "npm"]` so Pi always uses the mise-managed Node version. Existing `npmCommand` values are never overwritten; if mise is not found, this step is a no-op.
Expand Down Expand Up @@ -243,7 +243,7 @@ MCP tool calls still use Engram core's canonical project resolver at call time.

| Symptom | Fix |
| ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `mem_*` tools are missing | Install/verify `npm:gentle-engram@0.1.7`, run `pi-engram init`, then restart Pi. Keep `npm:pi-mcp-adapter` installed if you use MCP integrations such as Notion or direct MCP flows. |
| `mem_*` tools are missing | Install/verify `npm:gentle-engram@0.1.8`, run `pi-engram init`, then restart Pi. Keep `npm:pi-mcp-adapter` installed if you use MCP integrations such as Notion or direct MCP flows. |
| Pi cannot find `engram` | Set `ENGRAM_BIN=/absolute/path/to/engram`. |
| Session capture should use another server | Set `ENGRAM_URL=http://host:7437`. |
| Pi shows `error MCP: 0/N servers` but `mem_*` works | That status is Pi's global MCP gateway, not proof that Engram's Pi-native HTTP tools failed. Check `~/.pi/agent/mcp.json` for stale/unreachable servers such as remote OAuth services, and keep `npm:pi-mcp-adapter` installed if you use MCP integrations like Notion. |
Expand Down
4 changes: 2 additions & 2 deletions plugin/pi/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
import { homedir } from "node:os";
import { dirname, join } from "node:path";

const PACKAGE_NAME = "npm:gentle-engram@0.1.7";
const PACKAGE_NAME = "npm:gentle-engram@0.1.8";
const MCP_ADAPTER_PACKAGE = "npm:pi-mcp-adapter";
const HELP = `pi-engram

Expand All @@ -12,7 +12,7 @@ Usage:

Creates Pi's Engram MCP config in the Pi agent dir and ensures pi-mcp-adapter
is declared in settings.json. The Pi extension itself is loaded by installing
the package with: pi install npm:gentle-engram@0.1.7
the package with: pi install npm:gentle-engram@0.1.8
`;

const MCP_LAUNCHER =
Expand Down
2 changes: 1 addition & 1 deletion plugin/pi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gentle-engram",
"version": "0.1.7",
"version": "0.1.8",
"description": "Persistent memory for Pi agents β€” one local-or-cloud brain shared across sessions, compactions, and MCP agents",
"type": "module",
"license": "MIT",
Expand Down