deeprails 0.13.0 → 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: 5ec170552015a190316efdd44dfb6afd54be45edee2c484465512b97fb30dbee
4
- data.tar.gz: 350afc446f1a5a9901867a1ff294c1a43db4368807baf3f57c09b0e7980e4c3d
3
+ metadata.gz: 99806896169071c14d140375abeb0a52f47dd534ce6a44e7ab1777cedac61b93
4
+ data.tar.gz: f01578bea92921017ae14b31de1ec6cfe1fc52517b9bf54d30579a76ebdcb26b
5
5
  SHA512:
6
- metadata.gz: 686858c77cd34c76d7071f1c67bfbb24b03b787f051cc02e3b237ee6f9f1e499359304830732d0e55e8d0f90ef0c1bdae0a784ea3ae74617c788bd048524de6a
7
- data.tar.gz: a2276ada84dcd2f1e22e3b9df4c41959ee6debba2ecc39bcf6519e517faf80555ad6e2b39852f09888f3c3cab12a85fd03b6211d12773ccf61535df157e3ad9d
6
+ metadata.gz: c70ecb016265f68b32180f90059a6f78827abe8152cef709da4721b23c4259cf8a10815f1c9ee8280daacc4b991f73ac486f4b8f4e04ae981b2b4bb2bb01aaeb
7
+ data.tar.gz: 2537fc0e6c4d6ce9bbc326ac803f2885ac048a6290b7bbefdcf16607384920c9987f061986eae7338d230cf1dbe89ecb9bd177e275668b1cc9fb8963a544073d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.14.0 (2025-11-12)
4
+
5
+ Full Changelog: [v0.13.0...v0.14.0](https://github.com/deeprails/deeprails-ruby-sdk/compare/v0.13.0...v0.14.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** remove dev server ([59d5dfb](https://github.com/deeprails/deeprails-ruby-sdk/commit/59d5dfbbae7a7cfc6d5a01893a8397c287f47834))
10
+
3
11
  ## 0.13.0 (2025-11-11)
4
12
 
5
13
  Full Changelog: [v0.12.0...v0.13.0](https://github.com/deeprails/deeprails-ruby-sdk/compare/v0.12.0...v0.13.0)
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "deeprails", "~> 0.13.0"
18
+ gem "deeprails", "~> 0.14.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -33,7 +33,8 @@ module Deeprails
33
33
  required :custom_hallucination_threshold_values, Deeprails::Internal::Type::HashOf[Float]
34
34
 
35
35
  # @!attribute description
36
- # Description for the workflow.
36
+ # A description for the workflow, to help you remember what that workflow means to
37
+ # your organization.
37
38
  #
38
39
  # @return [String]
39
40
  required :description, String
@@ -52,7 +53,7 @@ module Deeprails
52
53
  required :files, -> { Deeprails::Internal::Type::ArrayOf[Deeprails::DefendResponse::File] }
53
54
 
54
55
  # @!attribute name
55
- # Name of the workflow.
56
+ # A human-readable name for the workflow that will correspond to it's workflow ID.
56
57
  #
57
58
  # @return [String]
58
59
  required :name, String
@@ -82,12 +83,19 @@ module Deeprails
82
83
  # @return [String]
83
84
  required :workflow_id, String
84
85
 
86
+ # @!attribute improvement_action
87
+ # The action used to improve outputs that fail one or more guardrail metrics for
88
+ # the workflow events.
89
+ #
90
+ # @return [Symbol, Deeprails::Models::DefendResponse::ImprovementAction, nil]
91
+ optional :improvement_action, enum: -> { Deeprails::DefendResponse::ImprovementAction }
92
+
85
93
  # @!attribute stats
86
94
  #
87
95
  # @return [Deeprails::Models::DefendResponse::Stats, nil]
88
96
  optional :stats, -> { Deeprails::DefendResponse::Stats }
89
97
 
90
- # @!method initialize(automatic_hallucination_tolerance_levels:, capabilities:, created_at:, custom_hallucination_threshold_values:, description:, events:, files:, name:, status:, threshold_type:, updated_at:, workflow_id:, stats: nil)
98
+ # @!method initialize(automatic_hallucination_tolerance_levels:, capabilities:, created_at:, custom_hallucination_threshold_values:, description:, events:, files:, name:, status:, threshold_type:, updated_at:, workflow_id:, improvement_action: nil, stats: nil)
91
99
  # Some parameter documentations has been truncated, see
92
100
  # {Deeprails::Models::DefendResponse} for more details.
93
101
  #
@@ -99,13 +107,13 @@ module Deeprails
99
107
  #
100
108
  # @param custom_hallucination_threshold_values [Hash{Symbol=>Float}] Mapping of guardrail metric names to threshold values. Values can be floating po
101
109
  #
102
- # @param description [String] Description for the workflow.
110
+ # @param description [String] A description for the workflow, to help you remember what that workflow means to
103
111
  #
104
112
  # @param events [Array<Deeprails::Models::DefendResponse::Event>] An array of events associated with this workflow.
105
113
  #
106
114
  # @param files [Array<Deeprails::Models::DefendResponse::File>] List of files associated with the workflow. If this is not empty, models can sea
107
115
  #
108
- # @param name [String] Name of the workflow.
116
+ # @param name [String] A human-readable name for the workflow that will correspond to it's workflow ID.
109
117
  #
110
118
  # @param status [Symbol, Deeprails::Models::DefendResponse::Status] Status of the selected workflow. May be `inactive` or `active`. Inactive workf
111
119
  #
@@ -115,6 +123,8 @@ module Deeprails
115
123
  #
116
124
  # @param workflow_id [String] A unique workflow ID.
117
125
  #
126
+ # @param improvement_action [Symbol, Deeprails::Models::DefendResponse::ImprovementAction] The action used to improve outputs that fail one or more guardrail metrics for t
127
+ #
118
128
  # @param stats [Deeprails::Models::DefendResponse::Stats]
119
129
 
120
130
  module AutomaticHallucinationToleranceLevel
@@ -330,6 +340,21 @@ module Deeprails
330
340
  # @return [Array<Symbol>]
331
341
  end
332
342
 
343
+ # The action used to improve outputs that fail one or more guardrail metrics for
344
+ # the workflow events.
345
+ #
346
+ # @see Deeprails::Models::DefendResponse#improvement_action
347
+ module ImprovementAction
348
+ extend Deeprails::Internal::Type::Enum
349
+
350
+ REGEN = :regen
351
+ FIXIT = :fixit
352
+ DO_NOTHING = :do_nothing
353
+
354
+ # @!method self.values
355
+ # @return [Array<Symbol>]
356
+ end
357
+
333
358
  # @see Deeprails::Models::DefendResponse#stats
334
359
  class Stats < Deeprails::Internal::Type::BaseModel
335
360
  # @!attribute outputs_below_threshold
@@ -43,6 +43,12 @@ module Deeprails
43
43
  # @return [String]
44
44
  required :improved_model_output, String
45
45
 
46
+ # @!attribute improvement_action
47
+ # Type of improvement action used to improve the event.
48
+ #
49
+ # @return [Symbol, Deeprails::Models::WorkflowEventDetailResponse::ImprovementAction]
50
+ required :improvement_action, enum: -> { Deeprails::WorkflowEventDetailResponse::ImprovementAction }
51
+
46
52
  # @!attribute improvement_tool_status
47
53
  # Status of the improvement tool used to improve the event.
48
54
  #
@@ -51,12 +57,6 @@ module Deeprails
51
57
  enum: -> { Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus },
52
58
  nil?: true
53
59
 
54
- # @!attribute improvement_tool_type
55
- # Type of improvement tool used to improve the event.
56
- #
57
- # @return [Symbol, Deeprails::Models::WorkflowEventDetailResponse::ImprovementToolType]
58
- required :improvement_tool_type, enum: -> { Deeprails::WorkflowEventDetailResponse::ImprovementToolType }
59
-
60
60
  # @!attribute threshold_type
61
61
  # Type of thresholds used to evaluate the event.
62
62
  #
@@ -99,7 +99,7 @@ module Deeprails
99
99
  # @return [Array<Deeprails::Models::WorkflowEventDetailResponse::File>, nil]
100
100
  optional :files, -> { Deeprails::Internal::Type::ArrayOf[Deeprails::WorkflowEventDetailResponse::File] }
101
101
 
102
- # @!method initialize(evaluation_history:, evaluation_result:, event_id:, event_status:, filtered:, improved_model_output:, improvement_tool_status:, improvement_tool_type:, threshold_type:, workflow_id:, automatic_hallucination_tolerance_levels: nil, capabilities: nil, custom_hallucination_threshold_values: nil, files: nil)
102
+ # @!method initialize(evaluation_history:, evaluation_result:, event_id:, event_status:, filtered:, improved_model_output:, improvement_action:, improvement_tool_status:, threshold_type:, workflow_id:, automatic_hallucination_tolerance_levels: nil, capabilities: nil, custom_hallucination_threshold_values: nil, files: nil)
103
103
  # Some parameter documentations has been truncated, see
104
104
  # {Deeprails::Models::WorkflowEventDetailResponse} for more details.
105
105
  #
@@ -115,9 +115,9 @@ module Deeprails
115
115
  #
116
116
  # @param improved_model_output [String] Improved model output after improvement tool was applied and each metric passed
117
117
  #
118
- # @param improvement_tool_status [Symbol, Deeprails::Models::WorkflowEventDetailResponse::ImprovementToolStatus, nil] Status of the improvement tool used to improve the event.
118
+ # @param improvement_action [Symbol, Deeprails::Models::WorkflowEventDetailResponse::ImprovementAction] Type of improvement action used to improve the event.
119
119
  #
120
- # @param improvement_tool_type [Symbol, Deeprails::Models::WorkflowEventDetailResponse::ImprovementToolType] Type of improvement tool used to improve the event.
120
+ # @param improvement_tool_status [Symbol, Deeprails::Models::WorkflowEventDetailResponse::ImprovementToolStatus, nil] Status of the improvement tool used to improve the event.
121
121
  #
122
122
  # @param threshold_type [Symbol, Deeprails::Models::WorkflowEventDetailResponse::ThresholdType] Type of thresholds used to evaluate the event.
123
123
  #
@@ -226,29 +226,29 @@ module Deeprails
226
226
  # @return [Array<Symbol>]
227
227
  end
228
228
 
229
- # Status of the improvement tool used to improve the event.
229
+ # Type of improvement action used to improve the event.
230
230
  #
231
- # @see Deeprails::Models::WorkflowEventDetailResponse#improvement_tool_status
232
- module ImprovementToolStatus
231
+ # @see Deeprails::Models::WorkflowEventDetailResponse#improvement_action
232
+ module ImprovementAction
233
233
  extend Deeprails::Internal::Type::Enum
234
234
 
235
- IMPROVED = :improved
236
- FAILED_ON_MAX_RETRIES = :"failed on max retries"
237
- IMPROVEMENT_REQUIRED = :improvement_required
235
+ REGEN = :regen
236
+ FIXIT = :fixit
237
+ DO_NOTHING = :do_nothing
238
238
 
239
239
  # @!method self.values
240
240
  # @return [Array<Symbol>]
241
241
  end
242
242
 
243
- # Type of improvement tool used to improve the event.
243
+ # Status of the improvement tool used to improve the event.
244
244
  #
245
- # @see Deeprails::Models::WorkflowEventDetailResponse#improvement_tool_type
246
- module ImprovementToolType
245
+ # @see Deeprails::Models::WorkflowEventDetailResponse#improvement_tool_status
246
+ module ImprovementToolStatus
247
247
  extend Deeprails::Internal::Type::Enum
248
248
 
249
- REGEN = :regen
250
- FIXIT = :fixit
251
- DO_NOTHING = :do_nothing
249
+ IMPROVED = :improved
250
+ FAILED_ON_MAX_RETRIES = :"failed on max retries"
251
+ IMPROVEMENT_REQUIRED = :improvement_required
252
252
 
253
253
  # @!method self.values
254
254
  # @return [Array<Symbol>]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Deeprails
4
- VERSION = "0.13.0"
4
+ VERSION = "0.14.0"
5
5
  end
@@ -34,7 +34,8 @@ module Deeprails
34
34
  sig { returns(T::Hash[Symbol, Float]) }
35
35
  attr_accessor :custom_hallucination_threshold_values
36
36
 
37
- # Description for the workflow.
37
+ # A description for the workflow, to help you remember what that workflow means to
38
+ # your organization.
38
39
  sig { returns(String) }
39
40
  attr_accessor :description
40
41
 
@@ -47,7 +48,7 @@ module Deeprails
47
48
  sig { returns(T::Array[Deeprails::DefendResponse::File]) }
48
49
  attr_accessor :files
49
50
 
50
- # Name of the workflow.
51
+ # A human-readable name for the workflow that will correspond to it's workflow ID.
51
52
  sig { returns(String) }
52
53
  attr_accessor :name
53
54
 
@@ -68,6 +69,23 @@ module Deeprails
68
69
  sig { returns(String) }
69
70
  attr_accessor :workflow_id
70
71
 
72
+ # The action used to improve outputs that fail one or more guardrail metrics for
73
+ # the workflow events.
74
+ sig do
75
+ returns(
76
+ T.nilable(Deeprails::DefendResponse::ImprovementAction::TaggedSymbol)
77
+ )
78
+ end
79
+ attr_reader :improvement_action
80
+
81
+ sig do
82
+ params(
83
+ improvement_action:
84
+ Deeprails::DefendResponse::ImprovementAction::OrSymbol
85
+ ).void
86
+ end
87
+ attr_writer :improvement_action
88
+
71
89
  sig { returns(T.nilable(Deeprails::DefendResponse::Stats)) }
72
90
  attr_reader :stats
73
91
 
@@ -92,6 +110,8 @@ module Deeprails
92
110
  threshold_type: Deeprails::DefendResponse::ThresholdType::OrSymbol,
93
111
  updated_at: Time,
94
112
  workflow_id: String,
113
+ improvement_action:
114
+ Deeprails::DefendResponse::ImprovementAction::OrSymbol,
95
115
  stats: Deeprails::DefendResponse::Stats::OrHash
96
116
  ).returns(T.attached_class)
97
117
  end
@@ -107,14 +127,15 @@ module Deeprails
107
127
  # Mapping of guardrail metric names to threshold values. Values can be floating
108
128
  # point numbers (0.0-1.0) for custom thresholds.
109
129
  custom_hallucination_threshold_values:,
110
- # Description for the workflow.
130
+ # A description for the workflow, to help you remember what that workflow means to
131
+ # your organization.
111
132
  description:,
112
133
  # An array of events associated with this workflow.
113
134
  events:,
114
135
  # List of files associated with the workflow. If this is not empty, models can
115
136
  # search these files when performing evaluations or remediations
116
137
  files:,
117
- # Name of the workflow.
138
+ # A human-readable name for the workflow that will correspond to it's workflow ID.
118
139
  name:,
119
140
  # Status of the selected workflow. May be `inactive` or `active`. Inactive
120
141
  # workflows will not accept events.
@@ -125,6 +146,9 @@ module Deeprails
125
146
  updated_at:,
126
147
  # A unique workflow ID.
127
148
  workflow_id:,
149
+ # The action used to improve outputs that fail one or more guardrail metrics for
150
+ # the workflow events.
151
+ improvement_action: nil,
128
152
  stats: nil
129
153
  )
