knowmind 0.3.7 → 0.3.9

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,35 @@
1
1
  # Knowmind CLI — Änderungen
2
2
 
3
+ ## 0.3.9 (2026-10-10)
4
+
5
+ **`knowmind sync` hält umbenannte Dateien zusammen**
6
+
7
+ - Benennen Sie eine Datei um, bleibt sie dasselbe Dokument, statt als zweites
8
+ daneben zu erscheinen. `knowmind sync` erkennt sie, wenn die Datei unter dem
9
+ alten Namen nicht mehr da ist: am `name:` im Kopf der Datei, fehlt dieser, am
10
+ gleichen Inhalt.
11
+ - Jeder Upload über `knowmind sync` nennt seine Quelldatei, als Kennung des
12
+ Ordners und Pfad darin; der vollständige Pfad auf Ihrem Rechner geht nicht
13
+ hinaus. Knowmind ordnet eine neue Fassung damit auch dann der alten zu, wenn
14
+ sich der Titel des Dokuments geändert hat. Zwei Ordner mit gleichnamigen
15
+ Dateien bleiben getrennt.
16
+ - Die mitgelieferte Werkzeugliste trägt den Stand des Servers vom 10. Oktober.
17
+ Neu sind zwei Werkzeuge: `knowmind_list_inferred` listet Beziehungen, die
18
+ auf die Entscheidung eines Menschen warten; mit `knowmind_review_inferred`
19
+ bestätigen Sie eine solche Beziehung, lehnen sie ab oder nehmen eine Ablehnung
20
+ zurück.
21
+ `knowmind_link` und `knowmind_link_entities` verlangen jetzt einen Beleg
22
+ (`evidence`).
23
+ - Verbesserungen der Stabilität.
24
+
25
+ ## 0.3.8 (2026-10-08)
26
+
27
+ - Die mitgelieferte Werkzeugliste trägt den Stand des Servers vom 8. Oktober:
28
+ die Werkzeugnamen nach dem Muster Verb und Gegenstand
29
+ (`knowmind_recall_memories`, `knowmind_get_schema` …) und die Kennzeichnung,
30
+ welche Werkzeuge nur lesen und welche Daten ersetzen oder entfernen.
31
+ - Die README nennt die neuen Werkzeugnamen.
32
+
3
33
  ## 0.3.7 (2026-09-07)
4
34
 
5
35
  - Veröffentlichung über GitHub Actions: Das Paket wird ohne dauerhaften Token
package/README.de.md CHANGED
@@ -73,7 +73,7 @@ knowmind init --dry-run # zeigt nur, was geschähe (schreibt nich
73
73
  **Was eingerichtet wird:**
74
74
 
75
75
  - **Claude Code** — projektlokale Hooks in `.claude/`:
76
- - *UserPromptSubmit* → ruft vor jeder inhaltlichen Frage `knowmind_recall` auf und reicht die
76
+ - *UserPromptSubmit* → ruft vor jeder inhaltlichen Frage `knowmind_recall_memories` auf und reicht die
77
77
  Top-Treffer als Kontext nach (Memory-First, automatisch).
78
78
  - *Stop* → erinnert die KI daran, mit `knowmind_store_memory` zu sichern, wenn die Runde
79
79
  Sicherungswürdiges enthielt (Deploy/Commit, neue Regel, Entscheidung) und noch nichts
@@ -154,22 +154,46 @@ Der MCP-Modus ist seit 0.1.18 ein reiner Proxy auf die Plattform: Tool-Namen,
154
154
  Schemas und Safety-Annotations kommen direkt vom Server und sind damit immer
155
155
  identisch mit dem Remote-Connector (`https://knowmind.de/api/mcp/v1`).
156
156
 
157
- - `knowmind_recall` — Hybride Suche im Wissensspeicher des Mandanten
157
+ - `knowmind_recall_memories` — Hybride Suche im Wissensspeicher des Mandanten
158
158
  - `knowmind_recall_at_time` — Recall mit Zeitfilter (bi-temporal)
159
159
  - `knowmind_store_memory` — Neue Erinnerung anlegen (Titel + Inhalt)
160
160
  - `knowmind_upload_document` — Längeren Text als Dokument ingestieren (Upsert-per-Titel: gleicher Titel ersetzt die alte Version)
161
161
  - `knowmind_update_fact` — Fakt bi-temporal aktualisieren (Historie bleibt)
162
- - `knowmind_link` — Typisierte Beziehung anlegen (Inverse wird automatisch gesetzt)
163
- - `knowmind_unlink` — Beziehung wieder entfernen (samt Inverse)
162
+ - `knowmind_link_entities` — Typisierte Beziehung anlegen (Inverse wird automatisch gesetzt)
163
+ - `knowmind_unlink_entities` — Beziehung wieder entfernen (samt Inverse)
164
164
  - `knowmind_list_relations` — Beziehungen einer Erinnerung auflisten
165
165
  - `knowmind_list_recent` — Zuletzt angelegte Dokumente/Memories des Mandanten auflisten, sortiert nach Anlagedatum absteigend
166
- - `knowmind_stats` — Statistik über gespeicherte Erinnerungen und Beziehungen
167
- - `knowmind_health` — Verfügbarkeits-Status der Plattform
166
+ - `knowmind_get_stats` — Statistik über gespeicherte Erinnerungen und Beziehungen
167
+ - `knowmind_get_health` — Verfügbarkeits-Status der Plattform
168
+ - `knowmind_upsert_entity` — Knoten für eine Sache anlegen (Person, Firma, Anwendung, Rechner, Technik) oder den vorhandenen zurückgeben
169
+ - `knowmind_get_schema` — Welche Entitätsklassen und Beziehungstypen dieser Arbeitsbereich kennt
168
170
 
169
171
  Inverse-Beziehungen (z. B. `IS_EMPLOYEE_OF` zu `HAS_EMPLOYEE`) werden
170
172
  serverseitig automatisch mit angelegt. Hinweis: `knowmind upload` als
171
173
  CLI-Befehl läuft über die REST-Schnittstelle (`/api/documents`), nicht über MCP.
172
174
 
175
+
176
+ ### Die bisherigen Werkzeugnamen
177
+
178
+ Sieben Werkzeuge haben am 12. September 2026 neue Namen bekommen, damit jeder
179
+ Name dem Muster `knowmind_<verb>_<objekt>` folgt und sagt, ob er liest oder
180
+ schreibt. Die bisherigen Namen antworten bis zum 31. März 2027 unverändert
181
+ weiter und stehen weiter in der Discovery, als veraltet gekennzeichnet:
182
+
183
+ | bisher | ab jetzt |
184
+ | --- | --- |
185
+ | `knowmind_recall` | `knowmind_recall_memories` |
186
+ | `knowmind_health` | `knowmind_get_health` |
187
+ | `knowmind_stats` | `knowmind_get_stats` |
188
+ | `knowmind_schema` | `knowmind_get_schema` |
189
+ | `knowmind_entity` | `knowmind_upsert_entity` |
190
+ | `knowmind_link` | `knowmind_link_entities` |
191
+ | `knowmind_unlink` | `knowmind_unlink_entities` |
192
+
193
+ Aus `knowmind_entity` wurde `upsert` und nicht `get`: Das Werkzeug legt den
194
+ Knoten an oder gibt den vorhandenen zurück. Sonst ändert sich nichts —
195
+ dieselben Parameter, dasselbe Verhalten.
196
+
173
197
  ## Daten in Deutschland
174
198
 
175
199
  knowmind wird in Deutschland betrieben: Ihre Inhalte (Memories, Account- und Metadaten) werden
package/README.md CHANGED
@@ -93,7 +93,7 @@ never sees another tenant's data.
93
93
 
94
94
  ### Reading
95
95
 
96
- **`knowmind_recall`** — Search your memory and get the passages that answer a
96
+ **`knowmind_recall_memories`** — Search your memory and get the passages that answer a
97
97
  question, ranked. Combines keyword search, vector similarity and the knowledge
98
98
  graph, then reranks with a cross-encoder.
99
99
  `query` (string, required) · `k` (integer, default 5, max 20) · `hops` (integer,
@@ -110,7 +110,7 @@ then are returned even if they are no longer true.
110
110
  practice) · `k` (integer, default 5)
111
111
  *Usage:* "What was our pricing in March?" — answers from the state of that day,
112
112
  not today's.
113
- *Difference from `knowmind_recall`:* use `recall` for what is true now, and
113
+ *Difference from `knowmind_recall_memories`:* use `recall` for what is true now, and
114
114
  `recall_at_time` for what was true then. Asking `recall` about the past returns
115
115
  today's facts.
116
116
 
@@ -124,15 +124,15 @@ directions.
124
124
  *Usage:* "What does this contract connect to?" before changing or superseding it.
125
125
  *Errors:* unknown id returns an error, not an empty list.
126
126
 
