Skip to main content

Module archetypes

Module archetypes 

Source
Expand description

Repository archetype detection and capability system

Archetypes provide internal capability detection for repositories. They detect what kind of content a repo contains and what features can be enabled for it.

§Design Philosophy

  • Archetypes are internal - not user-facing CLI concepts
  • Detection uses convention over configuration - no manifest files
  • Archetypes are composable - a repo can match multiple
  • Capabilities gate features - inference, query, training, etc.

§Capability Display Format

Capabilities are displayed as comma-separated IDs (e.g., infer,train,serve). Available capabilities:

  • infer = run model inference
  • train = modify model weights
  • query = SELECT from data
  • write = INSERT/UPDATE data
  • serve = expose via API
  • manage = admin operations
  • context = context-augmented generation

§Built-in Archetypes

ArchetypeDetectsCapabilities
HfModelconfig.json + *.safetensorsINFER, TRAIN, SERVE
HfDatasetdataset_infos.json, *.parquetQUERY, WRITE, SERVE
DuckDb*.duckdbQUERY, WRITE, SERVE
CagContextcontext.jsonCONTEXT

Re-exports§

pub use capabilities::Capability;
pub use capabilities::CapabilitySet;
pub use capabilities::Context;
pub use capabilities::Infer;
pub use capabilities::Manage;
pub use capabilities::Query;
pub use capabilities::Serve;
pub use capabilities::Train;
pub use capabilities::Write;
pub use domain::DetectionError;
pub use domain::DetectionResult;
pub use domain::Domain;
pub use domain::SimpleDomain;

Modules§

capabilities
Type-safe capability system
domain
Domain trait and detection result types

Structs§

ArchetypeRegistry
Registry for archetype detection with caching
CagContextArchetype
CAG Context archetype
DetectedArchetypes
Cached archetype detection result
DetectedDomains
Detected domains and their capabilities
DuckDbArchetype
DuckDB database archetype
HfDatasetArchetype
HuggingFace Dataset archetype
HfModelArchetype
HuggingFace Model archetype

Traits§

RepoArchetype
Trait for repository archetype detection

Functions§

builtin_archetypes
Get all built-in archetypes
global_registry
Get the global archetype registry