gnosys-mcp 0.3.1 → 0.3.2
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/cli.js +5 -5
- package/dist/index.js +5 -5
- package/dist/lib/search.js +1 -1
- package/dist/lib/store.js +2 -2
- package/dist/lib/tags.d.ts +1 -1
- package/dist/lib/tags.js +2 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -209,7 +209,7 @@ program
|
|
|
209
209
|
// Good
|
|
210
210
|
}
|
|
211
211
|
await fs.mkdir(storePath, { recursive: true });
|
|
212
|
-
await fs.mkdir(path.join(storePath, ".
|
|
212
|
+
await fs.mkdir(path.join(storePath, ".config"), { recursive: true });
|
|
213
213
|
const defaultRegistry = {
|
|
214
214
|
domain: [
|
|
215
215
|
"architecture", "api", "auth", "database", "devops",
|
|
@@ -222,7 +222,7 @@ program
|
|
|
222
222
|
concern: ["dx", "scalability", "maintainability", "reliability"],
|
|
223
223
|
status_tag: ["draft", "stable", "deprecated", "experimental"],
|
|
224
224
|
};
|
|
225
|
-
await fs.writeFile(path.join(storePath, ".
|
|
225
|
+
await fs.writeFile(path.join(storePath, ".config", "tags.json"), JSON.stringify(defaultRegistry, null, 2), "utf-8");
|
|
226
226
|
const changelog = `# Gnosys Changelog\n\n## ${new Date().toISOString().split("T")[0]}\n\n- Store initialized\n`;
|
|
227
227
|
await fs.writeFile(path.join(storePath, "CHANGELOG.md"), changelog, "utf-8");
|
|
228
228
|
try {
|
|
@@ -236,7 +236,7 @@ program
|
|
|
236
236
|
execSync('git config user.name "Gnosys"', { cwd: storePath, stdio: "pipe" });
|
|
237
237
|
execSync('git config user.email "gnosys@local"', { cwd: storePath, stdio: "pipe" });
|
|
238
238
|
}
|
|
239
|
-
execSync("git add -A && git add -f .
|
|
239
|
+
execSync("git add -A && git add -f .config/", { cwd: storePath, stdio: "pipe" });
|
|
240
240
|
execSync('git commit -m "Initialize Gnosys store"', {
|
|
241
241
|
cwd: storePath,
|
|
242
242
|
stdio: "pipe",
|
|
@@ -247,7 +247,7 @@ program
|
|
|
247
247
|
}
|
|
248
248
|
console.log(`Gnosys store initialized at ${storePath}`);
|
|
249
249
|
console.log(`\nCreated:`);
|
|
250
|
-
console.log(` .
|
|
250
|
+
console.log(` .config/ (internal config)`);
|
|
251
251
|
console.log(` tags.json (tag registry)`);
|
|
252
252
|
console.log(` CHANGELOG.md`);
|
|
253
253
|
console.log(` git repo`);
|
|
@@ -390,7 +390,7 @@ program
|
|
|
390
390
|
process.exit(1);
|
|
391
391
|
}
|
|
392
392
|
// Log reinforcement
|
|
393
|
-
const logDir = path.join(writeTarget.store.getStorePath(), ".
|
|
393
|
+
const logDir = path.join(writeTarget.store.getStorePath(), ".config");
|
|
394
394
|
await fs.mkdir(logDir, { recursive: true });
|
|
395
395
|
const logPath = path.join(logDir, "reinforcement.log");
|
|
396
396
|
const entry = JSON.stringify({
|
package/dist/index.js
CHANGED
|
@@ -359,10 +359,10 @@ server.tool("gnosys_reinforce", "Signal whether a memory was useful. 'useful' re
|
|
|
359
359
|
.describe("The reinforcement signal"),
|
|
360
360
|
context: z.string().optional().describe("Why this signal was given"),
|
|
361
361
|
}, async ({ memory_id, signal, context }) => {
|
|
362
|
-
// Log to the first writable store's .
|
|
362
|
+
// Log to the first writable store's .config directory
|
|
363
363
|
const writeTarget = resolver.getWriteTarget();
|
|
364
364
|
if (writeTarget) {
|
|
365
|
-
const logPath = path.join(writeTarget.store.getStorePath(), ".
|
|
365
|
+
const logPath = path.join(writeTarget.store.getStorePath(), ".config", "reinforcement.log");
|
|
366
366
|
const entry = JSON.stringify({
|
|
367
367
|
memory_id,
|
|
368
368
|
signal,
|
|
@@ -419,7 +419,7 @@ server.tool("gnosys_init", "Initialize a new .gnosys store in the given director
|
|
|
419
419
|
}
|
|
420
420
|
// Create directory structure
|
|
421
421
|
await fs.mkdir(storePath, { recursive: true });
|
|
422
|
-
await fs.mkdir(path.join(storePath, ".
|
|
422
|
+
await fs.mkdir(path.join(storePath, ".config"), { recursive: true });
|
|
423
423
|
// Seed default tag registry
|
|
424
424
|
const defaultRegistry = {
|
|
425
425
|
domain: [
|
|
@@ -446,7 +446,7 @@ server.tool("gnosys_init", "Initialize a new .gnosys store in the given director
|
|
|
446
446
|
concern: ["dx", "scalability", "maintainability", "reliability"],
|
|
447
447
|
status_tag: ["draft", "stable", "deprecated", "experimental"],
|
|
448
448
|
};
|
|
449
|
-
await fs.writeFile(path.join(storePath, ".
|
|
449
|
+
await fs.writeFile(path.join(storePath, ".config", "tags.json"), JSON.stringify(defaultRegistry, null, 2), "utf-8");
|
|
450
450
|
// Seed changelog
|
|
451
451
|
const changelog = `# Gnosys Changelog\n\n## ${new Date().toISOString().split("T")[0]}\n\n- Store initialized\n`;
|
|
452
452
|
await fs.writeFile(path.join(storePath, "CHANGELOG.md"), changelog, "utf-8");
|
|
@@ -481,7 +481,7 @@ server.tool("gnosys_init", "Initialize a new .gnosys store in the given director
|
|
|
481
481
|
content: [
|
|
482
482
|
{
|
|
483
483
|
type: "text",
|
|
484
|
-
text: `Gnosys store initialized at ${storePath}\n\nCreated:\n- .
|
|
484
|
+
text: `Gnosys store initialized at ${storePath}\n\nCreated:\n- .config/ (internal config)\n- tags.json (tag registry)\n- CHANGELOG.md\n- git repo initialized\n\nThe store is ready. Use gnosys_discover to find existing memories or gnosys_add to create new ones.`,
|
|
485
485
|
},
|
|
486
486
|
],
|
|
487
487
|
};
|
package/dist/lib/search.js
CHANGED
|
@@ -14,7 +14,7 @@ export class GnosysSearch {
|
|
|
14
14
|
// volumes in sandboxed environments) allow file creation but block the
|
|
15
15
|
// journal/WAL delete operations that SQLite requires.
|
|
16
16
|
try {
|
|
17
|
-
const dbPath = path.join(storePath, ".
|
|
17
|
+
const dbPath = path.join(storePath, ".config", "search.db");
|
|
18
18
|
this.db = new Database(dbPath);
|
|
19
19
|
this.initSchema();
|
|
20
20
|
// Smoke-test: insert + delete to confirm journal ops work
|
package/dist/lib/store.js
CHANGED
|
@@ -18,7 +18,7 @@ export class GnosysStore {
|
|
|
18
18
|
async init() {
|
|
19
19
|
// Ensure store directory exists
|
|
20
20
|
await fs.mkdir(this.storePath, { recursive: true });
|
|
21
|
-
await fs.mkdir(path.join(this.storePath, ".
|
|
21
|
+
await fs.mkdir(path.join(this.storePath, ".config"), { recursive: true });
|
|
22
22
|
// Init git if not already
|
|
23
23
|
try {
|
|
24
24
|
const gitDir = path.join(this.storePath, ".git");
|
|
@@ -38,7 +38,7 @@ export class GnosysStore {
|
|
|
38
38
|
async getAllMemories() {
|
|
39
39
|
const files = await glob("**/*.md", {
|
|
40
40
|
cwd: this.storePath,
|
|
41
|
-
ignore: ["MANIFEST.md", "CHANGELOG.md", ".
|
|
41
|
+
ignore: ["MANIFEST.md", "CHANGELOG.md", ".config/**", "node_modules/**"],
|
|
42
42
|
});
|
|
43
43
|
const memories = [];
|
|
44
44
|
for (const file of files) {
|
package/dist/lib/tags.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Gnosys Tag Registry — Categorized controlled vocabulary for tags.
|
|
3
|
-
* Stored in .
|
|
3
|
+
* Stored in .config/tags.json. The ingestion LLM must use existing tags
|
|
4
4
|
* but can propose new ones for approval.
|
|
5
5
|
*/
|
|
6
6
|
export interface TagRegistry {
|
package/dist/lib/tags.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Gnosys Tag Registry — Categorized controlled vocabulary for tags.
|
|
3
|
-
* Stored in .
|
|
3
|
+
* Stored in .config/tags.json. The ingestion LLM must use existing tags
|
|
4
4
|
* but can propose new ones for approval.
|
|
5
5
|
*/
|
|
6
6
|
import fs from "fs/promises";
|
|
@@ -57,7 +57,7 @@ export class GnosysTagRegistry {
|
|
|
57
57
|
registryPath;
|
|
58
58
|
registry;
|
|
59
59
|
constructor(storePath) {
|
|
60
|
-
this.registryPath = path.join(storePath, ".
|
|
60
|
+
this.registryPath = path.join(storePath, ".config", "tags.json");
|
|
61
61
|
this.registry = { ...DEFAULT_REGISTRY };
|
|
62
62
|
}
|
|
63
63
|
async load() {
|