feat: il CLI - install ontologies from the registry over WS - #98
Merged
Merged
Conversation
First slice of the il product CLI: the ontology-registry verbs. Ontologies live in a Helm-style registry (inputlayer/ontology-registry); il is the installer and deployment rides the existing WebSocket API. il search [term] browse the registry index il fetch <name>[@Version] download + sha256-verify into ~/.inputlayer/ontologies il install <name>[@ver] --kg X fetch, deploy as ONE atomic execute program, pin pack_meta(name, version, digest) in the KG il list --kg X show pinned installs via pack_meta Design decisions carried from the registry design doc: - Deployment is a single multi-statement execute message, so pack loads are atomic (phase-1 parse rejects the whole program) and immune to the per-message WS rate limit that statement-by-statement .load hits (#92). - A digest mismatch between index.json and the downloaded tarball is a hard refusal: rule packs are trusted laws, so integrity is not optional. - Private registries authenticate via IL_REGISTRY_TOKEN/GITHUB_TOKEN; GitHub release assets on private repos resolve through the API asset endpoint when the browser URL 404s. - pack_meta pinning makes every finding attributable to an exact, verified rule set and gives il list its data. Verified end-to-end against a local server: search/install/list against the live registry, then conflicting claims deriving a functional conflict with quoted spans through the installed pack. No server changes; new deps (tar, flate2, clap env feature) are confined to the client side of the crate.
This was referenced Aug 19, 2026
Merged
jsam
enabled auto-merge (squash)
August 19, 2026 16:07
jsam
disabled auto-merge
August 19, 2026 16:08
This was referenced Aug 19, 2026
jsam
added a commit
that referenced
this pull request
Aug 20, 2026
#98 branch) (#109) PR #98 was merged while its branch kept receiving work; these are the orphaned improvements, re-applied onto main as one change: - il migration generate/apply/revert/status: il owns the migration vocabulary (helm repo pattern); the delegation layer translates each verb to the Python tool's subcommand, so 'il migrate migrate' never exists. Leaf commands pass --help and flags through. Integration tests pin translation, passthrough, exit-code propagation, and the missing-tool hint (7 tests). - Review hardening (adversarial review findings): install scans deploy and pin results for the engine's soft errors ('Insert rejected', 'Failed to register schema', ...) and verifies the pack_meta pin with a read-back query; cache writes are staged and renamed with digest files, cache hits digest-checked (republished versions refetch); auth token only sent to GitHub hosts or the index host; registry names/versions charset-validated; HTTP timeout; unsolicited WS error frames skipped; scheme-less --server defaults to ws://; il list only reports 'no managed installs' for unknown-relation errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
First slice of the
ilproduct CLI. Ontologies live in a Helm-style registry (inputlayer/ontology-registry);ilis the installer, and deployment rides the engine's existing WebSocket API. Zero server changes.ilis the single CLI: everything is a subcommand, including migrations.How
src/bin/il/registry.rs: index fetch,name[@version]resolution, sha256-verified download into~/.inputlayer/ontologies/, tarball unpack,ontology.tomlmanifest read. A digest mismatch is a hard refusal: rule packs are trusted laws. Private registries authenticate viaIL_REGISTRY_TOKEN/GITHUB_TOKEN(private-repo release assets fall back to the GitHub API asset endpoint).src/bin/il/ws.rs: minimal WS client speaking the existing GlobalWs protocol (authenticate then execute), with streaming-result reassembly.src/bin/il/main.rs: clap surface:search/fetch/install/list/migrate.il migratedelegates to the Python SDK'sinputlayer-migrateentry point (args and exit code pass through; helpful install hint when absent). Companion PR feat!: migrations move under il migration; Python script becomes inputlayer-migrate #101 renames the Python console script accordingly. Cross-SDK migration generation (JS as well as Python) is tracked separately.executeprogram (phase-1 parse rejects all-or-nothing), which also sidesteps the per-message WS rate limit that statement-by-statement.loadhits.installpinspack_meta(name, version, digest)in the target KG so findings are attributable to an exact verified rule set;listreads it back.Tested
cargo build+cargo clippy --bin ilclean; rustfmt and rustdoc clean.search->install->list, then a smoke script inserting two conflicting departure-date claims: the installed pack derived the functional conflict with both quoted spans via?conflictand?finding_src.il migratedelegation smoke-tested (helpful error without the SDK; passthrough with it).Not in this PR
The gateway milestones (#83/#84) and
il verify/il demo; this PR is deliberately the smallest registry-consuming slice.Notes for review
tar,flate2, and clap'senvfeature.