openalmanac 0.2.18 → 0.2.19
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/dist/setup.js +8 -4
- package/package.json +1 -1
package/dist/setup.js
CHANGED
|
@@ -60,6 +60,11 @@ const TOOL_GROUPS = [
|
|
|
60
60
|
"Edit(~/.openalmanac/**)",
|
|
61
61
|
],
|
|
62
62
|
},
|
|
63
|
+
{
|
|
64
|
+
name: "Web Access",
|
|
65
|
+
description: "web search & fetch used during research",
|
|
66
|
+
tools: ["WebSearch", "WebFetch"],
|
|
67
|
+
},
|
|
63
68
|
];
|
|
64
69
|
/* ── ANSI helpers ───────────────────────────────────────────────── */
|
|
65
70
|
const RST = "\x1b[0m";
|
|
@@ -73,7 +78,7 @@ const MAGENTA = "\x1b[35m";
|
|
|
73
78
|
const WHITE_BOLD = "\x1b[1;37m";
|
|
74
79
|
/* ── File helpers ───────────────────────────────────────────────── */
|
|
75
80
|
const CLAUDE_DIR = join(homedir(), ".claude");
|
|
76
|
-
const
|
|
81
|
+
const CLAUDE_JSON = join(homedir(), ".claude.json");
|
|
77
82
|
const SETTINGS_JSON = join(CLAUDE_DIR, "settings.json");
|
|
78
83
|
function ensureDir(dir) {
|
|
79
84
|
if (!existsSync(dir))
|
|
@@ -92,9 +97,8 @@ function writeJson(path, data) {
|
|
|
92
97
|
}
|
|
93
98
|
/* ── Step 1 — MCP server ───────────────────────────────────────── */
|
|
94
99
|
function configureMcp() {
|
|
95
|
-
ensureDir(CLAUDE_DIR);
|
|
96
100
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
97
|
-
const cfg = readJson(
|
|
101
|
+
const cfg = readJson(CLAUDE_JSON);
|
|
98
102
|
if (!cfg.mcpServers)
|
|
99
103
|
cfg.mcpServers = {};
|
|
100
104
|
const cur = cfg.mcpServers.almanac;
|
|
@@ -103,7 +107,7 @@ function configureMcp() {
|
|
|
103
107
|
return false; // already set
|
|
104
108
|
}
|
|
105
109
|
cfg.mcpServers.almanac = { command: "npx", args: ["-y", "openalmanac"] };
|
|
106
|
-
writeJson(
|
|
110
|
+
writeJson(CLAUDE_JSON, cfg);
|
|
107
111
|
return true;
|
|
108
112
|
}
|
|
109
113
|
/* ── Step 2 — Permissions ──────────────────────────────────────── */
|