Skip to main content

Shared domain models for the Capacium ecosystem — Listing, TrustState, TrustMachine, and more

Project description

capacium-models

[!NOTE] Public mirror. The canonical repository is hosted on our self-hosted git. This GitHub copy is a read-only mirror kept in sync for visibility and installation. Bug reports are welcome via Issues; pull requests are applied upstream and synced back here.

Shared domain models for the Capacium ecosystem. Used by capacium-exchange and capacium-crawler.

Installation

pip install capacium-models

Models

Model Description
TrustState Enum: DISCOVERED → PENDING_REVIEW → VERIFIED → SIGNED → DEPRECATED
TrustMachine State machine with VALID_TRANSITIONS, can_transition(), transition()
Listing Full listing model (24 fields, auto-UUID, auto-timestamps)
Publisher Publisher profile with verification support
MCPClient Enum of supported MCP clients
MCPMetadata MCP-specific metadata (transport, runtime, auth_model, etc.)
Category / Subcategory / TagCount Taxonomy models
Collection Curated collection of listing IDs
ClaimRequest / VerificationRecord Trust workflow models
SearchQuery Faceted search query model (16 fields)
ExchangeSearch Faceted search SQL engine

The package-level TRUST_BADGES and get_trust_badge() exports retain the rich badge metadata introduced in v0.4.0. UI-facing canonical text labels, including the string-only trust labels, live in capacium_models.labels.

Usage

from capacium_models import Listing, TrustState, TrustMachine

# Create a discovered listing
listing = Listing(
    canonical_name="org/my-mcp-server",
    package_type="mcp-server",
    canonical_source_url="https://github.com/org/my-mcp-server",
    short_description="A cool MCP server",
    trust_state=TrustState.DISCOVERED,
)

# Transition through trust states
machine = TrustMachine()
if machine.can_transition(listing.trust_state, TrustState.PENDING_REVIEW):
    listing = machine.transition(
        listing,
        TrustState.PENDING_REVIEW,
        "Validated metadata",
    )

Dependencies

Zero runtime dependencies — stdlib only (dataclasses, enum, uuid, datetime, json, typing).

License

MIT

Development

Canonical repository: self-hosted Forgejogit.langevc.com/capacium/capacium-models (git clone git@git.langevc.com:capacium/capacium-models.git). Develop against the Forgejo clone and open pull requests there. The GitHub copy is a read-only mirror.

Project details


Download files

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

Source Distribution

capacium_models-0.5.0.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

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

capacium_models-0.5.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file capacium_models-0.5.0.tar.gz.

File metadata

  • Download URL: capacium_models-0.5.0.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for capacium_models-0.5.0.tar.gz
Algorithm Hash digest
SHA256 76b19c12d88edf1297304dc6f2a854fe18890982559044b8b8442850b42372f3
MD5 f068fb0922a14797233fd56021d2aa62
BLAKE2b-256 8c29fc94ff910d5ce841aca1e9d70baff15405fef6d66edd20d77986b7310c13

See more details on using hashes here.

Provenance

The following attestation bundles were made for capacium_models-0.5.0.tar.gz:

Publisher: publish.yml on Capacium/capacium-models

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

File details

Details for the file capacium_models-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: capacium_models-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for capacium_models-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd28e9f50e6e0b22259f4d614455a5bad995aea33d7f56856704d00afedf911c
MD5 c93627041352ab9038a933f74c1137d1
BLAKE2b-256 bc95fbeab9078eeab6a6e7b625182c964f2c9b3d27b7c24d4892a0027c3ac1e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for capacium_models-0.5.0-py3-none-any.whl:

Publisher: publish.yml on Capacium/capacium-models

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