Metadata-Version: 2.4
Name: scpn-studio-platform
Version: 0.11.2
Summary: Domain-neutral SDK for the SCPN Studio ecosystem — provenance-first evidence bundles, capability manifests, bounded jobs, and tenant-aware identity.
Author-email: Miroslav Šotek <protoscience@anulum.li>
License: AGPL-3.0-or-later
Project-URL: Homepage, https://www.anulum.li
Project-URL: Repository, https://github.com/anulum/scpn-studio-platform
Keywords: scpn,studio,provenance,evidence,prov-o,ro-crate,in-toto
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography>=41.0
Provides-Extra: pqc
Requires-Dist: liboqs-python<0.16,>=0.15; extra == "pqc"
Provides-Extra: dev
Requires-Dist: bandit>=1.7; extra == "dev"
Dynamic: license-file

<!-- SPDX-License-Identifier: AGPL-3.0-or-later -->
<!-- Commercial license available -->
<!-- © Concepts 1996–2026 Miroslav Šotek. All rights reserved. -->
<!-- © Code 2020–2026 Miroslav Šotek. All rights reserved. -->
<!-- ORCID: 0009-0009-3560-0851 -->
<!-- Contact: www.anulum.li | protoscience@anulum.li -->

# SCPN Studio Platform

The domain-neutral SDK at the foundation of the **SCPN Studio** ecosystem: a
federation of standalone scientific studios (neuromorphic, fusion, control,
quantum, magneto-inertial, phase dynamics) that share one platform, one evidence
standard, and one look, composed by a federating Hub shell.

This package is the **open-core foundation**. Each project builds its studio
vertical on it; the managed multi-tenant Hub is the separate paid layer.

## What makes it a category by itself

Provenance-first, as a product surface rather than only an engineering practice.
Every number a studio surfaces is an evidence bundle that:

- is a **PROV-O** graph, packaged as an **RO-Crate** profile (interoperable with
  the scientific data ecosystem, not a proprietary blob);
- carries an empirical evidence level (0–3) **and** an orthogonal `evidence_kind`
  — `measured`, `curated`, or `formally-proven` — so a machine-checked proof is
  never rendered as if it were a measurement;
- is signed as an **in-toto** attestation, with a `subject_digest` so a proof is
  voided the moment its subject drifts;
- declares its **claim boundary** on a nine-state lattice (reference-validated,
  bounded-model, bounded-support, validation-gap, external-dependency-blocked,
  roadmap, toolchain-gated, refuted, voided-by-upstream-retraction) — the Hub
  never upgrades a bounded, roadmap, refuted, or cascade-voided number to
  "validated";
- records how to **reproduce** it (`regenerated_by` + host), not just attest it;
- chains cross-studio derivation by **content digest**, so the provenance graph
  survives coordination-log rotation.

## Package surface

| Subpackage | Responsibility |
|------------|----------------|
| `evidence` | The `studio.*.v1` evidence bundle, attestation, and claim-boundary lattice. |
| `manifest` | Content-addressed, language-agnostic, deterministic capability manifest. |
| `verbs`    | Verb taxonomy + per-verb attribute contract (safety tier, fidelity, timing, side-effect, proof). |
| `identity` | Tenant-aware opaque identity + sessions, shared by both transport profiles. |
| `jobs`     | Bounded, fail-closed job/pipeline workers + the real-time timing contract. |

## Functional pipeline contract

Each `Verb` can now declare `consumes` symmetrically with `produces`. A `consumes`
entry means a hard runtime dependency on an upstream `studio.*.v1` schema or
interface identifier; soft/demo couplings stay out of this field and remain
ordinary provenance or optional inputs. `manifest.resolve_pipeline()` turns the
visible manifest set into content-addressed pipeline edges, surfaces
`unresolved_upstreams`, and reports incompatible-era matches as hard resolution
conflicts.

## Recovered dynamics provenance

Recovered latent-dynamics claims carry an explicit
`numeric_provenance.recovered_dynamics` envelope. It records the recovery method,
latent and observed dimensions, independent view count, observation-noise model,
identifiability scope, symbolic function basis, optional rollout horizon, and
held-out trajectory/dynamics scores. DYSCO-style claims are therefore bounded as
recoveries within an affine gauge and a declared basis, never as direct access to
the original latent coordinates.

## Cascade retraction contract

`evidence.RetractionRecord` carries the signed `studio.retraction.v1` unit used
when an upstream claim must be withdrawn. The policy is stale-safe by default:
`cascade_retraction()` walks content-addressed `derived_from` evidence edges and
marks every downstream consumer as `voided-by-upstream-retraction`. A
`supersedes_with` digest records a replacement candidate but never auto-heals
existing consumers; downstream studios must re-derive against the replacement and
emit a new evidence bundle.

## Verifiable numeric references

The `seal` package signs WS-1 honesty envelopes and now carries the committed
reference values required by tolerance and stochastic recompute claims. Small
reference series are embedded as canonical little-endian `float64` bytes under
`reference_value.storage = "inline"` with a `sha256:` digest over those bytes.
Large arrays use `reference_value.storage = "artifact"` and sign a side-artifact
descriptor containing `artifact_uri`, media type
`application/vnd.anulum.float64-array.v1`, `dtype = "float64"`,
`byte_order = "little"`, `shape`, `content_length`, and
`canonical_value_digest`.

Verifiers validate the signed descriptor before comparing numeric outputs. Inline
payloads must fit within 16 KiB and their digest must match the embedded bytes;
side artifacts are fetched by the reproducer/verifier chain and compared against
the signed digest before any tolerance check is trusted.

## Status

Early development. The v1 contract is locked; the platform is being extracted
from the reference SNN Studio implementation and hardened to the contract.

## Licence

Dual-licensed under the GNU AGPL v3 with a commercial option. For commercial
licensing enquiries, contact [protoscience@anulum.li](mailto:protoscience@anulum.li).
