@dikolab/kbdb 0.6.0 → 0.6.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 +36 -7
- package/README.md.bak +36 -7
- package/dist/README.md +36 -7
- package/dist/cli.cjs +663 -218
- package/dist/cli.cjs.map +3 -3
- package/dist/cli.mjs +663 -218
- package/dist/cli.mjs.map +3 -3
- package/dist/kbdb-worker.cjs +71 -12
- package/dist/kbdb-worker.cjs.map +3 -3
- package/dist/mod.cjs +1 -1
- package/dist/mod.cjs.map +1 -1
- package/dist/mod.mjs +1 -1
- package/dist/mod.mjs.map +1 -1
- package/dist/src/shared/cli/constants/recfile-field-maps.constant.d.ts +3 -1
- package/dist/src/shared/cli/functions/format-command-output.function.d.ts +0 -4
- package/dist/src/shared/cli/functions/format-command-text.function.d.ts +1 -0
- package/dist/src/shared/cli/functions/format-mcp-output.function.d.ts +5 -4
- package/dist/src/shared/cli/functions/format-output.function.d.ts +3 -7
- package/dist/src/shared/cli/functions/format-text-output.function.d.ts +3 -2
- package/dist/src/shared/cli/functions/run-agent-search.function.d.ts +13 -0
- package/dist/src/shared/cli/functions/run-check.function.d.ts +1 -1
- package/dist/src/shared/cli/functions/run-content.function.d.ts +18 -14
- package/dist/src/shared/cli/functions/run-learn.function.d.ts +6 -11
- package/dist/src/shared/cli/functions/run-skill-search.function.d.ts +13 -0
- package/dist/src/shared/cli/functions/wrap-mcp-envelope.function.d.ts +8 -0
- package/dist/src/shared/cli/typings/cli-options.interface.d.ts +6 -0
- package/dist/src/shared/cli/typings/learn-client.interface.d.ts +6 -2
- package/dist/src/shared/cli/typings/learn-result.model.d.ts +4 -0
- package/dist/src/shared/cli/typings/search-display.model.d.ts +2 -2
- package/dist/src/shared/mcp/constants/tool-agent-search.constant.d.ts +3 -0
- package/dist/src/shared/mcp/constants/tool-skill-search.constant.d.ts +3 -0
- package/dist/src/shared/mcp/functions/format-search-results.function.d.ts +25 -0
- package/dist/src/shared/mcp/functions/handle-agent-get.function.d.ts +4 -4
- package/dist/src/shared/mcp/functions/handle-agent-list.function.d.ts +3 -7
- package/dist/src/shared/mcp/functions/handle-agent-search.function.d.ts +11 -0
- package/dist/src/shared/mcp/functions/handle-recall.function.d.ts +1 -1
- package/dist/src/shared/mcp/functions/handle-skill-search.function.d.ts +11 -0
- package/dist/src/shared/mcp/functions/handle-tool-search.function.d.ts +3 -3
- package/dist/src/shared/mcp/typings/mcp-client.interface.d.ts +2 -2
- package/dist/src/shared/mcp/typings/mcp-worker-client.interface.d.ts +2 -2
- package/dist/src/shared/version/constants/version.constant.d.ts +1 -1
- package/dist/src/shared/worker-client/typings/add-section-result.model.d.ts +6 -12
- package/dist/src/shared/worker-client/typings/status-result.model.d.ts +2 -2
- package/dist/src/shared/worker-daemon/functions/strip-recall-by-depth.function.d.ts +22 -0
- package/dist/wasm/fs-database/kbdb_fs_database_bg.wasm +0 -0
- package/dist/wasm/kb-worker/kbdb_worker_bg.wasm +0 -0
- package/dist/worker.mjs +71 -12
- package/dist/worker.mjs.map +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@dikolab/kbdb)
|
|
4
4
|
[](https://jsr.io/@dikolab/kbdb)
|
|
5
|
+
[](https://diko316.gitlab.io/knowledge-base-db/)
|
|
5
6
|
[](https://gitlab.com/diko316/knowledge-base-db/-/blob/main/LICENSE)
|
|
6
7
|
|
|
7
8
|
A file-based knowledge base database -- no external
|
|
8
9
|
server to install.
|
|
9
10
|
|
|
10
|
-
[
|
|
11
|
+
[Docs](https://diko316.gitlab.io/knowledge-base-db/)
|
|
12
|
+
| [GitLab](https://gitlab.com/diko316/knowledge-base-db)
|
|
11
13
|
| [NPM](https://www.npmjs.com/package/@dikolab/kbdb)
|
|
12
14
|
| [JSR](https://jsr.io/@dikolab/kbdb)
|
|
13
15
|
| [License: AGPL-3.0](https://gitlab.com/diko316/knowledge-base-db/-/blob/main/LICENSE)
|
|
@@ -73,16 +75,26 @@ That's it. No database server. No extra tools.
|
|
|
73
75
|
|
|
74
76
|
**Using Node.js:**
|
|
75
77
|
|
|
78
|
+
CLI build hosted on
|
|
79
|
+
[NPM](https://www.npmjs.com/package/@dikolab/kbdb).
|
|
80
|
+
|
|
76
81
|
```sh
|
|
77
82
|
npm install -g @dikolab/kbdb
|
|
78
83
|
```
|
|
79
84
|
|
|
80
85
|
**Using Deno:**
|
|
81
86
|
|
|
87
|
+
CLI build hosted on
|
|
88
|
+
[JSR](https://jsr.io/@dikolab/kbdb).
|
|
89
|
+
|
|
82
90
|
```sh
|
|
83
91
|
deno install -Agf jsr:@dikolab/kbdb/cli
|
|
84
92
|
```
|
|
85
93
|
|
|
94
|
+
See the
|
|
95
|
+
[CLI Installation Guide](https://diko316.gitlab.io/knowledge-base-db/details/install-cli)
|
|
96
|
+
for prerequisites and verification steps.
|
|
97
|
+
|
|
86
98
|
### Try It Out
|
|
87
99
|
|
|
88
100
|
**1. Create a knowledge base**
|
|
@@ -118,10 +130,11 @@ kbdb search "how does auth work" --db ./my-kb
|
|
|
118
130
|
|
|
119
131
|
Results are ranked by relevance with snippets
|
|
120
132
|
showing where your terms matched. Output defaults
|
|
121
|
-
to
|
|
122
|
-
line) for easy grepping.
|
|
123
|
-
machine-readable
|
|
124
|
-
|
|
133
|
+
to `--format rec` (recfile: one `field: value` per
|
|
134
|
+
line) for easy grepping. Other formats: `json`
|
|
135
|
+
(machine-readable), `text` (numbered list), and
|
|
136
|
+
`mcp` (JSON-RPC 2.0 envelope). Use `--offset` to
|
|
137
|
+
page through large result sets.
|
|
125
138
|
|
|
126
139
|
To try hybrid search (keyword + AI similarity):
|
|
127
140
|
|
|
@@ -186,8 +199,20 @@ for the full walkthrough, including export and backup.
|
|
|
186
199
|
|
|
187
200
|
Integrate kbdb with AI agents and custom tools.
|
|
188
201
|
|
|
189
|
-
|
|
190
|
-
|
|
202
|
+
**MCP quick-start (Claude CLI):**
|
|
203
|
+
|
|
204
|
+
```sh
|
|
205
|
+
claude mcp add kbdb -- \
|
|
206
|
+
npx @dikolab/kbdb mcp --db /path/to/.kbdb
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
See the
|
|
210
|
+
[MCP Installation Guide](https://diko316.gitlab.io/knowledge-base-db/details/install-mcp)
|
|
211
|
+
for Claude Code, VS Code, and Claude Desktop
|
|
212
|
+
config files, plus troubleshooting.
|
|
213
|
+
|
|
214
|
+
- **MCP server** with 22 tools -- search, recall,
|
|
215
|
+
learn, export, skill/agent search, and more
|
|
191
216
|
- **Skills** -- store reusable prompt templates
|
|
192
217
|
with fill-in-the-blank arguments
|
|
193
218
|
- **Agents** -- create AI agent profiles that
|
|
@@ -283,12 +308,16 @@ build targets.
|
|
|
283
308
|
|
|
284
309
|
## Documentation
|
|
285
310
|
|
|
311
|
+
- [CLI Installation Guide](https://diko316.gitlab.io/knowledge-base-db/details/install-cli)
|
|
312
|
+
-- prerequisites, npm/JSR install, verification
|
|
286
313
|
- [Knowledge Base Guide](https://diko316.gitlab.io/knowledge-base-db/details/knowledge-base)
|
|
287
314
|
-- importing, searching, recall, export
|
|
288
315
|
- [Agent Tooling Guide](https://diko316.gitlab.io/knowledge-base-db/details/agent-tooling)
|
|
289
316
|
-- MCP, skills, agents, library API
|
|
290
317
|
- [CLI Reference](https://diko316.gitlab.io/knowledge-base-db/details/cli) -- full command
|
|
291
318
|
list with examples
|
|
319
|
+
- [MCP Installation Guide](https://diko316.gitlab.io/knowledge-base-db/details/install-mcp)
|
|
320
|
+
-- Claude CLI, Claude Code, VS Code, Claude Desktop
|
|
292
321
|
- [MCP Server Guide](https://diko316.gitlab.io/knowledge-base-db/details/mcp-server) --
|
|
293
322
|
setup, tools, environment config
|
|
294
323
|
- [Search and Ranking](https://diko316.gitlab.io/knowledge-base-db/details/search-and-ranking)
|
package/README.md.bak
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@dikolab/kbdb)
|
|
4
4
|
[](https://jsr.io/@dikolab/kbdb)
|
|
5
|
+
[](https://diko316.gitlab.io/knowledge-base-db/)
|
|
5
6
|
[](./LICENSE)
|
|
6
7
|
|
|
7
8
|
A file-based knowledge base database -- no external
|
|
8
9
|
server to install.
|
|
9
10
|
|
|
10
|
-
[
|
|
11
|
+
[Docs](https://diko316.gitlab.io/knowledge-base-db/)
|
|
12
|
+
| [GitLab](https://gitlab.com/diko316/knowledge-base-db)
|
|
11
13
|
| [NPM](https://www.npmjs.com/package/@dikolab/kbdb)
|
|
12
14
|
| [JSR](https://jsr.io/@dikolab/kbdb)
|
|
13
15
|
| [License: AGPL-3.0](./LICENSE)
|
|
@@ -73,16 +75,26 @@ That's it. No database server. No extra tools.
|
|
|
73
75
|
|
|
74
76
|
**Using Node.js:**
|
|
75
77
|
|
|
78
|
+
CLI build hosted on
|
|
79
|
+
[NPM](https://www.npmjs.com/package/@dikolab/kbdb).
|
|
80
|
+
|
|
76
81
|
```sh
|
|
77
82
|
npm install -g @dikolab/kbdb
|
|
78
83
|
```
|
|
79
84
|
|
|
80
85
|
**Using Deno:**
|
|
81
86
|
|
|
87
|
+
CLI build hosted on
|
|
88
|
+
[JSR](https://jsr.io/@dikolab/kbdb).
|
|
89
|
+
|
|
82
90
|
```sh
|
|
83
91
|
deno install -Agf jsr:@dikolab/kbdb/cli
|
|
84
92
|
```
|
|
85
93
|
|
|
94
|
+
See the
|
|
95
|
+
[CLI Installation Guide](./docs/details/install-cli.md)
|
|
96
|
+
for prerequisites and verification steps.
|
|
97
|
+
|
|
86
98
|
### Try It Out
|
|
87
99
|
|
|
88
100
|
**1. Create a knowledge base**
|
|
@@ -118,10 +130,11 @@ kbdb search "how does auth work" --db ./my-kb
|
|
|
118
130
|
|
|
119
131
|
Results are ranked by relevance with snippets
|
|
120
132
|
showing where your terms matched. Output defaults
|
|
121
|
-
to
|
|
122
|
-
line) for easy grepping.
|
|
123
|
-
machine-readable
|
|
124
|
-
|
|
133
|
+
to `--format rec` (recfile: one `field: value` per
|
|
134
|
+
line) for easy grepping. Other formats: `json`
|
|
135
|
+
(machine-readable), `text` (numbered list), and
|
|
136
|
+
`mcp` (JSON-RPC 2.0 envelope). Use `--offset` to
|
|
137
|
+
page through large result sets.
|
|
125
138
|
|
|
126
139
|
To try hybrid search (keyword + AI similarity):
|
|
127
140
|
|
|
@@ -186,8 +199,20 @@ for the full walkthrough, including export and backup.
|
|
|
186
199
|
|
|
187
200
|
Integrate kbdb with AI agents and custom tools.
|
|
188
201
|
|
|
189
|
-
|
|
190
|
-
|
|
202
|
+
**MCP quick-start (Claude CLI):**
|
|
203
|
+
|
|
204
|
+
```sh
|
|
205
|
+
claude mcp add kbdb -- \
|
|
206
|
+
npx @dikolab/kbdb mcp --db /path/to/.kbdb
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
See the
|
|
210
|
+
[MCP Installation Guide](./docs/details/install-mcp.md)
|
|
211
|
+
for Claude Code, VS Code, and Claude Desktop
|
|
212
|
+
config files, plus troubleshooting.
|
|
213
|
+
|
|
214
|
+
- **MCP server** with 22 tools -- search, recall,
|
|
215
|
+
learn, export, skill/agent search, and more
|
|
191
216
|
- **Skills** -- store reusable prompt templates
|
|
192
217
|
with fill-in-the-blank arguments
|
|
193
218
|
- **Agents** -- create AI agent profiles that
|
|
@@ -283,12 +308,16 @@ build targets.
|
|
|
283
308
|
|
|
284
309
|
## Documentation
|
|
285
310
|
|
|
311
|
+
- [CLI Installation Guide](./docs/details/install-cli.md)
|
|
312
|
+
-- prerequisites, npm/JSR install, verification
|
|
286
313
|
- [Knowledge Base Guide](./docs/details/knowledge-base.md)
|
|
287
314
|
-- importing, searching, recall, export
|
|
288
315
|
- [Agent Tooling Guide](./docs/details/agent-tooling.md)
|
|
289
316
|
-- MCP, skills, agents, library API
|
|
290
317
|
- [CLI Reference](./docs/details/cli.md) -- full command
|
|
291
318
|
list with examples
|
|
319
|
+
- [MCP Installation Guide](./docs/details/install-mcp.md)
|
|
320
|
+
-- Claude CLI, Claude Code, VS Code, Claude Desktop
|
|
292
321
|
- [MCP Server Guide](./docs/details/mcp-server.md) --
|
|
293
322
|
setup, tools, environment config
|
|
294
323
|
- [Search and Ranking](./docs/details/search-and-ranking.md)
|
package/dist/README.md
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@dikolab/kbdb)
|
|
4
4
|
[](https://jsr.io/@dikolab/kbdb)
|
|
5
|
+
[](https://diko316.gitlab.io/knowledge-base-db/)
|
|
5
6
|
[](https://gitlab.com/diko316/knowledge-base-db/-/blob/main/LICENSE)
|
|
6
7
|
|
|
7
8
|
A file-based knowledge base database -- no external
|
|
8
9
|
server to install.
|
|
9
10
|
|
|
10
|
-
[
|
|
11
|
+
[Docs](https://diko316.gitlab.io/knowledge-base-db/)
|
|
12
|
+
| [GitLab](https://gitlab.com/diko316/knowledge-base-db)
|
|
11
13
|
| [NPM](https://www.npmjs.com/package/@dikolab/kbdb)
|
|
12
14
|
| [JSR](https://jsr.io/@dikolab/kbdb)
|
|
13
15
|
| [License: AGPL-3.0](https://gitlab.com/diko316/knowledge-base-db/-/blob/main/LICENSE)
|
|
@@ -73,16 +75,26 @@ That's it. No database server. No extra tools.
|
|
|
73
75
|
|
|
74
76
|
**Using Node.js:**
|
|
75
77
|
|
|
78
|
+
CLI build hosted on
|
|
79
|
+
[NPM](https://www.npmjs.com/package/@dikolab/kbdb).
|
|
80
|
+
|
|
76
81
|
```sh
|
|
77
82
|
npm install -g @dikolab/kbdb
|
|
78
83
|
```
|
|
79
84
|
|
|
80
85
|
**Using Deno:**
|
|
81
86
|
|
|
87
|
+
CLI build hosted on
|
|
88
|
+
[JSR](https://jsr.io/@dikolab/kbdb).
|
|
89
|
+
|
|
82
90
|
```sh
|
|
83
91
|
deno install -Agf jsr:@dikolab/kbdb/cli
|
|
84
92
|
```
|
|
85
93
|
|
|
94
|
+
See the
|
|
95
|
+
[CLI Installation Guide](https://diko316.gitlab.io/knowledge-base-db/details/install-cli)
|
|
96
|
+
for prerequisites and verification steps.
|
|
97
|
+
|
|
86
98
|
### Try It Out
|
|
87
99
|
|
|
88
100
|
**1. Create a knowledge base**
|
|
@@ -118,10 +130,11 @@ kbdb search "how does auth work" --db ./my-kb
|
|
|
118
130
|
|
|
119
131
|
Results are ranked by relevance with snippets
|
|
120
132
|
showing where your terms matched. Output defaults
|
|
121
|
-
to
|
|
122
|
-
line) for easy grepping.
|
|
123
|
-
machine-readable
|
|
124
|
-
|
|
133
|
+
to `--format rec` (recfile: one `field: value` per
|
|
134
|
+
line) for easy grepping. Other formats: `json`
|
|
135
|
+
(machine-readable), `text` (numbered list), and
|
|
136
|
+
`mcp` (JSON-RPC 2.0 envelope). Use `--offset` to
|
|
137
|
+
page through large result sets.
|
|
125
138
|
|
|
126
139
|
To try hybrid search (keyword + AI similarity):
|
|
127
140
|
|
|
@@ -186,8 +199,20 @@ for the full walkthrough, including export and backup.
|
|
|
186
199
|
|
|
187
200
|
Integrate kbdb with AI agents and custom tools.
|
|
188
201
|
|
|
189
|
-
|
|
190
|
-
|
|
202
|
+
**MCP quick-start (Claude CLI):**
|
|
203
|
+
|
|
204
|
+
```sh
|
|
205
|
+
claude mcp add kbdb -- \
|
|
206
|
+
npx @dikolab/kbdb mcp --db /path/to/.kbdb
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
See the
|
|
210
|
+
[MCP Installation Guide](https://diko316.gitlab.io/knowledge-base-db/details/install-mcp)
|
|
211
|
+
for Claude Code, VS Code, and Claude Desktop
|
|
212
|
+
config files, plus troubleshooting.
|
|
213
|
+
|
|
214
|
+
- **MCP server** with 22 tools -- search, recall,
|
|
215
|
+
learn, export, skill/agent search, and more
|
|
191
216
|
- **Skills** -- store reusable prompt templates
|
|
192
217
|
with fill-in-the-blank arguments
|
|
193
218
|
- **Agents** -- create AI agent profiles that
|
|
@@ -283,12 +308,16 @@ build targets.
|
|
|
283
308
|
|
|
284
309
|
## Documentation
|
|
285
310
|
|
|
311
|
+
- [CLI Installation Guide](https://diko316.gitlab.io/knowledge-base-db/details/install-cli)
|
|
312
|
+
-- prerequisites, npm/JSR install, verification
|
|
286
313
|
- [Knowledge Base Guide](https://diko316.gitlab.io/knowledge-base-db/details/knowledge-base)
|
|
287
314
|
-- importing, searching, recall, export
|
|
288
315
|
- [Agent Tooling Guide](https://diko316.gitlab.io/knowledge-base-db/details/agent-tooling)
|
|
289
316
|
-- MCP, skills, agents, library API
|
|
290
317
|
- [CLI Reference](https://diko316.gitlab.io/knowledge-base-db/details/cli) -- full command
|
|
291
318
|
list with examples
|
|
319
|
+
- [MCP Installation Guide](https://diko316.gitlab.io/knowledge-base-db/details/install-mcp)
|
|
320
|
+
-- Claude CLI, Claude Code, VS Code, Claude Desktop
|
|
292
321
|
- [MCP Server Guide](https://diko316.gitlab.io/knowledge-base-db/details/mcp-server) --
|
|
293
322
|
setup, tools, environment config
|
|
294
323
|
- [Search and Ranking](https://diko316.gitlab.io/knowledge-base-db/details/search-and-ranking)
|