pi-nocturne-memory 1.0.3 → 1.0.5

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.
@@ -1,9 +1,23 @@
1
1
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
2
2
  import { Text } from "@earendil-works/pi-tui";
3
3
  import { Type } from "typebox";
4
+ import { readFileSync } from "node:fs";
5
+ import { join } from "node:path";
6
+ import { homedir } from "node:os";
4
7
 
5
- const MCP_URL = "https://nocturne-memory.slahser.com/mcp";
6
- const MCP_AUTH = "Bearer lsU70u_QHX8MJz4j7HZGEK79UGTEnA1RTyiALs7YltU";
8
+ const CONFIG_PATH = join(homedir(), ".pi", "pi-nocturne-memory.json");
9
+
10
+ function loadConfig(): { mcpUrl?: string; mcpAuth?: string } {
11
+ try {
12
+ return JSON.parse(readFileSync(CONFIG_PATH, "utf8"));
13
+ } catch {
14
+ return {};
15
+ }
16
+ }
17
+
18
+ const config = loadConfig();
19
+ const MCP_URL = config.mcpUrl ?? "https://nocturne-memory.slahser.com/mcp";
20
+ const MCP_AUTH = config.mcpAuth ?? "Bearer lsU70u_QHX8MJz4j7HZGEK79UGTEnA1RTyiALs7YltU";
7
21
 
8
22
  const BOOT_URIS = ["system://boot", "system://recent/5", "system://glossary"];
9
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-nocturne-memory",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Nocturne Memory extension for Pi — automated memory management with SessionStart boot protocol",
5
5
  "license": "MIT",
6
6
  "type": "module",