retab 0.1.3 → 0.1.4

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 (208) hide show
  1. checksums.yaml +4 -4
  2. data/lib/retab/classifications/category.rb +1 -1
  3. data/lib/retab/classifications/classification_request.rb +2 -2
  4. data/lib/retab/client.rb +16 -16
  5. data/lib/retab/{workflow_artifacts → edits}/edit_config.rb +1 -1
  6. data/lib/retab/edits/edit_request.rb +2 -2
  7. data/lib/retab/experiment_run_metrics/experiment_by_document_metrics_response.rb +2 -2
  8. data/lib/retab/experiment_run_metrics/experiment_by_target_metrics_response.rb +2 -2
  9. data/lib/retab/experiment_run_metrics/experiment_metrics_missing_error.rb +2 -2
  10. data/lib/retab/experiment_run_metrics/experiment_metrics_stale_error.rb +2 -2
  11. data/lib/retab/experiment_run_metrics/experiment_summary_metrics_response.rb +2 -2
  12. data/lib/retab/experiment_run_metrics/experiment_votes_metrics_response.rb +2 -2
  13. data/lib/retab/experiment_run_results/error_workflow_experiment_result.rb +2 -2
  14. data/lib/retab/experiment_run_results/experiment_result.rb +2 -5
  15. data/lib/retab/experiment_runs/experiment_run.rb +6 -3
  16. data/lib/retab/experiment_runs.rb +0 -10
  17. data/lib/retab/extractions/extraction_request.rb +3 -3
  18. data/lib/retab/extractions/sources_response.rb +1 -1
  19. data/lib/retab/extractions.rb +1 -1
  20. data/lib/retab/files/create_upload_response.rb +1 -1
  21. data/lib/retab/files/file.rb +1 -1
  22. data/lib/retab/files.rb +65 -65
  23. data/lib/retab/jobs/job.rb +3 -3
  24. data/lib/retab/parses/parse_request.rb +3 -3
  25. data/lib/retab/partitions/partition.rb +1 -1
  26. data/lib/retab/partitions/partition_request.rb +3 -3
  27. data/lib/retab/schemas/generate_schema_request.rb +2 -5
  28. data/lib/retab/schemas/partial_schema.rb +2 -2
  29. data/lib/retab/schemas.rb +0 -3
  30. data/lib/retab/splits/split_request.rb +2 -2
  31. data/lib/retab/splits/subdocument.rb +2 -2
  32. data/lib/retab/types/trigger_info_type.rb +18 -0
  33. data/lib/retab/types/{workflow_export_payload_request_trigger_types.rb → workflow_export_payload_request_trigger_type.rb} +1 -1
  34. data/lib/retab/types/workflow_runs_trigger_type.rb +1 -1
  35. data/lib/retab/workflow_artifacts/api_call_invocation.rb +4 -4
  36. data/lib/retab/workflow_artifacts/classification_workflow_artifact.rb +1 -1
  37. data/lib/retab/workflow_artifacts/condition_evaluation_details.rb +6 -6
  38. data/lib/retab/workflow_artifacts/condition_evaluation_per_item.rb +1 -1
  39. data/lib/retab/workflow_artifacts/condition_evaluation_result.rb +7 -7
  40. data/lib/retab/workflow_artifacts/condition_evaluation_sub_condition.rb +6 -6
  41. data/lib/retab/workflow_artifacts/conditional_evaluation.rb +4 -4
  42. data/lib/retab/workflow_artifacts/edit_workflow_artifact.rb +1 -1
  43. data/lib/retab/workflow_artifacts/extraction_workflow_artifact.rb +1 -1
  44. data/lib/retab/workflow_artifacts/function_invocation.rb +4 -4
  45. data/lib/retab/workflow_artifacts/parse_workflow_artifact.rb +1 -1
  46. data/lib/retab/workflow_artifacts/partition_workflow_artifact.rb +2 -2
  47. data/lib/retab/workflow_artifacts/review_evaluation.rb +6 -6
  48. data/lib/retab/workflow_artifacts/split_workflow_artifact.rb +1 -1
  49. data/lib/retab/workflow_artifacts/while_loop_termination.rb +4 -4
  50. data/lib/retab/workflow_artifacts.rb +22 -22
  51. data/lib/retab/workflow_block_executions/completed_block_execution_lifecycle.rb +1 -1
  52. data/lib/retab/workflow_block_executions/create_block_execution_request.rb +1 -1
  53. data/lib/retab/workflow_block_executions/error_block_execution_lifecycle.rb +1 -1
  54. data/lib/retab/workflow_block_executions/skipped_block_execution_lifecycle.rb +1 -1
  55. data/lib/retab/workflow_block_executions/stored_block_execution.rb +3 -3
  56. data/lib/retab/workflow_block_executions.rb +1 -1
  57. data/lib/retab/workflow_blocks/workflow_block.rb +1 -1
  58. data/lib/retab/workflow_blocks/workflow_block_create_request.rb +1 -1
  59. data/lib/retab/workflow_blocks.rb +7 -7
  60. data/lib/retab/workflow_edges.rb +3 -3
  61. data/lib/retab/workflow_experiments/experiment_document_capture_request.rb +3 -3
  62. data/lib/retab/workflow_experiments/experiment_document_provenance.rb +3 -3
  63. data/lib/retab/{workflow_test_run_results → workflow_experiments}/file_handle_input.rb +1 -1
  64. data/lib/retab/{workflow_test_run_results → workflow_experiments}/json_handle_input.rb +1 -1
  65. data/lib/retab/workflow_experiments/workflow_experiment.rb +3 -3
  66. data/lib/retab/workflow_reviews/review.rb +3 -3
  67. data/lib/retab/workflow_reviews/review_all_of.rb +1 -1
  68. data/lib/retab/workflow_reviews/review_always.rb +1 -1
  69. data/lib/retab/workflow_reviews/review_any_of.rb +1 -1
  70. data/lib/retab/workflow_reviews/review_any_required_field_null.rb +1 -1
  71. data/lib/retab/workflow_reviews/review_any_split_pages_lt.rb +1 -1
  72. data/lib/retab/workflow_reviews/review_boundary_confidence_lt.rb +1 -1
  73. data/lib/retab/workflow_reviews/review_branch_in.rb +1 -1
  74. data/lib/retab/workflow_reviews/review_category_in.rb +1 -1
  75. data/lib/retab/workflow_reviews/review_confidence_lt.rb +1 -1
  76. data/lib/retab/workflow_reviews/review_decision.rb +3 -3
  77. data/lib/retab/workflow_reviews/review_field_confidence_lt.rb +1 -1
  78. data/lib/retab/workflow_reviews/review_json_condition.rb +1 -1
  79. data/lib/retab/workflow_reviews/review_split_count_neq.rb +1 -1
  80. data/lib/retab/workflow_reviews/review_top_margin_lt.rb +1 -1
  81. data/lib/retab/workflow_reviews/review_validation_failed.rb +1 -1
  82. data/lib/retab/workflow_reviews/submit_decision_response.rb +2 -2
  83. data/lib/retab/workflow_runs/awaiting_review_run.rb +1 -1
  84. data/lib/retab/workflow_runs/cancel_workflow_response.rb +2 -2
  85. data/lib/retab/workflow_runs/cancelled_terminal.rb +1 -1
  86. data/lib/retab/workflow_runs/create_workflow_run_request.rb +1 -1
  87. data/lib/retab/workflow_runs/error_terminal.rb +1 -1
  88. data/lib/retab/workflow_runs/pending_run.rb +1 -1
  89. data/lib/retab/workflow_runs/run_timing.rb +2 -11
  90. data/lib/retab/workflow_runs/running_run.rb +1 -1
  91. data/lib/retab/workflow_runs/{manual_trigger.rb → trigger_info.rb} +3 -8
  92. data/lib/retab/workflow_runs/workflow_export_payload_request.rb +7 -7
  93. data/lib/retab/workflow_runs/workflow_run.rb +7 -21
  94. data/lib/retab/workflow_runs.rb +6 -16
  95. data/lib/retab/workflow_spec/declarative_apply_response.rb +2 -2
  96. data/lib/retab/workflow_spec/declarative_plan_field_change.rb +2 -2
  97. data/lib/retab/workflow_spec/declarative_plan_response.rb +2 -2
  98. data/lib/retab/workflow_spec/declarative_plan_summary.rb +1 -1
  99. data/lib/retab/workflow_spec.rb +10 -10
  100. data/lib/retab/workflow_steps/awaiting_review_step_lifecycle.rb +1 -1
  101. data/lib/retab/workflow_steps/cancelled_step_lifecycle.rb +1 -1
  102. data/lib/retab/workflow_steps/container_context_data.rb +1 -1
  103. data/lib/retab/workflow_steps/error_step_lifecycle.rb +1 -1
  104. data/lib/retab/workflow_steps/queued_step_lifecycle.rb +1 -1
  105. data/lib/retab/workflow_steps.rb +5 -10
  106. data/lib/retab/workflow_test_run_results/verdict_summary.rb +3 -3
  107. data/lib/retab/workflow_test_run_results/workflow_test_result.rb +4 -4
  108. data/lib/retab/workflow_test_run_results/workflow_test_run_timing.rb +7 -0
  109. data/lib/retab/workflow_test_runs/workflow_test_run.rb +7 -21
  110. data/lib/retab/workflow_test_runs.rb +1 -11
  111. data/lib/retab/workflow_tests/all_items_match_condition.rb +1 -1
  112. data/lib/retab/workflow_tests/any_item_matches_condition.rb +1 -1
  113. data/lib/retab/workflow_tests/array_contains_condition.rb +1 -1
  114. data/lib/retab/workflow_tests/assertion_schema_dep.rb +1 -1
  115. data/lib/retab/workflow_tests/between_condition.rb +2 -2
  116. data/lib/retab/workflow_tests/contain_condition.rb +1 -1
  117. data/lib/retab/workflow_tests/ends_with_condition.rb +1 -1
  118. data/lib/retab/workflow_tests/equal_condition.rb +1 -1
  119. data/lib/retab/workflow_tests/exist_condition.rb +1 -1
  120. data/lib/retab/workflow_tests/json_schema_valid_condition.rb +1 -1
  121. data/lib/retab/workflow_tests/length_compare_condition.rb +1 -1
  122. data/lib/retab/workflow_tests/llm_judged_as_condition.rb +1 -1
  123. data/lib/retab/workflow_tests/llm_not_judged_as_condition.rb +1 -1
  124. data/lib/retab/{workflow_test_run_results → workflow_tests}/manual_workflow_test_source.rb +1 -1
  125. data/lib/retab/workflow_tests/matche_regex_condition.rb +1 -1
  126. data/lib/retab/workflow_tests/not_contains_condition.rb +1 -1
  127. data/lib/retab/workflow_tests/not_equals_condition.rb +1 -1
  128. data/lib/retab/workflow_tests/not_exists_condition.rb +1 -1
  129. data/lib/retab/workflow_tests/number_compare_condition.rb +1 -1
  130. data/lib/retab/workflow_tests/object_contains_condition.rb +1 -1
  131. data/lib/retab/{workflow_test_run_results → workflow_tests}/run_step_workflow_test_source.rb +1 -1
  132. data/lib/retab/workflow_tests/similarity_gte_condition.rb +2 -2
  133. data/lib/retab/workflow_tests/split_iou_condition.rb +1 -1
  134. data/lib/retab/workflow_tests/start_with_condition.rb +1 -1
  135. data/lib/retab/workflow_tests/workflow_test.rb +2 -2
  136. data/lib/retab/{workflow_test_runs → workflow_tests}/workflow_test_block_target.rb +1 -1
  137. data/lib/retab/workflows/create_workflow_request.rb +2 -2
  138. data/lib/retab/workflows/publish_workflow_request.rb +1 -1
  139. data/lib/retab/workflows/workflow.rb +2 -2
  140. data/lib/retab/workflows/workflow_published.rb +1 -1
  141. data/lib/retab/workflows.rb +23 -0
  142. data/rbi/retab/api_call_invocation.rbi +4 -4
  143. data/rbi/retab/client.rbi +13 -13
  144. data/rbi/retab/condition_evaluation_details.rbi +2 -2
  145. data/rbi/retab/condition_evaluation_result.rbi +2 -2
  146. data/rbi/retab/condition_evaluation_sub_condition.rbi +2 -2
  147. data/rbi/retab/conditional_evaluation.rbi +4 -4
  148. data/rbi/retab/edit_workflow_artifact.rbi +2 -2
  149. data/rbi/retab/experiment_document_capture_request.rbi +2 -2
  150. data/rbi/retab/experiment_document_provenance.rbi +2 -2
  151. data/rbi/retab/experiment_result.rbi +0 -6
  152. data/rbi/retab/experiment_run.rbi +10 -4
  153. data/rbi/retab/experiment_runs.rbi +1 -3
  154. data/rbi/retab/extraction_workflow_artifact.rbi +2 -2
  155. data/rbi/retab/files.rbi +17 -17
  156. data/rbi/retab/function_invocation.rbi +4 -4
  157. data/rbi/retab/generate_schema_request.rbi +0 -6
  158. data/rbi/retab/job.rbi +2 -2
  159. data/rbi/retab/partition_workflow_artifact.rbi +2 -2
  160. data/rbi/retab/review.rbi +2 -2
  161. data/rbi/retab/review_decision.rbi +4 -4
  162. data/rbi/retab/review_evaluation.rbi +2 -2
  163. data/rbi/retab/run_timing.rbi +0 -18
  164. data/rbi/retab/schemas.rbi +1 -2
  165. data/rbi/retab/stored_block_execution.rbi +2 -2
  166. data/rbi/retab/{schedule_trigger.rbi → trigger_info.rbi} +3 -9
  167. data/rbi/retab/verdict_summary.rbi +2 -2
  168. data/rbi/retab/while_loop_termination.rbi +2 -2
  169. data/rbi/retab/workflow_artifacts.rbi +8 -8
  170. data/rbi/retab/workflow_export_payload_request.rbi +4 -4
  171. data/rbi/retab/workflow_run.rbi +12 -6
  172. data/rbi/retab/workflow_runs.rbi +3 -5
  173. data/rbi/retab/workflow_spec.rbi +4 -4
  174. data/rbi/retab/workflow_steps.rbi +1 -2
  175. data/rbi/retab/workflow_test_result.rbi +2 -2
  176. data/rbi/retab/workflow_test_run.rbi +12 -6
  177. data/rbi/retab/workflow_test_run_timing.rbi +2 -2
  178. data/rbi/retab/workflow_test_runs.rbi +1 -3
  179. data/rbi/retab/workflows.rbi +8 -0
  180. metadata +26 -38
  181. data/lib/retab/types/generate_schema_request_reasoning_effort.rb +0 -17
  182. data/lib/retab/workflow_runs/api_trigger.rb +0 -25
  183. data/lib/retab/workflow_runs/email_trigger.rb +0 -28
  184. data/lib/retab/workflow_runs/restart_trigger.rb +0 -25
  185. data/lib/retab/workflow_runs/schedule_trigger.rb +0 -25
  186. data/lib/retab/workflow_runs/webhook_trigger.rb +0 -25
  187. data/lib/retab/workflow_runs/workflow_snapshot_ref.rb +0 -25
  188. data/lib/retab/workflow_test_runs/workflow_test_run_timing.rb +0 -31
  189. data/rbi/retab/api_trigger.rbi +0 -30
  190. data/rbi/retab/email_trigger.rbi +0 -36
  191. data/rbi/retab/manual_trigger.rbi +0 -30
  192. data/rbi/retab/restart_trigger.rbi +0 -30
  193. data/rbi/retab/webhook_trigger.rbi +0 -30
  194. data/rbi/retab/workflow_snapshot_ref.rbi +0 -30
  195. /data/lib/retab/{extractions → classifications}/file_ref.rb +0 -0
  196. /data/lib/retab/{extractions → classifications}/retab_usage.rb +0 -0
  197. /data/lib/retab/{workflow_artifacts → edits}/b_box.rb +0 -0
  198. /data/lib/retab/{workflow_artifacts → edits}/edit_result.rb +0 -0
  199. /data/lib/retab/{workflow_artifacts → edits}/form_field.rb +0 -0
  200. /data/lib/retab/{workflow_runs → workflow_artifacts}/error_details.rb +0 -0
  201. /data/lib/retab/{workflow_steps → workflow_block_executions}/step_artifact_ref.rb +0 -0
  202. /data/lib/retab/{workflow_test_run_results → workflow_experiments}/materialized_document.rb +0 -0
  203. /data/lib/retab/{workflow_test_runs → workflow_test_run_results}/cancelled_workflow_test_run.rb +0 -0
  204. /data/lib/retab/{workflow_test_runs → workflow_test_run_results}/completed_workflow_test_run.rb +0 -0
  205. /data/lib/retab/{workflow_test_runs → workflow_test_run_results}/error_workflow_test_run.rb +0 -0
  206. /data/lib/retab/{workflow_test_runs → workflow_test_run_results}/pending_workflow_test_run.rb +0 -0
  207. /data/lib/retab/{workflow_test_runs → workflow_test_run_results}/queued_workflow_test_run.rb +0 -0
  208. /data/lib/retab/{workflow_test_runs → workflow_test_run_results}/running_workflow_test_run.rb +0 -0
