fathom-mcp 0.1.4 → 0.1.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/package.json +1 -1
- package/src/cli.js +5 -1
- package/src/config.js +3 -0
- package/src/index.js +1 -0
- package/src/server-client.js +2 -1
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -142,6 +142,9 @@ async function runInit() {
|
|
|
142
142
|
// 3. Description (optional)
|
|
143
143
|
const description = await ask(rl, " Workspace description (optional)", "");
|
|
144
144
|
|
|
145
|
+
// 3b. Architecture/platform (optional)
|
|
146
|
+
const architecture = await ask(rl, " Architecture/platform (e.g., claude-code, diffusion)", "");
|
|
147
|
+
|
|
145
148
|
// 4. Server URL
|
|
146
149
|
const serverUrl = await ask(rl, " Fathom server URL", "http://localhost:4243");
|
|
147
150
|
|
|
@@ -165,6 +168,7 @@ async function runInit() {
|
|
|
165
168
|
server: serverUrl,
|
|
166
169
|
apiKey,
|
|
167
170
|
description,
|
|
171
|
+
architecture,
|
|
168
172
|
hooks: {
|
|
169
173
|
"vault-recall": { enabled: enableRecallHook },
|
|
170
174
|
"precompact-snapshot": { enabled: enablePrecompactHook },
|
|
@@ -254,7 +258,7 @@ async function runInit() {
|
|
|
254
258
|
const regClient = createClient({ server: serverUrl, apiKey, workspace });
|
|
255
259
|
const isUp = await regClient.healthCheck();
|
|
256
260
|
if (isUp) {
|
|
257
|
-
const regResult = await regClient.registerWorkspace(workspace, cwd, { vault, description });
|
|
261
|
+
const regResult = await regClient.registerWorkspace(workspace, cwd, { vault, description, architecture });
|
|
258
262
|
if (regResult.ok) {
|
|
259
263
|
console.log(` ✓ Registered workspace "${workspace}" with server`);
|
|
260
264
|
} else if (regResult.error) {
|
package/src/config.js
CHANGED
|
@@ -18,6 +18,7 @@ const DEFAULTS = {
|
|
|
18
18
|
server: "http://localhost:4243",
|
|
19
19
|
apiKey: "",
|
|
20
20
|
description: "",
|
|
21
|
+
architecture: "",
|
|
21
22
|
hooks: {
|
|
22
23
|
"context-inject": { enabled: true },
|
|
23
24
|
"precompact-snapshot": { enabled: true },
|
|
@@ -67,6 +68,7 @@ export function resolveConfig(startDir = process.cwd()) {
|
|
|
67
68
|
if (config.server) result.server = config.server;
|
|
68
69
|
if (config.apiKey) result.apiKey = config.apiKey;
|
|
69
70
|
if (config.description) result.description = config.description;
|
|
71
|
+
if (config.architecture) result.architecture = config.architecture;
|
|
70
72
|
if (config.hooks) {
|
|
71
73
|
result.hooks = { ...result.hooks, ...config.hooks };
|
|
72
74
|
}
|
|
@@ -111,6 +113,7 @@ export function writeConfig(dir, config) {
|
|
|
111
113
|
server: config.server || DEFAULTS.server,
|
|
112
114
|
apiKey: config.apiKey || "",
|
|
113
115
|
description: config.description || "",
|
|
116
|
+
architecture: config.architecture || "",
|
|
114
117
|
hooks: config.hooks || DEFAULTS.hooks,
|
|
115
118
|
};
|
|
116
119
|
fs.writeFileSync(filePath, JSON.stringify(data, null, 2) + "\n");
|
package/src/index.js
CHANGED
package/src/server-client.js
CHANGED
|
@@ -104,10 +104,11 @@ export function createClient(config) {
|
|
|
104
104
|
return request("GET", "/api/workspaces/profiles");
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
async function registerWorkspace(name, projectPath, { vault, description } = {}) {
|
|
107
|
+
async function registerWorkspace(name, projectPath, { vault, description, architecture } = {}) {
|
|
108
108
|
const body = { name, path: projectPath };
|
|
109
109
|
if (vault) body.vault = vault;
|
|
110
110
|
if (description) body.description = description;
|
|
111
|
+
if (architecture) body.architecture = architecture;
|
|
111
112
|
return request("POST", "/api/workspaces", { body });
|
|
112
113
|
}
|
|
113
114
|
|