130
154
  end
@@ -149,6 +173,8 @@ module Deeprails
149
173
  Deeprails::DefendResponse::ThresholdType::TaggedSymbol,
150
174
  updated_at: Time,
151
175
  workflow_id: String,
176
+ improvement_action:
177
+ Deeprails::DefendResponse::ImprovementAction::TaggedSymbol,
152
178
  stats: Deeprails::DefendResponse::Stats
153
179
  }
154
180
  )
@@ -563,6 +589,42 @@ module Deeprails
563
589
  end
564
590
  end
565
591
 
592
+ # The action used to improve outputs that fail one or more guardrail metrics for
593
+ # the workflow events.
594
+ module ImprovementAction
595
+ extend Deeprails::Internal::Type::Enum
596
+
597
+ TaggedSymbol =
598
+ T.type_alias do
599
+ T.all(Symbol, Deeprails::DefendResponse::ImprovementAction)
600
+ end
601
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
602
+
603
+ REGEN =
604
+ T.let(
605
+ :regen,
606
+ Deeprails::DefendResponse::ImprovementAction::TaggedSymbol
607
+ )
608
+ FIXIT =
609
+ T.let(
610
+ :fixit,
611
+ Deeprails::DefendResponse::ImprovementAction::TaggedSymbol
612
+ )
613
+ DO_NOTHING =
614
+ T.let(
615
+ :do_nothing,
616
+ Deeprails::DefendResponse::ImprovementAction::TaggedSymbol
617
+ )
618
+
619
+ sig do
620
+ override.returns(
621
+ T::Array[Deeprails::DefendResponse::ImprovementAction::TaggedSymbol]
622
+ )
623
+ end
624
+ def self.values
625
+ end
626
+ end
627
+
566
628
  class Stats < Deeprails::Internal::Type::BaseModel