127
- **`knowmind_schema`** — The entity classes and relation types this workspace
127
+ **`knowmind_get_schema`** — The entity classes and relation types this workspace
128
128
  accepts. No parameters.
129
- *Usage:* call it before `knowmind_entity` or `knowmind_link` to use a type the
129
+ *Usage:* call it before `knowmind_upsert_entity` or `knowmind_link_entities` to use a type the
130
130
  server will accept, rather than inventing one.
131
131
 
132
- **`knowmind_stats`** — Size of the corpus: documents, chunks, entities, edges.
132
+ **`knowmind_get_stats`** — Size of the corpus: documents, chunks, entities, edges.
133
133
  No parameters.
134
134
 
135
- **`knowmind_health`** — Whether the service and its stores are reachable. No
135
+ **`knowmind_get_health`** — Whether the service and its stores are reachable. No
136
136
  parameters.
137
137
  *Usage:* a status line, or a check before a long ingest.
138
138
 
@@ -148,7 +148,7 @@ unit; it is not split.
148
148
  an access key. Store a pointer instead, not the secret.
149
149
 
150
150
  **`knowmind_upload_document`** — Store a longer text as a document. It is split
151
- into passages, embedded, and becomes searchable through `knowmind_recall`.
151
+ into passages, embedded, and becomes searchable through `knowmind_recall_memories`.
152
152
  `content` (string, required) · `title` (string) · `source` (string) ·
153
153
  `relations` (array)
154
154
  *Usage:* meeting minutes, a specification, a handbook chapter.
@@ -164,33 +164,55 @@ keeps its validity window and stays auditable; nothing is deleted.
164
164
  supersede, so "what did we believe in July" stays answerable.
165
165
  *Errors:* unknown `target_id` is rejected.
166
166
 
167
- **`knowmind_entity`** — Create or update a typed entity (a person, a company, a
167
+ **`knowmind_upsert_entity`** — Create or update a typed entity (a person, a company, a
168
168
  product) with aliases.
169
169
  `name` (string, required) · `entity_class` (string, required — see
170
- `knowmind_schema`) · `description` (string) · `aliases` (array of strings)
170
+ `knowmind_get_schema`) · `description` (string) · `aliases` (array of strings)
171
171
  *Usage:* give "ACME Ltd." its aliases so a question about "ACME" finds it.
172
172
  *Errors:* a class outside the schema is rejected.
173
173
 
174
- **`knowmind_link`** — Create a typed edge between two entries, with a confidence
174
+ **`knowmind_link_entities`** — Create a typed edge between two entries, with a confidence
175
175
  value.
176
176
  `from_id` (string, required) · `to_id` (string, required) · `rel_type` (string,
177
- required — see `knowmind_schema`) · `confidence` (number 0–1)
177
+ required — see `knowmind_get_schema`) · `confidence` (number 0–1)
178
178
  *Usage:* connect a contract to the client it belongs to. The inverse edge is
179
179
  created for you.
180
180
 
181
- **`knowmind_unlink`** — Remove a typed edge.
181
+ **`knowmind_unlink_entities`** — Remove a typed edge.
182
182
  `from_id`, `to_id`, `rel_type` (all required)
183
183
  *Usage:* an edge created in error. The entries themselves stay.
184
184
 
185
185
  ### On deleting
186
186
 
187
187
  There is no delete tool, and that is deliberate. Facts are superseded
188
- (`knowmind_update_fact`), edges are removed (`knowmind_unlink`), and the history
188
+ (`knowmind_update_fact`), edges are removed (`knowmind_unlink_entities`), and the history
189
189
  stays auditable. Deleting an entire workspace including its data is a
190
190
  self-service action in the web interface at
