safetykit 0.13.1 → 0.14.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d3e22c6034377a433089f18c5a408d81f894f42a5eeeeaa13cb69bbcac81199
4
- data.tar.gz: a70d67b29c010cdf2084fa4947cf01c8892860cc855333b96894a97441bbd95a
3
+ metadata.gz: 5e0ceaab8746b00a918c7006835419aefcbdff8b6cd50d20567bf907bd0b82e0
4
+ data.tar.gz: 628d7da1fcd1a8234c98ec4a86e90ae4862dc6e86032d943f181583d804950f2
5
5
  SHA512:
6
- metadata.gz: 539f52387ecc462d3e88ad6bcbfbeb516ed5dc265590107735d889d1fd363b40f584674917ca971f567bfa5800c0ce9448f359155ff3cf8b91b6955384f47ad9
7
- data.tar.gz: f63ac91cf0e2dd7efa4751e1dc761c6c81f4e66189c0a5df8d2c155e3e1de966bf2137d27684aa3a09af15ad78c643782d41a0adfc048bed72e138ffa591eea3
6
+ metadata.gz: 418e1bcd00e9f805018625bd35b0c44002dbd837adca0bbaaafa3a3982f1186be23fb82f3d9a41c141ceb02f5b2fbdf93810df5985f2102ab71e9db35137191c
7
+ data.tar.gz: ff08113e45da678d61cd550faad5bd97cc3aa8732ead23e83f72c2b25ef6e1ea4cd70b238859737586b22aeb5596be847206ca886ce33ee65b8ddd372d908b86
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.14.0 (2026-06-03)
4
+
5
+ Full Changelog: [v0.13.1...v0.14.0](https://github.com/GetSafetyKit/safetykit-ruby/compare/v0.13.1...v0.14.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([41de279](https://github.com/GetSafetyKit/safetykit-ruby/commit/41de279191911e02d47b795d2aa4f0f657423c36))
10
+
3
11
  ## 0.13.1 (2026-06-02)
4
12
 
5
13
  Full Changelog: [v0.13.0...v0.13.1](https://github.com/GetSafetyKit/safetykit-ruby/compare/v0.13.0...v0.13.1)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "safetykit", "~> 0.13.1"
20
+ gem "safetykit", "~> 0.14.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -8,14 +8,13 @@ module SafetyKit
8
8
  include SafetyKit::Internal::Type::RequestParameters
9
9
 
10
10
  # @!attribute content_type
11
- # The dataapi namespace of the content being reviewed
11
+ # The SafetyKit data namespace or content type for the content being reviewed
12
12
  #
13
13
  # @return [String]
14
14
  required :content_type, String
15
15
 
16
16
  # @!attribute decision
17
- # The human reviewer's verdict on whether the content violates the specified
18
- # policy ('match'/'no_match').
17
+ # The human reviewer's verdict for the policy category.
19
18
  #
20
19
  # @return [String]
21
20
  required :decision, String
@@ -28,37 +27,46 @@ module SafetyKit
28
27
  required :policy_id, String
29
28
 
30
29
  # @!attribute reference_id
31
- # The external id for the content being reviewed
30
+ # Stable identifier for the content object in your system
32
31
  #
33
32
  # @return [String]
34
33
  required :reference_id, String
35
34
 
36
35
  # @!attribute action
37
- # The correct enforcement action for this content (e.g. 'reduce_visibility',
38
- # 'unpublish')
36
+ # Optional correct enforcement action for this content, such as
37
+ # 'reduce_visibility' or 'unpublish'
39
38
  #
40
39
  # @return [String, nil]
41
40
  optional :action, String
42
41
 
42
+ # @!attribute agent_type
43
+ # Optional type of review that produced this decision, such as 'appeal',
44
+ # 'bpo_review', or 'policy_expert'
45
+ #
46
+ # @return [String, nil]
47
+ optional :agent_type, String
48
+
43
49
  # @!attribute comment
44
50
  # Additional context or details from the human reviewer
45
51
  #
46
52
  # @return [String, nil]
47
53
  optional :comment, String, nil?: true
48
54
 
49
- # @!method initialize(content_type:, decision:, policy_id:, reference_id:, action: nil, comment: nil, request_options: {})
55
+ # @!method initialize(content_type:, decision:, policy_id:, reference_id:, action: nil, agent_type: nil, comment: nil, request_options: {})
50
56
  # Some parameter documentations has been truncated, see
51
57
  # {SafetyKit::Models::AgentDecisionCreateAgentDecisionParams} for more details.
52
58
  #
53
- # @param content_type [String] The dataapi namespace of the content being reviewed
59
+ # @param content_type [String] The SafetyKit data namespace or content type for the content being reviewed
54
60
  #
55
- # @param decision [String] The human reviewer's verdict on whether the content violates the specified polic
61
+ # @param decision [String] The human reviewer's verdict for the policy category.
56
62
  #
57
63
  # @param policy_id [String] The SafetyKit policy category ID that was evaluated, as configured for your acco
58
64
  #
59
- # @param reference_id [String] The external id for the content being reviewed
65
+ # @param reference_id [String] Stable identifier for the content object in your system
66
+ #
67
+ # @param action [String] Optional correct enforcement action for this content, such as 'reduce_visibility
60
68
  #
61
- # @param action [String] The correct enforcement action for this content (e.g. 'reduce_visibility', 'unpu
69
+ # @param agent_type [String] Optional type of review that produced this decision, such as 'appeal', 'bpo_revi
62
70
  #
63
71
  # @param comment [String, nil] Additional context or details from the human reviewer
64
72
  #
@@ -5,7 +5,7 @@ module SafetyKit
5
5
  # @see SafetyKit::Resources::AgentDecisions#create_agent_decision
6
6
  class AgentDecisionCreateAgentDecisionResponse < SafetyKit::Internal::Type::BaseModel
7
7
  # @!attribute safetykit_correct
8
- # Whether the SafetyKit decision matched the agent decision
8
+ # Whether SafetyKit's decision matched the submitted agent decision
9
9
  #
10
10
  # @return [Boolean]
11
11
  required :safetykit_correct, SafetyKit::Internal::Type::Boolean, api_name: :safetykitCorrect
@@ -13,7 +13,7 @@ module SafetyKit
13
13
  # @!method initialize(safetykit_correct:)
14
14
  # Response confirming the agent decision was recorded
15
15
  #
16
- # @param safetykit_correct [Boolean] Whether the SafetyKit decision matched the agent decision
16
+ # @param safetykit_correct [Boolean] Whether SafetyKit's decision matched the submitted agent decision
17
17
  end
18
18
  end
19
19
  end
@@ -9,22 +9,24 @@ module SafetyKit
9
9
  # {SafetyKit::Models::AgentDecisionCreateAgentDecisionParams} for more details.
10
10
  #
11
11
  # Record a human reviewer's final verdict for content that SafetyKit has
12
- # previously reviewed. This ground truth feedback allows SafetyKit to improve the
13
- # accuracy of automated decisions. Each call provides feedback on whether a given
14
- # piece of content violates a specific policy category. If content is reviewed for
15
- # multiple policies, send one call per policy.
12
+ # previously reviewed. This feedback lets SafetyKit measure and improve automated
13
+ # decisions over time. Each request provides feedback for one content object and
14
+ # one policy category. If a content object is reviewed for multiple policy
15
+ # categories, send one request per policy category.
16
16
  #
17
- # @overload create_agent_decision(content_type:, decision:, policy_id:, reference_id:, action: nil, comment: nil, request_options: {})
17
+ # @overload create_agent_decision(content_type:, decision:, policy_id:, reference_id:, action: nil, agent_type: nil, comment: nil, request_options: {})
18
18
  #
19
- # @param content_type [String] The dataapi namespace of the content being reviewed
19
+ # @param content_type [String] The SafetyKit data namespace or content type for the content being reviewed
20
20
  #
21
- # @param decision [String] The human reviewer's verdict on whether the content violates the specified polic
21
+ # @param decision [String] The human reviewer's verdict for the policy category.
22
22
  #
23
23
  # @param policy_id [String] The SafetyKit policy category ID that was evaluated, as configured for your acco
24
24
  #
25
- # @param reference_id [String] The external id for the content being reviewed
25
+ # @param reference_id [String] Stable identifier for the content object in your system
26
26
  #
27
- # @param action [String] The correct enforcement action for this content (e.g. 'reduce_visibility', 'unpu
27
+ # @param action [String] Optional correct enforcement action for this content, such as 'reduce_visibility
28
+ #
29
+ # @param agent_type [String] Optional type of review that produced this decision, such as 'appeal', 'bpo_revi
28
30
  #
29
31
  # @param comment [String, nil] Additional context or details from the human reviewer
30
32
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SafetyKit
4
- VERSION = "0.13.1"
4
+ VERSION = "0.14.0"
5
5
  end
@@ -14,12 +14,11 @@ module SafetyKit
14
14
  )
15
15
  end
16
16
 
17
- # The dataapi namespace of the content being reviewed
17
+ # The SafetyKit data namespace or content type for the content being reviewed
18
18
  sig { returns(String) }
19
19
  attr_accessor :content_type
20
20
 
21
- # The human reviewer's verdict on whether the content violates the specified
22
- # policy ('match'/'no_match').
21
+ # The human reviewer's verdict for the policy category.
23
22
  sig { returns(String) }
24
23
  attr_accessor :decision
25
24
 
@@ -28,18 +27,26 @@ module SafetyKit
28
27
  sig { returns(String) }
29
28
  attr_accessor :policy_id
30
29
 
31
- # The external id for the content being reviewed
30
+ # Stable identifier for the content object in your system
32
31
  sig { returns(String) }
33
32
  attr_accessor :reference_id
34
33
 
35
- # The correct enforcement action for this content (e.g. 'reduce_visibility',
36
- # 'unpublish')
34
+ # Optional correct enforcement action for this content, such as
35
+ # 'reduce_visibility' or 'unpublish'
37
36
  sig { returns(T.nilable(String)) }
38
37
  attr_reader :action
39
38
 
40
39
  sig { params(action: String).void }
41
40
  attr_writer :action
42
41
 
42
+ # Optional type of review that produced this decision, such as 'appeal',
43
+ # 'bpo_review', or 'policy_expert'
44
+ sig { returns(T.nilable(String)) }
45
+ attr_reader :agent_type
46
+
47
+ sig { params(agent_type: String).void }
48
+ attr_writer :agent_type
49
+
43
50
  # Additional context or details from the human reviewer
44
51
  sig { returns(T.nilable(String)) }
45
52
  attr_accessor :comment
@@ -51,24 +58,27 @@ module SafetyKit
51
58
  policy_id: String,
52
59
  reference_id: String,
53
60
  action: String,
61
+ agent_type: String,
54
62
  comment: T.nilable(String),
55
63
  request_options: SafetyKit::RequestOptions::OrHash
56
64
  ).returns(T.attached_class)
