@knolo/cli 6.2.10 → 6.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 +14 -5
- package/bin/knolo.mjs +121 -13
- package/bin/mount.mjs +508 -0
- package/bin/receipt.mjs +453 -0
- package/bin/registry/commands.mjs +110 -24
- package/bin/registry/lockfile.mjs +5 -2
- package/bin/registry/outdated.mjs +187 -0
- package/bin/setup.mjs +2 -1
- package/package.json +2 -2
- package/templates/icp-knowledge-canister/canisters/knolo-core-rust/src/lib.rs +170 -3
package/README.md
CHANGED
|
@@ -19,8 +19,8 @@ reader.
|
|
|
19
19
|
|
|
20
20
|
`knolo compose`, `knolo attest`, and `knolo verify-attestation` cite local
|
|
21
21
|
Knowledge Images and write an attestation sidecar. This tree's `@knolo/cli`
|
|
22
|
-
package file is `6.2.
|
|
23
|
-
`@knolo/exchange` `^0.1.1`. npm `latest` is `6.2.
|
|
22
|
+
package file is `6.2.11` and depends on `@knolo/core` `^6.2.3` and
|
|
23
|
+
`@knolo/exchange` `^0.1.1`. npm `latest` is `6.2.11`. `6.2.10` includes `knolo persona`, `knolo ask`, and `knolo compose`. `6.2.11` adds `knolo receipt export`, `knolo receipt verify`, `knolo receipt cite`, and `knolo outdated`. `6.2.9` includes `knolo ask` and `--category`. `@knolo/cli@6.2.8` has no `ask.mjs` and no `--category`. `knolo kite`, `knolo research verify`, and `knolo exchange relay` are in this
|
|
24
24
|
package and in `@knolo/cli@6.2.8`. `knolo kite` is not in published `@knolo/cli@6.2.5`. `knolo exchange` hands
|
|
25
25
|
a verified V5 image to another agent. Shipped configs keep `adopt: deny`.
|
|
26
26
|
Discover reads a public advertisement and does not download a pack. They do
|
|
@@ -51,8 +51,8 @@ a model. A receipt is an integrity check. It does not mean a claim is proven.
|
|
|
51
51
|
|
|
52
52
|
`knolo persona` builds a signed persona pack from style exemplars, a profile,
|
|
53
53
|
a disclosure line, and KITE boundary obligations. The creator signs the consent
|
|
54
|
-
manifest. The private key stays out of the image. `
|
|
55
|
-
|
|
54
|
+
manifest. The private key stays out of the image. `knolo persona` is in npm
|
|
55
|
+
`latest` `6.2.11`, and it has been since `6.2.10`. A receipt is an integrity check. A KITE verdict
|
|
56
56
|
describes the contract. It does not mean the claim is true. The host owns the
|
|
57
57
|
model. See [Persona packs](../../docs/guides/persona-packs.md).
|
|
58
58
|
|
|
@@ -189,6 +189,15 @@ Successful installs are cached by SHA-256 and recorded in
|
|
|
189
189
|
`knolo.lock.json`. A yanked version or an existing conflicting pin requires
|
|
190
190
|
`--force`; digest and artifact validation cannot be bypassed.
|
|
191
191
|
|
|
192
|
+
`knolo outdated` compares those pins with the registry and reports a newer
|
|
193
|
+
version. It uses the registry recorded in the lockfile. It does not download
|
|
194
|
+
bytes or change the lockfile.
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
knolo outdated
|
|
198
|
+
knolo outdated --json
|
|
199
|
+
```
|
|
200
|
+
|
|
192
201
|
## Skill packs
|
|
193
202
|
|
|
194
203
|
`knolo skill` is separate from the Hub commands above. `knolo publish` still
|
|
@@ -417,7 +426,7 @@ This ensures:
|
|
|
417
426
|
## 🗺 Roadmap
|
|
418
427
|
|
|
419
428
|
The active roadmap is maintained in [`../../docs/ROADMAP.md`](../../docs/ROADMAP.md).
|
|
420
|
-
The published npm release is `6.2.
|
|
429
|
+
The published npm release is `6.2.11`. This tree's package file is `6.2.11`. `6.2.10` includes `knolo persona`, `knolo ask`, and `knolo compose`. `6.2.11` adds `knolo receipt export`, `knolo receipt verify`, `knolo receipt cite`, and `knolo outdated`. `@knolo/cli@6.2.8` has no `ask.mjs` and no `--category`. `@knolo/cli@6.2.7` does not include `knolo research verify` or `knolo exchange relay`. `@knolo/cli@6.2.5` does not include `knolo kite`. The published release preserves the V4 CLI, keeps V5 verification,
|
|
421
430
|
migration, diagnostics, and read-only Studio management, and adds offline
|
|
422
431
|
composition, attestation, and `knolo cortex`. Cortex verification does not
|
|
423
432
|
mean an answer is true.
|
package/bin/knolo.mjs
CHANGED
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
runHubYank,
|
|
34
34
|
} from './registry/commands.mjs';
|
|
35
35
|
import { runHubAsk } from './registry/ask.mjs';
|
|
36
|
+
import { runHubOutdated } from './registry/outdated.mjs';
|
|
36
37
|
|
|
37
38
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
38
39
|
const require = createRequire(import.meta.url);
|
|
@@ -55,18 +56,21 @@ const SKIP_DIRS = new Set([
|
|
|
55
56
|
const SUBCOMMANDS = new Set([
|
|
56
57
|
'init',
|
|
57
58
|
'add',
|
|
59
|
+
'mount',
|
|
58
60
|
'build',
|
|
59
61
|
'query',
|
|
60
62
|
'inspect',
|
|
61
63
|
'migrate',
|
|
62
64
|
'verify',
|
|
63
65
|
'explain',
|
|
66
|
+
'receipt',
|
|
64
67
|
'diff',
|
|
65
68
|
'dev',
|
|
66
69
|
'v5',
|
|
67
70
|
'search',
|
|
68
71
|
'ask',
|
|
69
72
|
'info',
|
|
73
|
+
'outdated',
|
|
70
74
|
'login',
|
|
71
75
|
'whoami',
|
|
72
76
|
'logout',
|
|
@@ -106,6 +110,55 @@ function createError(message) {
|
|
|
106
110
|
return new Error(message);
|
|
107
111
|
}
|
|
108
112
|
|
|
113
|
+
const USAGE_EXIT_CODE = 2;
|
|
114
|
+
const TOP_LEVEL_COMMANDS = ['help', 'version', 'icp', ...SUBCOMMANDS];
|
|
115
|
+
|
|
116
|
+
function editDistance(a, b) {
|
|
117
|
+
let previous = Array.from({ length: b.length + 1 }, (_, j) => j);
|
|
118
|
+
for (let i = 1; i <= a.length; i += 1) {
|
|
119
|
+
const current = [i];
|
|
120
|
+
for (let j = 1; j <= b.length; j += 1) {
|
|
121
|
+
current[j] = Math.min(
|
|
122
|
+
previous[j] + 1,
|
|
123
|
+
current[j - 1] + 1,
|
|
124
|
+
previous[j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1)
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
previous = current;
|
|
128
|
+
}
|
|
129
|
+
return previous[b.length];
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function suggestCommand(word) {
|
|
133
|
+
const maxDistance = word.length <= 4 ? 1 : 2;
|
|
134
|
+
let best = null;
|
|
135
|
+
let bestDistance = Infinity;
|
|
136
|
+
for (const candidate of TOP_LEVEL_COMMANDS) {
|
|
137
|
+
const distance = editDistance(word.toLowerCase(), candidate);
|
|
138
|
+
if (distance < bestDistance) {
|
|
139
|
+
best = candidate;
|
|
140
|
+
bestDistance = distance;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return bestDistance <= maxDistance ? best : null;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// Direct mode treats the first argument as an input file. A bare word that is
|
|
147
|
+
// not a file is almost always a mistyped command, so report it as one instead
|
|
148
|
+
// of surfacing ENOENT. Arguments that look like paths keep the file error.
|
|
149
|
+
function unknownCommandError(word) {
|
|
150
|
+
if (/[\\/.]/.test(word)) return null;
|
|
151
|
+
if (existsSync(path.resolve(process.cwd(), word))) return null;
|
|
152
|
+
const suggestion = suggestCommand(word);
|
|
153
|
+
const error = createError(
|
|
154
|
+
suggestion
|
|
155
|
+
? `Unknown command "${word}". Did you mean "${suggestion}"?`
|
|
156
|
+
: `Unknown command "${word}". Run "knolo help" to list commands.`
|
|
157
|
+
);
|
|
158
|
+
error.exitCode = USAGE_EXIT_CODE;
|
|
159
|
+
return error;
|
|
160
|
+
}
|
|
161
|
+
|
|
109
162
|
async function tryImport(filePath) {
|
|
110
163
|
try {
|
|
111
164
|
if (
|
|
@@ -126,7 +179,7 @@ async function tryImport(filePath) {
|
|
|
126
179
|
function coreNamespaceReady(mod) {
|
|
127
180
|
return Boolean(
|
|
128
181
|
(mod?.buildPack && mod?.mountPack && mod?.query) ||
|
|
129
|
-
|
|
182
|
+
(mod?.default?.buildPack && mod?.default?.mountPack && mod?.default?.query)
|
|
130
183
|
);
|
|
131
184
|
}
|
|
132
185
|
|
|
@@ -148,10 +201,14 @@ async function loadCore() {
|
|
|
148
201
|
}
|
|
149
202
|
|
|
150
203
|
function printVersion() {
|
|
151
|
-
const cli = JSON.parse(
|
|
204
|
+
const cli = JSON.parse(
|
|
205
|
+
readFileSync(path.join(__dirname, '../package.json'), 'utf8')
|
|
206
|
+
);
|
|
152
207
|
let coreVersion = 'unavailable';
|
|
153
208
|
try {
|
|
154
|
-
coreVersion = JSON.parse(
|
|
209
|
+
coreVersion = JSON.parse(
|
|
210
|
+
readFileSync(require.resolve('@knolo/core/package.json'), 'utf8')
|
|
211
|
+
).version;
|
|
155
212
|
} catch {
|
|
156
213
|
coreVersion = 'unavailable';
|
|
157
214
|
}
|
|
@@ -169,9 +226,11 @@ Usage:
|
|
|
169
226
|
Commands:
|
|
170
227
|
init Initialize knolo.config.json and starter docs
|
|
171
228
|
add <name> <path> Add or update a local source entry, or install a Hub pack
|
|
229
|
+
mount Pin a shared image into knolo-mcp.json
|
|
172
230
|
search <query> Search the Knolo Hub registry
|
|
173
231
|
ask "<question>" Answer from Hub excerpts with your model
|
|
174
232
|
info <publisher>/<slug> Show a Hub registry pack
|
|
233
|
+
outdated Compare lockfile pins with the registry
|
|
175
234
|
login Store a Hub token locally
|
|
176
235
|
whoami Show the stored Hub token prefix
|
|
177
236
|
logout Remove the stored Hub token
|
|
@@ -183,12 +242,17 @@ Commands:
|
|
|
183
242
|
migrate <pack> Migrate a legacy pack to v4
|
|
184
243
|
verify <pack> Verify pack structure and cryptographic digests
|
|
185
244
|
explain <receipt> Verify and explain a query receipt
|
|
245
|
+
receipt Export, verify, or cite a portable receipt bundle
|
|
186
246
|
diff <pack-a> <pack-b> Compare pack identities and source/chunk counts
|
|
187
247
|
dev Watch config/sources and rebuild on change
|
|
248
|
+
semantic:index Build an embedding sidecar for a V4 pack via an Ollama endpoint
|
|
249
|
+
semantic:inspect Print a semantic sidecar summary
|
|
250
|
+
semantic:validate Check a semantic sidecar against its V4 pack and model
|
|
188
251
|
v5 Inspect, compress, decompress, and health-check a V5 Knowledge Image
|
|
189
252
|
kar KAR evidence-set retrieval over a Committed Evidence Graph
|
|
190
253
|
compose Compose Knowledge Images, packs, and attestations offline
|
|
191
254
|
attest Create or verify a composition attestation
|
|
255
|
+
verify-attestation Same check as "knolo attest verify"
|
|
192
256
|
cortex Bounded evidence retrieval with a verifiable trace
|
|
193
257
|
kite Check a typed contract and replay its certificate
|
|
194
258
|
flight Pack a flight-events-1 document into a V5 Knowledge Image
|
|
@@ -211,17 +275,20 @@ function printCommandHelp(command) {
|
|
|
211
275
|
const help = {
|
|
212
276
|
init: 'Usage: knolo init',
|
|
213
277
|
add: 'Usage: knolo add <name> <path> | <publisher>/<slug>[@<version>] [--out <path>] [--force] [--json] [--registry <url>]',
|
|
278
|
+
mount:
|
|
279
|
+
'Usage: knolo mount add <publisher/slug@version | sha256:hex> --config <knolo-mcp.json> --policy <policy.json> [--path <image>] [--id <id>] [--agent <id>] [--audit-dir <dir>]\n knolo mount list --config <knolo-mcp.json>\n knolo mount remove <id> --config <knolo-mcp.json>\n\nAdds one mount beside the mounts already in the config. A digest is read from --path or the local cache and does not contact a registry. A missing publisher/slug@version runs knolo add. Bytes that do not match the pin are not written. The principal is one the policy allows for query and read. A box image uses box:reader. The image is not rebuilt.',
|
|
214
280
|
search:
|
|
215
281
|
'Usage: knolo search <query> [--format V4|V5] [--license <id>] [--official] [--agents] [--research] [--json] [--registry <url>]',
|
|
216
|
-
ask:
|
|
217
|
-
'Usage: knolo ask "<question>" [--category <id>] [--all] [--model <name>] [--base-url <url>] [--limit <n>] [--evidence] [--hub <url>]\n\nPosts the question to Hub and sends the verified excerpts and skill instructions to an OpenAI-compatible chat endpoint. The default base URL is http://127.0.0.1:11434/v1 (Ollama). Set KNOLO_MODEL_BASE_URL and KNOLO_MODEL for another engine, including a cloud gateway such as https://api.x.ai/v1. KNOLO_MODEL_API_KEY is sent only to that endpoint.\nPass --category one or more times, or pass --all to search the entire hub. With neither, ask exits before the network call. --evidence prints skills first, then excerpts, and does not call a model. A plan limit does not call a model. --hub is the same registry override as --registry.',
|
|
282
|
+
ask: 'Usage: knolo ask "<question>" [--category <id>] [--all] [--model <name>] [--base-url <url>] [--limit <n>] [--evidence] [--hub <url>]\n\nPosts the question to Hub and sends the verified excerpts and skill instructions to an OpenAI-compatible chat endpoint. The default base URL is http://127.0.0.1:11434/v1 (Ollama). Set KNOLO_MODEL_BASE_URL and KNOLO_MODEL for another engine, including a cloud gateway such as https://api.x.ai/v1. KNOLO_MODEL_API_KEY is sent only to that endpoint.\nPass --category one or more times, or pass --all to search the entire hub. With neither, ask exits before the network call. --evidence prints skills first, then excerpts, and does not call a model. A plan limit does not call a model. --hub is the same registry override as --registry.',
|
|
218
283
|
info: 'Usage: knolo info <publisher>/<slug> [--json] [--registry <url>]',
|
|
284
|
+
outdated:
|
|
285
|
+
'Usage: knolo outdated [--json] [--registry <url>]\n\nCompares knolo.lock.json pins with the registry and reports newer versions. This contacts the registry. It does not download bytes, change knolo.lock.json, or install an update.',
|
|
219
286
|
login:
|
|
220
287
|
'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.',
|
|
221
288
|
whoami: 'Usage: knolo whoami',
|
|
222
289
|
logout: 'Usage: knolo logout',
|
|
223
290
|
publish:
|
|
224
|
-
'Usage: knolo publish <pack.knolo> --slug <slug> --version <version> --license <SPDX> [--publisher <handle>] [--readme <text>] [--sources <text>] [--intended-use <text>] [--category <id>] [--private] [--json] [--registry <url>]\n\
|
|
291
|
+
'Usage: knolo publish <pack.knolo> --slug <slug> --version <version> --license <SPDX> [--publisher <handle>] [--readme <text>] [--sources <text>] [--intended-use <text>] [--category <id>] [--private] [--allow-private] [--allow-findings] [--json] [--registry <url>]\n\nA V5 image is checked locally before the account request. A finding stops the publish unless --allow-findings is set. Memory and transcripts need --allow-private. The override is printed. Uses 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.\n--category is repeatable, from 1 to 3 of coding, math, science, news, business, security, writing, general. A new pack needs at least one. --private releases an owner-only pack on a Business or Enterprise plan. The success text omits the Blob URL.',
|
|
225
292
|
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.',
|
|
226
293
|
build: 'Usage: knolo build',
|
|
227
294
|
query:
|
|
@@ -231,17 +298,36 @@ function printCommandHelp(command) {
|
|
|
231
298
|
'Usage: knolo migrate <pack.knolo> --out <new-pack.knolo> [--to 4]',
|
|
232
299
|
verify: 'Usage: knolo verify <pack.knolo>',
|
|
233
300
|
explain: 'Usage: knolo explain <receipt.json> --pack <pack.knolo>',
|
|
301
|
+
receipt: `Usage: knolo receipt export <receipt-id> [--audit-dir <dir> | --config <knolo-mcp.json>] [--policy <policy.json>] [--out <file>] [--pack-ref <publisher/slug@version>] [--principal <id>] [--redact]
|
|
302
|
+
knolo receipt verify <bundle.json> --pack <image | publisher/slug@version>
|
|
303
|
+
knolo receipt cite <bundle.json> --pack <image | publisher/slug@version> [--out <file>]
|
|
304
|
+
|
|
305
|
+
Exports an openclaw-knolo-query-v1 or knolo-mcp-evidence-receipt-v1 record as a portable bundle.
|
|
306
|
+
The bundle carries the pack pin, the principal, and the policy JSON. The image stores only the policy root.
|
|
307
|
+
Verify checks the bundle against a local image file or a knolo.lock.json cache entry.
|
|
308
|
+
cite prints a knolo-verified-answer-v1 object after that check succeeds. The object names the bundle file hash and the pack pin. It does not cover an answer sentence.
|
|
309
|
+
A publisher/slug@version argument is not downloaded. Receipt verify does not contact a registry.
|
|
310
|
+
The image is not rebuilt.
|
|
311
|
+
A receipt is an integrity check. It does not mean a claim is proven. SATISFIED means evidence requirements were met. This object does not decide a claim.
|
|
312
|
+
--redact omits the caller and the record digest. The query text stays, because the plan is part of the proof. If the question is private, do not share the receipt.
|
|
313
|
+
Evidence verify checks the record digest and the image pins. It does not replay the tool, and it does not mean the outcome is true.
|
|
314
|
+
A failed cite prints nothing and writes nothing.
|
|
315
|
+
V4 receipt-v1 stays on knolo explain. This command does not add an MCP tool.`,
|
|
234
316
|
diff: 'Usage: knolo diff <pack-a.knolo> <pack-b.knolo>',
|
|
235
317
|
dev: 'Usage: knolo dev',
|
|
236
318
|
v5: 'Usage: knolo v5 <info|health|studio|query|compress|decompress> <image.v5> [--out <file>] [--mode fast|balanced|max] [--attach-index]\n\nFor query: knolo v5 query <image.v5> <EQL> [--json] [--receipt <file>].',
|
|
237
319
|
kar: 'Usage: knolo kar <evaluate|verify|explain|inspect|graph|package|produce|domain|dossier|coverage|benchmark|demo|conformance> [options]\n\nKnolo Adversarial Retrieval. Semantics are frozen at kar-1-research-1.\n\n knolo kar evaluate --image knowledge.knolo --graph knowledge.kar.json --plan plan.json --query "..."\n knolo kar verify --image knowledge.knolo --graph knowledge.kar.json --plan plan.json --query "..." --result result.json\n knolo kar explain --result result.json\n knolo kar inspect --image knowledge.knolo --graph knowledge.kar.json [--plan plan.json]\n knolo kar graph build --image knowledge.knolo --source knowledge.ceg.yaml --out knowledge.kar.json\n knolo kar package --image knowledge.knolo --graph knowledge.kar.json --out dist/my-knowledge-kar/\n knolo kar produce rules --image knowledge.knolo --domain domains/contracts-v4 --out proposals.json\n knolo kar domain validate domains/contracts-v4\n knolo kar dossier build --image knowledge.knolo --graph knowledge.kar.json --plan plan.json --query "..." --out dossier/\n knolo kar dossier verify dossier/\n knolo kar coverage build --image knowledge.knolo --graph knowledge.kar.json --plan plan.json --query "..." --out coverage/\n knolo kar coverage verify coverage/\n knolo kar benchmark annotate --packet packet.json --decisions decisions.json --out labels.json --role human --reviewer-id <id>\n knolo kar demo\n knolo kar conformance\n\n--json prints the machine-readable result. verify exits non-zero when the certificate does not match. Abstention is a result and exits 0. graph and package author a Committed Evidence Graph without changing retrieval. produce proposes CEG Source and does not write committed bytes. dossier packages one evaluation and fails closed when committed fields change. coverage reports met requirements, gaps, and plans that did not decide. A gap is not a false claim. benchmark labels gold without showing producer output. demo and conformance run from a knolo-core checkout.',
|
|
238
|
-
compose:
|
|
239
|
-
|
|
240
|
-
|
|
320
|
+
compose:
|
|
321
|
+
'Usage: knolo compose <create|verify|excerpt|query> [options]\n\nOffline composition of Knowledge Images, packs, KAR sidecars, Domain Packs, and bounded excerpts.\n\n knolo compose create --members members.json --out composition/ [--host knowledge.knolo] [--availability material|digest] [--policy policy.json]\n knolo compose verify composition/ [--require-material] [--member alias=path]\n knolo compose excerpt --image knowledge.knolo --object <id> --out excerpt.json\n knolo compose query --composition composition/ --eql "FROM chunk SEARCH \\"valve\\"" [--question "..."] [--json]\n\ncompositionRoot does not change a V5 state root or a KAR root. statement used means a query or evaluation ran. It does not mean SATISFIED, and it does not mean a claim is true or false. Hub attested: true is a listing flag and is not an attestation root. The CLI does not fetch Hub.',
|
|
322
|
+
attest:
|
|
323
|
+
'Usage: knolo attest <create|verify> [options]\n\n knolo attest create --composition composition/composition.json --subject composition --statement mount|used|cited --out attestation.json [--sign-key key.json --principal <id> --key-id <id> --issued-at <ms> --expires-at <ms>]\n knolo attest verify attestation.json [--composition composition.json] [--public-key key.json] [--now <ms>] [--content-only]\n\nstatement used means a query or KAR evaluation ran. It does not mean the claim is true or false. Hub attested: true is unrelated. Signing uses the supplied times. The CLI does not read the clock.',
|
|
324
|
+
cortex:
|
|
325
|
+
'Usage: knolo cortex <find|ask|explain|verify> [options]\n\nBounded evidence retrieval. The CLI does not call a model.\n\n knolo cortex find <image> --question "..." [--top-k 100] --out candidates.json\n knolo cortex ask <image> --question "..." [--graph file] [--plan plan.json] [--mode find_relevant] --out answer.cortex.json\n knolo cortex explain answer.cortex.json\n knolo cortex verify --image <image> --answer answer.cortex.json [--graph file]\n\nVerification recomputes the trace roots. It does not mean the answer is true. A KAR status of SATISFIED means evidence requirements were met. It does not mean a claim is proven.',
|
|
241
326
|
kite: 'Usage: knolo kite <evaluate|verify> [options]\n\n knolo kite evaluate --image <image.knolo> --contract <contract.json> --rules <rules.json> [--completeness <file>] [--changes <file>] [--bounds <file>] [--graph <file>] [--as-of YYYY-MM-DD] [--out <result.json>] [--json]\n knolo kite verify --image <image.knolo> --contract <contract.json> --rules <rules.json> --certificate <certificate.json> [--completeness <file>] [--changes <file>] [--bounds <file>] [--graph <file>] [--as-of YYYY-MM-DD]\n\nEvaluation names unmet obligations and derives a verdict inside the declared changes. Verification recomputes that derivation. A certificate is an integrity check. It does not mean the claim is true. BOUND_EXCEEDED means the search did not finish and is not a certificate. This command ships in this package. It loads @knolo/core/kite.',
|
|
242
327
|
research:
|
|
243
328
|
'Usage: knolo research package --question <text> --agent <id> --out <image.knolo> --source <file> [--source <file>] [--cite <image.knolo> --trace <answer.cortex.json> [--graph <file>]] [--json]\n\nPacks local files into one V5 Knowledge Image. --agent is the host-supplied caller. --cite and --trace are both required or both omitted. --graph is required when the trace contains KAR evaluations, and it is the same file knolo cortex verify would use. A trace is verified against --cite before any write. A failed check writes nothing. When --cite is set, the image stores a digest-bound composition record for that image and does not copy its bytes. When --graph is set, the checked graph is stored. The command does not call a model and does not download an image. A packed trace is an integrity check. It does not mean a claim is proven. SATISFIED means the trace evidence requirements were met.\n\nUsage: knolo research verify <image.knolo> [--cited <file>]... [--require-material] [--json]\n\nVerifies the image roots, then re-checks a stored composition record, Cortex trace, and KAR graph with the existing verifiers. --cited supplies member bytes in member order. Without those bytes, digest mode succeeds and says the cited bytes were not supplied. --require-material fails when a member has no bytes. The command does not call a model and does not download an image. A verified trace is an integrity check. It does not mean a claim is proven. SATISFIED means evidence requirements were met.',
|
|
244
|
-
flight:
|
|
329
|
+
flight:
|
|
330
|
+
'Usage: knolo flight <ingest|verify-log> [options]\n\n knolo flight ingest --events <events.json> --log <file> --out <image.knolo> [--json]\n knolo flight verify-log --image <image.knolo> --log <file> [--json]\n\ningest packs a flight-events-1 document into a V5 Knowledge Image. It hashes --log and writes nothing when the hash or byte length differs. verify-log hashes --log again and compares it with the flight-log object. It writes nothing. A missing flight-log object fails closed. Neither command decodes the log. log.format is ulog, dataflash, or rosbag2. A later KAR status of SATISFIED means evidence requirements were met. It does not mean a flight was safe, legal, or compliant.',
|
|
245
331
|
setup: `Usage: knolo setup [--registry <url>] [--root <dir>] [--agent <id>] [--auto-rebuild] [--reset] [--skills <path>] [--managed-skills <path>] [--memory <path>] [--transcripts <path>]
|
|
246
332
|
|
|
247
333
|
Resolves the hub the same way as the other hub commands.
|
|
@@ -313,7 +399,8 @@ A KITE verdict describes the contract. It does not mean the claim is true.
|
|
|
313
399
|
verify fails when a withdrawn source id is still in the image.
|
|
314
400
|
An opt-out rebuild drops that file and produces a new pin.
|
|
315
401
|
The example adapter is examples/persona-chat.`,
|
|
316
|
-
'verify-attestation':
|
|
402
|
+
'verify-attestation':
|
|
403
|
+
'Usage: knolo verify-attestation <attestation.json> [--composition composition.json] [--public-key key.json] [--keyring keyring.json] [--now <ms>] [--content-only]\n\nSame check as knolo attest verify. A bad signature exits 1 even when the content root matches. --content-only checks the content root and ignores the envelope. statement used is not a truth verdict. Hub attested: true is unrelated.',
|
|
317
404
|
icp: 'Usage: knolo icp <command> [options]',
|
|
318
405
|
'semantic:index':
|
|
319
406
|
'Usage: knolo semantic:index --pack <path> [--out <path>] [--model <id>] [--endpoint <url>]',
|
|
@@ -1963,7 +2050,11 @@ async function main() {
|
|
|
1963
2050
|
const { runKarCli } = await import('./kar.mjs');
|
|
1964
2051
|
return await runKarCli(commandArgs);
|
|
1965
2052
|
}
|
|
1966
|
-
if (
|
|
2053
|
+
if (
|
|
2054
|
+
command === 'compose' ||
|
|
2055
|
+
command === 'attest' ||
|
|
2056
|
+
command === 'verify-attestation'
|
|
2057
|
+
) {
|
|
1967
2058
|
const { runComposeCli } = await import('./compose.mjs');
|
|
1968
2059
|
return await runComposeCli(command, commandArgs);
|
|
1969
2060
|
}
|
|
@@ -2001,6 +2092,16 @@ async function main() {
|
|
|
2001
2092
|
}
|
|
2002
2093
|
if (command === 'init') return await cmdInit();
|
|
2003
2094
|
if (command === 'add') return await cmdAdd(commandArgs);
|
|
2095
|
+
if (command === 'mount') {
|
|
2096
|
+
const core = await loadCore();
|
|
2097
|
+
const { runMountCli } = await import('./mount.mjs');
|
|
2098
|
+
return await runMountCli(commandArgs, { core });
|
|
2099
|
+
}
|
|
2100
|
+
if (command === 'receipt') {
|
|
2101
|
+
const core = await loadCore();
|
|
2102
|
+
const { runReceiptCli } = await import('./receipt.mjs');
|
|
2103
|
+
return await runReceiptCli(commandArgs, { core });
|
|
2104
|
+
}
|
|
2004
2105
|
if (command === 'search') return await runHubSearch(commandArgs);
|
|
2005
2106
|
if (command === 'ask') {
|
|
2006
2107
|
const result = await runHubAsk(commandArgs);
|
|
@@ -2008,6 +2109,11 @@ async function main() {
|
|
|
2008
2109
|
return;
|
|
2009
2110
|
}
|
|
2010
2111
|
if (command === 'info') return await runHubInfo(commandArgs);
|
|
2112
|
+
if (command === 'outdated') {
|
|
2113
|
+
const result = await runHubOutdated(commandArgs);
|
|
2114
|
+
if (result.exitCode) process.exit(result.exitCode);
|
|
2115
|
+
return;
|
|
2116
|
+
}
|
|
2011
2117
|
if (command === 'login') return await runHubLogin(commandArgs);
|
|
2012
2118
|
if (command === 'whoami') return await runHubWhoami(commandArgs);
|
|
2013
2119
|
if (command === 'logout') return await runHubLogout(commandArgs);
|
|
@@ -2034,6 +2140,8 @@ async function main() {
|
|
|
2034
2140
|
|
|
2035
2141
|
if (command.startsWith('-'))
|
|
2036
2142
|
throw createError(`Unknown option: ${command}`);
|
|
2143
|
+
const unknownCommand = unknownCommandError(command);
|
|
2144
|
+
if (unknownCommand) throw unknownCommand;
|
|
2037
2145
|
const core = await loadCore();
|
|
2038
2146
|
return await runDirectMode(core, command, commandArgs);
|
|
2039
2147
|
} catch (error) {
|
|
@@ -2042,7 +2150,7 @@ async function main() {
|
|
|
2042
2150
|
);
|
|
2043
2151
|
if (global.debug && error instanceof Error && error.stack)
|
|
2044
2152
|
console.error(error.stack);
|
|
2045
|
-
process.exit(1);
|
|
2153
|
+
process.exit(error?.exitCode ?? 1);
|
|
2046
2154
|
}
|
|
2047
2155
|
}
|
|
2048
2156
|
|