bikky 0.3.12 → 0.4.0

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.
Files changed (67) hide show
  1. package/CONTRIBUTING.md +206 -0
  2. package/README.md +116 -154
  3. package/dist/config.d.ts +49 -1
  4. package/dist/config.d.ts.map +1 -1
  5. package/dist/config.js +125 -4
  6. package/dist/config.js.map +1 -1
  7. package/dist/daemon/extraction.d.ts.map +1 -1
  8. package/dist/daemon/extraction.js +24 -19
  9. package/dist/daemon/extraction.js.map +1 -1
  10. package/dist/daemon/loop.d.ts.map +1 -1
  11. package/dist/daemon/loop.js +15 -1
  12. package/dist/daemon/loop.js.map +1 -1
  13. package/dist/daemon/qdrant.d.ts.map +1 -1
  14. package/dist/daemon/qdrant.js +0 -1
  15. package/dist/daemon/qdrant.js.map +1 -1
  16. package/dist/lib/qdrant-pool.d.ts +57 -0
  17. package/dist/lib/qdrant-pool.d.ts.map +1 -0
  18. package/dist/lib/qdrant-pool.js +104 -0
  19. package/dist/lib/qdrant-pool.js.map +1 -0
  20. package/dist/mcp/api.d.ts +56 -19
  21. package/dist/mcp/api.d.ts.map +1 -1
  22. package/dist/mcp/api.js +133 -72
  23. package/dist/mcp/api.js.map +1 -1
  24. package/dist/mcp/helpers.d.ts +0 -1
  25. package/dist/mcp/helpers.d.ts.map +1 -1
  26. package/dist/mcp/helpers.js +2 -15
  27. package/dist/mcp/helpers.js.map +1 -1
  28. package/dist/mcp/helpers.test.js +3 -21
  29. package/dist/mcp/helpers.test.js.map +1 -1
  30. package/dist/mcp/index.d.ts.map +1 -1
  31. package/dist/mcp/index.js +29 -14
  32. package/dist/mcp/index.js.map +1 -1
  33. package/dist/mcp/tools.d.ts +0 -7
  34. package/dist/mcp/tools.d.ts.map +1 -1
  35. package/dist/mcp/tools.js +337 -219
  36. package/dist/mcp/tools.js.map +1 -1
  37. package/dist/mcp/types.d.ts +0 -3
  38. package/dist/mcp/types.d.ts.map +1 -1
  39. package/dist/routing.d.ts +53 -0
  40. package/dist/routing.d.ts.map +1 -0
  41. package/dist/routing.js +129 -0
  42. package/dist/routing.js.map +1 -0
  43. package/dist/routing.test.d.ts +2 -0
  44. package/dist/routing.test.d.ts.map +1 -0
  45. package/dist/routing.test.js +79 -0
  46. package/dist/routing.test.js.map +1 -0
  47. package/docs/config/fully-hosted.md +57 -0
  48. package/docs/config/hosted-models.md +50 -0
  49. package/docs/config/hosted-qdrant-local-models.md +39 -0
  50. package/docs/config/local.md +34 -0
  51. package/docs/configuration.md +374 -0
  52. package/docs/screenshots/dashboard.png +0 -0
  53. package/docs/screenshots/graph.png +0 -0
  54. package/docs/screenshots/memory.png +0 -0
  55. package/package.json +7 -4
  56. package/dist/mcp/api.test.d.ts +0 -6
  57. package/dist/mcp/api.test.d.ts.map +0 -1
  58. package/dist/mcp/api.test.js +0 -130
  59. package/dist/mcp/api.test.js.map +0 -1
  60. package/dist/mcp/tools.integration.itest.d.ts +0 -23
  61. package/dist/mcp/tools.integration.itest.d.ts.map +0 -1
  62. package/dist/mcp/tools.integration.itest.js +0 -171
  63. package/dist/mcp/tools.integration.itest.js.map +0 -1
  64. package/dist/mcp/tools.test.d.ts +0 -16
  65. package/dist/mcp/tools.test.d.ts.map +0 -1
  66. package/dist/mcp/tools.test.js +0 -908
  67. package/dist/mcp/tools.test.js.map +0 -1