57
65
  end
58
66
  def self.new(
59
- # The dataapi namespace of the content being reviewed
67
+ # The SafetyKit data namespace or content type for the content being reviewed
60
68
  content_type:,
61
- # The human reviewer's verdict on whether the content violates the specified
62
- # policy ('match'/'no_match').
69
+ # The human reviewer's verdict for the policy category.
63
70
  decision:,
64
71
  # The SafetyKit policy category ID that was evaluated, as configured for your
65
72
  # account
66
73
  policy_id:,
67
- # The external id for the content being reviewed
74
+ # Stable identifier for the content object in your system
68
75
  reference_id:,
69
- # The correct enforcement action for this content (e.g. 'reduce_visibility',
70
- # 'unpublish')
76
+ # Optional correct enforcement action for this content, such as
77
+ # 'reduce_visibility' or 'unpublish'
71
78
  action: nil,
79
+ # Optional type of review that produced this decision, such as 'appeal',
80
+ # 'bpo_review', or 'policy_expert'
81
+ agent_type: nil,
72
82
  # Additional context or details from the human reviewer
73
83
  comment: nil,
74
84
  request_options: {}
@@ -83,6 +93,7 @@ module SafetyKit
83
93
  policy_id: String,
84
94
  reference_id: String,
85
95
  action: String,
96
+ agent_type: String,
86
97
  comment: T.nilable(String),
87
98
  request_options: SafetyKit::RequestOptions
88
99
  }
