@vicoa/cli 1.3.10-darwin-arm64 → 1.3.10

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 (298) hide show
  1. package/README.md +82 -0
  2. package/bin/vicoa.js +38 -0
  3. package/package.json +16 -10
  4. package/bin/_internal/81d243bd2c585b0f4821__mypyc.cpython-312-darwin.so +0 -0
  5. package/bin/_internal/Python +0 -0
  6. package/bin/_internal/Python.framework/Python +0 -0
  7. package/bin/_internal/Python.framework/Resources/Info.plist +0 -30
  8. package/bin/_internal/Python.framework/Versions/3.12/Python +0 -0
  9. package/bin/_internal/Python.framework/Versions/3.12/Resources/Info.plist +0 -30
  10. package/bin/_internal/Python.framework/Versions/Current/Python +0 -0
  11. package/bin/_internal/Python.framework/Versions/Current/Resources/Info.plist +0 -30
  12. package/bin/_internal/_cffi_backend.cpython-312-darwin.so +0 -0
  13. package/bin/_internal/aiofile-3.9.0.dist-info/INSTALLER +0 -1
  14. package/bin/_internal/aiofile-3.9.0.dist-info/LICENCE +0 -195
  15. package/bin/_internal/aiofile-3.9.0.dist-info/LICENCE.md +0 -195
  16. package/bin/_internal/aiofile-3.9.0.dist-info/METADATA +0 -492
  17. package/bin/_internal/aiofile-3.9.0.dist-info/RECORD +0 -15
  18. package/bin/_internal/aiofile-3.9.0.dist-info/WHEEL +0 -4
  19. package/bin/_internal/aiohttp/_http_parser.cpython-312-darwin.so +0 -0
  20. package/bin/_internal/aiohttp/_http_writer.cpython-312-darwin.so +0 -0
  21. package/bin/_internal/aiohttp/_websocket/mask.cpython-312-darwin.so +0 -0
  22. package/bin/_internal/aiohttp/_websocket/reader_c.cpython-312-darwin.so +0 -0
  23. package/bin/_internal/attrs-26.1.0.dist-info/INSTALLER +0 -1
  24. package/bin/_internal/attrs-26.1.0.dist-info/METADATA +0 -199
  25. package/bin/_internal/attrs-26.1.0.dist-info/RECORD +0 -55
  26. package/bin/_internal/attrs-26.1.0.dist-info/WHEEL +0 -4
  27. package/bin/_internal/attrs-26.1.0.dist-info/licenses/LICENSE +0 -21
  28. package/bin/_internal/base_library.zip +0 -0
  29. package/bin/_internal/caio/thread_aio.cpython-312-darwin.so +0 -0
  30. package/bin/_internal/certifi/cacert.pem +0 -4494
  31. package/bin/_internal/certifi/py.typed +0 -0
  32. package/bin/_internal/charset_normalizer/cd.cpython-312-darwin.so +0 -0
  33. package/bin/_internal/charset_normalizer/md.cpython-312-darwin.so +0 -0
  34. package/bin/_internal/click-8.3.2.dist-info/INSTALLER +0 -1
  35. package/bin/_internal/click-8.3.2.dist-info/METADATA +0 -84
  36. package/bin/_internal/click-8.3.2.dist-info/RECORD +0 -40
  37. package/bin/_internal/click-8.3.2.dist-info/WHEEL +0 -4
  38. package/bin/_internal/click-8.3.2.dist-info/licenses/LICENSE.txt +0 -28
  39. package/bin/_internal/cryptography/hazmat/bindings/_rust.abi3.so +0 -0
  40. package/bin/_internal/cryptography-46.0.7.dist-info/INSTALLER +0 -1
  41. package/bin/_internal/cryptography-46.0.7.dist-info/METADATA +0 -139
  42. package/bin/_internal/cryptography-46.0.7.dist-info/RECORD +0 -180
  43. package/bin/_internal/cryptography-46.0.7.dist-info/WHEEL +0 -4
  44. package/bin/_internal/cryptography-46.0.7.dist-info/licenses/LICENSE +0 -3
  45. package/bin/_internal/cryptography-46.0.7.dist-info/licenses/LICENSE.APACHE +0 -202
  46. package/bin/_internal/cryptography-46.0.7.dist-info/licenses/LICENSE.BSD +0 -27
  47. package/bin/_internal/email_validator-2.3.0.dist-info/INSTALLER +0 -1
  48. package/bin/_internal/email_validator-2.3.0.dist-info/METADATA +0 -466
  49. package/bin/_internal/email_validator-2.3.0.dist-info/RECORD +0 -27
  50. package/bin/_internal/email_validator-2.3.0.dist-info/WHEEL +0 -5
  51. package/bin/_internal/email_validator-2.3.0.dist-info/entry_points.txt +0 -2
  52. package/bin/_internal/email_validator-2.3.0.dist-info/licenses/LICENSE +0 -27
  53. package/bin/_internal/email_validator-2.3.0.dist-info/top_level.txt +0 -1
  54. package/bin/_internal/frozenlist/_frozenlist.cpython-312-darwin.so +0 -0
  55. package/bin/_internal/importlib_metadata-8.7.1.dist-info/INSTALLER +0 -1
  56. package/bin/_internal/importlib_metadata-8.7.1.dist-info/METADATA +0 -133
  57. package/bin/_internal/importlib_metadata-8.7.1.dist-info/RECORD +0 -33
  58. package/bin/_internal/importlib_metadata-8.7.1.dist-info/WHEEL +0 -5
  59. package/bin/_internal/importlib_metadata-8.7.1.dist-info/licenses/LICENSE +0 -73
  60. package/bin/_internal/importlib_metadata-8.7.1.dist-info/top_level.txt +0 -1
  61. package/bin/_internal/integrations/cli_wrappers/IMPORTANT_USE_CASES.md +0 -33
  62. package/bin/_internal/integrations/github/claude-code-action/CLAUDE.md +0 -136
  63. package/bin/_internal/integrations/github/claude-code-action/CODE_OF_CONDUCT.md +0 -128
  64. package/bin/_internal/integrations/github/claude-code-action/CONTRIBUTING.md +0 -116
  65. package/bin/_internal/integrations/github/claude-code-action/LICENSE +0 -21
  66. package/bin/_internal/integrations/github/claude-code-action/README.md +0 -53
  67. package/bin/_internal/integrations/github/claude-code-action/ROADMAP.md +0 -20
  68. package/bin/_internal/integrations/github/claude-code-action/SECURITY.md +0 -15
  69. package/bin/_internal/integrations/github/claude-code-action/action.yml +0 -294
  70. package/bin/_internal/integrations/github/claude-code-action/base-action/CLAUDE.md +0 -60
  71. package/bin/_internal/integrations/github/claude-code-action/base-action/CODE_OF_CONDUCT.md +0 -128
  72. package/bin/_internal/integrations/github/claude-code-action/base-action/CONTRIBUTING.md +0 -136
  73. package/bin/_internal/integrations/github/claude-code-action/base-action/LICENSE +0 -21
  74. package/bin/_internal/integrations/github/claude-code-action/base-action/MIRROR_DISCLAIMER.md +0 -11
  75. package/bin/_internal/integrations/github/claude-code-action/base-action/README.md +0 -521
  76. package/bin/_internal/integrations/github/claude-code-action/base-action/action.yml +0 -149
  77. package/bin/_internal/integrations/github/claude-code-action/base-action/bun.lock +0 -54
  78. package/bin/_internal/integrations/github/claude-code-action/base-action/examples/issue-triage.yml +0 -108
  79. package/bin/_internal/integrations/github/claude-code-action/base-action/package.json +0 -23
  80. package/bin/_internal/integrations/github/claude-code-action/base-action/scripts/install-hooks.sh +0 -13
  81. package/bin/_internal/integrations/github/claude-code-action/base-action/scripts/pre-push +0 -46
  82. package/bin/_internal/integrations/github/claude-code-action/base-action/src/index.ts +0 -82
  83. package/bin/_internal/integrations/github/claude-code-action/base-action/src/prepare-prompt.ts +0 -82
  84. package/bin/_internal/integrations/github/claude-code-action/base-action/src/run-claude.ts +0 -257
  85. package/bin/_internal/integrations/github/claude-code-action/base-action/src/run-vicoa.ts +0 -301
  86. package/bin/_internal/integrations/github/claude-code-action/base-action/src/setup-claude-code-settings.ts +0 -68
  87. package/bin/_internal/integrations/github/claude-code-action/base-action/src/validate-env.ts +0 -54
  88. package/bin/_internal/integrations/github/claude-code-action/base-action/test-local.sh +0 -12
  89. package/bin/_internal/integrations/github/claude-code-action/base-action/test-mcp-local.sh +0 -18
  90. package/bin/_internal/integrations/github/claude-code-action/base-action/tsconfig.json +0 -30
  91. package/bin/_internal/integrations/github/claude-code-action/bun.lock +0 -384
  92. package/bin/_internal/integrations/github/claude-code-action/docs/capabilities-and-limitations.md +0 -33
  93. package/bin/_internal/integrations/github/claude-code-action/docs/cloud-providers.md +0 -99
  94. package/bin/_internal/integrations/github/claude-code-action/docs/configuration.md +0 -345
  95. package/bin/_internal/integrations/github/claude-code-action/docs/custom-automations.md +0 -113
  96. package/bin/_internal/integrations/github/claude-code-action/docs/experimental.md +0 -128
  97. package/bin/_internal/integrations/github/claude-code-action/docs/faq.md +0 -205
  98. package/bin/_internal/integrations/github/claude-code-action/docs/migration-guide.md +0 -261
  99. package/bin/_internal/integrations/github/claude-code-action/docs/security.md +0 -38
  100. package/bin/_internal/integrations/github/claude-code-action/docs/setup.md +0 -146
  101. package/bin/_internal/integrations/github/claude-code-action/docs/usage.md +0 -213
  102. package/bin/_internal/integrations/github/claude-code-action/examples/auto-fix-ci/auto-fix-ci.yml +0 -97
  103. package/bin/_internal/integrations/github/claude-code-action/examples/auto-fix-ci/commands/fix-ci.md +0 -127
  104. package/bin/_internal/integrations/github/claude-code-action/examples/auto-fix-ci-signed/auto-fix-ci-signed.yml +0 -97
  105. package/bin/_internal/integrations/github/claude-code-action/examples/auto-fix-ci-signed/commands/fix-ci-signed.md +0 -148
  106. package/bin/_internal/integrations/github/claude-code-action/examples/issue-deduplication.yml +0 -63
  107. package/bin/_internal/integrations/github/claude-code-action/examples/issue-triage.yml +0 -75
  108. package/bin/_internal/integrations/github/claude-code-action/examples/vicoa.yml +0 -75
  109. package/bin/_internal/integrations/github/claude-code-action/package.json +0 -31
  110. package/bin/_internal/integrations/github/claude-code-action/scripts/install-hooks.sh +0 -13
  111. package/bin/_internal/integrations/github/claude-code-action/scripts/pre-commit +0 -46
  112. package/bin/_internal/integrations/github/claude-code-action/scripts/setup-network-restrictions.sh +0 -123
  113. package/bin/_internal/integrations/github/claude-code-action/src/create-prompt/index.ts +0 -799
  114. package/bin/_internal/integrations/github/claude-code-action/src/create-prompt/types.ts +0 -102
  115. package/bin/_internal/integrations/github/claude-code-action/src/entrypoints/collect-inputs.ts +0 -58
  116. package/bin/_internal/integrations/github/claude-code-action/src/entrypoints/format-turns.ts +0 -465
  117. package/bin/_internal/integrations/github/claude-code-action/src/entrypoints/prepare.ts +0 -98
  118. package/bin/_internal/integrations/github/claude-code-action/src/entrypoints/update-comment-link.ts +0 -245
  119. package/bin/_internal/integrations/github/claude-code-action/src/github/api/client.ts +0 -23
  120. package/bin/_internal/integrations/github/claude-code-action/src/github/api/config.ts +0 -4
  121. package/bin/_internal/integrations/github/claude-code-action/src/github/api/queries/github.ts +0 -117
  122. package/bin/_internal/integrations/github/claude-code-action/src/github/context.ts +0 -277
  123. package/bin/_internal/integrations/github/claude-code-action/src/github/data/fetcher.ts +0 -233
  124. package/bin/_internal/integrations/github/claude-code-action/src/github/data/formatter.ts +0 -144
  125. package/bin/_internal/integrations/github/claude-code-action/src/github/operations/branch-cleanup.ts +0 -132
  126. package/bin/_internal/integrations/github/claude-code-action/src/github/operations/branch.ts +0 -163
  127. package/bin/_internal/integrations/github/claude-code-action/src/github/operations/comment-logic.ts +0 -203
  128. package/bin/_internal/integrations/github/claude-code-action/src/github/operations/comments/common.ts +0 -33
  129. package/bin/_internal/integrations/github/claude-code-action/src/github/operations/comments/create-initial.ts +0 -111
  130. package/bin/_internal/integrations/github/claude-code-action/src/github/operations/comments/update-claude-comment.ts +0 -70
  131. package/bin/_internal/integrations/github/claude-code-action/src/github/operations/comments/update-with-branch.ts +0 -57
  132. package/bin/_internal/integrations/github/claude-code-action/src/github/operations/git-config.ts +0 -62
  133. package/bin/_internal/integrations/github/claude-code-action/src/github/token.ts +0 -108
  134. package/bin/_internal/integrations/github/claude-code-action/src/github/types.ts +0 -98
  135. package/bin/_internal/integrations/github/claude-code-action/src/github/utils/image-downloader.ts +0 -246
  136. package/bin/_internal/integrations/github/claude-code-action/src/github/utils/sanitizer.ts +0 -100
  137. package/bin/_internal/integrations/github/claude-code-action/src/github/validation/actor.ts +0 -64
  138. package/bin/_internal/integrations/github/claude-code-action/src/github/validation/permissions.ts +0 -47
  139. package/bin/_internal/integrations/github/claude-code-action/src/github/validation/trigger.ts +0 -148
  140. package/bin/_internal/integrations/github/claude-code-action/src/mcp/github-actions-server.ts +0 -279
  141. package/bin/_internal/integrations/github/claude-code-action/src/mcp/github-comment-server.ts +0 -101
  142. package/bin/_internal/integrations/github/claude-code-action/src/mcp/github-file-ops-server.ts +0 -677
  143. package/bin/_internal/integrations/github/claude-code-action/src/mcp/github-inline-comment-server.ts +0 -184
  144. package/bin/_internal/integrations/github/claude-code-action/src/mcp/install-mcp-server.ts +0 -201
  145. package/bin/_internal/integrations/github/claude-code-action/src/modes/agent/index.ts +0 -152
  146. package/bin/_internal/integrations/github/claude-code-action/src/modes/agent/parse-tools.ts +0 -22
  147. package/bin/_internal/integrations/github/claude-code-action/src/modes/detector.ts +0 -66
  148. package/bin/_internal/integrations/github/claude-code-action/src/modes/registry.ts +0 -54
  149. package/bin/_internal/integrations/github/claude-code-action/src/modes/tag/index.ts +0 -187
  150. package/bin/_internal/integrations/github/claude-code-action/src/modes/types.ts +0 -100
  151. package/bin/_internal/integrations/github/claude-code-action/src/prepare/index.ts +0 -20
  152. package/bin/_internal/integrations/github/claude-code-action/src/prepare/types.ts +0 -20
  153. package/bin/_internal/integrations/github/claude-code-action/src/utils/retry.ts +0 -40
  154. package/bin/_internal/integrations/github/claude-code-action/tsconfig.json +0 -30
  155. package/bin/_internal/integrations/n8n/LICENSE +0 -21
  156. package/bin/_internal/integrations/n8n/README.md +0 -298
  157. package/bin/_internal/integrations/n8n/package-lock.json +0 -2989
  158. package/bin/_internal/integrations/n8n/package.json +0 -68
  159. package/bin/_internal/integrations/n8n/src/credentials/OmnaraApi.credentials.ts +0 -52
  160. package/bin/_internal/integrations/n8n/src/nodes/Omnara/Omnara.node.json +0 -35
  161. package/bin/_internal/integrations/n8n/src/nodes/Omnara/Omnara.node.ts +0 -304
  162. package/bin/_internal/integrations/n8n/src/nodes/Omnara/actions/message/index.ts +0 -37
  163. package/bin/_internal/integrations/n8n/src/nodes/Omnara/actions/message/send.operation.ts +0 -151
  164. package/bin/_internal/integrations/n8n/src/nodes/Omnara/actions/message/sendAndWait.operation.ts +0 -252
  165. package/bin/_internal/integrations/n8n/src/nodes/Omnara/actions/session/end.operation.ts +0 -56
  166. package/bin/_internal/integrations/n8n/src/nodes/Omnara/actions/session/index.ts +0 -29
  167. package/bin/_internal/integrations/n8n/src/nodes/Omnara/vicoa.png +0 -0
  168. package/bin/_internal/integrations/n8n/src/utils/GenericFunctions.ts +0 -93
  169. package/bin/_internal/integrations/n8n/src/utils/sendAndWait/configureWaitTillDate.ts +0 -42
  170. package/bin/_internal/integrations/n8n/src/utils/sendAndWait/descriptions.ts +0 -20
  171. package/bin/_internal/integrations/n8n/src/utils/sendAndWaitWebhook.ts +0 -72
  172. package/bin/_internal/integrations/n8n/tsconfig.json +0 -20
  173. package/bin/_internal/jiter/jiter.cpython-312-darwin.so +0 -0
  174. package/bin/_internal/jsonschema/benchmarks/issue232/issue.json +0 -2653
  175. package/bin/_internal/jsonschema-4.26.0.dist-info/INSTALLER +0 -1
  176. package/bin/_internal/jsonschema-4.26.0.dist-info/METADATA +0 -170
  177. package/bin/_internal/jsonschema-4.26.0.dist-info/RECORD +0 -82
  178. package/bin/_internal/jsonschema-4.26.0.dist-info/WHEEL +0 -4
  179. package/bin/_internal/jsonschema-4.26.0.dist-info/entry_points.txt +0 -2
  180. package/bin/_internal/jsonschema-4.26.0.dist-info/licenses/COPYING +0 -19
  181. package/bin/_internal/jsonschema_specifications/schemas/draft201909/metaschema.json +0 -42
  182. package/bin/_internal/jsonschema_specifications/schemas/draft201909/vocabularies/applicator +0 -56
  183. package/bin/_internal/jsonschema_specifications/schemas/draft201909/vocabularies/content +0 -17
  184. package/bin/_internal/jsonschema_specifications/schemas/draft201909/vocabularies/core +0 -57
  185. package/bin/_internal/jsonschema_specifications/schemas/draft201909/vocabularies/format +0 -14
  186. package/bin/_internal/jsonschema_specifications/schemas/draft201909/vocabularies/meta-data +0 -37
  187. package/bin/_internal/jsonschema_specifications/schemas/draft201909/vocabularies/validation +0 -98
  188. package/bin/_internal/jsonschema_specifications/schemas/draft202012/metaschema.json +0 -58
  189. package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/applicator +0 -48
  190. package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/content +0 -17
  191. package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/core +0 -51
  192. package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/format-annotation +0 -14
  193. package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/format-assertion +0 -14
  194. package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/meta-data +0 -37
  195. package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/unevaluated +0 -15
  196. package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/validation +0 -98
  197. package/bin/_internal/jsonschema_specifications/schemas/draft3/metaschema.json +0 -172
  198. package/bin/_internal/jsonschema_specifications/schemas/draft4/metaschema.json +0 -149
  199. package/bin/_internal/jsonschema_specifications/schemas/draft6/metaschema.json +0 -153
  200. package/bin/_internal/jsonschema_specifications/schemas/draft7/metaschema.json +0 -166
  201. package/bin/_internal/libcrypto.3.dylib +0 -0
  202. package/bin/_internal/libssl.3.dylib +0 -0
  203. package/bin/_internal/mcp-1.27.0.dist-info/INSTALLER +0 -1
  204. package/bin/_internal/mcp-1.27.0.dist-info/METADATA +0 -230
  205. package/bin/_internal/mcp-1.27.0.dist-info/RECORD +0 -226
  206. package/bin/_internal/mcp-1.27.0.dist-info/WHEEL +0 -4
  207. package/bin/_internal/mcp-1.27.0.dist-info/entry_points.txt +0 -2
  208. package/bin/_internal/mcp-1.27.0.dist-info/licenses/LICENSE +0 -21
  209. package/bin/_internal/multidict/_multidict.cpython-312-darwin.so +0 -0
  210. package/bin/_internal/opentelemetry_api-1.41.0.dist-info/INSTALLER +0 -1
  211. package/bin/_internal/opentelemetry_api-1.41.0.dist-info/METADATA +0 -45
  212. package/bin/_internal/opentelemetry_api-1.41.0.dist-info/RECORD +0 -81
  213. package/bin/_internal/opentelemetry_api-1.41.0.dist-info/WHEEL +0 -4
  214. package/bin/_internal/opentelemetry_api-1.41.0.dist-info/entry_points.txt +0 -15
  215. package/bin/_internal/opentelemetry_api-1.41.0.dist-info/licenses/LICENSE +0 -201
  216. package/bin/_internal/propcache/_helpers_c.cpython-312-darwin.so +0 -0
  217. package/bin/_internal/pydantic-2.13.2.dist-info/INSTALLER +0 -1
  218. package/bin/_internal/pydantic-2.13.2.dist-info/METADATA +0 -1269
  219. package/bin/_internal/pydantic-2.13.2.dist-info/RECORD +0 -217
  220. package/bin/_internal/pydantic-2.13.2.dist-info/WHEEL +0 -4
  221. package/bin/_internal/pydantic-2.13.2.dist-info/licenses/LICENSE +0 -21
  222. package/bin/_internal/pydantic_core/_pydantic_core.cpython-312-darwin.so +0 -0
  223. package/bin/_internal/python3.12/lib-dynload/_asyncio.cpython-312-darwin.so +0 -0
  224. package/bin/_internal/python3.12/lib-dynload/_bisect.cpython-312-darwin.so +0 -0
  225. package/bin/_internal/python3.12/lib-dynload/_blake2.cpython-312-darwin.so +0 -0
  226. package/bin/_internal/python3.12/lib-dynload/_bz2.cpython-312-darwin.so +0 -0
  227. package/bin/_internal/python3.12/lib-dynload/_codecs_cn.cpython-312-darwin.so +0 -0
  228. package/bin/_internal/python3.12/lib-dynload/_codecs_hk.cpython-312-darwin.so +0 -0
  229. package/bin/_internal/python3.12/lib-dynload/_codecs_iso2022.cpython-312-darwin.so +0 -0
  230. package/bin/_internal/python3.12/lib-dynload/_codecs_jp.cpython-312-darwin.so +0 -0
  231. package/bin/_internal/python3.12/lib-dynload/_codecs_kr.cpython-312-darwin.so +0 -0
  232. package/bin/_internal/python3.12/lib-dynload/_codecs_tw.cpython-312-darwin.so +0 -0
  233. package/bin/_internal/python3.12/lib-dynload/_contextvars.cpython-312-darwin.so +0 -0
  234. package/bin/_internal/python3.12/lib-dynload/_csv.cpython-312-darwin.so +0 -0
  235. package/bin/_internal/python3.12/lib-dynload/_ctypes.cpython-312-darwin.so +0 -0
  236. package/bin/_internal/python3.12/lib-dynload/_datetime.cpython-312-darwin.so +0 -0
  237. package/bin/_internal/python3.12/lib-dynload/_decimal.cpython-312-darwin.so +0 -0
  238. package/bin/_internal/python3.12/lib-dynload/_hashlib.cpython-312-darwin.so +0 -0
  239. package/bin/_internal/python3.12/lib-dynload/_heapq.cpython-312-darwin.so +0 -0
  240. package/bin/_internal/python3.12/lib-dynload/_json.cpython-312-darwin.so +0 -0
  241. package/bin/_internal/python3.12/lib-dynload/_lzma.cpython-312-darwin.so +0 -0
  242. package/bin/_internal/python3.12/lib-dynload/_md5.cpython-312-darwin.so +0 -0
  243. package/bin/_internal/python3.12/lib-dynload/_multibytecodec.cpython-312-darwin.so +0 -0
  244. package/bin/_internal/python3.12/lib-dynload/_multiprocessing.cpython-312-darwin.so +0 -0
  245. package/bin/_internal/python3.12/lib-dynload/_opcode.cpython-312-darwin.so +0 -0
  246. package/bin/_internal/python3.12/lib-dynload/_pickle.cpython-312-darwin.so +0 -0
  247. package/bin/_internal/python3.12/lib-dynload/_posixshmem.cpython-312-darwin.so +0 -0
  248. package/bin/_internal/python3.12/lib-dynload/_posixsubprocess.cpython-312-darwin.so +0 -0
  249. package/bin/_internal/python3.12/lib-dynload/_queue.cpython-312-darwin.so +0 -0
  250. package/bin/_internal/python3.12/lib-dynload/_random.cpython-312-darwin.so +0 -0
  251. package/bin/_internal/python3.12/lib-dynload/_scproxy.cpython-312-darwin.so +0 -0
  252. package/bin/_internal/python3.12/lib-dynload/_sha1.cpython-312-darwin.so +0 -0
  253. package/bin/_internal/python3.12/lib-dynload/_sha2.cpython-312-darwin.so +0 -0
  254. package/bin/_internal/python3.12/lib-dynload/_sha3.cpython-312-darwin.so +0 -0
  255. package/bin/_internal/python3.12/lib-dynload/_socket.cpython-312-darwin.so +0 -0
  256. package/bin/_internal/python3.12/lib-dynload/_ssl.cpython-312-darwin.so +0 -0
  257. package/bin/_internal/python3.12/lib-dynload/_statistics.cpython-312-darwin.so +0 -0
  258. package/bin/_internal/python3.12/lib-dynload/_struct.cpython-312-darwin.so +0 -0
  259. package/bin/_internal/python3.12/lib-dynload/_uuid.cpython-312-darwin.so +0 -0
  260. package/bin/_internal/python3.12/lib-dynload/_zoneinfo.cpython-312-darwin.so +0 -0
  261. package/bin/_internal/python3.12/lib-dynload/array.cpython-312-darwin.so +0 -0
  262. package/bin/_internal/python3.12/lib-dynload/binascii.cpython-312-darwin.so +0 -0
  263. package/bin/_internal/python3.12/lib-dynload/fcntl.cpython-312-darwin.so +0 -0
  264. package/bin/_internal/python3.12/lib-dynload/grp.cpython-312-darwin.so +0 -0
  265. package/bin/_internal/python3.12/lib-dynload/math.cpython-312-darwin.so +0 -0
  266. package/bin/_internal/python3.12/lib-dynload/mmap.cpython-312-darwin.so +0 -0
  267. package/bin/_internal/python3.12/lib-dynload/pyexpat.cpython-312-darwin.so +0 -0
  268. package/bin/_internal/python3.12/lib-dynload/readline.cpython-312-darwin.so +0 -0
  269. package/bin/_internal/python3.12/lib-dynload/resource.cpython-312-darwin.so +0 -0
  270. package/bin/_internal/python3.12/lib-dynload/select.cpython-312-darwin.so +0 -0
  271. package/bin/_internal/python3.12/lib-dynload/syslog.cpython-312-darwin.so +0 -0
  272. package/bin/_internal/python3.12/lib-dynload/termios.cpython-312-darwin.so +0 -0
  273. package/bin/_internal/python3.12/lib-dynload/unicodedata.cpython-312-darwin.so +0 -0
  274. package/bin/_internal/python3.12/lib-dynload/zlib.cpython-312-darwin.so +0 -0
  275. package/bin/_internal/rpds/rpds.cpython-312-darwin.so +0 -0
  276. package/bin/_internal/setuptools/_vendor/jaraco/text/Lorem ipsum.txt +0 -2
  277. package/bin/_internal/vicoa/_bin/README.md +0 -28
  278. package/bin/_internal/vicoa-1.3.10.dist-info/INSTALLER +0 -1
  279. package/bin/_internal/vicoa-1.3.10.dist-info/METADATA +0 -311
  280. package/bin/_internal/vicoa-1.3.10.dist-info/RECORD +0 -11
  281. package/bin/_internal/vicoa-1.3.10.dist-info/REQUESTED +0 -0
  282. package/bin/_internal/vicoa-1.3.10.dist-info/WHEEL +0 -5
  283. package/bin/_internal/vicoa-1.3.10.dist-info/direct_url.json +0 -1
  284. package/bin/_internal/vicoa-1.3.10.dist-info/entry_points.txt +0 -2
  285. package/bin/_internal/vicoa-1.3.10.dist-info/licenses/LICENSE +0 -201
  286. package/bin/_internal/vicoa-1.3.10.dist-info/top_level.txt +0 -3
  287. package/bin/_internal/watchfiles/_rust_notify.cpython-312-darwin.so +0 -0
  288. package/bin/_internal/websockets/speedups.cpython-312-darwin.so +0 -0
  289. package/bin/_internal/websockets-16.0.dist-info/INSTALLER +0 -1
  290. package/bin/_internal/websockets-16.0.dist-info/METADATA +0 -179
  291. package/bin/_internal/websockets-16.0.dist-info/RECORD +0 -108
  292. package/bin/_internal/websockets-16.0.dist-info/WHEEL +0 -6
  293. package/bin/_internal/websockets-16.0.dist-info/entry_points.txt +0 -2
  294. package/bin/_internal/websockets-16.0.dist-info/licenses/LICENSE +0 -24
  295. package/bin/_internal/websockets-16.0.dist-info/top_level.txt +0 -1
  296. package/bin/_internal/yaml/_yaml.cpython-312-darwin.so +0 -0
  297. package/bin/_internal/yarl/_quoting_c.cpython-312-darwin.so +0 -0
  298. package/bin/vicoa +0 -0
