Skip to main content

Science-layer runtime for the CIRIS federation: cohort routing, manifold-conformity scoring, signed detection events

Project description

ciris-lens-core

The science-layer Rust crate for the CIRIS federation. Routes traces to cohorts, scores conformity to the alignment manifold, signs detection events. Folds into the agent post-PoB §3.1.

Status: Proposed. Spec + threat model + lifted patterns from existing cirislens-core are in this repo; v0.1.0 implementation work to come.

Read in this order

  1. MISSION.md — the WHY. M-1 alignment per module; anti-patterns; failure modes; what mission risk looks like for each component.
  2. docs/THREAT_MODEL.md — the security surface. 21 LC-AVs covering score-gaming, manifold-evasion, cohort-routing, detector-attacks, statistical-attacks, federation- level. P0 must-have-at-v0.1.0 bundle: LC-AV-2, LC-AV-11, LC-AV-18.
  3. FSD/CIRIS_LENS_CORE.md — the WHAT. Crate shape, public API, per-trace lifecycle (scrub → route → score → sign), edge + persist integration boundaries.
  4. FSD/OPEN_QUESTIONS.md — the HOW. Decisions deferred to implementation kickoff.
  5. patterns_from_cirislens_core/ — gifts. Working scrubber + extraction code lifted from CIRISLens's existing cirislens-core Rust crate. Proven NER+regex pipeline, per-field walker, ort/distilbert backends, JSONPath extraction. Lift into src/scrub/ + src/extract/ when implementation starts; refactor as needed.

TL;DR

Edge ──(verified bytes)──► CIRISLensCore ──(signed events)──► Persist
                              │
                              ├── scrub        PII pipeline (NER + regex)
                              ├── cohort       declared + inferred routing
                              ├── detector     5 ratchet detectors + manifold
                              ├── scoring      capacity + N_eff + conformity
                              ├── pipeline     orchestrate the per-trace flow
                              └── signing      via persist.steward_sign

One crate, one trace lifecycle. Scrub + score + sign are sequential stages of the same per-trace pipeline; splitting them artificially is the mistake that motivated this repo.

Consumes Edge + Persist day-1. Verify is implicit (Edge guarantees verified bytes before lens-core sees them; lens-core does not re-verify). Storage is implicit (persist owns trace_events, trace_llm_calls, federation_keys; lens-core writes detection events via Engine.steward_sign + Engine.put_*).

Folds into agent. Per PoB §3.1, lens-core is "a function any peer can run on data the peer already has." Library, not service. Every agent runs detection on its own hot path; federation cross-validates.

Sister repos

  • CIRISAgent — agent reasoning loop. Emits signed traces. Wire-format spec at FSD/TRACE_WIRE_FORMAT.md; deployment_profile block (CIRISAgent#718) is the declared-cohort input lens-core's routing layer reads.
  • CIRISPersist — substrate. Owns federation_keys, trace storage, canonicalization, steward signing, federation directory. Lens-core consumes via Engine.
  • CIRISEdge — federation transport. Owns wire-side verify; lens-core never sees unverified bytes.
  • CIRISVerify — cryptographic primitives. Lens-core depends transitively via persist.
  • CIRISLens — the existing deployed-product Python layer. Currently hosts cirislens-core (the trace-ingest pipeline this crate's scrubber descends from). Will consume ciris-lens-core when implementation lands; eventually folds into agent per PoB §3.1.

License

AGPL-3.0, matching the rest of the CIRIS federation stack.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ciris_lens_core-1.4.0-cp310-abi3-win_amd64.whl (15.8 MB view details)

Uploaded CPython 3.10+Windows x86-64

ciris_lens_core-1.4.0-cp310-abi3-manylinux_2_39_x86_64.whl (17.5 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.39+ x86-64

ciris_lens_core-1.4.0-cp310-abi3-manylinux_2_39_aarch64.whl (16.3 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.39+ ARM64

ciris_lens_core-1.4.0-cp310-abi3-macosx_11_0_arm64.whl (12.9 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

File details

Details for the file ciris_lens_core-1.4.0-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for ciris_lens_core-1.4.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a15154626d20ead7c717be766ab1eecf52ae51617ca6e3d022d576b649270c8d
MD5 c87e2a279544c1104c2d1fef9a66a71f
BLAKE2b-256 a3a57b9f9ad99a42f51715cf4905cfb4ffe87ed632bef168c8ef8a0cec550f62

See more details on using hashes here.

Provenance

The following attestation bundles were made for ciris_lens_core-1.4.0-cp310-abi3-win_amd64.whl:

Publisher: ci.yml on CIRISAI/CIRISLensCore

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ciris_lens_core-1.4.0-cp310-abi3-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for ciris_lens_core-1.4.0-cp310-abi3-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 ccbff6ca70d5dc91e1e298cf6be3e19ea2c129f89855bc25366f4838c101d2a3
MD5 ec8ae61c11640c0f69b70e650f4e2fdb
BLAKE2b-256 7c69f5598e2e1c6bb439bc833ac2125e807f1460165b4beb26b522dedb86de65

See more details on using hashes here.

Provenance

The following attestation bundles were made for ciris_lens_core-1.4.0-cp310-abi3-manylinux_2_39_x86_64.whl:

Publisher: ci.yml on CIRISAI/CIRISLensCore

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ciris_lens_core-1.4.0-cp310-abi3-manylinux_2_39_aarch64.whl.

File metadata

File hashes

Hashes for ciris_lens_core-1.4.0-cp310-abi3-manylinux_2_39_aarch64.whl
Algorithm Hash digest
SHA256 30a48eb49f1abcacfa3f030a0ab1f2cc10fbc4ba83d895ffe2d4289cbcebf7f8
MD5 5065a7fd1dbf7442950877f5ce6b6781
BLAKE2b-256 a3d09e4fb1bbb6aa6c2dd5a660db1ee5aee606b7d60237cd32b2446c40798cea

See more details on using hashes here.

Provenance

The following attestation bundles were made for ciris_lens_core-1.4.0-cp310-abi3-manylinux_2_39_aarch64.whl:

Publisher: ci.yml on CIRISAI/CIRISLensCore

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ciris_lens_core-1.4.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ciris_lens_core-1.4.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 322fe96104639ae6c73e930915d8205ff5b86369437552de508242539f18a87e
MD5 54b40268a816a3a526268d38161c08af
BLAKE2b-256 d39484bfaaaef491dab7b31c13747a42eeab34a1875dfdc8587642c3aa7de46f

See more details on using hashes here.

Provenance

The following attestation bundles were made for ciris_lens_core-1.4.0-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: ci.yml on CIRISAI/CIRISLensCore

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page