191
191
  [knowmind.de](https://knowmind.de) — it is not something an agent should be able
192
192
  to do by calling a tool.
193
193
 
194
+
195
+ ### Older tool names
196
+
197
+ Seven tools were renamed on 12 September 2026 so that every name follows
198
+ `knowmind_<verb>_<object>` and says whether it reads or writes. The previous
199
+ names keep answering unchanged until 31 March 2027 and still appear in
200
+ discovery, marked as deprecated:
201
+
202
+ | until now | from now on |
203
+ | --- | --- |
204
+ | `knowmind_recall` | `knowmind_recall_memories` |
205
+ | `knowmind_health` | `knowmind_get_health` |
206
+ | `knowmind_stats` | `knowmind_get_stats` |
207
+ | `knowmind_schema` | `knowmind_get_schema` |
208
+ | `knowmind_entity` | `knowmind_upsert_entity` |
209
+ | `knowmind_link` | `knowmind_link_entities` |
210
+ | `knowmind_unlink` | `knowmind_unlink_entities` |
211
+
212
+ `knowmind_entity` became `upsert`, not `get`: it creates the node or returns
213
+ the existing one. Nothing else about the tools changed — same parameters,
214
+ same behaviour.
215
+
194
216
  ### Discovery
195
217
 
196
218
  `GET https://knowmind.de/api/mcp/v1` returns name, version, protocol version and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knowmind",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "mcpName": "io.github.Schubeler-Consulting/knowmind",
5
5
  "description": "Knowmind — das Agentengehirn aus Deutschland: CLI + MCP-Server (Langzeitgedächtnis & Wissensgraph für Ihre KI, Server in Deutschland).",
6
6
  "type": "module",
@@ -0,0 +1,92 @@
1
+ #!/usr/bin/env node
2
+ // Steht diese Fassung schon im MCP-Verzeichnis?
3
+ //
4
+ // WARUM ES DIESES SKRIPT GIBT
5
+ // Der Ablauf „Publish to MCP Registry" läuft an zwei Auslösern: von Hand
6
+ // (`workflow_dispatch`) und beim Setzen eines Versionsmerkmals (`push: tags`).
7
+ // Am 07.09.2026 lief beides zehn Minuten auseinander für dieselbe Fassung
8
+ // 0.3.7. Der erste Lauf veröffentlichte sie, der zweite bekam vom Verzeichnis
9
+ //
10
+ // 400 Bad Request: invalid version: cannot publish duplicate version
11
+ //
12
+ // und färbte den Ablauf rot. Elf Tage lang stand dort ein rotes Kreuz für
13
+ // einen Vorgang, der gelungen war — und ein Ablauf, der dauerhaft rot steht,
14
+ // verbirgt den nächsten echten Fehler.
15
+ //
16
+ // Die Ablehnung des Verzeichnisses ist richtig: Eine veröffentlichte Fassung
17
+ // darf sich nicht ändern. Falsch war, dass unser Ablauf den zweiten Versuch
18
+ // überhaupt unternimmt.
19
+ //
20
+ // WAS ES TUT
21
+ // Es liest die Fassung aus `server.json`, fragt das Verzeichnis und sagt,
22
+ // ob sie dort schon steht.
23
+ //
24
+ // node scripts/registry-fassung-vorhanden.mjs
25
+ // Rückgabe 0 -> Fassung steht schon im Verzeichnis, Veröffentlichung übergehen
26
+ // Rückgabe 1 -> Fassung fehlt, veröffentlichen
27
+ // Rückgabe 2 -> Abbruch (Datei unlesbar, Verzeichnis antwortet nicht)
28
+ //
29
+ // **Rückgabe 2 heißt veröffentlichen, nicht überspringen.** Wer bei einer
30
+ // unbeantworteten Abfrage übergeht, verpasst eine Veröffentlichung und merkt
31
+ // es nie; wer veröffentlicht, riskiert höchstens genau den Doppelversuch, den
32
+ // der Ablauf danach ohnehin abfängt. Der Ablauf behandelt 2 deshalb wie 1.
33
+ //
34
+ // node scripts/registry-fassung-vorhanden.mjs --fassung 9.9.9
35
+ // prüft eine andere Fassung als die in server.json (für den Prüfstand)
36
+ import { readFileSync } from "node:fs";
37
+
38
+ const VERZEICHNIS = "https://registry.modelcontextprotocol.io/v0/servers";
39
+ const NAME = "io.github.Schubeler-Consulting/knowmind";
40
+
41
+ const argv = process.argv.slice(2);
42
+ const i = argv.indexOf("--fassung");
43
+ let fassung = i >= 0 ? argv[i + 1] : null;
44
+
45
+ if (!fassung) {
46
+ try {
47
+ fassung = JSON.parse(readFileSync("server.json", "utf8")).version;
48
+ } catch (e) {
49
+ console.error(`ABBRUCH: server.json nicht lesbar (${e.message})`);
50
+ process.exit(2);
51
+ }
52
+ }
53
+
54
+ if (!fassung) {
55
+ console.error("ABBRUCH: server.json nennt keine Fassung.");
56
+ process.exit(2);
57
+ }
58
+
59
+ let antwort;
60
+ try {
61
+ const r = await fetch(`${VERZEICHNIS}?search=knowmind`, {
62
+ signal: AbortSignal.timeout(20_000),
63
+ });
64
+ if (!r.ok) {
65
+ console.error(`ABBRUCH: Verzeichnis antwortet mit ${r.status}.`);
66
+ process.exit(2);
67
+ }
68
+ antwort = await r.json();
69
+ } catch (e) {
70
+ console.error(`ABBRUCH: Verzeichnis nicht erreichbar (${e.message})`);
71
+ process.exit(2);
72
+ }
73
+
74
+ // Die Suche liefert auch fremde Server, deren Beschreibung das Wort enthält.
75
+ // Deshalb wird auf den vollständigen Namen gefiltert, nicht auf den Treffer.
76
+ const unsere = (antwort.servers ?? [])
77
+ .map((e) => e.server ?? {})
78
+ .filter((s) => s.name === NAME);
79
+
80
+ if (unsere.length === 0) {
81
+ console.log(`Kein Eintrag für ${NAME} im Verzeichnis. Veröffentlichen.`);
82
+ process.exit(1);
83
+ }
84
+
85
+ const vorhanden = unsere.some((s) => s.version === fassung);
86
+ if (vorhanden) {
87
+ console.log(`Fassung ${fassung} steht schon im Verzeichnis (${unsere.length} Fassungen gesamt). Übergehen.`);
88
+ process.exit(0);
89
+ }
90
+
91
+ console.log(`Fassung ${fassung} fehlt im Verzeichnis (${unsere.length} andere Fassungen). Veröffentlichen.`);
92
+ process.exit(1);
package/src/client.js CHANGED
@@ -118,6 +118,9 @@ export async function uploadDocument(title, content, opts = {}) {
118
118
  // documentId, geht sie als replaceDocumentId mit — der Server ersetzt damit
119
119
  // genau diese Alt-Version, titelunabhaengig (verhindert Titel-Dubletten).
120
120
  if (opts.replaceDocumentId) body.replaceDocumentId = opts.replaceDocumentId;
121
+ // Quelldatei relativ zum Ordner: Der Server findet darüber die Fassung
122
+ // derselben Datei, auch wenn sich der Titel geändert hat.
123
+ if (opts.sourcePath) body.sourcePath = opts.sourcePath;
121
124
 
122
125
  const r = await fetch(`${apiUrl}/api/documents`, {
123
126
  method: "POST",
package/src/sync.js CHANGED
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import { readFileSync, readdirSync, statSync, writeFileSync, existsSync } from "node:fs";
14
14
  import { join, relative, basename, extname } from "node:path";
15
- import { createHash } from "node:crypto";
15
+ import { createHash, randomUUID } from "node:crypto";
16
16
  import { uploadDocument } from "./client.js";
17
17
 
18
18
  const DEFAULT_EXTENSIONS = [".md", ".markdown", ".txt"];
@@ -62,6 +62,35 @@ function saveManifest(path, manifest) {
62
62
  writeFileSync(path, JSON.stringify(manifest, null, 2));
63
63
  }
64
64
 
65
+ /** `name:` aus dem Frontmatter — die stabile Kennung einer Memory-Datei, unabhängig vom Dateinamen. */
66
+ export function frontmatterName(content) {
67
+ const m = /^---\r?\n([\s\S]*?)\r?\n---/.exec(content);
68
+ if (!m) return null;
69
+ const z = /^name:\s*(.+?)\s*$/m.exec(m[1]);
70
+ return z ? z[1].replace(/^["']|["']$/g, "") : null;
71
+ }
72
+
73
+ /**
74
+ * Vorgänger einer Datei, deren Pfad das Manifest nicht kennt: ein Eintrag,
75
+ * dessen Datei es nicht mehr gibt und der dieselbe Sache ist — gleicher
76
+ * Frontmatter-Name oder, ohne Namen, gleicher Inhalt. So bleibt eine
77
+ * umbenannte Datei dasselbe Dokument (B3, 10.10.2026: fünf Paare aus
78
+ * Bindestrich gegen Unterstrich).
79
+ */
80
+ export function vorgaengerFinden(manifest, rel, name, hash, gibtEs) {
81
+ for (const [alt, eintrag] of Object.entries(manifest.files)) {
82
+ if (alt === rel || !eintrag?.documentId || gibtEs(alt)) continue;
83
+ if (name ? eintrag.name === name : eintrag.sha256 === hash) return alt;
84
+ }
85
+ return null;
86
+ }
87
+
88
+ /** Quellpfad am Server: Ordnerkennung aus dem Manifest plus relativer Pfad. */
89
+ export function quellpfad(manifest, rel) {
90
+ if (!manifest.quelle) manifest.quelle = randomUUID();
91
+ return `${manifest.quelle}/${rel}`;
92
+ }
93
+
65
94
  function deriveTitle(content, filePath) {
66
95
  const m = content.match(/^#\s+(.+)$/m);
67
96
  if (m) return m[1].trim();
@@ -77,6 +106,10 @@ export async function syncDirectory(dir, options = {}) {
77
106
  const exts = options.extensions ?? DEFAULT_EXTENSIONS;
78
107
  const manifestPath = join(dir, MANIFEST_NAME);
79
108
  const manifest = loadManifest(manifestPath);
109
+ // Eigene Kennung je Ordner: Der Quellpfad am Server ist `<Kennung>/<Pfad>`,
110
+ // damit zwei Ordner mit je einer README.md im selben Arbeitsbereich
111
+ // getrennt bleiben. Der lokale Pfad selbst geht nicht hinaus.
112
+ if (!manifest.quelle) manifest.quelle = randomUUID();
80
113
 
81
114
  const files = [...walk(dir, exts)].sort();
82
115
  const total = files.length;
@@ -94,10 +127,21 @@ export async function syncDirectory(dir, options = {}) {
94
127
  if (basename(file) === MANIFEST_NAME) continue;
95
128
  const content = readFileSync(file, "utf-8");
96
129
  const hash = sha256(content);
97
- const known = manifest.files[rel];
130
+ const name = frontmatterName(content);
131
+ let known = manifest.files[rel];
132
+ let umbenanntVon = null;
133
+ if (!known) {
134
+ umbenanntVon = vorgaengerFinden(manifest, rel, name, hash, (r) => existsSync(join(dir, r)));
135
+ if (umbenanntVon) known = { ...manifest.files[umbenanntVon], sha256: null };
136
+ }
98
137
 
99
138
  if (known && known.sha256 === hash) {
100
139
  skipped += 1;
140
+ // Name nachtragen (das Manifest wird am Ende gespeichert), damit eine
141
+ // spätere Umbenennung erkannt wird.
142
+ if (name && known.name !== name) {
143
+ known.name = name;
144
+ }
101
145
  if (options.verbose) console.log(` skip ${rel}`);
102
146
  continue;
103
147
  }
@@ -106,6 +150,7 @@ export async function syncDirectory(dir, options = {}) {
106
150
  try {
107
151
  const result = await uploadDocument(title, content, {
108
152
  replaceDocumentId: known?.documentId ?? undefined,
153
+ sourcePath: quellpfad(manifest, rel),
109
154
  });
110
155
  uploaded += 1;
111
156
  // Server antwortet bei sha-identischem Inhalt mit unchanged:true
@@ -116,13 +161,15 @@ export async function syncDirectory(dir, options = {}) {
116
161
  documentId: result.id ?? null,
117
162
  lastSync: new Date().toISOString(),
118
163
  duplicate: isDuplicate,
164
+ ...(name ? { name } : {}),
119
165
  };
166
+ if (umbenanntVon) delete manifest.files[umbenanntVon];
120
167
  // Manifest nach JEDEM erfolgreichen Upload speichern (2026-06-10):
121
168
  // Der Stop-Hook killt den Sync nach 120 s — mit 10er-Batches gingen
122
169
  // Manifest-Stände verloren und identischer Inhalt wurde endlos
123
170
  // re-POSTet (Ursache der Ingest-500-Schleife 26.–27.05.).
124
171
  saveManifest(manifestPath, manifest);
125
- const flag = isDuplicate ? "dup " : "new ";
172
+ const flag = umbenanntVon ? "ren " : isDuplicate ? "dup " : "new ";
126
173
  process.stdout.write(` [${scanned}/${total}] ${flag} ${rel}\n`);
127
174
  } catch (e) {
128
175
  failed += 1;
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "_hinweis": "Rückfall für tools/list, wenn die Discovery nicht erreichbar ist. Erzeugt aus https://knowmind.de/api/mcp/v1. Abgleich: npm run tools:abgleich",
3
- "stand": "2026-09-07",
3
+ "stand": "2026-10-10",
4
4
  "quelle": "https://knowmind.de/api/mcp/v1",
5
5
  "protocolVersion": "2025-06-18",
6
6
  "tools": [
7
7
  {
8
- "name": "knowmind_recall",
8
+ "name": "knowmind_recall_memories",
9
9
  "annotations": {
10
10
  "title": "Recall - retrieve knowledge",
11
11
  "readOnlyHint": true,
@@ -42,7 +42,7 @@
42
42
  }
43
43
  },
44
44
  {
45
- "name": "knowmind_health",
45
+ "name": "knowmind_get_health",
46
46
  "annotations": {
47
47
  "title": "Service health",
48
48
  "readOnlyHint": true,
@@ -57,7 +57,7 @@
57
57
  }
58
58
  },
59
59
  {
60
- "name": "knowmind_stats",
60
+ "name": "knowmind_get_stats",
61
61
  "annotations": {
62
62
  "title": "Corpus statistics",
63
63
  "readOnlyHint": true,
@@ -103,7 +103,7 @@
103
103
  "idempotentHint": false,
104
104
  "openWorldHint": false
105
105
  },
106
- "description": "Store durable insights the moment they arise - decisions, preferences, facts, results, appointments. Persists one memory entry in the tenant corpus (Postgres + vector index + graph node), afterwards findable via knowmind_recall and knowmind_list_recent. Append-only: the same title replaces nothing (use knowmind_update_fact to supersede); sha-identical content is detected as idempotent (unchanged). Returns the new memory id. Use for a single short fact; for long or multi-fact text use knowmind_upload_document. GIVE THE EDGES ALONG: whatever the text says about people, organisations, projects, hosts or technologies belongs into `relations` in THIS call - name the counterpart, the server creates its node and the edge, no second call needed. A memory without edges is a note; with edges it becomes a graph that answers questions nobody wrote down. Use knowmind_link separately only to connect two entries that already exist. Requires write scope.",
106
+ "description": "Store durable insights the moment they arise - decisions, preferences, facts, results, appointments. Persists one memory entry in the tenant corpus (Postgres + vector index + graph node), afterwards findable via knowmind_recall and knowmind_list_recent. Append-only: the same title replaces nothing (use knowmind_update_fact to supersede); sha-identical content is detected as idempotent (unchanged). Returns the new memory id. Use for a single short fact; for long or multi-fact text use knowmind_upload_document. GIVE THE EDGES ALONG: whatever the text says about people, organisations, projects, hosts or technologies belongs into `relations` in THIS call - name the counterpart, the server creates its node and the edge, no second call needed. A memory without edges is a note; with edges it becomes a graph that answers questions nobody wrote down. Use knowmind_link separately only to connect two entries that already exist. ENTRIES ARE NEVER HARD-DELETED, they are superseded: correct a fact with knowmind_update_fact, remove an edge with knowmind_unlink_entities. Both keep the history auditable, which is the point of this store - what was true when, and when that changed. Requires write scope.",
107
107
  "inputSchema": {
108
108
  "type": "object",
109
109
  "properties": {
@@ -143,7 +143,7 @@
143
143
  },
144
144
  "relations": {
145
145
  "type": "array",
146
- "description": "Edges from this entry to the things it talks about - set them HERE, in the same call. Name the counterpart in plain words; the server finds or creates its node and draws the edge, so you need neither knowmind_recall nor knowmind_entity nor knowmind_link for it. Example: storing 'Anna Meier leitet die IT bei der Muster GmbH' carries [{predicate: 'WORKS_FOR', object: 'Muster GmbH', object_class: 'Organization'}]. An entry without edges is a note; with edges it answers questions nobody wrote down. Allowed predicate values: ABOUT (Contract|Document|FileResource → Topic), CLIENT_OF (Agent|Organization|Person|SoftwareAgent → Organization), CONTACT_PERSON_FOR (Person → Organization), COVERED_BY (Topic → Contract|Document|FileResource), DELIVERED_AS (Application → Product), DELIVERED_BY (Product → Application), DEPENDS_ON (Application → Application), DEPLOYED_TO (Application → Container), DEVELOPED_BY (Application → Agent|Organization|Person|SoftwareAgent), DEVELOPS (Agent|Organization|Person|SoftwareAgent → Application), ENABLES (Application → Application), FOR_CLIENT (Project → Agent|Organization|Person|SoftwareAgent), HAS_CHILD (Person → Person), HAS_CLIENT (Organization → Agent|Organization|Person|SoftwareAgent), HAS_CONTACT_PERSON (Organization → Person), HAS_EMPLOYEE (Organization → Person), HAS_OPERATED_APPLICATION (Agent|Organization|Person|SoftwareAgent → Application), HAS_PARENT (Person → Person), HAS_PROJECT (Agent|Organization|Person|SoftwareAgent → Project), HAS_ROLE (Person → Role), HAS_SIBLING (Person → Person), HAS_SKILL (Agent|Organization|Person|SoftwareAgent → Skill), HOSTED_ON (Container → Host), HOSTS (Host → Container), HOSTS_APPLICATION (Container → Application), INFRASTRUCTURE_PROVIDED_BY (Host → Organization), INTEGRATES_WITH (Application → Application), IS_LED_BY (Organization → Person), KNOWS (Person → Person), LEADS (Person → Organization), OPERATED_FOR (Application → Agent|Organization|Person|SoftwareAgent), PAID_BY (Agent|Organization|Person|SoftwareAgent → Agent|Organization|Person|SoftwareAgent), PARTNER_OF (Organization → Organization), PAYS (Agent|Organization|Person|SoftwareAgent → Agent|Organization|Person|SoftwareAgent), PRODUCED_BY (Contract|Document|FileResource → Project), PRODUCES (Project → Contract|Document|FileResource), PROVIDES_INFRASTRUCTURE (Organization → Host), ROLE_OF (Role → Person), SERVED_UNDER (Application → Domain), SERVES (Domain → Application), SKILL_OF (Skill → Agent|Organization|Person|SoftwareAgent), SPOUSE_OF (Person → Person), SUPPLIED_BY (Agent|Organization|Person|SoftwareAgent → Organization), SUPPLIES (Organization → Agent|Organization|Person|SoftwareAgent), SUPPLIES_TECHNOLOGY (Organization → Technology), SUPPORTED_BY (Contract|Document|FileResource → Contract|Document|FileResource), SUPPORTS (Contract|Document|FileResource → Contract|Document|FileResource), TECHNOLOGY_SUPPLIED_BY (Technology → Organization), TECHNOLOGY_USED_BY (Technology → Application), USES_TECHNOLOGY (Application → Technology), WORKED_ON_BY (Project → Agent|Organization|Person|SoftwareAgent), WORKS_FOR (Person → Organization), WORKS_ON (Agent|Organization|Person|SoftwareAgent → Project)",
146
+ "description": "Edges from this entry to the things it talks about - set them HERE, in the same call. Name the counterpart in plain words; the server finds or creates its node and draws the edge, so you need neither knowmind_recall nor knowmind_entity nor knowmind_link for it. Example: storing 'Anna Meier leitet die IT bei der Muster GmbH' carries [{predicate: 'WORKS_FOR', object: 'Muster GmbH', object_class: 'Organization'}]. An entry without edges is a note; with edges it answers questions nobody wrote down. Allowed predicate values: ABOUT (Contract|Document|FileResource → Topic), ASSIGNED_TO (ActionRecord|Task → Agent|Organization|Person|SoftwareAgent), CLIENT_OF (Agent|Organization|Person|SoftwareAgent → Organization), CONTACT_PERSON_FOR (Person → Organization), COVERED_BY (Topic → Contract|Document|FileResource), DELIVERED_AS (Application → Product), DELIVERED_BY (Product → Application), DEPENDS_ON (Application → Application), DEPLOYED_TO (Application → Container), DEVELOPED_BY (Application → Agent|Organization|Person|SoftwareAgent), DEVELOPS (Agent|Organization|Person|SoftwareAgent → Application), ENABLES (Application → Application), FOR_CLIENT (Project → Agent|Organization|Person|SoftwareAgent), HAS_ASSIGNED_TASK (Agent|Organization|Person|SoftwareAgent → ActionRecord|Task), HAS_CHILD (Person → Person), HAS_CLIENT (Organization → Agent|Organization|Person|SoftwareAgent), HAS_CONTACT_PERSON (Organization → Person), HAS_EMPLOYEE (Organization → Person), HAS_OPERATED_APPLICATION (Agent|Organization|Person|SoftwareAgent → Application), HAS_PARENT (Person → Person), HAS_PREDECESSOR (ActionRecord|Project|Task → ActionRecord|Project|Task), HAS_PROJECT (Agent|Organization|Person|SoftwareAgent → Project), HAS_ROLE (Person → Role), HAS_SIBLING (Person → Person), HAS_SKILL (Agent|Organization|Person|SoftwareAgent → Skill), HAS_SUCCESSOR (ActionRecord|Project|Task → ActionRecord|Project|Task), HOSTED_ON (Container → Host), HOSTS (Host → Container), HOSTS_APPLICATION (Container → Application), INFRASTRUCTURE_PROVIDED_BY (Host → Organization), INTEGRATES_WITH (Application → Application), IS_LED_BY (Organization → Person), KNOWS (Person → Person), LEADS (Person → Organization), OPERATED_FOR (Application → Agent|Organization|Person|SoftwareAgent), PAID_BY (Agent|Organization|Person|SoftwareAgent → Agent|Organization|Person|SoftwareAgent), PARTNER_OF (Organization → Organization), PAYS (Agent|Organization|Person|SoftwareAgent → Agent|Organization|Person|SoftwareAgent), PRODUCED_BY (Contract|Document|FileResource → Project), PRODUCES (Project → Contract|Document|FileResource), PROVIDES_INFRASTRUCTURE (Organization → Host), ROLE_OF (Role → Person), SERVED_UNDER (Application → Domain), SERVES (Domain → Application), SKILL_OF (Skill → Agent|Organization|Person|SoftwareAgent), SPOUSE_OF (Person → Person), SUPPLIED_BY (Agent|Organization|Person|SoftwareAgent → Organization), SUPPLIES (Organization → Agent|Organization|Person|SoftwareAgent), SUPPLIES_TECHNOLOGY (Organization → Technology), SUPPORTED_BY (Contract|Document|FileResource → Contract|Document|FileResource), SUPPORTS (Contract|Document|FileResource → Contract|Document|FileResource), TECHNOLOGY_SUPPLIED_BY (Technology → Organization), TECHNOLOGY_USED_BY (Technology → Application), USES_TECHNOLOGY (Application → Technology), WORKED_ON_BY (Project → Agent|Organization|Person|SoftwareAgent), WORKS_FOR (Person → Organization), WORKS_ON (Agent|Organization|Person|SoftwareAgent → Project)",
147
147
  "items": {
148
148
  "type": "object",
149
149
  "properties": {
@@ -185,7 +185,7 @@
185
185
  "annotations": {
186
186
  "title": "Upload document",
187
187
  "readOnlyHint": false,
188
- "destructiveHint": false,
188
+ "destructiveHint": true,
189
189
  "idempotentHint": false,
190
190
  "openWorldHint": false
191
191
  },
@@ -207,7 +207,7 @@
207
207
  },
208
208
  "relations": {
209
209
  "type": "array",
210
- "description": "Edges from this document to the things it talks about - set them HERE, in the same call. Name the counterpart in plain words; the server finds or creates its node and draws the edge. Allowed predicate values: ABOUT (Contract|Document|FileResource → Topic), CLIENT_OF (Agent|Organization|Person|SoftwareAgent → Organization), CONTACT_PERSON_FOR (Person → Organization), COVERED_BY (Topic → Contract|Document|FileResource), DELIVERED_AS (Application → Product), DELIVERED_BY (Product → Application), DEPENDS_ON (Application → Application), DEPLOYED_TO (Application → Container), DEVELOPED_BY (Application → Agent|Organization|Person|SoftwareAgent), DEVELOPS (Agent|Organization|Person|SoftwareAgent → Application), ENABLES (Application → Application), FOR_CLIENT (Project → Agent|Organization|Person|SoftwareAgent), HAS_CHILD (Person → Person), HAS_CLIENT (Organization → Agent|Organization|Person|SoftwareAgent), HAS_CONTACT_PERSON (Organization → Person), HAS_EMPLOYEE (Organization → Person), HAS_OPERATED_APPLICATION (Agent|Organization|Person|SoftwareAgent → Application), HAS_PARENT (Person → Person), HAS_PROJECT (Agent|Organization|Person|SoftwareAgent → Project), HAS_ROLE (Person → Role), HAS_SIBLING (Person → Person), HAS_SKILL (Agent|Organization|Person|SoftwareAgent → Skill), HOSTED_ON (Container → Host), HOSTS (Host → Container), HOSTS_APPLICATION (Container → Application), INFRASTRUCTURE_PROVIDED_BY (Host → Organization), INTEGRATES_WITH (Application → Application), IS_LED_BY (Organization → Person), KNOWS (Person → Person), LEADS (Person → Organization), OPERATED_FOR (Application → Agent|Organization|Person|SoftwareAgent), PAID_BY (Agent|Organization|Person|SoftwareAgent → Agent|Organization|Person|SoftwareAgent), PARTNER_OF (Organization → Organization), PAYS (Agent|Organization|Person|SoftwareAgent → Agent|Organization|Person|SoftwareAgent), PRODUCED_BY (Contract|Document|FileResource → Project), PRODUCES (Project → Contract|Document|FileResource), PROVIDES_INFRASTRUCTURE (Organization → Host), ROLE_OF (Role → Person), SERVED_UNDER (Application → Domain), SERVES (Domain → Application), SKILL_OF (Skill → Agent|Organization|Person|SoftwareAgent), SPOUSE_OF (Person → Person), SUPPLIED_BY (Agent|Organization|Person|SoftwareAgent → Organization), SUPPLIES (Organization → Agent|Organization|Person|SoftwareAgent), SUPPLIES_TECHNOLOGY (Organization → Technology), SUPPORTED_BY (Contract|Document|FileResource → Contract|Document|FileResource), SUPPORTS (Contract|Document|FileResource → Contract|Document|FileResource), TECHNOLOGY_SUPPLIED_BY (Technology → Organization), TECHNOLOGY_USED_BY (Technology → Application), USES_TECHNOLOGY (Application → Technology), WORKED_ON_BY (Project → Agent|Organization|Person|SoftwareAgent), WORKS_FOR (Person → Organization), WORKS_ON (Agent|Organization|Person|SoftwareAgent → Project)",
210
+ "description": "Edges from this document to the things it talks about - set them HERE, in the same call. Name the counterpart in plain words; the server finds or creates its node and draws the edge. Allowed predicate values: ABOUT (Contract|Document|FileResource → Topic), ASSIGNED_TO (ActionRecord|Task → Agent|Organization|Person|SoftwareAgent), CLIENT_OF (Agent|Organization|Person|SoftwareAgent → Organization), CONTACT_PERSON_FOR (Person → Organization), COVERED_BY (Topic → Contract|Document|FileResource), DELIVERED_AS (Application → Product), DELIVERED_BY (Product → Application), DEPENDS_ON (Application → Application), DEPLOYED_TO (Application → Container), DEVELOPED_BY (Application → Agent|Organization|Person|SoftwareAgent), DEVELOPS (Agent|Organization|Person|SoftwareAgent → Application), ENABLES (Application → Application), FOR_CLIENT (Project → Agent|Organization|Person|SoftwareAgent), HAS_ASSIGNED_TASK (Agent|Organization|Person|SoftwareAgent → ActionRecord|Task), HAS_CHILD (Person → Person), HAS_CLIENT (Organization → Agent|Organization|Person|SoftwareAgent), HAS_CONTACT_PERSON (Organization → Person), HAS_EMPLOYEE (Organization → Person), HAS_OPERATED_APPLICATION (Agent|Organization|Person|SoftwareAgent → Application), HAS_PARENT (Person → Person), HAS_PREDECESSOR (ActionRecord|Project|Task → ActionRecord|Project|Task), HAS_PROJECT (Agent|Organization|Person|SoftwareAgent → Project), HAS_ROLE (Person → Role), HAS_SIBLING (Person → Person), HAS_SKILL (Agent|Organization|Person|SoftwareAgent → Skill), HAS_SUCCESSOR (ActionRecord|Project|Task → ActionRecord|Project|Task), HOSTED_ON (Container → Host), HOSTS (Host → Container), HOSTS_APPLICATION (Container → Application), INFRASTRUCTURE_PROVIDED_BY (Host → Organization), INTEGRATES_WITH (Application → Application), IS_LED_BY (Organization → Person), KNOWS (Person → Person), LEADS (Person → Organization), OPERATED_FOR (Application → Agent|Organization|Person|SoftwareAgent), PAID_BY (Agent|Organization|Person|SoftwareAgent → Agent|Organization|Person|SoftwareAgent), PARTNER_OF (Organization → Organization), PAYS (Agent|Organization|Person|SoftwareAgent → Agent|Organization|Person|SoftwareAgent), PRODUCED_BY (Contract|Document|FileResource → Project), PRODUCES (Project → Contract|Document|FileResource), PROVIDES_INFRASTRUCTURE (Organization → Host), ROLE_OF (Role → Person), SERVED_UNDER (Application → Domain), SERVES (Domain → Application), SKILL_OF (Skill → Agent|Organization|Person|SoftwareAgent), SPOUSE_OF (Person → Person), SUPPLIED_BY (Agent|Organization|Person|SoftwareAgent → Organization), SUPPLIES (Organization → Agent|Organization|Person|SoftwareAgent), SUPPLIES_TECHNOLOGY (Organization → Technology), SUPPORTED_BY (Contract|Document|FileResource → Contract|Document|FileResource), SUPPORTS (Contract|Document|FileResource → Contract|Document|FileResource), TECHNOLOGY_SUPPLIED_BY (Technology → Organization), TECHNOLOGY_USED_BY (Technology → Application), USES_TECHNOLOGY (Application → Technology), WORKED_ON_BY (Project → Agent|Organization|Person|SoftwareAgent), WORKS_FOR (Person → Organization), WORKS_ON (Agent|Organization|Person|SoftwareAgent → Project)",
211
211
  "items": {
212
212
  "type": "object",
213
213
  "properties": {
@@ -316,7 +316,7 @@
316
316
  }
317
317
  },
318
318
  {
319
- "name": "knowmind_entity",
319
+ "name": "knowmind_upsert_entity",
320
320
  "annotations": {
321
321
  "title": "Create entity",
322
322
  "readOnlyHint": false,
@@ -355,7 +355,7 @@
355
355
  }
356
356
  },
357
357
  {
358
- "name": "knowmind_link",
358
+ "name": "knowmind_link_entities",
359
359
  "annotations": {
360
360
  "title": "Link relation",
361
361
  "readOnlyHint": false,
@@ -363,7 +363,7 @@
363
363
  "idempotentHint": true,
364
364
  "openWorldHint": false
365
365
  },
366
- "description": "Create a typed relation between two memory nodes (a knowledge-graph edge). THIS IS HOW THE GRAPH IS BUILT: after storing memories, connect them - a corpus without edges answers only what a single note already says. Subject and object classes must match the predicate; the inverse edge is materialized automatically, and derived edges (RUNS_ON, WORKS_FOR_CLIENT, HOST_SERVES_CLIENT, DEPENDS_ON_SUPPLIER) are computed by the server - never set them by hand. Get both node IDs via knowmind_recall first, and call knowmind_schema for the full catalogue with explanations. Allowed rel_type values: ABOUT (Contract|Document|FileResource → Topic), CLIENT_OF (Agent|Organization|Person|SoftwareAgent → Organization), CONTACT_PERSON_FOR (Person → Organization), COVERED_BY (Topic → Contract|Document|FileResource), DELIVERED_AS (Application → Product), DELIVERED_BY (Product → Application), DEPENDS_ON (Application → Application), DEPLOYED_TO (Application → Container), DEVELOPED_BY (Application → Agent|Organization|Person|SoftwareAgent), DEVELOPS (Agent|Organization|Person|SoftwareAgent → Application), ENABLES (Application → Application), FOR_CLIENT (Project → Agent|Organization|Person|SoftwareAgent), HAS_CHILD (Person → Person), HAS_CLIENT (Organization → Agent|Organization|Person|SoftwareAgent), HAS_CONTACT_PERSON (Organization → Person), HAS_EMPLOYEE (Organization → Person), HAS_OPERATED_APPLICATION (Agent|Organization|Person|SoftwareAgent → Application), HAS_PARENT (Person → Person), HAS_PROJECT (Agent|Organization|Person|SoftwareAgent → Project), HAS_ROLE (Person → Role), HAS_SIBLING (Person → Person), HAS_SKILL (Agent|Organization|Person|SoftwareAgent → Skill), HOSTED_ON (Container → Host), HOSTS (Host → Container), HOSTS_APPLICATION (Container → Application), INFRASTRUCTURE_PROVIDED_BY (Host → Organization), INTEGRATES_WITH (Application → Application), IS_LED_BY (Organization → Person), KNOWS (Person → Person), LEADS (Person → Organization), OPERATED_FOR (Application → Agent|Organization|Person|SoftwareAgent), PAID_BY (Agent|Organization|Person|SoftwareAgent → Agent|Organization|Person|SoftwareAgent), PARTNER_OF (Organization → Organization), PAYS (Agent|Organization|Person|SoftwareAgent → Agent|Organization|Person|SoftwareAgent), PRODUCED_BY (Contract|Document|FileResource → Project), PRODUCES (Project → Contract|Document|FileResource), PROVIDES_INFRASTRUCTURE (Organization → Host), ROLE_OF (Role → Person), SERVED_UNDER (Application → Domain), SERVES (Domain → Application), SKILL_OF (Skill → Agent|Organization|Person|SoftwareAgent), SPOUSE_OF (Person → Person), SUPPLIED_BY (Agent|Organization|Person|SoftwareAgent → Organization), SUPPLIES (Organization → Agent|Organization|Person|SoftwareAgent), SUPPLIES_TECHNOLOGY (Organization → Technology), SUPPORTED_BY (Contract|Document|FileResource → Contract|Document|FileResource), SUPPORTS (Contract|Document|FileResource → Contract|Document|FileResource), TECHNOLOGY_SUPPLIED_BY (Technology → Organization), TECHNOLOGY_USED_BY (Technology → Application), USES_TECHNOLOGY (Application → Technology), WORKED_ON_BY (Project → Agent|Organization|Person|SoftwareAgent), WORKS_FOR (Person → Organization), WORKS_ON (Agent|Organization|Person|SoftwareAgent → Project). Requires write scope.",
366
+ "description": "Create a typed relation between two memory nodes (a knowledge-graph edge). THIS IS HOW THE GRAPH IS BUILT: after storing memories, connect them - a corpus without edges answers only what a single note already says. The server checks the edge against the ontology's shapes before writing it: the subject and object must belong to the classes the predicate requires (for entries without a class the check only warns), entity names must carry no role or suffix, and the edge must name its evidence - the id of the entry that states the relation. A rejected edge returns the violated rule. The inverse edge is materialized automatically, and derived edges (RUNS_ON, WORKS_FOR_CLIENT, HOST_SERVES_CLIENT, DEPENDS_ON_SUPPLIER) are computed by the server - never set them by hand. Get both node IDs via knowmind_recall first, and call knowmind_schema for the full catalogue with explanations. Allowed rel_type values: ABOUT (Contract|Document|FileResource → Topic), ASSIGNED_TO (ActionRecord|Task → Agent|Organization|Person|SoftwareAgent), CLIENT_OF (Agent|Organization|Person|SoftwareAgent → Organization), CONTACT_PERSON_FOR (Person → Organization), COVERED_BY (Topic → Contract|Document|FileResource), DELIVERED_AS (Application → Product), DELIVERED_BY (Product → Application), DEPENDS_ON (Application → Application), DEPLOYED_TO (Application → Container), DEVELOPED_BY (Application → Agent|Organization|Person|SoftwareAgent), DEVELOPS (Agent|Organization|Person|SoftwareAgent → Application), ENABLES (Application → Application), FOR_CLIENT (Project → Agent|Organization|Person|SoftwareAgent), HAS_ASSIGNED_TASK (Agent|Organization|Person|SoftwareAgent → ActionRecord|Task), HAS_CHILD (Person → Person), HAS_CLIENT (Organization → Agent|Organization|Person|SoftwareAgent), HAS_CONTACT_PERSON (Organization → Person), HAS_EMPLOYEE (Organization → Person), HAS_OPERATED_APPLICATION (Agent|Organization|Person|SoftwareAgent → Application), HAS_PARENT (Person → Person), HAS_PREDECESSOR (ActionRecord|Project|Task → ActionRecord|Project|Task), HAS_PROJECT (Agent|Organization|Person|SoftwareAgent → Project), HAS_ROLE (Person → Role), HAS_SIBLING (Person → Person), HAS_SKILL (Agent|Organization|Person|SoftwareAgent → Skill), HAS_SUCCESSOR (ActionRecord|Project|Task → ActionRecord|Project|Task), HOSTED_ON (Container → Host), HOSTS (Host → Container), HOSTS_APPLICATION (Container → Application), INFRASTRUCTURE_PROVIDED_BY (Host → Organization), INTEGRATES_WITH (Application → Application), IS_LED_BY (Organization → Person), KNOWS (Person → Person), LEADS (Person → Organization), OPERATED_FOR (Application → Agent|Organization|Person|SoftwareAgent), PAID_BY (Agent|Organization|Person|SoftwareAgent → Agent|Organization|Person|SoftwareAgent), PARTNER_OF (Organization → Organization), PAYS (Agent|Organization|Person|SoftwareAgent → Agent|Organization|Person|SoftwareAgent), PRODUCED_BY (Contract|Document|FileResource → Project), PRODUCES (Project → Contract|Document|FileResource), PROVIDES_INFRASTRUCTURE (Organization → Host), ROLE_OF (Role → Person), SERVED_UNDER (Application → Domain), SERVES (Domain → Application), SKILL_OF (Skill → Agent|Organization|Person|SoftwareAgent), SPOUSE_OF (Person → Person), SUPPLIED_BY (Agent|Organization|Person|SoftwareAgent → Organization), SUPPLIES (Organization → Agent|Organization|Person|SoftwareAgent), SUPPLIES_TECHNOLOGY (Organization → Technology), SUPPORTED_BY (Contract|Document|FileResource → Contract|Document|FileResource), SUPPORTS (Contract|Document|FileResource → Contract|Document|FileResource), TECHNOLOGY_SUPPLIED_BY (Technology → Organization), TECHNOLOGY_USED_BY (Technology → Application), USES_TECHNOLOGY (Application → Technology), WORKED_ON_BY (Project → Agent|Organization|Person|SoftwareAgent), WORKS_FOR (Person → Organization), WORKS_ON (Agent|Organization|Person|SoftwareAgent → Project). Requires write scope.",
367
367
  "inputSchema": {
368
368
  "type": "object",
369
369
  "properties": {
@@ -382,17 +382,22 @@
382
382
  "confidence": {
383
383
  "type": "number",
384
384
  "description": "Edge confidence in [0..1]; 1.0 for a fact stated verbatim, 0.7 for a clear paraphrase. Below that, do not create the edge."
385
+ },
386
+ "evidence": {
387
+ "type": "string",
388
+ "description": "Memory ID of the entry that states this relation (often from_id or a note found via knowmind_recall). Required: an edge without evidence is rejected."
385
389
  }
386
390
  },
387
391
  "required": [
388
392
  "from_id",
389
393
  "to_id",
390
- "rel_type"
394
+ "rel_type",
395
+ "evidence"
391
396
  ]
392
397
  }
393
398
  },
394
399
  {
395
- "name": "knowmind_schema",
400
+ "name": "knowmind_get_schema",
396
401
  "annotations": {
397
402
  "title": "Graph schema",
398
403
  "readOnlyHint": true,
@@ -407,7 +412,7 @@
407
412
  }
408
413
  },
409
414
  {
410
- "name": "knowmind_unlink",
415
+ "name": "knowmind_unlink_entities",
411
416
  "annotations": {
412
417
  "title": "Remove relation",
413
418
  "readOnlyHint": false,
@@ -461,6 +466,277 @@
461
466
  "memory_id"
462
467
  ]
463
468
  }
469
+ },
470
+ {
471
+ "name": "knowmind_list_inferred",
472
+ "annotations": {
473
+ "title": "List inferred relations",
474
+ "readOnlyHint": true,
475
+ "destructiveHint": false,
476
+ "idempotentHint": true,
477
+ "openWorldHint": false
478
+ },
479
+ "description": "List relations that wait for a human decision, each with its review state (open, confirmed, rejected) and its reason: inferred_from_text (knowmind inferred it from a text) or starts_from_document (it starts from a document although its kind needs a person, organisation or similar). Per relation also the two connected entries, where it came from (source), the entry that supports it (evidence), and the counts per state. Open relations do not feed the derivation rules until someone confirms them. Use to review what the graph learned on its own; record a decision with knowmind_review_inferred. Read scope suffices.",
480
+ "inputSchema": {
481
+ "type": "object",
482
+ "properties": {
483
+ "status": {
484
+ "type": "string",
485
+ "enum": [
486
+ "open",
487
+ "confirmed",
488
+ "rejected"
489
+ ],
490
+ "description": "Only relations in this state. Omit for all."
491
+ },
492
+ "limit": {
493
+ "type": "integer",
494
+ "minimum": 1,
495
+ "maximum": 200,
496
+ "default": 50,
497
+ "description": "Number of relations to return (1-200, default 50)."
498
+ },
499
+ "offset": {
500
+ "type": "integer",
501
+ "minimum": 0,
502
+ "default": 0,
503
+ "description": "Relations to skip, for paging."
504
+ }
505
+ }
506
+ }
507
+ },
508
+ {
509
+ "name": "knowmind_review_inferred",
510
+ "annotations": {
511
+ "title": "Review inferred relation",
512
+ "readOnlyHint": false,
513
+ "destructiveHint": false,
514
+ "idempotentHint": false,
515
+ "openWorldHint": false
516
+ },
517
+ "description": "Record a human decision on one inferred relation from knowmind_list_inferred. confirm: the relation counts as checked and feeds the derivation rules from now on. reject: the relation, its reverse relation and every relation derived from it get valid_to=now; nothing is deleted. undo: takes a rejection back and restores the reverse and derived relations. Pass the edge_id from the list and, if there is one, the id of the entry that supports the decision as evidence. Returns the state before and after and the number of reverse and derived relations affected. Requires write scope.",
518
+ "inputSchema": {
519
+ "type": "object",
520
+ "properties": {
521
+ "edge_id": {
522
+ "type": "string",
523
+ "description": "edge_id of the relation, as returned by knowmind_list_inferred."
524
+ },
525
+ "decision": {
526
+ "type": "string",
527
+ "enum": [
528
+ "confirm",
529
+ "reject",
530
+ "undo"
531
+ ],
532
+ "description": "confirm, reject, or undo a rejection."
533
+ },
534
+ "evidence": {
535
+ "type": "string",
536
+ "description": "Id of the entry that supports the decision. Optional."
537
+ }
538
+ },
539
+ "required": [
540
+ "edge_id",
541
+ "decision"
542
+ ]
543
+ }
544
+ },
545
+ {
546
+ "name": "knowmind_recall",
547
+ "annotations": {
548
+ "title": "Recall - retrieve knowledge (deprecated)",
549
+ "readOnlyHint": true,
550
+ "destructiveHint": false,
551
+ "idempotentHint": true,
552
+ "openWorldHint": false
553
+ },
554
+ "description": "DEPRECATED, removed on 2027-03-31: use knowmind_recall_memories. This name keeps answering unchanged until then. Retrieve relevant knowledge before answering anything that benefits from prior context - decisions, preferences, project state, people, deadlines, past conversations. Hybrid recall (BM25 + pgvector + graph hops) over the tenant corpus; returns the top-k memory chunks, each with a relevance score and source reference. Suitable whenever earlier context would improve the answer; use knowmind_recall_at_time when you need what was valid at a past point in time. Read scope suffices.",
555
+ "inputSchema": {
556
+ "type": "object",
557
+ "properties": {
558
+ "query": {
559
+ "type": "string",
560
+ "description": "Natural-language question; full sentences retrieve better than keywords."
561
+ },
562
+ "k": {
563
+ "type": "integer",
564
+ "minimum": 1,
565
+ "maximum": 25,
566
+ "default": 5,
567
+ "description": "Number of chunks to return (1-25, default 5)."
568
+ },
569
+ "hops": {
570
+ "type": "integer",
571
+ "minimum": 0,
572
+ "maximum": 3,
573
+ "default": 2,
574
+ "description": "Graph expansion depth over typed relations (0-3, default 2); 0 = text/vector only, no graph."
575
+ }
576
+ },
577
+ "required": [
578
+ "query"
579
+ ]
580
+ }
581
+ },
582
+ {
583
+ "name": "knowmind_health",
584
+ "annotations": {
585
+ "title": "Service health (deprecated)",
586
+ "readOnlyHint": true,
587
+ "destructiveHint": false,
588
+ "idempotentHint": true,
589
+ "openWorldHint": false
590
+ },
591
+ "description": "DEPRECATED, removed on 2027-03-31: use knowmind_get_health. This name keeps answering unchanged until then. Return the health of the knowmind backend (Postgres, memory service, graph). Use before a batch of writes or when calls fail, to tell an outage apart from an empty result. Returns a status object per component. Read scope suffices; takes no parameters.",
592
+ "inputSchema": {
593
+ "type": "object",
594
+ "properties": {}
595
+ }
596
+ },
597
+ {
598
+ "name": "knowmind_stats",
599
+ "annotations": {
600
+ "title": "Corpus statistics (deprecated)",
601
+ "readOnlyHint": true,
602
+ "destructiveHint": false,
603
+ "idempotentHint": true,
604
+ "openWorldHint": false
605
+ },
606
+ "description": "DEPRECATED, removed on 2027-03-31: use knowmind_get_stats. This name keeps answering unchanged until then. Return current counts for the tenant corpus: memories, graph edges and vector chunks. Use to gauge how much has been stored; for the actual entries use knowmind_list_recent or knowmind_recall. Read scope suffices; takes no parameters.",
607
+ "inputSchema": {
608
+ "type": "object",
609
+ "properties": {}
610
+ }
611
+ },
612
+ {
613
+ "name": "knowmind_entity",
614
+ "annotations": {
615
+ "title": "Create entity (deprecated)",
616
+ "readOnlyHint": false,
617
+ "destructiveHint": false,
618
+ "idempotentHint": true,
619
+ "openWorldHint": false
620
+ },
621
+ "description": "DEPRECATED, removed on 2027-03-31: use knowmind_upsert_entity. This name keeps answering unchanged until then. Create the node for a thing the corpus talks about - a person, an organisation, an application, a host, a technology - or return the existing one. THE GRAPH NEEDS THESE: memories are texts, and two texts mentioning the same server stay unconnected until that server exists as its own node. Create an entity when a name recurs across memories or when you are about to link something that has no node yet, then connect it with knowmind_link. Same name, same class and same tenant always return the same id, so calling twice creates no duplicate. Give the entity its plain proper name (\"PostgreSQL\", not \"the database we use\"), and pick the class from the catalogue in knowmind_schema. Requires write scope.",
622
+ "inputSchema": {
623
+ "type": "object",
624
+ "properties": {
625
+ "name": {
626
+ "type": "string",
627
+ "description": "Proper name of the thing, as it would be written in a document. No role, no status, no description."
628
+ },
629
+ "entity_class": {
630
+ "type": "string",
631
+ "description": "Class from the catalogue (knowmind_schema -> entityClasses), e.g. Person, Organization, Application, Host, Technology."
632
+ },
633
+ "description": {
634
+ "type": "string",
635
+ "description": "One sentence saying what this is. Optional, helps later retrieval."
636
+ },
637
+ "aliases": {
638
+ "type": "array",
639
+ "items": {
640
+ "type": "string"
641
+ },
642
+ "description": "Other spellings the same thing appears under. Optional."
643
+ }
644
+ },
645
+ "required": [
646
+ "name",
647
+ "entity_class"
648
+ ]
649
+ }
650
+ },
651
+ {
652
+ "name": "knowmind_link",
653
+ "annotations": {
654
+ "title": "Link relation (deprecated)",
655
+ "readOnlyHint": false,
656
+ "destructiveHint": false,
657
+ "idempotentHint": true,
658
+ "openWorldHint": false
659
+ },
660
+ "description": "DEPRECATED, removed on 2027-03-31: use knowmind_link_entities. This name keeps answering unchanged until then. Create a typed relation between two memory nodes (a knowledge-graph edge). THIS IS HOW THE GRAPH IS BUILT: after storing memories, connect them - a corpus without edges answers only what a single note already says. The server checks the edge against the ontology's shapes before writing it: the subject and object must belong to the classes the predicate requires (for entries without a class the check only warns), entity names must carry no role or suffix, and the edge must name its evidence - the id of the entry that states the relation. A rejected edge returns the violated rule. The inverse edge is materialized automatically, and derived edges (RUNS_ON, WORKS_FOR_CLIENT, HOST_SERVES_CLIENT, DEPENDS_ON_SUPPLIER) are computed by the server - never set them by hand. Get both node IDs via knowmind_recall first, and call knowmind_schema for the full catalogue with explanations. Allowed rel_type values: ABOUT (Contract|Document|FileResource → Topic), ASSIGNED_TO (ActionRecord|Task → Agent|Organization|Person|SoftwareAgent), CLIENT_OF (Agent|Organization|Person|SoftwareAgent → Organization), CONTACT_PERSON_FOR (Person → Organization), COVERED_BY (Topic → Contract|Document|FileResource), DELIVERED_AS (Application → Product), DELIVERED_BY (Product → Application), DEPENDS_ON (Application → Application), DEPLOYED_TO (Application → Container), DEVELOPED_BY (Application → Agent|Organization|Person|SoftwareAgent), DEVELOPS (Agent|Organization|Person|SoftwareAgent → Application), ENABLES (Application → Application), FOR_CLIENT (Project → Agent|Organization|Person|SoftwareAgent), HAS_ASSIGNED_TASK (Agent|Organization|Person|SoftwareAgent → ActionRecord|Task), HAS_CHILD (Person → Person), HAS_CLIENT (Organization → Agent|Organization|Person|SoftwareAgent), HAS_CONTACT_PERSON (Organization → Person), HAS_EMPLOYEE (Organization → Person), HAS_OPERATED_APPLICATION (Agent|Organization|Person|SoftwareAgent → Application), HAS_PARENT (Person → Person), HAS_PREDECESSOR (ActionRecord|Project|Task → ActionRecord|Project|Task), HAS_PROJECT (Agent|Organization|Person|SoftwareAgent → Project), HAS_ROLE (Person → Role), HAS_SIBLING (Person → Person), HAS_SKILL (Agent|Organization|Person|SoftwareAgent → Skill), HAS_SUCCESSOR (ActionRecord|Project|Task → ActionRecord|Project|Task), HOSTED_ON (Container → Host), HOSTS (Host → Container), HOSTS_APPLICATION (Container → Application), INFRASTRUCTURE_PROVIDED_BY (Host → Organization), INTEGRATES_WITH (Application → Application), IS_LED_BY (Organization → Person), KNOWS (Person → Person), LEADS (Person → Organization), OPERATED_FOR (Application → Agent|Organization|Person|SoftwareAgent), PAID_BY (Agent|Organization|Person|SoftwareAgent → Agent|Organization|Person|SoftwareAgent), PARTNER_OF (Organization → Organization), PAYS (Agent|Organization|Person|SoftwareAgent → Agent|Organization|Person|SoftwareAgent), PRODUCED_BY (Contract|Document|FileResource → Project), PRODUCES (Project → Contract|Document|FileResource), PROVIDES_INFRASTRUCTURE (Organization → Host), ROLE_OF (Role → Person), SERVED_UNDER (Application → Domain), SERVES (Domain → Application), SKILL_OF (Skill → Agent|Organization|Person|SoftwareAgent), SPOUSE_OF (Person → Person), SUPPLIED_BY (Agent|Organization|Person|SoftwareAgent → Organization), SUPPLIES (Organization → Agent|Organization|Person|SoftwareAgent), SUPPLIES_TECHNOLOGY (Organization → Technology), SUPPORTED_BY (Contract|Document|FileResource → Contract|Document|FileResource), SUPPORTS (Contract|Document|FileResource → Contract|Document|FileResource), TECHNOLOGY_SUPPLIED_BY (Technology → Organization), TECHNOLOGY_USED_BY (Technology → Application), USES_TECHNOLOGY (Application → Technology), WORKED_ON_BY (Project → Agent|Organization|Person|SoftwareAgent), WORKS_FOR (Person → Organization), WORKS_ON (Agent|Organization|Person|SoftwareAgent → Project). Requires write scope.",
661
+ "inputSchema": {
662
+ "type": "object",
663
+ "properties": {
664
+ "from_id": {
665
+ "type": "string",
666
+ "description": "Memory ID of the source node (get it via knowmind_recall)."
667
+ },
668
+ "to_id": {
669
+ "type": "string",
670
+ "description": "Memory ID of the target node."
671
+ },
672
+ "rel_type": {
673
+ "type": "string",
674
+ "description": "Edge type in UPPER_SNAKE_CASE from the allowed list. Must fit the subject and object classes."
675
+ },
676
+ "confidence": {
677
+ "type": "number",
678
+ "description": "Edge confidence in [0..1]; 1.0 for a fact stated verbatim, 0.7 for a clear paraphrase. Below that, do not create the edge."
679
+ },
680
+ "evidence": {
681
+ "type": "string",
682
+ "description": "Memory ID of the entry that states this relation (often from_id or a note found via knowmind_recall). Required: an edge without evidence is rejected."
683
+ }
684
+ },
685
+ "required": [
686
+ "from_id",
687
+ "to_id",
688
+ "rel_type",
689
+ "evidence"
690
+ ]
691
+ }
692
+ },
693
+ {
694
+ "name": "knowmind_schema",
695
+ "annotations": {
696
+ "title": "Graph schema (deprecated)",
697
+ "readOnlyHint": true,
698
+ "destructiveHint": false,
699
+ "idempotentHint": true,
700
+ "openWorldHint": false
701
+ },
702
+ "description": "DEPRECATED, removed on 2027-03-31: use knowmind_get_schema. This name keeps answering unchanged until then. Return the relation catalogue of this tenant's knowledge graph: every allowed edge type with its subject and object classes and an explanation of when to use it. Call this before building edges with knowmind_link, so you pick the right predicate instead of the nearest-sounding one. Read scope suffices.",
703
+ "inputSchema": {
704
+ "type": "object",
705
+ "properties": {}
706
+ }
707
+ },
708
+ {
709
+ "name": "knowmind_unlink",
710
+ "annotations": {
711
+ "title": "Remove relation (deprecated)",
712
+ "readOnlyHint": false,
713
+ "destructiveHint": true,
714
+ "idempotentHint": true,
715
+ "openWorldHint": false
716
+ },
717
+ "description": "DEPRECATED, removed on 2027-03-31: use knowmind_unlink_entities. This name keeps answering unchanged until then. Delete a typed relation between two memory nodes; the inverse edge is removed with it. Idempotent - deleting a non-existent edge is a no-op. Use to correct a wrong link created via knowmind_link. Requires write scope.",
718
+ "inputSchema": {
719
+ "type": "object",
720
+ "properties": {
721
+ "from_id": {
722
+ "type": "string",
723
+ "description": "Memory ID of the source node."
724
+ },
725
+ "to_id": {
726
+ "type": "string",
727
+ "description": "Memory ID of the target node."
728
+ },
729
+ "rel_type": {
730
+ "type": "string",
731
+ "description": "Edge type to remove (UPPER_SNAKE_CASE, exactly as created)."
732
+ }
733
+ },
734
+ "required": [
735
+ "from_id",
736
+ "to_id",
737
+ "rel_type"
738
+ ]
739
+ }
464
740
  }
465
741
  ]
466
742
  }