Module: Swt3Ai

Defined in:
lib/swt3_ai.rb,
lib/swt3_ai/types.rb,
lib/swt3_ai/signing.rb,
lib/swt3_ai/fingerprint.rb

Defined Under Namespace

Modules: Fingerprint, Signing Classes: WitnessConfig, WitnessPayload, WitnessReceipt

Constant Summary collapse

VERSION =
"0.5.6"
SIGNING_ALGORITHMS =

Valid signing algorithms.

%w[hmac-sha256 ml-dsa-65].freeze
REVOCATION_REASONS =

Revocation reason codes for AI-REV.1 anchors.

{
  "unspecified" => 0,
  "model_recall" => 1,
  "policy_violation" => 2,
  "data_contamination" => 3,
  "consent_withdrawal" => 4,
  "regulatory_order" => 5,
  "error_correction" => 6,
}.freeze
TRUST_DENIED =

Trust levels for agent-to-agent Trust Mesh verification (AI-TRUST.1).

0
TRUST_BASIC =
1
TRUST_VERIFIED =
2
TRUST_ATTESTED =
3
TRUST_SOVEREIGN =
4
TRUST_LEVEL_NAMES =
{
  0 => "denied",
  1 => "basic",
  2 => "verified",
  3 => "attested",
  4 => "sovereign",
}.freeze
DENIAL_REASONS =

Denial reason codes for Trust Mesh verification.

{
  anchor_not_found: "anchor_not_found",
  anchor_expired: "anchor_expired",
  anchor_revoked: "anchor_revoked",
  signature_missing: "signature_missing",
  tenant_not_trusted: "tenant_not_trusted",
  deny_listed: "deny_listed",
  insufficient_procedures: "insufficient_procedures",
  signature_invalid: "signature_invalid",
  signature_unverifiable: "signature_unverifiable",
  insufficient_trust_level: "insufficient_trust_level",
  timestamp_future: "timestamp_future",
  rate_limited: "rate_limited",
}.freeze
KEY_PURPOSES =

Key purpose for key attestation (AI-TRUST.3).

%w[signing encryption delegation].freeze
LIFECYCLE_STAGES =

AI model lifecycle stages (NIST AI RMF MAP 1.3).

%w[design development testing deployment monitoring decommission].freeze
METAGOV_SCOPES =

METAGOV governance domain scope codes (AI-METAGOV.5).

%w[verdict_rules trust_mesh enforcement clearing full].freeze
METAGOV_PERMISSIONS =

METAGOV permission level codes (AI-METAGOV.5).

%w[read modify approve].freeze
METAGOV_OVERRIDE_REASONS =

METAGOV emergency override reason codes (AI-METAGOV.6).

%w[unspecified incident_response regulatory_deadline system_failure security_breach].freeze
METAGOV_REVIEW_STATUSES =

METAGOV review status codes (AI-METAGOV.6).

%w[unreviewed attested revoked].freeze
METAGOV_DIVERGENCE_TYPES =

METAGOV governance divergence codes (AI-METAGOV.7).

%w[equivalent version_divergent structural_divergent coverage_divergent].freeze
METAGOV_PURITY_TIERS =

METAGOV attestation purity tiers (AI-METAGOV.8).

%w[verified_pure unverified_purity impure].freeze