owlmem 0.9.30 → 0.9.32
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 +5 -2
- package/owlmem.mjs +132 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,10 @@ npx -y owlmem install
|
|
|
11
11
|
Finds Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI and Claude Desktop on this computer and adds
|
|
12
12
|
OwlMem (`https://mcp.owlmem.com/mcp`) to each one. Config files are merged, not overwritten, and every file it
|
|
13
13
|
changes is backed up first (`<file>.bak-owlmem-<time>`). It also adds a short "Team memory" rules block to
|
|
14
|
-
`~/.claude/CLAUDE.md`, `~/.codex/AGENTS.md` and `~/.gemini/GEMINI.md` (between `<!-- owlmem:start -->` markers)
|
|
14
|
+
`~/.claude/CLAUDE.md`, `~/.codex/AGENTS.md` and `~/.gemini/GEMINI.md` (between `<!-- owlmem:start -->` markers),
|
|
15
|
+
and a SessionStart hook to `~/.claude/settings.json` that runs `owlmem hook session-start` at the start of
|
|
16
|
+
every Claude Code session, so a new session searches OwlMem with `kb_find` before reading code. The hook runs
|
|
17
|
+
a copy of the CLI kept under `~/.config/owlmem/wake/`, so it never waits on npm.
|
|
15
18
|
|
|
16
19
|
| Option | |
|
|
17
20
|
|---|---|
|
|
@@ -29,7 +32,7 @@ page, where you sign in and click **Allow**. AI agents can read the setup guide
|
|
|
29
32
|
|
|
30
33
|
An AI on your computer normally sees a task only when someone opens it. Auto-wake starts it as soon as it gets one:
|
|
31
34
|
a small background program long-polls OwlMem and runs that AI's command line unattended — Claude Code with
|
|
32
|
-
`claude -p`, Codex with `codex exec`, Antigravity
|
|
35
|
+
`claude -p`, Codex with `codex exec`, Antigravity in the app already running on the computer (the desktop app, or the `agy --hub` language server inside VS Code), falling back to `agy -p` only when neither is running (on a Mac without `agy` it opens the app and re-sends the task), Hermes with `hermes -z`, DeepSeek Harness with `dsh --profile headless` (for Codex and Antigravity, which refuse tool calls when nobody is watching, auto-wake approves just the two OwlMem tools used to report back: in `~/.codex/config.toml` and, for the `agy -p` fallback only, `~/.gemini/antigravity-cli/settings.json`; for Hermes, only if OwlMem is marked `trust: untrusted`, under `command_allowlist` in `~/.hermes/config.yaml`; for DeepSeek Harness, its headless profile gets the model and the OwlMem server copied from the web profile, and its credential store turned back on, in `~/.dsh/profiles/headless/cordis.patch.yml`) — with the task as the prompt. The AI marks the task done or declined as usual. When a task it gave out is done or declined, it is woken too, to read the result. The program updates itself (from npm, when nothing is running).
|
|
33
36
|
|
|
34
37
|
When someone turns auto-wake on for an AI in the console and no computer runs it yet, that AI is told so the next time it connects:
|
|
35
38
|
with your OK it runs `npx -y owlmem wake enable` itself and sends you the pairing link to approve.
|
package/owlmem.mjs
CHANGED
|
@@ -44,7 +44,7 @@ import { fileURLToPath } from "node:url";
|
|
|
44
44
|
import { spawn, spawnSync } from "node:child_process";
|
|
45
45
|
import { createConnection } from "node:net";
|
|
46
46
|
|
|
47
|
-
export const VERSION = "0.9.
|
|
47
|
+
export const VERSION = "0.9.32";
|
|
48
48
|
const BASE = (process.env.OWLMEM_URL || "https://owlmem.com").replace(/\/$/, "");
|
|
49
49
|
const DIR = process.env.OWLMEM_HOME || join(process.env.XDG_CONFIG_HOME || join(homedir(), ".config"), "owlmem");
|
|
50
50
|
const enc = new TextEncoder(), dec = new TextDecoder();
|
|
@@ -514,11 +514,22 @@ async function mcpServe() {
|
|
|
514
514
|
await new Promise((res) => process.stdin.on("end", res));
|
|
515
515
|
}
|
|
516
516
|
|
|
517
|
+
// ── hook: output for a Claude Code hook ──
|
|
518
|
+
// `owlmem hook session-start` prints the SessionStart additionalContext: the first
|
|
519
|
+
// step of every task is kb_find, before reading code. It runs at every session start,
|
|
520
|
+
// so it must be fast and offline: no network, no sign-in, nothing on stderr, and it
|
|
521
|
+
// ignores whatever Claude Code sends on stdin.
|
|
522
|
+
export const SESSION_START_CONTEXT = "Before reading any code or files, search OwlMem with kb_find: it is the first step of every task. In Claude Code, load it first with ToolSearch select:mcp__owlmem__kb_find. Then read code, run commands, and save reusable findings with kb_write.";
|
|
523
|
+
function hookCmd(sub) {
|
|
524
|
+
if (sub !== "session-start") throw new Fail("Usage: owlmem hook session-start");
|
|
525
|
+
console.log(JSON.stringify({ hookSpecificOutput: { hookEventName: "SessionStart", additionalContext: SESSION_START_CONTEXT } }));
|
|
526
|
+
}
|
|
527
|
+
|
|
517
528
|
// ── install: connect the AI apps on this machine to OwlMem's MCP server ──
|
|
518
529
|
// The snippets here must say the same as the website (design/owlmem/site.py CODE); tests/test_owlmem_install.py compares them.
|
|
519
530
|
export const MCP_URL = "https://mcp.owlmem.com/mcp";
|
|
520
531
|
export const RULES = `## Team memory (OwlMem)
|
|
521
|
-
- Before
|
|
532
|
+
- Before reading code or files, search OwlMem with kb_find (documents, files and memory at once); use kb_search only for an exact string such as a commit id, a path or an error message.
|
|
522
533
|
- When you learn something reusable — a fix, a gotcha, a decision — save it with kb_write
|
|
523
534
|
under lessons/ or projects/<name>/. Search first and update the existing page instead of
|
|
524
535
|
creating a duplicate.
|
|
@@ -653,6 +664,42 @@ export function withRules(text, uninstall) {
|
|
|
653
664
|
return t.trim() ? t.replace(/\s*$/, "\n\n") + block : block;
|
|
654
665
|
}
|
|
655
666
|
|
|
667
|
+
// Claude Code SessionStart hook: ~/.claude/settings.json gets an entry that runs
|
|
668
|
+
// `owlmem hook session-start` at session start. No matcher, so it covers startup,
|
|
669
|
+
// resume, clear and compact alike. The command runs the copy of this script the
|
|
670
|
+
// waker keeps under ~/.config/owlmem/wake/ (wakeDir), not npx: npx would hit the
|
|
671
|
+
// network on every session start, and the npx cache can be cleaned out. install
|
|
672
|
+
// copies this script there when it adds the hook; --uninstall removes only our
|
|
673
|
+
// entry and leaves the copy (auto-wake runs it too).
|
|
674
|
+
export function sessionStartCommand() {
|
|
675
|
+
return `node ${join(wakeDir(), "owlmem.mjs")} hook session-start`;
|
|
676
|
+
}
|
|
677
|
+
function sessionStartFile() {
|
|
678
|
+
return join(process.env.CLAUDE_CONFIG_DIR || join(home(), ".claude"), "settings.json");
|
|
679
|
+
}
|
|
680
|
+
const isSessionStartOurs = (e) => (e?.hooks || []).some((h) => typeof h?.command === "string" && h.command.includes("owlmem") && h.command.includes("hook session-start"));
|
|
681
|
+
export function planSessionStartHook(uninstall) {
|
|
682
|
+
const file = sessionStartFile();
|
|
683
|
+
const text = readText(file);
|
|
684
|
+
let obj = {};
|
|
685
|
+
if (text !== null && text.trim()) {
|
|
686
|
+
try { obj = JSON.parse(text); } catch { return null; } // bad JSON: leave alone
|
|
687
|
+
if (!obj || typeof obj !== "object" || Array.isArray(obj)) return null;
|
|
688
|
+
}
|
|
689
|
+
if (obj.hooks !== undefined && (typeof obj.hooks !== "object" || Array.isArray(obj.hooks) || obj.hooks === null)) return null;
|
|
690
|
+
const hooks = obj.hooks || {};
|
|
691
|
+
if (hooks.SessionStart !== undefined && !Array.isArray(hooks.SessionStart)) return null;
|
|
692
|
+
const list = hooks.SessionStart || [];
|
|
693
|
+
if (uninstall) {
|
|
694
|
+
if (!list.some(isSessionStartOurs)) return null;
|
|
695
|
+
const next = { ...obj, hooks: { ...hooks, SessionStart: list.filter((e) => !isSessionStartOurs(e)) } };
|
|
696
|
+
return { file, text: JSON.stringify(next, null, 2) + "\n" };
|
|
697
|
+
}
|
|
698
|
+
if (list.some(isSessionStartOurs)) return null; // already installed
|
|
699
|
+
const next = { ...obj, hooks: { ...hooks, SessionStart: [...list, { hooks: [{ type: "command", command: sessionStartCommand() }] }] } };
|
|
700
|
+
return { file, text: JSON.stringify(next, null, 2) + "\n" };
|
|
701
|
+
}
|
|
702
|
+
|
|
656
703
|
export function plan(opts = {}) {
|
|
657
704
|
const only = opts.only ? new Set(opts.only) : null;
|
|
658
705
|
const out = [];
|
|
@@ -666,6 +713,13 @@ export function plan(opts = {}) {
|
|
|
666
713
|
if (after !== (before ?? "") && !(opts.uninstall && before === null)) { r.ops.push({ type: "write", file: c.rules, text: after, rules: true }); r.rulesChanged = true; }
|
|
667
714
|
r.rulesFile = c.rules;
|
|
668
715
|
}
|
|
716
|
+
if (c.id === "claude-code" && !opts.noRules && r.state !== "fail") {
|
|
717
|
+
const hop = planSessionStartHook(opts.uninstall);
|
|
718
|
+
if (hop) {
|
|
719
|
+
if (!opts.uninstall) r.ops.unshift({ type: "copy", file: join(wakeDir(), "owlmem.mjs") });
|
|
720
|
+
r.ops.push({ type: "write", file: hop.file, text: hop.text, hook: true });
|
|
721
|
+
}
|
|
722
|
+
}
|
|
669
723
|
out.push(r);
|
|
670
724
|
}
|
|
671
725
|
return out;
|
|
@@ -682,7 +736,11 @@ export function apply(items) {
|
|
|
682
736
|
r.backups = [];
|
|
683
737
|
try {
|
|
684
738
|
for (const op of r.ops) {
|
|
685
|
-
if (op.type === "
|
|
739
|
+
if (op.type === "copy") { // the SessionStart hook runs this script's wake copy, not npx
|
|
740
|
+
mkdirSync(dirname(op.file), { recursive: true });
|
|
741
|
+
const src = fileURLToPath(import.meta.url);
|
|
742
|
+
if (!existsSync(op.file) || readFileSync(op.file, "utf8") !== readFileSync(src, "utf8")) copyFileSync(src, op.file);
|
|
743
|
+
} else if (op.type === "write") {
|
|
686
744
|
mkdirSync(dirname(op.file), { recursive: true });
|
|
687
745
|
if (existsSync(op.file)) { const b = op.file + ".bak-owlmem-" + ts; copyFileSync(op.file, b); r.backups.push(b); }
|
|
688
746
|
writeFileSync(op.file, op.text);
|
|
@@ -710,6 +768,7 @@ function describe(r, done, uninstall) {
|
|
|
710
768
|
for (const op of r.ops) {
|
|
711
769
|
if (op.type === "run" && !done) lines.push(" run: " + op.argv.join(" "));
|
|
712
770
|
if (op.rules) lines.push(` ${done ? "" : "will "}${uninstall ? (done ? "removed" : "remove") : (done ? "wrote" : "write")} the OwlMem rules block in ${tilde(op.file)}`);
|
|
771
|
+
if (op.hook) lines.push(` ${done ? "" : "will "}${uninstall ? (done ? "removed" : "remove") : (done ? "added" : "add")} the SessionStart hook in ${tilde(op.file)}`);
|
|
713
772
|
}
|
|
714
773
|
if (done && r.backups?.length) lines.push(" backup: " + r.backups.join(", "));
|
|
715
774
|
return lines.join("\n");
|
|
@@ -1362,18 +1421,29 @@ export function foregroundMethods(client, cfg = {}) {
|
|
|
1362
1421
|
return [];
|
|
1363
1422
|
}
|
|
1364
1423
|
|
|
1424
|
+
// The project directory a job routes by (0.9.32, #4596): a task or a note names it in its own text
|
|
1425
|
+
// (full trust only — outside work never picks a terminal); a reply routes by the task it answers,
|
|
1426
|
+
// never by its own text. Null means "any terminal, as before".
|
|
1427
|
+
export function foregroundDir(task, h = home()) {
|
|
1428
|
+
if (task.trust !== TRUST_FULL) return null;
|
|
1429
|
+
if (isReply(task)) return task.task_cwd ? taskDir("cwd: " + task.task_cwd, h) : null;
|
|
1430
|
+
return taskDir(task.body, h);
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1365
1433
|
// Short wake note for a foreground session: what arrived, and to read it with kb_inbox (that marks it
|
|
1366
1434
|
// read). Not the full payload — the session reads the rest itself.
|
|
1367
1435
|
export function foregroundNote(task, o = {}) {
|
|
1368
1436
|
const mins = o.timeout_min || WAKE_DEFAULTS.timeout_min;
|
|
1369
1437
|
if (isReply(task)) {
|
|
1370
1438
|
const done = task.result === "done";
|
|
1371
|
-
|
|
1372
|
-
|
|
1439
|
+
// 0.9.32 (#4596): name the one item (kb_inbox id=N), so the session reads and marks only that one —
|
|
1440
|
+
// a plain kb_inbox would read and mark another project's mail.
|
|
1441
|
+
if (task.zh) return `奥麦自动唤醒:回信 #${task.id}——你派的任务 #${task.task_id}「${task.task_title || ""}」有了结果:${shortName(task.by)}${done ? "完成" : "拒绝"}了。用 kb_inbox id=${task.id} 看这封回信(会标成已读);需要接着做(换人派、把结果告诉站长、自己补做)就做,没有要做的就结束,不要发消息。`;
|
|
1442
|
+
return `OwlMem auto-wake: reply #${task.id} — the task you gave out, #${task.task_id} "${task.task_title || ""}", was ${done ? "finished" : "declined"} by ${shortName(task.by)}. Read it with kb_inbox id=${task.id} (that marks it read); if something needs doing next, do it, otherwise just end and don't send any message.`;
|
|
1373
1443
|
}
|
|
1374
1444
|
if (isNote(task)) {
|
|
1375
|
-
if (task.zh) return `奥麦自动唤醒:留言 #${task.id}——${shortName(task.from)}:${task.title}。用 kb_inbox 看这条留言(会标成已读);要你做事就做完、用 kb_send 回结果,不用做就结束,不要发消息。`;
|
|
1376
|
-
return `OwlMem auto-wake: note #${task.id} from ${shortName(task.from)}: ${task.title}. Read it with kb_inbox (that marks it read); if it asks you to do something, do it and report back with kb_send, otherwise just end and don't send a message.`;
|
|
1445
|
+
if (task.zh) return `奥麦自动唤醒:留言 #${task.id}——${shortName(task.from)}:${task.title}。用 kb_inbox id=${task.id} 看这条留言(会标成已读);要你做事就做完、用 kb_send 回结果,不用做就结束,不要发消息。`;
|
|
1446
|
+
return `OwlMem auto-wake: note #${task.id} from ${shortName(task.from)}: ${task.title}. Read it with kb_inbox id=${task.id} (that marks it read); if it asks you to do something, do it and report back with kb_send, otherwise just end and don't send a message.`;
|
|
1377
1447
|
}
|
|
1378
1448
|
if (task.zh) return `奥麦自动唤醒:任务 #${task.id}「${task.title}」等你处理(${shortName(task.from)}派来)。用 kb_task_update 接(doing),做完标 done、做不了标 declined,结果写进 note。你有 ${mins} 分钟。`;
|
|
1379
1449
|
return `OwlMem auto-wake: task #${task.id} "${task.title}" is waiting for you (from ${shortName(task.from)}). Take it with kb_task_update (doing), mark it done when finished or declined if you can't, with the result in the note. You have ${mins} minutes.`;
|
|
@@ -1414,7 +1484,12 @@ export function listClaudeSessions(o = {}) {
|
|
|
1414
1484
|
if (!pid || !alivePid(pid, o)) continue;
|
|
1415
1485
|
let mtime = 0;
|
|
1416
1486
|
try { mtime = statSync(sock).mtimeMs; } catch {}
|
|
1417
|
-
|
|
1487
|
+
// 0.9.32 (#4596): the session's working directory (realpath, "" when the record has none) and its
|
|
1488
|
+
// busy/idle status, so a woken job can be routed to the terminal working in its project.
|
|
1489
|
+
let cwd = "";
|
|
1490
|
+
if (typeof rec.cwd === "string" && rec.cwd) { try { cwd = realpathSync(rec.cwd); } catch {} }
|
|
1491
|
+
out.push({ pid, sock, name: typeof rec.name === "string" ? rec.name : "", updatedAt: Number(rec.updatedAt) || 0, mtime,
|
|
1492
|
+
cwd, status: typeof rec.status === "string" ? rec.status : "" });
|
|
1418
1493
|
}
|
|
1419
1494
|
out.sort((a, b) => (b.updatedAt - a.updatedAt) || (b.mtime - a.mtime) || (b.pid - a.pid));
|
|
1420
1495
|
return out;
|
|
@@ -1472,12 +1547,47 @@ export async function sendClaudeSocket(sock, text, o = {}) {
|
|
|
1472
1547
|
});
|
|
1473
1548
|
}
|
|
1474
1549
|
|
|
1475
|
-
//
|
|
1550
|
+
// A directory's git repository, by its common git dir (0.9.32, #4596): the same repository from any
|
|
1551
|
+
// subfolder and from any of its worktrees resolves to the same realpath. Null when the directory is
|
|
1552
|
+
// not in a git repository (or doesn't exist). `git rev-parse --git-common-dir` prints a path relative
|
|
1553
|
+
// to the directory it ran in (".git", "../.git") or absolute (a worktree), so resolve it against `dir`.
|
|
1554
|
+
function gitCommonDir(dir, git = gitRun) {
|
|
1555
|
+
let st = null; try { st = statSync(dir); } catch {}
|
|
1556
|
+
if (!st || !st.isDirectory()) return null;
|
|
1557
|
+
const r = git(["-C", dir, "rev-parse", "--git-common-dir"]);
|
|
1558
|
+
if (!r.ok || !r.out) return null;
|
|
1559
|
+
const common = r.out.split("\n")[0].trim();
|
|
1560
|
+
if (!common) return null;
|
|
1561
|
+
const abs = isAbsolute(common) ? common : join(dir, common);
|
|
1562
|
+
try { return realpathSync(abs); } catch { return null; }
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
// Is a session's working directory inside the job's project? A git repository counts as one project
|
|
1566
|
+
// across its subfolders and all its worktrees (same git-common-dir); a plain folder means that folder
|
|
1567
|
+
// or below it, matched on a path-segment boundary, so a sibling that only starts the same ("elsewhere"
|
|
1568
|
+
// vs "else") is not inside.
|
|
1569
|
+
function inProject(sessionCwd, dir, git = gitRun) {
|
|
1570
|
+
const dirGit = gitCommonDir(dir, git);
|
|
1571
|
+
if (dirGit) return gitCommonDir(sessionCwd, git) === dirGit;
|
|
1572
|
+
return sessionCwd === dir || sessionCwd.startsWith(dir + "/");
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
// claude-socket: idle sessions before busy ones, then most recently active; the next if a socket won't
|
|
1576
|
+
// take it. With o.dir, only sessions working in that project; no session there fails and sends nothing
|
|
1577
|
+
// anywhere, so a job never lands in another project's terminal (#4596).
|
|
1476
1578
|
export async function deliverClaudeSocket(note, o = {}) {
|
|
1477
1579
|
const sessions = listClaudeSessions(o);
|
|
1478
|
-
|
|
1580
|
+
let dir = null;
|
|
1581
|
+
if (o.dir) { try { dir = realpathSync(o.dir); } catch { dir = o.dir; } }
|
|
1582
|
+
let pool = sessions;
|
|
1583
|
+
if (dir) {
|
|
1584
|
+
pool = sessions.filter((s) => s.cwd && inProject(s.cwd, dir));
|
|
1585
|
+
if (!pool.length) return { ok: false, detail: "no Claude Code session in " + dir };
|
|
1586
|
+
}
|
|
1587
|
+
if (!pool.length) return { ok: false, detail: "no live Claude Code session on this computer" };
|
|
1588
|
+
pool.sort((a, b) => ((a.status === "idle" ? 0 : 1) - (b.status === "idle" ? 0 : 1)) || (b.updatedAt - a.updatedAt) || (b.mtime - a.mtime) || (b.pid - a.pid));
|
|
1479
1589
|
const tried = [];
|
|
1480
|
-
for (const s of
|
|
1590
|
+
for (const s of pool) {
|
|
1481
1591
|
const r = await sendClaudeSocket(s.sock, note, o);
|
|
1482
1592
|
if (r.ok) return { ok: true, detail: "Claude Code session " + (s.name || s.pid) };
|
|
1483
1593
|
tried.push((s.name || s.pid) + ": " + r.detail);
|
|
@@ -1510,11 +1620,15 @@ export async function runForegroundCommand(method, text, o = {}) {
|
|
|
1510
1620
|
}
|
|
1511
1621
|
|
|
1512
1622
|
// Try the configured foreground methods in order; the first success counts as delivered.
|
|
1623
|
+
// The job's project directory (foregroundDir, or o.projectDir when the caller already worked it out)
|
|
1624
|
+
// is passed to the socket method, so it only goes to a session in that project (#4596); without one,
|
|
1625
|
+
// any session, as before. o.dir here is the wake directory, not the project — never pass it through.
|
|
1513
1626
|
export async function deliverForeground(task, cfg, o = {}) {
|
|
1514
1627
|
const note = o.note ?? foregroundNote(task, { timeout_min: cfg.timeout_min });
|
|
1628
|
+
const dir = o.projectDir !== undefined ? o.projectDir : foregroundDir(task, o.home);
|
|
1515
1629
|
const tried = [];
|
|
1516
1630
|
for (const m of foregroundMethods(task.client, cfg)) {
|
|
1517
|
-
const r = m.type === "claude-socket" ? await deliverClaudeSocket(note, o) : await runForegroundCommand(m, note, o);
|
|
1631
|
+
const r = m.type === "claude-socket" ? await deliverClaudeSocket(note, { ...o, dir }) : await runForegroundCommand(m, note, o);
|
|
1518
1632
|
if (r.ok) return { ok: true, method: m.type, detail: r.detail || "" };
|
|
1519
1633
|
tried.push(m.type + ": " + (r.detail || "failed"));
|
|
1520
1634
|
}
|
|
@@ -1579,7 +1693,9 @@ export async function runTask(task, cfg, o = {}) {
|
|
|
1579
1693
|
const methods = foregroundMethods(task.client, cfg);
|
|
1580
1694
|
if (task.foreground_tried) log("Foreground delivery was already tried for " + jobLabel(task) + "; starting a headless session."); // #1870:前台送过一次没接,这次直接无头
|
|
1581
1695
|
else if (methods.length) {
|
|
1582
|
-
|
|
1696
|
+
// #4596: the job's project directory rides along, so it only goes to a session in that project;
|
|
1697
|
+
// no session there fails the foreground step and the job starts headless, as before (one log line).
|
|
1698
|
+
const d = await deliverForeground(task, cfg, { ...o, projectDir: foregroundDir(task, o.home || home()) });
|
|
1583
1699
|
if (d.ok) return { outcome: "foreground", detail: "delivered to the foreground (" + d.method + (d.detail ? ": " + d.detail : "") + ")" };
|
|
1584
1700
|
log("Foreground delivery failed for " + jobLabel(task) + " (" + d.detail + "); starting a headless session.");
|
|
1585
1701
|
}
|
|
@@ -2415,7 +2531,8 @@ const INSTALL_HELP = `Usage: npx -y owlmem install [options]
|
|
|
2415
2531
|
|
|
2416
2532
|
Connects Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI and Claude Desktop on this computer to
|
|
2417
2533
|
OwlMem (${MCP_URL}). Config files are merged, never overwritten; each changed file is backed up first
|
|
2418
|
-
as <file>.bak-owlmem-<time>. Also adds the OwlMem usage rules to CLAUDE.md / AGENTS.md / GEMINI.md
|
|
2534
|
+
as <file>.bak-owlmem-<time>. Also adds the OwlMem usage rules to CLAUDE.md / AGENTS.md / GEMINI.md, and a
|
|
2535
|
+
SessionStart hook to ~/.claude/settings.json so new Claude Code sessions search OwlMem before reading code.
|
|
2419
2536
|
|
|
2420
2537
|
--dry-run show what would change, change nothing
|
|
2421
2538
|
--yes, -y don't ask (non-interactive runs, e.g. an AI running this, never ask)
|
|
@@ -2434,6 +2551,7 @@ export async function main(argv) {
|
|
|
2434
2551
|
if (cmd === "uninstall") { await install(["--uninstall", ...argv.slice(1)]); return; }
|
|
2435
2552
|
if (cmd === "mcp") { await mcpServe(); return; }
|
|
2436
2553
|
if (cmd === "wake") { await wakeCmd(sub, rest); return; }
|
|
2554
|
+
if (cmd === "hook") { hookCmd(sub); return; }
|
|
2437
2555
|
if (cmd === "inbox") { // for a scheduled script (11-02): how many notes / tasks wait for this AI, without reading them (nothing is marked read)
|
|
2438
2556
|
const check = argv.includes("--check");
|
|
2439
2557
|
let r, data = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "owlmem",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.32",
|
|
4
4
|
"description": "OwlMem command line: connect your AI apps to OwlMem in one command (npx -y owlmem install), an end-to-end encrypted vault for your AI agents, and a local MCP server.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": { "owlmem": "owlmem.mjs" },
|