567
629
  OrHash =
568
630
  T.type_alias do
@@ -45,23 +45,23 @@ module Deeprails
45
45
  sig { returns(String) }
46
46
  attr_accessor :improved_model_output
47
47
 
48
- # Status of the improvement tool used to improve the event.
48
+ # Type of improvement action used to improve the event.
49
49
  sig do
50
50
  returns(
51
- T.nilable(
52
- Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::TaggedSymbol
53
- )
51
+ Deeprails::WorkflowEventDetailResponse::ImprovementAction::TaggedSymbol
54
52
  )
55
53
  end
56
- attr_accessor :improvement_tool_status
54
+ attr_accessor :improvement_action
57
55
 
58
- # Type of improvement tool used to improve the event.
56
+ # Status of the improvement tool used to improve the event.
59
57
  sig do
60
58
  returns(
61
- Deeprails::WorkflowEventDetailResponse::ImprovementToolType::TaggedSymbol
59
+ T.nilable(
60
+ Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::TaggedSymbol
61
+ )
62
62
  )
63
63
  end
64
- attr_accessor :improvement_tool_type
64
+ attr_accessor :improvement_tool_status
65
65
 
66
66
  # Type of thresholds used to evaluate the event.
67
67
  sig do
@@ -159,12 +159,12 @@ module Deeprails
159
159
  Deeprails::WorkflowEventDetailResponse::EventStatus::OrSymbol,
