@knolo/cli 3.2.2 → 5.0.0
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 +68 -7
- package/bin/knolo.mjs +514 -7
- package/package.json +21 -3
- package/templates/icp-knowledge-canister/README.md +76 -0
- package/templates/icp-knowledge-canister/canisters/knolo-core-rust/Cargo.toml +13 -0
- package/templates/icp-knowledge-canister/canisters/knolo-core-rust/src/lib.rs +1603 -0
- package/templates/icp-knowledge-canister/canisters/knolo-icp-canister/Cargo.lock +541 -0
- package/templates/icp-knowledge-canister/canisters/knolo-icp-canister/Cargo.toml +20 -0
- package/templates/icp-knowledge-canister/canisters/knolo-icp-canister/knolo_icp.did +29 -0
- package/templates/icp-knowledge-canister/canisters/knolo-icp-canister/src/lib.rs +605 -0
- package/templates/icp-knowledge-canister/dfx.json +25 -0
- package/templates/icp-knowledge-canister/frontend/index.html +12 -0
- package/templates/icp-knowledge-canister/frontend/package.json +27 -0
- package/templates/icp-knowledge-canister/frontend/src/App.tsx +225 -0
- package/templates/icp-knowledge-canister/frontend/src/app.css +271 -0
- package/templates/icp-knowledge-canister/frontend/src/canister.ts +119 -0
- package/templates/icp-knowledge-canister/frontend/src/canisterConfig.test.ts +34 -0
- package/templates/icp-knowledge-canister/frontend/src/canisterConfig.ts +26 -0
- package/templates/icp-knowledge-canister/frontend/src/main.tsx +5 -0
- package/templates/icp-knowledge-canister/frontend/src/vite-env.d.ts +14 -0
- package/templates/icp-knowledge-canister/frontend/tsconfig.json +18 -0
- package/templates/icp-knowledge-canister/frontend/vite.config.ts +66 -0
- package/templates/icp-knowledge-canister/knolo.config.json +15 -0
- package/templates/icp-knowledge-canister/knowledge/alpha.md +5 -0
- package/templates/icp-knowledge-canister/knowledge/guides/beta.md +5 -0
- package/templates/icp-knowledge-canister/scripts/build-sample-pack.mjs +24 -0
- package/templates/icp-knowledge-canister/scripts/query.sh +11 -0
- package/templates/icp-knowledge-canister/scripts/upload-pack.sh +16 -0
package/README.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# @knolo/cli
|
|
2
2
|
|
|
3
|
+
The CLI preserves the Knolo V4 pack workflow and adds read-only V5 Knowledge
|
|
4
|
+
Image inspection. Normal builds emit V4; the ICP legacy build path explicitly
|
|
5
|
+
emits V3 until the canister gains a V4 profile. V5 Studio output is a verified
|
|
6
|
+
management snapshot, not a mutation interface.
|
|
7
|
+
|
|
3
8
|
The official CLI for building `.knolo` knowledge packs.
|
|
4
9
|
|
|
5
10
|
It indexes structured content and produces a deterministic, local-first knowledge bundle for use with `@knolo/core`.
|
|
@@ -36,6 +41,63 @@ Indexes your configured content and outputs:
|
|
|
36
41
|
dist/knowledge.knolo
|
|
37
42
|
```
|
|
38
43
|
|
|
44
|
+
Artifact workflows:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
knolo inspect dist/knowledge.knolo
|
|
48
|
+
knolo verify dist/knowledge.knolo
|
|
49
|
+
knolo migrate old.knolo --to 4 --out new.knolo
|
|
50
|
+
knolo query "billing policy" --receipt receipt.json --json
|
|
51
|
+
knolo explain receipt.json --pack dist/knowledge.knolo
|
|
52
|
+
knolo diff old.knolo new.knolo
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
V5 runtime diagnostics:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
knolo v5 info ./dist/knowledge.v5
|
|
59
|
+
knolo v5 health ./dist/knowledge.v5
|
|
60
|
+
knolo v5 studio ./dist/knowledge.v5
|
|
61
|
+
knolo v5 info ./dist/knowledge.v5 --index ./dist/query-index.v5 --history ./dist/query-history.v5
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
These commands verify the V5 image and optional state-root-bound runtime
|
|
65
|
+
artifacts before printing deterministic diagnostics. The `studio` variant
|
|
66
|
+
prints the KIP-0026 read-only management snapshot with artifact-panel
|
|
67
|
+
availability and a management root. All variants are read-only.
|
|
68
|
+
|
|
69
|
+
### ICP Canister Workflow (LIVE)
|
|
70
|
+
|
|
71
|
+
Deploy a Knolo knowledge canister on a local ICP replica, upload a `.knolo` pack, and query it with no middleware.
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
knolo icp init ./icp-knowledge-canister
|
|
75
|
+
cd ./icp-knowledge-canister
|
|
76
|
+
dfx start --background
|
|
77
|
+
dfx deploy
|
|
78
|
+
knolo icp build-pack ./knowledge --out ./dist/knowledge.knolo
|
|
79
|
+
knolo icp upload ./dist/knowledge.knolo --canister knolo_knowledge --label my-docs
|
|
80
|
+
knolo icp health --canister knolo_knowledge
|
|
81
|
+
knolo icp info --canister knolo_knowledge
|
|
82
|
+
knolo icp query "alpha beta" --canister knolo_knowledge --k 5
|
|
83
|
+
# knolo icp clear --canister knolo_knowledge # controller only
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
From the monorepo, you can also seed dummy data and open a Postman-friendly REST gateway:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
npm run icp:local
|
|
90
|
+
curl -sS "http://127.0.0.1:8787/search?q=billing&k=5"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
These commands stay local-first:
|
|
94
|
+
|
|
95
|
+
* No hosted service
|
|
96
|
+
* No vector database
|
|
97
|
+
* Lexical retrieval by default
|
|
98
|
+
* Controller-only pack mutation; 2 MiB pack limit
|
|
99
|
+
* Pack state survives canister upgrades
|
|
100
|
+
|
|
39
101
|
---
|
|
40
102
|
|
|
41
103
|
## 📁 Expected Project Structure
|
|
@@ -77,12 +139,13 @@ All builds are deterministic.
|
|
|
77
139
|
|
|
78
140
|
## 🧠 Agent Features
|
|
79
141
|
|
|
80
|
-
|
|
142
|
+
Current v4 features include:
|
|
81
143
|
|
|
82
144
|
* Routing profile extraction
|
|
83
145
|
* Tool policy validation
|
|
84
146
|
* Mount-time registry validation
|
|
85
147
|
* Deterministic selection logic
|
|
148
|
+
* Pack manifests, analyzer identities, retrieval plans, receipts, and evidence spans
|
|
86
149
|
|
|
87
150
|
---
|
|
88
151
|
|
|
@@ -105,10 +168,9 @@ This ensures:
|
|
|
105
168
|
|
|
106
169
|
## 🗺 Roadmap
|
|
107
170
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
* WASM build output
|
|
171
|
+
The active roadmap is maintained in [`../../docs/ROADMAP.md`](../../docs/ROADMAP.md).
|
|
172
|
+
The current release focuses on V5 verification, migration, diagnostics, and
|
|
173
|
+
read-only Studio management while preserving the V4 CLI behavior.
|
|
112
174
|
|
|
113
175
|
---
|
|
114
176
|
|
|
@@ -121,5 +183,4 @@ This section is deterministic, offline-safe, and additive; runtimes that ignore
|
|
|
121
183
|
|
|
122
184
|
## 📄 License
|
|
123
185
|
|
|
124
|
-
|
|
125
|
-
|
|
186
|
+
Apache-2.0
|