owlmem 0.9.9 → 0.9.10
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/owlmem.mjs +10 -5
- package/package.json +1 -1
package/owlmem.mjs
CHANGED
|
@@ -43,7 +43,7 @@ import { join, dirname, basename, relative, isAbsolute } from "node:path";
|
|
|
43
43
|
import { fileURLToPath } from "node:url";
|
|
44
44
|
import { spawn, spawnSync } from "node:child_process";
|
|
45
45
|
|
|
46
|
-
export const VERSION = "0.9.
|
|
46
|
+
export const VERSION = "0.9.10";
|
|
47
47
|
const BASE = (process.env.OWLMEM_URL || "https://owlmem.com").replace(/\/$/, "");
|
|
48
48
|
const DIR = process.env.OWLMEM_HOME || join(process.env.XDG_CONFIG_HOME || join(homedir(), ".config"), "owlmem");
|
|
49
49
|
const enc = new TextEncoder(), dec = new TextDecoder();
|
|
@@ -807,7 +807,12 @@ function nextSteps(items, out) {
|
|
|
807
807
|
// the program removes its own autostart entry and exits.
|
|
808
808
|
// The OwlMem tools an unattended wake run may call without asking: answer the task, read its inbox, and send (report the
|
|
809
809
|
// result to its person, hand work on). 0.7.8 added kb_send (站长 10-28).
|
|
810
|
-
|
|
810
|
+
// 0.9.10 (11-02): the team rules say look things up before starting and write back when done, so a woken AI calls kb_search
|
|
811
|
+
// first; headless Antigravity was soft-denied on that call and quit without a word (task #370). Reading tools and the two
|
|
812
|
+
// write-back tools join; nothing that deletes or moves (kb_delete, kb_forget, kb_move, kb_file_*) does.
|
|
813
|
+
export const WAKE_TOOLS = ["kb_task_update", "kb_inbox", "kb_send",
|
|
814
|
+
"kb_search", "kb_recall", "kb_read", "kb_list", "kb_thread", "kb_team", "kb_notices", "kb_infra", "kb_mon_alerts", "kb_mon_query",
|
|
815
|
+
"kb_write", "kb_retain"];
|
|
811
816
|
export const WAKE_CLIENTS = {
|
|
812
817
|
"claude-code": { name: "Claude Code", bin: "claude",
|
|
813
818
|
// -p runs one prompt and exits; it may only use the OwlMem tools in WAKE_TOOLS, beyond what your own settings allow
|
|
@@ -1220,7 +1225,7 @@ export async function runTask(task, cfg, o = {}) {
|
|
|
1220
1225
|
let ch, timedOut = false, killer = null;
|
|
1221
1226
|
try {
|
|
1222
1227
|
ch = spawn(argv[0], argv.slice(1), { cwd: place.cwd, stdio: ["pipe", fd, fd], detached: !win, shell: win, windowsHide: true,
|
|
1223
|
-
env: { ...process.env, OWLMEM_NO_BROWSER: "1", [isReply(task) ? "OWLMEM_WAKE_REPLY" : isNote(task) ? "OWLMEM_WAKE_NOTE" : "OWLMEM_WAKE_TASK"]: String(task.id) } });
|
|
1228
|
+
env: { ...Object.fromEntries(Object.entries(process.env).filter(([k]) => !k.startsWith("OWLMEM_WAKE_"))), OWLMEM_NO_BROWSER: "1", [isReply(task) ? "OWLMEM_WAKE_REPLY" : isNote(task) ? "OWLMEM_WAKE_NOTE" : "OWLMEM_WAKE_TASK"]: String(task.id) } });
|
|
1224
1229
|
} catch (e) { res({ outcome: "error", detail: "couldn't start " + argv[0] + ": " + e.message }); return; }
|
|
1225
1230
|
const kill = (sig) => { try { if (win) spawnSync("taskkill", ["/T", "/F", "/PID", String(ch.pid)]); else process.kill(-ch.pid, sig); } catch { try { ch.kill(sig); } catch {} } };
|
|
1226
1231
|
const timer = setTimeout(() => { timedOut = true; kill("SIGTERM"); killer = setTimeout(() => kill("SIGKILL"), 10000); }, ms);
|
|
@@ -1407,11 +1412,11 @@ function wakeLogger(dir = DIR) {
|
|
|
1407
1412
|
};
|
|
1408
1413
|
}
|
|
1409
1414
|
|
|
1410
|
-
// Computers set up before a tool joined WAKE_TOOLS (0.7.8: kb_send) catch up when the program starts after its self-update:
|
|
1415
|
+
// Computers set up before a tool joined WAKE_TOOLS (0.7.8: kb_send; 0.9.10: reading and write-back) catch up when the program starts after its self-update:
|
|
1411
1416
|
// Claude Code's --allowedTools in wake.json if it is still one we wrote, and the other apps' own settings (append only).
|
|
1412
1417
|
// Returns true when wake.json changed.
|
|
1413
1418
|
export function wakeTools(cfg, home_ = home(), env = process.env) {
|
|
1414
|
-
const ours = ["mcp__owlmem__kb_task_update,mcp__owlmem__kb_inbox"], now = WAKE_TOOLS.map((n) => "mcp__owlmem__" + n).join(",");
|
|
1419
|
+
const ours = ["mcp__owlmem__kb_task_update,mcp__owlmem__kb_inbox", "mcp__owlmem__kb_task_update,mcp__owlmem__kb_inbox,mcp__owlmem__kb_send"], now = WAKE_TOOLS.map((n) => "mcp__owlmem__" + n).join(",");
|
|
1415
1420
|
const cmd = cfg.clients?.["claude-code"]?.command, i = Array.isArray(cmd) ? cmd.indexOf("--allowedTools") : -1;
|
|
1416
1421
|
let changed = false;
|
|
1417
1422
|
if (i >= 0 && ours.includes(cmd[i + 1])) { cmd[i + 1] = now; changed = true; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "owlmem",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.10",
|
|
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" },
|