Expand description
§vcp-core
Core types and parsing for the Value Context Protocol (VCP).
VCP is a protocol for expressing and transmitting human values, context, and personal state between Becoming Minds so they can adapt their behaviour accordingly.
§Modules
| Module | Purpose |
|---|---|
identity | VCP/I token parsing (family.safe.guide@1.2.0) |
csm1 | CSM-1 compact codes and 8-line tokens |
personal | Personal state dimensions (cognitive, emotional, …) |
situational | Situational context (time, space, company, …) |
context | Full context wire format (situational + personal) |
transport | Content hashing, canonicalization, signing, bundle verification |
trust | Trust anchor management for issuers and auditors |
hooks | Hook system for the adaptation pipeline (6 hook types) |
revocation | Bundle revocation checking with SSRF protection |
error | Error types and verification codes |
§Quick Start
use vcp_core::identity::VcpToken;
use vcp_core::csm1::{Csm1Code, Persona};
use vcp_core::context::FullContext;
use vcp_core::transport::compute_content_hash;
// Parse a VCP identity token.
let token = VcpToken::parse("family.safe.guide@1.2.0").unwrap();
assert_eq!(token.domain(), "family");
// Parse a CSM-1 compact code.
let code = Csm1Code::parse("N5+F+E").unwrap();
assert_eq!(code.persona, Persona::Nanny);
assert_eq!(code.encode(), "N5+E+F");
// Hash constitution content.
let hash = compute_content_hash("Be kind to everyone.").unwrap();
assert!(hash.starts_with("sha256:"));Re-exports§
pub use context::ConformanceLevel;pub use context::FullContext;pub use csm1::Csm1Code;pub use csm1::Csm1Token;pub use csm1::Persona;pub use csm1::Scope;pub use error::VcpError;pub use error::VcpResult;pub use hooks::ChainResult;pub use hooks::Hook;pub use hooks::HookAction;pub use hooks::HookExecutor;pub use hooks::HookHandler;pub use hooks::HookInput;pub use hooks::HookRegistry;pub use hooks::HookResult;pub use hooks::HookScope;pub use hooks::HookType;pub use identity::VcpToken;pub use personal::PersonalDimension;pub use personal::PersonalState;pub use revocation::Crl;pub use revocation::CrlEntry;pub use revocation::ReqwestRevocationTransport;pub use revocation::RevocationChecker;pub use revocation::RevocationDecision;pub use revocation::RevocationStatus;pub use revocation::RevocationTransport;pub use situational::SituationalContext;pub use situational::SituationalDimension;pub use transport::compute_content_hash;pub use transport::sign_manifest;pub use transport::verify_content_hash;pub use transport::verify_manifest_signature;pub use trust::TrustAnchor;pub use trust::TrustConfig;pub use composer::Composer;pub use composer::CompositionMode;pub use composer::CompositionResult;pub use composer::Conflict;pub use composer::Constitution;pub use orchestrator::Orchestrator;pub use orchestrator::ReplayCache;pub use orchestrator::VerificationContext;pub use types::AdoptionStatus;pub use types::EnforcementMode;pub use types::TestimonyType;pub use types::TokenType;
Modules§
- agent
- Agent-intuitive contracts and a no-network observe reference facade.
- composer
- VCP/S Constitution Composition Engine.
- context
- Context wire format: combined situational + personal encoding (VCP v3.2).
- csm1
- CSM-1 (Constitutional Safety Minicode) parsing and encoding.
- error
- VCP error types.
- extensions
- hooks
- VCP Hook System for the adaptation pipeline.
- identity
- VCP/I Token parsing and validation.
- negotiation
- VCP negotiation — hello/ack handshake for capability exchange.
- orchestrator
- VCP Orchestrator – 12-step bundle verification pipeline.
- personal
- Personal state dimensions (VCP v3.1 Layer 3).
- revocation
- Revocation checking for VCP bundles.
- situational
- Situational context dimensions (VCP v3.2 Layer 2).
- transport
- Bundle transport: content hashing, canonicalization, and signature verification.
- trust
- Trust anchor management for VCP issuers and auditors.
- types
- VCP v2.0 extended type definitions.