Skip to content

Commit 2b8dd4e

Browse files
committed
Document ICP canister adapter in README
1 parent ff757b2 commit 2b8dd4e

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,56 @@ cargo test
127127

128128
---
129129

130+
# 🌐 ICP Canister Adapter (New)
131+
132+
Knolo now ships a local-first ICP path that keeps retrieval lexical-first and talks to the canister directly, with no middleware and no vector database.
133+
134+
What it includes:
135+
136+
* `packages/icp-canister` for the Rust canister adapter
137+
* `examples/icp-knowledge-canister` for a local `dfx` example
138+
* `knolo icp` CLI commands for init, build-pack, upload, and query
139+
* `scripts/e2e-icp-local.sh` for one-command local end-to-end verification
140+
141+
Local prerequisites:
142+
143+
* `dfx`
144+
* Rust wasm target: `rustup target add wasm32-unknown-unknown`
145+
* `npm install` from the repo root
146+
147+
CLI path:
148+
149+
```bash
150+
knolo icp init ./my-icp-canister
151+
cd ./my-icp-canister
152+
knolo icp build-pack ./knowledge --out ./dist/knowledge.knolo
153+
knolo icp upload ./dist/knowledge.knolo --canister knolo_knowledge
154+
knolo icp query "alpha beta" --canister knolo_knowledge
155+
```
156+
157+
Run the example manually:
158+
159+
```bash
160+
cd examples/icp-knowledge-canister
161+
dfx start --background --clean
162+
dfx deploy
163+
node scripts/build-sample-pack.mjs
164+
bash scripts/upload-pack.sh
165+
bash scripts/query.sh "alpha beta"
166+
```
167+
168+
If `dfx` is running in a minimal shell and complains about terminal colors, prefix the commands with `TERM=xterm-256color`.
169+
170+
Run the full end-to-end check:
171+
172+
```bash
173+
bash scripts/e2e-icp-local.sh
174+
```
175+
176+
The sample pack is built from the checked-in docs under `examples/icp-knowledge-canister/knowledge`, so the search results are deterministic and easy to verify locally.
177+
178+
---
179+
130180
# 🚀 10-Minute Ecosystem Path
131181

132182
From this repository:

0 commit comments

Comments
 (0)