package/package.json CHANGED
@@ -1,22 +1,25 @@
1
1
  {
2
2
  "name": "bikky",
3
- "version": "0.3.12",
3
+ "version": "0.4.0",
4
4
  "description": "Shared memory for AI coding sessions — MCP server + background daemon",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-or-later",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "https://github.com/bikky-dev/bikky.git"
9
+ "url": "git+https://github.com/bikky-dev/bikky.git"
10
10
  },
11
11
  "bin": {
12
- "bikky": "./bin/bikky.js"
12
+ "bikky": "bin/bikky.js"
13
13
  },
14
14
  "exports": {
15
15
  ".": "./dist/mcp/index.js"
16
16
  },
17
17
  "files": [
18
+ "CONTRIBUTING.md",
18
19
  "dist/",
19
20
  "bin/",
21
+ "docs/configuration.md",
22
+ "docs/config/",
20
23
  "docs/diagrams/",
21
24
  "docs/screenshots/"
22
25
  ],
@@ -29,7 +32,7 @@
29
32
  "typecheck": "tsc --noEmit",
30
33
  "lint": "eslint src/",
31
34
  "check": "tsc --noEmit && eslint src/",
32
- "test": "node --test --test-concurrency=1 $(find dist -name '*.test.js')",
35
+ "test": "tsc && node --test --test-concurrency=1 $(find dist -name '*.test.js')",
33
36
  "test:integration": "tsc && BIKKY_INTEGRATION=${BIKKY_INTEGRATION:-1} node --test $(find dist -name '*.itest.js')",
34
37
  "build:diagrams": "node scripts/build-diagrams.mjs",
35
38
  "prepublishOnly": "npm run build"
