knowmind 0.4.0 → 0.4.1
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 +15 -0
- package/bin/knowmind.js +3 -4
- package/package.json +1 -1
- package/src/anzeige.js +17 -0
- package/src/init.js +42 -7
- package/src/tools-fallback.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Knowmind CLI — Änderungen
|
|
2
2
|
|
|
3
|
+
## 0.4.1 (2026-10-16)
|
|
4
|
+
|
|
5
|
+
- `knowmind search` zeigt bei Treffern aus Seiten im Open Knowledge Format die
|
|
6
|
+
Kennzeichen, die der Server vergibt, in eckigen Klammern hinter der
|
|
7
|
+
Bewertung (`score`): `stale`, wenn der Zeitpunkt erreicht ist, ab dem die
|
|
8
|
+
Seite als veraltet gilt; `unverified`, wenn keine Prüfung verzeichnet ist;
|
|
9
|
+
`superseded`, wenn die Seite als überholt markiert ist.
|
|
10
|
+
- `knowmind init` schreibt den knowmind-Hinweis für Codex (mit `--client codex`
|
|
11
|
+
oder wenn es Codex erkennt) jetzt in die `AGENTS.md` des Projekts, die Codex
|
|
12
|
+
als Anweisung für das Projekt liest. Fehlt die Datei, legt `init` sie an; vorhandener
|
|
13
|
+
Text bleibt stehen, und ein zweiter Lauf ersetzt den Block, statt einen
|
|
14
|
+
weiteren anzuhängen. Der Hinweis nennt knowmind als Quelle für
|
|
15
|
+
Entscheidungen und Wissen außerhalb des Codes und hält fest, dass Quellcode
|
|
16
|
+
und Tests maßgeblich bleiben.
|
|
17
|
+
|
|
3
18
|
## 0.4.0 (2026-10-16)
|
|
4
19
|
|
|
5
20
|
**`knowmind sync` übernimmt Wissen im Open Knowledge Format**
|
package/bin/knowmind.js
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
import { loadConfig, saveConfig, configPath, VERSION } from "../src/config.js";
|
|
24
24
|
import { runStdioServer } from "../src/mcp-stdio.js";
|
|
25
25
|
import { syncDirectory } from "../src/sync.js";
|
|
26
|
+
import { trefferKopf } from "../src/anzeige.js";
|
|
26
27
|
import { runInit } from "../src/init.js";
|
|
27
28
|
import { runInstall } from "../src/install.js";
|
|
28
29
|
import { renderLine, renderFull, probe } from "../src/status.js";
|
|
@@ -52,7 +53,7 @@ Knowmind ${VERSION} — Das Gedächtnis für Ihre KI
|
|
|
52
53
|
Befehle:
|
|
53
54
|
knowmind login [--token kmt_TOKEN] [--api https://knowmind.de]
|
|
54
55
|
Token speichern
|
|
55
|
-
knowmind init [--client claude-code|cursor|auto] [--token kmt_TOKEN] [--api URL] [--dry-run]
|
|
56
|
+
knowmind init [--client claude-code|cursor|codex|auto] [--token kmt_TOKEN] [--api URL] [--dry-run]
|
|
56
57
|
Automatische Gedächtnis-Pflege im KI-Client einrichten
|
|
57
58
|
(Hooks/Regeln + Memory-First-Block). Idempotent.
|
|
58
59
|
--token/--api legen die Config gleich mit an.
|
|
@@ -185,9 +186,7 @@ async function runSearch() {
|
|
|
185
186
|
return;
|
|
186
187
|
}
|
|
187
188
|
for (const [i, hit] of result.hits.entries()) {
|
|
188
|
-
|
|
189
|
-
const name = hit.metadata?.name ?? src;
|
|
190
|
-
console.log(`\n#${i + 1} ${name} (score ${hit.score.toFixed(3)})`);
|
|
189
|
+
console.log(`\n${trefferKopf(hit, i)}`);
|
|
191
190
|
console.log(" " + hit.content.slice(0, 280).replace(/\n/g, "\n "));
|
|
192
191
|
}
|
|
193
192
|
console.log(`\n${result.hits.length} Treffer in ${result.latency_ms} ms.`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "knowmind",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
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",
|
package/src/anzeige.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kopfzeile eines Treffers für `knowmind search`.
|
|
3
|
+
*
|
|
4
|
+
* Treffer aus Seiten im Open Knowledge Format tragen seit dem Serverstand vom
|
|
5
|
+
* 16.10.2026 `metadata.review_flags`: `stale` (Verfallszeitpunkt erreicht),
|
|
6
|
+
* `unverified` (keine Prüfung verzeichnet), `superseded` (überholt). Die
|
|
7
|
+
* Kopfzeile zeigt sie in eckigen Klammern; ohne Kennzeichen bleibt sie wie
|
|
8
|
+
* bisher.
|
|
9
|
+
*/
|
|
10
|
+
export function trefferKopf(hit, i) {
|
|
11
|
+
const src = hit.metadata?.source_id ?? hit.chunk_id;
|
|
12
|
+
const name = hit.metadata?.name ?? src;
|
|
13
|
+
const kennzeichen = Array.isArray(hit.metadata?.review_flags) && hit.metadata.review_flags.length
|
|
14
|
+
? ` [${hit.metadata.review_flags.join(", ")}]`
|
|
15
|
+
: "";
|
|
16
|
+
return `#${i + 1} ${name} (score ${hit.score.toFixed(3)})${kennzeichen}`;
|
|
17
|
+
}
|
package/src/init.js
CHANGED
|
@@ -69,6 +69,42 @@ function memoryFirstBlock() {
|
|
|
69
69
|
].join("\n");
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
// ─── Hinweis in AGENTS.md (Codex und andere Agenten, seit 0.4.1) ─────
|
|
73
|
+
// AGENTS.md liest ein Agent bei jeder Aufgabe. Der Block macht knowmind
|
|
74
|
+
// deshalb zum Kontext auf Bedarf, nicht zur Pflichtlektüre, und hält fest,
|
|
75
|
+
// dass Quellcode und Tests maßgeblich bleiben (Muster: der verwaltete Block
|
|
76
|
+
// von OpenWiki, Abgleich 16.10.2026).
|
|
77
|
+
function agentsBlock() {
|
|
78
|
+
return [
|
|
79
|
+
BEGIN,
|
|
80
|
+
"## knowmind",
|
|
81
|
+
"",
|
|
82
|
+
"Dieses Projekt ist mit **knowmind** verbunden, dem Gedächtnis für Entscheidungen,",
|
|
83
|
+
"Absprachen und Projektwissen (MCP-Server mit `knowmind_recall_memories` und",
|
|
84
|
+
"`knowmind_store_memory`).",
|
|
85
|
+
"",
|
|
86
|
+
"- Frag knowmind, wenn eine Aufgabe von früheren Entscheidungen, Absprachen oder",
|
|
87
|
+
" Wissen außerhalb des Codes abhängt oder wenn der Nutzer danach fragt. Was der",
|
|
88
|
+
" Code allein beantwortet, braucht keinen Abruf.",
|
|
89
|
+
"- Quellcode und Tests sind maßgeblich. Ein Treffer aus knowmind ist ein Hinweis,",
|
|
90
|
+
" den du am Code prüfst, bevor du dich auf ihn stützt.",
|
|
91
|
+
"- An Treffern aus Seiten im Open Knowledge Format sagt `review_flags`, ob ein",
|
|
92
|
+
" Treffer veraltet (`stale`), ungeprüft (`unverified`) oder überholt",
|
|
93
|
+
" (`superseded`) ist, auch mehreres zugleich. Eine leere Liste heißt: nichts",
|
|
94
|
+
" davon trifft zu.",
|
|
95
|
+
"- Halte Entscheidungen und Ergebnisse, die über diese Sitzung hinaus gelten, mit",
|
|
96
|
+
" `knowmind_store_memory` fest. Zwischenstände und Wegwerfversuche gehören nicht",
|
|
97
|
+
" hinein.",
|
|
98
|
+
END,
|
|
99
|
+
].join("\n");
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function planAgents(cwd) {
|
|
103
|
+
const pfad = join(cwd, "AGENTS.md");
|
|
104
|
+
const md = upsertMarkedBlock(pfad, agentsBlock());
|
|
105
|
+
return [{ label: "AGENTS.md (knowmind-Hinweis)", path: pfad, action: md.action, content: md.content }];
|
|
106
|
+
}
|
|
107
|
+
|
|
72
108
|
// ─── Generischer Hinweis-Text (manuell einfügbar) ────────────────────
|
|
73
109
|
function manualSnippet() {
|
|
74
110
|
return memoryFirstBlock();
|
|
@@ -727,14 +763,12 @@ export async function runInit({ client = "auto", dryRun = false, cwd = process.c
|
|
|
727
763
|
for (const t of targets) {
|
|
728
764
|
if (t === "claude-code") allActions.push(...planClaudeCode(cwd));
|
|
729
765
|
else if (t === "cursor") allActions.push(...planCursor(cwd));
|
|
766
|
+
// Codex liest AGENTS.md im Projekt (seit 0.4.1 schreibt init den Block
|
|
767
|
+
// dort hinein; bis 0.4.0 zeigte es ihn nur an).
|
|
768
|
+
else if (t === "codex") allActions.push(...planAgents(cwd));
|
|
730
769
|
else {
|
|
731
|
-
// generic / claude-desktop
|
|
732
|
-
const heading =
|
|
733
|
-
t === "codex"
|
|
734
|
-
? "Codex CLI:"
|
|
735
|
-
: t === "claude-desktop"
|
|
736
|
-
? "Claude Desktop:"
|
|
737
|
-
: "Generischer Client:";
|
|
770
|
+
// generic / claude-desktop und alles ohne Hook-Mechanismus.
|
|
771
|
+
const heading = t === "claude-desktop" ? "Claude Desktop:" : "Generischer Client:";
|
|
738
772
|
lines.push(heading);
|
|
739
773
|
lines.push(" Dieser Client kennt keinen Hook-Mechanismus, der die Pflege HART erzwingt.");
|
|
740
774
|
lines.push(" Es wirken automatisch: die MCP-instructions (werden beim Verbinden gelesen)");
|
|
@@ -826,6 +860,7 @@ export const _internals = {
|
|
|
826
860
|
ensureClaudeHookEntry,
|
|
827
861
|
detectClients,
|
|
828
862
|
memoryFirstBlock,
|
|
863
|
+
agentsBlock,
|
|
829
864
|
BEGIN,
|
|
830
865
|
END,
|
|
831
866
|
};
|
package/src/tools-fallback.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"idempotentHint": true,
|
|
14
14
|
"openWorldHint": false
|
|
15
15
|
},
|
|
16
|
-
"description": "Retrieve relevant knowledge before answering anything that benefits from prior context - decisions, preferences, project state, people, deadlines, past conversations. Hybrid recall (BM25 + pgvector + knowledge graph) 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.",
|
|
16
|
+
"description": "Retrieve relevant knowledge before answering anything that benefits from prior context - decisions, preferences, project state, people, deadlines, past conversations. Hybrid recall (BM25 + pgvector + knowledge graph) 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. Passages from pages in Open Knowledge Format carry metadata.review_flags: stale once stale_after is reached, unverified when no verification is recorded, superseded when the page's status is deprecated or superseded; an empty list means none applies. Read scope suffices.",
|
|
17
17
|
"inputSchema": {
|
|
18
18
|
"type": "object",
|
|
19
19
|
"properties": {
|
|
@@ -290,7 +290,7 @@
|
|
|
290
290
|
"idempotentHint": true,
|
|
291
291
|
"openWorldHint": false
|
|
292
292
|
},
|
|
293
|
-
"description": "Time-travel recall: return only memories that were valid at a given instant (valid_from <= as_of <= valid_to, or still open). Answers 'what did the agent know on March 14?'. Use instead of knowmind_recall when the point in time matters; otherwise use knowmind_recall for the current truth. Read scope suffices.",
|
|
293
|
+
"description": "Time-travel recall: return only memories that were valid at a given instant (valid_from <= as_of <= valid_to, or still open). Answers 'what did the agent know on March 14?'. Use instead of knowmind_recall when the point in time matters; otherwise use knowmind_recall for the current truth. Passages from pages in Open Knowledge Format carry metadata.review_flags (stale, unverified, superseded); stale is judged against as_of. Read scope suffices.",
|
|
294
294
|
"inputSchema": {
|
|
295
295
|
"type": "object",
|
|
296
296
|
"properties": {
|
|
@@ -551,7 +551,7 @@
|
|
|
551
551
|
"idempotentHint": true,
|
|
552
552
|
"openWorldHint": false
|
|
553
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 + knowledge graph) 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.",
|
|
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 + knowledge graph) 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. Passages from pages in Open Knowledge Format carry metadata.review_flags: stale once stale_after is reached, unverified when no verification is recorded, superseded when the page's status is deprecated or superseded; an empty list means none applies. Read scope suffices.",
|
|
555
555
|
"inputSchema": {
|
|
556
556
|
"type": "object",
|
|
557
557
|
"properties": {
|