strands-shell 0.6.0__tar.gz → 0.7.0__tar.gz

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 (437) hide show
  1. strands_shell-0.7.0/.gitattributes +1 -0
  2. {strands_shell-0.6.0 → strands_shell-0.7.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -1
  3. strands_shell-0.7.0/.github/ISSUE_TEMPLATE/config.yml +20 -0
  4. {strands_shell-0.6.0 → strands_shell-0.7.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -1
  5. strands_shell-0.7.0/.github/labelers/language.yml +24 -0
  6. strands_shell-0.7.0/.github/labelers/type.yml +37 -0
  7. strands_shell-0.7.0/.github/workflows/auto-close.yml +244 -0
  8. strands_shell-0.7.0/.github/workflows/bot-pr-review-gate.yml +173 -0
  9. strands_shell-0.7.0/.github/workflows/issue-labeler.yml +44 -0
  10. {strands_shell-0.6.0 → strands_shell-0.7.0}/Cargo.lock +38 -30
  11. {strands_shell-0.6.0 → strands_shell-0.7.0}/Cargo.toml +6 -1
  12. {strands_shell-0.6.0 → strands_shell-0.7.0}/PKG-INFO +4 -4
  13. {strands_shell-0.6.0 → strands_shell-0.7.0}/README.md +3 -3
  14. {strands_shell-0.6.0 → strands_shell-0.7.0}/SECURITY.md +4 -1
  15. {strands_shell-0.6.0 → strands_shell-0.7.0}/package.json +1 -1
  16. {strands_shell-0.6.0 → strands_shell-0.7.0}/pyproject.toml +1 -1
  17. {strands_shell-0.6.0 → strands_shell-0.7.0}/python/strands_shell/__init__.py +5 -1
  18. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/builtins/cd.rs +7 -2
  19. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/builtins/echo.rs +19 -3
  20. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/builtins/export.rs +26 -12
  21. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/builtins/find.rs +179 -5
  22. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/builtins/hash.rs +3 -0
  23. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/builtins/lua.rs +32 -5
  24. strands_shell-0.7.0/src/builtins/lua_pattern.rs +976 -0
  25. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/builtins/mod.rs +12 -0
  26. strands_shell-0.7.0/src/builtins/printf.rs +468 -0
  27. strands_shell-0.7.0/src/builtins/read.rs +191 -0
  28. strands_shell-0.7.0/src/builtins/set.rs +125 -0
  29. strands_shell-0.7.0/src/builtins/shopt.rs +147 -0
  30. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/builtins/test.rs +30 -5
  31. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/builtins/type_cmd.rs +3 -1
  32. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/builtins/wait.rs +2 -1
  33. strands_shell-0.7.0/src/builtins/which.rs +79 -0
  34. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/builtins/xargs.rs +66 -22
  35. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/cli.rs +1 -1
  36. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/command_fallback.rs +19 -3
  37. strands_shell-0.7.0/src/commands/base64.rs +246 -0
  38. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/curl.rs +108 -39
  39. strands_shell-0.7.0/src/commands/date.rs +272 -0
  40. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/grep.rs +226 -5
  41. strands_shell-0.7.0/src/commands/head.rs +167 -0
  42. strands_shell-0.7.0/src/commands/id.rs +63 -0
  43. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/jq.rs +60 -5
  44. strands_shell-0.7.0/src/commands/ln.rs +75 -0
  45. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/ls.rs +211 -38
  46. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/mkdir.rs +18 -5
  47. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/mod.rs +8 -0
  48. strands_shell-0.7.0/src/commands/readlink.rs +242 -0
  49. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/rm.rs +36 -3
  50. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/sed.rs +54 -22
  51. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/sleep.rs +3 -1
  52. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/sort.rs +65 -2
  53. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/tail.rs +1 -1
  54. strands_shell-0.7.0/src/commands/touch.rs +466 -0
  55. strands_shell-0.7.0/src/commands/uname.rs +78 -0
  56. strands_shell-0.7.0/src/commands/whoami.rs +29 -0
  57. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/exec.rs +1628 -327
  58. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/io.rs +46 -1
  59. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/os.rs +562 -15
  60. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/parser.rs +864 -111
  61. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/python.rs +33 -17
  62. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/shell.rs +18 -4
  63. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/vfs.rs +28 -5
  64. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/vfs_kernel.rs +444 -78
  65. strands_shell-0.7.0/tests/claude_code_preamble.rs +305 -0
  66. strands_shell-0.7.0/tests/command_check.rs +1053 -0
  67. {strands_shell-0.6.0 → strands_shell-0.7.0}/tests/command_fallback.rs +282 -0
  68. strands_shell-0.7.0/tests/command_registry.rs +195 -0
  69. {strands_shell-0.6.0 → strands_shell-0.7.0}/tests/curl_integration.rs +753 -0
  70. {strands_shell-0.6.0 → strands_shell-0.7.0}/tests/custom_kernel.rs +308 -32
  71. strands_shell-0.7.0/tests/date_fixed_clock.rs +184 -0
  72. strands_shell-0.7.0/tests/differential/README.md +56 -0
  73. strands_shell-0.7.0/tests/differential/cases/and_or_chain.expected +7 -0
  74. strands_shell-0.7.0/tests/differential/cases/and_or_chain.sh +5 -0
  75. strands_shell-0.7.0/tests/differential/cases/args_at_vs_star.expected +6 -0
  76. strands_shell-0.7.0/tests/differential/cases/args_at_vs_star.sh +5 -0
  77. strands_shell-0.7.0/tests/differential/cases/arithmetic.expected +6 -0
  78. strands_shell-0.7.0/tests/differential/cases/arithmetic.sh +5 -0
  79. strands_shell-0.7.0/tests/differential/cases/arithmetic_compare_and_logic.expected +4 -0
  80. strands_shell-0.7.0/tests/differential/cases/arithmetic_compare_and_logic.sh +1 -0
  81. strands_shell-0.7.0/tests/differential/cases/arithmetic_division_by_zero.expected +4 -0
  82. strands_shell-0.7.0/tests/differential/cases/arithmetic_division_by_zero.sh +4 -0
  83. strands_shell-0.7.0/tests/differential/cases/base64_decode.expected +8 -0
  84. strands_shell-0.7.0/tests/differential/cases/base64_decode.sh +9 -0
  85. strands_shell-0.7.0/tests/differential/cases/base64_decode_invalid.expected +6 -0
  86. strands_shell-0.7.0/tests/differential/cases/base64_decode_invalid.sh +6 -0
  87. strands_shell-0.7.0/tests/differential/cases/base64_encode.expected +14 -0
  88. strands_shell-0.7.0/tests/differential/cases/base64_encode.sh +10 -0
  89. strands_shell-0.7.0/tests/differential/cases/base64_missing_file.expected +3 -0
  90. strands_shell-0.7.0/tests/differential/cases/base64_missing_file.sh +1 -0
  91. strands_shell-0.7.0/tests/differential/cases/basename_dirname.expected +7 -0
  92. strands_shell-0.7.0/tests/differential/cases/basename_dirname.sh +4 -0
  93. strands_shell-0.7.0/tests/differential/cases/case_glob_and_fallthrough.expected +8 -0
  94. strands_shell-0.7.0/tests/differential/cases/case_glob_and_fallthrough.sh +8 -0
  95. strands_shell-0.7.0/tests/differential/cases/case_statement.expected +6 -0
  96. strands_shell-0.7.0/tests/differential/cases/case_statement.sh +7 -0
  97. strands_shell-0.7.0/tests/differential/cases/cat_multiple_files.expected +7 -0
  98. strands_shell-0.7.0/tests/differential/cases/cat_multiple_files.sh +5 -0
  99. strands_shell-0.7.0/tests/differential/cases/cmdsub_exit_status.expected +4 -0
  100. strands_shell-0.7.0/tests/differential/cases/cmdsub_exit_status.sh +2 -0
  101. strands_shell-0.7.0/tests/differential/cases/cmdsub_nested_quotes.expected +5 -0
  102. strands_shell-0.7.0/tests/differential/cases/cmdsub_nested_quotes.sh +4 -0
  103. strands_shell-0.7.0/tests/differential/cases/cmdsub_trailing_newlines_stripped.expected +4 -0
  104. strands_shell-0.7.0/tests/differential/cases/cmdsub_trailing_newlines_stripped.sh +2 -0
  105. strands_shell-0.7.0/tests/differential/cases/command_not_found.expected +4 -0
  106. strands_shell-0.7.0/tests/differential/cases/command_not_found.sh +2 -0
  107. strands_shell-0.7.0/tests/differential/cases/command_skips_function.expected +10 -0
  108. strands_shell-0.7.0/tests/differential/cases/command_skips_function.sh +11 -0
  109. strands_shell-0.7.0/tests/differential/cases/command_stage_streams.expected +6 -0
  110. strands_shell-0.7.0/tests/differential/cases/command_stage_streams.sh +9 -0
  111. strands_shell-0.7.0/tests/differential/cases/command_substitution.expected +7 -0
  112. strands_shell-0.7.0/tests/differential/cases/command_substitution.sh +5 -0
  113. strands_shell-0.7.0/tests/differential/cases/command_v_hash_and_path.expected +18 -0
  114. strands_shell-0.7.0/tests/differential/cases/command_v_hash_and_path.sh +23 -0
  115. strands_shell-0.7.0/tests/differential/cases/command_v_slash_name.expected +8 -0
  116. strands_shell-0.7.0/tests/differential/cases/command_v_slash_name.sh +7 -0
  117. strands_shell-0.7.0/tests/differential/cases/command_v_unset_path.expected +5 -0
  118. strands_shell-0.7.0/tests/differential/cases/command_v_unset_path.sh +5 -0
  119. strands_shell-0.7.0/tests/differential/cases/compound_pipe_into_function.expected +8 -0
  120. strands_shell-0.7.0/tests/differential/cases/compound_pipe_into_function.sh +5 -0
  121. strands_shell-0.7.0/tests/differential/cases/cp_recursive.expected +4 -0
  122. strands_shell-0.7.0/tests/differential/cases/cp_recursive.sh +4 -0
  123. strands_shell-0.7.0/tests/differential/cases/crlf_output.expected +6 -0
  124. strands_shell-0.7.0/tests/differential/cases/crlf_output.sh +2 -0
  125. strands_shell-0.7.0/tests/differential/cases/cut_characters.expected +6 -0
  126. strands_shell-0.7.0/tests/differential/cases/cut_characters.sh +3 -0
  127. strands_shell-0.7.0/tests/differential/cases/cut_tr.expected +9 -0
  128. strands_shell-0.7.0/tests/differential/cases/cut_tr.sh +5 -0
  129. strands_shell-0.7.0/tests/differential/cases/double_bracket.expected +64 -0
  130. strands_shell-0.7.0/tests/differential/cases/double_bracket.sh +86 -0
  131. strands_shell-0.7.0/tests/differential/cases/double_bracket_alias.expected +4 -0
  132. strands_shell-0.7.0/tests/differential/cases/double_bracket_alias.sh +3 -0
  133. strands_shell-0.7.0/tests/differential/cases/echo_backslash_literal.expected +5 -0
  134. strands_shell-0.7.0/tests/differential/cases/echo_backslash_literal.sh +3 -0
  135. strands_shell-0.7.0/tests/differential/cases/echo_e.expected +4 -0
  136. strands_shell-0.7.0/tests/differential/cases/echo_e.sh +1 -0
  137. strands_shell-0.7.0/tests/differential/cases/echo_n_flag.expected +5 -0
  138. strands_shell-0.7.0/tests/differential/cases/echo_n_flag.sh +4 -0
  139. strands_shell-0.7.0/tests/differential/cases/empty_command_name.expected +5 -0
  140. strands_shell-0.7.0/tests/differential/cases/empty_command_name.sh +6 -0
  141. strands_shell-0.7.0/tests/differential/cases/empty_path.expected +14 -0
  142. strands_shell-0.7.0/tests/differential/cases/empty_path.sh +23 -0
  143. strands_shell-0.7.0/tests/differential/cases/executor_builtins_in_pipeline.expected +20 -0
  144. strands_shell-0.7.0/tests/differential/cases/executor_builtins_in_pipeline.sh +17 -0
  145. strands_shell-0.7.0/tests/differential/cases/exit_status.expected +6 -0
  146. strands_shell-0.7.0/tests/differential/cases/exit_status.sh +7 -0
  147. strands_shell-0.7.0/tests/differential/cases/export_attributes.expected +23 -0
  148. strands_shell-0.7.0/tests/differential/cases/export_attributes.sh +39 -0
  149. strands_shell-0.7.0/tests/differential/cases/export_hidden_from_children.expected +8 -0
  150. strands_shell-0.7.0/tests/differential/cases/export_hidden_from_children.sh +13 -0
  151. strands_shell-0.7.0/tests/differential/cases/export_visibility.expected +20 -0
  152. strands_shell-0.7.0/tests/differential/cases/export_visibility.sh +36 -0
  153. strands_shell-0.7.0/tests/differential/cases/find_basic.expected +9 -0
  154. strands_shell-0.7.0/tests/differential/cases/find_basic.sh +5 -0
  155. strands_shell-0.7.0/tests/differential/cases/find_empty.expected +19 -0
  156. strands_shell-0.7.0/tests/differential/cases/find_empty.sh +11 -0
  157. strands_shell-0.7.0/tests/differential/cases/find_exec.expected +4 -0
  158. strands_shell-0.7.0/tests/differential/cases/find_exec.sh +3 -0
  159. strands_shell-0.7.0/tests/differential/cases/find_missing_start.expected +7 -0
  160. strands_shell-0.7.0/tests/differential/cases/find_missing_start.sh +6 -0
  161. strands_shell-0.7.0/tests/differential/cases/find_trailing_slash.expected +11 -0
  162. strands_shell-0.7.0/tests/differential/cases/find_trailing_slash.sh +6 -0
  163. strands_shell-0.7.0/tests/differential/cases/for_loop.expected +8 -0
  164. strands_shell-0.7.0/tests/differential/cases/for_loop.sh +4 -0
  165. strands_shell-0.7.0/tests/differential/cases/function_local_scope.expected +5 -0
  166. strands_shell-0.7.0/tests/differential/cases/function_local_scope.sh +4 -0
  167. strands_shell-0.7.0/tests/differential/cases/function_shadows_builtin.expected +4 -0
  168. strands_shell-0.7.0/tests/differential/cases/function_shadows_builtin.sh +3 -0
  169. strands_shell-0.7.0/tests/differential/cases/functions.expected +6 -0
  170. strands_shell-0.7.0/tests/differential/cases/functions.sh +8 -0
  171. strands_shell-0.7.0/tests/differential/cases/glob_expansion.expected +6 -0
  172. strands_shell-0.7.0/tests/differential/cases/glob_expansion.sh +4 -0
  173. strands_shell-0.7.0/tests/differential/cases/glob_question_and_class.expected +6 -0
  174. strands_shell-0.7.0/tests/differential/cases/glob_question_and_class.sh +5 -0
  175. strands_shell-0.7.0/tests/differential/cases/grep_basic.expected +13 -0
  176. strands_shell-0.7.0/tests/differential/cases/grep_basic.sh +9 -0
  177. strands_shell-0.7.0/tests/differential/cases/grep_files_with_matches.expected +5 -0
  178. strands_shell-0.7.0/tests/differential/cases/grep_files_with_matches.sh +4 -0
  179. strands_shell-0.7.0/tests/differential/cases/grep_multiple_files_prefix.expected +7 -0
  180. strands_shell-0.7.0/tests/differential/cases/grep_multiple_files_prefix.sh +4 -0
  181. strands_shell-0.7.0/tests/differential/cases/grep_only_matching.expected +5 -0
  182. strands_shell-0.7.0/tests/differential/cases/grep_only_matching.sh +1 -0
  183. strands_shell-0.7.0/tests/differential/cases/grep_recursive.expected +7 -0
  184. strands_shell-0.7.0/tests/differential/cases/grep_recursive.sh +6 -0
  185. strands_shell-0.7.0/tests/differential/cases/grep_word_and_fixed.expected +5 -0
  186. strands_shell-0.7.0/tests/differential/cases/grep_word_and_fixed.sh +3 -0
  187. strands_shell-0.7.0/tests/differential/cases/hash_in_word.expected +5 -0
  188. strands_shell-0.7.0/tests/differential/cases/hash_in_word.sh +2 -0
  189. strands_shell-0.7.0/tests/differential/cases/head_tail.expected +10 -0
  190. strands_shell-0.7.0/tests/differential/cases/head_tail.sh +5 -0
  191. strands_shell-0.7.0/tests/differential/cases/head_tail_bytes.expected +5 -0
  192. strands_shell-0.7.0/tests/differential/cases/head_tail_bytes.sh +6 -0
  193. strands_shell-0.7.0/tests/differential/cases/here_string.expected +4 -0
  194. strands_shell-0.7.0/tests/differential/cases/here_string.sh +2 -0
  195. strands_shell-0.7.0/tests/differential/cases/heredoc.expected +7 -0
  196. strands_shell-0.7.0/tests/differential/cases/heredoc.sh +11 -0
  197. strands_shell-0.7.0/tests/differential/cases/heredoc_inside_compound_commands.expected +15 -0
  198. strands_shell-0.7.0/tests/differential/cases/heredoc_inside_compound_commands.sh +40 -0
  199. strands_shell-0.7.0/tests/differential/cases/heredoc_inside_compound_followed_by_lines.expected +15 -0
  200. strands_shell-0.7.0/tests/differential/cases/heredoc_inside_compound_followed_by_lines.sh +42 -0
  201. strands_shell-0.7.0/tests/differential/cases/heredoc_inside_compound_keyword_delimiter.expected +10 -0
  202. strands_shell-0.7.0/tests/differential/cases/heredoc_inside_compound_keyword_delimiter.sh +18 -0
  203. strands_shell-0.7.0/tests/differential/cases/heredoc_inside_compound_variants.expected +9 -0
  204. strands_shell-0.7.0/tests/differential/cases/heredoc_inside_compound_variants.sh +21 -0
  205. strands_shell-0.7.0/tests/differential/cases/heredoc_quoted_delimiter_variants.expected +5 -0
  206. strands_shell-0.7.0/tests/differential/cases/heredoc_quoted_delimiter_variants.sh +8 -0
  207. strands_shell-0.7.0/tests/differential/cases/if_elif_else.expected +6 -0
  208. strands_shell-0.7.0/tests/differential/cases/if_elif_else.sh +6 -0
  209. strands_shell-0.7.0/tests/differential/cases/ifs_custom_split.expected +7 -0
  210. strands_shell-0.7.0/tests/differential/cases/ifs_custom_split.sh +3 -0
  211. strands_shell-0.7.0/tests/differential/cases/jq_basic.expected +10 -0
  212. strands_shell-0.7.0/tests/differential/cases/jq_basic.sh +6 -0
  213. strands_shell-0.7.0/tests/differential/cases/jq_invalid_json.expected +3 -0
  214. strands_shell-0.7.0/tests/differential/cases/jq_invalid_json.sh +2 -0
  215. strands_shell-0.7.0/tests/differential/cases/jq_missing_key_null.expected +5 -0
  216. strands_shell-0.7.0/tests/differential/cases/jq_missing_key_null.sh +2 -0
  217. strands_shell-0.7.0/tests/differential/cases/jq_select_filter.expected +4 -0
  218. strands_shell-0.7.0/tests/differential/cases/jq_select_filter.sh +1 -0
  219. strands_shell-0.7.0/tests/differential/cases/local_without_value.expected +6 -0
  220. strands_shell-0.7.0/tests/differential/cases/local_without_value.sh +8 -0
  221. strands_shell-0.7.0/tests/differential/cases/loop_break_continue.expected +5 -0
  222. strands_shell-0.7.0/tests/differential/cases/loop_break_continue.sh +5 -0
  223. strands_shell-0.7.0/tests/differential/cases/loop_nested_break_n.expected +5 -0
  224. strands_shell-0.7.0/tests/differential/cases/loop_nested_break_n.sh +7 -0
  225. strands_shell-0.7.0/tests/differential/cases/loop_while_read_file_fields.expected +5 -0
  226. strands_shell-0.7.0/tests/differential/cases/loop_while_read_file_fields.sh +2 -0
  227. strands_shell-0.7.0/tests/differential/cases/ls_created_files.expected +7 -0
  228. strands_shell-0.7.0/tests/differential/cases/ls_created_files.sh +4 -0
  229. strands_shell-0.7.0/tests/differential/cases/missing_file.expected +3 -0
  230. strands_shell-0.7.0/tests/differential/cases/missing_file.sh +1 -0
  231. strands_shell-0.7.0/tests/differential/cases/mkdir_cp_mv_rm.expected +6 -0
  232. strands_shell-0.7.0/tests/differential/cases/mkdir_cp_mv_rm.sh +9 -0
  233. strands_shell-0.7.0/tests/differential/cases/param_default_assign.expected +6 -0
  234. strands_shell-0.7.0/tests/differential/cases/param_default_assign.sh +4 -0
  235. strands_shell-0.7.0/tests/differential/cases/param_error_unset.expected +3 -0
  236. strands_shell-0.7.0/tests/differential/cases/param_error_unset.sh +3 -0
  237. strands_shell-0.7.0/tests/differential/cases/parameter_expansion.expected +10 -0
  238. strands_shell-0.7.0/tests/differential/cases/parameter_expansion.sh +9 -0
  239. strands_shell-0.7.0/tests/differential/cases/pipe_into_while_read.expected +5 -0
  240. strands_shell-0.7.0/tests/differential/cases/pipe_into_while_read.sh +1 -0
  241. strands_shell-0.7.0/tests/differential/cases/pipeline_sort_uniq.expected +7 -0
  242. strands_shell-0.7.0/tests/differential/cases/pipeline_sort_uniq.sh +2 -0
  243. strands_shell-0.7.0/tests/differential/cases/pipeline_status.expected +5 -0
  244. strands_shell-0.7.0/tests/differential/cases/pipeline_status.sh +4 -0
  245. strands_shell-0.7.0/tests/differential/cases/positional_shift.expected +6 -0
  246. strands_shell-0.7.0/tests/differential/cases/positional_shift.sh +6 -0
  247. strands_shell-0.7.0/tests/differential/cases/printf_basic.expected +9 -0
  248. strands_shell-0.7.0/tests/differential/cases/printf_basic.sh +4 -0
  249. strands_shell-0.7.0/tests/differential/cases/printf_number_formats.expected +5 -0
  250. strands_shell-0.7.0/tests/differential/cases/printf_number_formats.sh +2 -0
  251. strands_shell-0.7.0/tests/differential/cases/printf_percent_and_escapes.expected +6 -0
  252. strands_shell-0.7.0/tests/differential/cases/printf_percent_and_escapes.sh +3 -0
  253. strands_shell-0.7.0/tests/differential/cases/printf_reuses_format.expected +6 -0
  254. strands_shell-0.7.0/tests/differential/cases/printf_reuses_format.sh +1 -0
  255. strands_shell-0.7.0/tests/differential/cases/printf_zero_pad.expected +4 -0
  256. strands_shell-0.7.0/tests/differential/cases/printf_zero_pad.sh +1 -0
  257. strands_shell-0.7.0/tests/differential/cases/quote_backslash_in_double.expected +5 -0
  258. strands_shell-0.7.0/tests/differential/cases/quote_backslash_in_double.sh +2 -0
  259. strands_shell-0.7.0/tests/differential/cases/quote_empty_args.expected +11 -0
  260. strands_shell-0.7.0/tests/differential/cases/quote_empty_args.sh +12 -0
  261. strands_shell-0.7.0/tests/differential/cases/quoting.expected +9 -0
  262. strands_shell-0.7.0/tests/differential/cases/quoting.sh +7 -0
  263. strands_shell-0.7.0/tests/differential/cases/read_ifs_fields.expected +4 -0
  264. strands_shell-0.7.0/tests/differential/cases/read_ifs_fields.sh +2 -0
  265. strands_shell-0.7.0/tests/differential/cases/read_raw_backslash.expected +5 -0
  266. strands_shell-0.7.0/tests/differential/cases/read_raw_backslash.sh +6 -0
  267. strands_shell-0.7.0/tests/differential/cases/redirect_both_ampersand.expected +5 -0
  268. strands_shell-0.7.0/tests/differential/cases/redirect_both_ampersand.sh +4 -0
  269. strands_shell-0.7.0/tests/differential/cases/redirect_digit_word.expected +4 -0
  270. strands_shell-0.7.0/tests/differential/cases/redirect_digit_word.sh +2 -0
  271. strands_shell-0.7.0/tests/differential/cases/redirect_order_matters.expected +4 -0
  272. strands_shell-0.7.0/tests/differential/cases/redirect_order_matters.sh +1 -0
  273. strands_shell-0.7.0/tests/differential/cases/redirect_overwrite_append.expected +6 -0
  274. strands_shell-0.7.0/tests/differential/cases/redirect_overwrite_append.sh +5 -0
  275. strands_shell-0.7.0/tests/differential/cases/redirect_stderr_devnull.expected +5 -0
  276. strands_shell-0.7.0/tests/differential/cases/redirect_stderr_devnull.sh +3 -0
  277. strands_shell-0.7.0/tests/differential/cases/redirect_stderr_to_file.expected +5 -0
  278. strands_shell-0.7.0/tests/differential/cases/redirect_stderr_to_file.sh +3 -0
  279. strands_shell-0.7.0/tests/differential/cases/redirect_stderr_to_stdout.expected +5 -0
  280. strands_shell-0.7.0/tests/differential/cases/redirect_stderr_to_stdout.sh +3 -0
  281. strands_shell-0.7.0/tests/differential/cases/redirect_stdin.expected +6 -0
  282. strands_shell-0.7.0/tests/differential/cases/redirect_stdin.sh +4 -0
  283. strands_shell-0.7.0/tests/differential/cases/rm_missing_file.expected +5 -0
  284. strands_shell-0.7.0/tests/differential/cases/rm_missing_file.sh +5 -0
  285. strands_shell-0.7.0/tests/differential/cases/sed_addresses_and_delete.expected +9 -0
  286. strands_shell-0.7.0/tests/differential/cases/sed_addresses_and_delete.sh +3 -0
  287. strands_shell-0.7.0/tests/differential/cases/sed_basic.expected +10 -0
  288. strands_shell-0.7.0/tests/differential/cases/sed_basic.sh +6 -0
  289. strands_shell-0.7.0/tests/differential/cases/sed_bre_literals.expected +13 -0
  290. strands_shell-0.7.0/tests/differential/cases/sed_bre_literals.sh +10 -0
  291. strands_shell-0.7.0/tests/differential/cases/sed_global_and_delimiter.expected +5 -0
  292. strands_shell-0.7.0/tests/differential/cases/sed_global_and_delimiter.sh +3 -0
  293. strands_shell-0.7.0/tests/differential/cases/set_e.expected +4 -0
  294. strands_shell-0.7.0/tests/differential/cases/set_e.sh +4 -0
  295. strands_shell-0.7.0/tests/differential/cases/set_e_function_pipeline_stage.expected +4 -0
  296. strands_shell-0.7.0/tests/differential/cases/set_e_function_pipeline_stage.sh +4 -0
  297. strands_shell-0.7.0/tests/differential/cases/set_e_in_condition.expected +5 -0
  298. strands_shell-0.7.0/tests/differential/cases/set_e_in_condition.sh +5 -0
  299. strands_shell-0.7.0/tests/differential/cases/set_e_subshell_exit.expected +3 -0
  300. strands_shell-0.7.0/tests/differential/cases/set_e_subshell_exit.sh +3 -0
  301. strands_shell-0.7.0/tests/differential/cases/set_u_unset_variable.expected +4 -0
  302. strands_shell-0.7.0/tests/differential/cases/set_u_unset_variable.sh +5 -0
  303. strands_shell-0.7.0/tests/differential/cases/sh_c_errexit_not_inherited.expected +5 -0
  304. strands_shell-0.7.0/tests/differential/cases/sh_c_errexit_not_inherited.sh +3 -0
  305. strands_shell-0.7.0/tests/differential/cases/sh_c_negated_child_keeps_its_errexit.expected +4 -0
  306. strands_shell-0.7.0/tests/differential/cases/sh_c_negated_child_keeps_its_errexit.sh +2 -0
  307. strands_shell-0.7.0/tests/differential/cases/sh_c_nounset_not_inherited.expected +5 -0
  308. strands_shell-0.7.0/tests/differential/cases/sh_c_nounset_not_inherited.sh +3 -0
  309. strands_shell-0.7.0/tests/differential/cases/sh_c_parent_keeps_its_errexit.expected +3 -0
  310. strands_shell-0.7.0/tests/differential/cases/sh_c_parent_keeps_its_errexit.sh +4 -0
  311. strands_shell-0.7.0/tests/differential/cases/sh_c_pipefail_not_inherited.expected +4 -0
  312. strands_shell-0.7.0/tests/differential/cases/sh_c_pipefail_not_inherited.sh +2 -0
  313. strands_shell-0.7.0/tests/differential/cases/sh_c_xtrace_not_inherited.expected +4 -0
  314. strands_shell-0.7.0/tests/differential/cases/sh_c_xtrace_not_inherited.sh +2 -0
  315. strands_shell-0.7.0/tests/differential/cases/sh_dash_c.expected +4 -0
  316. strands_shell-0.7.0/tests/differential/cases/sh_dash_c.sh +1 -0
  317. strands_shell-0.7.0/tests/differential/cases/sh_script_errexit_not_inherited.expected +5 -0
  318. strands_shell-0.7.0/tests/differential/cases/sh_script_errexit_not_inherited.sh +4 -0
  319. strands_shell-0.7.0/tests/differential/cases/sort_numeric_prefix.expected +6 -0
  320. strands_shell-0.7.0/tests/differential/cases/sort_numeric_prefix.sh +2 -0
  321. strands_shell-0.7.0/tests/differential/cases/sort_options.expected +19 -0
  322. strands_shell-0.7.0/tests/differential/cases/sort_options.sh +6 -0
  323. strands_shell-0.7.0/tests/differential/cases/sort_reverse_unique_key.expected +12 -0
  324. strands_shell-0.7.0/tests/differential/cases/sort_reverse_unique_key.sh +3 -0
  325. strands_shell-0.7.0/tests/differential/cases/source_and_or_line_end.expected +13 -0
  326. strands_shell-0.7.0/tests/differential/cases/source_and_or_line_end.sh +10 -0
  327. strands_shell-0.7.0/tests/differential/cases/subshell_cd_isolation.expected +5 -0
  328. strands_shell-0.7.0/tests/differential/cases/subshell_cd_isolation.sh +4 -0
  329. strands_shell-0.7.0/tests/differential/cases/subshell_isolation.expected +6 -0
  330. strands_shell-0.7.0/tests/differential/cases/subshell_isolation.sh +5 -0
  331. strands_shell-0.7.0/tests/differential/cases/test_conditions.expected +11 -0
  332. strands_shell-0.7.0/tests/differential/cases/test_conditions.sh +11 -0
  333. strands_shell-0.7.0/tests/differential/cases/test_symlink_flags.expected +10 -0
  334. strands_shell-0.7.0/tests/differential/cases/test_symlink_flags.sh +12 -0
  335. strands_shell-0.7.0/tests/differential/cases/touch_times.expected +10 -0
  336. strands_shell-0.7.0/tests/differential/cases/touch_times.sh +16 -0
  337. strands_shell-0.7.0/tests/differential/cases/tr_ranges_and_delete.expected +6 -0
  338. strands_shell-0.7.0/tests/differential/cases/tr_ranges_and_delete.sh +3 -0
  339. strands_shell-0.7.0/tests/differential/cases/uniq_dup_and_count.expected +6 -0
  340. strands_shell-0.7.0/tests/differential/cases/uniq_dup_and_count.sh +2 -0
  341. strands_shell-0.7.0/tests/differential/cases/wc_counts.expected +6 -0
  342. strands_shell-0.7.0/tests/differential/cases/wc_counts.sh +5 -0
  343. strands_shell-0.7.0/tests/differential/cases/while_loop.expected +7 -0
  344. strands_shell-0.7.0/tests/differential/cases/while_loop.sh +7 -0
  345. strands_shell-0.7.0/tests/differential/cases/word_splitting_unquoted.expected +7 -0
  346. strands_shell-0.7.0/tests/differential/cases/word_splitting_unquoted.sh +3 -0
  347. strands_shell-0.7.0/tests/differential/cases/xargs_basic.expected +5 -0
  348. strands_shell-0.7.0/tests/differential/cases/xargs_basic.sh +2 -0
  349. strands_shell-0.7.0/tests/differential/cases/xargs_n1.expected +6 -0
  350. strands_shell-0.7.0/tests/differential/cases/xargs_n1.sh +1 -0
  351. strands_shell-0.7.0/tests/differential/cases/xargs_with_grep.expected +4 -0
  352. strands_shell-0.7.0/tests/differential/cases/xargs_with_grep.sh +4 -0
  353. strands_shell-0.7.0/tests/differential.rs +329 -0
  354. strands_shell-0.7.0/tests/fixtures/claude-code-snapshot-script.sh +144 -0
  355. strands_shell-0.7.0/tests/lookup_and_env.rs +105 -0
  356. {strands_shell-0.6.0 → strands_shell-0.7.0}/tests/lua_integration.rs +308 -0
  357. {strands_shell-0.6.0 → strands_shell-0.7.0}/tests/mcp_integration.rs +77 -1
  358. {strands_shell-0.6.0 → strands_shell-0.7.0}/tests/python/test_bindings.py +28 -0
  359. {strands_shell-0.6.0 → strands_shell-0.7.0}/tests/shell_integration.rs +8124 -2270
  360. strands_shell-0.7.0/tests/touch_times.rs +279 -0
  361. {strands_shell-0.6.0 → strands_shell-0.7.0}/tests/vfs_unit.rs +32 -0
  362. strands_shell-0.6.0/.github/CODEOWNERS +0 -1
  363. strands_shell-0.6.0/.github/ISSUE_TEMPLATE/config.yml +0 -12
  364. strands_shell-0.6.0/src/builtins/printf.rs +0 -212
  365. strands_shell-0.6.0/src/builtins/read.rs +0 -112
  366. strands_shell-0.6.0/src/builtins/set.rs +0 -57
  367. strands_shell-0.6.0/src/commands/date.rs +0 -131
  368. strands_shell-0.6.0/src/commands/head.rs +0 -72
  369. strands_shell-0.6.0/src/commands/ln.rs +0 -37
  370. strands_shell-0.6.0/src/commands/readlink.rs +0 -26
  371. strands_shell-0.6.0/src/commands/touch.rs +0 -39
  372. {strands_shell-0.6.0 → strands_shell-0.7.0}/.cargo/config.toml +0 -0
  373. {strands_shell-0.6.0 → strands_shell-0.7.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  374. {strands_shell-0.6.0 → strands_shell-0.7.0}/.github/actions/stamp-version/action.yml +0 -0
  375. {strands_shell-0.6.0 → strands_shell-0.7.0}/.github/dependabot.yml +0 -0
  376. {strands_shell-0.6.0 → strands_shell-0.7.0}/.github/scripts/group-release-notes.py +0 -0
  377. {strands_shell-0.6.0 → strands_shell-0.7.0}/.github/workflows/ci.yml +0 -0
  378. {strands_shell-0.6.0 → strands_shell-0.7.0}/.github/workflows/pr-title.yml +0 -0
  379. {strands_shell-0.6.0 → strands_shell-0.7.0}/.github/workflows/release.yml +0 -0
  380. {strands_shell-0.6.0 → strands_shell-0.7.0}/.gitignore +0 -0
  381. {strands_shell-0.6.0 → strands_shell-0.7.0}/AGENTS.md +0 -0
  382. {strands_shell-0.6.0 → strands_shell-0.7.0}/CODE_OF_CONDUCT.md +0 -0
  383. {strands_shell-0.6.0 → strands_shell-0.7.0}/CONTRIBUTING.md +0 -0
  384. {strands_shell-0.6.0 → strands_shell-0.7.0}/LICENSE +0 -0
  385. {strands_shell-0.6.0 → strands_shell-0.7.0}/NOTICE +0 -0
  386. {strands_shell-0.6.0 → strands_shell-0.7.0}/build.rs +0 -0
  387. {strands_shell-0.6.0 → strands_shell-0.7.0}/index.d.ts +0 -0
  388. {strands_shell-0.6.0 → strands_shell-0.7.0}/index.js +0 -0
  389. {strands_shell-0.6.0 → strands_shell-0.7.0}/scripts/build-wasm.sh +0 -0
  390. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/builtins/alias.rs +0 -0
  391. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/builtins/builtin.rs +0 -0
  392. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/builtins/colon.rs +0 -0
  393. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/builtins/getopts.rs +0 -0
  394. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/builtins/local.rs +0 -0
  395. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/builtins/pwd.rs +0 -0
  396. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/builtins/shift.rs +0 -0
  397. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/builtins/trap.rs +0 -0
  398. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/builtins/umask.rs +0 -0
  399. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/builtins/unset.rs +0 -0
  400. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/basename.rs +0 -0
  401. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/cat.rs +0 -0
  402. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/chmod.rs +0 -0
  403. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/cp.rs +0 -0
  404. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/cut.rs +0 -0
  405. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/dirname.rs +0 -0
  406. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/echo.rs +0 -0
  407. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/env.rs +0 -0
  408. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/false.rs +0 -0
  409. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/mktemp.rs +0 -0
  410. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/mv.rs +0 -0
  411. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/pwd.rs +0 -0
  412. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/rmdir.rs +0 -0
  413. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/tee.rs +0 -0
  414. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/tr.rs +0 -0
  415. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/true.rs +0 -0
  416. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/uniq.rs +0 -0
  417. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/commands/wc.rs +0 -0
  418. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/js.rs +0 -0
  419. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/lib.rs +0 -0
  420. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/main.rs +0 -0
  421. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/mcp.rs +0 -0
  422. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/mcp_client.rs +0 -0
  423. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/prelude.rs +0 -0
  424. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/vfs_config.rs +0 -0
  425. {strands_shell-0.6.0 → strands_shell-0.7.0}/src/wasm_main.rs +0 -0
  426. {strands_shell-0.6.0 → strands_shell-0.7.0}/strands-shell-macros/Cargo.toml +0 -0
  427. {strands_shell-0.6.0 → strands_shell-0.7.0}/strands-shell-macros/src/lib.rs +0 -0
  428. {strands_shell-0.6.0 → strands_shell-0.7.0}/tests/config.rs +0 -0
  429. {strands_shell-0.6.0 → strands_shell-0.7.0}/tests/js/test_bindings.mjs +0 -0
  430. {strands_shell-0.6.0 → strands_shell-0.7.0}/tests/js/test_builder.mjs +0 -0
  431. {strands_shell-0.6.0 → strands_shell-0.7.0}/tests/js/test_config.mjs +0 -0
  432. {strands_shell-0.6.0 → strands_shell-0.7.0}/tests/path_resolution_cost.rs +0 -0
  433. {strands_shell-0.6.0 → strands_shell-0.7.0}/tests/python/test_api.py +0 -0
  434. {strands_shell-0.6.0 → strands_shell-0.7.0}/tests/python/test_builder.py +0 -0
  435. {strands_shell-0.6.0 → strands_shell-0.7.0}/tests/python/test_config.py +0 -0
  436. {strands_shell-0.6.0 → strands_shell-0.7.0}/tests/ts/api.types.ts +0 -0
  437. {strands_shell-0.6.0 → strands_shell-0.7.0}/tsconfig.json +0 -0
@@ -0,0 +1 @@
1
+ tests/differential/cases/** -text
@@ -1,7 +1,6 @@
1
1
  name: Bug Report
2
2
  description: Report a bug in Strands Shell
3
3
  title: "[BUG] "
4
- labels: ["triage"]
5
4
  assignees: []
6
5
  body:
7
6
  - type: markdown
@@ -0,0 +1,20 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Strands Box Support
4
+ url: https://github.com/strands-agents/box/discussions
5
+ about: Ask and answer questions about Strands Box
6
+ - name: Strands Box
7
+ url: https://github.com/strands-agents/box
8
+ about: Report bugs and request features for Strands Box itself
9
+ - name: Strands Agents SDK Support
10
+ url: https://github.com/strands-agents/harness-sdk/discussions
11
+ about: Ask and answer questions about the Strands Agents SDK
12
+ - name: Strands Agents SDK
13
+ url: https://github.com/strands-agents/harness-sdk
14
+ about: Report bugs and request features for the Strands Agents SDK
15
+ - name: Strands Agents Community
16
+ url: https://discord.gg/strands
17
+ about: Chat with the Strands team and community on Discord
18
+ - name: Strands Agents Documentation
19
+ url: https://strandsagents.com
20
+ about: Visit our documentation for help
@@ -1,7 +1,6 @@
1
1
  name: Feature Request
2
2
  description: Suggest a new feature or enhancement for Strands Shell
3
3
  title: "[FEATURE] "
4
- labels: ["triage"]
5
4
  assignees: []
6
5
  body:
7
6
  - type: markdown
@@ -0,0 +1,24 @@
1
+ # .github/labelers/language.yml
2
+ # Identifies which Strands Shell binding the issue relates to.
3
+ # Use max_labels: 1 since most issues target one binding.
4
+
5
+ instructions: |
6
+ Strands Shell is a Rust crate with Python (PyO3, strands_shell) and Node.js (napi, @strands-agents/shell) bindings.
7
+ Label the binding only when the issue is specific to it: its API, packaging, install, or runtime behavior (for example the Python GIL, npm types, or publishing the crate to crates.io).
8
+ Shell behavior that every binding shares (commands, builtins, the parser, the virtual filesystem, network rules, MCP) gets no label, even though it is implemented in Rust.
9
+ The bug template's "Binding" field names the binding the reporter used, not necessarily the one at fault.
10
+
11
+ # On issue events, each label also sets the native "Language" issue field via `option:`.
12
+ field:
13
+ name: Language
14
+
15
+ labels:
16
+ python:
17
+ description: "The Python binding (strands_shell, pip, pyproject.toml, PyO3)"
18
+ option: Python
19
+ typescript:
20
+ description: "The Node.js binding (@strands-agents/shell, npm, index.d.ts, napi)"
21
+ option: TypeScript
22
+ rust:
23
+ description: "The Rust crate as a Rust dependency: its public Rust API, cargo, crates.io"
24
+ option: Rust
@@ -0,0 +1,37 @@
1
+ # .github/labelers/type.yml
2
+ # Classifies issues by type (bug, feature, etc.)
3
+ # Use max_labels: 1 in the workflow since these are mutually exclusive.
4
+ # On issue events, each label also maps to a native issue type via `type:`.
5
+
6
+ instructions: |
7
+ Choose exactly one type. You are given only the title and body — there is no diff or file list, so judge from those.
8
+ The conventional-commit prefix in the title is authoritative when present, including its optional scope (e.g. "feat(core):" counts as "feat:"). Match the prefix regardless of scope:
9
+ - "feat" -> enhancement
10
+ - "fix" -> bug
11
+ - "chore", "ci", "build", "refactor", "perf", "style", "test" -> chore
12
+ - "docs" -> documentation
13
+ The prefix wins even when the description sounds user-facing: a "perf:" or "refactor:" title is a chore. When no conventional-commit prefix is present, fall back to the body: maintenance with no user-facing impact (dependency bumps, CI config, internal refactors) is a chore, while anything that adds or changes user-facing functionality is an enhancement.
14
+ If the title starts with [BUG] it is a bug. If the title starts with [FEATURE] it is an enhancement.
15
+ Documentation changes, corrections, or additions are documentation. Documentation questions are questions.
16
+ Proposals or discussions about API shape, architecture, or UX before any implementation are design; this takes precedence over enhancement even when the proposal describes new functionality.
17
+ An epic, spike, or task that tracks building something is an enhancement even when it names design questions; design is for an issue whose purpose is to decide a shape before work is planned.
18
+
19
+ labels:
20
+ bug:
21
+ description: "Something is broken or not working as documented"
22
+ type: Bug
23
+ enhancement:
24
+ description: "New feature request or improvement to existing functionality"
25
+ type: Feature
26
+ question:
27
+ description: "User asking for help, clarification, or how to do something"
28
+ type: Task
29
+ chore:
30
+ description: "Maintenance tasks, dependency updates, CI changes, refactoring with no user-facing impact"
31
+ type: Chore
32
+ documentation:
33
+ description: "Documentation changes, improvements, additions, content updates"
34
+ type: Documentation
35
+ design:
36
+ description: "Proposal or discussion about API shape, architecture, or UX before implementation"
37
+ type: Design
@@ -0,0 +1,244 @@
1
+ name: Auto Close Issues
2
+
3
+ on:
4
+ schedule:
5
+ - cron: '0 14 * * 1-5' # 9 AM EST (2 PM UTC) Monday through Friday
6
+ workflow_dispatch:
7
+ inputs:
8
+ dry_run:
9
+ description: 'Run in dry-run mode (no actions taken, only logging)'
10
+ required: false
11
+ default: 'false'
12
+ type: boolean
13
+
14
+ permissions:
15
+ contents: read
16
+ issues: write
17
+ pull-requests: write
18
+
19
+ jobs:
20
+ auto-close:
21
+ runs-on: ubuntu-latest
22
+ strategy:
23
+ matrix:
24
+ include:
25
+ - label: 'autoclose in 3 days'
26
+ days: 3
27
+ issue_types: 'both' #issues/pulls/both
28
+ replacement_label: ''
29
+ closure_message: 'This issue has been automatically closed as it was marked for auto-closure by the team and no additional responses was received within 3 days.'
30
+ dry_run: 'false'
31
+ - label: 'autoclose in 7 days'
32
+ days: 7
33
+ issue_types: 'both' # issues/pulls/both
34
+ replacement_label: ''
35
+ closure_message: 'This issue has been automatically closed as it was marked for auto-closure by the team and no additional responses was received within 7 days.'
36
+ dry_run: 'false'
37
+ steps:
38
+ - name: Validate and process ${{ matrix.label }}
39
+ uses: actions/github-script@v9
40
+ env:
41
+ LABEL_NAME: ${{ matrix.label }}
42
+ DAYS_TO_WAIT: ${{ matrix.days }}
43
+ AUTHORIZED_USERS: ''
44
+ AUTH_MODE: 'write-access'
45
+ ISSUE_TYPES: ${{ matrix.issue_types }}
46
+ DRY_RUN: ${{ matrix.dry_run }}
47
+ REPLACEMENT_LABEL: ${{ matrix.replacement_label }}
48
+ CLOSE_MESSAGE: ${{matrix.closure_message}}
49
+ with:
50
+ script: |
51
+ const REQUIRED_PERMISSIONS = ['write', 'admin'];
52
+ const CLOSE_MESSAGE = process.env.CLOSE_MESSAGE;
53
+ const isDryRun = '${{ inputs.dry_run }}' === 'true' || process.env.DRY_RUN === 'true';
54
+
55
+ const config = {
56
+ labelName: process.env.LABEL_NAME,
57
+ daysToWait: parseInt(process.env.DAYS_TO_WAIT),
58
+ authMode: process.env.AUTH_MODE,
59
+ authorizedUsers: process.env.AUTHORIZED_USERS?.split(',').map(u => u.trim()).filter(u => u) || [],
60
+ issueTypes: process.env.ISSUE_TYPES,
61
+ replacementLabel: process.env.REPLACEMENT_LABEL?.trim() || null
62
+ };
63
+
64
+ console.log(`🏷️ Processing label: "${config.labelName}" (${config.daysToWait} days)`);
65
+ if (isDryRun) console.log('🧪 DRY-RUN MODE: No actions will be taken');
66
+
67
+ const cutoffDate = new Date();
68
+ cutoffDate.setDate(cutoffDate.getDate() - config.daysToWait);
69
+
70
+ async function isAuthorizedUser(username) {
71
+ try {
72
+ if (config.authMode === 'users') {
73
+ return config.authorizedUsers.includes(username);
74
+ } else if (config.authMode === 'write-access') {
75
+ const { data } = await github.rest.repos.getCollaboratorPermissionLevel({
76
+ owner: context.repo.owner,
77
+ repo: context.repo.repo,
78
+ username: username
79
+ });
80
+ return REQUIRED_PERMISSIONS.includes(data.permission);
81
+ }
82
+ } catch (error) {
83
+ console.log(`⚠️ Failed to check authorization for ${username}: ${error.message}`);
84
+ return false;
85
+ }
86
+ return false;
87
+ }
88
+
89
+ let allIssues = [];
90
+ let page = 1;
91
+
92
+ while (true) {
93
+ const { data: issues } = await github.rest.issues.listForRepo({
94
+ owner: context.repo.owner,
95
+ repo: context.repo.repo,
96
+ state: 'open',
97
+ labels: config.labelName,
98
+ sort: 'updated',
99
+ direction: 'desc',
100
+ per_page: 100,
101
+ page: page
102
+ });
103
+
104
+ if (issues.length === 0) break;
105
+ allIssues = allIssues.concat(issues);
106
+ if (issues.length < 100) break;
107
+ page++;
108
+ }
109
+
110
+ const targetIssues = allIssues.filter(issue => {
111
+ if (config.issueTypes === 'issues' && issue.pull_request) return false;
112
+ if (config.issueTypes === 'pulls' && !issue.pull_request) return false;
113
+ return true;
114
+ });
115
+
116
+ console.log(`🔍 Found ${targetIssues.length} items with label "${config.labelName}"`);
117
+
118
+ if (targetIssues.length === 0) {
119
+ console.log('✅ No items to process');
120
+ return;
121
+ }
122
+
123
+ let closedCount = 0;
124
+ let labelRemovedCount = 0;
125
+ let skippedCount = 0;
126
+
127
+ for (const issue of targetIssues) {
128
+ console.log(`\n📋 Processing #${issue.number}: ${issue.title}`);
129
+
130
+ try {
131
+ const events = await github.paginate(github.rest.issues.listEvents, {
132
+ owner: context.repo.owner,
133
+ repo: context.repo.repo,
134
+ issue_number: issue.number,
135
+ per_page: 100
136
+ });
137
+
138
+ const labelEvents = events
139
+ .filter(e => e.event === 'labeled' && e.label?.name === config.labelName)
140
+ .sort((a, b) => new Date(b.created_at) - new Date(a.created_at));
141
+
142
+ if (labelEvents.length === 0) {
143
+ console.log(`⚠️ No label events found for #${issue.number}`);
144
+ skippedCount++;
145
+ continue;
146
+ }
147
+
148
+ const lastLabelAdded = new Date(labelEvents[0].created_at);
149
+ const labelAdder = labelEvents[0].actor.login;
150
+
151
+ const comments = await github.paginate(github.rest.issues.listComments, {
152
+ owner: context.repo.owner,
153
+ repo: context.repo.repo,
154
+ issue_number: issue.number,
155
+ since: lastLabelAdded.toISOString(),
156
+ per_page: 100
157
+ });
158
+
159
+ let hasUnauthorizedComment = false;
160
+
161
+ for (const comment of comments) {
162
+ if (comment.user.login === labelAdder) continue;
163
+
164
+ const isAuthorized = await isAuthorizedUser(comment.user.login);
165
+ if (!isAuthorized) {
166
+ console.log(`❌ New comment from ${comment.user.login}`);
167
+ hasUnauthorizedComment = true;
168
+ break;
169
+ }
170
+ }
171
+
172
+ if (hasUnauthorizedComment) {
173
+ if (isDryRun) {
174
+ console.log(`🧪 DRY-RUN: Would remove ${config.labelName} label from #${issue.number}`);
175
+ if (config.replacementLabel) {
176
+ console.log(`🧪 DRY-RUN: Would add ${config.replacementLabel} label to #${issue.number}`);
177
+ }
178
+ } else {
179
+ await github.rest.issues.removeLabel({
180
+ owner: context.repo.owner,
181
+ repo: context.repo.repo,
182
+ issue_number: issue.number,
183
+ name: config.labelName
184
+ });
185
+ console.log(`🏷️ Removed ${config.labelName} label from #${issue.number}`);
186
+
187
+ if (config.replacementLabel) {
188
+ await github.rest.issues.addLabels({
189
+ owner: context.repo.owner,
190
+ repo: context.repo.repo,
191
+ issue_number: issue.number,
192
+ labels: [config.replacementLabel]
193
+ });
194
+ console.log(`🏷️ Added ${config.replacementLabel} label to #${issue.number}`);
195
+ }
196
+ }
197
+ labelRemovedCount++;
198
+ continue;
199
+ }
200
+
201
+ if (lastLabelAdded > cutoffDate) {
202
+ const daysRemaining = Math.ceil((lastLabelAdded - cutoffDate) / (1000 * 60 * 60 * 24));
203
+ console.log(`⏳ Label added too recently (${daysRemaining} days remaining)`);
204
+ skippedCount++;
205
+ continue;
206
+ }
207
+
208
+ if (isDryRun) {
209
+ console.log(`🧪 DRY-RUN: Would close #${issue.number} with comment`);
210
+ } else {
211
+ await github.rest.issues.createComment({
212
+ owner: context.repo.owner,
213
+ repo: context.repo.repo,
214
+ issue_number: issue.number,
215
+ body: CLOSE_MESSAGE
216
+ });
217
+
218
+ await github.rest.issues.update({
219
+ owner: context.repo.owner,
220
+ repo: context.repo.repo,
221
+ issue_number: issue.number,
222
+ state: 'closed'
223
+ });
224
+
225
+ console.log(`🔒 Closed #${issue.number}`);
226
+ }
227
+ closedCount++;
228
+ } catch (error) {
229
+ console.log(`❌ Error processing #${issue.number}: ${error.message}`);
230
+ skippedCount++;
231
+ }
232
+ }
233
+
234
+ console.log(`\n📊 Summary for "${config.labelName}":`);
235
+ if (isDryRun) {
236
+ console.log(` 🧪 DRY-RUN MODE - No actual changes made:`);
237
+ console.log(` • Issues that would be closed: ${closedCount}`);
238
+ console.log(` • Labels that would be removed: ${labelRemovedCount}`);
239
+ } else {
240
+ console.log(` • Issues closed: ${closedCount}`);
241
+ console.log(` • Labels removed: ${labelRemovedCount}`);
242
+ }
243
+ console.log(` • Issues skipped: ${skippedCount}`);
244
+ console.log(` • Total processed: ${targetIssues.length}`);
@@ -0,0 +1,173 @@
1
+ name: Bot PR Review Gate
2
+
3
+ on:
4
+ pull_request_target:
5
+ branches: [main]
6
+ types: [opened, synchronize, reopened, ready_for_review]
7
+ pull_request_review:
8
+ types: [submitted, dismissed]
9
+
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12
+ cancel-in-progress: ${{ github.event_name == 'pull_request_target' || github.event_name == 'pull_request_review' }}
13
+
14
+ # pull_request_target runs in the base-repo context. This job only reads PR
15
+ # metadata and reviews and sets the check status — it never checks out or
16
+ # executes PR head code, and needs no write scope.
17
+ permissions:
18
+ contents: read
19
+ pull-requests: read
20
+
21
+ jobs:
22
+ check-bot-reviews:
23
+ name: 2 Approvers for Bots
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ - name: Enforce maintainer reviews for bot/agent PRs
27
+ uses: actions/github-script@v9
28
+ env:
29
+ REQUIRED_APPROVALS: '2'
30
+ MAINTAINER_ROLES: 'maintain,admin'
31
+ # Trusted automation that bypasses the gate entirely. dependabot is a
32
+ # GitHub bot, but dependency bumps don't need two human approvals.
33
+ EXEMPT_AUTHORS: 'dependabot[bot]'
34
+ with:
35
+ script: |
36
+ // ┌──────────────────────────────────────────────────────────────┐
37
+ // │ WHAT THIS BLOCKS │
38
+ // │ A PR into `main` cannot merge until REQUIRED_APPROVALS │
39
+ // │ maintainers approve IF it is authored by a bot/agent. │
40
+ // │ │
41
+ // │ A PR counts as bot/agent when ANY of these are true: │
42
+ // │ 1. the author account is a GitHub Bot (user.type) │
43
+ // │ 2. the author login matches a bot/agent name pattern │
44
+ // │ 3. the PR carries a bot/automation label │
45
+ // │ 4. the PR was opened via a GitHub App │
46
+ // │ 5. a commit is authored by a `[bot]@` email │
47
+ // │ │
48
+ // │ EXEMPT_AUTHORS (e.g. dependabot) skip the gate entirely. │
49
+ // │ Everything else — i.e. human PRs — is never affected. │
50
+ // └──────────────────────────────────────────────────────────────┘
51
+
52
+ const pr = context.payload.pull_request;
53
+ if (pr.base.ref !== 'main') {
54
+ console.log(`PR targets ${pr.base.ref}, not main — skipping.`);
55
+ return;
56
+ }
57
+
58
+ const requiredApprovals = parseInt(process.env.REQUIRED_APPROVALS, 10);
59
+ const maintainerRoles = process.env.MAINTAINER_ROLES
60
+ .split(',').map(r => r.trim()).filter(Boolean);
61
+ const exemptAuthors = (process.env.EXEMPT_AUTHORS || '')
62
+ .split(',').map(a => a.trim().toLowerCase()).filter(Boolean);
63
+
64
+ const author = pr.user.login;
65
+
66
+ // Trusted automation is exempt before any detection runs.
67
+ if (exemptAuthors.includes(author.toLowerCase())) {
68
+ console.log(`Author "${author}" is exempt — no review requirement.`);
69
+ return;
70
+ }
71
+
72
+ // Bot/agent author-name patterns. Named service bots are anchored;
73
+ // the `agent` patterns are intentionally broad so accounts like
74
+ // "kiro-agent" / "agent-of-x" are gated (may also match a human
75
+ // handle containing "agent" — such PRs can still merge with the
76
+ // required approvals).
77
+ const botUsernamePatterns = [
78
+ /\[bot\]$/,
79
+ /^renovate(\[bot\])?$/i,
80
+ /^github-actions(\[bot\])?$/i,
81
+ /^snyk-bot$/i,
82
+ /^codecov(\[bot\])?$/i,
83
+ /^mergify(\[bot\])?$/i,
84
+ /^greenkeeper(\[bot\])?$/i,
85
+ /agent$/i, /-agent/i, /agent-/i, /'s[ -]agent/i,
86
+ ];
87
+ // Reserved `[bot]@` commit-email shape only. Broad noreply patterns
88
+ // are excluded — they are the default privacy email for *humans*.
89
+ const botEmailPatterns = [/\[bot\]@/i];
90
+ // Labels a maintainer can apply to opt a PR into the gate.
91
+ const botLabels = new Set([
92
+ 'bot', 'dependencies', 'automated', 'auto-generated', 'agent',
93
+ ]);
94
+
95
+ // --- Evaluate each signal -------------------------------------
96
+ const isBotAccount = pr.user.type === 'Bot';
97
+ const nameMatches = botUsernamePatterns.some(p => p.test(author));
98
+ const matchedLabels = (pr.labels || [])
99
+ .map(l => l.name.toLowerCase())
100
+ .filter(l => botLabels.has(l));
101
+ const viaGitHubApp = Boolean(pr.performed_via_github_app);
102
+
103
+ const commits = await github.paginate(github.rest.pulls.listCommits, {
104
+ owner: context.repo.owner,
105
+ repo: context.repo.repo,
106
+ pull_number: pr.number,
107
+ });
108
+ const botCommitEmails = [...new Set(
109
+ commits
110
+ .map(c => c.commit.author && c.commit.author.email)
111
+ .filter(email => email && botEmailPatterns.some(p => p.test(email)))
112
+ )];
113
+
114
+ // --- What (if anything) flagged this PR -----------------------
115
+ const reasons = [];
116
+ if (isBotAccount) reasons.push('author is a GitHub Bot account');
117
+ if (nameMatches) reasons.push(`author name "${author}" matches a bot/agent pattern`);
118
+ if (matchedLabels.length) reasons.push(`labelled: ${matchedLabels.join(', ')}`);
119
+ if (viaGitHubApp) reasons.push(`opened via GitHub App "${pr.performed_via_github_app.name}"`);
120
+ if (botCommitEmails.length) reasons.push(`bot commit email: ${botCommitEmails.join(', ')}`);
121
+
122
+ if (reasons.length === 0) {
123
+ console.log(`PR author "${author}" is not a bot/agent — no review requirement.`);
124
+ return;
125
+ }
126
+ console.log(`Bot/agent PR detected:\n - ${reasons.join('\n - ')}`);
127
+
128
+ // --- Count maintainer approvals -------------------------------
129
+ // Only the latest review per user counts. COMMENTED reviews are
130
+ // ignored: per GitHub merge semantics a later comment does not
131
+ // revoke an existing APPROVED state.
132
+ const reviews = await github.paginate(github.rest.pulls.listReviews, {
133
+ owner: context.repo.owner,
134
+ repo: context.repo.repo,
135
+ pull_number: pr.number,
136
+ });
137
+ const latestReviewByUser = new Map();
138
+ for (const review of reviews) {
139
+ if (!review.user) continue;
140
+ if (review.state === 'COMMENTED') continue;
141
+ latestReviewByUser.set(review.user.login, review.state);
142
+ }
143
+
144
+ async function isMaintainer(username) {
145
+ try {
146
+ const { data } = await github.rest.repos.getCollaboratorPermissionLevel({
147
+ owner: context.repo.owner,
148
+ repo: context.repo.repo,
149
+ username,
150
+ });
151
+ return maintainerRoles.includes(data.role_name);
152
+ } catch (error) {
153
+ console.log(`Failed to check permission for ${username}: ${error.message}`);
154
+ return false;
155
+ }
156
+ }
157
+
158
+ const approvedBy = [];
159
+ for (const [login, state] of latestReviewByUser.entries()) {
160
+ if (state !== 'APPROVED') continue;
161
+ if (await isMaintainer(login)) approvedBy.push(login);
162
+ }
163
+
164
+ console.log(`Maintainer approvals: ${approvedBy.length}/${requiredApprovals}`);
165
+ console.log(`Approved by: ${approvedBy.join(', ') || 'none'}`);
166
+
167
+ if (approvedBy.length < requiredApprovals) {
168
+ core.setFailed(
169
+ `Bot/agent PRs require at least ${requiredApprovals} maintainer approvals before merging. ` +
170
+ `Currently have ${approvedBy.length}/${requiredApprovals}. ` +
171
+ `Maintainers are repository collaborators with role: ${maintainerRoles.join(' or ')}.`
172
+ );
173
+ }
@@ -0,0 +1,44 @@
1
+ name: Issue Labeler
2
+
3
+ on:
4
+ issues:
5
+ types: [opened]
6
+ pull_request_target:
7
+ types: [opened]
8
+
9
+ permissions:
10
+ issues: write
11
+ pull-requests: write
12
+ id-token: write
13
+ contents: read
14
+
15
+ jobs:
16
+ label-type:
17
+ name: "Label: Type"
18
+ runs-on: ubuntu-latest
19
+ timeout-minutes: 2
20
+ steps:
21
+ - uses: actions/checkout@v7
22
+ with:
23
+ sparse-checkout: .github/labelers
24
+ sparse-checkout-cone-mode: false
25
+ - uses: strands-agents/devtools/issue-labeler@main
26
+ with:
27
+ aws_role_arn: ${{ secrets.AWS_ROLE_ARN }}
28
+ config_path: '.github/labelers/type.yml'
29
+ max_labels: '1'
30
+
31
+ label-language:
32
+ name: "Label: Language"
33
+ runs-on: ubuntu-latest
34
+ timeout-minutes: 2
35
+ steps:
36
+ - uses: actions/checkout@v7
37
+ with:
38
+ sparse-checkout: .github/labelers
39
+ sparse-checkout-cone-mode: false
40
+ - uses: strands-agents/devtools/issue-labeler@main
41
+ with:
42
+ aws_role_arn: ${{ secrets.AWS_ROLE_ARN }}
43
+ config_path: '.github/labelers/language.yml'
44
+ max_labels: '1'