@@ -1,6 +0,0 @@
1
- /**
2
- * Tests for the MCP api helpers — Qdrant REST wrapper and ensureCollection.
3
- * Mocks global fetch so no real Qdrant is hit.
4
- */
5
- export {};
6
- //# sourceMappingURL=api.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api.test.d.ts","sourceRoot":"","sources":["../../src/mcp/api.test.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -1,130 +0,0 @@
1
- /**
2
- * Tests for the MCP api helpers — Qdrant REST wrapper and ensureCollection.
3
- * Mocks global fetch so no real Qdrant is hit.
4
- */
5
- import { describe, it, before, after, beforeEach } from "node:test";
6
- import assert from "node:assert/strict";
7
- import { qdrantReq, ensureCollection, getCollection, setCollection, setQdrantUrl, setQdrantApiKey, setReady, initEmbedding, } from "./api.js";
8
- const realFetch = globalThis.fetch;
9
- function installMock(handler) {
10
- const calls = [];
11
- globalThis.fetch = (async (input, init) => {
12
- const url = typeof input === "string" ? input : input.toString();
13
- const headers = init?.headers ?? {};
14
- const body = init?.body ? JSON.parse(String(init.body)) : null;
15
- const call = { url, method: init?.method ?? "GET", headers, body };
16
- calls.push(call);
17
- return handler(call);
18
- });
19
- return calls;
20
- }
21
- describe("mcp/api", () => {
22
- before(() => {
23
- setQdrantUrl("https://qdrant.test:6333");
24
- setQdrantApiKey("test-key");
25
- setCollection("bikky-test");
26
- initEmbedding({
27
- provider: "ollama",
28
- baseUrl: "http://localhost:11434",
29
- model: "test-model",
30
- dimensions: 8,
31
- apiKey: null,
32
- });
33
- });
34
- after(() => {
35
- globalThis.fetch = realFetch;
36
- setQdrantUrl(null);
37
- setQdrantApiKey(null);
38
- setReady(false);
39
- });
40
- beforeEach(() => {
41
- globalThis.fetch = realFetch;
42
- });
43
- describe("collection setters", () => {
44
- it("getCollection round-trips via setCollection", () => {
45
- setCollection("foo");
46
- assert.equal(getCollection(), "foo");
47
- setCollection("bikky-test");
48
- });
49
- });
50
- describe("qdrantReq", () => {
51
- it("builds the URL, sends the api-key header, and serialises the body", async () => {
52
- const calls = installMock(() => new Response(JSON.stringify({ result: { ok: true } }), { status: 200 }));
53
- const result = await qdrantReq("POST", "/foo", { x: 1 });
54
- assert.deepEqual(result, { result: { ok: true } });
55
- assert.equal(calls.length, 1);
56
- assert.equal(calls[0].url, "https://qdrant.test:6333/foo");
57
- assert.equal(calls[0].method, "POST");
58
- assert.equal(calls[0].headers["api-key"], "test-key");
59
- assert.equal(calls[0].headers["Content-Type"], "application/json");
60
- assert.deepEqual(calls[0].body, { x: 1 });
61
- });
62
- it("omits the body for GET-style requests", async () => {
63
- const calls = installMock(() => new Response(JSON.stringify({}), { status: 200 }));
64
- await qdrantReq("GET", "/x");
65
- assert.equal(calls[0].body, null);
66
- });
67
- it("throws with status + body when the response is not ok", async () => {
68
- installMock(() => new Response("boom", { status: 500 }));
69
- await assert.rejects(qdrantReq("GET", "/fail"), /Qdrant GET \/fail failed \(500\): boom/);
70
- });
71
- });
72
- describe("ensureCollection", () => {
73
- it("does nothing if the collection already exists", async () => {
74
- const calls = installMock((call) => {
75
- if (call.method === "GET" && call.url.endsWith("/collections/bikky-test")) {
76
- return new Response(JSON.stringify({ result: { name: "bikky-test" } }), { status: 200 });
77
- }
78
- // Index creation calls
79
- if (call.url.endsWith("/index")) {
80
- return new Response(JSON.stringify({ result: { ok: true } }), { status: 200 });
81
- }
82
- return new Response("unexpected", { status: 500 });
83
- });
84
- await ensureCollection([{ field_name: "category", field_schema: "keyword" }]);
85
- // 1 GET (existence check) + 1 PUT (index)
86
- assert.equal(calls.length, 2);
87
- assert.equal(calls[0].method, "GET");
88
- assert.equal(calls[1].method, "PUT");
89
- assert.ok(calls[1].url.endsWith("/index"));
90
- });
91
- it("creates the collection when GET returns 404", async () => {
92
- const calls = installMock((call) => {
93
- if (call.method === "GET" && call.url.endsWith("/collections/bikky-test")) {
94
- return new Response("not found (404)", { status: 404 });
95
- }
96
- return new Response(JSON.stringify({ result: { ok: true } }), { status: 200 });
97
- });
98
- await ensureCollection([]);
99
- assert.equal(calls[0].method, "GET");
100
- assert.equal(calls[1].method, "PUT");
101
- assert.equal(calls[1].url, "https://qdrant.test:6333/collections/bikky-test");
102
- assert.ok(calls[1].body && typeof calls[1].body === "object");
103
- });
104
- it("propagates non-404 errors from the existence check", async () => {
105
- installMock((call) => {
106
- if (call.method === "GET")
107
- return new Response("auth failed", { status: 401 });
108
- return new Response("{}", { status: 200 });
109
- });
110
- await assert.rejects(ensureCollection([]), /401/);
111
- });
112
- it("swallows index creation errors with a warning", async () => {
113
- installMock((call) => {
114
- if (call.method === "GET") {
115
- return new Response(JSON.stringify({ result: { name: "bikky-test" } }), { status: 200 });
116
- }
117
- if (call.url.endsWith("/index")) {
118
- return new Response("index already exists", { status: 400 });
119
- }
120
- return new Response("{}", { status: 200 });
121
- });
122
- // Must NOT throw — index errors are warned and swallowed
123
- await ensureCollection([
124
- { field_name: "category", field_schema: "keyword" },
125
- { field_name: "domain", field_schema: "keyword" },
126
- ]);
127
- });
128
- });
129
- });
130
- //# sourceMappingURL=api.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api.test.js","sourceRoot":"","sources":["../../src/mcp/api.test.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAE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Q,EAAE,YAAY,EAAE,SAAS,EAAE;aAClD,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,23 +0,0 @@
1
- /**
2
- * End-to-end integration test against a real Qdrant Cloud collection.
3
- *
4
- * **OPT-IN.** This file uses the `.itest.ts` extension so the default
5
- * `dist/**\/*.test.js` glob does NOT pick it up. Run explicitly with:
6
- *
7
- * BIKKY_INTEGRATION=1 npm run test:integration
8
- *
9
- * Required env (or in ~/.bikky/config.json — loadConfig merges env):
10
- * - BIKKY_INTEGRATION=1 (master gate)
11
- * - QDRANT_URL (Qdrant Cloud REST URL)
12
- * - QDRANT_API_KEY (Qdrant Cloud API key)
13
- * - embedding provider config (defaults from ~/.bikky/config.json)
14
- *
15
- * Behaviour:
16
- * - Creates a uuid-suffixed throwaway collection (`bikky-it-<short>`).
17
- * - Drops it in `after()` regardless of pass/fail.
18
- * - Exercises the real handlers from registerTools() against live Qdrant +
19
- * real embeddings — validating filter shapes, payload indexes, vector
20
- * dimensions, and the dedup similarity thresholds for real.
21
- */
22
- export {};
23
- //# sourceMappingURL=tools.integration.itest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tools.integration.itest.d.ts","sourceRoot":"","sources":["../../src/mcp/tools.integration.itest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG"}
@@ -1,171 +0,0 @@
1
- /**
2
- * End-to-end integration test against a real Qdrant Cloud collection.
3
- *
4
- * **OPT-IN.** This file uses the `.itest.ts` extension so the default
5
- * `dist/**\/*.test.js` glob does NOT pick it up. Run explicitly with:
6
- *
7
- * BIKKY_INTEGRATION=1 npm run test:integration
8
- *
9
- * Required env (or in ~/.bikky/config.json — loadConfig merges env):
10
- * - BIKKY_INTEGRATION=1 (master gate)
11
- * - QDRANT_URL (Qdrant Cloud REST URL)
12
- * - QDRANT_API_KEY (Qdrant Cloud API key)
13
- * - embedding provider config (defaults from ~/.bikky/config.json)
14
- *
15
- * Behaviour:
16
- * - Creates a uuid-suffixed throwaway collection (`bikky-it-<short>`).
17
- * - Drops it in `after()` regardless of pass/fail.
18
- * - Exercises the real handlers from registerTools() against live Qdrant +
19
- * real embeddings — validating filter shapes, payload indexes, vector
20
- * dimensions, and the dedup similarity thresholds for real.
21
- */
22
- import { describe, it, before, after } from "node:test";
23
- import assert from "node:assert/strict";
24
- import { randomUUID } from "node:crypto";
25
- import { registerTools } from "./tools.js";
26
- import { setQdrantUrl, setQdrantApiKey, setReady, setCollection, initEmbedding, ensureCollection, qdrantReq, } from "./api.js";
27
- import { QDRANT_INDEXES } from "./taxonomy.js";
28
- import { loadConfig } from "../config.js";
29
- const enabled = process.env.BIKKY_INTEGRATION === "1" &&
30
- Boolean(process.env.QDRANT_URL || loadConfig().qdrant_url) &&
31
- Boolean(process.env.QDRANT_API_KEY || loadConfig().qdrant_api_key);
32
- function makeFakeServer() {
33
- const handlers = new Map();
34
- const server = {
35
- tool(name, _desc, _schema, handler) {
36
- handlers.set(name, handler);
37
- },
38
- };
39
- return { server, handlers };
40
- }
41
- let handlers;
42
- let collectionName;
43
- function textOf(result) {
44
- return result.content[0]?.text ?? "";
45
- }
46
- async function invoke(name, args) {
47
- const h = handlers.get(name);
48
- if (!h)
49
- throw new Error(`Handler '${name}' not registered`);
50
- return h(args);
51
- }
52
- describe("mcp/tools — Qdrant integration", { skip: !enabled }, () => {
53
- before(async () => {
54
- const cfg = loadConfig();
55
- const url = process.env.QDRANT_URL ?? cfg.qdrant_url;
56
- const apiKey = process.env.QDRANT_API_KEY ?? cfg.qdrant_api_key;
57
- if (!url || !apiKey)
58
- throw new Error("Qdrant URL / API key missing");
59
- collectionName = `bikky-it-${randomUUID().slice(0, 8)}`;
60
- setQdrantUrl(url);
61
- setQdrantApiKey(apiKey);
62
- setCollection(collectionName);
63
- initEmbedding({
64
- provider: cfg.embedding.provider,
65
- baseUrl: cfg.embedding.base_url,
66
- model: cfg.embedding.model,
67
- dimensions: cfg.embedding.dimensions,
68
- apiKey: cfg.embedding.api_key,
69
- });
70
- await ensureCollection(QDRANT_INDEXES);
71
- setReady(true);
72
- const fake = makeFakeServer();
73
- registerTools(fake.server);
74
- handlers = fake.handlers;
75
- });
76
- after(async () => {
77
- try {
78
- if (collectionName) {
79
- await qdrantReq("DELETE", `/collections/${collectionName}`);
80
- }
81
- }
82
- finally {
83
- setReady(false);
84
- setQdrantUrl(null);
85
- setQdrantApiKey(null);
86
- }
87
- });
88
- // Shared state across the ordered scenarios below.
89
- let fact1Id;
90
- let fact2Id;
91
- it("inserts two distinct facts", async () => {
92
- const r1 = JSON.parse(textOf(await invoke("memory_store", {
93
- content: "Qdrant Cloud free tier provides 1GB storage with no credit card required",
94
- category: "engineering",
95
- entities: ["qdrant", "qdrant-cloud"],
96
- })));
97
- assert.equal(r1.action, "inserted");
98
- fact1Id = r1.fact_id;
99
- const r2 = JSON.parse(textOf(await invoke("memory_store", {
100
- content: "OpenAI text-embedding-3-small produces 1536-dimensional vectors",
101
- category: "engineering",
102
- entities: ["openai", "embeddings"],
103
- })));
104
- assert.equal(r2.action, "inserted");
105
- fact2Id = r2.fact_id;
106
- assert.notEqual(fact1Id, fact2Id);
107
- });
108
- it("reinforces on exact content-hash match", async () => {
109
- const r = JSON.parse(textOf(await invoke("memory_store", {
110
- content: "Qdrant Cloud free tier provides 1GB storage with no credit card required",
111
- category: "engineering",
112
- entities: ["qdrant"],
113
- })));
114
- assert.equal(r.action, "reinforced");
115
- assert.equal(r.fact_id, fact1Id);
116
- assert.ok(r.reinforcement_count >= 2);
117
- });
118
- it("reinforces on a near-duplicate via real-vector similarity", async () => {
119
- // Paraphrase of fact 1 — same meaning, different wording.
120
- const r = JSON.parse(textOf(await invoke("memory_store", {
121
- content: "Qdrant Cloud's free plan offers 1GB of storage and does not require a credit card",
122
- category: "engineering",
123
- entities: ["qdrant"],
124
- })));
125
- // Either reinforced (preferred — proves the 0.92 threshold) or inserted
126
- // with a similar_facts entry pointing at fact1 (proves we're at least in
127
- // the related band). The first case is the strong assertion; we log if it
128
- // falls through so a maintainer can re-tune thresholds per embedding model.
129
- if (r.action === "reinforced") {
130
- assert.equal(r.fact_id, fact1Id);
131
- }
132
- else {
133
- assert.equal(r.action, "inserted", `unexpected action: ${r.action}`);
134
- const similar = (r.similar_facts ?? []);
135
- const match = similar.find((s) => s.id === fact1Id);
136
- assert.ok(match, `expected paraphrase to reinforce or appear in similar_facts; got ${JSON.stringify(r)}`);
137
- console.warn(`[integration] paraphrase landed in related band (score=${match.score}) — consider tuning THRESHOLD_DUPLICATE for this embedding model`);
138
- }
139
- });
140
- it("recalls a stored fact via semantic search", async () => {
141
- const result = await invoke("memory_recall", {
142
- query: "What does the Qdrant free tier include?",
143
- limit: 5,
144
- });
145
- const text = textOf(result);
146
- assert.match(text, /1GB|free tier/i);
147
- });
148
- it("aggregates facts about an entity", async () => {
149
- const result = await invoke("memory_entity", { name: "qdrant" });
150
- const text = textOf(result);
151
- assert.match(text, /Facts about qdrant/);
152
- assert.match(text, /1GB|free tier/i);
153
- });
154
- it("forgets a fact and excludes it from subsequent recall", async () => {
155
- const forgetResult = JSON.parse(textOf(await invoke("memory_forget", {
156
- fact_id: fact2Id,
157
- reason: "integration-test cleanup",
158
- })));
159
- assert.equal(forgetResult.status, "forgotten");
160
- // Recall something the forgotten fact would have matched.
161
- const recallResult = await invoke("memory_recall", {
162
- query: "OpenAI embedding dimensions",
163
- limit: 10,
164
- });
165
- const text = textOf(recallResult);
166
- // Fact 2 should not appear (it was the only one about embedding dimensions
167
- // we inserted). A "no matching facts" response is acceptable.
168
- assert.doesNotMatch(text, /1536-dimensional/);
169
- });
170
- });
171
- //# sourceMappingURL=tools.integration.itest.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tools.integration.itest.js","sourceRoot":"","sources":["../../src/mcp/tools.integration.itest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,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,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QAE/C,0DAA0D;QAC1D,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,eAAe,EAAE;YACjD,KAAK,EAAE,6BAA6B;YACpC,KAAK,EAAE,EAAE;SACV,CAAC,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;QAClC,2EAA2E;QAC3E,8DAA8D;QAC9D,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,16 +0,0 @@
1
- /**
2
- * Integration tests for the MCP tool handlers in tools.ts.
3
- *
4
- * tools.ts registers all tool handlers inside `registerTools(mcp)`. To exercise
5
- * them without a live MCP server we use a minimal fake McpServer that captures
6
- * each `tool(name, desc, schema, handler)` registration into a map. Tests then
7
- * invoke handlers directly with mocked fetch responses for Qdrant + embedding.
8
- *
9
- * Covers the data-integrity + recall surface:
10
- * - memory_store: hash dedup, vector dedup, supersedes, relation insertion
11
- * - memory_recall: filter passthrough, graph_depth=1 traversal, ranking
12
- * - memory_entity: facts + relations aggregation with dedup
13
- * - memory_forget: marks fact as superseded with reason
14
- */
15
- export {};
16
- //# sourceMappingURL=tools.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tools.test.d.ts","sourceRoot":"","sources":["../../src/mcp/tools.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}