agent-knowledge 1.3.15 → 1.3.17
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 +14 -0
- package/README.md +3 -3
- package/agent-desk-plugin.json +1 -1
- package/dist/package-meta.d.ts +5 -0
- package/dist/package-meta.d.ts.map +1 -0
- package/dist/package-meta.js +27 -0
- package/dist/package-meta.js.map +1 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +12 -33
- package/dist/types.js.map +1 -1
- package/docs/ARCHITECTURE.md +6 -5
- package/docs/SETUP.md +5 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.3.17 (2026-04-07)
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- **Doc rewrites for post-consolidation tool surface.** Updated `README.md`, `CLAUDE.md`, `docs/ARCHITECTURE.md`, and `docs/SETUP.md` to use the current action-based tool form (`knowledge { action: "write" }`) instead of references to the obsolete per-action tool names (`knowledge_write`, `knowledge_read`, `knowledge_list`, `knowledge_delete`, `knowledge_sync`, `knowledge_recall`). The README's tool table at the top was already correct; this fixes the deeper docs.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Host auto-detect expanded.** `src/types.ts` now auto-detects projects directories from all five well-known AI coding host roots: `.claude`, `.cursor`, `.codex`, `.aider`, `.continue` (was just `.claude` and `.cursor`). Aligned with the host-agnostic Genericity rule.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- All three version files (`package.json`, `server.json`, `agent-desk-plugin.json`) re-aligned to **1.3.17**. They had silently drifted: package was at 1.3.16, server was at 1.3.15 (with the inner package version even older at 1.3.14), and agent-desk-plugin was at 1.3.15.
|
|
16
|
+
|
|
3
17
|
## 1.3.1 (2026-03-30)
|
|
4
18
|
|
|
5
19
|
### Changed
|
package/README.md
CHANGED
|
@@ -237,7 +237,7 @@ Entries can be connected via typed, weighted edges stored in a dedicated `edges`
|
|
|
237
237
|
|
|
238
238
|
### Auto-linking
|
|
239
239
|
|
|
240
|
-
When `
|
|
240
|
+
When `knowledge` with `action: "write"` creates or updates an entry, it automatically finds the top-3 most similar existing entries via cosine similarity and creates `related_to` edges for any pair scoring above 0.7.
|
|
241
241
|
|
|
242
242
|
## Confidence & Decay Scoring
|
|
243
243
|
|
|
@@ -263,7 +263,7 @@ Frequently accessed entries rise in search rankings; stale entries decay over ti
|
|
|
263
263
|
|
|
264
264
|
**Fuzzy Matching** -- Levenshtein edit distance with sliding window. Configurable threshold (default 0.7).
|
|
265
265
|
|
|
266
|
-
**Scoped Recall** via `
|
|
266
|
+
**Scoped Recall** via `knowledge_search` with the `scope` parameter:
|
|
267
267
|
|
|
268
268
|
| Scope | Matches |
|
|
269
269
|
| ----------- | ----------------------------------------- |
|
|
@@ -277,7 +277,7 @@ Frequently accessed entries rise in search rankings; stale entries decay over ti
|
|
|
277
277
|
## Testing
|
|
278
278
|
|
|
279
279
|
```bash
|
|
280
|
-
npm test #
|
|
280
|
+
npm test # 352 tests across 20 files
|
|
281
281
|
npm run test:watch # Watch mode
|
|
282
282
|
npm run lint # Type-check (tsc --noEmit)
|
|
283
283
|
```
|
package/agent-desk-plugin.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-meta.d.ts","sourceRoot":"","sources":["../src/package-meta.ts"],"names":[],"mappings":"AAcA,wBAAgB,eAAe,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAanE"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// agent-knowledge — package.json metadata (name + version)
|
|
3
|
+
//
|
|
4
|
+
// Single source for MCP server info, dashboard, and getVersion(). Cached after first read.
|
|
5
|
+
// =============================================================================
|
|
6
|
+
import { readFileSync } from 'fs';
|
|
7
|
+
import { dirname, join } from 'path';
|
|
8
|
+
import { fileURLToPath } from 'url';
|
|
9
|
+
const thisDir = dirname(fileURLToPath(import.meta.url));
|
|
10
|
+
let cached = null;
|
|
11
|
+
export function readPackageMeta() {
|
|
12
|
+
if (cached)
|
|
13
|
+
return cached;
|
|
14
|
+
try {
|
|
15
|
+
const raw = readFileSync(join(thisDir, '..', 'package.json'), 'utf8');
|
|
16
|
+
const pkg = JSON.parse(raw);
|
|
17
|
+
cached = {
|
|
18
|
+
name: typeof pkg.name === 'string' ? pkg.name : 'agent-knowledge',
|
|
19
|
+
version: typeof pkg.version === 'string' ? pkg.version : '0.0.0',
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
cached = { name: 'agent-knowledge', version: '0.0.0' };
|
|
24
|
+
}
|
|
25
|
+
return cached;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=package-meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-meta.js","sourceRoot":"","sources":["../src/package-meta.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,2DAA2D;AAC3D,EAAE;AACF,2FAA2F;AAC3F,gFAAgF;AAEhF,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,MAAM,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAExD,IAAI,MAAM,GAA6C,IAAI,CAAC;AAE5D,MAAM,UAAU,eAAe;IAC7B,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAC1B,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,CAAC;QACtE,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAwC,CAAC;QACnE,MAAM,GAAG;YACP,IAAI,EAAE,OAAO,GAAG,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAiB;YACjE,OAAO,EAAE,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO;SACjE,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,GAAG,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IACzD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare function loadPersistedConfig(): PersistedConfig;
|
|
|
21
21
|
export declare function savePersistedConfig(updates: Partial<PersistedConfig>): PersistedConfig;
|
|
22
22
|
export declare function getConfig(): KnowledgeConfig;
|
|
23
23
|
/**
|
|
24
|
-
* Read the version from package.json (cached
|
|
24
|
+
* Read the version from package.json (cached via readPackageMeta).
|
|
25
25
|
*/
|
|
26
26
|
export declare function getVersion(): string;
|
|
27
27
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG1D,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,iBAAiB,EAAE,YAAY,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,WAAW,EAAE,OAAO,CAAC;CACtB;AAID,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAaD,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED,wBAAgB,mBAAmB,IAAI,eAAe,CASrD;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,eAAe,CAgBtF;AAID,wBAAgB,SAAS,IAAI,eAAe,CA2D3C;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAEnC"}
|
package/dist/types.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { homedir } from 'os';
|
|
2
2
|
import { join } from 'path';
|
|
3
3
|
import { readFileSync, writeFileSync, existsSync, mkdirSync } from 'fs';
|
|
4
|
-
import {
|
|
5
|
-
import { dirname } from 'path';
|
|
4
|
+
import { readPackageMeta } from './package-meta.js';
|
|
6
5
|
function getConfigDir() {
|
|
7
6
|
if (process.platform === 'win32') {
|
|
8
7
|
return join(process.env.APPDATA || join(homedir(), 'AppData', 'Roaming'), 'knowledge');
|
|
@@ -64,7 +63,15 @@ export function getConfig() {
|
|
|
64
63
|
}
|
|
65
64
|
}
|
|
66
65
|
// Auto-detect common AI coding tool session directories
|
|
67
|
-
|
|
66
|
+
// Per the host-agnostic Genericity rule: support every well-known AI coding
|
|
67
|
+
// host root, not just Claude Code. New hosts: add an entry here.
|
|
68
|
+
const autoDetectRoots = [
|
|
69
|
+
join(home, '.claude', 'projects'),
|
|
70
|
+
join(home, '.cursor', 'projects'),
|
|
71
|
+
join(home, '.codex', 'projects'),
|
|
72
|
+
join(home, '.aider', 'projects'),
|
|
73
|
+
join(home, '.continue', 'projects'),
|
|
74
|
+
];
|
|
68
75
|
for (const root of autoDetectRoots) {
|
|
69
76
|
if (existsSync(root) && root !== sessionsDir && !extraSessionRoots.includes(root)) {
|
|
70
77
|
extraSessionRoots.push(root);
|
|
@@ -90,38 +97,10 @@ export function getConfig() {
|
|
|
90
97
|
autoDistill,
|
|
91
98
|
};
|
|
92
99
|
}
|
|
93
|
-
let _version = null;
|
|
94
100
|
/**
|
|
95
|
-
* Read the version from package.json (cached
|
|
101
|
+
* Read the version from package.json (cached via readPackageMeta).
|
|
96
102
|
*/
|
|
97
103
|
export function getVersion() {
|
|
98
|
-
|
|
99
|
-
return _version;
|
|
100
|
-
try {
|
|
101
|
-
const thisFile = fileURLToPath(import.meta.url);
|
|
102
|
-
const thisDir = dirname(thisFile);
|
|
103
|
-
// Try src/../package.json then dist/../package.json
|
|
104
|
-
for (const rel of [
|
|
105
|
-
join(thisDir, '..', 'package.json'),
|
|
106
|
-
join(thisDir, '..', '..', 'package.json'),
|
|
107
|
-
]) {
|
|
108
|
-
try {
|
|
109
|
-
const pkg = JSON.parse(readFileSync(rel, 'utf-8'));
|
|
110
|
-
if (pkg.version) {
|
|
111
|
-
_version = String(pkg.version);
|
|
112
|
-
return _version;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
catch (err) {
|
|
116
|
-
console.error('[knowledge] version read:', err instanceof Error ? err.message : err);
|
|
117
|
-
continue;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
catch (err) {
|
|
122
|
-
console.error('[knowledge] version resolve:', err instanceof Error ? err.message : err);
|
|
123
|
-
}
|
|
124
|
-
_version = '1.0.0';
|
|
125
|
-
return _version;
|
|
104
|
+
return readPackageMeta().version;
|
|
126
105
|
}
|
|
127
106
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAExE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAuBpD,SAAS,YAAY;IACnB,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,WAAW,CAAC,CAAC;IACzF,CAAC;IACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC,EAAE,WAAW,CAAC,CAAC;AACtF,CAAC;AAED,SAAS,aAAa;IACpB,OAAO,IAAI,CAAC,YAAY,EAAE,EAAE,aAAa,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,OAAO,aAAa,EAAE,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,mBAAmB;IACjC,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,IAAI,C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,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAClF,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;IAED,MAAM,iBAAiB,GACpB,OAAO,CAAC,GAAG,CAAC,4BAA6C;QACzD,SAAS,CAAC,iBAAkC;QAC7C,OAAO,CAAC;IACV,MAAM,cAAc,GAAG,UAAU,CAC/B,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,IAAI,GAAG,CAAC,CACjF,CAAC;IACF,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,SAAS,CAAC,MAAM,IAAI,SAAS,CAAC;IAC9E,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;IAC1D,MAAM,WAAW,GACf,cAAc,KAAK,SAAS;QAC1B,CAAC,CAAC,cAAc,CAAC,WAAW,EAAE,KAAK,OAAO;QAC1C,CAAC,CAAC,CAAC,SAAS,CAAC,WAAW,IAAI,IAAI,CAAC,CAAC;IAEtC,OAAO;QACL,SAAS;QACT,OAAO;QACP,WAAW;QACX,iBAAiB;QACjB,iBAAiB;QACjB,cAAc;QACd,MAAM;QACN,WAAW;KACZ,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU;IACxB,OAAO,eAAe,EAAE,CAAC,OAAO,CAAC;AACnC,CAAC"}
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -42,7 +42,8 @@ src/
|
|
|
42
42
|
index.ts Entry point — MCP stdio + dashboard auto-start
|
|
43
43
|
server.ts 6 tool definitions, request routing, error handling
|
|
44
44
|
dashboard.ts HTTP + WebSocket server, REST API, file watcher
|
|
45
|
-
|
|
45
|
+
package-meta.ts Cached name/version from package.json (used by getVersion / MCP / dashboard)
|
|
46
|
+
types.ts KnowledgeConfig interface, getConfig(), getVersion()
|
|
46
47
|
knowledge/
|
|
47
48
|
store.ts CRUD for markdown entries with YAML frontmatter
|
|
48
49
|
search.ts TF-IDF search over knowledge entries
|
|
@@ -126,7 +127,7 @@ CREATE TABLE edges (
|
|
|
126
127
|
|
|
127
128
|
All four operations are exposed via the single `knowledge_graph` tool with an `action` parameter (`link`, `unlink`, `list`, `traverse`).
|
|
128
129
|
|
|
129
|
-
**Auto-linking**: On `
|
|
130
|
+
**Auto-linking**: On `knowledge { action: "write" }`, the top-3 most similar existing entries are found via cosine similarity against the vector store. Entries with similarity > 0.7 get automatic `related_to` edges created.
|
|
130
131
|
|
|
131
132
|
## Confidence & Decay Scoring
|
|
132
133
|
|
|
@@ -159,7 +160,7 @@ finalScore = baseRelevance * 0.5^(daysSinceLastAccess / 90) * maturityMultiplier
|
|
|
159
160
|
| `established` | 5-19 | 1.0x |
|
|
160
161
|
| `proven` | 20+ | 1.5x |
|
|
161
162
|
|
|
162
|
-
Access count increments on `
|
|
163
|
+
Access count increments on `knowledge { action: "read" }`. Maturity transitions happen automatically when thresholds are crossed. Search results from `knowledge_search` apply the decay formula to blend relevance with freshness and confidence.
|
|
163
164
|
|
|
164
165
|
## Memory Consolidation
|
|
165
166
|
|
|
@@ -167,7 +168,7 @@ Access count increments on `knowledge_read`. Maturity transitions happen automat
|
|
|
167
168
|
|
|
168
169
|
Detects near-duplicate knowledge entries using TF-IDF similarity scoring.
|
|
169
170
|
|
|
170
|
-
**`checkDuplicates()`** — called after `
|
|
171
|
+
**`checkDuplicates()`** — called after `knowledge { action: "write" }`. Builds a TF-IDF index from all entries, queries with the written content, and returns entries exceeding a configurable similarity threshold (default: 0.6). Warnings are included in the write response.
|
|
171
172
|
|
|
172
173
|
**`consolidate()`** — batch scan for `knowledge_consolidate`. Computes pairwise TF-IDF similarities for all entries in a category (or globally), groups entries above threshold (default: 0.5) into clusters using union-find, and returns clusters with representative entries and pairwise similarity scores.
|
|
173
174
|
|
|
@@ -385,7 +386,7 @@ sequenceDiagram
|
|
|
385
386
|
participant G as Git
|
|
386
387
|
participant F as File System
|
|
387
388
|
|
|
388
|
-
C->>S:
|
|
389
|
+
C->>S: knowledge({ action: "write", category, filename, content })
|
|
389
390
|
S->>G: git pull --rebase
|
|
390
391
|
S->>F: Write markdown file
|
|
391
392
|
S->>G: git add -A && commit && push
|
package/docs/SETUP.md
CHANGED
|
@@ -285,7 +285,7 @@ alwaysApply: false
|
|
|
285
285
|
Before ending a session, save non-obvious learnings to agent-knowledge:
|
|
286
286
|
|
|
287
287
|
1. `knowledge_search` for existing entries that overlap with this session's work.
|
|
288
|
-
2. `
|
|
288
|
+
2. `knowledge { action: "write" }` new entries for decisions, architecture changes, or error patterns
|
|
289
289
|
that aren't already captured.
|
|
290
290
|
3. `knowledge_link` related entries together.
|
|
291
291
|
|
|
@@ -392,9 +392,9 @@ Live reload: edit files in `src/ui/` and the browser refreshes automatically.
|
|
|
392
392
|
|
|
393
393
|
| Operation | Git Action | When |
|
|
394
394
|
| ------------------------------------- | ------------------------------ | -------------- |
|
|
395
|
-
| `
|
|
396
|
-
| `
|
|
397
|
-
| `
|
|
395
|
+
| `knowledge` action: `read`, `list` | `git pull --rebase` | Before reading |
|
|
396
|
+
| `knowledge` action: `write`, `delete` | `git add -A && commit && push` | After writing |
|
|
397
|
+
| `knowledge` action: `sync` | `git pull` then `git push` | Manual trigger |
|
|
398
398
|
|
|
399
399
|
Ensure git credentials are configured (SSH key or credential helper):
|
|
400
400
|
|
|
@@ -431,7 +431,7 @@ Each path is scanned for JSONL files or Cursor-style `agent-transcripts/` subdir
|
|
|
431
431
|
|
|
432
432
|
agent-knowledge can auto-distill session transcripts into knowledge entries. Auto-distillation reads from all discovered session sources and works with any tool whose sessions are available through the adapter system.
|
|
433
433
|
|
|
434
|
-
To manually save knowledge from any client, use `
|
|
434
|
+
To manually save knowledge from any client, use `knowledge` with `action: "write"`.
|
|
435
435
|
|
|
436
436
|
---
|
|
437
437
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-knowledge",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.17",
|
|
4
4
|
"description": "Cross-session memory and recall for AI agents — git-synced knowledge base, knowledge graph, confidence scoring, hybrid semantic+TF-IDF search, auto-distillation with secrets scrubbing",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|