roast-ai 0.4.4 → 0.4.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 (231) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +2 -0
  3. data/.github/workflows/ci.yaml +1 -0
  4. data/.gitignore +0 -26
  5. data/.rubocop.yml +13 -0
  6. data/.rubocop_todo.yml +21 -0
  7. data/CHANGELOG.md +29 -0
  8. data/Gemfile +4 -0
  9. data/Gemfile.lock +43 -1
  10. data/bin/rubocop +27 -0
  11. data/bin/spoom +27 -0
  12. data/bin/srb +27 -0
  13. data/bin/srb-rbi +27 -0
  14. data/bin/tapioca +27 -0
  15. data/docs/INSTRUMENTATION.md +3 -3
  16. data/dsl/simple.rb +10 -0
  17. data/lib/roast/dsl/executor.rb +26 -0
  18. data/lib/roast/dsl.rb +7 -0
  19. data/lib/roast/errors.rb +1 -0
  20. data/lib/roast/factories/api_provider_factory.rb +1 -0
  21. data/lib/roast/helpers/function_caching_interceptor.rb +3 -0
  22. data/lib/roast/helpers/logger.rb +6 -9
  23. data/lib/roast/helpers/metadata_access.rb +1 -0
  24. data/lib/roast/helpers/minitest_coverage_runner.rb +1 -0
  25. data/lib/roast/helpers/path_resolver.rb +8 -18
  26. data/lib/roast/helpers/prompt_loader.rb +3 -2
  27. data/lib/roast/helpers/timeout_handler.rb +3 -5
  28. data/lib/roast/initializers.rb +1 -0
  29. data/lib/roast/resources/api_resource.rb +4 -3
  30. data/lib/roast/resources/base_resource.rb +1 -0
  31. data/lib/roast/resources/directory_resource.rb +1 -0
  32. data/lib/roast/resources/file_resource.rb +1 -0
  33. data/lib/roast/resources/none_resource.rb +1 -0
  34. data/lib/roast/resources/url_resource.rb +2 -1
  35. data/lib/roast/resources.rb +1 -2
  36. data/lib/roast/services/context_threshold_checker.rb +1 -0
  37. data/lib/roast/services/token_counting_service.rb +1 -0
  38. data/lib/roast/tools/apply_diff.rb +1 -0
  39. data/lib/roast/tools/ask_user.rb +1 -0
  40. data/lib/roast/tools/bash.rb +1 -0
  41. data/lib/roast/tools/cmd.rb +1 -0
  42. data/lib/roast/tools/coding_agent.rb +1 -0
  43. data/lib/roast/tools/context_summarizer.rb +1 -0
  44. data/lib/roast/tools/grep.rb +1 -0
  45. data/lib/roast/tools/helpers/coding_agent_message_formatter.rb +1 -0
  46. data/lib/roast/tools/read_file.rb +1 -0
  47. data/lib/roast/tools/search_file.rb +1 -0
  48. data/lib/roast/tools/swarm.rb +1 -0
  49. data/lib/roast/tools/update_files.rb +1 -0
  50. data/lib/roast/tools/write_file.rb +1 -0
  51. data/lib/roast/tools.rb +2 -0
  52. data/lib/roast/value_objects/api_token.rb +1 -0
  53. data/lib/roast/value_objects/step_name.rb +1 -0
  54. data/lib/roast/value_objects/uri_base.rb +1 -0
  55. data/lib/roast/value_objects/workflow_path.rb +1 -0
  56. data/lib/roast/value_objects.rb +1 -0
  57. data/lib/roast/version.rb +2 -1
  58. data/lib/roast/workflow/agent_step.rb +1 -0
  59. data/lib/roast/workflow/api_configuration.rb +1 -0
  60. data/lib/roast/workflow/base_iteration_step.rb +1 -0
  61. data/lib/roast/workflow/base_step.rb +1 -0
  62. data/lib/roast/workflow/base_workflow.rb +1 -0
  63. data/lib/roast/workflow/case_executor.rb +1 -0
  64. data/lib/roast/workflow/case_step.rb +1 -0
  65. data/lib/roast/workflow/command_executor.rb +1 -0
  66. data/lib/roast/workflow/conditional_executor.rb +1 -0
  67. data/lib/roast/workflow/conditional_step.rb +1 -0
  68. data/lib/roast/workflow/configuration.rb +9 -0
  69. data/lib/roast/workflow/configuration_loader.rb +4 -1
  70. data/lib/roast/workflow/context_manager.rb +1 -0
  71. data/lib/roast/workflow/context_path_resolver.rb +1 -0
  72. data/lib/roast/workflow/dot_access_hash.rb +1 -0
  73. data/lib/roast/workflow/each_step.rb +1 -0
  74. data/lib/roast/workflow/error_handler.rb +7 -1
  75. data/lib/roast/workflow/expression_evaluator.rb +1 -0
  76. data/lib/roast/workflow/expression_utils.rb +1 -0
  77. data/lib/roast/workflow/file_state_repository.rb +2 -1
  78. data/lib/roast/workflow/input_executor.rb +1 -0
  79. data/lib/roast/workflow/input_step.rb +1 -0
  80. data/lib/roast/workflow/interpolator.rb +2 -1
  81. data/lib/roast/workflow/iteration_executor.rb +1 -0
  82. data/lib/roast/workflow/llm_boolean_coercer.rb +1 -0
  83. data/lib/roast/workflow/metadata_manager.rb +1 -0
  84. data/lib/roast/workflow/output_handler.rb +1 -0
  85. data/lib/roast/workflow/output_manager.rb +1 -0
  86. data/lib/roast/workflow/parallel_executor.rb +1 -0
  87. data/lib/roast/workflow/prompt_step.rb +1 -0
  88. data/lib/roast/workflow/repeat_step.rb +1 -0
  89. data/lib/roast/workflow/replay_handler.rb +1 -0
  90. data/lib/roast/workflow/resource_resolver.rb +2 -6
  91. data/lib/roast/workflow/session_manager.rb +1 -0
  92. data/lib/roast/workflow/shell_script_step.rb +1 -0
  93. data/lib/roast/workflow/sqlite_state_repository.rb +1 -0
  94. data/lib/roast/workflow/state_manager.rb +1 -0
  95. data/lib/roast/workflow/state_repository.rb +1 -0
  96. data/lib/roast/workflow/state_repository_factory.rb +4 -2
  97. data/lib/roast/workflow/step_completion_reporter.rb +1 -0
  98. data/lib/roast/workflow/step_executor_coordinator.rb +9 -5
  99. data/lib/roast/workflow/step_executor_factory.rb +1 -0
  100. data/lib/roast/workflow/step_executor_registry.rb +2 -3
  101. data/lib/roast/workflow/step_executor_with_reporting.rb +1 -0
  102. data/lib/roast/workflow/step_executors/base_step_executor.rb +1 -0
  103. data/lib/roast/workflow/step_executors/hash_step_executor.rb +1 -0
  104. data/lib/roast/workflow/step_executors/parallel_step_executor.rb +1 -0
  105. data/lib/roast/workflow/step_executors/string_step_executor.rb +1 -0
  106. data/lib/roast/workflow/step_factory.rb +1 -0
  107. data/lib/roast/workflow/step_finder.rb +1 -0
  108. data/lib/roast/workflow/step_loader.rb +1 -0
  109. data/lib/roast/workflow/step_name_extractor.rb +1 -0
  110. data/lib/roast/workflow/step_runner.rb +1 -0
  111. data/lib/roast/workflow/step_type_resolver.rb +1 -0
  112. data/lib/roast/workflow/validation_command.rb +1 -0
  113. data/lib/roast/workflow/validator.rb +1 -0
  114. data/lib/roast/workflow/validators/base_validator.rb +1 -0
  115. data/lib/roast/workflow/validators/dependency_validator.rb +1 -0
  116. data/lib/roast/workflow/validators/linting_validator.rb +1 -0
  117. data/lib/roast/workflow/validators/schema_validator.rb +1 -0
  118. data/lib/roast/workflow/validators/step_collector.rb +1 -0
  119. data/lib/roast/workflow/validators/validation_orchestrator.rb +1 -0
  120. data/lib/roast/workflow/workflow_context.rb +1 -0
  121. data/lib/roast/workflow/workflow_execution_context.rb +1 -0
  122. data/lib/roast/workflow/workflow_executor.rb +2 -1
  123. data/lib/roast/workflow/workflow_initializer.rb +1 -0
  124. data/lib/roast/workflow/workflow_runner.rb +66 -55
  125. data/lib/roast/workflow.rb +1 -0
  126. data/lib/roast/workflow_diagram_generator.rb +3 -2
  127. data/lib/roast.rb +23 -8
  128. data/sorbet/config +8 -0
  129. data/sorbet/rbi/dsl/.gitattributes +1 -0
  130. data/sorbet/rbi/dsl/active_support/callbacks.rbi +21 -0
  131. data/sorbet/rbi/gems/.gitattributes +1 -0
  132. data/sorbet/rbi/gems/activesupport@8.0.2.rbi +19107 -0
  133. data/sorbet/rbi/gems/addressable@2.8.7.rbi +1994 -0
  134. data/sorbet/rbi/gems/ast@2.4.3.rbi +585 -0
  135. data/sorbet/rbi/gems/base64@0.3.0.rbi +545 -0
  136. data/sorbet/rbi/gems/benchmark@0.4.1.rbi +619 -0
  137. data/sorbet/rbi/gems/bigdecimal@3.2.2.rbi +62 -0
  138. data/sorbet/rbi/gems/cgi@0.5.0.rbi +2961 -0
  139. data/sorbet/rbi/gems/claude_swarm@0.1.19.rbi +568 -0
  140. data/sorbet/rbi/gems/cli-kit@5.0.1.rbi +1991 -0
  141. data/sorbet/rbi/gems/cli-ui@2.3.0.rbi +3181 -0
  142. data/sorbet/rbi/gems/coderay@1.1.3.rbi +9 -0
  143. data/sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi +11657 -0
  144. data/sorbet/rbi/gems/connection_pool@2.5.3.rbi +9 -0
  145. data/sorbet/rbi/gems/crack@1.0.0.rbi +145 -0
  146. data/sorbet/rbi/gems/diff-lcs@1.6.2.rbi +972 -0
  147. data/sorbet/rbi/gems/dotenv@3.1.8.rbi +295 -0
  148. data/sorbet/rbi/gems/drb@2.2.3.rbi +1661 -0
  149. data/sorbet/rbi/gems/dry-configurable@1.3.0.rbi +672 -0
  150. data/sorbet/rbi/gems/dry-core@1.1.0.rbi +1894 -0
  151. data/sorbet/rbi/gems/dry-inflector@1.2.0.rbi +659 -0
  152. data/sorbet/rbi/gems/dry-initializer@3.2.0.rbi +781 -0
  153. data/sorbet/rbi/gems/dry-logic@1.6.0.rbi +1127 -0
  154. data/sorbet/rbi/gems/dry-schema@1.14.1.rbi +3727 -0
  155. data/sorbet/rbi/gems/dry-types@1.8.3.rbi +3969 -0
  156. data/sorbet/rbi/gems/erubi@1.13.1.rbi +155 -0
  157. data/sorbet/rbi/gems/event_stream_parser@1.0.0.rbi +49 -0
  158. data/sorbet/rbi/gems/faraday-multipart@1.1.1.rbi +283 -0
  159. data/sorbet/rbi/gems/faraday-net_http@3.4.1.rbi +147 -0
  160. data/sorbet/rbi/gems/faraday-retry@2.3.2.rbi +9 -0
  161. data/sorbet/rbi/gems/faraday@2.13.1.rbi +2977 -0
  162. data/sorbet/rbi/gems/fast-mcp-annotations@1.5.3.rbi +1588 -0
  163. data/sorbet/rbi/gems/ffi@1.17.2.rbi +9 -0
  164. data/sorbet/rbi/gems/formatador@1.1.0.rbi +9 -0
  165. data/sorbet/rbi/gems/guard-compat@1.2.1.rbi +102 -0
  166. data/sorbet/rbi/gems/guard-minitest@2.4.6.rbi +402 -0
  167. data/sorbet/rbi/gems/guard@2.19.1.rbi +2283 -0
  168. data/sorbet/rbi/gems/hashdiff@1.2.0.rbi +355 -0
  169. data/sorbet/rbi/gems/i18n@1.14.7.rbi +2359 -0
  170. data/sorbet/rbi/gems/json-schema@5.1.1.rbi +1466 -0
  171. data/sorbet/rbi/gems/json@2.12.2.rbi +2051 -0
  172. data/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi +9 -0
  173. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +9 -0
  174. data/sorbet/rbi/gems/listen@3.9.0.rbi +1206 -0
  175. data/sorbet/rbi/gems/logger@1.7.0.rbi +963 -0
  176. data/sorbet/rbi/gems/lumberjack@1.2.10.rbi +1830 -0
  177. data/sorbet/rbi/gems/method_source@1.1.0.rbi +9 -0
  178. data/sorbet/rbi/gems/mime-types-data@3.2025.0617.rbi +136 -0
  179. data/sorbet/rbi/gems/mime-types@3.7.0.rbi +1342 -0
  180. data/sorbet/rbi/gems/minitest-rg@5.3.0.rbi +160 -0
  181. data/sorbet/rbi/gems/minitest@5.25.5.rbi +1640 -0
  182. data/sorbet/rbi/gems/mocha@2.7.1.rbi +12 -0
  183. data/sorbet/rbi/gems/multipart-post@2.4.1.rbi +244 -0
  184. data/sorbet/rbi/gems/nenv@0.3.0.rbi +147 -0
  185. data/sorbet/rbi/gems/net-http@0.6.0.rbi +4247 -0
  186. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  187. data/sorbet/rbi/gems/notiffany@0.1.3.rbi +1079 -0
  188. data/sorbet/rbi/gems/open_router@0.3.3.rbi +230 -0
  189. data/sorbet/rbi/gems/ostruct@0.6.2.rbi +354 -0
  190. data/sorbet/rbi/gems/parallel@1.27.0.rbi +291 -0
  191. data/sorbet/rbi/gems/parser@3.3.8.0.rbi +5535 -0
  192. data/sorbet/rbi/gems/prism@1.4.0.rbi +41732 -0
  193. data/sorbet/rbi/gems/pry@0.15.2.rbi +9 -0
  194. data/sorbet/rbi/gems/public_suffix@6.0.2.rbi +936 -0
  195. data/sorbet/rbi/gems/racc@1.8.1.rbi +158 -0
  196. data/sorbet/rbi/gems/rack@2.2.17.rbi +5659 -0
  197. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +9 -0
  198. data/sorbet/rbi/gems/raix@1.0.2.rbi +1104 -0
  199. data/sorbet/rbi/gems/rake@13.3.0.rbi +3036 -0
  200. data/sorbet/rbi/gems/rb-fsevent@0.11.2.rbi +9 -0
  201. data/sorbet/rbi/gems/rb-inotify@0.11.1.rbi +9 -0
  202. data/sorbet/rbi/gems/rbi@0.3.6.rbi +6893 -0
  203. data/sorbet/rbi/gems/rbs@3.9.4.rbi +6978 -0
  204. data/sorbet/rbi/gems/regexp_parser@2.10.0.rbi +9 -0
  205. data/sorbet/rbi/gems/rexml@3.4.1.rbi +5346 -0
  206. data/sorbet/rbi/gems/rubocop-ast@1.45.1.rbi +9 -0
  207. data/sorbet/rbi/gems/rubocop-shopify@2.17.1.rbi +9 -0
  208. data/sorbet/rbi/gems/rubocop@1.77.0.rbi +9 -0
  209. data/sorbet/rbi/gems/ruby-graphviz@1.2.5.rbi +1333 -0
  210. data/sorbet/rbi/gems/ruby-openai@8.1.0.rbi +758 -0
  211. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +9 -0
  212. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +9 -0
  213. data/sorbet/rbi/gems/securerandom@0.4.1.rbi +75 -0
  214. data/sorbet/rbi/gems/shellany@0.0.1.rbi +102 -0
  215. data/sorbet/rbi/gems/spoom@1.6.3.rbi +6985 -0
  216. data/sorbet/rbi/gems/sqlite3@2.7.0.rbi +1900 -0
  217. data/sorbet/rbi/gems/tapioca@0.16.11.rbi +3628 -0
  218. data/sorbet/rbi/gems/thor@1.4.0.rbi +4399 -0
  219. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5918 -0
  220. data/sorbet/rbi/gems/unicode-display_width@3.1.4.rbi +9 -0
  221. data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +9 -0
  222. data/sorbet/rbi/gems/uri@1.0.3.rbi +2349 -0
  223. data/sorbet/rbi/gems/vcr@6.3.1.rbi +3040 -0
  224. data/sorbet/rbi/gems/webmock@3.25.1.rbi +1792 -0
  225. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
  226. data/sorbet/rbi/gems/yard@0.9.37.rbi +18492 -0
  227. data/sorbet/rbi/gems/zeitwerk@2.7.3.rbi +1429 -0
  228. data/sorbet/tapioca/config.yml +13 -0
  229. data/sorbet/tapioca/require.rb +36 -0
  230. metadata +113 -2
  231. data/lib/roast/workflow/configuration_parser.rb +0 -54