160
160
  filtered: T::Boolean,
161
161
  improved_model_output: String,
162
+ improvement_action:
163
+ Deeprails::WorkflowEventDetailResponse::ImprovementAction::OrSymbol,
162
164
  improvement_tool_status:
163
165
  T.nilable(
164
166
  Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::OrSymbol
165
167
  ),
166
- improvement_tool_type:
167
- Deeprails::WorkflowEventDetailResponse::ImprovementToolType::OrSymbol,
168
168
  threshold_type:
169
169
  Deeprails::WorkflowEventDetailResponse::ThresholdType::OrSymbol,
170
170
  workflow_id: String,
@@ -196,10 +196,10 @@ module Deeprails
196
196
  # Improved model output after improvement tool was applied and each metric passed
197
197
  # evaluation.
198
198
  improved_model_output:,
199
+ # Type of improvement action used to improve the event.
200
+ improvement_action:,
199
201
  # Status of the improvement tool used to improve the event.
200
202
  improvement_tool_status:,
201
- # Type of improvement tool used to improve the event.
202
- improvement_tool_type:,
203
203
  # Type of thresholds used to evaluate the event.
204
204
  threshold_type:,
205
205
  # Workflow ID associated with the event.
@@ -232,12 +232,12 @@ module Deeprails
232
232
  Deeprails::WorkflowEventDetailResponse::EventStatus::TaggedSymbol,
