@vicoa/cli 0.1.4-darwin-arm64 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. package/README.md +57 -0
  2. package/bin/vicoa.js +38 -0
  3. package/package.json +17 -10
  4. package/bin/_internal/81d243bd2c585b0f4821__mypyc.cpython-312-darwin.so +0 -0
  5. package/bin/_internal/_cffi_backend.cpython-312-darwin.so +0 -0
  6. package/bin/_internal/aiohttp/_http_parser.cpython-312-darwin.so +0 -0
  7. package/bin/_internal/aiohttp/_http_writer.cpython-312-darwin.so +0 -0
  8. package/bin/_internal/aiohttp/_websocket/mask.cpython-312-darwin.so +0 -0
  9. package/bin/_internal/aiohttp/_websocket/reader_c.cpython-312-darwin.so +0 -0
  10. package/bin/_internal/asyncpg/protocol/protocol.cpython-312-darwin.so +0 -0
  11. package/bin/_internal/attrs-26.1.0.dist-info/INSTALLER +0 -1
  12. package/bin/_internal/attrs-26.1.0.dist-info/METADATA +0 -199
  13. package/bin/_internal/attrs-26.1.0.dist-info/RECORD +0 -55
  14. package/bin/_internal/attrs-26.1.0.dist-info/WHEEL +0 -4
  15. package/bin/_internal/attrs-26.1.0.dist-info/licenses/LICENSE +0 -21
  16. package/bin/_internal/base_library.zip +0 -0
  17. package/bin/_internal/certifi/cacert.pem +0 -4494
  18. package/bin/_internal/certifi/py.typed +0 -0
  19. package/bin/_internal/charset_normalizer/cd.cpython-312-darwin.so +0 -0
  20. package/bin/_internal/charset_normalizer/md.cpython-312-darwin.so +0 -0
  21. package/bin/_internal/click-8.3.2.dist-info/INSTALLER +0 -1
  22. package/bin/_internal/click-8.3.2.dist-info/METADATA +0 -84
  23. package/bin/_internal/click-8.3.2.dist-info/RECORD +0 -40
  24. package/bin/_internal/click-8.3.2.dist-info/WHEEL +0 -4
  25. package/bin/_internal/click-8.3.2.dist-info/licenses/LICENSE.txt +0 -28
  26. package/bin/_internal/cryptography/hazmat/bindings/_rust.abi3.so +0 -0
  27. package/bin/_internal/cryptography-46.0.7.dist-info/INSTALLER +0 -1
  28. package/bin/_internal/cryptography-46.0.7.dist-info/METADATA +0 -139
  29. package/bin/_internal/cryptography-46.0.7.dist-info/RECORD +0 -180
  30. package/bin/_internal/cryptography-46.0.7.dist-info/WHEEL +0 -4
  31. package/bin/_internal/cryptography-46.0.7.dist-info/licenses/LICENSE +0 -3
  32. package/bin/_internal/cryptography-46.0.7.dist-info/licenses/LICENSE.APACHE +0 -202
  33. package/bin/_internal/cryptography-46.0.7.dist-info/licenses/LICENSE.BSD +0 -27
  34. package/bin/_internal/email_validator-2.1.0.dist-info/INSTALLER +0 -1
  35. package/bin/_internal/email_validator-2.1.0.dist-info/LICENSE +0 -121
  36. package/bin/_internal/email_validator-2.1.0.dist-info/METADATA +0 -482
  37. package/bin/_internal/email_validator-2.1.0.dist-info/RECORD +0 -26
  38. package/bin/_internal/email_validator-2.1.0.dist-info/REQUESTED +0 -0
  39. package/bin/_internal/email_validator-2.1.0.dist-info/WHEEL +0 -5
  40. package/bin/_internal/email_validator-2.1.0.dist-info/entry_points.txt +0 -2
  41. package/bin/_internal/email_validator-2.1.0.dist-info/top_level.txt +0 -1
  42. package/bin/_internal/fastmcp-2.9.2.dist-info/INSTALLER +0 -1
  43. package/bin/_internal/fastmcp-2.9.2.dist-info/METADATA +0 -465
  44. package/bin/_internal/fastmcp-2.9.2.dist-info/RECORD +0 -150
  45. package/bin/_internal/fastmcp-2.9.2.dist-info/REQUESTED +0 -0
  46. package/bin/_internal/fastmcp-2.9.2.dist-info/WHEEL +0 -4
  47. package/bin/_internal/fastmcp-2.9.2.dist-info/entry_points.txt +0 -2
  48. package/bin/_internal/fastmcp-2.9.2.dist-info/licenses/LICENSE +0 -201
  49. package/bin/_internal/frozenlist/_frozenlist.cpython-312-darwin.so +0 -0
  50. package/bin/_internal/h2-4.3.0.dist-info/INSTALLER +0 -1
  51. package/bin/_internal/h2-4.3.0.dist-info/METADATA +0 -129
  52. package/bin/_internal/h2-4.3.0.dist-info/RECORD +0 -29
  53. package/bin/_internal/h2-4.3.0.dist-info/WHEEL +0 -5
  54. package/bin/_internal/h2-4.3.0.dist-info/licenses/LICENSE +0 -21
  55. package/bin/_internal/h2-4.3.0.dist-info/top_level.txt +0 -1
  56. package/bin/_internal/httptools/parser/parser.cpython-312-darwin.so +0 -0
  57. package/bin/_internal/httptools/parser/url_parser.cpython-312-darwin.so +0 -0
  58. package/bin/_internal/integrations/cli_wrappers/IMPORTANT_USE_CASES.md +0 -33
  59. package/bin/_internal/integrations/github/claude-code-action/.prettierignore +0 -2
  60. package/bin/_internal/integrations/github/claude-code-action/.prettierrc +0 -1
  61. package/bin/_internal/integrations/github/claude-code-action/CLAUDE.md +0 -136
  62. package/bin/_internal/integrations/github/claude-code-action/CODE_OF_CONDUCT.md +0 -128
  63. package/bin/_internal/integrations/github/claude-code-action/CONTRIBUTING.md +0 -116
  64. package/bin/_internal/integrations/github/claude-code-action/LICENSE +0 -21
  65. package/bin/_internal/integrations/github/claude-code-action/README.md +0 -53
  66. package/bin/_internal/integrations/github/claude-code-action/ROADMAP.md +0 -20
  67. package/bin/_internal/integrations/github/claude-code-action/SECURITY.md +0 -15
  68. package/bin/_internal/integrations/github/claude-code-action/action.yml +0 -294
  69. package/bin/_internal/integrations/github/claude-code-action/base-action/.prettierrc +0 -1
  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/.prettierrc +0 -10
  156. package/bin/_internal/integrations/n8n/LICENSE +0 -21
  157. package/bin/_internal/integrations/n8n/README.md +0 -298
  158. package/bin/_internal/integrations/n8n/package-lock.json +0 -2989
  159. package/bin/_internal/integrations/n8n/package.json +0 -68
  160. package/bin/_internal/jiter/jiter.cpython-312-darwin.so +0 -0
  161. package/bin/_internal/libbz2.dylib +0 -0
  162. package/bin/_internal/libcom_err.3.0.dylib +0 -0
  163. package/bin/_internal/libcrypto.3.dylib +0 -0
  164. package/bin/_internal/libexpat.1.dylib +0 -0
  165. package/bin/_internal/libffi.8.dylib +0 -0
  166. package/bin/_internal/libgssapi_krb5.2.2.dylib +0 -0
  167. package/bin/_internal/libintl.8.dylib +0 -0
  168. package/bin/_internal/libk5crypto.3.1.dylib +0 -0
  169. package/bin/_internal/libkrb5.3.3.dylib +0 -0
  170. package/bin/_internal/libkrb5support.1.1.dylib +0 -0
  171. package/bin/_internal/liblzma.5.dylib +0 -0
  172. package/bin/_internal/libncursesw.6.dylib +0 -0
  173. package/bin/_internal/libpq.5.dylib +0 -0
  174. package/bin/_internal/libpython3.12.dylib +0 -0
  175. package/bin/_internal/libreadline.8.dylib +0 -0
  176. package/bin/_internal/libsqlite3.dylib +0 -0
  177. package/bin/_internal/libssl.3.dylib +0 -0
  178. package/bin/_internal/libtinfow.6.dylib +0 -0
  179. package/bin/_internal/libz.1.dylib +0 -0
  180. package/bin/_internal/mcp-1.9.4.dist-info/INSTALLER +0 -1
  181. package/bin/_internal/mcp-1.9.4.dist-info/METADATA +0 -939
  182. package/bin/_internal/mcp-1.9.4.dist-info/RECORD +0 -154
  183. package/bin/_internal/mcp-1.9.4.dist-info/WHEEL +0 -4
  184. package/bin/_internal/mcp-1.9.4.dist-info/entry_points.txt +0 -2
  185. package/bin/_internal/mcp-1.9.4.dist-info/licenses/LICENSE +0 -21
  186. package/bin/_internal/multidict/_multidict.cpython-312-darwin.so +0 -0
  187. package/bin/_internal/propcache/_helpers_c.cpython-312-darwin.so +0 -0
  188. package/bin/_internal/psycopg2/.dylibs/libcom_err.3.0.dylib +0 -0
  189. package/bin/_internal/psycopg2/.dylibs/libcrypto.3.dylib +0 -0
  190. package/bin/_internal/psycopg2/.dylibs/libgssapi_krb5.2.2.dylib +0 -0
  191. package/bin/_internal/psycopg2/.dylibs/libintl.8.dylib +0 -0
  192. package/bin/_internal/psycopg2/.dylibs/libk5crypto.3.1.dylib +0 -0
  193. package/bin/_internal/psycopg2/.dylibs/libkrb5.3.3.dylib +0 -0
  194. package/bin/_internal/psycopg2/.dylibs/libkrb5support.1.1.dylib +0 -0
  195. package/bin/_internal/psycopg2/.dylibs/libpq.5.dylib +0 -0
  196. package/bin/_internal/psycopg2/.dylibs/libssl.3.dylib +0 -0
  197. package/bin/_internal/psycopg2/_psycopg.cpython-312-darwin.so +0 -0
  198. package/bin/_internal/pydantic_core/_pydantic_core.cpython-312-darwin.so +0 -0
  199. package/bin/_internal/python3.12/lib-dynload/_asyncio.cpython-312-darwin.so +0 -0
  200. package/bin/_internal/python3.12/lib-dynload/_bisect.cpython-312-darwin.so +0 -0
  201. package/bin/_internal/python3.12/lib-dynload/_blake2.cpython-312-darwin.so +0 -0
  202. package/bin/_internal/python3.12/lib-dynload/_bz2.cpython-312-darwin.so +0 -0
  203. package/bin/_internal/python3.12/lib-dynload/_codecs_cn.cpython-312-darwin.so +0 -0
  204. package/bin/_internal/python3.12/lib-dynload/_codecs_hk.cpython-312-darwin.so +0 -0
  205. package/bin/_internal/python3.12/lib-dynload/_codecs_iso2022.cpython-312-darwin.so +0 -0
  206. package/bin/_internal/python3.12/lib-dynload/_codecs_jp.cpython-312-darwin.so +0 -0
  207. package/bin/_internal/python3.12/lib-dynload/_codecs_kr.cpython-312-darwin.so +0 -0
  208. package/bin/_internal/python3.12/lib-dynload/_codecs_tw.cpython-312-darwin.so +0 -0
  209. package/bin/_internal/python3.12/lib-dynload/_contextvars.cpython-312-darwin.so +0 -0
  210. package/bin/_internal/python3.12/lib-dynload/_csv.cpython-312-darwin.so +0 -0
  211. package/bin/_internal/python3.12/lib-dynload/_ctypes.cpython-312-darwin.so +0 -0
  212. package/bin/_internal/python3.12/lib-dynload/_datetime.cpython-312-darwin.so +0 -0
  213. package/bin/_internal/python3.12/lib-dynload/_decimal.cpython-312-darwin.so +0 -0
  214. package/bin/_internal/python3.12/lib-dynload/_hashlib.cpython-312-darwin.so +0 -0
  215. package/bin/_internal/python3.12/lib-dynload/_heapq.cpython-312-darwin.so +0 -0
  216. package/bin/_internal/python3.12/lib-dynload/_json.cpython-312-darwin.so +0 -0
  217. package/bin/_internal/python3.12/lib-dynload/_lzma.cpython-312-darwin.so +0 -0
  218. package/bin/_internal/python3.12/lib-dynload/_md5.cpython-312-darwin.so +0 -0
  219. package/bin/_internal/python3.12/lib-dynload/_multibytecodec.cpython-312-darwin.so +0 -0
  220. package/bin/_internal/python3.12/lib-dynload/_multiprocessing.cpython-312-darwin.so +0 -0
  221. package/bin/_internal/python3.12/lib-dynload/_opcode.cpython-312-darwin.so +0 -0
  222. package/bin/_internal/python3.12/lib-dynload/_pickle.cpython-312-darwin.so +0 -0
  223. package/bin/_internal/python3.12/lib-dynload/_posixshmem.cpython-312-darwin.so +0 -0
  224. package/bin/_internal/python3.12/lib-dynload/_posixsubprocess.cpython-312-darwin.so +0 -0
  225. package/bin/_internal/python3.12/lib-dynload/_queue.cpython-312-darwin.so +0 -0
  226. package/bin/_internal/python3.12/lib-dynload/_random.cpython-312-darwin.so +0 -0
  227. package/bin/_internal/python3.12/lib-dynload/_scproxy.cpython-312-darwin.so +0 -0
  228. package/bin/_internal/python3.12/lib-dynload/_sha1.cpython-312-darwin.so +0 -0
  229. package/bin/_internal/python3.12/lib-dynload/_sha2.cpython-312-darwin.so +0 -0
  230. package/bin/_internal/python3.12/lib-dynload/_sha3.cpython-312-darwin.so +0 -0
  231. package/bin/_internal/python3.12/lib-dynload/_socket.cpython-312-darwin.so +0 -0
  232. package/bin/_internal/python3.12/lib-dynload/_sqlite3.cpython-312-darwin.so +0 -0
  233. package/bin/_internal/python3.12/lib-dynload/_ssl.cpython-312-darwin.so +0 -0
  234. package/bin/_internal/python3.12/lib-dynload/_statistics.cpython-312-darwin.so +0 -0
  235. package/bin/_internal/python3.12/lib-dynload/_struct.cpython-312-darwin.so +0 -0
  236. package/bin/_internal/python3.12/lib-dynload/_uuid.cpython-312-darwin.so +0 -0
  237. package/bin/_internal/python3.12/lib-dynload/_zoneinfo.cpython-312-darwin.so +0 -0
  238. package/bin/_internal/python3.12/lib-dynload/array.cpython-312-darwin.so +0 -0
  239. package/bin/_internal/python3.12/lib-dynload/binascii.cpython-312-darwin.so +0 -0
  240. package/bin/_internal/python3.12/lib-dynload/fcntl.cpython-312-darwin.so +0 -0
  241. package/bin/_internal/python3.12/lib-dynload/grp.cpython-312-darwin.so +0 -0
  242. package/bin/_internal/python3.12/lib-dynload/math.cpython-312-darwin.so +0 -0
  243. package/bin/_internal/python3.12/lib-dynload/mmap.cpython-312-darwin.so +0 -0
  244. package/bin/_internal/python3.12/lib-dynload/pyexpat.cpython-312-darwin.so +0 -0
  245. package/bin/_internal/python3.12/lib-dynload/readline.cpython-312-darwin.so +0 -0
  246. package/bin/_internal/python3.12/lib-dynload/resource.cpython-312-darwin.so +0 -0
  247. package/bin/_internal/python3.12/lib-dynload/select.cpython-312-darwin.so +0 -0
  248. package/bin/_internal/python3.12/lib-dynload/syslog.cpython-312-darwin.so +0 -0
  249. package/bin/_internal/python3.12/lib-dynload/termios.cpython-312-darwin.so +0 -0
  250. package/bin/_internal/python3.12/lib-dynload/unicodedata.cpython-312-darwin.so +0 -0
  251. package/bin/_internal/python3.12/lib-dynload/zlib.cpython-312-darwin.so +0 -0
  252. package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/INSTALLER +0 -1
  253. package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/METADATA +0 -133
  254. package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/RECORD +0 -21
  255. package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/REQUESTED +0 -0
  256. package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/WHEEL +0 -5
  257. package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/licenses/LICENSE +0 -73
  258. package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/top_level.txt +0 -1
  259. package/bin/_internal/setuptools/_vendor/jaraco/text/Lorem ipsum.txt +0 -2
  260. package/bin/_internal/sqlalchemy/cyextension/collections.cpython-312-darwin.so +0 -0
  261. package/bin/_internal/sqlalchemy/cyextension/immutabledict.cpython-312-darwin.so +0 -0
  262. package/bin/_internal/sqlalchemy/cyextension/processors.cpython-312-darwin.so +0 -0
  263. package/bin/_internal/sqlalchemy/cyextension/resultproxy.cpython-312-darwin.so +0 -0
  264. package/bin/_internal/sqlalchemy/cyextension/util.cpython-312-darwin.so +0 -0
  265. package/bin/_internal/uvloop/loop.cpython-312-darwin.so +0 -0
  266. package/bin/_internal/vicoa/_bin/README.md +0 -28
  267. package/bin/_internal/vicoa-1.3.9.dist-info/INSTALLER +0 -1
  268. package/bin/_internal/vicoa-1.3.9.dist-info/METADATA +0 -311
  269. package/bin/_internal/vicoa-1.3.9.dist-info/RECORD +0 -11
  270. package/bin/_internal/vicoa-1.3.9.dist-info/REQUESTED +0 -0
  271. package/bin/_internal/vicoa-1.3.9.dist-info/WHEEL +0 -5
  272. package/bin/_internal/vicoa-1.3.9.dist-info/direct_url.json +0 -1
  273. package/bin/_internal/vicoa-1.3.9.dist-info/entry_points.txt +0 -2
  274. package/bin/_internal/vicoa-1.3.9.dist-info/licenses/LICENSE +0 -201
  275. package/bin/_internal/vicoa-1.3.9.dist-info/top_level.txt +0 -3
  276. package/bin/_internal/watchfiles/_rust_notify.cpython-312-darwin.so +0 -0
  277. package/bin/_internal/websockets/speedups.cpython-312-darwin.so +0 -0
  278. package/bin/_internal/websockets-14.2.dist-info/INSTALLER +0 -1
  279. package/bin/_internal/websockets-14.2.dist-info/LICENSE +0 -24
  280. package/bin/_internal/websockets-14.2.dist-info/METADATA +0 -178
  281. package/bin/_internal/websockets-14.2.dist-info/RECORD +0 -98
  282. package/bin/_internal/websockets-14.2.dist-info/WHEEL +0 -5
  283. package/bin/_internal/websockets-14.2.dist-info/top_level.txt +0 -1
  284. package/bin/_internal/yaml/_yaml.cpython-312-darwin.so +0 -0
  285. package/bin/_internal/yarl/_quoting_c.cpython-312-darwin.so +0 -0
  286. package/bin/_internal/zstandard/_cffi.cpython-312-darwin.so +0 -0
  287. package/bin/_internal/zstandard/backend_c.cpython-312-darwin.so +0 -0
  288. package/bin/vicoa +0 -0