@@ -11,14 +11,14 @@ module SafetyKit
11
11
  )
12
12
  end
13
13
 
14
- # Whether the SafetyKit decision matched the agent decision
14
+ # Whether SafetyKit's decision matched the submitted agent decision
15
15
  sig { returns(T::Boolean) }
16
16
  attr_accessor :safetykit_correct
17
17
 
18
18
  # Response confirming the agent decision was recorded
19
19
  sig { params(safetykit_correct: T::Boolean).returns(T.attached_class) }
20
20
  def self.new(
21
- # Whether the SafetyKit decision matched the agent decision
21
+ # Whether SafetyKit's decision matched the submitted agent decision
22
22
  safetykit_correct:
23
23
  )
24
24
  end
@@ -6,10 +6,10 @@ module SafetyKit
6
6
  # accuracy of SafetyKit's automated decisions over time.
7
7
  class AgentDecisions
8
8
  # Record a human reviewer's final verdict for content that SafetyKit has
9
- # previously reviewed. This ground truth feedback allows SafetyKit to improve the
10
- # accuracy of automated decisions. Each call provides feedback on whether a given
11
- # piece of content violates a specific policy category. If content is reviewed for
12
- # multiple policies, send one call per policy.
9
+ # previously reviewed. This feedback lets SafetyKit measure and improve automated
10
+ # decisions over time. Each request provides feedback for one content object and
11
+ # one policy category. If a content object is reviewed for multiple policy
12
+ # categories, send one request per policy category.
13
13
  sig do
