@radix-ai/ai-memory 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +19 -0
- package/.cursor-plugin/marketplace.json +19 -0
- package/LICENSE +21 -0
- package/README.md +331 -0
- package/dist/cli/adapters.d.ts +32 -0
- package/dist/cli/adapters.d.ts.map +1 -0
- package/dist/cli/adapters.js +368 -0
- package/dist/cli/adapters.js.map +1 -0
- package/dist/cli/environment.d.ts +34 -0
- package/dist/cli/environment.d.ts.map +1 -0
- package/dist/cli/environment.js +119 -0
- package/dist/cli/environment.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +1108 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/docs-schema.d.ts +27 -0
- package/dist/docs-schema.d.ts.map +1 -0
- package/dist/docs-schema.js +100 -0
- package/dist/docs-schema.js.map +1 -0
- package/dist/evals/index.d.ts +13 -0
- package/dist/evals/index.d.ts.map +1 -0
- package/dist/evals/index.js +205 -0
- package/dist/evals/index.js.map +1 -0
- package/dist/evals/performance-comparison.d.ts +23 -0
- package/dist/evals/performance-comparison.d.ts.map +1 -0
- package/dist/evals/performance-comparison.js +76 -0
- package/dist/evals/performance-comparison.js.map +1 -0
- package/dist/evals/platform-integration.d.ts +34 -0
- package/dist/evals/platform-integration.d.ts.map +1 -0
- package/dist/evals/platform-integration.js +186 -0
- package/dist/evals/platform-integration.js.map +1 -0
- package/dist/formatter/index.d.ts +15 -0
- package/dist/formatter/index.d.ts.map +1 -0
- package/dist/formatter/index.js +207 -0
- package/dist/formatter/index.js.map +1 -0
- package/dist/hybrid-search/index.d.ts +40 -0
- package/dist/hybrid-search/index.d.ts.map +1 -0
- package/dist/hybrid-search/index.js +277 -0
- package/dist/hybrid-search/index.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-server/index.d.ts +6 -0
- package/dist/mcp-server/index.d.ts.map +1 -0
- package/dist/mcp-server/index.js +114 -0
- package/dist/mcp-server/index.js.map +1 -0
- package/dist/mcp-server/p0-parser.d.ts +43 -0
- package/dist/mcp-server/p0-parser.d.ts.map +1 -0
- package/dist/mcp-server/p0-parser.js +108 -0
- package/dist/mcp-server/p0-parser.js.map +1 -0
- package/dist/mcp-server/resources.d.ts +3 -0
- package/dist/mcp-server/resources.d.ts.map +1 -0
- package/dist/mcp-server/resources.js +156 -0
- package/dist/mcp-server/resources.js.map +1 -0
- package/dist/mcp-server/tools.d.ts +15 -0
- package/dist/mcp-server/tools.d.ts.map +1 -0
- package/dist/mcp-server/tools.js +928 -0
- package/dist/mcp-server/tools.js.map +1 -0
- package/dist/schema-constants.d.ts +7 -0
- package/dist/schema-constants.d.ts.map +1 -0
- package/dist/schema-constants.js +33 -0
- package/dist/schema-constants.js.map +1 -0
- package/package.json +84 -0
- package/plugins/adapters/claude-code/.claude-plugin/plugin.json +26 -0
- package/plugins/adapters/claude-code/CLAUDE.md +21 -0
- package/plugins/adapters/claude-code/README.md +37 -0
- package/plugins/adapters/claude-code/agents/governance-checker.md +27 -0
- package/plugins/adapters/claude-code/agents/memory-writer.md +31 -0
- package/plugins/adapters/claude-code/hooks/SessionStart.js +55 -0
- package/plugins/adapters/claude-code/hooks/hooks.json +52 -0
- package/plugins/adapters/generic/BOOTSTRAP_INSTRUCTION.md +30 -0
- package/plugins/adapters/generic/README.md +50 -0
- package/plugins/ai-memory/.claude-plugin/plugin.json +30 -0
- package/plugins/ai-memory/.cursor-plugin/plugin.json +18 -0
- package/plugins/ai-memory/.mcp.json +19 -0
- package/plugins/ai-memory/agents/governance-critic/AGENT.md +57 -0
- package/plugins/ai-memory/agents/memory-auditor/AGENT.md +54 -0
- package/plugins/ai-memory/rules/context7-tool-reference.md +16 -0
- package/plugins/ai-memory/rules/load-memory.md +22 -0
- package/plugins/ai-memory/rules/parallel-safe-planning.md +19 -0
- package/plugins/ai-memory/skills/mem-auto-review/SKILL.md +51 -0
- package/plugins/ai-memory/skills/mem-compound/SKILL.md +105 -0
- package/plugins/ai-memory/skills/mem-init/SKILL.md +48 -0
- package/plugins/ai-memory/skills/mem-session-close/SKILL.md +38 -0
- package/plugins/ai-memory/skills/mem-validate/SKILL.md +54 -0
- package/templates/.ai/IDENTITY.md +23 -0
- package/templates/.ai/agents/_base-auditor.md +28 -0
- package/templates/.ai/agents/_template.md +23 -0
- package/templates/.ai/memory/debugging.md +14 -0
- package/templates/.ai/memory/decisions.md +8 -0
- package/templates/.ai/memory/improvements.md +7 -0
- package/templates/.ai/memory/memory-index.md +9 -0
- package/templates/.ai/memory/patterns.md +8 -0
- package/templates/.ai/reference/PROJECT.md +5 -0
- package/templates/.ai/reference/capability-specs.json +31 -0
- package/templates/.ai/reference/environment-specs.json +41 -0
- package/templates/.ai/sessions/archive/thread-archive.md +15 -0
- package/templates/.ai/sessions/open-items.md +13 -0
- package/templates/.ai/toolbox/README.md +5 -0
- package/templates/.ai/toolbox/browser.md +30 -0
- package/templates/.ai/toolbox/integrations.md +44 -0
- package/templates/.ai/toolbox/shell.md +38 -0
- package/templates/AGENTS.md +4 -0
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool adapter definitions for `ai-memory install --to <tool>`.
|
|
3
|
+
* Extracted from index.ts for maintainability.
|
|
4
|
+
*/
|
|
5
|
+
export const BOOTSTRAP_INSTRUCTION = `## ai-memory — Project Memory
|
|
6
|
+
|
|
7
|
+
This project has persistent AI memory in \`.ai/\`.
|
|
8
|
+
|
|
9
|
+
- **IDENTITY.md** — project constraints and behavioral rules
|
|
10
|
+
- **PROJECT_STATUS.md** — current focus, open questions, what to try next (writable)
|
|
11
|
+
- **memory/** — decisions, patterns, debugging history
|
|
12
|
+
- **skills/** — domain-specific patterns and session protocols
|
|
13
|
+
|
|
14
|
+
Use \`search_memory\` (MCP) to find relevant context before starting a task.
|
|
15
|
+
Use \`commit_memory\` to write new entries — never edit memory files directly.
|
|
16
|
+
If MCP is not connected, read \`.ai/memory/memory-index.md\` for a summary and write to \`.ai/memory/\` files directly.
|
|
17
|
+
|
|
18
|
+
\`.ai/\` is the canonical memory for this project. Save all project learnings here, not in your tool's built-in memory (e.g. ~/.claude/, Cursor memory, etc.). Tool-native memory is for user preferences only.
|
|
19
|
+
|
|
20
|
+
Immutable paths (do not write): IDENTITY.md, toolbox/, acp/, rules/.
|
|
21
|
+
|
|
22
|
+
At the end of a meaningful session, run /mem-compound to capture learnings.
|
|
23
|
+
`;
|
|
24
|
+
/**
|
|
25
|
+
* Platform-agnostic MCP launcher. Detects OS at runtime and spawns correctly.
|
|
26
|
+
* - In ai-memory repo: run local dist directly (avoids npx entirely).
|
|
27
|
+
* - Windows: npx.cmd fails under spawn; npx-cli.js via node works.
|
|
28
|
+
* - macOS/Linux/BSD: npx works directly.
|
|
29
|
+
*/
|
|
30
|
+
export const MCP_LAUNCHER = `#!/usr/bin/env node
|
|
31
|
+
const { spawn } = require("child_process");
|
|
32
|
+
const path = require("path");
|
|
33
|
+
const fs = require("fs");
|
|
34
|
+
const platform = process.platform;
|
|
35
|
+
const opts = { stdio: "inherit", env: process.env };
|
|
36
|
+
|
|
37
|
+
// Prefer local build when in ai-memory repo (avoids npx on Windows)
|
|
38
|
+
const cwd = process.cwd();
|
|
39
|
+
const localCli = path.join(cwd, "dist", "cli", "index.js");
|
|
40
|
+
const localMcp = path.join(cwd, "dist", "mcp-server", "index.js");
|
|
41
|
+
|
|
42
|
+
let child;
|
|
43
|
+
if (fs.existsSync(localCli)) {
|
|
44
|
+
child = spawn("node", [localCli, "mcp"], opts);
|
|
45
|
+
} else if (fs.existsSync(localMcp)) {
|
|
46
|
+
child = spawn("node", [localMcp], opts);
|
|
47
|
+
} else if (platform === "win32") {
|
|
48
|
+
const nodeDir = path.dirname(process.execPath);
|
|
49
|
+
const npxCli = path.join(nodeDir, "node_modules", "npm", "bin", "npx-cli.js");
|
|
50
|
+
if (fs.existsSync(npxCli)) {
|
|
51
|
+
child = spawn("node", [npxCli, "@radix-ai/ai-memory", "mcp"], opts);
|
|
52
|
+
} else {
|
|
53
|
+
child = spawn("cmd", ["/c", "npx", "@radix-ai/ai-memory", "mcp"], { ...opts, windowsHide: true });
|
|
54
|
+
}
|
|
55
|
+
} else {
|
|
56
|
+
child = spawn("npx", ["@radix-ai/ai-memory", "mcp"], opts);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
child.on("error", (err) => {
|
|
60
|
+
console.error("[ai-memory-mcp] spawn failed:", err.message);
|
|
61
|
+
process.exit(1);
|
|
62
|
+
});
|
|
63
|
+
child.on("exit", (code, signal) => {
|
|
64
|
+
process.exit(code ?? (signal ? 1 : 0));
|
|
65
|
+
});
|
|
66
|
+
`;
|
|
67
|
+
/** MCP config path for the launcher (relative to project root). */
|
|
68
|
+
export const MCP_LAUNCHER_PATH = ".ai/mcp-launcher.cjs";
|
|
69
|
+
/** Single MCP config for all platforms. Uses launcher that detects OS at runtime. */
|
|
70
|
+
export function getMCPJson() {
|
|
71
|
+
return JSON.stringify({
|
|
72
|
+
mcpServers: {
|
|
73
|
+
"ai-memory": {
|
|
74
|
+
type: "stdio",
|
|
75
|
+
command: "node",
|
|
76
|
+
args: [MCP_LAUNCHER_PATH],
|
|
77
|
+
env: { AI_DIR: "${workspaceFolder}/.ai" },
|
|
78
|
+
},
|
|
79
|
+
context7: {
|
|
80
|
+
type: "http",
|
|
81
|
+
url: "https://mcp.context7.com/mcp",
|
|
82
|
+
headers: { "x-api-key": "${CONTEXT7_API_KEY:-}" },
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
}, null, 2);
|
|
86
|
+
}
|
|
87
|
+
// ─── Canonical skills (written to .ai/skills/) ─────────────────────────────
|
|
88
|
+
function skillStub(name, description) {
|
|
89
|
+
return `---\nname: ${name}\ndescription: ${description}\n---\n\n# ${name}\n\nCanonical definition: \`.ai/skills/${name}/SKILL.md\`\n\nRead the canonical file for full instructions.\n`;
|
|
90
|
+
}
|
|
91
|
+
/** Full skill content — written to .ai/skills/<name>/SKILL.md by install */
|
|
92
|
+
export const CANONICAL_SKILLS = {
|
|
93
|
+
"mem-compound": `---
|
|
94
|
+
name: mem-compound
|
|
95
|
+
description: Captures session learnings into persistent memory. Use after a bug fix, pattern discovery, corrected approach, or at the end of any meaningful session.
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
# mem-compound — Capture Session Learnings
|
|
99
|
+
|
|
100
|
+
## When to use
|
|
101
|
+
- A bug had a non-obvious root cause
|
|
102
|
+
- A reusable pattern emerged
|
|
103
|
+
- An approach was corrected mid-session
|
|
104
|
+
- The session produced architectural decisions
|
|
105
|
+
- End of any session worth preserving
|
|
106
|
+
|
|
107
|
+
## Instructions
|
|
108
|
+
|
|
109
|
+
### 1. Scan the session
|
|
110
|
+
Review conversation, code changes, errors. Identify:
|
|
111
|
+
- Bugs with non-obvious causes → write to \`debugging.md\` via \`commit_memory\`
|
|
112
|
+
- Reusable patterns → write to \`patterns.md\` via \`commit_memory\`
|
|
113
|
+
- Decisions made → write to \`decisions.md\` via \`commit_memory\`
|
|
114
|
+
- Improvements → write to \`improvements.md\` via \`commit_memory\`
|
|
115
|
+
|
|
116
|
+
### 2. Conflict check
|
|
117
|
+
Before writing: call \`search_memory\` for each topic. If contradictions found, mark old entry \`[DEPRECATED]\`.
|
|
118
|
+
|
|
119
|
+
### 3. Update PROJECT_STATUS.md
|
|
120
|
+
Update with learnings: move completed items to "What's Working", add new open questions, update "What to Try Next".
|
|
121
|
+
|
|
122
|
+
### 4. Archive
|
|
123
|
+
Call \`publish_result\` with summary, outcome, and learnings.
|
|
124
|
+
Update \`sessions/open-items.md\`: close resolved items, add new ones.
|
|
125
|
+
|
|
126
|
+
### 5. Governance gate (if harness.json exists)
|
|
127
|
+
Call \`generate_harness\`, then \`validate_context\` with git diff.
|
|
128
|
+
|
|
129
|
+
### 6. Sync (ephemeral environments only)
|
|
130
|
+
If in worktree/cloud agent: call \`sync_memory\` to git commit .ai/ changes.
|
|
131
|
+
|
|
132
|
+
### 7. Report
|
|
133
|
+
Summarize: entries written, items opened/closed, gate result.
|
|
134
|
+
`,
|
|
135
|
+
"mem-session-close": `---
|
|
136
|
+
name: mem-session-close
|
|
137
|
+
description: Quick session close for sessions with no major learnings. Archives and updates open items.
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
# mem-session-close — Quick Session Close
|
|
141
|
+
|
|
142
|
+
## When to use
|
|
143
|
+
- Session was exploratory or mechanical
|
|
144
|
+
- Short session, no new decisions or patterns
|
|
145
|
+
- Want to close cleanly without the full compound loop
|
|
146
|
+
|
|
147
|
+
## Instructions
|
|
148
|
+
|
|
149
|
+
1. Call \`publish_result\` with a brief summary and outcome
|
|
150
|
+
2. Update \`sessions/open-items.md\`: close resolved items, add new ones
|
|
151
|
+
3. If in ephemeral environment: call \`sync_memory\`
|
|
152
|
+
4. Report: "Session closed. [N] items updated."
|
|
153
|
+
`,
|
|
154
|
+
"mem-validate": `---
|
|
155
|
+
name: mem-validate
|
|
156
|
+
description: Validate memory entries and code changes against governance rules. Use before risky changes.
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
# mem-validate — Governance Validation
|
|
160
|
+
|
|
161
|
+
## When to use
|
|
162
|
+
- Before committing a risky change
|
|
163
|
+
- After adding [P0] entries with constraint_pattern
|
|
164
|
+
- To verify memory schema compliance
|
|
165
|
+
|
|
166
|
+
## Instructions
|
|
167
|
+
|
|
168
|
+
1. Call \`generate_harness\` to refresh rules from current [P0] entries
|
|
169
|
+
2. Call \`validate_context\` with the current git diff
|
|
170
|
+
3. Call \`validate_schema\` on any new memory entries
|
|
171
|
+
4. Report violations and recommendations
|
|
172
|
+
`,
|
|
173
|
+
"mem-init": `---
|
|
174
|
+
name: mem-init
|
|
175
|
+
description: Initialize ai-memory in a new project. Scaffolds the .ai/ directory structure.
|
|
176
|
+
disable-model-invocation: true
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
# mem-init — Project Setup
|
|
180
|
+
|
|
181
|
+
## Instructions
|
|
182
|
+
|
|
183
|
+
1. Confirm the user wants to initialize ai-memory in this project
|
|
184
|
+
2. Ask: Default tier or Full tier (adds governance, evals, ACP)?
|
|
185
|
+
3. Run: \`ai-memory init\` (or \`ai-memory init --full\`)
|
|
186
|
+
4. Guide the user to edit \`.ai/IDENTITY.md\` and \`.ai/PROJECT_STATUS.md\`
|
|
187
|
+
5. Run \`ai-memory validate\` to confirm setup
|
|
188
|
+
`,
|
|
189
|
+
browser: `---
|
|
190
|
+
name: browser
|
|
191
|
+
description: Use browser automation (screenshots, navigate, interact). Requires browser MCP.
|
|
192
|
+
type: skill
|
|
193
|
+
status: active
|
|
194
|
+
requires:
|
|
195
|
+
capabilities: [browser]
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
# browser — Browser Automation Skill
|
|
199
|
+
|
|
200
|
+
## When to use
|
|
201
|
+
|
|
202
|
+
- Take screenshots of web pages
|
|
203
|
+
- Navigate, fill forms, click elements
|
|
204
|
+
- Verify visual changes or UI state
|
|
205
|
+
|
|
206
|
+
## Setup
|
|
207
|
+
|
|
208
|
+
Ensure browser capability is enabled for your environment. See \`.ai/reference/capability-specs.json\` or run \`ai-memory install --capability browser\` when available.
|
|
209
|
+
|
|
210
|
+
## Usage patterns
|
|
211
|
+
|
|
212
|
+
- **Failures** → write to \`debugging.md\` via \`commit_memory\` with symptom, screenshot path, root cause
|
|
213
|
+
- **Screenshots** → reference path in memory entries; include URL and viewport
|
|
214
|
+
- **Visual regression** → \`search_memory\` for known changes; create debugging entry if unexpected
|
|
215
|
+
`,
|
|
216
|
+
"screen-capture": `---
|
|
217
|
+
name: screen-capture
|
|
218
|
+
description: Capture desktop or app window for vision analysis. Platform-dependent (e.g. Peekaboo on macOS).
|
|
219
|
+
type: skill
|
|
220
|
+
status: active
|
|
221
|
+
requires:
|
|
222
|
+
capabilities: [screen_capture]
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
# screen-capture — Desktop/App Screenshot Skill
|
|
226
|
+
|
|
227
|
+
## When to use
|
|
228
|
+
|
|
229
|
+
- Read another app's screen (e.g. IDE, browser window)
|
|
230
|
+
- Capture for vision analysis or handoff
|
|
231
|
+
- Save to \`.ai/temp/\` for cross-tool handoff
|
|
232
|
+
|
|
233
|
+
## Setup
|
|
234
|
+
|
|
235
|
+
See \`.ai/reference/capability-specs.json\` for platform-specific install (e.g. Peekaboo on macOS). Manual fallback: screenshot to \`.ai/temp/screen.png\`.
|
|
236
|
+
|
|
237
|
+
## Usage
|
|
238
|
+
|
|
239
|
+
- Capture → save to \`.ai/temp/\` → agent reads via file or \`get_memory\`
|
|
240
|
+
- Handoff: write path to \`.ai/temp/request-for-*.md\` for another agent
|
|
241
|
+
`,
|
|
242
|
+
};
|
|
243
|
+
// ─── Claude Code hooks ──────────────────────────────────────────────────────
|
|
244
|
+
export const SESSION_START_HOOK = `#!/usr/bin/env node
|
|
245
|
+
/**
|
|
246
|
+
* ai-memory — Claude Code SessionStart hook
|
|
247
|
+
* Injects minimal .ai/ context at session start (lazy loading).
|
|
248
|
+
* Full context available via search_memory MCP tool.
|
|
249
|
+
*/
|
|
250
|
+
const { readFileSync, existsSync } = require("fs");
|
|
251
|
+
const { join } = require("path");
|
|
252
|
+
|
|
253
|
+
const aiDir = process.env.AI_DIR || join(process.cwd(), ".ai");
|
|
254
|
+
|
|
255
|
+
function safeRead(filePath, maxLines) {
|
|
256
|
+
try {
|
|
257
|
+
const content = readFileSync(filePath, "utf-8");
|
|
258
|
+
if (maxLines) return content.split("\\n").slice(0, maxLines).join("\\n");
|
|
259
|
+
return content;
|
|
260
|
+
} catch { return ""; }
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if (!existsSync(aiDir)) process.exit(0);
|
|
264
|
+
|
|
265
|
+
const sections = [];
|
|
266
|
+
|
|
267
|
+
const identity = safeRead(join(aiDir, "IDENTITY.md"));
|
|
268
|
+
if (identity) sections.push(identity.trim());
|
|
269
|
+
|
|
270
|
+
const status = safeRead(join(aiDir, "PROJECT_STATUS.md"));
|
|
271
|
+
if (status) sections.push(status.trim());
|
|
272
|
+
|
|
273
|
+
const index = safeRead(join(aiDir, "memory/memory-index.md"));
|
|
274
|
+
if (index && !index.includes("<!-- Index will be generated")) {
|
|
275
|
+
sections.push("## Memory Index (priority-ranked)\\n\\n" + index.trim());
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
if (sections.length === 0) process.exit(0);
|
|
279
|
+
|
|
280
|
+
process.stdout.write(JSON.stringify({
|
|
281
|
+
type: "context",
|
|
282
|
+
content: sections.join("\\n\\n---\\n\\n"),
|
|
283
|
+
}));
|
|
284
|
+
`;
|
|
285
|
+
// Pre-compact hook as a separate script to avoid escaping issues in JSON
|
|
286
|
+
export const PRE_COMPACT_HOOK = `#!/usr/bin/env node
|
|
287
|
+
const fs = require("fs");
|
|
288
|
+
const path = require("path");
|
|
289
|
+
const aiDir = process.env.AI_DIR || path.join(process.cwd(), ".ai");
|
|
290
|
+
if (!fs.existsSync(aiDir)) process.exit(0);
|
|
291
|
+
const tempDir = path.join(aiDir, "temp");
|
|
292
|
+
fs.mkdirSync(tempDir, { recursive: true });
|
|
293
|
+
const dump = { timestamp: new Date().toISOString(), event: "pre-compact" };
|
|
294
|
+
for (const f of ["PROJECT_STATUS.md", "memory/memory-index.md", "sessions/open-items.md"]) {
|
|
295
|
+
const fp = path.join(aiDir, f);
|
|
296
|
+
if (fs.existsSync(fp)) dump[f] = fs.readFileSync(fp, "utf-8").slice(0, 2000);
|
|
297
|
+
}
|
|
298
|
+
fs.writeFileSync(path.join(tempDir, "pre-compact-dump.json"), JSON.stringify(dump, null, 2));
|
|
299
|
+
`;
|
|
300
|
+
export const CLAUDE_HOOKS_CONFIG = JSON.stringify({
|
|
301
|
+
hooks: {
|
|
302
|
+
SessionStart: [{
|
|
303
|
+
hooks: [{
|
|
304
|
+
type: "command",
|
|
305
|
+
command: "node .claude/hooks/SessionStart.js",
|
|
306
|
+
timeout: 10000,
|
|
307
|
+
}],
|
|
308
|
+
}],
|
|
309
|
+
PreCompact: [{
|
|
310
|
+
hooks: [{
|
|
311
|
+
type: "command",
|
|
312
|
+
command: "node .claude/hooks/PreCompact.js",
|
|
313
|
+
timeout: 10000,
|
|
314
|
+
}],
|
|
315
|
+
}],
|
|
316
|
+
},
|
|
317
|
+
}, null, 2);
|
|
318
|
+
export const TOOL_ADAPTERS = {
|
|
319
|
+
cursor: {
|
|
320
|
+
dest: ".cursor/rules/00-load-ai-memory.mdc",
|
|
321
|
+
content: `---\ndescription: Load ai-memory project context at session start\nalwaysApply: true\n---\n\n${BOOTSTRAP_INSTRUCTION}`,
|
|
322
|
+
mcp: true,
|
|
323
|
+
mcpPath: ".cursor/mcp.json",
|
|
324
|
+
extraFiles: {
|
|
325
|
+
// Stubs in .agents/skills/ point to canonical .ai/skills/
|
|
326
|
+
".agents/skills/mem-compound/SKILL.md": skillStub("mem-compound", "Captures session learnings into persistent memory."),
|
|
327
|
+
".agents/skills/mem-session-close/SKILL.md": skillStub("mem-session-close", "Quick session close for sessions with no major learnings."),
|
|
328
|
+
".agents/skills/mem-validate/SKILL.md": skillStub("mem-validate", "Validate memory entries and code changes against governance rules."),
|
|
329
|
+
".agents/skills/mem-init/SKILL.md": skillStub("mem-init", "Initialize ai-memory in a new project."),
|
|
330
|
+
".agents/skills/browser/SKILL.md": skillStub("browser", "Browser automation (screenshots, navigate, interact)."),
|
|
331
|
+
".agents/skills/screen-capture/SKILL.md": skillStub("screen-capture", "Desktop/app window screenshot for vision analysis."),
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
windsurf: {
|
|
335
|
+
dest: ".windsurfrules",
|
|
336
|
+
content: BOOTSTRAP_INSTRUCTION,
|
|
337
|
+
mcp: true,
|
|
338
|
+
},
|
|
339
|
+
cline: {
|
|
340
|
+
dest: ".clinerules",
|
|
341
|
+
content: BOOTSTRAP_INSTRUCTION,
|
|
342
|
+
mcp: true,
|
|
343
|
+
},
|
|
344
|
+
copilot: {
|
|
345
|
+
dest: ".github/copilot-instructions.md",
|
|
346
|
+
content: `# Copilot Instructions\n\n${BOOTSTRAP_INSTRUCTION}\n\n> Note: GitHub Copilot does not support MCP. Skills must be run by pasting content from \`.ai/skills/\`.\n`,
|
|
347
|
+
mcp: false,
|
|
348
|
+
},
|
|
349
|
+
"claude-code": {
|
|
350
|
+
dest: "CLAUDE.md",
|
|
351
|
+
content: `# Claude Code — Project Memory\n\n${BOOTSTRAP_INSTRUCTION}`,
|
|
352
|
+
mcp: true,
|
|
353
|
+
extraFiles: {
|
|
354
|
+
// Stubs in .agents/skills/ point to canonical .ai/skills/
|
|
355
|
+
".agents/skills/mem-compound/SKILL.md": skillStub("mem-compound", "Captures session learnings into persistent memory."),
|
|
356
|
+
".agents/skills/mem-session-close/SKILL.md": skillStub("mem-session-close", "Quick session close for sessions with no major learnings."),
|
|
357
|
+
".agents/skills/mem-validate/SKILL.md": skillStub("mem-validate", "Validate memory entries and code changes against governance rules."),
|
|
358
|
+
".agents/skills/mem-init/SKILL.md": skillStub("mem-init", "Initialize ai-memory in a new project."),
|
|
359
|
+
".agents/skills/browser/SKILL.md": skillStub("browser", "Browser automation (screenshots, navigate, interact)."),
|
|
360
|
+
".agents/skills/screen-capture/SKILL.md": skillStub("screen-capture", "Desktop/app window screenshot for vision analysis."),
|
|
361
|
+
// Claude Code hooks (SessionStart, PreCompact)
|
|
362
|
+
".claude/hooks/SessionStart.js": SESSION_START_HOOK,
|
|
363
|
+
".claude/hooks/PreCompact.js": PRE_COMPACT_HOOK,
|
|
364
|
+
".claude/settings.local.json": CLAUDE_HOOKS_CONFIG,
|
|
365
|
+
},
|
|
366
|
+
},
|
|
367
|
+
};
|
|
368
|
+
//# sourceMappingURL=adapters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapters.js","sourceRoot":"","sources":["../../src/cli/adap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E;QACR,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE,qBAAqB;QAC9B,GAAG,EAAE,IAAI;KACV;IACD,KAAK,EAAE;QACL,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,qBAAqB;QAC9B,GAAG,EAAE,IAAI;KACV;IACD,OAAO,EAAE;QACP,IAAI,EAAE,iCAAiC;QACvC,OAAO,EAAE,6BAA6B,qBAAqB,gHAAgH;QAC3K,GAAG,EAAE,KAAK;KACX;IACD,aAAa,EAAE;QACb,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,qCAAqC,qBAAqB,EAAE;QACrE,GAAG,EAAE,IAAI;QACT,UAAU,EAAE;YACV,0DAA0D;YAC1D,sCAAsC,EAAE,SAAS,CAAC,cAAc,EAAE,oDAAoD,CAAC;YACvH,2CAA2C,EAAE,SAAS,CAAC,mBAAmB,EAAE,2DAA2D,CAAC;YACxI,sCAAsC,EAAE,SAAS,CAAC,cAAc,EAAE,oEAAoE,CAAC;YACvI,kCAAkC,EAAE,SAAS,CAAC,UAAU,EAAE,wCAAwC,CAAC;YACnG,iCAAiC,EAAE,SAAS,CAAC,SAAS,EAAE,uDAAuD,CAAC;YAChH,wCAAwC,EAAE,SAAS,CAAC,gBAAgB,EAAE,oDAAoD,CAAC;YAC3H,+CAA+C;YAC/C,+BAA+B,EAAE,kBAAkB;YACnD,6BAA6B,EAAE,gBAAgB;YAC/C,6BAA6B,EAAE,mBAAmB;SACnD;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment detection and capability injection for ai-memory install.
|
|
3
|
+
* Reads capability-specs.json and environment-specs.json from templates or .ai/reference/.
|
|
4
|
+
*/
|
|
5
|
+
export interface EnvironmentSpec {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
detect: {
|
|
9
|
+
paths: string[];
|
|
10
|
+
};
|
|
11
|
+
capabilities?: Record<string, unknown>;
|
|
12
|
+
}
|
|
13
|
+
export interface CapabilitySpec {
|
|
14
|
+
description?: string;
|
|
15
|
+
environments?: Record<string, unknown>;
|
|
16
|
+
platforms?: Record<string, unknown>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Detect which environments are present in the project.
|
|
20
|
+
* Checks detect.paths for each env in environment-specs.json.
|
|
21
|
+
*/
|
|
22
|
+
export declare function detectEnvironments(projectRoot: string, packageRoot: string): string[];
|
|
23
|
+
/**
|
|
24
|
+
* Get capability config for a given capability and environment.
|
|
25
|
+
* Reads from capability-specs.json → environments[envId].
|
|
26
|
+
*/
|
|
27
|
+
export declare function getCapabilityConfig(capability: string, envId: string, projectRoot: string, packageRoot: string): unknown;
|
|
28
|
+
/**
|
|
29
|
+
* Inject MCP config for a capability into the environment's config file.
|
|
30
|
+
* Merges new server entry into mcpServers; does not overwrite existing ai-memory.
|
|
31
|
+
* Returns true if config was written, false if skipped (e.g. native capability).
|
|
32
|
+
*/
|
|
33
|
+
export declare function injectCapabilityConfig(projectRoot: string, envId: string, capability: string, packageRoot: string): boolean;
|
|
34
|
+
//# sourceMappingURL=environment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/cli/environment.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,cAAc;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAoBD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAWrF;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,GAClB,OAAO,CAOT;AAUD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,GAClB,OAAO,CAcT"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment detection and capability injection for ai-memory install.
|
|
3
|
+
* Reads capability-specs.json and environment-specs.json from templates or .ai/reference/.
|
|
4
|
+
*/
|
|
5
|
+
import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
|
|
6
|
+
import { dirname, join } from "path";
|
|
7
|
+
/** Resolve path to specs. Prefer project .ai/reference/, fallback to package templates. */
|
|
8
|
+
function getSpecsPath(projectRoot, packageRoot, filename) {
|
|
9
|
+
const projectRef = join(projectRoot, ".ai", "reference", filename);
|
|
10
|
+
if (existsSync(projectRef))
|
|
11
|
+
return projectRef;
|
|
12
|
+
return join(packageRoot, "templates", ".ai", "reference", filename);
|
|
13
|
+
}
|
|
14
|
+
/** Load and parse JSON spec file. Returns null if missing or invalid. */
|
|
15
|
+
function loadSpec(path) {
|
|
16
|
+
if (!existsSync(path))
|
|
17
|
+
return null;
|
|
18
|
+
try {
|
|
19
|
+
const raw = readFileSync(path, "utf-8");
|
|
20
|
+
return JSON.parse(raw);
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Detect which environments are present in the project.
|
|
28
|
+
* Checks detect.paths for each env in environment-specs.json.
|
|
29
|
+
*/
|
|
30
|
+
export function detectEnvironments(projectRoot, packageRoot) {
|
|
31
|
+
const envPath = getSpecsPath(projectRoot, packageRoot, "environment-specs.json");
|
|
32
|
+
const spec = loadSpec(envPath);
|
|
33
|
+
const envs = spec?.environments ?? [];
|
|
34
|
+
const found = [];
|
|
35
|
+
for (const env of envs) {
|
|
36
|
+
const paths = env.detect?.paths ?? [];
|
|
37
|
+
const present = paths.some((p) => existsSync(join(projectRoot, p)));
|
|
38
|
+
if (present)
|
|
39
|
+
found.push(env.id);
|
|
40
|
+
}
|
|
41
|
+
return found;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Get capability config for a given capability and environment.
|
|
45
|
+
* Reads from capability-specs.json → environments[envId].
|
|
46
|
+
*/
|
|
47
|
+
export function getCapabilityConfig(capability, envId, projectRoot, packageRoot) {
|
|
48
|
+
const capPath = getSpecsPath(projectRoot, packageRoot, "capability-specs.json");
|
|
49
|
+
const spec = loadSpec(capPath);
|
|
50
|
+
const cap = spec?.capabilities?.[capability];
|
|
51
|
+
if (!cap)
|
|
52
|
+
return null;
|
|
53
|
+
const envConfig = cap.environments?.[envId];
|
|
54
|
+
return envConfig ?? null;
|
|
55
|
+
}
|
|
56
|
+
/** MCP config paths per environment (relative to project root). Matches install adapter mcpPath. */
|
|
57
|
+
const ENV_MCP_PATHS = {
|
|
58
|
+
cursor: ".cursor/mcp.json",
|
|
59
|
+
"claude-code": ".mcp.json",
|
|
60
|
+
windsurf: ".mcp.json",
|
|
61
|
+
cline: ".mcp.json",
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Inject MCP config for a capability into the environment's config file.
|
|
65
|
+
* Merges new server entry into mcpServers; does not overwrite existing ai-memory.
|
|
66
|
+
* Returns true if config was written, false if skipped (e.g. native capability).
|
|
67
|
+
*/
|
|
68
|
+
export function injectCapabilityConfig(projectRoot, envId, capability, packageRoot) {
|
|
69
|
+
const configPath = join(projectRoot, ENV_MCP_PATHS[envId] ?? ".mcp.json");
|
|
70
|
+
const config = loadMcpConfig(configPath);
|
|
71
|
+
const capConfig = getCapabilityConfig(capability, envId, projectRoot, packageRoot);
|
|
72
|
+
if (!capConfig || typeof capConfig !== "object")
|
|
73
|
+
return false;
|
|
74
|
+
const entry = mcpEntryFromCapConfig(capability, capConfig);
|
|
75
|
+
if (!entry)
|
|
76
|
+
return false;
|
|
77
|
+
const merged = mergeMcpConfig(config ?? { mcpServers: {} }, capability, entry);
|
|
78
|
+
mkdirSync(dirname(configPath), { recursive: true });
|
|
79
|
+
writeFileSync(configPath, JSON.stringify(merged, null, 2));
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
function loadMcpConfig(path) {
|
|
83
|
+
if (!existsSync(path))
|
|
84
|
+
return null;
|
|
85
|
+
try {
|
|
86
|
+
return JSON.parse(readFileSync(path, "utf-8"));
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function mcpEntryFromCapConfig(capability, config) {
|
|
93
|
+
if (config.native === true)
|
|
94
|
+
return null; // Cursor has browser natively; no injection
|
|
95
|
+
const mcp = config.mcp;
|
|
96
|
+
if (!mcp || typeof mcp !== "object")
|
|
97
|
+
return null;
|
|
98
|
+
const type = mcp.type;
|
|
99
|
+
if (type === "stdio") {
|
|
100
|
+
const command = mcp.command;
|
|
101
|
+
const args = mcp.args;
|
|
102
|
+
if (!command)
|
|
103
|
+
return null;
|
|
104
|
+
return {
|
|
105
|
+
type: "stdio",
|
|
106
|
+
command,
|
|
107
|
+
args: args ?? ["-y", "@anthropic-ai/cursor-ide-browser"],
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
function mergeMcpConfig(existing, capability, entry) {
|
|
113
|
+
const servers = { ...(existing.mcpServers ?? {}) };
|
|
114
|
+
const key = capability === "browser" ? "cursor-ide-browser" : `capability-${capability}`;
|
|
115
|
+
if (!servers[key])
|
|
116
|
+
servers[key] = entry;
|
|
117
|
+
return { ...existing, mcpServers: servers };
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=environment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../src/cli/environment.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAerC,2FAA2F;AAC3F,SAAS,YAAY,CAAC,WAAmB,EAAE,WAAmB,EAAE,QAAgB;IAC9E,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;IACnE,IAAI,UAAU,CAAC,UAAU,CAAC;QAAE,OAAO,UAAU,CAAC;IAC9C,OAAO,IAAI,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;AACtE,CAAC;AAED,yEAAyE;AACzE,SAAS,QAAQ,CAAI,IAAY;IAC/B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACnC,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACxC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAM,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,WAAmB,EAAE,WAAmB;IACzE,MAAM,OAAO,GAAG,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE,wBAAwB,CAAC,CAAC;IACjF,MAAM,IAAI,GAAG,QAAQ,CAAuC,OAAO,CAAC,CA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