@dikolab/kbdb 0.2.0 → 0.2.2
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/README.md +9 -9
- package/dist/cli.cjs +1 -1
- package/dist/cli.cjs.map +2 -2
- package/dist/cli.mjs +1 -1
- package/dist/cli.mjs.map +2 -2
- package/dist/kbdb-worker.cjs.map +2 -2
- package/dist/mod.cjs +1 -1
- package/dist/mod.cjs.map +1 -1
- package/dist/mod.d.ts +25 -0
- package/dist/mod.mjs +1 -1
- package/dist/mod.mjs.map +1 -1
- package/dist/src/cli.d.ts +8 -0
- package/dist/src/shared/version/constants/version.constant.d.ts +1 -1
- package/dist/src/worker.d.ts +7 -0
- package/dist/worker.mjs.map +2 -2
- package/mod.ts +26 -0
- package/package.json +1 -1
- package/src/cli.ts +9 -0
- package/src/shared/version/constants/version.constant.ts +1 -1
- package/src/worker.ts +8 -0
package/mod.ts
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module
|
|
3
|
+
*
|
|
4
|
+
* File-based knowledge base database for AI agents.
|
|
5
|
+
* Provides a programmatic API for indexing documents,
|
|
6
|
+
* searching with ranked results, and recalling section
|
|
7
|
+
* context at progressive depths.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { createWorkerClient } from '@dikolab/kbdb';
|
|
12
|
+
*
|
|
13
|
+
* const client = await createWorkerClient({
|
|
14
|
+
* contextPath: '/path/to/.kbdb',
|
|
15
|
+
* });
|
|
16
|
+
*
|
|
17
|
+
* const results = await client.search({
|
|
18
|
+
* query: 'authentication',
|
|
19
|
+
* limit: 10,
|
|
20
|
+
* });
|
|
21
|
+
*
|
|
22
|
+
* console.log(results.items);
|
|
23
|
+
* client.disconnect();
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
|
|
1
27
|
export { version } from './src/shared/mod.ts';
|
|
2
28
|
|
|
3
29
|
export {
|
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module
|
|
3
|
+
*
|
|
4
|
+
* CLI and MCP server executable for kbdb. Provides the
|
|
5
|
+
* `kbdb` command with 18 subcommands for managing a
|
|
6
|
+
* file-based knowledge base, and an MCP server mode
|
|
7
|
+
* for AI agent integration.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
import { getArgs, detectRuntime } from './shared/runtime/index.ts';
|
|
2
11
|
import {
|
|
3
12
|
resolveBaseDir,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Current package version, kept in sync with package.json. */
|
|
2
|
-
export const VERSION = '0.2.
|
|
2
|
+
export const VERSION = '0.2.2';
|
package/src/worker.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module
|
|
3
|
+
*
|
|
4
|
+
* Worker daemon executable for kbdb. Runs as a detached
|
|
5
|
+
* background process that loads WASM modules and serves
|
|
6
|
+
* JSON-RPC 2.0 requests over local IPC.
|
|
7
|
+
*/
|
|
8
|
+
|
|
1
9
|
import { existsSync } from 'node:fs';
|
|
2
10
|
import { getArgs } from './shared/runtime/index.ts';
|
|
3
11
|
import {
|