knowmind 0.1.25 → 0.1.27

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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # Knowmind CLI — Änderungen
2
2
 
3
+ ## 0.1.27 (2026-07-16)
4
+
5
+ **Windows: `login` erzeugte eine unlesbare config.json (P0)**
6
+ - Der NTFS-Lockdown vergab Datei-Rechte mit Vererbungsflags `(OI)(CI)` — auf
7
+ Dateien sind solche ACEs wirkungslos (Inherit-Only). Ergebnis: direkt nach
8
+ erfolgreichem `knowmind login` war die Config für alle Konten gesperrt und
9
+ jeder Folgebefehl endete mit „Kein Token konfiguriert", obwohl icacls Exit 0
10
+ meldete. Jetzt bekommen Dateien `:F` ohne Vererbungsflags, Ordner weiterhin
11
+ `:(OI)(CI)F`. Gefunden im E2E-Kundendurchlauf auf Windows 11 (Deutsch).
12
+ - Betroffen: jede Neuanmeldung unter Windows seit Einführung des Lockdowns.
13
+ Abhilfe für Betroffene: einmal `knowmind login --token …` mit 0.1.27
14
+ wiederholen (überschreibt die Config mit korrekten Rechten).
15
+
3
16
  ## 0.1.25 (2026-06-23)
4
17
 
5
18
  **Geführtes Onboarding nach `install`/`init`**
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/package.json CHANGED
@@ -1,61 +1,61 @@
1
- {
2
- "name": "knowmind",
3
- "version": "0.1.25",
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.27",
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/config.js CHANGED
@@ -14,7 +14,7 @@
14
14
  * - Beim Start löschen wir Backup-Files (`config.json.bak*`,
15
15
  * `config.json.sc-backup`), die frühere Versionen hinterlassen haben.
16
16
  */
17
- import { readFileSync, writeFileSync, mkdirSync, existsSync, readdirSync, unlinkSync } from "node:fs";
17
+ import { readFileSync, writeFileSync, mkdirSync, existsSync, readdirSync, unlinkSync, statSync } from "node:fs";
18
18
  import { homedir, userInfo, platform } from "node:os";
19
19
  import { join } from "node:path";
20
20
  import { spawnSync } from "node:child_process";
@@ -69,15 +69,21 @@ function _lockdown(target) {
69
69
  if (platform() !== "win32") return;
70
70
  try {
71
71
  const user = userInfo().username;
72
+ // (OI)(CI) gilt NUR für Ordner. Auf einer Datei erzeugen Vererbungsflags
73
+ // Inherit-Only-ACEs, die für die Datei selbst nicht greifen — Ergebnis
74
+ // wäre eine für ALLE (inkl. Besitzer) unlesbare config.json, obwohl
75
+ // icacls Exit 0 meldet. (E2E-Befund 2026-07-16: jeder frische
76
+ // `knowmind login` unter Windows machte die CLI unbrauchbar.)
77
+ const suffix = statSync(target).isDirectory() ? ":(OI)(CI)F" : ":F";
72
78
  // /reset alleine reicht nicht — die geerbten Berechtigungen müssen weg.
73
79
  spawnSync("icacls", [target, "/inheritance:r"], { stdio: "ignore" });
74
- spawnSync("icacls", [target, "/grant:r", `${user}:(OI)(CI)F`], { stdio: "ignore" });
75
- spawnSync("icacls", [target, "/grant:r", "SYSTEM:(OI)(CI)F"], { stdio: "ignore" });
76
- spawnSync("icacls", [target, "/grant:r", "Administratoren:(OI)(CI)F"], {
80
+ spawnSync("icacls", [target, "/grant:r", `${user}${suffix}`], { stdio: "ignore" });
81
+ spawnSync("icacls", [target, "/grant:r", `SYSTEM${suffix}`], { stdio: "ignore" });
82
+ spawnSync("icacls", [target, "/grant:r", `Administratoren${suffix}`], {
77
83
  stdio: "ignore",
78
84
  });
79
85
  // EN-Variante als Fallback (icacls akzeptiert beide nur in jeweiliger Locale)
80
- spawnSync("icacls", [target, "/grant:r", "Administrators:(OI)(CI)F"], {
86
+ spawnSync("icacls", [target, "/grant:r", `Administrators${suffix}`], {
81
87
  stdio: "ignore",
82
88
  });
83
89
  } catch {
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.