14
14
  params(
15
15
  content_type: String,
@@ -17,24 +17,27 @@ module SafetyKit
17
17
  policy_id: String,
18
18
  reference_id: String,
19
19
  action: String,
20
+ agent_type: String,
20
21
  comment: T.nilable(String),
21
22
  request_options: SafetyKit::RequestOptions::OrHash
22
23
  ).returns(SafetyKit::Models::AgentDecisionCreateAgentDecisionResponse)
23
24
  end
24
25
  def create_agent_decision(
25
- # The dataapi namespace of the content being reviewed
26
+ # The SafetyKit data namespace or content type for the content being reviewed
26
27
  content_type:,
27
- # The human reviewer's verdict on whether the content violates the specified
28
- # policy ('match'/'no_match').
28
+ # The human reviewer's verdict for the policy category.
29
29
  decision:,
30
30
  # The SafetyKit policy category ID that was evaluated, as configured for your
31
31
  # account
32
32
  policy_id:,
33
- # The external id for the content being reviewed
33
+ # Stable identifier for the content object in your system
34
34
  reference_id:,
35
- # The correct enforcement action for this content (e.g. 'reduce_visibility',
36
- # 'unpublish')
35
+ # Optional correct enforcement action for this content, such as
36
+ # 'reduce_visibility' or 'unpublish'
37
37
  action: nil,
38
+ # Optional type of review that produced this decision, such as 'appeal',
39
+ # 'bpo_review', or 'policy_expert'
40
+ agent_type: nil,
38
41
  # Additional context or details from the human reviewer
39
42
  comment: nil,
40
43
  request_options: {}
@@ -7,6 +7,7 @@ module SafetyKit
7
7
  policy_id: String,
8
8
  reference_id: String,
9
9
  action: String,
10
+ agent_type: String,
10
11
  comment: String?
11
12
  }
12
13
  & SafetyKit::Internal::Type::request_parameters
@@ -27,6 +28,10 @@ module SafetyKit
27
28
 
28
29
  def action=: (String) -> String
29
30
 
31
+ attr_reader agent_type: String?
32
+
33
+ def agent_type=: (String) -> String
34
+
30
35
  attr_accessor comment: String?
31
36
 
32
37
  def initialize: (
@@ -35,6 +40,7 @@ module SafetyKit
35
40
  policy_id: String,
36
41
  reference_id: String,
37
42
  ?action: String,
43
+ ?agent_type: String,
38
44
  ?comment: String?,
39
45
  ?request_options: SafetyKit::request_opts
40
46
  ) -> void
@@ -45,6 +51,7 @@ module SafetyKit
45
51
  policy_id: String,
46
52
  reference_id: String,
47
53
  action: String,
54
+ agent_type: String,
48
55
  comment: String?,
49
56
  request_options: SafetyKit::RequestOptions
50
57
  }
@@ -7,6 +7,7 @@ module SafetyKit
7
7
  policy_id: String,
8
8
  reference_id: String,
9
9
  ?action: String,
10
+ ?agent_type: String,
10
11
  ?comment: String?,
11
12
  ?request_options: SafetyKit::request_opts
12
13
  ) -> SafetyKit::Models::AgentDecisionCreateAgentDecisionResponse
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: safetykit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.1
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Safetykit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-02 00:00:00.000000000 Z
11
+ date: 2026-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi