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.
- package/extensions/index.ts +16 -2
- package/package.json +1 -1
package/extensions/index.ts
CHANGED
|
@@ -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
|
|
6
|
-
|
|
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
|
|