@@ -1,184 +0,0 @@
1
- #!/usr/bin/env node
2
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
- import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
- import { z } from "zod";
5
- import { createOctokit } from "../github/api/client";
6
- import { sanitizeContent } from "../github/utils/sanitizer";
7
-
8
- // Get repository and PR information from environment variables
9
- const REPO_OWNER = process.env.REPO_OWNER;
10
- const REPO_NAME = process.env.REPO_NAME;
11
- const PR_NUMBER = process.env.PR_NUMBER;
12
-
13
- if (!REPO_OWNER || !REPO_NAME || !PR_NUMBER) {
14
- console.error(
15
- "Error: REPO_OWNER, REPO_NAME, and PR_NUMBER environment variables are required",
16
- );
17
- process.exit(1);
18
- }
19
-
20
- // GitHub Inline Comment MCP Server - Provides inline PR comment functionality
21
- // Provides an inline comment tool without exposing full PR review capabilities, so that
22
- // Claude can't accidentally approve a PR
23
- const server = new McpServer({
24
- name: "GitHub Inline Comment Server",
25
- version: "0.0.1",
26
- });
27
-
28
- server.tool(
29
- "create_inline_comment",
30
- "Create an inline comment on a specific line or lines in a PR file",
31
- {
32
- path: z
33
- .string()
34
- .describe("The file path to comment on (e.g., 'src/index.js')"),
35
- body: z
36
- .string()
37
- .describe(
38
- "The comment text (supports markdown and GitHub code suggestion blocks). " +
39
- "For code suggestions, use: ```suggestion\\nreplacement code\\n```. " +
40
- "IMPORTANT: The suggestion block will REPLACE the ENTIRE line range (single line or startLine to line). " +
41
- "Ensure the replacement is syntactically complete and valid - it must work as a drop-in replacement for the selected lines.",
42
- ),
43
- line: z
44
- .number()
45
- .nonnegative()
46
- .optional()
47
- .describe(
48
- "Line number for single-line comments (required if startLine is not provided)",
49
- ),
50
- startLine: z
51
- .number()
52
- .nonnegative()
53
- .optional()
54
- .describe(
55
- "Start line for multi-line comments (use with line parameter for the end line)",
56
- ),
57
- side: z
58
- .enum(["LEFT", "RIGHT"])
59
- .optional()
60
- .default("RIGHT")
61
- .describe(
62
- "Side of the diff to comment on: LEFT (old code) or RIGHT (new code)",
63
- ),
64
- commit_id: z
65
- .string()
66
- .optional()
67
- .describe(
68
- "Specific commit SHA to comment on (defaults to latest commit)",
69
- ),
70
- },
71
- async ({ path, body, line, startLine, side, commit_id }) => {
72
- try {
73
- const githubToken = process.env.GITHUB_TOKEN;
74
-
75
- if (!githubToken) {
76
- throw new Error("GITHUB_TOKEN environment variable is required");
77
- }
78
-
79
- const owner = REPO_OWNER;
80
- const repo = REPO_NAME;
81
- const pull_number = parseInt(PR_NUMBER, 10);
82
-
83
- const octokit = createOctokit(githubToken).rest;
84
-
85
- // Sanitize the comment body to remove any potential GitHub tokens
86
- const sanitizedBody = sanitizeContent(body);
87
-
88
- // Validate that either line or both startLine and line are provided
89
- if (!line && !startLine) {
90
- throw new Error(
91
- "Either 'line' for single-line comments or both 'startLine' and 'line' for multi-line comments must be provided",
92
- );
93
- }
94
-
95
- // If only line is provided, it's a single-line comment
96
- // If both startLine and line are provided, it's a multi-line comment
97
- const isSingleLine = !startLine;
98
-
99
- const pr = await octokit.pulls.get({
100
- owner,
101
- repo,
102
- pull_number,
103
- });
104
-
105
- const params: Parameters<
106
- typeof octokit.rest.pulls.createReviewComment
107
- >[0] = {
108
- owner,
109
- repo,
110
- pull_number,
111
- body: sanitizedBody,
112
- path,
113
- side: side || "RIGHT",
114
- commit_id: commit_id || pr.data.head.sha,
115
- };
116
-
117
- if (isSingleLine) {
118
- // Single-line comment
119
- params.line = line;
120
- } else {
121
- // Multi-line comment
122
- params.start_line = startLine;
123
- params.start_side = side || "RIGHT";
124
- params.line = line;
125
- }
126
-
127
- const result = await octokit.rest.pulls.createReviewComment(params);
128
-
129
- return {
130
- content: [
131
- {
132
- type: "text",
133
- text: JSON.stringify(
134
- {
135
- success: true,
136
- comment_id: result.data.id,
137
- html_url: result.data.html_url,
138
- path: result.data.path,
139
- line: result.data.line || result.data.original_line,
140
- message: `Inline comment created successfully on ${path}${isSingleLine ? ` at line ${line}` : ` from line ${startLine} to ${line}`}`,
141
- },
142
- null,
143
- 2,
144
- ),
145
- },
146
- ],
147
- };
148
- } catch (error) {
149
- const errorMessage =
150
- error instanceof Error ? error.message : String(error);
151
-
152
- // Provide more helpful error messages for common issues
153
- let helpMessage = "";
154
- if (errorMessage.includes("Validation Failed")) {
155
- helpMessage =
156
- "\n\nThis usually means the line number doesn't exist in the diff or the file path is incorrect. Make sure you're commenting on lines that are part of the PR's changes.";
157
- } else if (errorMessage.includes("Not Found")) {
158
- helpMessage =
159
- "\n\nThis usually means the PR number, repository, or file path is incorrect.";
160
- }
161
-
162
- return {
163
- content: [
164
- {
165
- type: "text",
166
- text: `Error creating inline comment: ${errorMessage}${helpMessage}`,
167
- },
168
- ],
169
- error: errorMessage,
170
- isError: true,
171
- };
172
- }
173
- },
174
- );
175
-
176
- async function runServer() {
177
- const transport = new StdioServerTransport();
178
- await server.connect(transport);
179
- process.on("exit", () => {
180
- server.close();
181
- });
182
- }
183
-
184
- runServer().catch(console.error);
@@ -1,201 +0,0 @@
1
- import * as core from "@actions/core";
2
- import { GITHUB_API_URL, GITHUB_SERVER_URL } from "../github/api/config";
3
- import type { GitHubContext } from "../github/context";
4
- import { isEntityContext } from "../github/context";
5
- import { Octokit } from "@octokit/rest";
6
-
7
- type PrepareConfigParams = {
8
- githubToken: string;
9
- owner: string;
10
- repo: string;
11
- branch: string;
12
- baseBranch: string;
13
- claudeCommentId?: string;
14
- allowedTools: string[];
15
- context: GitHubContext;
16
- };
17
-
18
- async function checkActionsReadPermission(
19
- token: string,
20
- owner: string,
21
- repo: string,
22
- ): Promise<boolean> {
23
- try {
24
- const client = new Octokit({ auth: token, baseUrl: GITHUB_API_URL });
25
-
26
- // Try to list workflow runs - this requires actions:read
27
- // We use per_page=1 to minimize the response size
28
- await client.actions.listWorkflowRunsForRepo({
29
- owner,
30
- repo,
31
- per_page: 1,
32
- });
33
-
34
- return true;
35
- } catch (error: any) {
36
- // Check if it's a permission error
37
- if (
38
- error.status === 403 &&
39
- error.message?.includes("Resource not accessible")
40
- ) {
41
- return false;
42
- }
43
-
44
- // For other errors (network issues, etc), log but don't fail
45
- core.debug(`Failed to check actions permission: ${error.message}`);
46
- return false;
47
- }
48
- }
49
-
50
- export async function prepareMcpConfig(
51
- params: PrepareConfigParams,
52
- ): Promise<string> {
53
- const {
54
- githubToken,
55
- owner,
56
- repo,
57
- branch,
58
- baseBranch,
59
- claudeCommentId,
60
- allowedTools,
61
- context,
62
- } = params;
63
- try {
64
- const allowedToolsList = allowedTools || [];
65
-
66
- const hasGitHubMcpTools = allowedToolsList.some((tool) =>
67
- tool.startsWith("mcp__github__"),
68
- );
69
-
70
- const hasInlineCommentTools = allowedToolsList.some((tool) =>
71
- tool.startsWith("mcp__github_inline_comment__"),
72
- );
73
-
74
- const baseMcpConfig: { mcpServers: Record<string, unknown> } = {
75
- mcpServers: {},
76
- };
77
-
78
- // Always include comment server for updating Claude comments
79
- baseMcpConfig.mcpServers.github_comment = {
80
- command: "bun",
81
- args: [
82
- "run",
83
- `${process.env.GITHUB_ACTION_PATH}/src/mcp/github-comment-server.ts`,
84
- ],
85
- env: {
86
- GITHUB_TOKEN: githubToken,
87
- REPO_OWNER: owner,
88
- REPO_NAME: repo,
89
- ...(claudeCommentId && { CLAUDE_COMMENT_ID: claudeCommentId }),
90
- GITHUB_EVENT_NAME: process.env.GITHUB_EVENT_NAME || "",
91
- GITHUB_API_URL: GITHUB_API_URL,
92
- },
93
- };
94
-
95
- // Include file ops server when commit signing is enabled
96
- if (context.inputs.useCommitSigning) {
97
- baseMcpConfig.mcpServers.github_file_ops = {
98
- command: "bun",
99
- args: [
100
- "run",
101
- `${process.env.GITHUB_ACTION_PATH}/src/mcp/github-file-ops-server.ts`,
102
- ],
103
- env: {
104
- GITHUB_TOKEN: githubToken,
105
- REPO_OWNER: owner,
106
- REPO_NAME: repo,
107
- BRANCH_NAME: branch,
108
- BASE_BRANCH: baseBranch,
109
- REPO_DIR: process.env.GITHUB_WORKSPACE || process.cwd(),
110
- GITHUB_EVENT_NAME: process.env.GITHUB_EVENT_NAME || "",
111
- IS_PR: process.env.IS_PR || "false",
112
- GITHUB_API_URL: GITHUB_API_URL,
113
- },
114
- };
115
- }
116
-
117
- // Include inline comment server for PRs when requested via allowed tools
118
- if (
119
- isEntityContext(context) &&
120
- context.isPR &&
121
- (hasGitHubMcpTools || hasInlineCommentTools)
122
- ) {
123
- baseMcpConfig.mcpServers.github_inline_comment = {
124
- command: "bun",
125
- args: [
126
- "run",
127
- `${process.env.GITHUB_ACTION_PATH}/src/mcp/github-inline-comment-server.ts`,
128
- ],
129
- env: {
130
- GITHUB_TOKEN: githubToken,
131
- REPO_OWNER: owner,
132
- REPO_NAME: repo,
133
- PR_NUMBER: context.entityNumber?.toString() || "",
134
- GITHUB_API_URL: GITHUB_API_URL,
135
- },
136
- };
137
- }
138
-
139
- // CI server is included when we have a workflow token and context is a PR
140
- const hasWorkflowToken = !!process.env.DEFAULT_WORKFLOW_TOKEN;
141
-
142
- if (isEntityContext(context) && context.isPR && hasWorkflowToken) {
143
- // Verify the token actually has actions:read permission
144
- const actuallyHasPermission = await checkActionsReadPermission(
145
- process.env.DEFAULT_WORKFLOW_TOKEN || "",
146
- owner,
147
- repo,
148
- );
149
-
150
- if (!actuallyHasPermission) {
151
- core.warning(
152
- "The github_ci MCP server requires 'actions: read' permission. " +
153
- "Please ensure your GitHub token has this permission. " +
154
- "See: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token",
155
- );
156
- }
157
- baseMcpConfig.mcpServers.github_ci = {
158
- command: "bun",
159
- args: [
160
- "run",
161
- `${process.env.GITHUB_ACTION_PATH}/src/mcp/github-actions-server.ts`,
162
- ],
163
- env: {
164
- // Use workflow github token, not app token
165
- GITHUB_TOKEN: process.env.DEFAULT_WORKFLOW_TOKEN,
166
- REPO_OWNER: owner,
167
- REPO_NAME: repo,
168
- PR_NUMBER: context.entityNumber?.toString() || "",
169
- RUNNER_TEMP: process.env.RUNNER_TEMP || "/tmp",
170
- },
171
- };
172
- }
173
-
174
- if (hasGitHubMcpTools) {
175
- baseMcpConfig.mcpServers.github = {
176
- command: "docker",
177
- args: [
178
- "run",
179
- "-i",
180
- "--rm",
181
- "-e",
182
- "GITHUB_PERSONAL_ACCESS_TOKEN",
183
- "-e",
184
- "GITHUB_HOST",
185
- "ghcr.io/github/github-mcp-server:sha-efef8ae", // https://github.com/github/github-mcp-server/releases/tag/v0.9.0
186
- ],
187
- env: {
188
- GITHUB_PERSONAL_ACCESS_TOKEN: githubToken,
189
- GITHUB_HOST: GITHUB_SERVER_URL,
190
- },
191
- };
192
- }
193
-
194
- // Return only our GitHub servers config
195
- // User's config will be passed as separate --mcp-config flags
196
- return JSON.stringify(baseMcpConfig, null, 2);
197
- } catch (error) {
198
- core.setFailed(`Install MCP server failed with error: ${error}`);
199
- process.exit(1);
200
- }
201
- }
@@ -1,152 +0,0 @@
1
- import * as core from "@actions/core";
2
- import { mkdir, writeFile } from "fs/promises";
3
- import type { Mode, ModeOptions, ModeResult } from "../types";
4
- import type { PreparedContext } from "../../create-prompt/types";
5
- import { prepareMcpConfig } from "../../mcp/install-mcp-server";
6
- import { parseAllowedTools } from "./parse-tools";
7
- import { configureGitAuth } from "../../github/operations/git-config";
8
-
9
- /**
10
- * Agent mode implementation.
11
- *
12
- * This mode runs whenever an explicit prompt is provided in the workflow configuration.
13
- * It bypasses the standard @claude mention checking and comment tracking used by tag mode,
14
- * providing direct access to Claude Code for automation workflows.
15
- */
16
- export const agentMode: Mode = {
17
- name: "agent",
18
- description: "Direct automation mode for explicit prompts",
19
-
20
- shouldTrigger(context) {
21
- // Only trigger when an explicit prompt is provided
22
- return !!context.inputs?.prompt;
23
- },
24
-
25
- prepareContext(context) {
26
- // Agent mode doesn't use comment tracking or branch management
27
- return {
28
- mode: "agent",
29
- githubContext: context,
30
- };
31
- },
32
-
33
- getAllowedTools() {
34
- return [];
35
- },
36
-
37
- getDisallowedTools() {
38
- return [];
39
- },
40
-
41
- shouldCreateTrackingComment() {
42
- return false;
43
- },
44
-
45
- async prepare({
46
- context,
47
- githubToken,
48
- octokit,
49
- }: ModeOptions): Promise<ModeResult> {
50
- // Configure git authentication for agent mode (same as tag mode)
51
- if (!context.inputs.useCommitSigning) {
52
- try {
53
- // Get the authenticated user (will be claude[bot] when using Claude App token)
54
- const { data: authenticatedUser } =
55
- await octokit.rest.users.getAuthenticated();
56
- const user = {
57
- login: authenticatedUser.login,
58
- id: authenticatedUser.id,
59
- };
60
-
61
- // Use the shared git configuration function
62
- await configureGitAuth(githubToken, context, user);
63
- } catch (error) {
64
- console.error("Failed to configure git authentication:", error);
65
- // Continue anyway - git operations may still work with default config
66
- }
67
- }
68
-
69
- // Create prompt directory
70
- await mkdir(`${process.env.RUNNER_TEMP || "/tmp"}/claude-prompts`, {
71
- recursive: true,
72
- });
73
-
74
- // Write the prompt file - use the user's prompt directly
75
- const promptContent =
76
- context.inputs.prompt ||
77
- `Repository: ${context.repository.owner}/${context.repository.repo}`;
78
-
79
- await writeFile(
80
- `${process.env.RUNNER_TEMP || "/tmp"}/claude-prompts/claude-prompt.txt`,
81
- promptContent,
82
- );
83
-
84
- // Parse allowed tools from user's claude_args
85
- const userClaudeArgs = process.env.CLAUDE_ARGS || "";
86
- const allowedTools = parseAllowedTools(userClaudeArgs);
87
-
88
- // Check for branch info from environment variables (useful for auto-fix workflows)
89
- const claudeBranch = process.env.CLAUDE_BRANCH || undefined;
90
- const baseBranch =
91
- process.env.BASE_BRANCH || context.inputs.baseBranch || "main";
92
-
93
- // Detect current branch from GitHub environment
94
- const currentBranch =
95
- claudeBranch ||
96
- process.env.GITHUB_HEAD_REF ||
97
- process.env.GITHUB_REF_NAME ||
98
- "main";
99
-
100
- // Get our GitHub MCP servers config
101
- const ourMcpConfig = await prepareMcpConfig({
102
- githubToken,
103
- owner: context.repository.owner,
104
- repo: context.repository.repo,
105
- branch: currentBranch,
106
- baseBranch: baseBranch,
107
- claudeCommentId: undefined, // No tracking comment in agent mode
108
- allowedTools,
109
- context,
110
- });
111
-
112
- // Build final claude_args with multiple --mcp-config flags
113
- let claudeArgs = "";
114
-
115
- // Add our GitHub servers config if we have any
116
- const ourConfig = JSON.parse(ourMcpConfig);
117
- if (ourConfig.mcpServers && Object.keys(ourConfig.mcpServers).length > 0) {
118
- const escapedOurConfig = ourMcpConfig.replace(/'/g, "'\\''");
119
- claudeArgs = `--mcp-config '${escapedOurConfig}'`;
120
- }
121
-
122
- // Append user's claude_args (which may have more --mcp-config flags)
123
- claudeArgs = `${claudeArgs} ${userClaudeArgs}`.trim();
124
-
125
- core.setOutput("claude_args", claudeArgs);
126
-
127
- return {
128
- commentId: undefined,
129
- branchInfo: {
130
- baseBranch: baseBranch,
131
- currentBranch: baseBranch, // Use base branch as current when creating new branch
132
- claudeBranch: claudeBranch,
133
- },
134
- mcpConfig: ourMcpConfig,
135
- };
136
- },
137
-
138
- generatePrompt(context: PreparedContext): string {
139
- // Agent mode uses prompt field
140
- if (context.prompt) {
141
- return context.prompt;
142
- }
143
-
144
- // Minimal fallback - repository is a string in PreparedContext
145
- return `Repository: ${context.repository}`;
146
- },
147
-
148
- getSystemPrompt() {
149
- // Agent mode doesn't need additional system prompts
150
- return undefined;
151
- },
152
- };
@@ -1,22 +0,0 @@
1
- export function parseAllowedTools(claudeArgs: string): string[] {
2
- // Match --allowedTools followed by the value
3
- // Handle both quoted and unquoted values
4
- const patterns = [
5
- /--allowedTools\s+"([^"]+)"/, // Double quoted
6
- /--allowedTools\s+'([^']+)'/, // Single quoted
7
- /--allowedTools\s+([^\s]+)/, // Unquoted
8
- ];
9
-
10
- for (const pattern of patterns) {
11
- const match = claudeArgs.match(pattern);
12
- if (match && match[1]) {
13
- // Don't return if the value starts with -- (another flag)
14
- if (match[1].startsWith("--")) {
15
- return [];
16
- }
17
- return match[1].split(",").map((t) => t.trim());
18
- }
19
- }
20
-
21
- return [];
22
- }
@@ -1,66 +0,0 @@
1
- import type { GitHubContext } from "../github/context";
2
- import {
3
- isEntityContext,
4
- isIssueCommentEvent,
5
- isPullRequestReviewCommentEvent,
6
- } from "../github/context";
7
- import { checkContainsTrigger } from "../github/validation/trigger";
8
-
9
- export type AutoDetectedMode = "tag" | "agent";
10
-
11
- export function detectMode(context: GitHubContext): AutoDetectedMode {
12
- // If prompt is provided, use agent mode for direct execution
13
- if (context.inputs?.prompt) {
14
- return "agent";
15
- }
16
-
17
- // Check for @claude mentions (tag mode)
18
- if (isEntityContext(context)) {
19
- if (
20
- isIssueCommentEvent(context) ||
21
- isPullRequestReviewCommentEvent(context)
22
- ) {
23
- if (checkContainsTrigger(context)) {
24
- return "tag";
25
- }
26
- }
27
-
28
- if (context.eventName === "issues") {
29
- if (checkContainsTrigger(context)) {
30
- return "tag";
31
- }
32
- }
33
- }
34
-
35
- // Default to agent mode (which won't trigger without a prompt)
36
- return "agent";
37
- }
38
-
39
- export function getModeDescription(mode: AutoDetectedMode): string {
40
- switch (mode) {
41
- case "tag":
42
- return "Interactive mode triggered by @claude mentions";
43
- case "agent":
44
- return "Direct automation mode for explicit prompts";
45
- default:
46
- return "Unknown mode";
47
- }
48
- }
49
-
50
- export function shouldUseTrackingComment(mode: AutoDetectedMode): boolean {
51
- return mode === "tag";
52
- }
53
-
54
- export function getDefaultPromptForMode(
55
- mode: AutoDetectedMode,
56
- context: GitHubContext,
57
- ): string | undefined {
58
- switch (mode) {
59
- case "tag":
60
- return undefined;
61
- case "agent":
62
- return context.inputs?.prompt;
63
- default:
64
- return undefined;
65
- }
66
- }
@@ -1,54 +0,0 @@
1
- /**
2
- * Mode Registry for claude-code-action v1.0
3
- *
4
- * This module provides access to all available execution modes and handles
5
- * automatic mode detection based on GitHub event types.
6
- */
7
-
8
- import type { Mode, ModeName } from "./types";
9
- import { tagMode } from "./tag";
10
- import { agentMode } from "./agent";
11
- import type { GitHubContext } from "../github/context";
12
- import { detectMode, type AutoDetectedMode } from "./detector";
13
-
14
- export const VALID_MODES = ["tag", "agent"] as const;
15
-
16
- /**
17
- * All available modes in v1.0
18
- */
19
- const modes = {
20
- tag: tagMode,
21
- agent: agentMode,
22
- } as const satisfies Record<AutoDetectedMode, Mode>;
23
-
24
- /**
25
- * Automatically detects and retrieves the appropriate mode based on the GitHub context.
26
- * In v1.0, modes are auto-selected based on event type.
27
- * @param context The GitHub context
28
- * @returns The appropriate mode for the context
29
- */
30
- export function getMode(context: GitHubContext): Mode {
31
- const modeName = detectMode(context);
32
- console.log(
33
- `Auto-detected mode: ${modeName} for event: ${context.eventName}`,
34
- );
35
-
36
- const mode = modes[modeName];
37
- if (!mode) {
38
- throw new Error(
39
- `Mode '${modeName}' not found. This should not happen. Please report this issue.`,
40
- );
41
- }
42
-
43
- return mode;
44
- }
45
-
46
- /**
47
- * Type guard to check if a string is a valid mode name.
48
- * @param name The string to check
49
- * @returns True if the name is a valid mode name
50
- */
51
- export function isValidMode(name: string): name is ModeName {
52
- const validModes = ["tag", "agent"];
53
- return validModes.includes(name);
54
- }