agent-recall-mcp 3.4.38 → 3.4.40
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 +1 -1
- package/dist/index.js +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +5 -2
- package/dist/server.js.map +1 -1
- package/dist/tools/check.d.ts.map +1 -1
- package/dist/tools/check.js +4 -3
- package/dist/tools/check.js.map +1 -1
- package/package.json +4 -4
- package/dist/tools/bootstrap.d.ts +0 -3
- package/dist/tools/bootstrap.d.ts.map +0 -1
- package/dist/tools/bootstrap.js +0 -148
- package/dist/tools/bootstrap.js.map +0 -1
- package/dist/tools/brief.d.ts +0 -18
- package/dist/tools/brief.d.ts.map +0 -1
- package/dist/tools/brief.js +0 -78
- package/dist/tools/brief.js.map +0 -1
- package/dist/tools/dashboard-export.d.ts +0 -3
- package/dist/tools/dashboard-export.d.ts.map +0 -1
- package/dist/tools/dashboard-export.js +0 -19
- package/dist/tools/dashboard-export.js.map +0 -1
- package/dist/tools/memory-query.d.ts +0 -3
- package/dist/tools/memory-query.d.ts.map +0 -1
- package/dist/tools/memory-query.js +0 -66
- package/dist/tools/memory-query.js.map +0 -1
- package/dist/tools/project-board.d.ts +0 -3
- package/dist/tools/project-board.d.ts.map +0 -1
- package/dist/tools/project-board.js +0 -22
- package/dist/tools/project-board.js.map +0 -1
- package/dist/tools/project-status.d.ts +0 -3
- package/dist/tools/project-status.d.ts.map +0 -1
- package/dist/tools/project-status.js +0 -15
- package/dist/tools/project-status.js.map +0 -1
- package/dist/tools/session-end-reflect.d.ts +0 -3
- package/dist/tools/session-end-reflect.d.ts.map +0 -1
- package/dist/tools/session-end-reflect.js +0 -25
- package/dist/tools/session-end-reflect.js.map +0 -1
- package/dist/tools/skill-list.d.ts +0 -3
- package/dist/tools/skill-list.d.ts.map +0 -1
- package/dist/tools/skill-list.js +0 -16
- package/dist/tools/skill-list.js.map +0 -1
- package/dist/tools/skill-recall.d.ts +0 -3
- package/dist/tools/skill-recall.d.ts.map +0 -1
- package/dist/tools/skill-recall.js +0 -20
- package/dist/tools/skill-recall.js.map +0 -1
- package/dist/tools/skill-write.d.ts +0 -3
- package/dist/tools/skill-write.d.ts.map +0 -1
- package/dist/tools/skill-write.js +0 -31
- package/dist/tools/skill-write.js.map +0 -1
package/README.md
CHANGED
|
@@ -273,7 +273,7 @@ This is the recommended onboarding for Hermes / OpenClaw / OpenCode users too
|
|
|
273
273
|
|
|
274
274
|
TypeScript monorepo, 4 published packages: `core` (storage + tool logic), `mcp-server` (thin MCP wrappers), `sdk` (programmatic API), `cli` (the `ar` command). All memory is local markdown under `~/.agent-recall/projects/<slug>/` — `journal/`, `corrections/`, and `palace/` (rooms, skills, pipeline, awareness). An optional Supabase mirror adds pgvector semantic recall; all-local stays the default.
|
|
275
275
|
|
|
276
|
-
Retrieval: keyword + RRF (Cormack 2009). FSRS-lite decay (Ebbinghaus → SuperMemo → FSRS-6). A Modern Hopfield re-rank primitive (Ramsauer 2020) is in the codebase but not wired into the default path — what runs today is
|
|
276
|
+
Retrieval: keyword + RRF (Cormack 2009). FSRS-lite decay (Ebbinghaus → SuperMemo → FSRS-6). A Modern Hopfield re-rank primitive (Ramsauer 2020) is in the codebase but not wired into the default path — what runs today is local keyword/substring matching (stemming + synonym expansion + lightweight IDF, per-source ranking) merged via RRF, plus optional vector search when `OPENAI_API_KEY` is set. No inverted index or BM25 k1/b tuning — a real BM25 index is a possible future upgrade, not what's running now.
|
|
277
277
|
|
|
278
278
|
## Platform Compatibility
|
|
279
279
|
|
package/dist/index.js
CHANGED
|
@@ -88,7 +88,7 @@ Default tools (5):
|
|
|
88
88
|
session_start [ENTRY — call FIRST, before acting] Load project context at session start — corrections, insights, warnings
|
|
89
89
|
session_end [ON SAVE/EXIT — YOU must call this; nothing auto-saves] Save journal, insights, trajectory — compounds memory over time
|
|
90
90
|
remember [MID-SESSION WRITE — single fact/decision; saying it is not saving it] Write a memory — auto-routes to the right store
|
|
91
|
-
recall [RETRIEVE — use freely, any time] Search all memory —
|
|
91
|
+
recall [RETRIEVE — use freely, any time] Search all memory — keyword/RRF fusion + optional vector (OpenAI key)
|
|
92
92
|
check [MID-SESSION — safe any time; for alignment, before risky decisions] Record understanding; anticipates the likely correction before you make it
|
|
93
93
|
|
|
94
94
|
Full-mode additions (--full):
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAOpE,eAAO,MAAM,MAAM,WAGlB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,OAAO,MAAM,CAAC"}
|
package/dist/server.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
-
import { VERSION } from "agent-recall-core";
|
|
3
|
-
|
|
2
|
+
import { VERSION, resolveHostProfile, lifecycleInstructions } from "agent-recall-core";
|
|
3
|
+
// Lifecycle instructions are tier-specific (see agent-recall-core/host-profile.ts)
|
|
4
|
+
// but always derived from the single canonical source — never hardcoded here.
|
|
5
|
+
const { tier } = resolveHostProfile();
|
|
6
|
+
export const server = new McpServer({ name: "agent-recall", version: VERSION, description: "AgentRecall — persistent memory for AI agents. Community & feedback: https://t.me/+ywZwoHrg3AM0NDVi" }, { instructions: lifecycleInstructions(tier) });
|
|
4
7
|
//# sourceMappingURL=server.js.map
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAEvF,mFAAmF;AACnF,8EAA8E;AAC9E,MAAM,EAAE,IAAI,EAAE,GAAG,kBAAkB,EAAE,CAAC;AAEtC,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,SAAS,CACjC,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,qGAAqG,EAAE,EAC9J,EAAE,YAAY,EAAE,qBAAqB,CAAC,IAAI,CAAC,EAAE,CAC9C,CAAC"}
|
|
@@ -1 +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,
|
|
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,CAsChD"}
|
package/dist/tools/check.js
CHANGED
|
@@ -3,7 +3,7 @@ import { check } from "agent-recall-core";
|
|
|
3
3
|
export function register(server) {
|
|
4
4
|
server.registerTool("check", {
|
|
5
5
|
title: "Check Understanding",
|
|
6
|
-
description: "[MID-SESSION — safe any time; for alignment, before risky decisions] Use when the user asks to validate understanding, verify alignment, or check if their interpretation matches the human's intent.",
|
|
6
|
+
description: "[MID-SESSION — safe any time; for alignment, before risky decisions] Use when the user asks to validate understanding, verify alignment, or check if their interpretation matches the human's intent. Also call BEFORE a high-risk action — publish, deploy, delete, credential exposure, external send/message, or any other irreversible write — passing `action_description` (one sentence, what you're about to do). Returns matching corrections/rules/insights plus a `verdict`: `blocked` means an authoritative correction OVERRIDES the plan — read it before proceeding.",
|
|
7
7
|
inputSchema: {
|
|
8
8
|
goal: z.string().optional().describe("The goal or decision question you're checking alignment on. Required for alignment checks; optional when recording a pure decision trail (prior/posterior/evidence)."),
|
|
9
9
|
understanding: z.string().optional().describe("Alias for goal — use when saying 'check my understanding: X'. Provide either goal or understanding."),
|
|
@@ -21,14 +21,15 @@ export function register(server) {
|
|
|
21
21
|
posterior: z.number().min(0).max(1).optional().describe("Updated probability after considering evidence (0-1)."),
|
|
22
22
|
outcome: z.string().optional().describe("Final decision result: 'confirmed', 'rejected', 'partial', or free text. Triggers decision trail persistence."),
|
|
23
23
|
decision_id: z.string().optional().describe("Link multiple check calls to the same decision. Auto-generated if not provided."),
|
|
24
|
+
action_description: z.string().max(500).optional().describe("What you're about to DO, one sentence — pass this before publish/deploy/delete/credential/external-send/irreversible-write actions. Returns matching corrections/rules/insights on the result's `action_check` field, with `verdict: \"blocked\"` when an authoritative correction overrides the plan."),
|
|
24
25
|
},
|
|
25
|
-
}, async ({ goal, understanding, confidence, assumptions, human_correction, delta, project, prior, evidence, posterior, outcome, decision_id }) => {
|
|
26
|
+
}, async ({ goal, understanding, confidence, assumptions, human_correction, delta, project, prior, evidence, posterior, outcome, decision_id, action_description }) => {
|
|
26
27
|
const effectiveGoal = goal || understanding;
|
|
27
28
|
if (!effectiveGoal && !prior) {
|
|
28
29
|
return { content: [{ type: "text", text: JSON.stringify({ error: "Provide either goal/understanding (for alignment check) or prior+posterior+evidence (for decision trail)" }) }], isError: true };
|
|
29
30
|
}
|
|
30
31
|
try {
|
|
31
|
-
const result = await check({ goal: effectiveGoal, confidence, assumptions, human_correction, delta, project, prior, evidence, posterior, outcome, decision_id });
|
|
32
|
+
const result = await check({ goal: effectiveGoal, confidence, assumptions, human_correction, delta, project, prior, evidence, posterior, outcome, decision_id, action_description });
|
|
32
33
|
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
33
34
|
}
|
|
34
35
|
catch (err) {
|
package/dist/tools/check.js.map
CHANGED
|
@@ -1 +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,
|
|
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,ojBAAojB;QACjkB,WAAW,EAAE;YACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sKAAsK,CAAC;YAC5M,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qGAAqG,CAAC;YACpJ,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,4CAA4C,CAAC;YACtH,WAAW,EAAE,CAAC,CAAC,KAAK,C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EAAE,IAAI,EAAE,iBAAiB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;gBAC/G,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-recall-mcp",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.40",
|
|
4
4
|
"mcpName": "io.github.Goldentrii/agent-recall",
|
|
5
5
|
"description": "Memory Palace MCP server for AI agents",
|
|
6
6
|
"type": "module",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"test": "node --test test/*.test.mjs"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"agent-recall-core": "3.4.
|
|
20
|
+
"agent-recall-core": "3.4.40",
|
|
21
21
|
"@modelcontextprotocol/sdk": "^1.28.0",
|
|
22
22
|
"zod": "^3.24.0"
|
|
23
23
|
},
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"license": "MIT",
|
|
61
61
|
"repository": {
|
|
62
62
|
"type": "git",
|
|
63
|
-
"url": "git+https://github.com/Goldentrii/AgentRecall-
|
|
63
|
+
"url": "git+https://github.com/Goldentrii/AgentRecall-X.git",
|
|
64
64
|
"directory": "packages/mcp-server"
|
|
65
65
|
},
|
|
66
|
-
"homepage": "https://github.com/Goldentrii/AgentRecall-
|
|
66
|
+
"homepage": "https://github.com/Goldentrii/AgentRecall-X#readme"
|
|
67
67
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../src/tools/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAwDzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAwGhD"}
|
package/dist/tools/bootstrap.js
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import { bootstrapScan, bootstrapImport, } from "agent-recall-core";
|
|
3
|
-
// ---------------------------------------------------------------------------
|
|
4
|
-
// GUARD 3 — strict scan_result schema for bootstrap_import
|
|
5
|
-
//
|
|
6
|
-
// inputSchema (line ~101) intentionally uses z.union([z.string(), z.record(...)]).
|
|
7
|
-
// This is a loose outer shape (accepts string or object) so the MCP transport
|
|
8
|
-
// can carry either form. The REAL structural validation happens at the handler
|
|
9
|
-
// level (~line 121) via BootstrapScanResultSchema.safeParse() — that is where
|
|
10
|
-
// the nonce + shape are enforced. The handler then calls bootstrapImport() which
|
|
11
|
-
// validates the nonce cryptographically against the in-process VALID_NONCES
|
|
12
|
-
// registry (core layer enforces security semantics; MCP layer handles transport).
|
|
13
|
-
// ---------------------------------------------------------------------------
|
|
14
|
-
const ImportableItemSchema = z.object({
|
|
15
|
-
id: z.string(),
|
|
16
|
-
type: z.enum(["identity", "memory", "architecture", "trajectory"]),
|
|
17
|
-
source_path: z.string(),
|
|
18
|
-
size_bytes: z.number(),
|
|
19
|
-
preview: z.string(),
|
|
20
|
-
});
|
|
21
|
-
const DiscoveredProjectSchema = z.object({
|
|
22
|
-
slug: z.string(),
|
|
23
|
-
name: z.string(),
|
|
24
|
-
path: z.string(),
|
|
25
|
-
sources: z.array(z.object({
|
|
26
|
-
type: z.enum(["git", "claude-memory", "claudemd", "package-json"]),
|
|
27
|
-
path: z.string(),
|
|
28
|
-
detail: z.string(),
|
|
29
|
-
})),
|
|
30
|
-
description: z.string().optional(),
|
|
31
|
-
language: z.string().optional(),
|
|
32
|
-
last_activity: z.string().optional(),
|
|
33
|
-
already_in_ar: z.boolean(),
|
|
34
|
-
importable_items: z.array(ImportableItemSchema),
|
|
35
|
-
});
|
|
36
|
-
const BootstrapScanResultSchema = z.object({
|
|
37
|
-
projects: z.array(DiscoveredProjectSchema),
|
|
38
|
-
global_items: z.array(ImportableItemSchema),
|
|
39
|
-
stats: z.object({
|
|
40
|
-
total_projects: z.number(),
|
|
41
|
-
total_importable_items: z.number(),
|
|
42
|
-
total_already_in_ar: z.number(),
|
|
43
|
-
scan_duration_ms: z.number(),
|
|
44
|
-
}),
|
|
45
|
-
_session_nonce: z.string().min(1, "_session_nonce must be a non-empty string — call bootstrap_scan() first"),
|
|
46
|
-
_scan_roots: z.array(z.string()),
|
|
47
|
-
});
|
|
48
|
-
export function register(server) {
|
|
49
|
-
server.registerTool("bootstrap_scan", {
|
|
50
|
-
title: "Bootstrap Scan",
|
|
51
|
-
description: "Discover existing projects on this machine — git repos, Claude memory, CLAUDE.md files. Returns what CAN be imported into AgentRecall. Read-only, no writes. Run this first if AgentRecall is empty.",
|
|
52
|
-
inputSchema: {
|
|
53
|
-
scan_dirs: z.array(z.string()).optional().describe("Additional directories to scan (default: ~/Projects/, ~/work/, ~/code/, ~/dev/, ~/src/, ~/repos/, ~/github/)"),
|
|
54
|
-
max_depth: z.number().int().min(1).max(5).optional().describe("Maximum directory depth to scan (default: 3, max: 5)"),
|
|
55
|
-
},
|
|
56
|
-
}, async ({ scan_dirs, max_depth }) => {
|
|
57
|
-
const result = await bootstrapScan({
|
|
58
|
-
scan_dirs: scan_dirs ?? undefined,
|
|
59
|
-
max_depth: max_depth ?? undefined,
|
|
60
|
-
});
|
|
61
|
-
// Format as human-readable text + structured JSON
|
|
62
|
-
const summary = [
|
|
63
|
-
`Found ${result.stats.total_projects} projects (${result.stats.total_already_in_ar} already in AgentRecall, ${result.stats.total_projects - result.stats.total_already_in_ar} new)`,
|
|
64
|
-
`${result.stats.total_importable_items} importable items`,
|
|
65
|
-
`${result.global_items.length} global items (user profile)`,
|
|
66
|
-
`Scan time: ${result.stats.scan_duration_ms}ms`,
|
|
67
|
-
``,
|
|
68
|
-
`New projects:`,
|
|
69
|
-
...result.projects
|
|
70
|
-
.filter(p => !p.already_in_ar)
|
|
71
|
-
.slice(0, 15)
|
|
72
|
-
.map(p => ` ${p.slug} — ${p.language ?? "unknown"} — ${p.sources.map(s => s.type).join("+")}`),
|
|
73
|
-
``,
|
|
74
|
-
`To import: call bootstrap_import`,
|
|
75
|
-
].join("\n");
|
|
76
|
-
return {
|
|
77
|
-
content: [
|
|
78
|
-
{ type: "text", text: summary },
|
|
79
|
-
{ type: "text", text: JSON.stringify(result) },
|
|
80
|
-
],
|
|
81
|
-
};
|
|
82
|
-
});
|
|
83
|
-
server.registerTool("bootstrap_import", {
|
|
84
|
-
title: "Bootstrap Import",
|
|
85
|
-
description: "Import discovered projects into AgentRecall. Call bootstrap_scan FIRST, then pass the EXACT scan_result object returned here — do NOT construct scan_result manually. Security: requires _session_nonce from the scan call; fabricated or replayed scan results are rejected.",
|
|
86
|
-
inputSchema: {
|
|
87
|
-
scan_result: z.union([z.string(), z.record(z.string(), z.unknown())]).describe("BootstrapScanResult from bootstrap_scan — pass the exact object returned by bootstrap_scan, including _session_nonce. Do NOT construct this manually."),
|
|
88
|
-
project_slugs: z.array(z.string()).optional().describe("Import only these projects (default: all new)"),
|
|
89
|
-
item_types: z.array(z.string()).optional().describe("Import only these item types: identity, memory, architecture, trajectory"),
|
|
90
|
-
},
|
|
91
|
-
}, async ({ scan_result, project_slugs, item_types }) => {
|
|
92
|
-
let scan;
|
|
93
|
-
try {
|
|
94
|
-
// Parse JSON string if needed
|
|
95
|
-
let rawScan;
|
|
96
|
-
if (typeof scan_result === "string") {
|
|
97
|
-
try {
|
|
98
|
-
rawScan = JSON.parse(scan_result);
|
|
99
|
-
}
|
|
100
|
-
catch {
|
|
101
|
-
return { content: [{ type: "text", text: "Error: scan_result string is not valid JSON. Pass the exact object from bootstrap_scan." }], isError: true };
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
rawScan = scan_result;
|
|
106
|
-
}
|
|
107
|
-
// GUARD 3: Strict structural validation — rejects malformed / fabricated objects
|
|
108
|
-
const parsed = BootstrapScanResultSchema.safeParse(rawScan);
|
|
109
|
-
if (!parsed.success) {
|
|
110
|
-
const firstError = parsed.error.issues[0];
|
|
111
|
-
const msg = firstError
|
|
112
|
-
? `${firstError.path.join(".")}: ${firstError.message}`
|
|
113
|
-
: "scan_result failed schema validation";
|
|
114
|
-
return {
|
|
115
|
-
content: [{ type: "text", text: `Security: scan_result rejected — ${msg}. Pass the exact object returned by bootstrap_scan().` }],
|
|
116
|
-
isError: true,
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
scan = parsed.data;
|
|
120
|
-
}
|
|
121
|
-
catch {
|
|
122
|
-
return { content: [{ type: "text", text: "Error: scan_result must be valid JSON from bootstrap_scan" }], isError: true };
|
|
123
|
-
}
|
|
124
|
-
const result = await bootstrapImport(scan, {
|
|
125
|
-
project_slugs: project_slugs ?? undefined,
|
|
126
|
-
item_types: item_types ?? undefined,
|
|
127
|
-
});
|
|
128
|
-
if (result.errors.length > 0 && result.items_imported === 0) {
|
|
129
|
-
return {
|
|
130
|
-
content: [{ type: "text", text: `Bootstrap import failed — ${result.errors.length} errors, 0 items imported.\n${result.errors.slice(0, 3).map(e => ` ${e.project}/${e.item}: ${e.error}`).join("\n")}` }],
|
|
131
|
-
isError: true,
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
const summary = [
|
|
135
|
-
`Bootstrap import complete:`,
|
|
136
|
-
` ${result.projects_created} projects created`,
|
|
137
|
-
` ${result.items_imported} items imported`,
|
|
138
|
-
` ${result.items_skipped} items skipped`,
|
|
139
|
-
` ${result.errors.length} errors`,
|
|
140
|
-
` Duration: ${result.duration_ms}ms`,
|
|
141
|
-
result.errors.length > 0 ? `\nErrors:\n${result.errors.map(e => ` ${e.project}/${e.item}: ${e.error}`).join("\n")}` : "",
|
|
142
|
-
``,
|
|
143
|
-
`Run session_start to load any imported project.`,
|
|
144
|
-
].join("\n");
|
|
145
|
-
return { content: [{ type: "text", text: summary }] };
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
//# sourceMappingURL=bootstrap.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../src/tools/bootstrap.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EACL,aAAa,EACb,eAAe,GAEhB,MAAM,mBAAmB,CAAC;AAE3B,8EAA8E;AAC9E,2DAA2D;AAC3D,EAAE;AACF,mFAAmF;AACnF,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,iFAAiF;AACjF,4EAA4E;AAC5E,kFAAkF;AAClF,8EAA8E;AAC9E,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;IAClE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC;AAEH,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;QACxB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;QAClE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;KACnB,CAAC,CAAC;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,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;gBACnN,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,MAAM,OAAO,GAAG;YACd,4BAA4B;YAC5B,KAAK,MAAM,CAAC,gBAAgB,mBAAmB;YAC/C,KAAK,MAAM,CAAC,cAAc,iBAAiB;YAC3C,KAAK,MAAM,CAAC,aAAa,gBAAgB;YACzC,KAAK,MAAM,CAAC,MAAM,CAAC,MAAM,SAAS;YAClC,eAAe,MAAM,CAAC,WAAW,IAAI;YACrC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,cAAc,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;YACzH,EAAE;YACF,iDAAiD;SAClD,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEb,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/tools/brief.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* brief MCP tool — compact LLM-free re-orientation briefing (≤200 tokens).
|
|
3
|
-
*
|
|
4
|
-
* --full only: registered inside the `if (fullMode)` block in index.ts.
|
|
5
|
-
* Read-only: no session_start side-effects, no writes, no LLM calls.
|
|
6
|
-
*
|
|
7
|
-
* Returns identity, active phase, top corrections/watch_for/rules, the
|
|
8
|
-
* 3-rule lifecycle text verbatim, trigger vocab, and a host-honesty line.
|
|
9
|
-
*
|
|
10
|
-
* AGENT INSTRUCTION:
|
|
11
|
-
* brief() is a MID-SESSION re-orientation aid for hook-less hosts, NOT a
|
|
12
|
-
* replacement for session_start. Always call session_start() FIRST at
|
|
13
|
-
* session entry. Use brief() when you need a quick lifecycle reminder
|
|
14
|
-
* mid-session without paying the full session_start token cost.
|
|
15
|
-
*/
|
|
16
|
-
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
17
|
-
export declare function register(server: McpServer): void;
|
|
18
|
-
//# sourceMappingURL=brief.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brief.d.ts","sourceRoot":"","sources":["../../src/tools/brief.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAmEhD"}
|
package/dist/tools/brief.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* brief MCP tool — compact LLM-free re-orientation briefing (≤200 tokens).
|
|
3
|
-
*
|
|
4
|
-
* --full only: registered inside the `if (fullMode)` block in index.ts.
|
|
5
|
-
* Read-only: no session_start side-effects, no writes, no LLM calls.
|
|
6
|
-
*
|
|
7
|
-
* Returns identity, active phase, top corrections/watch_for/rules, the
|
|
8
|
-
* 3-rule lifecycle text verbatim, trigger vocab, and a host-honesty line.
|
|
9
|
-
*
|
|
10
|
-
* AGENT INSTRUCTION:
|
|
11
|
-
* brief() is a MID-SESSION re-orientation aid for hook-less hosts, NOT a
|
|
12
|
-
* replacement for session_start. Always call session_start() FIRST at
|
|
13
|
-
* session entry. Use brief() when you need a quick lifecycle reminder
|
|
14
|
-
* mid-session without paying the full session_start token cost.
|
|
15
|
-
*/
|
|
16
|
-
import * as z from "zod/v4";
|
|
17
|
-
import { brief } from "agent-recall-core";
|
|
18
|
-
export function register(server) {
|
|
19
|
-
server.registerTool("brief", {
|
|
20
|
-
title: "Brief",
|
|
21
|
-
description: "READ-ONLY re-orientation briefing (≤200 tokens). " +
|
|
22
|
-
"Returns: identity, active phase, top P0 corrections, watch_for patterns, behavior rules, " +
|
|
23
|
-
"the 3-rule lifecycle text verbatim, save-trigger vocab, and a host-honesty hint. " +
|
|
24
|
-
"LLM-free, deterministic, no side-effects. " +
|
|
25
|
-
"--full only. " +
|
|
26
|
-
"NOT a replacement for session_start — call session_start FIRST at session entry. " +
|
|
27
|
-
"Use brief() mid-session when you need a lightweight lifecycle reminder.",
|
|
28
|
-
inputSchema: {
|
|
29
|
-
project: z.string().optional().describe("Project slug (default: auto-detected from cwd)"),
|
|
30
|
-
},
|
|
31
|
-
annotations: {
|
|
32
|
-
readOnlyHint: true,
|
|
33
|
-
},
|
|
34
|
-
}, async ({ project }) => {
|
|
35
|
-
const result = await brief({ project });
|
|
36
|
-
// Render as compact human-readable text + structured JSON
|
|
37
|
-
const lines = [
|
|
38
|
-
`# Brief — ${result.project}`,
|
|
39
|
-
`Identity: ${result.identity}`,
|
|
40
|
-
result.active_phase ? `Phase: ${result.active_phase}` : "Phase: (none active)",
|
|
41
|
-
"",
|
|
42
|
-
"## Lifecycle (3 rules)",
|
|
43
|
-
result.lifecycle_text,
|
|
44
|
-
"",
|
|
45
|
-
"## Save triggers",
|
|
46
|
-
result.trigger_vocab.join(", "),
|
|
47
|
-
];
|
|
48
|
-
if (result.corrections_top.length > 0) {
|
|
49
|
-
lines.push("", "## Top P0 corrections");
|
|
50
|
-
for (const c of result.corrections_top) {
|
|
51
|
-
lines.push(` [${c.severity.toUpperCase()}] ${c.rule}`);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
if (result.watch_for_top.length > 0) {
|
|
55
|
-
lines.push("", "## Watch for");
|
|
56
|
-
for (const w of result.watch_for_top) {
|
|
57
|
-
lines.push(` ${w.pattern} → ${w.suggestion}`);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
if (result.rules_top.length > 0) {
|
|
61
|
-
lines.push("", "## Rules");
|
|
62
|
-
for (const r of result.rules_top) {
|
|
63
|
-
lines.push(` [${r.name}] WHEN ${r.when} → ${r.do}`);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
if (result.store_health) {
|
|
67
|
-
lines.push("", `Store: ${result.store_health}`);
|
|
68
|
-
}
|
|
69
|
-
lines.push("", result.host_hint);
|
|
70
|
-
return {
|
|
71
|
-
content: [
|
|
72
|
-
{ type: "text", text: lines.join("\n") },
|
|
73
|
-
{ type: "text", text: JSON.stringify(result) },
|
|
74
|
-
],
|
|
75
|
-
};
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
//# sourceMappingURL=brief.js.map
|
package/dist/tools/brief.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brief.js","sourceRoot":"","sources":["../../src/tools/brief.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,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,OAAO;QACd,WAAW,EACT,mDAAmD;YACnD,2FAA2F;YAC3F,mFAAmF;YACnF,4CAA4C;YAC5C,eAAe;YACf,mFAAmF;YACnF,yEAAyE;QAC3E,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gDAAgD,CAAC;SAC1F;QACD,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;SACnB;KACF,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACvB,MAAM,MAAM,GAAG,MAAM,KAAK,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C,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACvD,CAAC;QACH,CAAC;QAED,IAAI,MAAM,CAAC,YAAY,EAAE,CAAC;YACxB,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,UAAU,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;QAClD,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;QAEjC,OAAO;YACL,OAAO,EAAE;gBACP,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;gBACjD,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE;aACxD;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-export.d.ts","sourceRoot":"","sources":["../../src/tools/dashboard-export.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAoBhD"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import { dashboardExport } from "agent-recall-core";
|
|
3
|
-
export function register(server) {
|
|
4
|
-
server.registerTool("dashboard_export", {
|
|
5
|
-
title: "Export Memory Dashboard (Agent-Readable + Human-Readable)",
|
|
6
|
-
description: "Generate ~/.agent-recall/dashboard.json — a structured all-projects snapshot suitable for " +
|
|
7
|
-
"agents to inspect their own memory state in ONE call. Includes per-project pipeline, " +
|
|
8
|
-
"correction KPIs (precision / heeded / recurrence), top insights, room salience, skill " +
|
|
9
|
-
"count, and a canonical naming index. Schema version 1, stable.",
|
|
10
|
-
inputSchema: {
|
|
11
|
-
format: z.enum(["json", "both"]).default("json"),
|
|
12
|
-
inline_index_limit: z.number().int().min(0).max(2000).default(200),
|
|
13
|
-
},
|
|
14
|
-
}, async (args) => {
|
|
15
|
-
const result = await dashboardExport(args);
|
|
16
|
-
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=dashboard-export.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-export.js","sourceRoot":"","sources":["../../src/tools/dashboard-export.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,UAAU,QAAQ,CAAC,MAAiB;IACxC,MAAM,CAAC,YAAY,CACjB,kBAAkB,EAClB;QACE,KAAK,EAAE,2DAA2D;QAClE,WAAW,EACT,4FAA4F;YAC5F,uFAAuF;YACvF,wFAAwF;YACxF,gEAAgE;QAClE,WAAW,EAAE;YACX,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;YAChD,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;SACnE;KACF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,IAAI,CAAC,CAAC;QAC3C,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IACzF,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memory-query.d.ts","sourceRoot":"","sources":["../../src/tools/memory-query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAgEhD"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import { memoryQuery } from "agent-recall-core";
|
|
3
|
-
export function register(server) {
|
|
4
|
-
server.registerTool("memory_query", {
|
|
5
|
-
title: "Memory Query",
|
|
6
|
-
description: "Use when the user asks to search across all memory stores with a natural language query.",
|
|
7
|
-
inputSchema: {
|
|
8
|
-
query: z.string().optional().describe("Natural language search query. Use this for free-text search like 'corrections.ts P0 regex' or 'what did we decide about auth'."),
|
|
9
|
-
intent: z.string().optional().describe("What you are about to do or decide. Alias for query — use either one."),
|
|
10
|
-
project: z.string().default("auto"),
|
|
11
|
-
min_confidence: z.enum(["high", "medium", "low"]).default("medium").describe("Minimum confidence threshold. 'high' = very relevant only. 'low' = broader, more noise."),
|
|
12
|
-
limit: z.number().int().min(1).max(10).default(5),
|
|
13
|
-
},
|
|
14
|
-
}, async ({ query, intent, project, min_confidence, limit }) => {
|
|
15
|
-
const searchIntent = query || intent;
|
|
16
|
-
if (!searchIntent) {
|
|
17
|
-
return { content: [{ type: "text", text: "Provide either 'query' or 'intent' parameter." }], isError: true };
|
|
18
|
-
}
|
|
19
|
-
try {
|
|
20
|
-
const result = await memoryQuery({ intent: searchIntent, project, min_confidence, limit });
|
|
21
|
-
if (result.empty) {
|
|
22
|
-
// Bridge (Wave 4): when the primary filter is empty but a low-confidence
|
|
23
|
-
// match exists, surface the verbatim drill-down source instead of a bare
|
|
24
|
-
// "nothing found" string.
|
|
25
|
-
if (result.fallback && result.fallback.length > 0) {
|
|
26
|
-
const lines = [
|
|
27
|
-
result.guidance ?? "Low-confidence match — verbatim source attached; verify before relying.",
|
|
28
|
-
"",
|
|
29
|
-
"— Verbatim source (low-confidence drill-down):",
|
|
30
|
-
];
|
|
31
|
-
for (const b of result.fallback) {
|
|
32
|
-
const snippet = b.verbatim.replace(/\n/g, " ").slice(0, 300);
|
|
33
|
-
lines.push(` [${b.source}] ${snippet}`);
|
|
34
|
-
}
|
|
35
|
-
return { content: [{ type: "text", text: lines.join("\n") }] };
|
|
36
|
-
}
|
|
37
|
-
return {
|
|
38
|
-
content: [{
|
|
39
|
-
type: "text",
|
|
40
|
-
text: result.guidance ?? `No relevant memory found for: "${searchIntent}". Proceed normally.`,
|
|
41
|
-
}],
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
const lines = [];
|
|
45
|
-
for (let i = 0; i < result.results.length; i++) {
|
|
46
|
-
const r = result.results[i];
|
|
47
|
-
const conf = r.confidence.toUpperCase().slice(0, 3);
|
|
48
|
-
const room = r.room ? `/${r.room}` : "";
|
|
49
|
-
const excerpt = r.excerpt ? ` — ${r.excerpt.replace(/\n/g, " ").slice(0, 80)}` : "";
|
|
50
|
-
lines.push(`[${i + 1}][${r.source}${room}][${conf}] ${r.title}${excerpt}`);
|
|
51
|
-
}
|
|
52
|
-
// Feedback nudge
|
|
53
|
-
lines.push("");
|
|
54
|
-
lines.push("— Rate these on next recall() to improve future ranking:");
|
|
55
|
-
lines.push(` IDs: ${result.results.map((r, i) => `${i + 1}=${r.id}`).join(" ")}`);
|
|
56
|
-
return { content: [{ type: "text", text: lines.join("\n") }] };
|
|
57
|
-
}
|
|
58
|
-
catch (err) {
|
|
59
|
-
return {
|
|
60
|
-
content: [{ type: "text", text: `memory_query failed: ${err instanceof Error ? err.message : String(err)}` }],
|
|
61
|
-
isError: true,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=memory-query.js.map
|
|
@@ -1 +0,0 @@
|
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AE,wBAAwB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;gBACtH,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-board.d.ts","sourceRoot":"","sources":["../../src/tools/project-board.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAkBhD"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import { projectBoard, renderBoard } from "agent-recall-core";
|
|
3
|
-
export function register(server) {
|
|
4
|
-
server.registerTool("project_board", {
|
|
5
|
-
title: "Project Status Board",
|
|
6
|
-
description: "Use when the user asks to show/list AgentRecall projects, /arstatus, project status board, or what work is active.",
|
|
7
|
-
inputSchema: {
|
|
8
|
-
format: z.enum(["json", "text"]).default("json"),
|
|
9
|
-
},
|
|
10
|
-
}, async (args) => {
|
|
11
|
-
const result = await projectBoard();
|
|
12
|
-
if (args.format === "text") {
|
|
13
|
-
const boardWidth = process.stdout.columns
|
|
14
|
-
? Math.min(110, Math.max(80, process.stdout.columns))
|
|
15
|
-
: 100;
|
|
16
|
-
const text = renderBoard(result, { boardWidth });
|
|
17
|
-
return { content: [{ type: "text", text }] };
|
|
18
|
-
}
|
|
19
|
-
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=project-board.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-board.js","sourceRoot":"","sources":["../../src/tools/project-board.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CA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AAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAWhD"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import { projectStatus } from "agent-recall-core";
|
|
3
|
-
export function register(server) {
|
|
4
|
-
server.registerTool("project_status", {
|
|
5
|
-
title: "Project Status",
|
|
6
|
-
description: "Optional deeper context for a specific project — call after session_start if you need full status details. Not a replacement for project_board. Returns last trajectory, active blockers, next steps, and palace room freshness.",
|
|
7
|
-
inputSchema: {
|
|
8
|
-
project: z.string().default("auto"),
|
|
9
|
-
},
|
|
10
|
-
}, async ({ project }) => {
|
|
11
|
-
const result = await projectStatus({ project });
|
|
12
|
-
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=project-status.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-status.js","sourceRoot":"","sources":["../../src/tools/project-status.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,EAAE,kOAAkO;QAC/O,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;SACpC;KACF,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACvB,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;QAChD,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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session-end-reflect.d.ts","sourceRoot":"","sources":["../../src/tools/session-end-reflect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA0BhD"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import { sessionEndReflect } from "agent-recall-core";
|
|
3
|
-
export function register(server) {
|
|
4
|
-
server.registerTool("session_end_reflect", {
|
|
5
|
-
title: "Reflect — Park-style aggregation pass",
|
|
6
|
-
description: "Bundle recent journals + active corrections + recent phase syntheses into a " +
|
|
7
|
-
"ready-to-use prompt the calling LLM can read to produce: (1) three high-level questions " +
|
|
8
|
-
"this period raised, (2) procedural skills to crystallize via skill_write, (3) cross-session " +
|
|
9
|
-
"patterns worth promoting, (4) low-precision corrections to archive. " +
|
|
10
|
-
"Returns the structured bundle + prompt — does NOT call an LLM itself.",
|
|
11
|
-
inputSchema: {
|
|
12
|
-
lookback_days: z.number().int().min(1).max(60).default(7),
|
|
13
|
-
project: z.string().max(100).default("auto"),
|
|
14
|
-
},
|
|
15
|
-
}, async (args) => {
|
|
16
|
-
const result = await sessionEndReflect(args);
|
|
17
|
-
return {
|
|
18
|
-
content: [
|
|
19
|
-
{ type: "text", text: result.prompt },
|
|
20
|
-
{ type: "text", text: JSON.stringify({ success: result.success, project: result.project, next_actions: result.next_actions, bundle_size: { journals: result.bundle.recent_journals.length, corrections: result.bundle.active_corrections.length, phases: result.bundle.recent_phases.length } }, null, 2) },
|
|
21
|
-
],
|
|
22
|
-
};
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=session-end-reflect.js.map
|
|
@@ -1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AM,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE;aACrT;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill-list.d.ts","sourceRoot":"","sources":["../../src/tools/skill-list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAiBhD"}
|
package/dist/tools/skill-list.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import { skillList } from "agent-recall-core";
|
|
3
|
-
export function register(server) {
|
|
4
|
-
server.registerTool("skill_list", {
|
|
5
|
-
title: "List All Procedural Skills",
|
|
6
|
-
description: "List every procedural skill saved for the project. Returns slug/name/topic/triggers — " +
|
|
7
|
-
"use to browse the available how-to library.",
|
|
8
|
-
inputSchema: {
|
|
9
|
-
project: z.string().max(100).default("auto"),
|
|
10
|
-
},
|
|
11
|
-
}, async (args) => {
|
|
12
|
-
const result = await skillList(args);
|
|
13
|
-
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=skill-list.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill-list.js","sourceRoot":"","sources":["../../src/tools/skill-list.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,MAAM,UAAU,QAAQ,CAAC,MAAiB;IACxC,MAAM,CAAC,YAAY,CACjB,YAAY,EACZ;QACE,KAAK,EAAE,4BAA4B;QACnC,WAAW,EACT,wFAAwF;YACxF,6CAA6C;QAC/C,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;SAC7C;KACF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,IAAI,CAAC,CAAC;QACrC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IACzF,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill-recall.d.ts","sourceRoot":"","sources":["../../src/tools/skill-recall.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAqBhD"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import { skillRecall } from "agent-recall-core";
|
|
3
|
-
export function register(server) {
|
|
4
|
-
server.registerTool("skill_recall", {
|
|
5
|
-
title: "Recall Procedural Skill by Intent",
|
|
6
|
-
description: "Find IF-THEN production rules matching your current intent. Call this before starting a " +
|
|
7
|
-
"non-trivial task — if a past procedure matches, follow its steps instead of re-deriving. " +
|
|
8
|
-
"Returns ranked skills with steps, postconditions, and pitfalls. Trigger-keyword + topic " +
|
|
9
|
-
"match (no LLM call, deterministic ranking).",
|
|
10
|
-
inputSchema: {
|
|
11
|
-
intent: z.string().min(3).max(500).describe("What you're about to do (e.g. 'set up Cloudflare DNS for new domain')."),
|
|
12
|
-
limit: z.number().int().min(1).max(20).default(5),
|
|
13
|
-
project: z.string().max(100).default("auto"),
|
|
14
|
-
},
|
|
15
|
-
}, async (args) => {
|
|
16
|
-
const result = await skillRecall(args);
|
|
17
|
-
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=skill-recall.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill-recall.js","sourceRoot":"","sources":["../../src/tools/skill-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,CACjB,cAAc,EACd;QACE,KAAK,EAAE,mCAAmC;QAC1C,WAAW,EACT,0FAA0F;YAC1F,2FAA2F;YAC3F,0FAA0F;YAC1F,6CAA6C;QAC/C,WAAW,EAAE;YACX,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,wEAAwE,CAAC;YACrH,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACjD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;SAC7C;KACF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC;QACvC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IACzF,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill-write.d.ts","sourceRoot":"","sources":["../../src/tools/skill-write.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAOzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAoChD"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import { skillWrite } from "agent-recall-core";
|
|
3
|
-
const SHORT = z.string().min(1).max(200);
|
|
4
|
-
const TEXT = z.string().min(1).max(4096);
|
|
5
|
-
export function register(server) {
|
|
6
|
-
server.registerTool("skill_write", {
|
|
7
|
-
title: "Write a Procedural Skill",
|
|
8
|
-
description: "Save a reusable IF-THEN production rule (procedural memory). Use when you've solved a problem " +
|
|
9
|
-
"via a multi-step procedure that's likely to recur (e.g. Cloudflare 4-step DNS+Proxy+OriginRule+SSL, " +
|
|
10
|
-
"git rm --cached for untracked cleanup, OAuth refresh pre-check). Triggers should be intent keywords " +
|
|
11
|
-
"another agent would use when asking 'how do I X'. Storage: palace/skills/NNNN-<slug>.md.",
|
|
12
|
-
inputSchema: {
|
|
13
|
-
name: SHORT.describe("Short human-readable name (e.g. 'Cloudflare 4-step routing')."),
|
|
14
|
-
topic: z.string().min(1).max(30).regex(/^[a-z0-9-]+$/, "lowercase kebab-case").describe("Topic / category, kebab-case (e.g. 'deploy', 'git', 'auth')."),
|
|
15
|
-
triggers: z.array(z.string().min(1).max(80)).min(1).max(20).describe("Intent keywords that should match this skill — used by skill_recall."),
|
|
16
|
-
file_globs: z.array(z.string().max(120)).max(10).optional().describe("Optional file-path globs that boost relevance (e.g. ['**/Cloudflare/*.tf'])."),
|
|
17
|
-
when: TEXT.describe("1-sentence trigger condition — when to use this skill."),
|
|
18
|
-
preconditions: z.array(z.string().max(400)).max(20).optional().describe("Things that must be true before applying."),
|
|
19
|
-
steps: z.array(z.string().min(1).max(400)).min(1).max(50).describe("Ordered steps to execute."),
|
|
20
|
-
postconditions: z.array(z.string().max(400)).max(20).optional().describe("Falsifiable success criteria."),
|
|
21
|
-
pitfalls: z.array(z.string().max(400)).max(20).optional().describe("Known failure modes."),
|
|
22
|
-
evidence: z.array(z.string().max(200)).max(20).optional().describe("Journal dates / commit SHAs / correction ids that led to this."),
|
|
23
|
-
source: z.enum(["manual", "promoted_from_correction", "promoted_from_pipeline", "auto_reflection"]).default("manual"),
|
|
24
|
-
project: z.string().max(100).default("auto"),
|
|
25
|
-
},
|
|
26
|
-
}, async (args) => {
|
|
27
|
-
const result = await skillWrite(args);
|
|
28
|
-
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=skill-write.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill-write.js","sourceRoot":"","sources":["../../src/tools/skill-write.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACzC,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAEzC,MAAM,UAAU,QAAQ,CAAC,MAAiB;IACxC,MAAM,CAAC,YAAY,CACjB,aAAa,EACb;QACE,KAAK,EAAE,0BAA0B;QACjC,WAAW,EACT,gGAAgG;YAChG,sGAAsG;YACtG,sGAAsG;YACtG,0FAA0F;QAC5F,WAAW,EAAE;YACX,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,+DAA+D,CAAC;YACrF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAA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