@hasna/knowledge 0.2.9 → 0.2.11
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 +27 -0
- package/bin/open-knowledge-mcp.js +1614 -34
- package/bin/open-knowledge.js +64 -63
- package/docs/architecture/ai-native-knowledge-base.md +19 -1
- package/package.json +6 -2
- package/src/cli.ts +49 -78
- package/src/mcp.js +19 -27
- package/src/providers.ts +308 -0
- package/src/service.ts +166 -0
- package/src/workspace.ts +41 -0
package/README.md
CHANGED
|
@@ -11,6 +11,11 @@ engine for AI agents. It stores simple knowledge items today, creates a Hasna
|
|
|
11
11
|
project workspace under `.hasna/apps/knowledge`, initializes a versioned
|
|
12
12
|
`knowledge.db`, writes generated wiki artifacts, and exposes a stdio MCP server.
|
|
13
13
|
|
|
14
|
+
CLI and MCP workspace operations share a `KnowledgeService` facade for config,
|
|
15
|
+
safety policy, artifact storage, DB/wiki setup, source ingestion, source
|
|
16
|
+
resolution, and outbox consumption. That keeps local project mode and future
|
|
17
|
+
remote/S3-backed wrappers on the same service contracts.
|
|
18
|
+
|
|
14
19
|
## Install
|
|
15
20
|
|
|
16
21
|
```bash
|
|
@@ -77,6 +82,10 @@ open-knowledge source resolve open-files://file/f_123/revision/rev_456 --scope p
|
|
|
77
82
|
|
|
78
83
|
# Inspect local safety policy and approvals
|
|
79
84
|
open-knowledge safety status --scope project --json
|
|
85
|
+
|
|
86
|
+
# Inspect AI SDK provider credentials and model aliases
|
|
87
|
+
open-knowledge providers status --scope project --json
|
|
88
|
+
open-knowledge providers models --scope project --json
|
|
80
89
|
```
|
|
81
90
|
|
|
82
91
|
## Commands
|
|
@@ -221,6 +230,19 @@ Inspect and operate the local safety model. Source reads are read-only by
|
|
|
221
230
|
default, web search and S3 reads are opt-in, generated writes require approval
|
|
222
231
|
by default, and known secret patterns are redacted before chunk storage.
|
|
223
232
|
|
|
233
|
+
### providers
|
|
234
|
+
```bash
|
|
235
|
+
open-knowledge providers status [--scope project] [--json]
|
|
236
|
+
open-knowledge providers models [--scope project] [--json]
|
|
237
|
+
open-knowledge providers check [provider|model-alias] [--scope project] [--json]
|
|
238
|
+
```
|
|
239
|
+
Inspect AI SDK v6 provider readiness for OpenAI, Anthropic, and DeepSeek. The
|
|
240
|
+
provider layer resolves BYOK credentials from `OPENAI_API_KEY`,
|
|
241
|
+
`ANTHROPIC_API_KEY`, and `DEEPSEEK_API_KEY` by default, exposes model aliases
|
|
242
|
+
such as `default`, `fast`, `reasoning`, `sonnet`, and `deepseek`, and records
|
|
243
|
+
provider capability metadata for structured output, tool use, tool streaming,
|
|
244
|
+
reasoning, embeddings, and native web-search support.
|
|
245
|
+
|
|
224
246
|
### help
|
|
225
247
|
```bash
|
|
226
248
|
open-knowledge help [command]
|
|
@@ -276,6 +298,11 @@ source ref. It does not copy raw files into the knowledge workspace; local file,
|
|
|
276
298
|
S3, web, and open-files inputs are converted into redacted chunks with offsets,
|
|
277
299
|
hashes, revision metadata, and FTS rows.
|
|
278
300
|
|
|
301
|
+
AI provider configuration is local/BYOK by default. `open-knowledge` declares
|
|
302
|
+
AI SDK v6 provider support through `ai`, `@ai-sdk/openai`,
|
|
303
|
+
`@ai-sdk/anthropic`, and `@ai-sdk/deepseek`, but does not call providers until a
|
|
304
|
+
future prompt/agent command explicitly requests a model.
|
|
305
|
+
|
|
279
306
|
Generated knowledge artifacts can be stored locally under
|
|
280
307
|
`.hasna/apps/knowledge/artifacts` or through the S3 artifact-store adapter.
|
|
281
308
|
|