owlmem 0.9.37 → 0.9.38
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 +7 -3
- package/package.json +1 -1
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.38";
|
|
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();
|
|
@@ -772,8 +772,12 @@ function sessionStartFile() {
|
|
|
772
772
|
// The context meter (Stop + UserPromptSubmit): ~/.claude/settings.json gets entries that
|
|
773
773
|
// run `owlmem hook context-meter` after each reply and before each prompt, showing the
|
|
774
774
|
// measured context length. Same shape as the SessionStart hook, no matcher.
|
|
775
|
-
export function contextMeterCommand() {
|
|
776
|
-
|
|
775
|
+
export function contextMeterCommand(o = {}) {
|
|
776
|
+
// Same quoting as sessionStartCommand: a user name with spaces would otherwise split the
|
|
777
|
+
// path. On Windows the hook runs in Git Bash, so the path uses forward slashes there.
|
|
778
|
+
let p = join(o.dir ? join(o.dir, "wake") : wakeDir(), "owlmem.mjs");
|
|
779
|
+
if ((o.platform || platform()) === "win32") p = p.replace(/\\/g, "/");
|
|
780
|
+
return `node "${p}" hook context-meter`;
|
|
777
781
|
}
|
|
778
782
|
const isSessionStartOurs = (e) => (e?.hooks || []).some((h) => typeof h?.command === "string" && h.command.includes("owlmem") && h.command.includes("hook session-start"));
|
|
779
783
|
const isContextMeterOurs = (e) => (e?.hooks || []).some((h) => typeof h?.command === "string" && h.command.includes("owlmem") && h.command.includes("hook context-meter"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "owlmem",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.38",
|
|
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" },
|