swt3-ai 0.5.3 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/swt3_ai/types.rb +39 -3
  3. data/lib/swt3_ai.rb +1 -1
  4. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d56f1a44680222d2a64430fb8834ce10037d8654e44a73530769e2aeac79029a
4
- data.tar.gz: a6ea747ef445fb78733fa5e76d244f5adb6e72b7020bd8881a90ed6f516c2a66
3
+ metadata.gz: 6d0ad95b855731be59484f16727a59a6fd09f54196bce2805a3124f735a40125
4
+ data.tar.gz: a9df82a856f95023cffa81cd5e6ac9e520d6089b6eb5b4e00155b05d8107977d
5
5
  SHA512:
6
- metadata.gz: d5f10ceee9f71eff463eec8a220566e76eefb7c7066f2f2afab240609caf283152ab57e4a51a5d0910bc6c6c6d96b949f5c55adc6a62500aa7369205a11ec78e
7
- data.tar.gz: bba8c788d97a0f9c207fbba8c6099ffab21226515cdc3d4279be4ca6db7d7cf9b4d0cd356e1b00d54155049f9e6d1ef2e1fdd1d78696682708ac8d5615b0c590
6
+ metadata.gz: 44bb0ab012423a3cc6412fa110f857127329a62c7fc65a666a9c70347bb9475239801890db9366d1b16939260988ba81e6b1665f49799b235fb3ef59653fdb49
7
+ data.tar.gz: 7e3d4ae198b5f38a8c90c840cb69d87d7622676d93ce3cf412690c86e252e899ed18333e176b42f0da467666528d00181cb43c290f7e0401c175036448b6c33b
data/lib/swt3_ai/types.rb CHANGED
@@ -6,7 +6,7 @@ module Swt3Ai
6
6
  :fingerprint_timestamp_ms, :ai_model_id, :ai_prompt_hash,
7
7
  :ai_response_hash, :ai_latency_ms, :ai_input_tokens,
8
8
  :ai_output_tokens, :agent_id, :cycle_id,
9
- :payload_signature, :signing_key_id, :signing_key_version,
9
+ :payload_signature, :signing_algorithm, :signing_key_id, :signing_key_version,
10
10
  :policy_version_hash, :jurisdiction, :legal_basis,
11
11
  :purpose_class, :authorization_id,
12
12
  :revocation_target, :revocation_reason,
@@ -24,12 +24,15 @@ module Swt3Ai
24
24
  WitnessConfig = Struct.new(
25
25
  :endpoint, :api_key, :tenant_id, :clearing_level,
26
26
  :buffer_size, :flush_interval, :timeout, :max_retries,
27
- :agent_id, :signing_key, :signing_key_id, :signing_key_version,
27
+ :agent_id, :signing_key, :signing_algorithm, :signing_key_id, :signing_key_version,
28
28
  :cycle_id, :policy_version,
29
29
  :jurisdiction, :legal_basis, :purpose_class,
30
30
  keyword_init: true
31
31
  )
32
32
 
33
+ # Valid signing algorithms.
34
+ SIGNING_ALGORITHMS = %w[hmac-sha256 ml-dsa-65].freeze
35
+
33
36
  # Revocation reason codes for AI-REV.1 anchors.
34
37
  REVOCATION_REASONS = {
35
38
  "unspecified" => 0,
@@ -40,4 +43,37 @@ module Swt3Ai
40
43
  "regulatory_order" => 5,
41
44
  "error_correction" => 6,
42
45
  }.freeze
43
- end
46
+
47
+ # Trust levels for agent-to-agent Trust Mesh verification (AI-TRUST.1).
48
+ TRUST_DENIED = 0
49
+ TRUST_BASIC = 1
50
+ TRUST_VERIFIED = 2
51
+ TRUST_ATTESTED = 3
52
+ TRUST_SOVEREIGN = 4
53
+
54
+ TRUST_LEVEL_NAMES = {
55
+ 0 => "denied",
56
+ 1 => "basic",
57
+ 2 => "verified",
58
+ 3 => "attested",
59
+ 4 => "sovereign",
60
+ }.freeze
61
+
62
+ # Denial reason codes for Trust Mesh verification.
63
+ DENIAL_REASONS = {
64
+ anchor_not_found: "anchor_not_found",
65
+ anchor_expired: "anchor_expired",
66
+ anchor_revoked: "anchor_revoked",
67
+ signature_missing: "signature_missing",
68
+ tenant_not_trusted: "tenant_not_trusted",
69
+ deny_listed: "deny_listed",
70
+ insufficient_procedures: "insufficient_procedures",
71
+ signature_invalid: "signature_invalid",
72
+ signature_unverifiable: "signature_unverifiable",
73
+ insufficient_trust_level: "insufficient_trust_level",
74
+ timestamp_future: "timestamp_future",
75
+ rate_limited: "rate_limited",
76
+ }.freeze
77
+
78
+ # Key purpose for key attestation (AI-TRUST.3).
79
+ KEY_PURPOSES = %w[signing encryption delegation].freezeend
data/lib/swt3_ai.rb CHANGED
@@ -7,5 +7,5 @@ require_relative "swt3_ai/signing"
7
7
  require_relative "swt3_ai/types"
8
8
 
9
9
  module Swt3Ai
10
- VERSION = "0.5.2"
10
+ VERSION = "0.5.5"
11
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swt3-ai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - TeNova Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-26 00:00:00.000000000 Z
11
+ date: 2026-06-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Mint, verify, and sign SWT3 witness anchors for AI compliance. EU AI
14
14
  Act, NIST AI RMF, CMMC, SR 11-7. Cross-language parity with Python and TypeScript
@@ -52,6 +52,6 @@ requirements: []
52
52
  rubygems_version: 3.4.20
53
53
  signing_key:
54
54
  specification_version: 4
55
- summary: 'SWT3 AI Witness SDK: cryptographic attestation for AI inference. 47 procedures,
56
- 5 languages, 7 profiles.'
55
+ summary: 'SWT3 AI Witness SDK: cryptographic attestation for AI inference. 65 procedures,
56
+ 41 namespaces, 5 languages, 15 profiles, 12 integrations.'
57
57
  test_files: []