owlmem 0.7.2 → 0.7.3

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 (3) hide show
  1. package/README.md +1 -1
  2. package/owlmem.mjs +14 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -29,7 +29,7 @@ page, where you sign in and click **Allow**. AI agents can read the setup guide
29
29
 
30
30
  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
31
  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 with `agy -p` (auto-wake adds two allow rules for its OwlMem reporting tools to `~/.gemini/antigravity-cli/settings.json`) — with the task as the prompt. The AI marks the task done or declined as usual.
32
+ `claude -p`, Codex with `codex exec`, Antigravity with `agy -p` (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 `~/.gemini/antigravity-cli/settings.json`) — with the task as the prompt. The AI marks the task done or declined as usual.
33
33
 
34
34
  ```sh
35
35
  npx -y owlmem install --wake # or answer "y" when install asks; --yes alone leaves it off
package/owlmem.mjs CHANGED
@@ -39,7 +39,7 @@ import { join, dirname, basename, relative, isAbsolute } from "node:path";
39
39
  import { fileURLToPath } from "node:url";
40
40
  import { spawn, spawnSync } from "node:child_process";
41
41
 
42
- export const VERSION = "0.7.2";
42
+ export const VERSION = "0.7.3";
43
43
  const BASE = (process.env.OWLMEM_URL || "https://owlmem.com").replace(/\/$/, "");
44
44
  const DIR = process.env.OWLMEM_HOME || join(process.env.XDG_CONFIG_HOME || join(homedir(), ".config"), "owlmem");
45
45
  const enc = new TextEncoder(), dec = new TextDecoder();
@@ -815,6 +815,18 @@ export function wakeBin(c, home_ = home(), exists = existsSync) {
815
815
  const p = c.home && join(home_, ...c.home);
816
816
  return p && exists(p) ? p : null;
817
817
  }
818
+ // codex exec runs with approval "never", so an MCP call that needs approval is refused: approve just the two OwlMem
819
+ // tools it needs to report back, as tool tables under the [mcp_servers.owlmem] that install wrote (append only)
820
+ export function allowCodex(home_ = home()) {
821
+ const f = join(process.env.CODEX_HOME || join(home_, ".codex"), "config.toml");
822
+ let t; try { t = readFileSync(f, "utf8"); } catch { return false; }
823
+ if (!/^\[mcp_servers\.owlmem\]\s*$/m.test(t)) return false;
824
+ const add = ["kb_task_update", "kb_inbox"].filter((n) => !new RegExp("^\\[mcp_servers\\.owlmem\\.tools\\." + n + "\\]\\s*$", "m").test(t));
825
+ if (!add.length) return false;
826
+ writeFileSync(f, t.replace(/\n*$/, "\n") + "\n# OwlMem auto-wake: unattended codex exec may call these two OwlMem tools to report back\n" +
827
+ add.map((n) => `[mcp_servers.owlmem.tools.${n}]\napproval_mode = "approve"\n`).join("\n"));
828
+ return true;
829
+ }
818
830
  // Antigravity's CLI reads ~/.gemini/antigravity-cli/settings.json: add only the two rules it needs to report back
819
831
  export function allowAntigravity(home_ = home()) {
820
832
  const f = join(home_, ".gemini", "antigravity-cli", "settings.json"), need = ["mcp(owlmem/kb_task_update)", "mcp(owlmem/kb_inbox)"];
@@ -1158,6 +1170,7 @@ async function wakeEnable(args = []) {
1158
1170
  }
1159
1171
  if (!Object.keys(clients).length)
1160
1172
  throw new Fail("No AI command line found on this computer that auto-wake can start (Claude Code: claude, Codex: codex, Antigravity: agy). Install one, or add its command to " + wakeFile() + " under \"clients\".");
1173
+ if (clients.codex && allowCodex()) say("Let Codex report back to OwlMem when nobody is watching (2 tool approvals in ~/.codex/config.toml).");
1161
1174
  if (clients.antigravity && allowAntigravity()) say("Let Antigravity's command line report back to OwlMem when nobody is watching (2 rules in ~/.gemini/antigravity-cli/settings.json).");
1162
1175
  const cfg = { v: 1, ...WAKE_DEFAULTS, ...old, machine: process.env.OWLMEM_DEVICE_NAME || hostname(), clients, ...(max ? { max_parallel: max } : {}), ...(timeout ? { timeout_min: timeout } : {}), boot: boot || !!old.boot };
1163
1176
  // OwlMem knows these app names; a command you add yourself to wake.json goes under "gemini" or "custom"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "owlmem",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
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" },