pi-noc-memory

Nocturne Memory extension for Pi — automated memory management with SessionStart boot protocol

Packages

Package details

extension

Install pi-noc-memory from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-noc-memory
Package
pi-noc-memory
Version
1.2.4
Published
Sep 17, 2026
Downloads
1,204/mo · 204/wk
Author
alexandre_ai
License
MIT
Types
extension
Size
35.5 KB
Dependencies
3 dependencies · 0 peers
Pi manifest JSON
{
  "hooks": [
    "./hooks/session-start.sh"
  ],
  "extensions": [
    "./extensions"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-noc-memory

Noc Memory extension for Pi — automated memory management with SessionStart boot protocol.

Agent-side companion to cf-noc-mem (the Cloudflare-hosted MCP memory server). Also available for dsh: dsh-noc-memory.

Features

  • SessionStart Boot Protocol — automatically calls noc_boot (reads system://boot, system://recent/5, system://triggers, then best-effort system://briefing) at session start; then read system://focus to resume active working trees (recent is a briefing subset — no need to re-read it after boot)
  • Memory Rules — global rules injected every session for intelligent memory usage (write-judgement, update-over-create, trigger discipline)
  • Memory Toolsnoc_read, noc_create, noc_update, noc_delete, noc_search, noc_alias, noc_triggers

Install

pi install npm:pi-noc-memory

Upgrading from pi-nocturne-memory (≤1.0.x): the package was renamed to pi-noc-memory and tools renamed from nocturne_* to noc_*. Old config at ~/.pi/agent/extensions/pi-nocturne-memory/config.json is still read as a fallback, so your MCP URL/credentials keep working — just reinstall the new package and update any prompt text that referenced nocturne_* tools.

Configure

Add to ~/.claude/rules.md or project rules:

- noc-memory rules (from pi-noc-memory extension)

Set your MCP endpoint (new path, or legacy pi-nocturne-memory path):

{ "mcpUrl": "https://noc-mem.slahser.com/mcp", "mcpHeaders": { "CF-Access-Client-Id": "<service-token-id>", "CF-Access-Client-Secret": "<service-token-secret>" } }

For servers behind Cloudflare Access (e.g. noc-mem.slahser.com), pass the service token headers instead of mcpAuth:

{
  "mcpUrl": "https://noc-mem.slahser.com/mcp",
  "mcpHeaders": {
    "CF-Access-Client-Id": "your-client-id",
    "CF-Access-Client-Secret": "your-client-secret"
  }
}

mcpHeaders is merged into every MCP request; mcpAuth (Authorization) can be combined if the server also accepts it.

How It Works

  1. SessionStart Hook — triggers boot at session start
  2. Agent calls noc_boot — loads system://boot, system://recent/5, system://triggers, then best-effort system://briefing
  3. Agent reads system://focus — resume active working trees (recent already covered by boot/briefing)
  4. Global Rules — memory operation rules injected every session
  5. Agent uses memory tools — read/create/update/delete based on rules

Why noc_* (not nocturne_*)?

Some agents probe for read_mcp_resource before reaching for a memory tool, which wastes a round trip (upstream issue #32). The noc_boot / noc_read naming, plus the boot protocol text in the rules, steers models to the right tool explicitly — no resource shim needed.

License

MIT

Related