233
233
  filtered: T::Boolean,
234
234
  improved_model_output: String,
235
+ improvement_action:
236
+ Deeprails::WorkflowEventDetailResponse::ImprovementAction::TaggedSymbol,
235
237
  improvement_tool_status:
236
238
  T.nilable(
237
239
  Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::TaggedSymbol
238
240
  ),
239
- improvement_tool_type:
240
- Deeprails::WorkflowEventDetailResponse::ImprovementToolType::TaggedSymbol,
241
241
  threshold_type:
242
242
  Deeprails::WorkflowEventDetailResponse::ThresholdType::TaggedSymbol,
243
243
  workflow_id: String,
@@ -432,39 +432,39 @@ module Deeprails
432
432
  end
433
433
  end
434
434
 
435
- # Status of the improvement tool used to improve the event.
436
- module ImprovementToolStatus
435
+ # Type of improvement action used to improve the event.
436
+ module ImprovementAction
437
437
  extend Deeprails::Internal::Type::Enum
438
438
 
439
439
  TaggedSymbol =
440
440
  T.type_alias do
441
441
  T.all(
442
442
  Symbol,
443
- Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus
443
+ Deeprails::WorkflowEventDetailResponse::ImprovementAction
444
444
  )
445
445
  end
446
446
  OrSymbol = T.type_alias { T.any(Symbol, String) }
447
447
 
448
- IMPROVED =
448
+ REGEN =
449
449
  T.let(
450
- :improved,
451
- Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::TaggedSymbol
450
+ :regen,
451
+ Deeprails::WorkflowEventDetailResponse::ImprovementAction::TaggedSymbol
452
452
  )
453
- FAILED_ON_MAX_RETRIES =
453
+ FIXIT =
454
454
  T.let(
455
- :"failed on max retries",
456
- Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::TaggedSymbol
455
+ :fixit,
456
+ Deeprails::WorkflowEventDetailResponse::ImprovementAction::TaggedSymbol
457
457
  )
458
- IMPROVEMENT_REQUIRED =
458
+ DO_NOTHING =
459
459
  T.let(
460
- :improvement_required,
461
- Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::TaggedSymbol
460
+ :do_nothing,
461
+ Deeprails::WorkflowEventDetailResponse::ImprovementAction::TaggedSymbol
462
462
  )
463
463
 
464
464
  sig do
465
465
  override.returns(
466
466
  T::Array[
467
- Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::TaggedSymbol
467
+ Deeprails::WorkflowEventDetailResponse::ImprovementAction::TaggedSymbol
468
468
  ]
469
469
  )
470
470
  end
@@ -472,39 +472,39 @@ module Deeprails
472
472
  end
473
473
  end
474
474
 
475
- # Type of improvement tool used to improve the event.
476
- module ImprovementToolType
475
+ # Status of the improvement tool used to improve the event.
476
+ module ImprovementToolStatus
477
477
  extend Deeprails::Internal::Type::Enum
478
478
 
479
479
  TaggedSymbol =
480
480
  T.type_alias do
481
481
  T.all(
482
482
  Symbol,
483
- Deeprails::WorkflowEventDetailResponse::ImprovementToolType
483
+ Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus
484
484
  )
485
485
  end
486
486
  OrSymbol = T.type_alias { T.any(Symbol, String) }
487
487
 
488
- REGEN =
488
+ IMPROVED =
489
489
  T.let(
490
- :regen,
491
- Deeprails::WorkflowEventDetailResponse::ImprovementToolType::TaggedSymbol
490
+ :improved,
491
+ Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::TaggedSymbol
492
492
  )
493
- FIXIT =
493
+ FAILED_ON_MAX_RETRIES =
494
494
  T.let(
495
- :fixit,
496
- Deeprails::WorkflowEventDetailResponse::ImprovementToolType::TaggedSymbol
495
+ :"failed on max retries",
496
+ Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::TaggedSymbol
497
497
  )
