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
MISSION.md— the WHY. M-1 alignment per module; anti-patterns; failure modes; what mission risk looks like for each component.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.FSD/CIRIS_LENS_CORE.md— the WHAT. Crate shape, public API, per-trace lifecycle (scrub → route → score → sign), edge + persist integration boundaries.FSD/OPEN_QUESTIONS.md— the HOW. Decisions deferred to implementation kickoff.patterns_from_cirislens_core/— gifts. Working scrubber + extraction code lifted from CIRISLens's existingcirislens-coreRust crate. Proven NER+regex pipeline, per-field walker, ort/distilbert backends, JSONPath extraction. Lift intosrc/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 atFSD/TRACE_WIRE_FORMAT.md;deployment_profileblock (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 viaEngine.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 hostscirislens-core(the trace-ingest pipeline this crate's scrubber descends from). Will consumeciris-lens-corewhen implementation lands; eventually folds into agent per PoB §3.1.
License
AGPL-3.0, matching the rest of the CIRIS federation stack.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ciris_lens_core-0.1.1-cp311-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: ciris_lens_core-0.1.1-cp311-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.11+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29bf487e068e44368302973bd1d32d2a1aa97a4dec0fc4ed5015d28da3c560a3
|
|
| MD5 |
f560125d1532f02d858d4757055de59e
|
|
| BLAKE2b-256 |
65fe8fa1db010a04eebae55bcfe5404955e7a7135571374394d475de0976b334
|
Provenance
The following attestation bundles were made for ciris_lens_core-0.1.1-cp311-abi3-manylinux_2_34_x86_64.whl:
Publisher:
ci.yml on CIRISAI/CIRISLensCore
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ciris_lens_core-0.1.1-cp311-abi3-manylinux_2_34_x86_64.whl -
Subject digest:
29bf487e068e44368302973bd1d32d2a1aa97a4dec0fc4ed5015d28da3c560a3 - Sigstore transparency entry: 1528802670
- Sigstore integration time:
-
Permalink:
CIRISAI/CIRISLensCore@8b1c5624d9fde98e1043c3088a607b0a049eaa9d -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/CIRISAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@8b1c5624d9fde98e1043c3088a607b0a049eaa9d -
Trigger Event:
push
-
Statement type:
File details
Details for the file ciris_lens_core-0.1.1-cp311-abi3-manylinux_2_34_aarch64.whl.
File metadata
- Download URL: ciris_lens_core-0.1.1-cp311-abi3-manylinux_2_34_aarch64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.11+, manylinux: glibc 2.34+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f786d0b7678b58546594acf78bf51054830934eabd9c679d3d1525d0458e0abf
|
|
| MD5 |
c20ec45e06eef7b33021d22cae5eaef7
|
|
| BLAKE2b-256 |
6a7f0378e2f598b0045665f9b8da3d516178868cac4cdf629df1a01735f11439
|
Provenance
The following attestation bundles were made for ciris_lens_core-0.1.1-cp311-abi3-manylinux_2_34_aarch64.whl:
Publisher:
ci.yml on CIRISAI/CIRISLensCore
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ciris_lens_core-0.1.1-cp311-abi3-manylinux_2_34_aarch64.whl -
Subject digest:
f786d0b7678b58546594acf78bf51054830934eabd9c679d3d1525d0458e0abf - Sigstore transparency entry: 1528802574
- Sigstore integration time:
-
Permalink:
CIRISAI/CIRISLensCore@8b1c5624d9fde98e1043c3088a607b0a049eaa9d -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/CIRISAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@8b1c5624d9fde98e1043c3088a607b0a049eaa9d -
Trigger Event:
push
-
Statement type:
File details
Details for the file ciris_lens_core-0.1.1-cp311-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: ciris_lens_core-0.1.1-cp311-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 958.8 kB
- Tags: CPython 3.11+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b6d557e36186f574271a432df9fd1f9707785e9684d6cd6476eaf56263ebbe6
|
|
| MD5 |
95962451dd73fd79e98b2dd723e8467c
|
|
| BLAKE2b-256 |
79dd242e25faa1b8d32233687dd7a01784d83db011f2fd6197c98d9ac6b80acf
|
Provenance
The following attestation bundles were made for ciris_lens_core-0.1.1-cp311-abi3-macosx_11_0_arm64.whl:
Publisher:
ci.yml on CIRISAI/CIRISLensCore
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ciris_lens_core-0.1.1-cp311-abi3-macosx_11_0_arm64.whl -
Subject digest:
2b6d557e36186f574271a432df9fd1f9707785e9684d6cd6476eaf56263ebbe6 - Sigstore transparency entry: 1528802757
- Sigstore integration time:
-
Permalink:
CIRISAI/CIRISLensCore@8b1c5624d9fde98e1043c3088a607b0a049eaa9d -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/CIRISAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@8b1c5624d9fde98e1043c3088a607b0a049eaa9d -
Trigger Event:
push
-
Statement type: