owlmem 0.9.7 → 0.9.9
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 +13 -1
- package/package.json +1 -1
package/owlmem.mjs
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
// Claude Desktop on this computer to OwlMem (npx -y owlmem install)
|
|
11
11
|
// owlmem wake enable|disable|status auto-wake: start the AI on this computer when it gets a task (runs from login)
|
|
12
12
|
// owlmem login save this agent's token (from the console)
|
|
13
|
+
// owlmem inbox [--check] how many tasks / notes wait for this AI, without reading them; --check exits 0
|
|
14
|
+
// when something waits, 1 when nothing does (for a scheduled script: start the AI only then)
|
|
13
15
|
// owlmem vault unlock paste the recovery code once per machine
|
|
14
16
|
// owlmem vault ls
|
|
15
17
|
// owlmem vault get <name> [field] prints the item (or one field) to stdout
|
|
@@ -41,7 +43,7 @@ import { join, dirname, basename, relative, isAbsolute } from "node:path";
|
|
|
41
43
|
import { fileURLToPath } from "node:url";
|
|
42
44
|
import { spawn, spawnSync } from "node:child_process";
|
|
43
45
|
|
|
44
|
-
export const VERSION = "0.9.
|
|
46
|
+
export const VERSION = "0.9.9";
|
|
45
47
|
const BASE = (process.env.OWLMEM_URL || "https://owlmem.com").replace(/\/$/, "");
|
|
46
48
|
const DIR = process.env.OWLMEM_HOME || join(process.env.XDG_CONFIG_HOME || join(homedir(), ".config"), "owlmem");
|
|
47
49
|
const enc = new TextEncoder(), dec = new TextDecoder();
|
|
@@ -1796,6 +1798,16 @@ export async function main(argv) {
|
|
|
1796
1798
|
if (cmd === "uninstall") { await install(["--uninstall", ...argv.slice(1)]); return; }
|
|
1797
1799
|
if (cmd === "mcp") { await mcpServe(); return; }
|
|
1798
1800
|
if (cmd === "wake") { await wakeCmd(sub, rest); return; }
|
|
1801
|
+
if (cmd === "inbox") { // for a scheduled script (11-02): how many notes / tasks wait for this AI, without reading them (nothing is marked read)
|
|
1802
|
+
const check = argv.includes("--check");
|
|
1803
|
+
let r, data = {};
|
|
1804
|
+
try { r = await fetch(BASE + "/v1/inbox", { headers: { Authorization: "Bearer " + token(), "User-Agent": "owlmem-cli/" + VERSION } }); data = await r.json().catch(() => ({})); }
|
|
1805
|
+
catch (e) { say("Can't reach OwlMem (" + BASE + "): " + e.message); process.exitCode = 2; return; }
|
|
1806
|
+
if (r.status >= 400) { say(data.detail || data.error || "HTTP " + r.status); process.exitCode = 2; return; }
|
|
1807
|
+
if (!check || data.work) console.log(data.work ? `${data.tasks} task(s), ${data.notes} unread note(s) waiting.` : "Nothing waiting.");
|
|
1808
|
+
if (check) process.exitCode = data.work ? 0 : 1; // owlmem inbox --check && <start your AI>
|
|
1809
|
+
return;
|
|
1810
|
+
}
|
|
1799
1811
|
if (cmd === "device") { // show this machine's fingerprint (the console lists approved computers with it)
|
|
1800
1812
|
const r = await call("POST", "device", {});
|
|
1801
1813
|
if (r.status >= 400) throw new Fail(r.data.detail || r.data.error || "HTTP " + r.status);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "owlmem",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.9",
|
|
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" },
|