498
- DO_NOTHING =
498
+ IMPROVEMENT_REQUIRED =
499
499
  T.let(
500
- :do_nothing,
501
- Deeprails::WorkflowEventDetailResponse::ImprovementToolType::TaggedSymbol
500
+ :improvement_required,
501
+ Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::TaggedSymbol
502
502
  )
503
503
 
504
504
  sig do
505
505
  override.returns(
506
506
  T::Array[
507
- Deeprails::WorkflowEventDetailResponse::ImprovementToolType::TaggedSymbol
507
+ Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::TaggedSymbol
508
508
  ]
509
509
  )
510
510
  end
@@ -14,6 +14,7 @@ module Deeprails
14
14
  threshold_type: Deeprails::Models::DefendResponse::threshold_type,
15
15
  updated_at: Time,
16
16
  workflow_id: String,
17
+ improvement_action: Deeprails::Models::DefendResponse::improvement_action,
17
18
  stats: Deeprails::DefendResponse::Stats
18
19
  }
19
20
 
@@ -42,6 +43,12 @@ module Deeprails
42
43
 
43
44
  attr_accessor workflow_id: String
44
45
 
46
+ attr_reader improvement_action: Deeprails::Models::DefendResponse::improvement_action?
47
+
48
+ def improvement_action=: (
49
+ Deeprails::Models::DefendResponse::improvement_action
50
+ ) -> Deeprails::Models::DefendResponse::improvement_action
51
+
45
52
  attr_reader stats: Deeprails::DefendResponse::Stats?
46
53
 
47
54
  def stats=: (
@@ -61,6 +68,7 @@ module Deeprails
61
68
  threshold_type: Deeprails::Models::DefendResponse::threshold_type,
62
69
  updated_at: Time,
63
70
  workflow_id: String,
71
+ ?improvement_action: Deeprails::Models::DefendResponse::improvement_action,
64
72
  ?stats: Deeprails::DefendResponse::Stats
65
73
  ) -> void
66
74
 
@@ -77,6 +85,7 @@ module Deeprails
77
85
  threshold_type: Deeprails::Models::DefendResponse::threshold_type,
78
86
  updated_at: Time,
79
87
  workflow_id: String,
88
+ improvement_action: Deeprails::Models::DefendResponse::improvement_action,
80
89
  stats: Deeprails::DefendResponse::Stats
81
90
  }
82
91
 
@@ -299,6 +308,18 @@ module Deeprails
299
308
  def self?.values: -> ::Array[Deeprails::Models::DefendResponse::threshold_type]
300
309
  end
301
310
 
311
+ type improvement_action = :regen | :fixit | :do_nothing
312
+
313
+ module ImprovementAction
314
+ extend Deeprails::Internal::Type::Enum
315
+
316
+ REGEN: :regen
317
+ FIXIT: :fixit
318
+ DO_NOTHING: :do_nothing
319
+
320
+ def self?.values: -> ::Array[Deeprails::Models::DefendResponse::improvement_action]
321
+ end
322
+
302
323
  type stats =