@@ -1,54 +0,0 @@
1
- {
2
- "lockfileVersion": 1,
3
- "workspaces": {
4
- "": {
5
- "name": "@anthropic-ai/claude-code-base-action",
6
- "dependencies": {
7
- "@actions/core": "^1.10.1",
8
- "shell-quote": "^1.8.3",
9
- },
10
- "devDependencies": {
11
- "@types/bun": "^1.2.12",
12
- "@types/node": "^20.0.0",
13
- "@types/shell-quote": "^1.7.5",
14
- "prettier": "3.5.3",
15
- "typescript": "^5.8.3",
16
- },
17
- },
18
- },
19
- "packages": {
20
- "@actions/core": ["@actions/core@1.11.1", "", { "dependencies": { "@actions/exec": "^1.1.1", "@actions/http-client": "^2.0.1" } }, "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A=="],
21
-
22
- "@actions/exec": ["@actions/exec@1.1.1", "", { "dependencies": { "@actions/io": "^1.0.1" } }, "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w=="],
23
-
24
- "@actions/http-client": ["@actions/http-client@2.2.3", "", { "dependencies": { "tunnel": "^0.0.6", "undici": "^5.25.4" } }, "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA=="],
25
-
26
- "@actions/io": ["@actions/io@1.1.3", "", {}, "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q=="],
27
-
28
- "@fastify/busboy": ["@fastify/busboy@2.1.1", "", {}, "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA=="],
29
-
30
- "@types/bun": ["@types/bun@1.2.19", "", { "dependencies": { "bun-types": "1.2.19" } }, "sha512-d9ZCmrH3CJ2uYKXQIUuZ/pUnTqIvLDS0SK7pFmbx8ma+ziH/FRMoAq5bYpRG7y+w1gl+HgyNZbtqgMq4W4e2Lg=="],
31
-
32
- "@types/node": ["@types/node@20.19.9", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-cuVNgarYWZqxRJDQHEB58GEONhOK79QVR/qYx4S7kcUObQvUwvFnYxJuuHUKm2aieN9X3yZB4LZsuYNU1Qphsw=="],
33
-
34
- "@types/react": ["@types/react@19.1.8", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-AwAfQ2Wa5bCx9WP8nZL2uMZWod7J7/JSplxbTmBQ5ms6QpqNYm672H0Vu9ZVKVngQ+ii4R/byguVEUZQyeg44g=="],
35
-
36
- "@types/shell-quote": ["@types/shell-quote@1.7.5", "", {}, "sha512-+UE8GAGRPbJVQDdxi16dgadcBfQ+KG2vgZhV1+3A1XmHbmwcdwhCUwIdy+d3pAGrbvgRoVSjeI9vOWyq376Yzw=="],
37
-
38
- "bun-types": ["bun-types@1.2.19", "", { "dependencies": { "@types/node": "*" }, "peerDependencies": { "@types/react": "^19" } }, "sha512-uAOTaZSPuYsWIXRpj7o56Let0g/wjihKCkeRqUBhlLVM/Bt+Fj9xTo+LhC1OV1XDaGkz4hNC80et5xgy+9KTHQ=="],
39
-
40
- "csstype": ["csstype@3.1.3", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="],
41
-
42
- "prettier": ["prettier@3.5.3", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw=="],
43
-
44
- "shell-quote": ["shell-quote@1.8.3", "", {}, "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw=="],
45
-
46
- "tunnel": ["tunnel@0.0.6", "", {}, "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="],
47
-
48
- "typescript": ["typescript@5.8.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ=="],
49
-
50
- "undici": ["undici@5.29.0", "", { "dependencies": { "@fastify/busboy": "^2.0.0" } }, "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg=="],
51
-
52
- "undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
53
- }
54
- }
@@ -1,108 +0,0 @@
1
- name: Claude Issue Triage Example
2
- description: Run Claude Code for issue triage in GitHub Actions
3
- on:
4
- issues:
5
- types: [opened]
6
-
7
- jobs:
8
- triage-issue:
9
- runs-on: ubuntu-latest
10
- timeout-minutes: 10
11
- permissions:
12
- contents: read
13
- issues: write
14
-
15
- steps:
16
- - name: Checkout repository
17
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
18
- with:
19
- fetch-depth: 0
20
-
21
- - name: Setup GitHub MCP Server
22
- run: |
23
- mkdir -p /tmp/mcp-config
24
- cat > /tmp/mcp-config/mcp-servers.json << 'EOF'
25
- {
26
- "mcpServers": {
27
- "github": {
28
- "command": "docker",
29
- "args": [
30
- "run",
31
- "-i",
32
- "--rm",
33
- "-e",
34
- "GITHUB_PERSONAL_ACCESS_TOKEN",
35
- "ghcr.io/github/github-mcp-server:sha-7aced2b"
36
- ],
37
- "env": {
38
- "GITHUB_PERSONAL_ACCESS_TOKEN": "${{ secrets.GITHUB_TOKEN }}"
39
- }
40
- }
41
- }
42
- }
43
- EOF
44
-
45
- - name: Create triage prompt
46
- run: |
47
- mkdir -p /tmp/claude-prompts
48
- cat > /tmp/claude-prompts/triage-prompt.txt << 'EOF'
49
- You're an issue triage assistant for GitHub issues. Your task is to analyze the issue and select appropriate labels from the provided list.
50
-
51
- IMPORTANT: Don't post any comments or messages to the issue. Your only action should be to apply labels.
52
-
53
- Issue Information:
54
- - REPO: ${GITHUB_REPOSITORY}
55
- - ISSUE_NUMBER: ${{ github.event.issue.number }}
56
-
57
- TASK OVERVIEW:
58
-
59
- 1. First, fetch the list of labels available in this repository by running: `gh label list`. Run exactly this command with nothing else.
60
-
61
- 2. Next, use the GitHub tools to get context about the issue:
62
- - You have access to these tools:
63
- - mcp__github__get_issue: Use this to retrieve the current issue's details including title, description, and existing labels
64
- - mcp__github__get_issue_comments: Use this to read any discussion or additional context provided in the comments
65
- - mcp__github__update_issue: Use this to apply labels to the issue (do not use this for commenting)
66
- - mcp__github__search_issues: Use this to find similar issues that might provide context for proper categorization and to identify potential duplicate issues
67
- - mcp__github__list_issues: Use this to understand patterns in how other issues are labeled
68
- - Start by using mcp__github__get_issue to get the issue details
69
-
70
- 3. Analyze the issue content, considering:
71
- - The issue title and description
72
- - The type of issue (bug report, feature request, question, etc.)
73
- - Technical areas mentioned
74
- - Severity or priority indicators
75
- - User impact
76
- - Components affected
77
-
78
- 4. Select appropriate labels from the available labels list provided above:
79
- - Choose labels that accurately reflect the issue's nature
80
- - Be specific but comprehensive
81
- - Select priority labels if you can determine urgency (high-priority, med-priority, or low-priority)
82
- - Consider platform labels (android, ios) if applicable
83
- - If you find similar issues using mcp__github__search_issues, consider using a "duplicate" label if appropriate. Only do so if the issue is a duplicate of another OPEN issue.
84
-
85
- 5. Apply the selected labels:
86
- - Use mcp__github__update_issue to apply your selected labels
87
- - DO NOT post any comments explaining your decision
88
- - DO NOT communicate directly with users
89
- - If no labels are clearly applicable, do not apply any labels
90
-
91
- IMPORTANT GUIDELINES:
92
- - Be thorough in your analysis
93
- - Only select labels from the provided list above
94
- - DO NOT post any comments to the issue
95
- - Your ONLY action should be to apply labels using mcp__github__update_issue
96
- - It's okay to not add any labels if none are clearly applicable
97
- EOF
98
- env:
99
- GITHUB_REPOSITORY: ${{ github.repository }}
100
-
101
- - name: Run Claude Code for Issue Triage
102
- uses: anthropics/claude-code-base-action@beta
103
- with:
104
- prompt_file: /tmp/claude-prompts/triage-prompt.txt
105
- allowed_tools: "Bash(gh label list),mcp__github__get_issue,mcp__github__get_issue_comments,mcp__github__update_issue,mcp__github__search_issues,mcp__github__list_issues"
106
- claude_args: |
107
- --mcp-config /tmp/mcp-config/mcp-servers.json
108
- anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
@@ -1,23 +0,0 @@
1
- {
2
- "name": "@anthropic-ai/claude-code-base-action",
3
- "version": "1.0.0",
4
- "private": true,
5
- "scripts": {
6
- "format": "prettier --write .",
7
- "format:check": "prettier --check .",
8
- "install-hooks": "bun run scripts/install-hooks.sh",
9
- "test": "bun test",
10
- "typecheck": "tsc --noEmit"
11
- },
12
- "dependencies": {
13
- "@actions/core": "^1.10.1",
14
- "shell-quote": "^1.8.3"
15
- },
16
- "devDependencies": {
17
- "@types/bun": "^1.2.12",
18
- "@types/node": "^20.0.0",
19
- "@types/shell-quote": "^1.7.5",
20
- "prettier": "3.5.3",
21
- "typescript": "^5.8.3"
22
- }
23
- }
@@ -1,13 +0,0 @@
1
- #!/bin/sh
2
-
3
- # Install git hooks
4
- echo "Installing git hooks..."
5
-
6
- # Make sure hooks directory exists
7
- mkdir -p .git/hooks
8
-
9
- # Install pre-push hook
10
- cp scripts/pre-push .git/hooks/pre-push
11
- chmod +x .git/hooks/pre-push
12
-
13
- echo "Git hooks installed successfully!"
@@ -1,46 +0,0 @@
1
- #!/bin/sh
2
-
3
- # Check if files need formatting before push
4
- echo "Checking code formatting..."
5
-
6
- # First check if any files need formatting
7
- if ! bun run format:check; then
8
- echo "Code formatting errors found. Running formatter..."
9
- bun run format
10
-
11
- # Check if there are any staged changes after formatting
12
- if git diff --name-only --exit-code; then
13
- echo "All files are now properly formatted."
14
- else
15
- echo ""
16
- echo "ERROR: Code has been formatted but changes need to be committed!"
17
- echo "Please commit the formatted files and try again."
18
- echo ""
19
- echo "The following files were modified:"
20
- git diff --name-only
21
- echo ""
22
- exit 1
23
- fi
24
- else
25
- echo "Code formatting is already correct."
26
- fi
27
-
28
- # Run type checking
29
- echo "Running type checking..."
30
- if ! bun run typecheck; then
31
- echo "Type checking failed. Please fix the type errors and try again."
32
- exit 1
33
- else
34
- echo "Type checking passed."
35
- fi
36
-
37
- # Run tests
38
- echo "Running tests..."
39
- if ! bun run test; then
40
- echo "Tests failed. Please fix the failing tests and try again."
41
- exit 1
42
- else
43
- echo "All tests passed."
44
- fi
45
-
46
- exit 0
@@ -1,82 +0,0 @@
1
- #!/usr/bin/env bun
2
-
3
- import * as core from "@actions/core";
4
- import { preparePrompt } from "./prepare-prompt";
5
- import { runClaude } from "./run-claude";
6
- import { runVicoa } from "./run-vicoa";
7
- import { setupClaudeCodeSettings } from "./setup-claude-code-settings";
8
- import { validateEnvironmentVariables } from "./validate-env";
9
-
10
- async function run() {
11
- try {
12
- validateEnvironmentVariables();
13
-
14
- await setupClaudeCodeSettings(
15
- process.env.INPUT_SETTINGS,
16
- undefined, // homeDir
17
- );
18
-
19
- const promptConfig = await preparePrompt({
20
- prompt: process.env.INPUT_PROMPT || "",
21
- promptFile: process.env.INPUT_PROMPT_FILE || "",
22
- });
23
-
24
- // Dynamically determine whether to use Vicoa based on:
25
- // 1. VICOA_API_KEY is present (from repository_dispatch or secrets)
26
- // 2. Trigger phrase contains "vicoa" (case-insensitive)
27
- // This allows both @claude (regular) and @vicoa (with tracking) in same repo
28
- const triggerPhrase = process.env.TRIGGER_PHRASE || "@claude";
29
- const isVicoaTrigger = triggerPhrase.toLowerCase().includes("vicoa");
30
- const hasVicoaKey = !!process.env.VICOA_API_KEY;
31
- const isRepositoryDispatch = process.env.GITHUB_EVENT_NAME === "repository_dispatch";
32
-
33
- // Check if @vicoa was used without API key - fall back to Claude with warning
34
- if (isVicoaTrigger && !hasVicoaKey) {
35
- console.warn("⚠️ WARNING: @vicoa was used but VICOA_API_KEY is not set in repository secrets.");
36
- console.warn("⚠️ Falling back to standard Claude Code without session tracking.");
37
- console.warn("⚠️ To enable Vicoa tracking, add VICOA_API_KEY to your repository secrets.");
38
- }
39
-
40
- if (hasVicoaKey && (isVicoaTrigger || isRepositoryDispatch)) {
41
- // Use Vicoa headless for session tracking
42
- console.log("✅ Using Vicoa headless for session tracking");
43
- await runVicoa(promptConfig.path, {
44
- allowedTools: process.env.INPUT_ALLOWED_TOOLS,
45
- disallowedTools: process.env.INPUT_DISALLOWED_TOOLS,
46
- maxTurns: process.env.INPUT_MAX_TURNS,
47
- mcpConfig: process.env.INPUT_MCP_CONFIG,
48
- systemPrompt: process.env.INPUT_SYSTEM_PROMPT,
49
- appendSystemPrompt: process.env.INPUT_APPEND_SYSTEM_PROMPT,
50
- claudeEnv: process.env.INPUT_CLAUDE_ENV,
51
- fallbackModel: process.env.INPUT_FALLBACK_MODEL,
52
- model: process.env.ANTHROPIC_MODEL,
53
- timeoutMinutes: process.env.INPUT_TIMEOUT_MINUTES,
54
- });
55
- } else {
56
- // Use standard Claude Code
57
- console.log("ℹ️ Using standard Claude Code (no Vicoa tracking)");
58
- await runClaude(promptConfig.path, {
59
- claudeArgs: process.env.INPUT_CLAUDE_ARGS,
60
- allowedTools: process.env.INPUT_ALLOWED_TOOLS,
61
- disallowedTools: process.env.INPUT_DISALLOWED_TOOLS,
62
- maxTurns: process.env.INPUT_MAX_TURNS,
63
- mcpConfig: process.env.INPUT_MCP_CONFIG,
64
- systemPrompt: process.env.INPUT_SYSTEM_PROMPT,
65
- appendSystemPrompt: process.env.INPUT_APPEND_SYSTEM_PROMPT,
66
- claudeEnv: process.env.INPUT_CLAUDE_ENV,
67
- fallbackModel: process.env.INPUT_FALLBACK_MODEL,
68
- model: process.env.ANTHROPIC_MODEL,
69
- pathToClaudeCodeExecutable:
70
- process.env.INPUT_PATH_TO_CLAUDE_CODE_EXECUTABLE,
71
- });
72
- }
73
- } catch (error) {
74
- core.setFailed(`Action failed with error: ${error}`);
75
- core.setOutput("conclusion", "failure");
76
- process.exit(1);
77
- }
78
- }
79
-
80
- if (import.meta.main) {
81
- run();
82
- }
@@ -1,82 +0,0 @@
1
- import { existsSync, statSync } from "fs";
2
- import { mkdir, writeFile } from "fs/promises";
3
-
4
- export type PreparePromptInput = {
5
- prompt: string;
6
- promptFile: string;
7
- };
8
-
9
- export type PreparePromptConfig = {
10
- type: "file" | "inline";
11
- path: string;
12
- };
13
-
14
- async function validateAndPreparePrompt(
15
- input: PreparePromptInput,
16
- ): Promise<PreparePromptConfig> {
17
- // Validate inputs
18
- if (!input.prompt && !input.promptFile) {
19
- throw new Error(
20
- "Neither 'prompt' nor 'prompt_file' was provided. At least one is required.",
21
- );
22
- }
23
-
24
- if (input.prompt && input.promptFile) {
25
- throw new Error(
26
- "Both 'prompt' and 'prompt_file' were provided. Please specify only one.",
27
- );
28
- }
29
-
30
- // Handle prompt file
31
- if (input.promptFile) {
32
- if (!existsSync(input.promptFile)) {
33
- throw new Error(`Prompt file '${input.promptFile}' does not exist.`);
34
- }
35
-
36
- // Validate that the file is not empty
37
- const stats = statSync(input.promptFile);
38
- if (stats.size === 0) {
39
- throw new Error(
40
- "Prompt file is empty. Please provide a non-empty prompt.",
41
- );
42
- }
43
-
44
- return {
45
- type: "file",
46
- path: input.promptFile,
47
- };
48
- }
49
-
50
- // Handle inline prompt
51
- if (!input.prompt || input.prompt.trim().length === 0) {
52
- throw new Error("Prompt is empty. Please provide a non-empty prompt.");
53
- }
54
-
55
- const inlinePath = "/tmp/claude-action/prompt.txt";
56
- return {
57
- type: "inline",
58
- path: inlinePath,
59
- };
60
- }
61
-
62
- async function createTemporaryPromptFile(
63
- prompt: string,
64
- promptPath: string,
65
- ): Promise<void> {
66
- // Create the directory path
67
- const dirPath = promptPath.substring(0, promptPath.lastIndexOf("/"));
68
- await mkdir(dirPath, { recursive: true });
69
- await writeFile(promptPath, prompt);
70
- }
71
-
72
- export async function preparePrompt(
73
- input: PreparePromptInput,
74
- ): Promise<PreparePromptConfig> {
75
- const config = await validateAndPreparePrompt(input);
76
-
77
- if (config.type === "inline") {
78
- await createTemporaryPromptFile(input.prompt, config.path);
79
- }
80
-
81
- return config;
82
- }
@@ -1,257 +0,0 @@
1
- import * as core from "@actions/core";
2
- import { exec } from "child_process";
3
- import { promisify } from "util";
4
- import { unlink, writeFile, stat } from "fs/promises";
5
- import { createWriteStream } from "fs";
6
- import { spawn } from "child_process";
7
- import { parse as parseShellArgs } from "shell-quote";
8
-
9
- const execAsync = promisify(exec);
10
-
11
- const PIPE_PATH = `${process.env.RUNNER_TEMP}/claude_prompt_pipe`;
12
- const EXECUTION_FILE = `${process.env.RUNNER_TEMP}/claude-execution-output.json`;
13
- const BASE_ARGS = ["--verbose", "--output-format", "stream-json"];
14
-
15
- export type ClaudeOptions = {
16
- claudeArgs?: string;
17
- model?: string;
18
- pathToClaudeCodeExecutable?: string;
19
- allowedTools?: string;
20
- disallowedTools?: string;
21
- maxTurns?: string;
22
- mcpConfig?: string;
23
- systemPrompt?: string;
24
- appendSystemPrompt?: string;
25
- claudeEnv?: string;
26
- fallbackModel?: string;
27
- };
28
-
29
- type PreparedConfig = {
30
- claudeArgs: string[];
31
- promptPath: string;
32
- env: Record<string, string>;
33
- };
34
-
35
- export function prepareRunConfig(
36
- promptPath: string,
37
- options: ClaudeOptions,
38
- ): PreparedConfig {
39
- // Build Claude CLI arguments:
40
- // 1. Prompt flag (always first)
41
- // 2. User's claudeArgs (full control)
42
- // 3. BASE_ARGS (always last, cannot be overridden)
43
-
44
- const claudeArgs = ["-p"];
45
-
46
- // Parse and add user's custom Claude arguments
47
- if (options.claudeArgs?.trim()) {
48
- const parsed = parseShellArgs(options.claudeArgs);
49
- const customArgs = parsed.filter(
50
- (arg): arg is string => typeof arg === "string",
51
- );
52
- claudeArgs.push(...customArgs);
53
- }
54
-
55
- // BASE_ARGS are always appended last (cannot be overridden)
56
- claudeArgs.push(...BASE_ARGS);
57
-
58
- const customEnv: Record<string, string> = {};
59
-
60
- if (process.env.INPUT_ACTION_INPUTS_PRESENT) {
61
- customEnv.GITHUB_ACTION_INPUTS = process.env.INPUT_ACTION_INPUTS_PRESENT;
62
- }
63
-
64
- return {
65
- claudeArgs,
66
- promptPath,
67
- env: customEnv,
68
- };
69
- }
70
-
71
- export async function runClaude(promptPath: string, options: ClaudeOptions) {
72
- const config = prepareRunConfig(promptPath, options);
73
-
74
- // Create a named pipe
75
- try {
76
- await unlink(PIPE_PATH);
77
- } catch (e) {
78
- // Ignore if file doesn't exist
79
- }
80
-
81
- // Create the named pipe
82
- await execAsync(`mkfifo "${PIPE_PATH}"`);
83
-
84
- // Log prompt file size
85
- let promptSize = "unknown";
86
- try {
87
- const stats = await stat(config.promptPath);
88
- promptSize = stats.size.toString();
89
- } catch (e) {
90
- // Ignore error
91
- }
92
-
93
- console.log(`Prompt file size: ${promptSize} bytes`);
94
-
95
- // Log custom environment variables if any
96
- const customEnvKeys = Object.keys(config.env).filter(
97
- (key) => key !== "CLAUDE_ACTION_INPUTS_PRESENT",
98
- );
99
- if (customEnvKeys.length > 0) {
100
- console.log(`Custom environment variables: ${customEnvKeys.join(", ")}`);
101
- }
102
-
103
- // Log custom arguments if any
104
- if (options.claudeArgs && options.claudeArgs.trim() !== "") {
105
- console.log(`Custom Claude arguments: ${options.claudeArgs}`);
106
- }
107
-
108
- // Output to console
109
- console.log(`Running Claude with prompt from file: ${config.promptPath}`);
110
- console.log(`Full command: claude ${config.claudeArgs.join(" ")}`);
111
-
112
- // Start sending prompt to pipe in background
113
- const catProcess = spawn("cat", [config.promptPath], {
114
- stdio: ["ignore", "pipe", "inherit"],
115
- });
116
- const pipeStream = createWriteStream(PIPE_PATH);
117
- catProcess.stdout.pipe(pipeStream);
118
-
119
- catProcess.on("error", (error) => {
120
- console.error("Error reading prompt file:", error);
121
- pipeStream.destroy();
122
- });
123
-
124
- // Use custom executable path if provided, otherwise default to "claude"
125
- const claudeExecutable = options.pathToClaudeCodeExecutable || "claude";
126
-
127
- const claudeProcess = spawn(claudeExecutable, config.claudeArgs, {
128
- stdio: ["pipe", "pipe", "inherit"],
129
- env: {
130
- ...process.env,
131
- ...config.env,
132
- },
133
- });
134
-
135
- // Handle Claude process errors
136
- claudeProcess.on("error", (error) => {
137
- console.error("Error spawning Claude process:", error);
138
- pipeStream.destroy();
139
- });
140
-
141
- // Capture output for parsing execution metrics
142
- let output = "";
143
- claudeProcess.stdout.on("data", (data) => {
144
- const text = data.toString();
145
-
146
- // Try to parse as JSON and pretty print if it's on a single line
147
- const lines = text.split("\n");
148
- lines.forEach((line: string, index: number) => {
149
- if (line.trim() === "") return;
150
-
151
- try {
152
- // Check if this line is a JSON object
153
- const parsed = JSON.parse(line);
154
- const prettyJson = JSON.stringify(parsed, null, 2);
155
- process.stdout.write(prettyJson);
156
- if (index < lines.length - 1 || text.endsWith("\n")) {
157
- process.stdout.write("\n");
158
- }
159
- } catch (e) {
160
- // Not a JSON object, print as is
161
- process.stdout.write(line);
162
- if (index < lines.length - 1 || text.endsWith("\n")) {
163
- process.stdout.write("\n");
164
- }
165
- }
166
- });
167
-
168
- output += text;
169
- });
170
-
171
- // Handle stdout errors
172
- claudeProcess.stdout.on("error", (error) => {
173
- console.error("Error reading Claude stdout:", error);
174
- });
175
-
176
- // Pipe from named pipe to Claude
177
- const pipeProcess = spawn("cat", [PIPE_PATH]);
178
- pipeProcess.stdout.pipe(claudeProcess.stdin);
179
-
180
- // Handle pipe process errors
181
- pipeProcess.on("error", (error) => {
182
- console.error("Error reading from named pipe:", error);
183
- claudeProcess.kill("SIGTERM");
184
- });
185
-
186
- // Wait for Claude to finish
187
- const exitCode = await new Promise<number>((resolve) => {
188
- claudeProcess.on("close", (code) => {
189
- resolve(code || 0);
190
- });
191
-
192
- claudeProcess.on("error", (error) => {
193
- console.error("Claude process error:", error);
194
- resolve(1);
195
- });
196
- });
197
-
198
- // Clean up processes
199
- try {
200
- catProcess.kill("SIGTERM");
201
- } catch (e) {
202
- // Process may already be dead
203
- }
204
- try {
205
- pipeProcess.kill("SIGTERM");
206
- } catch (e) {
207
- // Process may already be dead
208
- }
209
-
210
- // Clean up pipe file
211
- try {
212
- await unlink(PIPE_PATH);
213
- } catch (e) {
214
- // Ignore errors during cleanup
215
- }
216
-
217
- // Set conclusion based on exit code
218
- if (exitCode === 0) {
219
- // Try to process the output and save execution metrics
220
- try {
221
- await writeFile("output.txt", output);
222
-
223
- // Process output.txt into JSON and save to execution file
224
- // Increase maxBuffer from Node.js default of 1MB to 10MB to handle large Claude outputs
225
- const { stdout: jsonOutput } = await execAsync("jq -s '.' output.txt", {
226
- maxBuffer: 10 * 1024 * 1024,
227
- });
228
- await writeFile(EXECUTION_FILE, jsonOutput);
229
-
230
- console.log(`Log saved to ${EXECUTION_FILE}`);
231
- } catch (e) {
232
- core.warning(`Failed to process output for execution metrics: ${e}`);
233
- }
234
-
235
- core.setOutput("conclusion", "success");
236
- core.setOutput("execution_file", EXECUTION_FILE);
237
- } else {
238
- core.setOutput("conclusion", "failure");
239
-
240
- // Still try to save execution file if we have output
241
- if (output) {
242
- try {
243
- await writeFile("output.txt", output);
244
- // Increase maxBuffer from Node.js default of 1MB to 10MB to handle large Claude outputs
245
- const { stdout: jsonOutput } = await execAsync("jq -s '.' output.txt", {
246
- maxBuffer: 10 * 1024 * 1024,
247
- });
248
- await writeFile(EXECUTION_FILE, jsonOutput);
249
- core.setOutput("execution_file", EXECUTION_FILE);
250
- } catch (e) {
251
- // Ignore errors when processing output during failure
252
- }
253
- }
254
-
255
- process.exit(exitCode);
256
- }
257
- }