@@ -0,0 +1,355 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `hashdiff` gem.
5
+ # Please instead update this file by running `bin/tapioca gem hashdiff`.
6
+
7
+
8
+ # This module provides methods to diff two hash, patch and unpatch hash
9
+ #
10
+ # source://hashdiff//lib/hashdiff/util.rb#3
11
+ module Hashdiff
12
+ class << self
13
+ # Best diff two objects, which tries to generate the smallest change set using different similarity values.
14
+ #
15
+ # Hashdiff.best_diff is useful in case of comparing two objects which include similar hashes in arrays.
16
+ #
17
+ # @example
18
+ # a = {'x' => [{'a' => 1, 'c' => 3, 'e' => 5}, {'y' => 3}]}
19
+ # b = {'x' => [{'a' => 1, 'b' => 2, 'e' => 5}] }
20
+ # diff = Hashdiff.best_diff(a, b)
21
+ # diff.should == [['-', 'x[0].c', 3], ['+', 'x[0].b', 2], ['-', 'x[1].y', 3], ['-', 'x[1]', {}]]
22
+ # @param obj1 [Array, Hash]
23
+ # @param obj2 [Array, Hash]
24
+ # @param options [Hash] the options to use when comparing
25
+ # * :strict (Boolean) [true] whether numeric values will be compared on type as well as value. Set to false to allow comparing Integer, Float, BigDecimal to each other
26
+ # * :ignore_keys (Symbol, String or Array) [[]] a list of keys to ignore. No comparison is made for the specified key(s) in either hash
27
+ # * :indifferent (Boolean) [false] whether to treat hash keys indifferently. Set to true to ignore differences between symbol keys (ie. {a: 1} ~= {'a' => 1})
28
+ # * :delimiter (String) ['.'] the delimiter used when returning nested key references
29
+ # * :numeric_tolerance (Numeric) [0] should be a positive numeric value. Value by which numeric differences must be greater than. By default, numeric values are compared exactly; with the :tolerance option, the difference between numeric values must be greater than the given value.
30
+ # * :strip (Boolean) [false] whether or not to call #strip on strings before comparing
31
+ # * :array_path (Boolean) [false] whether to return the path references for nested values in an array, can be used for patch compatibility with non string keys.
32
+ # * :use_lcs (Boolean) [true] whether or not to use an implementation of the Longest common subsequence algorithm for comparing arrays, produces better diffs but is slower.
33
+ # * :preserve_key_order (Boolean) [false] If false, operations are grouped by type (-, ~, then +) then by hash key alphabetically. If true, preserves the original key order from the first hash and appends new keys from the second hash in order.
34
+ # @return [Array] an array of changes.
35
+ # e.g. [[ '+', 'a.b', '45' ], [ '-', 'a.c', '5' ], [ '~', 'a.x', '45', '63']]
36
+ # @since 0.0.1
37
+ # @yield [path, value1, value2] Optional block is used to compare each value, instead of default #==. If the block returns value other than true of false, then other specified comparison options will be used to do the comparison.
38
+ #
39
+ # source://hashdiff//lib/hashdiff/diff.rb#33
40
+ def best_diff(obj1, obj2, options = T.unsafe(nil), &block); end
41
+
42
+ # check if objects are comparable
43
+ #
44
+ # @private
45
+ # @return [Boolean]
46
+ #
47
+ # source://hashdiff//lib/hashdiff/util.rb#108
48
+ def comparable?(obj1, obj2, strict = T.unsafe(nil)); end
49
+
50
+ # check for equality or "closeness" within given tolerance
51
+ #
52
+ # @private
53
+ #
54
+ # source://hashdiff//lib/hashdiff/util.rb#86
55
+ def compare_values(obj1, obj2, options = T.unsafe(nil)); end
56
+
57
+ # count node differences
58
+ #
59
+ # @private
60
+ #
61
+ # source://hashdiff//lib/hashdiff/util.rb#25
62
+ def count_diff(diffs); end
63
+
64
+ # count total nodes for an object
65
+ #
66
+ # @private
67
+ #
68
+ # source://hashdiff//lib/hashdiff/util.rb#36
69
+ def count_nodes(obj); end
70
+
71
+ # try custom comparison
72
+ #
73
+ # @private
74
+ #
75
+ # source://hashdiff//lib/hashdiff/util.rb#119
76
+ def custom_compare(method, key, obj1, obj2); end
77
+
78
+ # decode property path into an array
79
+ # e.g. "a.b[3].c" => ['a', 'b', 3, 'c']
80
+ #
81
+ # @param path [String] Property-string
82
+ # @param delimiter [String] Property-string delimiter
83
+ # @private
84
+ #
85
+ # source://hashdiff//lib/hashdiff/util.rb#58
86
+ def decode_property_path(path, delimiter = T.unsafe(nil)); end
87
+
88
+ # Compute the diff of two hashes or arrays
89
+ #
90
+ # @example
91
+ # a = {"a" => 1, "b" => {"b1" => 1, "b2" =>2}}
92
+ # b = {"a" => 1, "b" => {}}
93
+ #
94
+ # diff = Hashdiff.diff(a, b)
95
+ # diff.should == [['-', 'b.b1', 1], ['-', 'b.b2', 2]]
96
+ # @param obj1 [Array, Hash]
97
+ # @param obj2 [Array, Hash]
98
+ # @param options [Hash] the options to use when comparing
99
+ # * :strict (Boolean) [true] whether numeric values will be compared on type as well as value. Set to false to allow comparing Integer, Float, BigDecimal to each other
100
+ # * :ignore_keys (Symbol, String or Array) [[]] a list of keys to ignore. No comparison is made for the specified key(s) in either hash
101
+ # * :indifferent (Boolean) [false] whether to treat hash keys indifferently. Set to true to ignore differences between symbol keys (ie. {a: 1} ~= {'a' => 1})
102
+ # * :similarity (Numeric) [0.8] should be between (0, 1]. Meaningful if there are similar hashes in arrays. See {best_diff}.
103
+ # * :delimiter (String) ['.'] the delimiter used when returning nested key references
104
+ # * :numeric_tolerance (Numeric) [0] should be a positive numeric value. Value by which numeric differences must be greater than. By default, numeric values are compared exactly; with the :tolerance option, the difference between numeric values must be greater than the given value.
105
+ # * :strip (Boolean) [false] whether or not to call #strip on strings before comparing
106
+ # * :array_path (Boolean) [false] whether to return the path references for nested values in an array, can be used for patch compatibility with non string keys.
107
+ # * :use_lcs (Boolean) [true] whether or not to use an implementation of the Longest common subsequence algorithm for comparing arrays, produces better diffs but is slower.
108
+ # * :preserve_key_order (Boolean) [false] If false, operations are grouped by type (-, ~, then +) then by hash key alphabetically. If true, preserves the original key order from the first hash and appends new keys from the second hash in order.
109
+ # @return [Array] an array of changes.
110
+ # e.g. [[ '+', 'a.b', '45' ], [ '-', 'a.c', '5' ], [ '~', 'a.x', '45', '63']]
111
+ # @since 0.0.1
112
+ # @yield [path, value1, value2] Optional block is used to compare each value, instead of default #==. If the block returns value other than true of false, then other specified comparison options will be used to do the comparison.
113
+ #
114
+ # source://hashdiff//lib/hashdiff/diff.rb#82
115
+ def diff(obj1, obj2, options = T.unsafe(nil), &block); end
116
+
117
+ # diff array using LCS algorithm
118
+ #
119
+ # @private
120
+ # @yield [links]
121
+ #
122
+ # source://hashdiff//lib/hashdiff/diff.rb#127
123
+ def diff_array_lcs(arraya, arrayb, options = T.unsafe(nil)); end
124
+
125
+ # caculate array difference using LCS algorithm
126
+ # http://en.wikipedia.org/wiki/Longest_common_subsequence_problem
127
+ #
128
+ # @private
129
+ #
130
+ # source://hashdiff//lib/hashdiff/lcs.rb#8
131
+ def lcs(arraya, arrayb, options = T.unsafe(nil)); end
132
+
133
+ # get the node of hash by given path parts
134
+ #
135
+ # @private
136
+ #
137
+ # source://hashdiff//lib/hashdiff/util.rb#75
138
+ def node(hash, parts); end
139
+
140
+ # Apply patch to object
141
+ #
142
+ # @param obj [Hash, Array] the object to be patched, can be an Array or a Hash
143
+ # @param changes [Array] e.g. [[ '+', 'a.b', '45' ], [ '-', 'a.c', '5' ], [ '~', 'a.x', '45', '63']]
144
+ # @param options [Hash] supports following keys:
145
+ # * :delimiter (String) ['.'] delimiter string for representing nested keys in changes array
146
+ # @return the object after patch
147
+ # @since 0.0.1
148
+ #
149
+ # source://hashdiff//lib/hashdiff/patch.rb#17
150
+ def patch!(obj, changes, options = T.unsafe(nil)); end
151
+
152
+ # source://hashdiff//lib/hashdiff/util.rb#137
153
+ def prefix_append_array_index(prefix, array_index, opts); end
154
+
155
+ # source://hashdiff//lib/hashdiff/util.rb#129
156
+ def prefix_append_key(prefix, key, opts); end
157
+
158
+ # judge whether two objects are similar
159
+ #
160
+ # @private
161
+ # @return [Boolean]
162
+ #
163
+ # source://hashdiff//lib/hashdiff/util.rb#7
164
+ def similar?(obja, objb, options = T.unsafe(nil)); end
165
+
166
+ # Unpatch an object
167
+ #
168
+ # @param obj [Hash, Array] the object to be unpatched, can be an Array or a Hash
169
+ # @param changes [Array] e.g. [[ '+', 'a.b', '45' ], [ '-', 'a.c', '5' ], [ '~', 'a.x', '45', '63']]
170
+ # @param options [Hash] supports following keys:
171
+ # * :delimiter (String) ['.'] delimiter string for representing nested keys in changes array
172
+ # @return the object after unpatch
173
+ # @since 0.0.1
174
+ #
175
+ # source://hashdiff//lib/hashdiff/patch.rb#58
176
+ def unpatch!(obj, changes, options = T.unsafe(nil)); end
177
+
178
+ private
179
+
180
+ # checks if both objects are Arrays or Hashes
181
+ #
182
+ # @private
183
+ # @return [Boolean]
184
+ #
185
+ # source://hashdiff//lib/hashdiff/util.rb#151
186
+ def any_hash_or_array?(obja, objb); end
187
+ end
188
+ end
189
+
190
+ # Used to compare hashes
191
+ #
192
+ # @private
193
+ #
194
+ # source://hashdiff//lib/hashdiff/compare_hashes.rb#6
195
+ class Hashdiff::CompareHashes
196
+ class << self
197
+ # source://hashdiff//lib/hashdiff/compare_hashes.rb#8
198
+ def call(obj1, obj2, opts = T.unsafe(nil)); end
199
+ end
200
+ end
201
+
202
+ # Used to compare arrays using the lcs algorithm
203
+ #
204
+ # @private
205
+ #
206
+ # source://hashdiff//lib/hashdiff/lcs_compare_arrays.rb#6
207
+ class Hashdiff::LcsCompareArrays
208
+ class << self
209
+ # source://hashdiff//lib/hashdiff/lcs_compare_arrays.rb#8
210
+ def call(obj1, obj2, opts = T.unsafe(nil)); end
211
+ end
212
+ end
213
+
214
+ # Used to compare arrays in a linear complexity, which produces longer diffs
215
+ # than using the lcs algorithm but is considerably faster
216
+ #
217
+ # @private
218
+ #
219
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#8
220
+ class Hashdiff::LinearCompareArray
221
+ # @return [LinearCompareArray] a new instance of LinearCompareArray
222
+ #
223
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#45
224
+ def initialize(old_array, new_array, options); end
225
+
226
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#14
227
+ def call; end
228
+
229
+ private
230
+
231
+ # Returns the value of attribute additions.
232
+ #
233
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
234
+ def additions; end
235
+
236
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#139
237
+ def append_addition(item, index); end
238
+
239
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#123
240
+ def append_addititions_before_match(match_index); end
241
+
242
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#144
243
+ def append_deletion(item, index); end
244
+
245
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#131
246
+ def append_deletions_before_match(match_index); end
247
+
248
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#149
249
+ def append_differences(difference); end
250
+
251
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#153
252
+ def changes; end
253
+
254
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#67
255
+ def compare_at_index; end
256
+
257
+ # Returns the value of attribute deletions.
258
+ #
259
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
260
+ def deletions; end
261
+
262
+ # Returns the value of attribute differences.
263
+ #
264
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
265
+ def differences; end
266
+
267
+ # Returns the value of attribute expected_additions.
268
+ #
269
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
270
+ def expected_additions; end
271
+
272
+ # Sets the attribute expected_additions
273
+ #
274
+ # @param value the value to set the attribute expected_additions to.
275
+ #
276
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
277
+ def expected_additions=(_arg0); end
278
+
279
+ # @return [Boolean]
280
+ #
281
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#59
282
+ def extra_items_in_new_array?; end
283
+
284
+ # @return [Boolean]
285
+ #
286
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#55
287
+ def extra_items_in_old_array?; end
288
+
289
+ # look ahead in the new array to see if the current item appears later
290
+ # thereby having new items added
291
+ #
292
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#89
293
+ def index_of_match_after_additions; end
294
+
295
+ # look ahead in the old array to see if the current item appears later
296
+ # thereby having items removed
297
+ #
298
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#107
299
+ def index_of_match_after_deletions; end
300
+
301
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#82
302
+ def item_difference(old_item, new_item, item_index); end
303
+
304
+ # @return [Boolean]
305
+ #
306
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#63
307
+ def iterated_through_both_arrays?; end
308
+
309
+ # Returns the value of attribute new_array.
310
+ #
311
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
312
+ def new_array; end
313
+
314
+ # Returns the value of attribute new_index.
315
+ #
316
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
317
+ def new_index; end
318
+
319
+ # Sets the attribute new_index
320
+ #
321
+ # @param value the value to set the attribute new_index to.
322
+ #
323
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
324
+ def new_index=(_arg0); end
325
+
326
+ # Returns the value of attribute old_array.
327
+ #
328
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
329
+ def old_array; end
330
+
331
+ # Returns the value of attribute old_index.
332
+ #
333
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
334
+ def old_index; end
335
+
336
+ # Sets the attribute old_index
337
+ #
338
+ # @param value the value to set the attribute old_index to.
339
+ #
340
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
341
+ def old_index=(_arg0); end
342
+
343
+ # Returns the value of attribute options.
344
+ #
345
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
346
+ def options; end
347
+
348
+ class << self
349
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#9
350
+ def call(old_array, new_array, options = T.unsafe(nil)); end
351
+ end
352
+ end
353
+
354
+ # source://hashdiff//lib/hashdiff/version.rb#4
355
+ Hashdiff::VERSION = T.let(T.unsafe(nil), String)