303
324
  {
304
325
  outputs_below_threshold: Integer,
@@ -8,8 +8,8 @@ module Deeprails
8
8
  event_status: Deeprails::Models::WorkflowEventDetailResponse::event_status,
9
9
  filtered: bool,
10
10
  improved_model_output: String,
11
+ improvement_action: Deeprails::Models::WorkflowEventDetailResponse::improvement_action,
11
12
  improvement_tool_status: Deeprails::Models::WorkflowEventDetailResponse::improvement_tool_status?,
12
- improvement_tool_type: Deeprails::Models::WorkflowEventDetailResponse::improvement_tool_type,
13
13
  threshold_type: Deeprails::Models::WorkflowEventDetailResponse::threshold_type,
14
14
  workflow_id: String,
15
15
  automatic_hallucination_tolerance_levels: ::Hash[Symbol, Deeprails::Models::WorkflowEventDetailResponse::automatic_hallucination_tolerance_level],
@@ -31,9 +31,9 @@ module Deeprails
31
31
 
32
32
  attr_accessor improved_model_output: String
33
33
 
34
- attr_accessor improvement_tool_status: Deeprails::Models::WorkflowEventDetailResponse::improvement_tool_status?
34
+ attr_accessor improvement_action: Deeprails::Models::WorkflowEventDetailResponse::improvement_action
35
35
 
36
- attr_accessor improvement_tool_type: Deeprails::Models::WorkflowEventDetailResponse::improvement_tool_type
36
+ attr_accessor improvement_tool_status: Deeprails::Models::WorkflowEventDetailResponse::improvement_tool_status?
37
37
 
38
38
  attr_accessor threshold_type: Deeprails::Models::WorkflowEventDetailResponse::threshold_type
39
39
 
@@ -70,8 +70,8 @@ module Deeprails
70
70
  event_status: Deeprails::Models::WorkflowEventDetailResponse::event_status,
71
71
  filtered: bool,
72
72
  improved_model_output: String,
73
+ improvement_action: Deeprails::Models::WorkflowEventDetailResponse::improvement_action,
73
74
  improvement_tool_status: Deeprails::Models::WorkflowEventDetailResponse::improvement_tool_status?,
74
- improvement_tool_type: Deeprails::Models::WorkflowEventDetailResponse::improvement_tool_type,
75
75
  threshold_type: Deeprails::Models::WorkflowEventDetailResponse::threshold_type,
76
76
  workflow_id: String,
77
77
  ?automatic_hallucination_tolerance_levels: ::Hash[Symbol, Deeprails::Models::WorkflowEventDetailResponse::automatic_hallucination_tolerance_level],
@@ -87,8 +87,8 @@ module Deeprails
87
87
  event_status: Deeprails::Models::WorkflowEventDetailResponse::event_status,
88
88
  filtered: bool,
89
89
  improved_model_output: String,
90
+ improvement_action: Deeprails::Models::WorkflowEventDetailResponse::improvement_action,
90
91
  improvement_tool_status: Deeprails::Models::WorkflowEventDetailResponse::improvement_tool_status?,
91
- improvement_tool_type: Deeprails::Models::WorkflowEventDetailResponse::improvement_tool_type,
92
92
  threshold_type: Deeprails::Models::WorkflowEventDetailResponse::threshold_type,
93
93
  workflow_id: String,
94
94
  automatic_hallucination_tolerance_levels: ::Hash[Symbol, Deeprails::Models::WorkflowEventDetailResponse::automatic_hallucination_tolerance_level],
@@ -211,6 +211,18 @@ module Deeprails
211
211
  def self?.values: -> ::Array[Deeprails::Models::WorkflowEventDetailResponse::event_status]
212
212
  end
213
213
 
214
+ type improvement_action = :regen | :fixit | :do_nothing
215
+
216
+ module ImprovementAction
217
+ extend Deeprails::Internal::Type::Enum
218
+
219
+ REGEN: :regen
220
+ FIXIT: :fixit
221
+ DO_NOTHING: :do_nothing
222
+
223
+ def self?.values: -> ::Array[Deeprails::Models::WorkflowEventDetailResponse::improvement_action]
224
+ end
225
+
214
226
  type improvement_tool_status =
215
227
  :improved | :"failed on max retries" | :improvement_required
216
228
 
@@ -224,18 +236,6 @@ module Deeprails
224
236
  def self?.values: -> ::Array[Deeprails::Models::WorkflowEventDetailResponse::improvement_tool_status]
225
237
  end
226
238
 
227
- type improvement_tool_type = :regen | :fixit | :do_nothing
228
-
229
- module ImprovementToolType
230
- extend Deeprails::Internal::Type::Enum
231
-
232
- REGEN: :regen
233
- FIXIT: :fixit
234
- DO_NOTHING: :do_nothing
235
-
236
- def self?.values: -> ::Array[Deeprails::Models::WorkflowEventDetailResponse::improvement_tool_type]
237
- end
238
-
239
239
  type threshold_type = :custom | :automatic
240
240
 
241
241
  module ThresholdType
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deeprails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Deeprails
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-11-11 00:00:00.000000000 Z
11
+ date: 2025-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool