FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: il CLI - install ontologies from the registry over WS by jsam · Pull Request #98 · inputlayer/inputlayer · GitHub

feat: il CLI - install ontologies from the registry over WS - #98

Merged
jsam merged 2 commits into
mainfrom
feat/il-registry-cli
Aug 19, 2026
Merged

feat: il CLI - install ontologies from the registry over WS#98
jsam merged 2 commits into
mainfrom
feat/il-registry-cli

Conversation

jsam commented Aug 19, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

What

First slice of the il product CLI. Ontologies live in a Helm-style registry (inputlayer/ontology-registry); il is the installer, and deployment rides the engine's existing WebSocket API. Zero server changes. il is the single CLI: everything is a subcommand, including migrations.

$ il search
ONTOLOGY                 LATEST    ENGINE     TITLE
consistency-core         1.0.0     >=0.1.0    Verified Completions

$ il install consistency-core --kg _conv_demo --create
consistency-core 1.0.0 - Verified Completions (sha256:bd55d9...)
deploying consistency-core@1.0.0 -> _conv_demo (107 statements, 1 atomic round trip) ...
ok consistency-core@1.0.0 -> _conv_demo (pinned in pack_meta)

$ il list --kg _conv_demo
KG             ONTOLOGY                 VERSION   DIGEST
_conv_demo     consistency-core         1.0.0     sha256:bd55d91a...

How

  • src/bin/il/registry.rs: index fetch, name[@version] resolution, sha256-verified download into ~/.inputlayer/ontologies/, tarball unpack, ontology.toml manifest read. A digest mismatch is a hard refusal: rule packs are trusted laws. Private registries authenticate via IL_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 migrate delegates to the Python SDK's inputlayer-migrate entry 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.
  • Deployment sends the whole pack as one atomic execute program (phase-1 parse rejects all-or-nothing), which also sidesteps the per-message WS rate limit that statement-by-statement .load hits.
  • install pins pack_meta(name, version, digest) in the target KG so findings are attributable to an exact verified rule set; list reads it back.

Tested

  • cargo build + cargo clippy --bin il clean; rustfmt and rustdoc clean.
  • Live end-to-end against a local server and the real registry: 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 ?conflict and ?finding_src.
  • il migrate delegation 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

  • New deps: tar, flate2, and clap's env feature.

jsam added 2 commits August 19, 2026 17:16
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.
jsam enabled auto-merge (squash) August 19, 2026 16:07
jsam disabled auto-merge August 19, 2026 16:08
jsam merged commit f798e2a into main Aug 19, 2026
11 checks passed
jsam deleted the feat/il-registry-cli branch August 19, 2026 16:08
jsam changed the title feat: il CLI — install ontologies from the registry over WS feat: il CLI - install ontologies from the registry over WS 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL