agent-recall-mcp 3.3.9 → 3.3.11
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 +111 -18
- package/dist/index.js +52 -71
- package/dist/index.js.map +1 -1
- package/dist/tools/check.d.ts +3 -0
- package/dist/tools/check.d.ts.map +1 -0
- package/dist/tools/check.js +20 -0
- package/dist/tools/check.js.map +1 -0
- package/dist/tools/palace-write.d.ts.map +1 -1
- package/dist/tools/palace-write.js +3 -2
- package/dist/tools/palace-write.js.map +1 -1
- package/dist/tools/recall.d.ts +3 -0
- package/dist/tools/recall.d.ts.map +1 -0
- package/dist/tools/recall.js +22 -0
- package/dist/tools/recall.js.map +1 -0
- package/dist/tools/remember.d.ts +3 -0
- package/dist/tools/remember.d.ts.map +1 -0
- package/dist/tools/remember.js +17 -0
- package/dist/tools/remember.js.map +1 -0
- package/dist/tools/session-end.d.ts +3 -0
- package/dist/tools/session-end.d.ts.map +1 -0
- package/dist/tools/session-end.js +23 -0
- package/dist/tools/session-end.js.map +1 -0
- package/dist/tools/session-start.d.ts +3 -0
- package/dist/tools/session-start.d.ts.map +1 -0
- package/dist/tools/session-start.js +16 -0
- package/dist/tools/session-start.js.map +1 -0
- package/dist/tools/smart-recall.d.ts +3 -0
- package/dist/tools/smart-recall.d.ts.map +1 -0
- package/dist/tools/smart-recall.js +19 -0
- package/dist/tools/smart-recall.js.map +1 -0
- package/dist/tools/smart-remember.d.ts +3 -0
- package/dist/tools/smart-remember.d.ts.map +1 -0
- package/dist/tools/smart-remember.js +19 -0
- package/dist/tools/smart-remember.js.map +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<h1 align="center">AgentRecall</h1>
|
|
2
2
|
|
|
3
|
-
<p align="center"><strong>
|
|
3
|
+
<p align="center"><strong>Your agent doesn't just remember. It learns how you think.</strong></p>
|
|
4
|
+
<p align="center">Persistent, compounding memory + Intelligent Distance Protocol. MCP server + SDK + CLI.</p>
|
|
4
5
|
|
|
5
6
|
<p align="center">
|
|
6
7
|
<a href="https://www.npmjs.com/package/agent-recall-mcp"><img src="https://img.shields.io/npm/v/agent-recall-mcp?style=flat-square&label=MCP&color=5D34F2" alt="MCP npm"></a>
|
|
@@ -117,16 +118,60 @@ Human: "we need SDK, CLI, │
|
|
|
117
118
|
|
|
118
119
|
## Why Choose AgentRecall
|
|
119
120
|
|
|
120
|
-
**
|
|
121
|
+
**AgentRecall is not a memory tool. It's a learning loop.**
|
|
121
122
|
|
|
122
|
-
|
|
123
|
+
Memory is the mechanism. Understanding is the goal. Every time you correct your agent — "no, not that version", "put this section first", "ask me before you assume" — that correction is stored, weighted, and recalled next time. After 10 sessions, your agent doesn't just remember your project. It understands how you think: your priorities, your communication style, your non-negotiables.
|
|
124
|
+
|
|
125
|
+
This is the **Intelligent Distance Protocol** — not closing the gap between human and AI (that gap is structural), but navigating it better every session.
|
|
126
|
+
|
|
127
|
+
- **Your agent learns how you think.** Humans are inconsistent — we skip from A to E, forget what we said yesterday, change priorities mid-sentence. AgentRecall captures every correction and surfaces it before the next mistake. The gap between what you mean and what your agent does shrinks with every session.
|
|
123
128
|
|
|
124
129
|
- **Compounding awareness, not infinite logs.** Memory is capped at 200 lines. New insights either merge with existing ones (strengthening them) or replace the weakest. After 100 sessions, your awareness file is still 200 lines — but each line carries the weight of cross-validated, confirmed observations.
|
|
125
130
|
|
|
126
131
|
- **Cross-project recall.** Lessons learned in one project apply everywhere. Built a rate limiter last month? That lesson surfaces when you're building one today — in a different repo, through a different agent.
|
|
127
132
|
|
|
133
|
+
- **Near-universal compatibility.** MCP server for any MCP-compatible agent (Claude Code, Cursor, Windsurf, VS Code, Codex). SDK for any JS/TS framework (LangChain, CrewAI, Vercel AI SDK, custom agents). CLI for terminal and CI workflows. One memory system, every surface.
|
|
134
|
+
|
|
128
135
|
- **Zero cloud, zero telemetry, all local.** Everything is markdown on disk. Browse it in Obsidian, grep it in the terminal, version it in git. No accounts, no API keys, no lock-in.
|
|
129
136
|
|
|
137
|
+
### Use Case 1: The Scattered Human
|
|
138
|
+
|
|
139
|
+
A real session where the human gave non-linear, scattered instructions across a 2-day project:
|
|
140
|
+
|
|
141
|
+
> Human: "we need SDK, CLI, also update README, oh and the npm versions are wrong, fix those too"
|
|
142
|
+
|
|
143
|
+
Without AgentRecall, the agent guesses priority and misses items. With AgentRecall:
|
|
144
|
+
|
|
145
|
+
| What the agent already knew | How it knew |
|
|
146
|
+
|---|---|
|
|
147
|
+
| "This human communicates in scattered bursts — structurize into modules before executing" | `awareness_update` from 3 prior sessions |
|
|
148
|
+
| "Ask when ambiguous, proceed when clear" | `alignment_check` correction stored last week |
|
|
149
|
+
| "No version inflation — this human cares about semver discipline" | `nudge` captured mid-session, recalled immediately |
|
|
150
|
+
|
|
151
|
+
Result: Agent presented a structured 4-step plan, human confirmed, zero rework. A fresh agent without AgentRecall would have guessed wrong on versions, buried the most important feature in the README, and published without testing.
|
|
152
|
+
|
|
153
|
+
### Use Case 2: The Cross-Project Lesson
|
|
154
|
+
|
|
155
|
+
An engineer built a proxy server with rate limiting (Project A). Three weeks later, started an API gateway (Project B).
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
/arstart on Project B:
|
|
159
|
+
recall_insight: "Rate limiting prevents runaway costs"
|
|
160
|
+
→ source: Project A, confirmed 3x, severity: critical
|
|
161
|
+
→ applies_when: ["api", "proxy", "rate-limit", "cost"]
|
|
162
|
+
→ The lesson from Project A surfaces automatically in Project B
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
The engineer never mentioned rate limiting. AgentRecall matched the project context against the global insights index and surfaced it proactively.
|
|
166
|
+
|
|
167
|
+
### Use Case 3: The Correction That Sticks
|
|
168
|
+
|
|
169
|
+
Session 1: Agent uses version 4.0.0 for a patch release. Human corrects: "That's version inflation. Use 3.3.4."
|
|
170
|
+
|
|
171
|
+
Session 2 (next day, different agent): Awareness already contains "no version inflation — this human cares about conservative versioning." The new agent gets it right the first time.
|
|
172
|
+
|
|
173
|
+
Without AgentRecall, the same correction would be needed again. And again. And again. With AgentRecall, **every correction happens exactly once.**
|
|
174
|
+
|
|
130
175
|
---
|
|
131
176
|
|
|
132
177
|
## Three Ways to Use It
|
|
@@ -153,11 +198,11 @@ npx agent-recall-cli palace walk --depth active
|
|
|
153
198
|
|
|
154
199
|
## What Is AgentRecall?
|
|
155
200
|
|
|
156
|
-
A **
|
|
201
|
+
A **learning system** that bridges the gap between how humans think and how AI agents work. Not a log. Not a database. A compounding loop where every correction, decision, and insight makes the next session better than the last.
|
|
157
202
|
|
|
158
|
-
**The problem:** AI agents
|
|
203
|
+
**The problem:** AI agents don't truly forget — they lose focus. Priorities blur across sessions. Lessons go dormant. The same misunderstanding happens twice because no one stored the correction. The gap between what you mean and what your agent does stays constant, session after session.
|
|
159
204
|
|
|
160
|
-
**The fix:** AgentRecall stores knowledge in a five-layer memory pyramid — from quick captures to cross-project insights — and forces compression so memory gets more valuable over time
|
|
205
|
+
**The fix:** AgentRecall stores knowledge in a five-layer memory pyramid — from quick captures to cross-project insights — and forces compression so memory gets more valuable over time. But more importantly, it closes the **Intelligent Distance** gap: every human correction is captured, weighted, and recalled before the agent makes the same mistake again.
|
|
161
206
|
|
|
162
207
|
| Without AgentRecall | With AgentRecall |
|
|
163
208
|
|---------------------|------------------|
|
|
@@ -469,7 +514,7 @@ L5: Insight Index recall_insight "cross-project experience"
|
|
|
469
514
|
|
|
470
515
|
**Fan-out writes** — Write to one room, cross-references auto-update in related rooms via `[[wikilinks]]`. Mechanical, zero LLM cost.
|
|
471
516
|
|
|
472
|
-
**Salience scoring** — Every room has a salience score: `
|
|
517
|
+
**Salience scoring** — Every room has a salience score: `recency(0.30) + access(0.25) + connections(0.20) + urgency(0.15) + importance(0.10)`. High-salience rooms surface first. Below threshold → auto-archive.
|
|
473
518
|
|
|
474
519
|
**Compounding awareness** — `awareness.md` is capped at 200 lines. When new insights are added, similar existing ones merge (strengthen), dissimilar ones compete (lowest-confirmation gets replaced). The constraint creates compression. Compression creates compounding.
|
|
475
520
|
|
|
@@ -562,7 +607,9 @@ MIT License.
|
|
|
562
607
|
|
|
563
608
|
# AgentRecall(中文文档)
|
|
564
609
|
|
|
565
|
-
>
|
|
610
|
+
> **你的智能体记不清楚?听不懂你说话?每次项目都做得非常乱?**
|
|
611
|
+
>
|
|
612
|
+
> **AgentRecall 让它学会理解你的思维方式。** 持久复合记忆 + 智能距离协议。MCP 服务器 + SDK + CLI。
|
|
566
613
|
|
|
567
614
|
---
|
|
568
615
|
|
|
@@ -573,11 +620,11 @@ MIT License.
|
|
|
573
620
|
|
|
574
621
|
## `/arsave` 和 `/arstart`
|
|
575
622
|
|
|
576
|
-
>
|
|
623
|
+
> **两个命令,ezpz。**
|
|
577
624
|
|
|
578
625
|
| 命令 | 时机 | 功能 |
|
|
579
626
|
|------|------|------|
|
|
580
|
-
| **`/arsave`** | 会话结束时 | 写入日志 +
|
|
627
|
+
| **`/arsave`** | 会话结束时 | 写入日志 + 整合到记忆宫殿 + 更新感知 + 可选 git 推送 |
|
|
581
628
|
| **`/arstart`** | 会话开始时 | 召回跨项目洞察 + 遍历宫殿 + 加载上下文 |
|
|
582
629
|
|
|
583
630
|
会话结束时输入 `/arsave`,所有内容自动保存。下次开始时输入 `/arstart`,所有上下文自动恢复。
|
|
@@ -633,7 +680,7 @@ curl -o ~/.claude/commands/arstart.md https://raw.githubusercontent.com/Goldentr
|
|
|
633
680
|
├─ 按顺序执行: │
|
|
634
681
|
│ 1. 核心提取 ✓ └─ 2 分钟完成
|
|
635
682
|
│ 2. 工具逻辑拆分 ✓ (没有 AgentRecall
|
|
636
|
-
│ 3. MCP 封装 ✓ 需要
|
|
683
|
+
│ 3. MCP 封装 ✓ 需要 2-8 分钟冷启动)
|
|
637
684
|
│ 4. SDK + CLI ✓
|
|
638
685
|
│
|
|
639
686
|
/arsave
|
|
@@ -648,16 +695,62 @@ curl -o ~/.claude/commands/arstart.md https://raw.githubusercontent.com/Goldentr
|
|
|
648
695
|
|
|
649
696
|
## 为什么选择 AgentRecall
|
|
650
697
|
|
|
651
|
-
|
|
698
|
+
**AgentRecall 不是记忆工具,而是学习循环。**
|
|
652
699
|
|
|
653
|
-
|
|
700
|
+
你的智能体在会话之间不是真的遗忘——它们是记不清楚、分不清主次,甚至听不懂你在说什么。AgentRecall 像人类记忆一样运作:把不重要的东西冬眠起来,但随时可以唤醒。更重要的是,它让智能体越用越懂你。
|
|
654
701
|
|
|
655
|
-
|
|
702
|
+
记忆是机制,理解才是目标。每次你纠正智能体 —— "不要那个版本"、"把这个部分放在最前面"、"做之前先问我" —— 这个纠正会被存储、加权、并在下次自动召回。10 个会话后,你的智能体不只是记住了你的项目,它理解了你的思维方式:你的优先级、你的沟通风格、你的底线。
|
|
703
|
+
|
|
704
|
+
这就是**智能距离协议** —— 不是消除人类与 AI 之间的差距(这个差距是结构性的),而是每次会话都导航得更好。
|
|
705
|
+
|
|
706
|
+
- **你的智能体学会理解你的思维。** 人类本身就是不一致的 —— 我们会从 A 直接跳到 E,跳过 B、C、D。我们会忘记昨天说的话,会在句子中间改变优先级。AgentRecall 捕获每一次纠正,在下一个错误发生之前浮现。你的意图和智能体行为之间的差距,每次会话都在缩小。
|
|
707
|
+
|
|
708
|
+
- **复合感知,而非无限日志。** 记忆上限 200 行。新洞察要么与已有的合并(增强),要么替换最弱的。100 个会话后,感知文件仍然是 200 行 —— 但每一行都承载着经过交叉验证的确认观察。
|
|
656
709
|
|
|
657
710
|
- **跨项目召回。** 在一个项目中学到的教训适用于所有项目。上个月做了限流器?今天在另一个项目构建时,那个教训会自动浮现。
|
|
658
711
|
|
|
712
|
+
- **近乎通用的兼容性。** MCP 服务器支持所有 MCP 兼容智能体(Claude Code、Cursor、Windsurf、VS Code、Codex)。SDK 支持任何 JS/TS 框架(LangChain、CrewAI、Vercel AI SDK、自定义智能体)。CLI 支持终端和 CI 工作流。一套记忆系统,覆盖所有场景。
|
|
713
|
+
|
|
659
714
|
- **零云端,零遥测,全部本地。** 一切都是磁盘上的 markdown。在 Obsidian 中浏览,在终端中 grep,在 git 中版本管理。无需账户、API 密钥或锁定。
|
|
660
715
|
|
|
716
|
+
### 用例一:跳跃式思维的人类
|
|
717
|
+
|
|
718
|
+
一个真实会话,人类在两天项目中给出了非线性、分散的指令:
|
|
719
|
+
|
|
720
|
+
> 人类:"我们需要 SDK、CLI,还有更新 README,哦对了 npm 版本号也错了,一起修"
|
|
721
|
+
|
|
722
|
+
没有 AgentRecall,智能体猜测优先级,遗漏项目。有 AgentRecall:
|
|
723
|
+
|
|
724
|
+
| 智能体已经知道的 | 怎么知道的 |
|
|
725
|
+
|---|---|
|
|
726
|
+
| "这个人沟通是分散的 —— 先结构化成模块再执行" | 3 个先前会话的 `awareness_update` |
|
|
727
|
+
| "模糊时询问,明确时执行" | 上周 `alignment_check` 存储的纠正 |
|
|
728
|
+
| "不要版本膨胀 —— 这个人很在意语义化版本" | 会话中 `nudge` 捕获,立即召回 |
|
|
729
|
+
|
|
730
|
+
结果:智能体呈现结构化的 4 步方案,人类确认,零返工。没有 AgentRecall 的新智能体会猜错版本号、把最重要的功能埋在 README 深处、并且不测试就发布。
|
|
731
|
+
|
|
732
|
+
### 用例二:跨项目经验传递
|
|
733
|
+
|
|
734
|
+
一个工程师构建了带限流的代理服务器(项目 A)。三周后,开始构建 API 网关(项目 B)。
|
|
735
|
+
|
|
736
|
+
```
|
|
737
|
+
在项目 B 运行 /arstart:
|
|
738
|
+
recall_insight:"限流防止成本失控"
|
|
739
|
+
→ 来源:项目 A,确认 3 次,严重性:critical
|
|
740
|
+
→ 适用场景:["api", "proxy", "rate-limit", "cost"]
|
|
741
|
+
→ 项目 A 的教训在项目 B 中自动浮现
|
|
742
|
+
```
|
|
743
|
+
|
|
744
|
+
工程师从未提到限流。AgentRecall 自动匹配项目上下文与全局洞察索引。
|
|
745
|
+
|
|
746
|
+
### 用例三:纠正只发生一次
|
|
747
|
+
|
|
748
|
+
会话 1:智能体把补丁版本设为 4.0.0。人类纠正:"这是版本膨胀,用 3.3.4。"
|
|
749
|
+
|
|
750
|
+
会话 2(第二天,不同的智能体):感知系统已包含"不要版本膨胀 —— 这个人在意保守的版本策略"。新智能体第一次就做对了。
|
|
751
|
+
|
|
752
|
+
没有 AgentRecall,同样的纠正需要一次又一次。有 AgentRecall,**每个纠正只发生一次。**
|
|
753
|
+
|
|
661
754
|
---
|
|
662
755
|
|
|
663
756
|
## 三种使用方式
|
|
@@ -684,11 +777,11 @@ npx agent-recall-cli palace walk --depth active
|
|
|
684
777
|
|
|
685
778
|
## AgentRecall 是什么?
|
|
686
779
|
|
|
687
|
-
|
|
780
|
+
一个**学习系统**,弥合人类思维方式与 AI 智能体工作方式之间的差距。不是日志,不是数据库——是一个复合循环,每一次纠正、决策和洞察都让下一次会话比上一次更好。
|
|
688
781
|
|
|
689
|
-
**问题:** AI
|
|
782
|
+
**问题:** AI 智能体不是真的遗忘——它们是健忘症。记不清楚优先级,分不清主次,教训进入休眠状态,同样的误解重复发生因为没人存储那次纠正。你的意图和智能体行为之间的差距,会话接会话地保持不变。
|
|
690
783
|
|
|
691
|
-
**解决方案:** AgentRecall
|
|
784
|
+
**解决方案:** AgentRecall 将知识存储在五层记忆金字塔中——从快速捕获到跨项目洞察——并通过强制压缩让记忆随时间增值。但更重要的是,它缩小了**智能距离**差距:每一次人类的纠正都被捕获、加权、并在智能体犯同样错误之前被召回。
|
|
692
785
|
|
|
693
786
|
| 没有 AgentRecall | 有 AgentRecall |
|
|
694
787
|
|-----------------|---------------|
|
|
@@ -902,7 +995,7 @@ L5: 洞察索引 recall_insight 「跨项目的经验」
|
|
|
902
995
|
|
|
903
996
|
**扇出写入** — 写入一个房间,相关房间通过 `[[wikilinks]]` 自动更新交叉引用。零 LLM 成本。
|
|
904
997
|
|
|
905
|
-
**显著性评分** —
|
|
998
|
+
**显著性评分** — `时效性(0.30) + 访问频率(0.25) + 连接数(0.20) + 紧迫性(0.15) + 重要性(0.10)`。高显著性房间优先展示,低于阈值自动归档。
|
|
906
999
|
|
|
907
1000
|
**复合感知** — `awareness.md` 上限 200 行。新洞察与相似的合并(增强),与不相似的竞争(最低确认次数的被替换)。约束创造压缩,压缩创造复合。
|
|
908
1001
|
|
package/dist/index.js
CHANGED
|
@@ -2,40 +2,54 @@
|
|
|
2
2
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
3
|
import { VERSION, getRoot, getLegacyRoot } from "agent-recall-core";
|
|
4
4
|
import { server } from "./server.js";
|
|
5
|
-
//
|
|
6
|
-
import { register as
|
|
7
|
-
import { register as
|
|
8
|
-
import { register as
|
|
9
|
-
import { register as
|
|
10
|
-
import { register as
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import { register as registerJournalColdStart } from "./tools/journal-cold-start.js";
|
|
14
|
-
import { register as
|
|
15
|
-
import { register as
|
|
16
|
-
|
|
17
|
-
import { register as
|
|
18
|
-
import { register as
|
|
19
|
-
import { register as
|
|
20
|
-
import { register as
|
|
21
|
-
import { register as
|
|
22
|
-
|
|
23
|
-
import { register as
|
|
24
|
-
import { register as
|
|
25
|
-
import { register as
|
|
26
|
-
|
|
27
|
-
import { register as
|
|
5
|
+
// ── v3.4 primary tools (5-tool surface) ──────────────────────────────────
|
|
6
|
+
import { register as registerSessionStart } from "./tools/session-start.js";
|
|
7
|
+
import { register as registerRemember } from "./tools/remember.js";
|
|
8
|
+
import { register as registerRecall } from "./tools/recall.js";
|
|
9
|
+
import { register as registerSessionEnd } from "./tools/session-end.js";
|
|
10
|
+
import { register as registerCheck } from "./tools/check.js";
|
|
11
|
+
// ── Legacy tools (still importable for SDK/CLI, not registered by default) ──
|
|
12
|
+
// DEPRECATED v3.4: use session_start instead
|
|
13
|
+
// import { register as registerJournalColdStart } from "./tools/journal-cold-start.js";
|
|
14
|
+
// import { register as registerPalaceWalk } from "./tools/palace-walk.js";
|
|
15
|
+
// import { register as registerRecallInsight } from "./tools/recall-insight.js";
|
|
16
|
+
// DEPRECATED v3.4: use remember instead
|
|
17
|
+
// import { register as registerSmartRemember } from "./tools/smart-remember.js";
|
|
18
|
+
// import { register as registerJournalCapture } from "./tools/journal-capture.js";
|
|
19
|
+
// import { register as registerJournalWrite } from "./tools/journal-write.js";
|
|
20
|
+
// import { register as registerKnowledgeWrite } from "./tools/knowledge-write.js";
|
|
21
|
+
// import { register as registerPalaceWrite } from "./tools/palace-write.js";
|
|
22
|
+
// DEPRECATED v3.4: use recall instead
|
|
23
|
+
// import { register as registerSmartRecall } from "./tools/smart-recall.js";
|
|
24
|
+
// import { register as registerPalaceSearch } from "./tools/palace-search.js";
|
|
25
|
+
// import { register as registerJournalSearch } from "./tools/journal-search.js";
|
|
26
|
+
// DEPRECATED v3.4: use session_end instead
|
|
27
|
+
// import { register as registerAwarenessUpdate } from "./tools/awareness-update.js";
|
|
28
|
+
// import { register as registerContextSynthesize } from "./tools/context-synthesize.js";
|
|
29
|
+
// DEPRECATED v3.4: use check instead
|
|
30
|
+
// import { register as registerAlignmentCheck } from "./tools/alignment-check.js";
|
|
31
|
+
// DEPRECATED v3.4: low utilization, available via SDK
|
|
32
|
+
// import { register as registerJournalRead } from "./tools/journal-read.js";
|
|
33
|
+
// import { register as registerJournalList } from "./tools/journal-list.js";
|
|
34
|
+
// import { register as registerJournalProjects } from "./tools/journal-projects.js";
|
|
35
|
+
// import { register as registerJournalState } from "./tools/journal-state.js";
|
|
36
|
+
// import { register as registerJournalArchive } from "./tools/journal-archive.js";
|
|
37
|
+
// import { register as registerJournalRollup } from "./tools/journal-rollup.js";
|
|
38
|
+
// import { register as registerNudge } from "./tools/nudge.js";
|
|
39
|
+
// import { register as registerKnowledgeRead } from "./tools/knowledge-read.js";
|
|
40
|
+
// import { register as registerPalaceRead } from "./tools/palace-read.js";
|
|
41
|
+
// import { register as registerPalaceLint } from "./tools/palace-lint.js";
|
|
28
42
|
import { register as registerJournalResources } from "./resources/journal-resources.js";
|
|
29
43
|
const args = process.argv.slice(2);
|
|
30
44
|
if (args.includes("--help") || args.includes("-h")) {
|
|
31
45
|
process.stdout.write(`agent-recall-mcp v${VERSION}
|
|
32
46
|
|
|
33
|
-
|
|
47
|
+
AI agent memory — session context, persistent memory, cross-project insights.
|
|
34
48
|
|
|
35
49
|
Usage:
|
|
36
|
-
npx agent-recall-mcp
|
|
37
|
-
npx agent-recall-mcp --help
|
|
38
|
-
npx agent-recall-mcp --list-tools
|
|
50
|
+
npx agent-recall-mcp Start the MCP server (stdio transport)
|
|
51
|
+
npx agent-recall-mcp --help Show this help
|
|
52
|
+
npx agent-recall-mcp --list-tools List available MCP tools
|
|
39
53
|
|
|
40
54
|
Storage: ${getRoot()}
|
|
41
55
|
Legacy: ${getLegacyRoot()}
|
|
@@ -46,54 +60,21 @@ All data stays local. No cloud, no telemetry.
|
|
|
46
60
|
}
|
|
47
61
|
if (args.includes("--list-tools")) {
|
|
48
62
|
const tools = [
|
|
49
|
-
{ name: "
|
|
50
|
-
{ name: "
|
|
51
|
-
{ name: "
|
|
52
|
-
{ name: "
|
|
53
|
-
{ name: "
|
|
54
|
-
{ name: "journal_search", description: "Full-text search across journals" },
|
|
55
|
-
{ name: "alignment_check", description: "Record confidence + understanding + human corrections" },
|
|
56
|
-
{ name: "nudge", description: "Surface contradiction between current and past input" },
|
|
57
|
-
{ name: "context_synthesize", description: "L3 synthesis: patterns, contradictions, goal evolution" },
|
|
58
|
-
{ name: "journal_state", description: "Layer 1 JSON state: read/write structured session data (v3)" },
|
|
59
|
-
{ name: "journal_cold_start", description: "Cache-aware cold start: hot/warm/cold entries (v3)" },
|
|
60
|
-
{ name: "journal_archive", description: "Archive old entries to cold storage (v3)" },
|
|
61
|
-
{ name: "journal_rollup", description: "Condense old daily journals into weekly summaries (v3.4)" },
|
|
62
|
-
{ name: "knowledge_write", description: "Write a structured lesson to a category-specific knowledge file" },
|
|
63
|
-
{ name: "knowledge_read", description: "Read lessons from knowledge files, optionally filtered by project/category/query" },
|
|
64
|
-
{ name: "palace_read", description: "Read a room or list all rooms in the Memory Palace" },
|
|
65
|
-
{ name: "palace_write", description: "Write memory to a palace room with fan-out cross-referencing" },
|
|
66
|
-
{ name: "palace_walk", description: "Progressive context loading: identity → active → relevant → full" },
|
|
67
|
-
{ name: "palace_lint", description: "Health check: stale, orphans, low salience, missing refs" },
|
|
68
|
-
{ name: "palace_search", description: "Search across palace rooms, ranked by salience" },
|
|
69
|
-
{ name: "awareness_update", description: "Update awareness with new insights (call at session end)" },
|
|
70
|
-
{ name: "recall_insight", description: "Recall cross-project insights relevant to current task" },
|
|
63
|
+
{ name: "session_start", description: "Load project context for a new session" },
|
|
64
|
+
{ name: "remember", description: "Save a memory — auto-routes to the right store" },
|
|
65
|
+
{ name: "recall", description: "Search all memory stores, return ranked results" },
|
|
66
|
+
{ name: "session_end", description: "Save session summary, insights, and trajectory" },
|
|
67
|
+
{ name: "check", description: "Record understanding, get predictive warnings from past corrections" },
|
|
71
68
|
];
|
|
72
69
|
process.stdout.write(JSON.stringify(tools, null, 2) + "\n");
|
|
73
70
|
process.exit(0);
|
|
74
71
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
registerJournalState(server);
|
|
82
|
-
registerJournalColdStart(server);
|
|
83
|
-
registerJournalArchive(server);
|
|
84
|
-
registerJournalRollup(server);
|
|
85
|
-
registerAlignmentCheck(server);
|
|
86
|
-
registerNudge(server);
|
|
87
|
-
registerContextSynthesize(server);
|
|
88
|
-
registerKnowledgeWrite(server);
|
|
89
|
-
registerKnowledgeRead(server);
|
|
90
|
-
registerPalaceRead(server);
|
|
91
|
-
registerPalaceWrite(server);
|
|
92
|
-
registerPalaceWalk(server);
|
|
93
|
-
registerPalaceLint(server);
|
|
94
|
-
registerPalaceSearch(server);
|
|
95
|
-
registerAwarenessUpdate(server);
|
|
96
|
-
registerRecallInsight(server);
|
|
72
|
+
// Register only the 5 primary tools
|
|
73
|
+
registerSessionStart(server);
|
|
74
|
+
registerRemember(server);
|
|
75
|
+
registerRecall(server);
|
|
76
|
+
registerSessionEnd(server);
|
|
77
|
+
registerCheck(server);
|
|
97
78
|
registerJournalResources(server);
|
|
98
79
|
async function main() {
|
|
99
80
|
const transport = new StdioServerTransport();
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/tools/check.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAgBhD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { check } from "agent-recall-core";
|
|
3
|
+
export function register(server) {
|
|
4
|
+
server.registerTool("check", {
|
|
5
|
+
title: "Check Understanding",
|
|
6
|
+
description: "Record what you think the human wants. Returns predictive warnings based on past correction patterns.",
|
|
7
|
+
inputSchema: {
|
|
8
|
+
goal: z.string().describe("What you think the human wants."),
|
|
9
|
+
confidence: z.enum(["high", "medium", "low"]),
|
|
10
|
+
assumptions: z.array(z.string()).optional().describe("Key assumptions you're making."),
|
|
11
|
+
human_correction: z.string().optional().describe("After human responds: what they actually wanted (or 'confirmed')."),
|
|
12
|
+
delta: z.string().optional().describe("The gap between your understanding and reality (or 'none')."),
|
|
13
|
+
project: z.string().default("auto"),
|
|
14
|
+
},
|
|
15
|
+
}, async ({ goal, confidence, assumptions, human_correction, delta, project }) => {
|
|
16
|
+
const result = await check({ goal, confidence, assumptions, human_correction, delta, project });
|
|
17
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/tools/check.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,MAAM,UAAU,QAAQ,CAAC,MAAiB;IACxC,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE;QAC3B,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,uGAAuG;QACpH,WAAW,EAAE;YACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;YAC5D,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;YAC7C,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;YACtF,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mEAAmE,CAAC;YACrH,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6DAA6D,CAAC;YACpG,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;SACpC;KACF,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE;QAC/E,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;QAChG,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;IAChF,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"palace-write.d.ts","sourceRoot":"","sources":["../../src/tools/palace-write.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"palace-write.d.ts","sourceRoot":"","sources":["../../src/tools/palace-write.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAmBhD"}
|
|
@@ -11,10 +11,11 @@ export function register(server) {
|
|
|
11
11
|
content: z.string().describe("Markdown content to write. Use [[room/topic]] for cross-references."),
|
|
12
12
|
connections: z.array(z.string()).optional().describe("Explicit room connections (e.g., ['goals', 'blockers'])"),
|
|
13
13
|
importance: z.enum(["high", "medium", "low"]).default("medium").describe("Memory importance for salience scoring"),
|
|
14
|
+
auto_name: z.boolean().default(false).describe("Auto-generate topic name from content when topic is omitted. Default false for backward compat."),
|
|
14
15
|
project: z.string().default("auto"),
|
|
15
16
|
},
|
|
16
|
-
}, async ({ room, topic, content, connections, importance, project }) => {
|
|
17
|
-
const result = await palaceWrite({ room, topic, content, connections, importance, project });
|
|
17
|
+
}, async ({ room, topic, content, connections, importance, auto_name, project }) => {
|
|
18
|
+
const result = await palaceWrite({ room, topic, content, connections, importance, auto_name, project });
|
|
18
19
|
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
19
20
|
});
|
|
20
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"palace-write.js","sourceRoot":"","sources":["../../src/tools/palace-write.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,UAAU,QAAQ,CAAC,MAAiB;IACxC,MAAM,CAAC,YAAY,CAAC,cAAc,EAAE;QAClC,KAAK,EAAE,sBAAsB;QAC7B,WAAW,EACT,sGAAsG;YACtG,mFAAmF;QACrF,WAAW,EAAE;YACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kFAAkF,CAAC;YAC7G,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2EAA2E,CAAC;YAClH,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qEAAqE,CAAC;YACnG,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yDAAyD,CAAC;YAC/G,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,wCAAwC,CAAC;YAClH,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;SACpC;KACF,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"palace-write.js","sourceRoot":"","sources":["../../src/tools/palace-write.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,UAAU,QAAQ,CAAC,MAAiB;IACxC,MAAM,CAAC,YAAY,CAAC,cAAc,EAAE;QAClC,KAAK,EAAE,sBAAsB;QAC7B,WAAW,EACT,sGAAsG;YACtG,mFAAmF;QACrF,WAAW,EAAE;YACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kFAAkF,CAAC;YAC7G,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2EAA2E,CAAC;YAClH,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qEAAqE,CAAC;YACnG,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yDAAyD,CAAC;YAC/G,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,wCAAwC,CAAC;YAClH,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,iGAAiG,CAAC;YACjJ,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;SACpC;KACF,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE;QACjF,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;QACxG,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;IAChF,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recall.d.ts","sourceRoot":"","sources":["../../src/tools/recall.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAkBhD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { smartRecall } from "agent-recall-core";
|
|
3
|
+
export function register(server) {
|
|
4
|
+
server.registerTool("recall", {
|
|
5
|
+
title: "Recall",
|
|
6
|
+
description: "Search all memory stores at once. Returns ranked results from palace, journal, and insights.",
|
|
7
|
+
inputSchema: {
|
|
8
|
+
query: z.string().describe("What to search for."),
|
|
9
|
+
project: z.string().default("auto"),
|
|
10
|
+
limit: z.number().int().default(10).describe("Max results."),
|
|
11
|
+
feedback: z.array(z.object({
|
|
12
|
+
id: z.string().optional().describe("Result ID from previous recall (preferred)."),
|
|
13
|
+
title: z.string().optional().describe("Result title (fallback if no ID)."),
|
|
14
|
+
useful: z.boolean(),
|
|
15
|
+
})).optional().describe("Rate previous results: was each result useful?"),
|
|
16
|
+
},
|
|
17
|
+
}, async ({ query, project, limit, feedback }) => {
|
|
18
|
+
const result = await smartRecall({ query, project, limit, feedback });
|
|
19
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=recall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recall.js","sourceRoot":"","sources":["../../src/tools/recall.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,UAAU,QAAQ,CAAC,MAAiB;IACxC,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE;QAC5B,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,8FAA8F;QAC3G,WAAW,EAAE;YACX,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;YACjD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;YACnC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC;YAC5D,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;gBACzB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;gBACjF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;gBAC1E,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE;aACpB,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gDAAgD,CAAC;SAC1E;KACF,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC/C,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;QACtE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;IAChF,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remember.d.ts","sourceRoot":"","sources":["../../src/tools/remember.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAahD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { smartRemember } from "agent-recall-core";
|
|
3
|
+
export function register(server) {
|
|
4
|
+
server.registerTool("remember", {
|
|
5
|
+
title: "Remember",
|
|
6
|
+
description: "Save a memory. Auto-classifies and routes to the right store (journal, palace, knowledge, or awareness).",
|
|
7
|
+
inputSchema: {
|
|
8
|
+
content: z.string().describe("What to remember."),
|
|
9
|
+
context: z.string().optional().describe("Optional hint: 'bug fix', 'architecture', 'insight', 'session note'"),
|
|
10
|
+
project: z.string().default("auto"),
|
|
11
|
+
},
|
|
12
|
+
}, async ({ content, context, project }) => {
|
|
13
|
+
const result = await smartRemember({ content, context, project });
|
|
14
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=remember.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remember.js","sourceRoot":"","sources":["../../src/tools/remember.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,UAAU,QAAQ,CAAC,MAAiB;IACxC,MAAM,CAAC,YAAY,CAAC,UAAU,EAAE;QAC9B,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,0GAA0G;QACvH,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;YACjD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qEAAqE,CAAC;YAC9G,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;SACpC;KACF,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;QACzC,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;QAClE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;IAChF,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-end.d.ts","sourceRoot":"","sources":["../../src/tools/session-end.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAmBhD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { sessionEnd } from "agent-recall-core";
|
|
3
|
+
export function register(server) {
|
|
4
|
+
server.registerTool("session_end", {
|
|
5
|
+
title: "End Session",
|
|
6
|
+
description: "Save session summary, insights, and trajectory. Writes journal, updates awareness, consolidates to palace.",
|
|
7
|
+
inputSchema: {
|
|
8
|
+
summary: z.string().describe("What happened this session (1-3 sentences)."),
|
|
9
|
+
insights: z.array(z.object({
|
|
10
|
+
title: z.string(),
|
|
11
|
+
evidence: z.string(),
|
|
12
|
+
applies_when: z.array(z.string()),
|
|
13
|
+
severity: z.enum(["critical", "important", "minor"]).default("important"),
|
|
14
|
+
})).optional().describe("Insights learned this session."),
|
|
15
|
+
trajectory: z.string().optional().describe("Where is the work heading next."),
|
|
16
|
+
project: z.string().default("auto"),
|
|
17
|
+
},
|
|
18
|
+
}, async ({ summary, insights, trajectory, project }) => {
|
|
19
|
+
const result = await sessionEnd({ summary, insights, trajectory, project });
|
|
20
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=session-end.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-end.js","sourceRoot":"","sources":["../../src/tools/session-end.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,UAAU,QAAQ,CAAC,MAAiB;IACxC,MAAM,CAAC,YAAY,CAAC,aAAa,EAAE;QACjC,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,4GAA4G;QACzH,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;YAC3E,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;gBACzB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;gBACjB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;gBACpB,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;gBACjC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;aAC1E,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;YACzD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;YAC7E,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;SACpC;KACF,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,EAAE;QACtD,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;QAC5E,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;IAChF,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-start.d.ts","sourceRoot":"","sources":["../../src/tools/session-start.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAYhD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { sessionStart } from "agent-recall-core";
|
|
3
|
+
export function register(server) {
|
|
4
|
+
server.registerTool("session_start", {
|
|
5
|
+
title: "Start Session",
|
|
6
|
+
description: "Load project context for a new session. Returns identity, insights, active rooms, and recent activity in one call.",
|
|
7
|
+
inputSchema: {
|
|
8
|
+
project: z.string().default("auto"),
|
|
9
|
+
context: z.string().optional().describe("Optional context for matching cross-project insights"),
|
|
10
|
+
},
|
|
11
|
+
}, async ({ project, context }) => {
|
|
12
|
+
const result = await sessionStart({ project, context });
|
|
13
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=session-start.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-start.js","sourceRoot":"","sources":["../../src/tools/session-start.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,UAAU,QAAQ,CAAC,MAAiB;IACxC,MAAM,CAAC,YAAY,CAAC,eAAe,EAAE;QACnC,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,oHAAoH;QACjI,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;YACnC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sDAAsD,CAAC;SAChG;KACF,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;QACxD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;IAChF,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smart-recall.d.ts","sourceRoot":"","sources":["../../src/tools/smart-recall.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAgBhD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { smartRecall } from "agent-recall-core";
|
|
3
|
+
export function register(server) {
|
|
4
|
+
server.registerTool("smart_recall", {
|
|
5
|
+
title: "Smart Recall",
|
|
6
|
+
description: "Search ALL memory stores at once — palace, journal, and insights. " +
|
|
7
|
+
"Returns unified ranked results with source attribution. " +
|
|
8
|
+
"Use when you want to find something but don't know which store it's in.",
|
|
9
|
+
inputSchema: {
|
|
10
|
+
query: z.string().describe("What you're looking for. Natural language or keywords."),
|
|
11
|
+
project: z.string().default("auto").describe("Project slug. Defaults to auto-detect."),
|
|
12
|
+
limit: z.number().int().default(10).describe("Maximum results to return."),
|
|
13
|
+
},
|
|
14
|
+
}, async ({ query, project, limit }) => {
|
|
15
|
+
const result = await smartRecall({ query, project, limit });
|
|
16
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=smart-recall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smart-recall.js","sourceRoot":"","sources":["../../src/tools/smart-recall.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,UAAU,QAAQ,CAAC,MAAiB;IACxC,MAAM,CAAC,YAAY,CAAC,cAAc,EAAE;QAClC,KAAK,EAAE,cAAc;QACrB,WAAW,EACT,oEAAoE;YACpE,0DAA0D;YAC1D,yEAAyE;QAC3E,WAAW,EAAE;YACX,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wDAAwD,CAAC;YACpF,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,wCAAwC,CAAC;YACtF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,4BAA4B,CAAC;SAC3E;KACF,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;QACrC,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;QAC5D,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;IAChF,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smart-remember.d.ts","sourceRoot":"","sources":["../../src/tools/smart-remember.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAgBhD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { smartRemember } from "agent-recall-core";
|
|
3
|
+
export function register(server) {
|
|
4
|
+
server.registerTool("smart_remember", {
|
|
5
|
+
title: "Smart Remember",
|
|
6
|
+
description: "Save a memory — the system classifies your content and routes it to the right store " +
|
|
7
|
+
"(journal, palace, knowledge, or awareness). Just describe what you want to remember. " +
|
|
8
|
+
"Auto-generates a semantic name for future retrieval.",
|
|
9
|
+
inputSchema: {
|
|
10
|
+
content: z.string().describe("What you want to remember. Can be any length or format."),
|
|
11
|
+
context: z.string().optional().describe("Optional hint: 'bug fix', 'architecture decision', 'insight', 'session note'"),
|
|
12
|
+
project: z.string().default("auto").describe("Project slug. Defaults to auto-detect."),
|
|
13
|
+
},
|
|
14
|
+
}, async ({ content, context, project }) => {
|
|
15
|
+
const result = await smartRemember({ content, context, project });
|
|
16
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=smart-remember.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smart-remember.js","sourceRoot":"","sources":["../../src/tools/smart-remember.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,UAAU,QAAQ,CAAC,MAAiB;IACxC,MAAM,CAAC,YAAY,CAAC,gBAAgB,EAAE;QACpC,KAAK,EAAE,gBAAgB;QACvB,WAAW,EACT,sFAAsF;YACtF,uFAAuF;YACvF,sDAAsD;QACxD,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yDAAyD,CAAC;YACvF,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8EAA8E,CAAC;YACvH,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,wCAAwC,CAAC;SACvF;KACF,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;QACzC,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;QAClE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;IAChF,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-recall-mcp",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.11",
|
|
4
4
|
"description": "Memory Palace MCP server for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"test": "node --test test/*.test.mjs"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"agent-recall-core": "^3.3.
|
|
14
|
+
"agent-recall-core": "^3.3.11",
|
|
15
15
|
"@modelcontextprotocol/sdk": "^1.28.0",
|
|
16
16
|
"zod": "^3.24.0"
|
|
17
17
|
},
|