@@ -10,11 +10,11 @@ module Retab
10
10
  @client = client
11
11
  end
12
12
 
13
- # Validate Workflow Spec
13
+ # Apply Workflow Spec
14
14
  # @param yaml_definition [String] Workflow YAML definition
15
15
  # @param request_options [Hash] (see Retab::Types::RequestOptions)
16
- # @return [Retab::DeclarativeValidationResponse]
17
- def validate(
16
+ # @return [Retab::DeclarativeApplyResponse]
17
+ def apply(
18
18
  yaml_definition:,
19
19
  request_options: {}
20
20
  )
@@ -23,12 +23,12 @@ module Retab
23
23
  }
24
24
  response = @client.request(
25
25
  method: :post,
26
- path: "/v1/workflows/spec/validate",
26
+ path: "/v1/workflows/spec/apply",
27
27
  auth: true,
28
28
  body: body,
29
29
  request_options: request_options
30
30
  )
31
- result = Retab::DeclarativeValidationResponse.new(response.body)
31
+ result = Retab::DeclarativeApplyResponse.new(response.body)
32
32
  result.last_response = Retab::Types::ApiResponse.new(
33
33
  http_status: response.code.to_i,
34
34
  http_headers: response.each_header.to_h,
@@ -64,11 +64,11 @@ module Retab
64
64
  result
65
65
  end
66
66
 
67
- # Apply Workflow Spec
67
+ # Validate Workflow Spec
68
68
  # @param yaml_definition [String] Workflow YAML definition
69
69
  # @param request_options [Hash] (see Retab::Types::RequestOptions)
70
- # @return [Retab::DeclarativeApplyResponse]
71
- def apply(
70
+ # @return [Retab::DeclarativeValidationResponse]
71
+ def validate(
72
72
  yaml_definition:,
73
73
  request_options: {}
74
74
  )
@@ -77,12 +77,12 @@ module Retab
77
77
  }
78
78
  response = @client.request(
79
79
  method: :post,
80
- path: "/v1/workflows/spec/apply",
80
+ path: "/v1/workflows/spec/validate",
81
81
  auth: true,
82
82
  body: body,
83
83
  request_options: request_options
84
84
  )
85
- result = Retab::DeclarativeApplyResponse.new(response.body)
85
+ result = Retab::DeclarativeValidationResponse.new(response.body)
86
86
  result.last_response = Retab::Types::ApiResponse.new(
87
87
  http_status: response.code.to_i,
88
88
  http_headers: response.each_header.to_h,
@@ -14,7 +14,7 @@ module Retab
14
14
  def initialize(json)
15
15
  super()
16
16
  hash = self.class.normalize(json)
17
- @status = hash[:status]
17
+ @status = hash[:status].nil? ? "awaiting_review" : hash[:status]
18
18
  end
19
19
  end
20
20
  end
@@ -18,7 +18,7 @@ module Retab
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @status = hash[:status]
21
+ @status = hash[:status].nil? ? "cancelled" : hash[:status]
22
22
  @reason = hash[:reason]
23
23
  end
24
24
  end
@@ -24,7 +24,7 @@ module Retab
24
24
  hash = self.class.normalize(json)
25
25
  @container_id = hash[:container_id]
26
26
  @iteration = hash[:iteration]
27
- @is_parallel = hash[:is_parallel]
27
+ @is_parallel = hash[:is_parallel].nil? ? false : hash[:is_parallel]
28
28
  @parallel_item_index = hash[:parallel_item_index]
29
29
  end
30
30
  end
@@ -24,7 +24,7 @@ module Retab
24
24
  def initialize(json)
25
25
  super()
26
26
  hash = self.class.normalize(json)
27
- @status = hash[:status]
27
+ @status = hash[:status].nil? ? "error" : hash[:status]
28
28
  @message = hash[:message]
29
29
  @stage = hash[:stage]
30
30
  @category = hash[:category]
@@ -14,7 +14,7 @@ module Retab
14
14
  def initialize(json)
15
15
  super()
16
16
  hash = self.class.normalize(json)
17
- @status = hash[:status]
17
+ @status = hash[:status].nil? ? "queued" : hash[:status]
18
18
  end
19
19
  end
20
20
  end
@@ -12,32 +12,29 @@ module Retab
12
12
 
13
13
  # List Workflow Run Steps
14
14
  # @param run_id [String, nil] Optional workflow run ID filter.
15
- # @param block_id [String, nil] Optional logical block ID filter (deprecated; prefer ``block_ids`` for multi-value filtering).
16
- # @param block_ids [Array<String>, nil] Optional logical block ID filter — multi-value. Repeat the query parameter (``?block_ids=a&block_ids=b``) to match any of several blocks. An empty list is treated as no filter. Preferred over the singular ``block_id``.
15
+ # @param block_id [String, nil] Optional logical block ID filter.
17
16
  # @param step_id [String, nil] Optional step ID filter.
18
17
  # @param block_type [Array<String>, nil] Optional block type filter. Repeat the query parameter for multiple values.
19
18
  # @param status [Array<String>, nil] Optional step lifecycle status filter. Repeat the query parameter for multiple values.
20
- # @param before [String, nil] Step id cursor: return the page before this id (mutually exclusive with ``after``).
21
- # @param after [String, nil] Step id cursor: return the page after this id (mutually exclusive with ``before``).
22
- # @param limit [Integer, nil] Maximum number of steps to return per page (1-1000). Defaults to 200; raise it for run-scoped queries on large DAGs and rely on cursor pagination for the rest.
19
+ # @param before [String, nil] Step id cursor: return the page before this id (mutually exclusive with `after`).
20
+ # @param after [String, nil] Step id cursor: return the page after this id (mutually exclusive with `before`).
21
+ # @param limit [Integer, nil] Maximum number of steps to return per page (1-1000). Defaults to 5 because each step hydrates its handle payloads from the artifact store; raise it deliberately when you need a larger page, and use cursor pagination for the rest.
23
22
  # @param request_options [Hash] (see Retab::Types::RequestOptions)
24
23
  # @return [Retab::PaginatedList<Retab::WorkflowRunStep>]
25
24
  def list(
26
25
  run_id: nil,
27
26
  block_id: nil,
28
- block_ids: nil,
29
27
  step_id: nil,
30
28
  block_type: nil,
31
29
  status: nil,
32
30
  before: nil,
33
31
  after: nil,
34
- limit: 200,
32
+ limit: 5,
35
33
  request_options: {}
36
34
  )
37
35
  params = {
38
36
  "run_id" => run_id,
39
37
  "block_id" => block_id,
40
- "block_ids" => block_ids,
41
38
  "step_id" => step_id,
42
39
  "block_type" => block_type,
43
40
  "status" => status,
@@ -56,7 +53,6 @@ module Retab
56
53
  list(
57
54
  run_id: run_id,
58
55
  block_id: block_id,
59
- block_ids: block_ids,
60
56
  step_id: step_id,
61
57
  block_type: block_type,
62
58
  status: status,
@@ -72,7 +68,6 @@ module Retab
72
68
  filters: {
73
69
  run_id: run_id,
74
70
  block_id: block_id,
75
- block_ids: block_ids,
76
71
  step_id: step_id,
77
72
  block_type: block_type,
78
73
  status: status,
@@ -6,7 +6,7 @@ module Retab
6
6
  class VerdictSummary < Retab::Types::BaseModel
7
7
 
8
8
  HASH_ATTRS = {
9
- result: :result,
9
+ passed: :passed,
10
10
  assertions_passed: :assertions_passed,
11
11
  assertions_failed: :assertions_failed,
12
12
  blocked_assertions: :blocked_assertions,
@@ -14,7 +14,7 @@ module Retab
14
14
  }.freeze
15
15
 
16
16
  attr_accessor(
17
- :result,
17
+ :passed,
18
18
  :assertions_passed,
19
19
  :assertions_failed,
20
20
  :blocked_assertions,
@@ -24,7 +24,7 @@ module Retab
24
24
  def initialize(json)
25
25
  super()
26
26
  hash = self.class.normalize(json)
27
- @result = hash[:result]
27
+ @passed = hash[:passed]
28
28
  @assertions_passed = hash[:assertions_passed]
29
29
  @assertions_failed = hash[:assertions_failed]
30
30
  @blocked_assertions = hash[:blocked_assertions]
@@ -20,7 +20,7 @@ module Retab
20
20
  block_config_fingerprint: :block_config_fingerprint,
21
21
  source: :source,
22
22
  outputs: :outputs,
23
- routing_decision: :routing_decision,
23
+ routing_decisions: :routing_decisions,
24
24
  warnings: :warnings,
25
25
  error: :error,
26
26
  skipped: :skipped,
@@ -43,7 +43,7 @@ module Retab
43
43
  :block_config_fingerprint,
44
44
  :source,
45
45
  :outputs,
46
- :routing_decision,
46
+ :routing_decisions,
47
47
  :warnings,
48
48
  :error,
49
49
  :skipped,
@@ -94,10 +94,10 @@ module Retab
94
94
  end
95
95
  ) : nil
96
96
  @outputs = hash[:outputs] || {}
97
- @routing_decision = (hash[:routing_decision] || [])
97
+ @routing_decisions = (hash[:routing_decisions] || [])
98
98
  @warnings = (hash[:warnings] || [])
99
99
  @error = hash[:error] ? Retab::ErrorDetails.new(hash[:error]) : nil
100
- @skipped = hash[:skipped]
100
+ @skipped = hash[:skipped].nil? ? false : hash[:skipped]
101
101
  @assertion_result = hash[:assertion_result] ? Retab::AssertionResult.new(hash[:assertion_result]) : nil
102
102
  @verdict_summary = hash[:verdict_summary] ? Retab::VerdictSummary.new(hash[:verdict_summary]) : nil
103
103
  end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module Retab
6
+ WorkflowTestRunTiming = ExperimentRunTiming
7
+ end
@@ -7,7 +7,8 @@ module Retab
7
7
 
8
8
  HASH_ATTRS = {
9
9
  id: :id,
10
- workflow: :workflow,
10
+ workflow_id: :workflow_id,
11
+ workflow_version_id: :workflow_version_id,
11
12
  trigger: :trigger,
12
13
  lifecycle: :lifecycle,
13
14
  timing: :timing,
@@ -19,7 +20,8 @@ module Retab
19
20
 
20
21
  attr_accessor(
21
22
  :id,
22
- :workflow,
23
+ :workflow_id,
24
+ :workflow_version_id,
23
25
  :trigger,
24
26
  :lifecycle,
25
27
  :timing,
@@ -33,25 +35,9 @@ module Retab
33
35
  super()
34
36
  hash = self.class.normalize(json)
35
37
  @id = hash[:id]
36
- @workflow = hash[:workflow] ? Retab::WorkflowSnapshotRef.new(hash[:workflow]) : nil
37
- @trigger = hash[:trigger] ? (
38
- case hash[:trigger][:type]
39
- when "api"
40
- Retab::ApiTrigger.new(hash[:trigger])
41
- when "email"
42
- Retab::EmailTrigger.new(hash[:trigger])
43
- when "manual"
44
- Retab::ManualTrigger.new(hash[:trigger])
45
- when "restart"
46
- Retab::RestartTrigger.new(hash[:trigger])
47
- when "schedule"
48
- Retab::ScheduleTrigger.new(hash[:trigger])
49
- when "webhook"
50
- Retab::WebhookTrigger.new(hash[:trigger])
51
- else
52
- hash[:trigger]
53
- end
54
- ) : nil
38
+ @workflow_id = hash[:workflow_id]
39
+ @workflow_version_id = hash[:workflow_version_id]
40
+ @trigger = hash[:trigger] ? Retab::TriggerInfo.new(hash[:trigger]) : nil
55
41
  @lifecycle = hash[:lifecycle] ? (
56
42
  case hash[:lifecycle][:status]
57
43
  when "cancelled"
@@ -15,10 +15,8 @@ module Retab
15
15
  # @param test_id [String, nil]
16
16
  # @param target_block_id [String, nil]
17
17
  # @param status [String, nil]
18
- # @param statuses [Array<String>, nil]
19
18
  # @param exclude_status [String, nil]
20
19
  # @param trigger_type [String, nil]
21
- # @param trigger_types [Array<String>, nil]
22
20
  # @param from_date [String, nil]
23
21
  # @param to_date [String, nil]
24
22
  # @param sort_by [String, nil]
@@ -33,10 +31,8 @@ module Retab
33
31
  test_id: nil,
34
32
  target_block_id: nil,
35
33
  status: nil,
36
- statuses: nil,
37
34
  exclude_status: nil,
38
35
  trigger_type: nil,
39
- trigger_types: nil,
40
36
  from_date: nil,
41
37
  to_date: nil,
42
38
  sort_by: "created_at",
@@ -51,10 +47,8 @@ module Retab
51
47
  "test_id" => test_id,
52
48
  "target_block_id" => target_block_id,
53
49
  "status" => status,
54
- "statuses" => statuses,
55
50
  "exclude_status" => exclude_status,
56
51
  "trigger_type" => trigger_type,
57
- "trigger_types" => trigger_types,
58
52
  "from_date" => from_date,
59
53
  "to_date" => to_date,
60
54
  "sort_by" => sort_by,
@@ -76,10 +70,8 @@ module Retab
76
70
  test_id: test_id,
77
71
  target_block_id: target_block_id,
78
72
  status: status,
79
- statuses: statuses,
80
73
  exclude_status: exclude_status,
81
74
  trigger_type: trigger_type,
82
- trigger_types: trigger_types,
83
75
  from_date: from_date,
84
76
  to_date: to_date,
85
77
  sort_by: sort_by,
@@ -98,10 +90,8 @@ module Retab
98
90
  test_id: test_id,
99
91
  target_block_id: target_block_id,
100
92
  status: status,
101
- statuses: statuses,
102
93
  exclude_status: exclude_status,
103
94
  trigger_type: trigger_type,
104
- trigger_types: trigger_types,
105
95
  from_date: from_date,
106
96
  to_date: to_date,
107
97
  sort_by: sort_by,
@@ -115,7 +105,7 @@ module Retab
115
105
 
116
106
  # Create Test Run
117
107
  # @param workflow_id [String]
118
- # @param scope [Retab::WorkflowTestRunSingleScope, Retab::WorkflowTestRunWorkflowScope, Retab::WorkflowTestRunBlockScope, nil] Optional execution scope. Omit to run every saved test in the workflow.
108
+ # @param scope [Retab::WorkflowTestRunSingleScope, Retab::WorkflowTestRunWorkflowScope, Retab::WorkflowTestRunBlockScope, nil] Optional execution scope. Omit (or pass null) to run every saved test in the workflow.
119
109
  # @param request_options [Hash] (see Retab::Types::RequestOptions)
120
110
  # @return [Retab::WorkflowTestRun]
121
111
  def create(
@@ -18,7 +18,7 @@ module Retab
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @kind = hash[:kind]
21
+ @kind = hash[:kind].nil? ? "all_items_match" : hash[:kind]
22
22
  @condition = hash[:condition] ? (
23
23
  case hash[:condition][:kind]
24
24
  when "all_items_match"
@@ -18,7 +18,7 @@ module Retab
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @kind = hash[:kind]
21
+ @kind = hash[:kind].nil? ? "any_item_matches" : hash[:kind]
22
22
  @condition = hash[:condition] ? (
23
23
  case hash[:condition][:kind]
24
24
  when "all_items_match"
@@ -18,7 +18,7 @@ module Retab
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @kind = hash[:kind]
21
+ @kind = hash[:kind].nil? ? "array_contains" : hash[:kind]
22
22
  @expected = hash[:expected] || {}
23
23
  end
24
24
  end
@@ -25,7 +25,7 @@ module Retab
25
25
  @output_handle_id = hash[:output_handle_id]
26
26
  @schema_path = hash[:schema_path]
27
27
  @subtree_hash = hash[:subtree_hash]
28
- @depends_on_root = hash[:depends_on_root]
28
+ @depends_on_root = hash[:depends_on_root].nil? ? false : hash[:depends_on_root]
29
29
  end
30
30
  end
31
31
  end
@@ -22,10 +22,10 @@ module Retab
22
22
  def initialize(json)
23
23
  super()
24
24
  hash = self.class.normalize(json)
25
- @kind = hash[:kind]
25
+ @kind = hash[:kind].nil? ? "between" : hash[:kind]
26
26
  @lower = hash[:lower]
27
27
  @upper = hash[:upper]
28
- @inclusive = hash[:inclusive]
28
+ @inclusive = hash[:inclusive].nil? ? true : hash[:inclusive]
29
29
  end
30
30
  end
31
31
  end
@@ -18,7 +18,7 @@ module Retab
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @kind = hash[:kind]
21
+ @kind = hash[:kind].nil? ? "contains" : hash[:kind]
22
22
  @expected = hash[:expected]
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ module Retab
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @kind = hash[:kind]
21
+ @kind = hash[:kind].nil? ? "ends_with" : hash[:kind]
22
22
  @expected = hash[:expected]
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ module Retab
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @kind = hash[:kind]
21
+ @kind = hash[:kind].nil? ? "equals" : hash[:kind]
22
22
  @expected = hash[:expected]
23
23
  end
24
24
  end
@@ -14,7 +14,7 @@ module Retab
14
14
  def initialize(json)
15
15
  super()
16
16
  hash = self.class.normalize(json)
17
- @kind = hash[:kind]
17
+ @kind = hash[:kind].nil? ? "exists" : hash[:kind]
18
18
  end
19
19
  end
20
20
  end
@@ -18,7 +18,7 @@ module Retab
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @kind = hash[:kind]
21
+ @kind = hash[:kind].nil? ? "json_schema_valid" : hash[:kind]
22
22
  @schema = hash[:schema] || {}
23
23
  end
24
24
  end
@@ -20,7 +20,7 @@ module Retab
20
20
  def initialize(json)
21
21
  super()
22
22
  hash = self.class.normalize(json)
23
- @kind = hash[:kind]
23
+ @kind = hash[:kind].nil? ? "length_compare" : hash[:kind]
24
24
  @op = hash[:op]
25
25
  @expected = hash[:expected]
26
26
  end
@@ -20,7 +20,7 @@ module Retab
20
20
  def initialize(json)
21
21
  super()
22
22
  hash = self.class.normalize(json)
23
- @kind = hash[:kind]
23
+ @kind = hash[:kind].nil? ? "llm_judged_as" : hash[:kind]
24
24
  @rubric = hash[:rubric]
25
25
  @expected_label = hash[:expected_label]
26
26
  end
@@ -20,7 +20,7 @@ module Retab
20
20
  def initialize(json)
21
21
  super()
22
22
  hash = self.class.normalize(json)
23
- @kind = hash[:kind]
23
+ @kind = hash[:kind].nil? ? "llm_not_judged_as" : hash[:kind]
24
24
  @rubric = hash[:rubric]
25
25
  @expected_label = hash[:expected_label]
26
26
  end
@@ -18,7 +18,7 @@ module Retab
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @type = hash[:type]
21
+ @type = hash[:type].nil? ? "manual" : hash[:type]
22
22
  @handle_inputs = hash[:handle_inputs] || {}
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ module Retab
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @kind = hash[:kind]
21
+ @kind = hash[:kind].nil? ? "matches_regex" : hash[:kind]
22
22
  @pattern = hash[:pattern]
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ module Retab
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @kind = hash[:kind]
21
+ @kind = hash[:kind].nil? ? "not_contains" : hash[:kind]
22
22
  @expected = hash[:expected]
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ module Retab
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @kind = hash[:kind]
21
+ @kind = hash[:kind].nil? ? "not_equals" : hash[:kind]
22
22
  @expected = hash[:expected]
23
23
  end
24
24
  end
@@ -14,7 +14,7 @@ module Retab
14
14
  def initialize(json)
15
15
  super()
16
16
  hash = self.class.normalize(json)
17
- @kind = hash[:kind]
17
+ @kind = hash[:kind].nil? ? "not_exists" : hash[:kind]
18
18
  end
19
19
  end
20
20
  end
@@ -20,7 +20,7 @@ module Retab
20
20
  def initialize(json)
21
21
  super()
22
22
  hash = self.class.normalize(json)
23
- @kind = hash[:kind]
23
+ @kind = hash[:kind].nil? ? "number_compare" : hash[:kind]
24
24
  @op = hash[:op]
25
25
  @expected = hash[:expected]
26
26
  end
@@ -18,7 +18,7 @@ module Retab
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @kind = hash[:kind]
21
+ @kind = hash[:kind].nil? ? "object_contains" : hash[:kind]
22
22
  @expected = hash[:expected] || {}
23
23
  end
24
24
  end
@@ -20,7 +20,7 @@ module Retab
20
20
  def initialize(json)
21
21
  super()
22
22
  hash = self.class.normalize(json)
23
- @type = hash[:type]
23
+ @type = hash[:type].nil? ? "run_step" : hash[:type]
24
24
  @run_id = hash[:run_id]
25
25
  @step_id = hash[:step_id]
26
26
  end
@@ -22,10 +22,10 @@ module Retab
22
22
  def initialize(json)
23
23
  super()
24
24
  hash = self.class.normalize(json)
25
- @kind = hash[:kind]
25
+ @kind = hash[:kind].nil? ? "similarity_gte" : hash[:kind]
26
26
  @reference = hash[:reference]
27
27
  @threshold = hash[:threshold]
28
- @method = hash[:method]
28
+ @method = hash[:method].nil? ? "levenshtein" : hash[:method]
29
29
  end
30
30
  end
31
31
  end
@@ -20,7 +20,7 @@ module Retab
20
20
  def initialize(json)
21
21
  super()
22
22
  hash = self.class.normalize(json)
23
- @kind = hash[:kind]
23
+ @kind = hash[:kind].nil? ? "split_iou_gte" : hash[:kind]
24
24
  @expected = hash[:expected] || {}
25
25
  @threshold = hash[:threshold]
26
26
  end
@@ -18,7 +18,7 @@ module Retab
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @kind = hash[:kind]
21
+ @kind = hash[:kind].nil? ? "starts_with" : hash[:kind]
22
22
  @expected = hash[:expected]
23
23
  end
24
24
  end
@@ -65,9 +65,9 @@ module Retab
65
65
  @assertion = hash[:assertion] ? Retab::AssertionSpec.new(hash[:assertion]) : nil
66
66
  @assertion_schema_dep = hash[:assertion_schema_dep] ? Retab::AssertionSchemaDep.new(hash[:assertion_schema_dep]) : nil
67
67
  @assertion_drift_status = hash[:assertion_drift_status]
68
- @schema_drift = hash[:schema_drift]
68
+ @schema_drift = hash[:schema_drift].nil? ? "unknown" : hash[:schema_drift]
69
69
  @schema_drift_detail = hash[:schema_drift_detail]
70
- @validation_status = hash[:validation_status]
70
+ @validation_status = hash[:validation_status].nil? ? "valid" : hash[:validation_status]
71
71
  @validation_issues = (hash[:validation_issues] || [])
72
72
  @latest_run_summary = hash[:latest_run_summary] ? Retab::LatestBlockTestRunSummary.new(hash[:latest_run_summary]) : nil
73
73
  @latest_passing_run_summary = hash[:latest_passing_run_summary] ? Retab::LatestBlockTestRunSummary.new(
@@ -18,7 +18,7 @@ module Retab
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @type = hash[:type]
21
+ @type = hash[:type].nil? ? "block" : hash[:type]
22
22
  @block_id = hash[:block_id]
23
23
  end
24
24
  end
@@ -18,8 +18,8 @@ module Retab
18
18
  def initialize(json)
19
19
  super()
20
20
  hash = self.class.normalize(json)
21
- @name = hash[:name]
22
- @description = hash[:description]
21
+ @name = hash[:name].nil? ? "Untitled Workflow" : hash[:name]
22
+ @description = hash[:description].nil? ? "" : hash[:description]
23
23
  end
24
24
  end
25
25
  end
@@ -14,7 +14,7 @@ module Retab
14
14
  def initialize(json)
15
15
  super()
16
16
  hash = self.class.normalize(json)
17
- @description = hash[:description]
17
+ @description = hash[:description].nil? ? "" : hash[:description]
18
18
  end
19
19
  end
20
20
  end
@@ -27,8 +27,8 @@ module Retab
27
27
  super()
28
28
  hash = self.class.normalize(json)
29
29
  @id = hash[:id]
30
- @name = hash[:name]
31
- @description = hash[:description]
30
+ @name = hash[:name].nil? ? "Untitled Workflow" : hash[:name]
31
+ @description = hash[:description].nil? ? "" : hash[:description]
32
32
  @published = hash[:published] ? Retab::WorkflowPublished.new(hash[:published]) : nil
33
33
  @created_at = hash[:created_at]
34
34
  @updated_at = hash[:updated_at]