knowmind 0.1.24 → 0.1.26
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/CHANGELOG.md +11 -0
- package/README.md +1 -0
- package/bin/knowmind.js +40 -2
- package/package.json +61 -61
- package/src/client.js +6 -1
- package/src/sync.js +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Knowmind CLI — Änderungen
|
|
2
2
|
|
|
3
|
+
## 0.1.25 (2026-06-23)
|
|
4
|
+
|
|
5
|
+
**Geführtes Onboarding nach `install`/`init`**
|
|
6
|
+
- `install` und `init` zeigen nach der Eintragung einen klaren Abschluss-Schritt:
|
|
7
|
+
Liegt kein API-Token vor, wird deutlich auf Konto + Token hingewiesen — der
|
|
8
|
+
häufigste Stolperstein, denn ohne Token bleibt die MCP-Konfig wirkungslos. Mit
|
|
9
|
+
Token: kurze Bestätigung, dass alles startklar ist.
|
|
10
|
+
- `init` akzeptiert jetzt `--token kmt_…` und `--api URL` (konsistent zu `install`)
|
|
11
|
+
und legt die Config gleich mit an, damit die erzeugten Hooks sofort funktionieren,
|
|
12
|
+
statt ohne Token still ins Leere zu laufen.
|
|
13
|
+
|
|
3
14
|
## 0.1.23 (2026-06-20)
|
|
4
15
|
|
|
5
16
|
**Neuer Befehl `knowmind install <ide>`**
|
package/README.md
CHANGED
|
@@ -34,6 +34,7 @@ export KNOWMIND_API_URL=https://knowmind.de
|
|
|
34
34
|
## Befehle
|
|
35
35
|
|
|
36
36
|
```
|
|
37
|
+
npx -y knowmind install <ide> MCP-Server im KI-Client verdrahten (claude, cursor, vscode …)
|
|
37
38
|
knowmind init Automatische Gedächtnis-Pflege im KI-Client einrichten
|
|
38
39
|
knowmind search "Wo läuft die OKR-App?"
|
|
39
40
|
knowmind upload notizen.md --title "Meeting Notizen 2026-05-12"
|
package/bin/knowmind.js
CHANGED
|
@@ -51,9 +51,10 @@ Knowmind ${VERSION} — Das Gedächtnis für Ihre KI
|
|
|
51
51
|
Befehle:
|
|
52
52
|
knowmind login [--token kmt_TOKEN] [--api https://knowmind.de]
|
|
53
53
|
Token speichern
|
|
54
|
-
knowmind init [--client claude-code|cursor|auto] [--dry-run]
|
|
54
|
+
knowmind init [--client claude-code|cursor|auto] [--token kmt_TOKEN] [--api URL] [--dry-run]
|
|
55
55
|
Automatische Gedächtnis-Pflege im KI-Client einrichten
|
|
56
56
|
(Hooks/Regeln + Memory-First-Block). Idempotent.
|
|
57
|
+
--token/--api legen die Config gleich mit an.
|
|
57
58
|
knowmind config Aktuelle Konfiguration anzeigen
|
|
58
59
|
knowmind search "Frage" [-k 5] [--hops 2]
|
|
59
60
|
Hybrid-Recall gegen den Tenant-Korpus
|
|
@@ -93,6 +94,27 @@ function printRegisterHint(api) {
|
|
|
93
94
|
);
|
|
94
95
|
}
|
|
95
96
|
|
|
97
|
+
/** Ist ein Token konfiguriert (ENV oder Config-File)? */
|
|
98
|
+
function hasToken() {
|
|
99
|
+
return Boolean(process.env.KNOWMIND_TOKEN || loadConfig().token);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Geführter Abschluss nach `install`/`init`: Ohne Token bleibt die Eintragung
|
|
104
|
+
* wirkungslos (tote MCP-Konfig) — der häufigste Stolperstein. Bei vorhandenem
|
|
105
|
+
* Token: kurze Bestätigung. Sonst: deutlicher Schluss-Schritt mit Anleitung.
|
|
106
|
+
*/
|
|
107
|
+
function finishOnboardingHint() {
|
|
108
|
+
if (hasToken()) {
|
|
109
|
+
console.log("\n✓ Token gefunden — knowmind ist startklar, sobald der Client neu lädt.");
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
console.log(
|
|
113
|
+
"\n⚠ LETZTER SCHRITT: Ohne API-Token ist die Eintragung noch wirkungslos (keine Verbindung).",
|
|
114
|
+
);
|
|
115
|
+
printRegisterHint(parseFlag("--api", null));
|
|
116
|
+
}
|
|
117
|
+
|
|
96
118
|
async function runLogin() {
|
|
97
119
|
let token = parseFlag("--token", null);
|
|
98
120
|
const api = parseFlag("--api", null);
|
|
@@ -214,18 +236,34 @@ async function runConfig() {
|
|
|
214
236
|
async function runInitCmd() {
|
|
215
237
|
const client = parseFlag("--client", "auto");
|
|
216
238
|
const dryRun = args.includes("--dry-run");
|
|
239
|
+
// Konsistenz zu `install`: --token/--api direkt verarbeiten und in der Config
|
|
240
|
+
// ablegen, damit die erzeugten Hooks (sie lesen Token/URL aus ~/.knowmind/
|
|
241
|
+
// config.json bzw. ENV) sofort funktionieren statt still ins Leere zu laufen.
|
|
242
|
+
const token = parseFlag("--token", null);
|
|
243
|
+
const api = parseFlag("--api", null);
|
|
244
|
+
if ((token || api) && !dryRun) {
|
|
245
|
+
if (token && !token.startsWith("kmt_")) throw new Error("Token muss mit kmt_ beginnen.");
|
|
246
|
+
const where = saveConfig({ ...(token ? { token } : {}), ...(api ? { apiUrl: api } : {}) });
|
|
247
|
+
if (token) console.log(`Token gespeichert in ${where}.`);
|
|
248
|
+
}
|
|
217
249
|
console.log(await runInit({ client, dryRun }));
|
|
250
|
+
if (!dryRun) finishOnboardingHint();
|
|
218
251
|
}
|
|
219
252
|
|
|
220
253
|
async function runInstallCmd() {
|
|
254
|
+
const ideKey = args[1] && !args[1].startsWith("-") ? args[1] : null;
|
|
221
255
|
runInstall({
|
|
222
|
-
ideKey
|
|
256
|
+
ideKey,
|
|
223
257
|
project: args.includes("--project"),
|
|
224
258
|
dryRun: args.includes("--dry-run"),
|
|
225
259
|
printOnly: args.includes("--print"),
|
|
226
260
|
apiUrl: parseFlag("--api", null),
|
|
227
261
|
literalToken: parseFlag("--token", null),
|
|
228
262
|
});
|
|
263
|
+
// Nach echter Eintragung (nicht bei list/--print/--dry-run) zum Token führen.
|
|
264
|
+
if (ideKey && ideKey !== "list" && !args.includes("--print") && !args.includes("--dry-run")) {
|
|
265
|
+
finishOnboardingHint();
|
|
266
|
+
}
|
|
229
267
|
}
|
|
230
268
|
|
|
231
269
|
// Wichtig: `process.exit(N)` reißt offene Sockets/fetch-Verbindungen mit
|
package/package.json
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "knowmind",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"mcpName": "io.github.Schubeler-Consulting/knowmind",
|
|
5
|
-
"description": "Knowmind — das Agentengehirn aus Deutschland: CLI + MCP-Server (Langzeitgedächtnis & Wissensgraph für Ihre KI, Server in Deutschland).",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"license": "Apache-2.0",
|
|
8
|
-
"homepage": "https://knowmind.de",
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/Schubeler-Consulting/knowmind.git"
|
|
12
|
-
},
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://knowmind.de/support",
|
|
15
|
-
"email": "info@schuebeler-consulting.de"
|
|
16
|
-
},
|
|
17
|
-
"author": {
|
|
18
|
-
"name": "Knowmind",
|
|
19
|
-
"email": "info@schuebeler-consulting.de",
|
|
20
|
-
"url": "https://knowmind.de"
|
|
21
|
-
},
|
|
22
|
-
"engines": {
|
|
23
|
-
"node": ">=20"
|
|
24
|
-
},
|
|
25
|
-
"bin": {
|
|
26
|
-
"knowmind": "bin/knowmind.js"
|
|
27
|
-
},
|
|
28
|
-
"files": [
|
|
29
|
-
"bin",
|
|
30
|
-
"src",
|
|
31
|
-
"!src/*.test.js",
|
|
32
|
-
"README.md",
|
|
33
|
-
"CHANGELOG.md",
|
|
34
|
-
"LICENSE"
|
|
35
|
-
],
|
|
36
|
-
"scripts": {
|
|
37
|
-
"test": "node --test src/*.test.js"
|
|
38
|
-
},
|
|
39
|
-
"dependencies": {
|
|
40
|
-
"@huggingface/transformers": "^3.5.0"
|
|
41
|
-
},
|
|
42
|
-
"overrides": {
|
|
43
|
-
"global-agent": "^4.1.3"
|
|
44
|
-
},
|
|
45
|
-
"keywords": [
|
|
46
|
-
"knowmind",
|
|
47
|
-
"mcp",
|
|
48
|
-
"model-context-protocol",
|
|
49
|
-
"knowledge-graph",
|
|
50
|
-
"recall",
|
|
51
|
-
"memory",
|
|
52
|
-
"rag",
|
|
53
|
-
"claude",
|
|
54
|
-
"openai",
|
|
55
|
-
"anthropic",
|
|
56
|
-
"ai"
|
|
57
|
-
],
|
|
58
|
-
"publishConfig": {
|
|
59
|
-
"access": "public"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "knowmind",
|
|
3
|
+
"version": "0.1.26",
|
|
4
|
+
"mcpName": "io.github.Schubeler-Consulting/knowmind",
|
|
5
|
+
"description": "Knowmind — das Agentengehirn aus Deutschland: CLI + MCP-Server (Langzeitgedächtnis & Wissensgraph für Ihre KI, Server in Deutschland).",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"license": "Apache-2.0",
|
|
8
|
+
"homepage": "https://knowmind.de",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/Schubeler-Consulting/knowmind.git"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://knowmind.de/support",
|
|
15
|
+
"email": "info@schuebeler-consulting.de"
|
|
16
|
+
},
|
|
17
|
+
"author": {
|
|
18
|
+
"name": "Knowmind",
|
|
19
|
+
"email": "info@schuebeler-consulting.de",
|
|
20
|
+
"url": "https://knowmind.de"
|
|
21
|
+
},
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=20"
|
|
24
|
+
},
|
|
25
|
+
"bin": {
|
|
26
|
+
"knowmind": "bin/knowmind.js"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"bin",
|
|
30
|
+
"src",
|
|
31
|
+
"!src/*.test.js",
|
|
32
|
+
"README.md",
|
|
33
|
+
"CHANGELOG.md",
|
|
34
|
+
"LICENSE"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"test": "node --test src/*.test.js"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@huggingface/transformers": "^3.5.0"
|
|
41
|
+
},
|
|
42
|
+
"overrides": {
|
|
43
|
+
"global-agent": "^4.1.3"
|
|
44
|
+
},
|
|
45
|
+
"keywords": [
|
|
46
|
+
"knowmind",
|
|
47
|
+
"mcp",
|
|
48
|
+
"model-context-protocol",
|
|
49
|
+
"knowledge-graph",
|
|
50
|
+
"recall",
|
|
51
|
+
"memory",
|
|
52
|
+
"rag",
|
|
53
|
+
"claude",
|
|
54
|
+
"openai",
|
|
55
|
+
"anthropic",
|
|
56
|
+
"ai"
|
|
57
|
+
],
|
|
58
|
+
"publishConfig": {
|
|
59
|
+
"access": "public"
|
|
60
|
+
}
|
|
61
|
+
}
|
package/src/client.js
CHANGED
|
@@ -57,7 +57,7 @@ export async function health() {
|
|
|
57
57
|
* rechnet selbst. Sinnvoll als Fallback, wenn der Client kein Modell
|
|
58
58
|
* laden kann (z. B. RAM-knapp).
|
|
59
59
|
*/
|
|
60
|
-
export async function uploadDocument(title, content) {
|
|
60
|
+
export async function uploadDocument(title, content, opts = {}) {
|
|
61
61
|
const { apiUrl, token } = loadConfig();
|
|
62
62
|
if (!token) throw new Error("Kein Token konfiguriert.");
|
|
63
63
|
|
|
@@ -91,6 +91,11 @@ export async function uploadDocument(title, content) {
|
|
|
91
91
|
body = { title, content };
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
// Upsert per documentId: kennt der Sync aus dem Manifest die Vorgaenger-
|
|
95
|
+
// documentId, geht sie als replaceDocumentId mit — der Server ersetzt damit
|
|
96
|
+
// genau diese Alt-Version, titelunabhaengig (verhindert Titel-Dubletten).
|
|
97
|
+
if (opts.replaceDocumentId) body.replaceDocumentId = opts.replaceDocumentId;
|
|
98
|
+
|
|
94
99
|
const r = await fetch(`${apiUrl}/api/documents`, {
|
|
95
100
|
method: "POST",
|
|
96
101
|
headers: { "content-type": "application/json", authorization: `Bearer ${token}` },
|
package/src/sync.js
CHANGED
|
@@ -104,7 +104,9 @@ export async function syncDirectory(dir, options = {}) {
|
|
|
104
104
|
|
|
105
105
|
const title = options.titleFromContent ? deriveTitle(content, file) : basename(file, extname(file));
|
|
106
106
|
try {
|
|
107
|
-
const result = await uploadDocument(title, content
|
|
107
|
+
const result = await uploadDocument(title, content, {
|
|
108
|
+
replaceDocumentId: known?.documentId ?? undefined,
|
|
109
|
+
});
|
|
108
110
|
uploaded += 1;
|
|
109
111
|
// Server antwortet bei sha-identischem Inhalt mit unchanged:true
|
|
110
112
|
// (historisch duplicate:true) — beide Felder akzeptieren.
|