@knolo/cli 5.2.1 → 5.2.3
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 +35 -34
- package/bin/knolo.mjs +1 -1
- package/bin/registry/commands.mjs +650 -207
- package/bin/registry/http.mjs +109 -30
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -57,21 +57,23 @@ knolo login --token kno_…
|
|
|
57
57
|
# write requests use: Authorization: Bearer kno_…
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
`knolo publish`
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
`knolo publish` asks Hub for a Blob PUT grant with the dashboard token, PUTs
|
|
61
|
+
bytes to that grant URL, then completes with the public pack URL from the PUT
|
|
62
|
+
response. A `kno_…` token is the only credential. Do not set
|
|
63
|
+
`PACKS_READ_WRITE_TOKEN` — that is Hub’s store secret, not a publisher token.
|
|
63
64
|
|
|
64
65
|
```bash
|
|
66
|
+
knolo login --token kno_…
|
|
65
67
|
knolo publish ./dist/knowledge.knolo \
|
|
66
68
|
--slug refund-policy --version 1.2.0 --license Apache-2.0
|
|
67
69
|
knolo yank acme/refund-policy@1.2.0
|
|
68
70
|
```
|
|
69
71
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
a GitHub browser session.
|
|
72
|
+
The grant pathname is `sha256/<64-lowercase-hex>.knolo`. Only public Blob URLs
|
|
73
|
+
(`*.public.blob.vercel-storage.com`) are sent to `/api/upload/complete`. The
|
|
74
|
+
CLI never sends the `kno_…` token to Blob, in a query string, cookie, or pack
|
|
75
|
+
bytes. A 401 usually means the `Bearer` word is missing or the token was
|
|
76
|
+
revoked; it does not mean the Hub write API requires a GitHub browser session.
|
|
75
77
|
|
|
76
78
|
The older `@knolo/cli@5.2.0` publish/yank command was an unimplemented stub;
|
|
77
79
|
current versions use the live Hub HTTP sequence. For a direct smoke test of a
|
|
@@ -99,7 +101,6 @@ Successful installs are cached by SHA-256 and recorded in
|
|
|
99
101
|
`knolo.lock.json`. A yanked version or an existing conflicting pin requires
|
|
100
102
|
`--force`; digest and artifact validation cannot be bypassed.
|
|
101
103
|
|
|
102
|
-
|
|
103
104
|
---
|
|
104
105
|
|
|
105
106
|
## 🚀 Commands
|
|
@@ -167,11 +168,11 @@ curl -sS "http://127.0.0.1:8787/search?q=billing&k=5"
|
|
|
167
168
|
|
|
168
169
|
These commands stay local-first:
|
|
169
170
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
171
|
+
- No hosted service
|
|
172
|
+
- No vector database
|
|
173
|
+
- Lexical retrieval by default
|
|
174
|
+
- Controller-only pack mutation; 2 MiB pack limit
|
|
175
|
+
- Pack state survives canister upgrades
|
|
175
176
|
|
|
176
177
|
---
|
|
177
178
|
|
|
@@ -192,8 +193,8 @@ knolo.config.ts
|
|
|
192
193
|
|
|
193
194
|
```ts
|
|
194
195
|
export default {
|
|
195
|
-
input:
|
|
196
|
-
output:
|
|
196
|
+
input: './knowledge',
|
|
197
|
+
output: './dist/knowledge.knolo',
|
|
197
198
|
};
|
|
198
199
|
```
|
|
199
200
|
|
|
@@ -201,12 +202,12 @@ export default {
|
|
|
201
202
|
|
|
202
203
|
## 🧱 What the CLI Does
|
|
203
204
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
205
|
+
- Parses structured documents
|
|
206
|
+
- Normalizes metadata
|
|
207
|
+
- Indexes namespaces
|
|
208
|
+
- Extracts agent routing profiles
|
|
209
|
+
- Validates agent registry
|
|
210
|
+
- Generates compact `.knolo` bundle
|
|
210
211
|
|
|
211
212
|
All builds are deterministic.
|
|
212
213
|
|
|
@@ -216,11 +217,11 @@ All builds are deterministic.
|
|
|
216
217
|
|
|
217
218
|
Current v4 features include:
|
|
218
219
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
220
|
+
- Routing profile extraction
|
|
221
|
+
- Tool policy validation
|
|
222
|
+
- Mount-time registry validation
|
|
223
|
+
- Deterministic selection logic
|
|
224
|
+
- Pack manifests, analyzer identities, retrieval plans, receipts, and evidence spans
|
|
224
225
|
|
|
225
226
|
---
|
|
226
227
|
|
|
@@ -228,16 +229,16 @@ Current v4 features include:
|
|
|
228
229
|
|
|
229
230
|
KnoLo intentionally avoids:
|
|
230
231
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
232
|
+
- Vector databases
|
|
233
|
+
- Similarity search
|
|
234
|
+
- External inference APIs
|
|
234
235
|
|
|
235
236
|
This ensures:
|
|
236
237
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
238
|
+
- Reproducibility
|
|
239
|
+
- Security
|
|
240
|
+
- Low memory usage
|
|
241
|
+
- Predictable results
|
|
241
242
|
|
|
242
243
|
---
|
|
243
244
|
|
package/bin/knolo.mjs
CHANGED
|
@@ -115,7 +115,7 @@ function printCommandHelp(command) {
|
|
|
115
115
|
login: 'Usage: knolo login [--token kno_…] [--stdin] [--registry <url>]\n\nStores the raw token locally. Hub write calls send Authorization: Bearer kno_….\nMint tokens at https://hub.knolo.dev/dashboard/tokens; login does not call POST /api/v1/tokens.',
|
|
116
116
|
whoami: 'Usage: knolo whoami',
|
|
117
117
|
logout: 'Usage: knolo logout',
|
|
118
|
-
publish: 'Usage: knolo publish <pack.knolo> --slug <slug> --version <version> --license <SPDX> [--publisher <handle>] [--readme <text>] [--sources <text>] [--intended-use <text>] [--json] [--registry <url>]\n\nUses the stored token as Authorization: Bearer kno_….
|
|
118
|
+
publish: 'Usage: knolo publish <pack.knolo> --slug <slug> --version <version> --license <SPDX> [--publisher <handle>] [--readme <text>] [--sources <text>] [--intended-use <text>] [--json] [--registry <url>]\n\nUses the stored dashboard token as Authorization: Bearer kno_…. Hub issues a public Blob PUT grant; the CLI never needs PACKS_READ_WRITE_TOKEN.\nUploads go to the grant URL without the kno_ token. Complete sends the public Blob URL, then Hub verifies before release.',
|
|
119
119
|
yank: 'Usage: knolo yank <publisher>/<slug>@<version> [--json] [--registry <url>]\n\nUses the stored token as Authorization: Bearer kno_…. Yank is owner-only and leaves the public Blob in place.',
|
|
120
120
|
build: 'Usage: knolo build',
|
|
121
121
|
query: 'Usage: knolo query <question> [--pack <path>] [--k <number>] [--receipt <file>] [--json]',
|