conare 0.3.4 → 0.3.5

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.
Files changed (2) hide show
  1. package/dist/index.js +77 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2137,7 +2137,7 @@ init_shared();
2137
2137
  init_api();
2138
2138
 
2139
2139
  // src/configure.ts
2140
- import { existsSync as existsSync6, mkdirSync as mkdirSync2, readFileSync as readFileSync7, writeFileSync as writeFileSync2 } from "node:fs";
2140
+ import { existsSync as existsSync6, mkdirSync as mkdirSync2, readFileSync as readFileSync7, writeFileSync as writeFileSync2, symlinkSync, readlinkSync, rmSync } from "node:fs";
2141
2141
  import { dirname, join as join7 } from "node:path";
2142
2142
  import { homedir as homedir5, platform as platform4 } from "node:os";
2143
2143
  import { spawnSync } from "node:child_process";
@@ -2197,6 +2197,75 @@ function configureJsonClient(path, apiKey, label) {
2197
2197
  upsertMcpServer(path, apiKey);
2198
2198
  return `${label} configured at ${path}`;
2199
2199
  }
2200
+ var SKILL_MD = `---
2201
+ slug: conare-memory
2202
+ name: Conare Memory
2203
+ description: Long-term memory for AI agents — automatically recalls past conversations, saves preferences, and searches across all your coding sessions. Works with Claude Code, Cursor, Codex, and more.
2204
+ homepage: https://conare.ai
2205
+ ---
2206
+
2207
+ # Conare Memory
2208
+
2209
+ Persistent memory across coding sessions. Your conversations, decisions, and preferences are automatically indexed and recalled in future sessions.
2210
+
2211
+ ## When To Use Each Tool
2212
+
2213
+ | Situation | Tool | Example |
2214
+ |-----------|------|---------|
2215
+ | Start of conversation | \`recall\` | Always call first with conversation context |
2216
+ | User asks about past work | \`memory_search\` | "What did we do last week?" |
2217
+ | User says "remember this" | \`memory_save\` | Save preferences, rules, decisions |
2218
+ | User says "forget this" | \`memory_forget\` | Remove a specific memory |
2219
+ | Browse what's stored | \`memory_list\` | "Show me recent memories" |
2220
+
2221
+ ## Critical Rules
2222
+
2223
+ 1. **Always call \`recall\` at conversation start** — pass a specific description of the conversation topic, not generic text
2224
+ 2. **\`memory_search\` is global** — it searches ALL memories across all projects. Use it when the user asks about specific topics or past conversations
2225
+ 3. **\`recall\` is scoped** — it returns project-relevant context + recent sessions + preferences. Use the \`project\` param when available
2226
+ 4. **Write descriptive queries** — "how does the billing webhook handle refunds" beats "billing"
2227
+ 5. **Rephrase and retry** — if first search misses, try different phrasing. Semantic search responds to synonyms and related concepts
2228
+
2229
+ ## Search Tips
2230
+
2231
+ - Use \`after\`/\`before\` (Unix ms) for time-scoped searches: "what did we work on this week?"
2232
+ - Use \`containerTag\` to filter by source: \`claude-chats\`, \`codex-chats\`, \`cursor-chats\`, \`codebase\`, \`preferences\`
2233
+ - Use \`project\` for cross-project filtering (partial names work: "conare" matches "fun/conare-memory-engine")
2234
+ - Keep \`limit\` low (3-5) for focused results, higher (10-15) for broad exploration
2235
+ - When user asks to "remember" something, save it with \`memory_save\` — it goes to the \`preferences\` container and gets surfaced by \`recall\` in future sessions
2236
+
2237
+ ## Setup
2238
+
2239
+ Install with a single command:
2240
+
2241
+ \`\`\`bash
2242
+ bunx conare@latest
2243
+ \`\`\`
2244
+
2245
+ The wizard handles everything: account creation, API key, MCP configuration, background sync setup.
2246
+
2247
+ For manual setup, visit [conare.ai](https://conare.ai).
2248
+ `;
2249
+ function installSkill() {
2250
+ const skillDir = join7(homedir5(), ".agents", "skills", "conare-memory");
2251
+ mkdirSync2(skillDir, { recursive: true });
2252
+ writeFileSync2(join7(skillDir, "SKILL.md"), SKILL_MD);
2253
+ const claudeSkillsDir = join7(homedir5(), ".claude", "skills");
2254
+ const claudeSkillDir = join7(claudeSkillsDir, "conare-memory");
2255
+ try {
2256
+ if (existsSync6(claudeSkillsDir)) {
2257
+ if (existsSync6(claudeSkillDir)) {
2258
+ try {
2259
+ if (readlinkSync(claudeSkillDir) === skillDir)
2260
+ return "Agent Skill installed";
2261
+ } catch {}
2262
+ rmSync(claudeSkillDir, { recursive: true, force: true });
2263
+ }
2264
+ symlinkSync(skillDir, claudeSkillDir);
2265
+ }
2266
+ } catch {}
2267
+ return "Agent Skill installed";
2268
+ }
2200
2269
  function configureMcp(apiKey, targets = ["claude", "cursor", "codex"]) {
2201
2270
  const results = [];
2202
2271
  if (targets.includes("claude")) {
@@ -2211,6 +2280,9 @@ function configureMcp(apiKey, targets = ["claude", "cursor", "codex"]) {
2211
2280
  if (targets.includes("openclaw")) {
2212
2281
  results.push(configureJsonClient(join7(homedir5(), ".openclaw", "mcp.json"), apiKey, "OpenClaw"));
2213
2282
  }
2283
+ try {
2284
+ results.push(installSkill());
2285
+ } catch {}
2214
2286
  return results;
2215
2287
  }
2216
2288
 
@@ -2239,7 +2311,7 @@ function getSavedApiKey() {
2239
2311
  }
2240
2312
 
2241
2313
  // src/sync.ts
2242
- import { existsSync as existsSync8, mkdirSync as mkdirSync4, writeFileSync as writeFileSync4, unlinkSync, readFileSync as readFileSync9, chmodSync, cpSync, rmSync, symlinkSync, readlinkSync, appendFileSync } from "node:fs";
2314
+ import { existsSync as existsSync8, mkdirSync as mkdirSync4, writeFileSync as writeFileSync4, unlinkSync, readFileSync as readFileSync9, chmodSync, cpSync, rmSync as rmSync2, symlinkSync as symlinkSync2, readlinkSync as readlinkSync2, appendFileSync } from "node:fs";
2243
2315
  import { join as join9, dirname as dirname2 } from "node:path";
2244
2316
  import { homedir as homedir7, platform as platform5 } from "node:os";
2245
2317
  import { execSync as execSync2 } from "node:child_process";
@@ -2567,13 +2639,13 @@ exec "$NODE" "$CONARE_DIR/bin/conare-ingest.mjs" "$@"
2567
2639
  try {
2568
2640
  if (existsSync8(symlinkTarget)) {
2569
2641
  try {
2570
- const existing = readlinkSync(symlinkTarget);
2642
+ const existing = readlinkSync2(symlinkTarget);
2571
2643
  if (existing === wrapper)
2572
2644
  return "Global command: conare (already linked)";
2573
2645
  } catch {}
2574
2646
  unlinkSync(symlinkTarget);
2575
2647
  }
2576
- symlinkSync(wrapper, symlinkTarget);
2648
+ symlinkSync2(wrapper, symlinkTarget);
2577
2649
  return "Global command: conare (linked to /usr/local/bin)";
2578
2650
  } catch {
2579
2651
  const pathDirs = (process.env.PATH || "").split(":");
@@ -2707,7 +2779,7 @@ function uninstallSync() {
2707
2779
  unlinkSync(f);
2708
2780
  }
2709
2781
  if (existsSync8(BIN_DIR)) {
2710
- rmSync(BIN_DIR, { recursive: true, force: true });
2782
+ rmSync2(BIN_DIR, { recursive: true, force: true });
2711
2783
  messages.push("Removed ~/.conare/bin/");
2712
2784
  }
2713
2785
  if (messages.length === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conare",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "Conare CLI for ingesting AI chat history and configuring memory at conare.ai",
5
5
  "type": "module",
6
6
  "bin": {