roast-ai 0.4.6 → 0.4.7
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 +4 -4
- data/.github/workflows/ci.yaml +3 -1
- data/.gitignore +7 -0
- data/.rubocop.yml +14 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +2 -1
- data/Gemfile.lock +9 -1
- data/Rakefile +14 -4
- data/examples/available_tools_demo/workflow.yml +2 -2
- data/examples/cmd/basic_workflow.yml +0 -1
- data/examples/grading/js_test_runner +1 -1
- data/examples/grading/run_coverage.rb +1 -1
- data/examples/user_input/funny_name/workflow.yml +3 -4
- data/lib/roast/dsl/executor.rb +2 -1
- data/lib/roast/helpers/cmd_runner.rb +199 -0
- data/lib/roast/initializers.rb +1 -1
- data/lib/roast/tools/apply_diff.rb +1 -1
- data/lib/roast/tools/bash.rb +4 -4
- data/lib/roast/tools/cmd.rb +3 -5
- data/lib/roast/tools/coding_agent.rb +1 -1
- data/lib/roast/tools/grep.rb +6 -2
- data/lib/roast/tools/read_file.rb +2 -1
- data/lib/roast/tools/swarm.rb +2 -7
- data/lib/roast/tools.rb +10 -1
- data/lib/roast/version.rb +1 -1
- data/lib/roast/workflow/command_executor.rb +3 -3
- data/lib/roast/workflow/resource_resolver.rb +1 -1
- data/lib/roast/workflow/shell_script_step.rb +1 -1
- data/lib/roast.rb +1 -0
- data/rubocop/cop/roast/use_cmd_runner.rb +93 -0
- data/rubocop/cop/roast.rb +4 -0
- data/sorbet/rbi/gems/docile@1.4.1.rbi +377 -0
- data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +233 -2
- data/sorbet/rbi/gems/racc@1.8.1.rbi +6 -4
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +396 -2
- data/sorbet/rbi/gems/regexp_parser@2.10.0.rbi +3788 -2
- data/sorbet/rbi/gems/rubocop-ast@1.45.1.rbi +7747 -2
- data/sorbet/rbi/gems/rubocop-sorbet@0.10.5.rbi +2386 -0
- data/sorbet/rbi/gems/rubocop@1.77.0.rbi +62813 -2
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1311 -2
- data/sorbet/rbi/gems/simplecov-html@0.13.2.rbi +225 -0
- data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2259 -0
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +9 -0
- data/sorbet/rbi/gems/unicode-display_width@3.1.4.rbi +125 -2
- data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +244 -2
- data/sorbet/tapioca/require.rb +2 -1
- metadata +9 -2
- data/lib/roast/helpers/timeout_handler.rb +0 -89
@@ -0,0 +1,9 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `simplecov_json_formatter` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem simplecov_json_formatter`.
|
6
|
+
|
7
|
+
|
8
|
+
# THIS IS AN EMPTY RBI FILE.
|
9
|
+
# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
|
@@ -5,5 +5,128 @@
|
|
5
5
|
# Please instead update this file by running `bin/tapioca gem unicode-display_width`.
|
6
6
|
|
7
7
|
|
8
|
-
#
|
9
|
-
#
|
8
|
+
# require "rbconfig"
|
9
|
+
# RbConfig::CONFIG["host_os"] =~ /mswin|mingw/ # windows
|
10
|
+
#
|
11
|
+
# source://unicode-display_width//lib/unicode/display_width/constants.rb#3
|
12
|
+
module Unicode; end
|
13
|
+
|
14
|
+
# source://unicode-display_width//lib/unicode/display_width/constants.rb#4
|
15
|
+
class Unicode::DisplayWidth
|
16
|
+
# @return [DisplayWidth] a new instance of DisplayWidth
|
17
|
+
#
|
18
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#229
|
19
|
+
def initialize(ambiguous: T.unsafe(nil), overwrite: T.unsafe(nil), emoji: T.unsafe(nil)); end
|
20
|
+
|
21
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#235
|
22
|
+
def get_config(**kwargs); end
|
23
|
+
|
24
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#243
|
25
|
+
def of(string, **kwargs); end
|
26
|
+
|
27
|
+
class << self
|
28
|
+
# source://unicode-display_width//lib/unicode/display_width/index.rb#14
|
29
|
+
def decompress_index(index, level); end
|
30
|
+
|
31
|
+
# Returns width of all considered Emoji and remaining string
|
32
|
+
#
|
33
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#143
|
34
|
+
def emoji_width(string, mode = T.unsafe(nil), ambiguous = T.unsafe(nil)); end
|
35
|
+
|
36
|
+
# Match possible Emoji first, then refine
|
37
|
+
#
|
38
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#173
|
39
|
+
def emoji_width_via_possible(string, emoji_set_regex, strict_eaw = T.unsafe(nil), ambiguous = T.unsafe(nil)); end
|
40
|
+
|
41
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#201
|
42
|
+
def normalize_options(string, ambiguous = T.unsafe(nil), overwrite = T.unsafe(nil), old_options = T.unsafe(nil), **options); end
|
43
|
+
|
44
|
+
# Returns monospace display width of string
|
45
|
+
#
|
46
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#51
|
47
|
+
def of(string, ambiguous = T.unsafe(nil), overwrite = T.unsafe(nil), old_options = T.unsafe(nil), **options); end
|
48
|
+
|
49
|
+
# Returns width for ASCII-only strings. Will consider zero-width control symbols.
|
50
|
+
#
|
51
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#133
|
52
|
+
def width_ascii(string); end
|
53
|
+
|
54
|
+
# Returns width of custom overwrites and remaining string
|
55
|
+
#
|
56
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#117
|
57
|
+
def width_custom(string, overwrite); end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#16
|
62
|
+
Unicode::DisplayWidth::AMBIGUOUS_MAP = T.let(T.unsafe(nil), Hash)
|
63
|
+
|
64
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#15
|
65
|
+
Unicode::DisplayWidth::ASCII_BACKSPACE = T.let(T.unsafe(nil), String)
|
66
|
+
|
67
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#13
|
68
|
+
Unicode::DisplayWidth::ASCII_NON_ZERO_REGEX = T.let(T.unsafe(nil), Regexp)
|
69
|
+
|
70
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#14
|
71
|
+
Unicode::DisplayWidth::ASCII_NON_ZERO_STRING = T.let(T.unsafe(nil), String)
|
72
|
+
|
73
|
+
# source://unicode-display_width//lib/unicode/display_width/constants.rb#7
|
74
|
+
Unicode::DisplayWidth::DATA_DIRECTORY = T.let(T.unsafe(nil), String)
|
75
|
+
|
76
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#11
|
77
|
+
Unicode::DisplayWidth::DEFAULT_AMBIGUOUS = T.let(T.unsafe(nil), Integer)
|
78
|
+
|
79
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#32
|
80
|
+
Unicode::DisplayWidth::EMOJI_SEQUENCES_REGEX_MAPPING = T.let(T.unsafe(nil), Hash)
|
81
|
+
|
82
|
+
# source://unicode-display_width//lib/unicode/display_width/emoji_support.rb#6
|
83
|
+
module Unicode::DisplayWidth::EmojiSupport
|
84
|
+
class << self
|
85
|
+
# Tries to find out which terminal emulator is used to
|
86
|
+
# set emoji: config to best suiting value
|
87
|
+
#
|
88
|
+
# Please also see section in README.md and
|
89
|
+
# misc/terminal-emoji-width.rb
|
90
|
+
#
|
91
|
+
# Please note: Many terminals do not set any ENV vars,
|
92
|
+
# maybe CSI queries can help?
|
93
|
+
#
|
94
|
+
# source://unicode-display_width//lib/unicode/display_width/emoji_support.rb#15
|
95
|
+
def recommended; end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#28
|
100
|
+
Unicode::DisplayWidth::FIRST_4096 = T.let(T.unsafe(nil), Hash)
|
101
|
+
|
102
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#20
|
103
|
+
Unicode::DisplayWidth::FIRST_AMBIGUOUS = T.let(T.unsafe(nil), Hash)
|
104
|
+
|
105
|
+
# source://unicode-display_width//lib/unicode/display_width/index.rb#11
|
106
|
+
Unicode::DisplayWidth::INDEX = T.let(T.unsafe(nil), Hash)
|
107
|
+
|
108
|
+
# source://unicode-display_width//lib/unicode/display_width/constants.rb#8
|
109
|
+
Unicode::DisplayWidth::INDEX_FILENAME = T.let(T.unsafe(nil), String)
|
110
|
+
|
111
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#12
|
112
|
+
Unicode::DisplayWidth::INITIAL_DEPTH = T.let(T.unsafe(nil), Integer)
|
113
|
+
|
114
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#24
|
115
|
+
Unicode::DisplayWidth::NOT_COMMON_NARROW_REGEX = T.let(T.unsafe(nil), Hash)
|
116
|
+
|
117
|
+
# ebase = Unicode::Emoji::REGEX_PROP_MODIFIER_BASE.source
|
118
|
+
#
|
119
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#47
|
120
|
+
Unicode::DisplayWidth::REGEX_EMOJI_ALL_SEQUENCES = T.let(T.unsafe(nil), Regexp)
|
121
|
+
|
122
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#48
|
123
|
+
Unicode::DisplayWidth::REGEX_EMOJI_ALL_SEQUENCES_AND_VS16 = T.let(T.unsafe(nil), Regexp)
|
124
|
+
|
125
|
+
# source://unicode-display_width//lib/unicode/display_width.rb#37
|
126
|
+
Unicode::DisplayWidth::REGEX_EMOJI_VS16 = T.let(T.unsafe(nil), Regexp)
|
127
|
+
|
128
|
+
# source://unicode-display_width//lib/unicode/display_width/constants.rb#6
|
129
|
+
Unicode::DisplayWidth::UNICODE_VERSION = T.let(T.unsafe(nil), String)
|
130
|
+
|
131
|
+
# source://unicode-display_width//lib/unicode/display_width/constants.rb#5
|
132
|
+
Unicode::DisplayWidth::VERSION = T.let(T.unsafe(nil), String)
|
@@ -5,5 +5,247 @@
|
|
5
5
|
# Please instead update this file by running `bin/tapioca gem unicode-emoji`.
|
6
6
|
|
7
7
|
|
8
|
-
#
|
9
|
-
#
|
8
|
+
# This file was generated by a script, please do not edit it by hand.
|
9
|
+
# See `$ rake generate_constants` and data/generate_constants.rb for more info.
|
10
|
+
#
|
11
|
+
# source://unicode-emoji//lib/unicode/emoji/constants.rb#3
|
12
|
+
module Unicode; end
|
13
|
+
|
14
|
+
# source://unicode-emoji//lib/unicode/emoji/constants.rb#4
|
15
|
+
module Unicode::Emoji
|
16
|
+
class << self
|
17
|
+
# Returns ordered list of Emoji, categorized in a three-level deep Hash structure
|
18
|
+
#
|
19
|
+
# source://unicode-emoji//lib/unicode/emoji.rb#80
|
20
|
+
def list(key = T.unsafe(nil), sub_key = T.unsafe(nil)); end
|
21
|
+
|
22
|
+
# Return Emoji properties of character as an Array or nil
|
23
|
+
# See PROPERTY_NAMES constant for possible properties
|
24
|
+
#
|
25
|
+
# Source: see https://www.unicode.org/Public/16.0.0/ucd/emoji/emoji-data.txt
|
26
|
+
#
|
27
|
+
# source://unicode-emoji//lib/unicode/emoji.rb#68
|
28
|
+
def properties(char); end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
# source://unicode-emoji//lib/unicode/emoji.rb#88
|
33
|
+
def get_codepoint_value(char); end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# Last codepoint of tag-based subdivision flags
|
38
|
+
#
|
39
|
+
# source://unicode-emoji//lib/unicode/emoji/constants.rb#31
|
40
|
+
Unicode::Emoji::CANCEL_TAG = T.let(T.unsafe(nil), Integer)
|
41
|
+
|
42
|
+
# source://unicode-emoji//lib/unicode/emoji/constants.rb#7
|
43
|
+
Unicode::Emoji::CLDR_VERSION = T.let(T.unsafe(nil), String)
|
44
|
+
|
45
|
+
# source://unicode-emoji//lib/unicode/emoji/constants.rb#8
|
46
|
+
Unicode::Emoji::DATA_DIRECTORY = T.let(T.unsafe(nil), String)
|
47
|
+
|
48
|
+
# The current list of codepoints with the "Emoji" property
|
49
|
+
# Same characters as \p{Emoji}
|
50
|
+
# (Emoji version of this gem might be more recent than Ruby's Emoji version)
|
51
|
+
#
|
52
|
+
# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#8
|
53
|
+
Unicode::Emoji::EMOJI_CHAR = T.let(T.unsafe(nil), Array)
|
54
|
+
|
55
|
+
# The current list of codepoints with the "Emoji_Component" property
|
56
|
+
# Same characters as \p{Emoji Component} or \p{EComp}
|
57
|
+
# (Emoji version of this gem might be more recent than Ruby's Emoji version)
|
58
|
+
#
|
59
|
+
# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#21
|
60
|
+
Unicode::Emoji::EMOJI_COMPONENT = T.let(T.unsafe(nil), Array)
|
61
|
+
|
62
|
+
# The list of characters that can be used as base for keycap sequences
|
63
|
+
#
|
64
|
+
# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#42
|
65
|
+
Unicode::Emoji::EMOJI_KEYCAPS = T.let(T.unsafe(nil), Array)
|
66
|
+
|
67
|
+
# Combining Enclosing Keycap character
|
68
|
+
#
|
69
|
+
# source://unicode-emoji//lib/unicode/emoji/constants.rb#37
|
70
|
+
Unicode::Emoji::EMOJI_KEYCAP_SUFFIX = T.let(T.unsafe(nil), Integer)
|
71
|
+
|
72
|
+
# The current list of codepoints with the "Emoji_Modifier" property
|
73
|
+
# Same characters as \p{Emoji Modifier} or \p{EMod}
|
74
|
+
# (Emoji version of this gem might be more recent than Ruby's Emoji version)
|
75
|
+
#
|
76
|
+
# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#31
|
77
|
+
Unicode::Emoji::EMOJI_MODIFIERS = T.let(T.unsafe(nil), Array)
|
78
|
+
|
79
|
+
# The current list of codepoints with the "Emoji_Modifier_Base" property
|
80
|
+
# Same characters as \p{Emoji Modifier Base} or \p{EBase}
|
81
|
+
# (Emoji version of this gem might be more recent than Ruby's Emoji version)
|
82
|
+
#
|
83
|
+
# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#26
|
84
|
+
Unicode::Emoji::EMOJI_MODIFIER_BASES = T.let(T.unsafe(nil), Array)
|
85
|
+
|
86
|
+
# The current list of codepoints with the "Emoji_Presentation" property
|
87
|
+
# Same characters as \p{Emoji Presentation} or \p{EPres}
|
88
|
+
# (Emoji version of this gem might be more recent than Ruby's Emoji version)
|
89
|
+
#
|
90
|
+
# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#13
|
91
|
+
Unicode::Emoji::EMOJI_PRESENTATION = T.let(T.unsafe(nil), Array)
|
92
|
+
|
93
|
+
# First codepoint of tag-based subdivision flags
|
94
|
+
#
|
95
|
+
# source://unicode-emoji//lib/unicode/emoji/constants.rb#28
|
96
|
+
Unicode::Emoji::EMOJI_TAG_BASE_FLAG = T.let(T.unsafe(nil), Integer)
|
97
|
+
|
98
|
+
# Variation Selector 16 (VS16), enables emoji presentation mode for preceding codepoint
|
99
|
+
#
|
100
|
+
# source://unicode-emoji//lib/unicode/emoji/constants.rb#22
|
101
|
+
Unicode::Emoji::EMOJI_VARIATION_SELECTOR = T.let(T.unsafe(nil), Integer)
|
102
|
+
|
103
|
+
# source://unicode-emoji//lib/unicode/emoji/constants.rb#6
|
104
|
+
Unicode::Emoji::EMOJI_VERSION = T.let(T.unsafe(nil), String)
|
105
|
+
|
106
|
+
# The current list of codepoints with the "Extended_Pictographic" property
|
107
|
+
# Same characters as \p{Extended Pictographic} or \p{ExtPict}
|
108
|
+
# (Emoji version of this gem might be more recent than Ruby's Emoji version)
|
109
|
+
#
|
110
|
+
# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#36
|
111
|
+
Unicode::Emoji::EXTENDED_PICTOGRAPHIC = T.let(T.unsafe(nil), Array)
|
112
|
+
|
113
|
+
# The current list of codepoints with the "Extended_Pictographic" property that don't have the "Emoji" property
|
114
|
+
#
|
115
|
+
# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#39
|
116
|
+
Unicode::Emoji::EXTENDED_PICTOGRAPHIC_NO_EMOJI = T.let(T.unsafe(nil), Array)
|
117
|
+
|
118
|
+
# source://unicode-emoji//lib/unicode/emoji/index.rb#11
|
119
|
+
Unicode::Emoji::INDEX = T.let(T.unsafe(nil), Hash)
|
120
|
+
|
121
|
+
# source://unicode-emoji//lib/unicode/emoji/constants.rb#9
|
122
|
+
Unicode::Emoji::INDEX_FILENAME = T.let(T.unsafe(nil), String)
|
123
|
+
|
124
|
+
# Contains an ordered and group list of all currently recommended Emoji (RGI/FQE)
|
125
|
+
#
|
126
|
+
# source://unicode-emoji//lib/unicode/emoji/list.rb#6
|
127
|
+
Unicode::Emoji::LIST = T.let(T.unsafe(nil), Hash)
|
128
|
+
|
129
|
+
# Sometimes, categories change, we issue a warning in these cases
|
130
|
+
#
|
131
|
+
# source://unicode-emoji//lib/unicode/emoji/list.rb#9
|
132
|
+
Unicode::Emoji::LIST_REMOVED_KEYS = T.let(T.unsafe(nil), Array)
|
133
|
+
|
134
|
+
# Unicode properties, see https://www.unicode.org/Public/16.0.0/ucd/emoji/emoji-data.txt
|
135
|
+
#
|
136
|
+
# source://unicode-emoji//lib/unicode/emoji/constants.rb#12
|
137
|
+
Unicode::Emoji::PROPERTY_NAMES = T.let(T.unsafe(nil), Hash)
|
138
|
+
|
139
|
+
# The list RGI tag sequence flags
|
140
|
+
#
|
141
|
+
# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#51
|
142
|
+
Unicode::Emoji::RECOMMENDED_SUBDIVISION_FLAGS = T.let(T.unsafe(nil), Array)
|
143
|
+
|
144
|
+
# The list of fully-qualified RGI Emoji ZWJ sequences
|
145
|
+
#
|
146
|
+
# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#54
|
147
|
+
Unicode::Emoji::RECOMMENDED_ZWJ_SEQUENCES = T.let(T.unsafe(nil), Array)
|
148
|
+
|
149
|
+
# source://unicode-emoji//lib/unicode/emoji/generated/regex.rb#6
|
150
|
+
Unicode::Emoji::REGEX = T.let(T.unsafe(nil), Regexp)
|
151
|
+
|
152
|
+
# source://unicode-emoji//lib/unicode/emoji/generated/regex_basic.rb#6
|
153
|
+
Unicode::Emoji::REGEX_BASIC = T.let(T.unsafe(nil), Regexp)
|
154
|
+
|
155
|
+
# source://unicode-emoji//lib/unicode/emoji/generated/regex_emoji_keycap.rb#6
|
156
|
+
Unicode::Emoji::REGEX_EMOJI_KEYCAP = T.let(T.unsafe(nil), Regexp)
|
157
|
+
|
158
|
+
# source://unicode-emoji//lib/unicode/emoji/generated/regex_include_mqe.rb#6
|
159
|
+
Unicode::Emoji::REGEX_INCLUDE_MQE = T.let(T.unsafe(nil), Regexp)
|
160
|
+
|
161
|
+
# source://unicode-emoji//lib/unicode/emoji/generated/regex_include_mqe_uqe.rb#6
|
162
|
+
Unicode::Emoji::REGEX_INCLUDE_MQE_UQE = T.let(T.unsafe(nil), Regexp)
|
163
|
+
|
164
|
+
# source://unicode-emoji//lib/unicode/emoji/generated/regex_include_text.rb#6
|
165
|
+
Unicode::Emoji::REGEX_INCLUDE_TEXT = T.let(T.unsafe(nil), Regexp)
|
166
|
+
|
167
|
+
# source://unicode-emoji//lib/unicode/emoji/generated/regex_picto.rb#6
|
168
|
+
Unicode::Emoji::REGEX_PICTO = T.let(T.unsafe(nil), Regexp)
|
169
|
+
|
170
|
+
# source://unicode-emoji//lib/unicode/emoji/generated/regex_picto_no_emoji.rb#6
|
171
|
+
Unicode::Emoji::REGEX_PICTO_NO_EMOJI = T.let(T.unsafe(nil), Regexp)
|
172
|
+
|
173
|
+
# source://unicode-emoji//lib/unicode/emoji/generated/regex_possible.rb#6
|
174
|
+
Unicode::Emoji::REGEX_POSSIBLE = T.let(T.unsafe(nil), Regexp)
|
175
|
+
|
176
|
+
# source://unicode-emoji//lib/unicode/emoji/generated/regex_prop_component.rb#6
|
177
|
+
Unicode::Emoji::REGEX_PROP_COMPONENT = T.let(T.unsafe(nil), Regexp)
|
178
|
+
|
179
|
+
# source://unicode-emoji//lib/unicode/emoji/generated/regex_prop_emoji.rb#6
|
180
|
+
Unicode::Emoji::REGEX_PROP_EMOJI = T.let(T.unsafe(nil), Regexp)
|
181
|
+
|
182
|
+
# source://unicode-emoji//lib/unicode/emoji/generated/regex_prop_modifier.rb#6
|
183
|
+
Unicode::Emoji::REGEX_PROP_MODIFIER = T.let(T.unsafe(nil), Regexp)
|
184
|
+
|
185
|
+
# source://unicode-emoji//lib/unicode/emoji/generated/regex_prop_modifier_base.rb#6
|
186
|
+
Unicode::Emoji::REGEX_PROP_MODIFIER_BASE = T.let(T.unsafe(nil), Regexp)
|
187
|
+
|
188
|
+
# source://unicode-emoji//lib/unicode/emoji/generated/regex_prop_presentation.rb#6
|
189
|
+
Unicode::Emoji::REGEX_PROP_PRESENTATION = T.let(T.unsafe(nil), Regexp)
|
190
|
+
|
191
|
+
# source://unicode-emoji//lib/unicode/emoji/generated/regex_text.rb#6
|
192
|
+
Unicode::Emoji::REGEX_TEXT = T.let(T.unsafe(nil), Regexp)
|
193
|
+
|
194
|
+
# source://unicode-emoji//lib/unicode/emoji/generated/regex_text_presentation.rb#6
|
195
|
+
Unicode::Emoji::REGEX_TEXT_PRESENTATION = T.let(T.unsafe(nil), Regexp)
|
196
|
+
|
197
|
+
# source://unicode-emoji//lib/unicode/emoji/generated/regex_valid.rb#6
|
198
|
+
Unicode::Emoji::REGEX_VALID = T.let(T.unsafe(nil), Regexp)
|
199
|
+
|
200
|
+
# source://unicode-emoji//lib/unicode/emoji/generated/regex_valid_include_text.rb#6
|
201
|
+
Unicode::Emoji::REGEX_VALID_INCLUDE_TEXT = T.let(T.unsafe(nil), Regexp)
|
202
|
+
|
203
|
+
# source://unicode-emoji//lib/unicode/emoji/generated/regex_well_formed.rb#6
|
204
|
+
Unicode::Emoji::REGEX_WELL_FORMED = T.let(T.unsafe(nil), Regexp)
|
205
|
+
|
206
|
+
# source://unicode-emoji//lib/unicode/emoji/generated/regex_well_formed_include_text.rb#6
|
207
|
+
Unicode::Emoji::REGEX_WELL_FORMED_INCLUDE_TEXT = T.let(T.unsafe(nil), Regexp)
|
208
|
+
|
209
|
+
# Two regional indicators make up a region
|
210
|
+
#
|
211
|
+
# source://unicode-emoji//lib/unicode/emoji/constants.rb#43
|
212
|
+
Unicode::Emoji::REGIONAL_INDICATORS = T.let(T.unsafe(nil), Array)
|
213
|
+
|
214
|
+
# Tags characters allowed in tag-based subdivision flags
|
215
|
+
#
|
216
|
+
# source://unicode-emoji//lib/unicode/emoji/constants.rb#34
|
217
|
+
Unicode::Emoji::SPEC_TAGS = T.let(T.unsafe(nil), Array)
|
218
|
+
|
219
|
+
# The current list of codepoints with the "Emoji" property that lack the "Emoji Presentation" property
|
220
|
+
#
|
221
|
+
# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#16
|
222
|
+
Unicode::Emoji::TEXT_PRESENTATION = T.let(T.unsafe(nil), Array)
|
223
|
+
|
224
|
+
# Variation Selector 15 (VS15), enables text presentation mode for preceding codepoint
|
225
|
+
#
|
226
|
+
# source://unicode-emoji//lib/unicode/emoji/constants.rb#25
|
227
|
+
Unicode::Emoji::TEXT_VARIATION_SELECTOR = T.let(T.unsafe(nil), Integer)
|
228
|
+
|
229
|
+
# The list of valid regions
|
230
|
+
#
|
231
|
+
# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#45
|
232
|
+
Unicode::Emoji::VALID_REGION_FLAGS = T.let(T.unsafe(nil), Array)
|
233
|
+
|
234
|
+
# The list of valid subdivisions in regex character class syntax
|
235
|
+
#
|
236
|
+
# source://unicode-emoji//lib/unicode/emoji/lazy_constants.rb#48
|
237
|
+
Unicode::Emoji::VALID_SUBDIVISIONS = T.let(T.unsafe(nil), Array)
|
238
|
+
|
239
|
+
# source://unicode-emoji//lib/unicode/emoji/constants.rb#5
|
240
|
+
Unicode::Emoji::VERSION = T.let(T.unsafe(nil), String)
|
241
|
+
|
242
|
+
# The current list of Emoji components that should have a visual representation
|
243
|
+
# Currently skin tone modifiers + hair components
|
244
|
+
#
|
245
|
+
# source://unicode-emoji//lib/unicode/emoji/constants.rb#47
|
246
|
+
Unicode::Emoji::VISUAL_COMPONENT = T.let(T.unsafe(nil), Array)
|
247
|
+
|
248
|
+
# Zero-width-joiner to enable combination of multiple Emoji in a sequence
|
249
|
+
#
|
250
|
+
# source://unicode-emoji//lib/unicode/emoji/constants.rb#40
|
251
|
+
Unicode::Emoji::ZWJ = T.let(T.unsafe(nil), Integer)
|
data/sorbet/tapioca/require.rb
CHANGED
@@ -26,7 +26,8 @@ require "raix"
|
|
26
26
|
require "raix/chat_completion"
|
27
27
|
require "raix/function_dispatch"
|
28
28
|
require "roast/helpers/logger"
|
29
|
-
require "roast/helpers/
|
29
|
+
require "roast/helpers/cmd_runner"
|
30
|
+
require "rubocop"
|
30
31
|
require "ruby-graphviz"
|
31
32
|
require "shellwords"
|
32
33
|
require "sqlite3"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roast-ai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
@@ -453,13 +453,13 @@ files:
|
|
453
453
|
- lib/roast/dsl/executor.rb
|
454
454
|
- lib/roast/errors.rb
|
455
455
|
- lib/roast/factories/api_provider_factory.rb
|
456
|
+
- lib/roast/helpers/cmd_runner.rb
|
456
457
|
- lib/roast/helpers/function_caching_interceptor.rb
|
457
458
|
- lib/roast/helpers/logger.rb
|
458
459
|
- lib/roast/helpers/metadata_access.rb
|
459
460
|
- lib/roast/helpers/minitest_coverage_runner.rb
|
460
461
|
- lib/roast/helpers/path_resolver.rb
|
461
462
|
- lib/roast/helpers/prompt_loader.rb
|
462
|
-
- lib/roast/helpers/timeout_handler.rb
|
463
463
|
- lib/roast/initializers.rb
|
464
464
|
- lib/roast/resources.rb
|
465
465
|
- lib/roast/resources/api_resource.rb
|
@@ -561,6 +561,8 @@ files:
|
|
561
561
|
- lib/roast/workflow_diagram_generator.rb
|
562
562
|
- package-lock.json
|
563
563
|
- roast.gemspec
|
564
|
+
- rubocop/cop/roast.rb
|
565
|
+
- rubocop/cop/roast/use_cmd_runner.rb
|
564
566
|
- schema/workflow.json
|
565
567
|
- shipit.rubygems.yml
|
566
568
|
- sorbet/config
|
@@ -582,6 +584,7 @@ files:
|
|
582
584
|
- sorbet/rbi/gems/connection_pool@2.5.3.rbi
|
583
585
|
- sorbet/rbi/gems/crack@1.0.0.rbi
|
584
586
|
- sorbet/rbi/gems/diff-lcs@1.6.2.rbi
|
587
|
+
- sorbet/rbi/gems/docile@1.4.1.rbi
|
585
588
|
- sorbet/rbi/gems/dotenv@3.1.8.rbi
|
586
589
|
- sorbet/rbi/gems/drb@2.2.3.rbi
|
587
590
|
- sorbet/rbi/gems/dry-configurable@1.3.0.rbi
|
@@ -643,6 +646,7 @@ files:
|
|
643
646
|
- sorbet/rbi/gems/rexml@3.4.1.rbi
|
644
647
|
- sorbet/rbi/gems/rubocop-ast@1.45.1.rbi
|
645
648
|
- sorbet/rbi/gems/rubocop-shopify@2.17.1.rbi
|
649
|
+
- sorbet/rbi/gems/rubocop-sorbet@0.10.5.rbi
|
646
650
|
- sorbet/rbi/gems/rubocop@1.77.0.rbi
|
647
651
|
- sorbet/rbi/gems/ruby-graphviz@1.2.5.rbi
|
648
652
|
- sorbet/rbi/gems/ruby-openai@8.1.0.rbi
|
@@ -650,6 +654,9 @@ files:
|
|
650
654
|
- sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi
|
651
655
|
- sorbet/rbi/gems/securerandom@0.4.1.rbi
|
652
656
|
- sorbet/rbi/gems/shellany@0.0.1.rbi
|
657
|
+
- sorbet/rbi/gems/simplecov-html@0.13.2.rbi
|
658
|
+
- sorbet/rbi/gems/simplecov@0.22.0.rbi
|
659
|
+
- sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi
|
653
660
|
- sorbet/rbi/gems/spoom@1.6.3.rbi
|
654
661
|
- sorbet/rbi/gems/sqlite3@2.7.0.rbi
|
655
662
|
- sorbet/rbi/gems/tapioca@0.16.11.rbi
|
@@ -1,89 +0,0 @@
|
|
1
|
-
# typed: true
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module Roast
|
5
|
-
module Helpers
|
6
|
-
# Shared timeout handling logic for command-based tools
|
7
|
-
#
|
8
|
-
# This class provides centralized timeout functionality for executing shell commands
|
9
|
-
# with proper process management and resource cleanup.
|
10
|
-
#
|
11
|
-
# @example Basic usage
|
12
|
-
# output, status = TimeoutHandler.call("echo hello", timeout: 5)
|
13
|
-
#
|
14
|
-
# @example With custom working directory
|
15
|
-
# output, status = TimeoutHandler.call("pwd", timeout: 10, working_directory: "/tmp")
|
16
|
-
class TimeoutHandler
|
17
|
-
DEFAULT_TIMEOUT = 30
|
18
|
-
MAX_TIMEOUT = 3600
|
19
|
-
|
20
|
-
class << self
|
21
|
-
# Execute a command with timeout using Open3 with proper process cleanup
|
22
|
-
# @param command [String] The command to execute
|
23
|
-
# @param timeout [Integer] Timeout in seconds
|
24
|
-
# @param working_directory [String] Directory to execute in (default: Dir.pwd)
|
25
|
-
# @return [Array<String, Integer>] [output, exit_status]
|
26
|
-
# @raise [Timeout::Error] When command exceeds timeout duration
|
27
|
-
def call(command, timeout: DEFAULT_TIMEOUT, working_directory: Dir.pwd)
|
28
|
-
timeout = validate_timeout(timeout)
|
29
|
-
output = ""
|
30
|
-
exit_status = nil #: Integer?
|
31
|
-
wait_thr = nil #: Process::Waiter?
|
32
|
-
|
33
|
-
begin
|
34
|
-
Timeout.timeout(timeout) do
|
35
|
-
stdin, stdout, stderr, wait_thr = Open3.popen3(command, chdir: working_directory)
|
36
|
-
stdin.close # Prevent hanging on stdin-waiting commands
|
37
|
-
output = stdout.read + stderr.read
|
38
|
-
wait_thr.join
|
39
|
-
exit_status = wait_thr.value.exitstatus
|
40
|
-
|
41
|
-
[stdout, stderr].each(&:close)
|
42
|
-
end
|
43
|
-
rescue Timeout::Error
|
44
|
-
# Clean up any remaining processes to prevent zombies
|
45
|
-
cleanup_process(wait_thr) if wait_thr&.alive?
|
46
|
-
raise Timeout::Error, "Command '#{command}' in '#{working_directory}' timed out after #{timeout} seconds"
|
47
|
-
end
|
48
|
-
|
49
|
-
[output, exit_status]
|
50
|
-
end
|
51
|
-
|
52
|
-
# Validate and normalize timeout value
|
53
|
-
# @param timeout [Integer, nil] Raw timeout value
|
54
|
-
# @return [Integer] Validated timeout between 1 and MAX_TIMEOUT
|
55
|
-
def validate_timeout(timeout)
|
56
|
-
return DEFAULT_TIMEOUT if timeout.nil? || timeout <= 0
|
57
|
-
|
58
|
-
[timeout, MAX_TIMEOUT].min
|
59
|
-
end
|
60
|
-
|
61
|
-
private
|
62
|
-
|
63
|
-
# Clean up process on timeout to prevent zombie processes
|
64
|
-
# @param wait_thr [Process::Waiter] The process thread to clean up
|
65
|
-
def cleanup_process(wait_thr)
|
66
|
-
return unless wait_thr&.alive?
|
67
|
-
|
68
|
-
pid = wait_thr.pid
|
69
|
-
# First try graceful termination
|
70
|
-
Process.kill("TERM", pid)
|
71
|
-
sleep(0.1)
|
72
|
-
|
73
|
-
# Force kill if still alive
|
74
|
-
if wait_thr.alive?
|
75
|
-
Process.kill("KILL", pid)
|
76
|
-
end
|
77
|
-
rescue Errno::ESRCH
|
78
|
-
# Process already terminated, which is fine
|
79
|
-
rescue Errno::EPERM
|
80
|
-
# Permission denied - process may be owned by different user
|
81
|
-
Roast::Helpers::Logger.debug("Could not kill process #{pid}: Permission denied")
|
82
|
-
rescue => e
|
83
|
-
# Catch any other unexpected errors during cleanup
|
84
|
-
Roast::Helpers::Logger.debug("Unexpected error during process cleanup: #{e.message}")
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|