@vicoa/cli 1.3.13-win32-x64 → 1.3.13
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.
- package/README.md +82 -0
- package/bin/vicoa.js +38 -0
- package/package.json +29 -10
- package/bin/_internal/81d243bd2c585b0f4821__mypyc.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/VCRUNTIME140.dll +0 -0
- package/bin/_internal/VCRUNTIME140_1.dll +0 -0
- package/bin/_internal/_asyncio.pyd +0 -0
- package/bin/_internal/_bz2.pyd +0 -0
- package/bin/_internal/_cffi_backend.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/_ctypes.pyd +0 -0
- package/bin/_internal/_decimal.pyd +0 -0
- package/bin/_internal/_hashlib.pyd +0 -0
- package/bin/_internal/_lzma.pyd +0 -0
- package/bin/_internal/_multiprocessing.pyd +0 -0
- package/bin/_internal/_overlapped.pyd +0 -0
- package/bin/_internal/_queue.pyd +0 -0
- package/bin/_internal/_socket.pyd +0 -0
- package/bin/_internal/_ssl.pyd +0 -0
- package/bin/_internal/_uuid.pyd +0 -0
- package/bin/_internal/_wmi.pyd +0 -0
- package/bin/_internal/_zoneinfo.pyd +0 -0
- package/bin/_internal/aiofile-3.9.0.dist-info/INSTALLER +0 -1
- package/bin/_internal/aiofile-3.9.0.dist-info/LICENCE +0 -195
- package/bin/_internal/aiofile-3.9.0.dist-info/LICENCE.md +0 -195
- package/bin/_internal/aiofile-3.9.0.dist-info/METADATA +0 -492
- package/bin/_internal/aiofile-3.9.0.dist-info/RECORD +0 -15
- package/bin/_internal/aiofile-3.9.0.dist-info/WHEEL +0 -4
- package/bin/_internal/aiohttp/_http_parser.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/aiohttp/_http_writer.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/aiohttp/_websocket/mask.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/aiohttp/_websocket/reader_c.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/api-ms-win-core-console-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-datetime-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-debug-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-errorhandling-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-fibers-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-fibers-l1-1-1.dll +0 -0
- package/bin/_internal/api-ms-win-core-file-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-file-l1-2-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-file-l2-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-handle-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-heap-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-interlocked-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-kernel32-legacy-l1-1-1.dll +0 -0
- package/bin/_internal/api-ms-win-core-libraryloader-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-localization-l1-2-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-memory-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-namedpipe-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-processenvironment-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-processthreads-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-processthreads-l1-1-1.dll +0 -0
- package/bin/_internal/api-ms-win-core-profile-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-rtlsupport-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-string-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-synch-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-synch-l1-2-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-sysinfo-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-sysinfo-l1-2-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-timezone-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-core-util-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-conio-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-convert-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-environment-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-filesystem-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-heap-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-locale-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-math-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-process-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-runtime-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-stdio-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-string-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-time-l1-1-0.dll +0 -0
- package/bin/_internal/api-ms-win-crt-utility-l1-1-0.dll +0 -0
- package/bin/_internal/attrs-26.1.0.dist-info/INSTALLER +0 -1
- package/bin/_internal/attrs-26.1.0.dist-info/METADATA +0 -199
- package/bin/_internal/attrs-26.1.0.dist-info/RECORD +0 -55
- package/bin/_internal/attrs-26.1.0.dist-info/WHEEL +0 -4
- package/bin/_internal/attrs-26.1.0.dist-info/licenses/LICENSE +0 -21
- package/bin/_internal/base_library.zip +0 -0
- package/bin/_internal/certifi/cacert.pem +0 -4494
- package/bin/_internal/certifi/py.typed +0 -0
- package/bin/_internal/charset_normalizer/cd.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/charset_normalizer/md.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/click-8.3.2.dist-info/INSTALLER +0 -1
- package/bin/_internal/click-8.3.2.dist-info/METADATA +0 -84
- package/bin/_internal/click-8.3.2.dist-info/RECORD +0 -40
- package/bin/_internal/click-8.3.2.dist-info/WHEEL +0 -4
- package/bin/_internal/click-8.3.2.dist-info/licenses/LICENSE.txt +0 -28
- package/bin/_internal/cryptography/hazmat/bindings/_rust.pyd +0 -0
- package/bin/_internal/cryptography-46.0.7.dist-info/INSTALLER +0 -1
- package/bin/_internal/cryptography-46.0.7.dist-info/METADATA +0 -139
- package/bin/_internal/cryptography-46.0.7.dist-info/RECORD +0 -180
- package/bin/_internal/cryptography-46.0.7.dist-info/WHEEL +0 -4
- package/bin/_internal/cryptography-46.0.7.dist-info/licenses/LICENSE +0 -3
- package/bin/_internal/cryptography-46.0.7.dist-info/licenses/LICENSE.APACHE +0 -202
- package/bin/_internal/cryptography-46.0.7.dist-info/licenses/LICENSE.BSD +0 -27
- package/bin/_internal/email_validator-2.3.0.dist-info/INSTALLER +0 -1
- package/bin/_internal/email_validator-2.3.0.dist-info/METADATA +0 -466
- package/bin/_internal/email_validator-2.3.0.dist-info/RECORD +0 -27
- package/bin/_internal/email_validator-2.3.0.dist-info/WHEEL +0 -5
- package/bin/_internal/email_validator-2.3.0.dist-info/entry_points.txt +0 -2
- package/bin/_internal/email_validator-2.3.0.dist-info/licenses/LICENSE +0 -27
- package/bin/_internal/email_validator-2.3.0.dist-info/top_level.txt +0 -1
- package/bin/_internal/frozenlist/_frozenlist.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/importlib_metadata-8.7.1.dist-info/INSTALLER +0 -1
- package/bin/_internal/importlib_metadata-8.7.1.dist-info/METADATA +0 -133
- package/bin/_internal/importlib_metadata-8.7.1.dist-info/RECORD +0 -33
- package/bin/_internal/importlib_metadata-8.7.1.dist-info/WHEEL +0 -5
- package/bin/_internal/importlib_metadata-8.7.1.dist-info/licenses/LICENSE +0 -73
- package/bin/_internal/importlib_metadata-8.7.1.dist-info/top_level.txt +0 -1
- package/bin/_internal/integrations/cli_wrappers/IMPORTANT_USE_CASES.md +0 -33
- package/bin/_internal/integrations/github/claude-code-action/CLAUDE.md +0 -136
- package/bin/_internal/integrations/github/claude-code-action/CODE_OF_CONDUCT.md +0 -128
- package/bin/_internal/integrations/github/claude-code-action/CONTRIBUTING.md +0 -116
- package/bin/_internal/integrations/github/claude-code-action/LICENSE +0 -21
- package/bin/_internal/integrations/github/claude-code-action/README.md +0 -53
- package/bin/_internal/integrations/github/claude-code-action/ROADMAP.md +0 -20
- package/bin/_internal/integrations/github/claude-code-action/SECURITY.md +0 -15
- package/bin/_internal/integrations/github/claude-code-action/action.yml +0 -294
- package/bin/_internal/integrations/github/claude-code-action/base-action/CLAUDE.md +0 -60
- package/bin/_internal/integrations/github/claude-code-action/base-action/CODE_OF_CONDUCT.md +0 -128
- package/bin/_internal/integrations/github/claude-code-action/base-action/CONTRIBUTING.md +0 -136
- package/bin/_internal/integrations/github/claude-code-action/base-action/LICENSE +0 -21
- package/bin/_internal/integrations/github/claude-code-action/base-action/MIRROR_DISCLAIMER.md +0 -11
- package/bin/_internal/integrations/github/claude-code-action/base-action/README.md +0 -521
- package/bin/_internal/integrations/github/claude-code-action/base-action/action.yml +0 -149
- package/bin/_internal/integrations/github/claude-code-action/base-action/bun.lock +0 -54
- package/bin/_internal/integrations/github/claude-code-action/base-action/examples/issue-triage.yml +0 -108
- package/bin/_internal/integrations/github/claude-code-action/base-action/package.json +0 -23
- package/bin/_internal/integrations/github/claude-code-action/base-action/scripts/install-hooks.sh +0 -13
- package/bin/_internal/integrations/github/claude-code-action/base-action/scripts/pre-push +0 -46
- package/bin/_internal/integrations/github/claude-code-action/base-action/src/index.ts +0 -82
- package/bin/_internal/integrations/github/claude-code-action/base-action/src/prepare-prompt.ts +0 -82
- package/bin/_internal/integrations/github/claude-code-action/base-action/src/run-claude.ts +0 -257
- package/bin/_internal/integrations/github/claude-code-action/base-action/src/run-vicoa.ts +0 -301
- package/bin/_internal/integrations/github/claude-code-action/base-action/src/setup-claude-code-settings.ts +0 -68
- package/bin/_internal/integrations/github/claude-code-action/base-action/src/validate-env.ts +0 -54
- package/bin/_internal/integrations/github/claude-code-action/base-action/test-local.sh +0 -12
- package/bin/_internal/integrations/github/claude-code-action/base-action/test-mcp-local.sh +0 -18
- package/bin/_internal/integrations/github/claude-code-action/base-action/tsconfig.json +0 -30
- package/bin/_internal/integrations/github/claude-code-action/bun.lock +0 -384
- package/bin/_internal/integrations/github/claude-code-action/docs/capabilities-and-limitations.md +0 -33
- package/bin/_internal/integrations/github/claude-code-action/docs/cloud-providers.md +0 -99
- package/bin/_internal/integrations/github/claude-code-action/docs/configuration.md +0 -345
- package/bin/_internal/integrations/github/claude-code-action/docs/custom-automations.md +0 -113
- package/bin/_internal/integrations/github/claude-code-action/docs/experimental.md +0 -128
- package/bin/_internal/integrations/github/claude-code-action/docs/faq.md +0 -205
- package/bin/_internal/integrations/github/claude-code-action/docs/migration-guide.md +0 -261
- package/bin/_internal/integrations/github/claude-code-action/docs/security.md +0 -38
- package/bin/_internal/integrations/github/claude-code-action/docs/setup.md +0 -146
- package/bin/_internal/integrations/github/claude-code-action/docs/usage.md +0 -213
- package/bin/_internal/integrations/github/claude-code-action/examples/auto-fix-ci/auto-fix-ci.yml +0 -97
- package/bin/_internal/integrations/github/claude-code-action/examples/auto-fix-ci/commands/fix-ci.md +0 -127
- package/bin/_internal/integrations/github/claude-code-action/examples/auto-fix-ci-signed/auto-fix-ci-signed.yml +0 -97
- package/bin/_internal/integrations/github/claude-code-action/examples/auto-fix-ci-signed/commands/fix-ci-signed.md +0 -148
- package/bin/_internal/integrations/github/claude-code-action/examples/issue-deduplication.yml +0 -63
- package/bin/_internal/integrations/github/claude-code-action/examples/issue-triage.yml +0 -75
- package/bin/_internal/integrations/github/claude-code-action/examples/vicoa.yml +0 -75
- package/bin/_internal/integrations/github/claude-code-action/package.json +0 -31
- package/bin/_internal/integrations/github/claude-code-action/scripts/install-hooks.sh +0 -13
- package/bin/_internal/integrations/github/claude-code-action/scripts/pre-commit +0 -46
- package/bin/_internal/integrations/github/claude-code-action/scripts/setup-network-restrictions.sh +0 -123
- package/bin/_internal/integrations/github/claude-code-action/src/create-prompt/index.ts +0 -799
- package/bin/_internal/integrations/github/claude-code-action/src/create-prompt/types.ts +0 -102
- package/bin/_internal/integrations/github/claude-code-action/src/entrypoints/collect-inputs.ts +0 -58
- package/bin/_internal/integrations/github/claude-code-action/src/entrypoints/format-turns.ts +0 -465
- package/bin/_internal/integrations/github/claude-code-action/src/entrypoints/prepare.ts +0 -98
- package/bin/_internal/integrations/github/claude-code-action/src/entrypoints/update-comment-link.ts +0 -245
- package/bin/_internal/integrations/github/claude-code-action/src/github/api/client.ts +0 -23
- package/bin/_internal/integrations/github/claude-code-action/src/github/api/config.ts +0 -4
- package/bin/_internal/integrations/github/claude-code-action/src/github/api/queries/github.ts +0 -117
- package/bin/_internal/integrations/github/claude-code-action/src/github/context.ts +0 -277
- package/bin/_internal/integrations/github/claude-code-action/src/github/data/fetcher.ts +0 -233
- package/bin/_internal/integrations/github/claude-code-action/src/github/data/formatter.ts +0 -144
- package/bin/_internal/integrations/github/claude-code-action/src/github/operations/branch-cleanup.ts +0 -132
- package/bin/_internal/integrations/github/claude-code-action/src/github/operations/branch.ts +0 -163
- package/bin/_internal/integrations/github/claude-code-action/src/github/operations/comment-logic.ts +0 -203
- package/bin/_internal/integrations/github/claude-code-action/src/github/operations/comments/common.ts +0 -33
- package/bin/_internal/integrations/github/claude-code-action/src/github/operations/comments/create-initial.ts +0 -111
- package/bin/_internal/integrations/github/claude-code-action/src/github/operations/comments/update-claude-comment.ts +0 -70
- package/bin/_internal/integrations/github/claude-code-action/src/github/operations/comments/update-with-branch.ts +0 -57
- package/bin/_internal/integrations/github/claude-code-action/src/github/operations/git-config.ts +0 -62
- package/bin/_internal/integrations/github/claude-code-action/src/github/token.ts +0 -108
- package/bin/_internal/integrations/github/claude-code-action/src/github/types.ts +0 -98
- package/bin/_internal/integrations/github/claude-code-action/src/github/utils/image-downloader.ts +0 -246
- package/bin/_internal/integrations/github/claude-code-action/src/github/utils/sanitizer.ts +0 -100
- package/bin/_internal/integrations/github/claude-code-action/src/github/validation/actor.ts +0 -64
- package/bin/_internal/integrations/github/claude-code-action/src/github/validation/permissions.ts +0 -47
- package/bin/_internal/integrations/github/claude-code-action/src/github/validation/trigger.ts +0 -148
- package/bin/_internal/integrations/github/claude-code-action/src/mcp/github-actions-server.ts +0 -279
- package/bin/_internal/integrations/github/claude-code-action/src/mcp/github-comment-server.ts +0 -101
- package/bin/_internal/integrations/github/claude-code-action/src/mcp/github-file-ops-server.ts +0 -677
- package/bin/_internal/integrations/github/claude-code-action/src/mcp/github-inline-comment-server.ts +0 -184
- package/bin/_internal/integrations/github/claude-code-action/src/mcp/install-mcp-server.ts +0 -201
- package/bin/_internal/integrations/github/claude-code-action/src/modes/agent/index.ts +0 -152
- package/bin/_internal/integrations/github/claude-code-action/src/modes/agent/parse-tools.ts +0 -22
- package/bin/_internal/integrations/github/claude-code-action/src/modes/detector.ts +0 -66
- package/bin/_internal/integrations/github/claude-code-action/src/modes/registry.ts +0 -54
- package/bin/_internal/integrations/github/claude-code-action/src/modes/tag/index.ts +0 -187
- package/bin/_internal/integrations/github/claude-code-action/src/modes/types.ts +0 -100
- package/bin/_internal/integrations/github/claude-code-action/src/prepare/index.ts +0 -20
- package/bin/_internal/integrations/github/claude-code-action/src/prepare/types.ts +0 -20
- package/bin/_internal/integrations/github/claude-code-action/src/utils/retry.ts +0 -40
- package/bin/_internal/integrations/github/claude-code-action/tsconfig.json +0 -30
- package/bin/_internal/integrations/n8n/LICENSE +0 -21
- package/bin/_internal/integrations/n8n/README.md +0 -298
- package/bin/_internal/integrations/n8n/package-lock.json +0 -2989
- package/bin/_internal/integrations/n8n/package.json +0 -68
- package/bin/_internal/integrations/n8n/src/credentials/OmnaraApi.credentials.ts +0 -52
- package/bin/_internal/integrations/n8n/src/nodes/Omnara/Omnara.node.json +0 -35
- package/bin/_internal/integrations/n8n/src/nodes/Omnara/Omnara.node.ts +0 -304
- package/bin/_internal/integrations/n8n/src/nodes/Omnara/actions/message/index.ts +0 -37
- package/bin/_internal/integrations/n8n/src/nodes/Omnara/actions/message/send.operation.ts +0 -151
- package/bin/_internal/integrations/n8n/src/nodes/Omnara/actions/message/sendAndWait.operation.ts +0 -252
- package/bin/_internal/integrations/n8n/src/nodes/Omnara/actions/session/end.operation.ts +0 -56
- package/bin/_internal/integrations/n8n/src/nodes/Omnara/actions/session/index.ts +0 -29
- package/bin/_internal/integrations/n8n/src/nodes/Omnara/vicoa.png +0 -0
- package/bin/_internal/integrations/n8n/src/utils/GenericFunctions.ts +0 -93
- package/bin/_internal/integrations/n8n/src/utils/sendAndWait/configureWaitTillDate.ts +0 -42
- package/bin/_internal/integrations/n8n/src/utils/sendAndWait/descriptions.ts +0 -20
- package/bin/_internal/integrations/n8n/src/utils/sendAndWaitWebhook.ts +0 -72
- package/bin/_internal/integrations/n8n/tsconfig.json +0 -20
- package/bin/_internal/jiter/jiter.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/jsonschema/benchmarks/issue232/issue.json +0 -2653
- package/bin/_internal/jsonschema-4.26.0.dist-info/INSTALLER +0 -1
- package/bin/_internal/jsonschema-4.26.0.dist-info/METADATA +0 -170
- package/bin/_internal/jsonschema-4.26.0.dist-info/RECORD +0 -82
- package/bin/_internal/jsonschema-4.26.0.dist-info/WHEEL +0 -4
- package/bin/_internal/jsonschema-4.26.0.dist-info/entry_points.txt +0 -2
- package/bin/_internal/jsonschema-4.26.0.dist-info/licenses/COPYING +0 -19
- package/bin/_internal/jsonschema_specifications/schemas/draft201909/metaschema.json +0 -42
- package/bin/_internal/jsonschema_specifications/schemas/draft201909/vocabularies/applicator +0 -56
- package/bin/_internal/jsonschema_specifications/schemas/draft201909/vocabularies/content +0 -17
- package/bin/_internal/jsonschema_specifications/schemas/draft201909/vocabularies/core +0 -57
- package/bin/_internal/jsonschema_specifications/schemas/draft201909/vocabularies/format +0 -14
- package/bin/_internal/jsonschema_specifications/schemas/draft201909/vocabularies/meta-data +0 -37
- package/bin/_internal/jsonschema_specifications/schemas/draft201909/vocabularies/validation +0 -98
- package/bin/_internal/jsonschema_specifications/schemas/draft202012/metaschema.json +0 -58
- package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/applicator +0 -48
- package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/content +0 -17
- package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/core +0 -51
- package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/format-annotation +0 -14
- package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/format-assertion +0 -14
- package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/meta-data +0 -37
- package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/unevaluated +0 -15
- package/bin/_internal/jsonschema_specifications/schemas/draft202012/vocabularies/validation +0 -98
- package/bin/_internal/jsonschema_specifications/schemas/draft3/metaschema.json +0 -172
- package/bin/_internal/jsonschema_specifications/schemas/draft4/metaschema.json +0 -149
- package/bin/_internal/jsonschema_specifications/schemas/draft6/metaschema.json +0 -153
- package/bin/_internal/jsonschema_specifications/schemas/draft7/metaschema.json +0 -166
- package/bin/_internal/libcrypto-3.dll +0 -0
- package/bin/_internal/libffi-8.dll +0 -0
- package/bin/_internal/libssl-3.dll +0 -0
- package/bin/_internal/mcp-1.27.0.dist-info/INSTALLER +0 -1
- package/bin/_internal/mcp-1.27.0.dist-info/METADATA +0 -230
- package/bin/_internal/mcp-1.27.0.dist-info/RECORD +0 -226
- package/bin/_internal/mcp-1.27.0.dist-info/WHEEL +0 -4
- package/bin/_internal/mcp-1.27.0.dist-info/entry_points.txt +0 -2
- package/bin/_internal/mcp-1.27.0.dist-info/licenses/LICENSE +0 -21
- package/bin/_internal/multidict/_multidict.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/opentelemetry_api-1.41.0.dist-info/INSTALLER +0 -1
- package/bin/_internal/opentelemetry_api-1.41.0.dist-info/METADATA +0 -45
- package/bin/_internal/opentelemetry_api-1.41.0.dist-info/RECORD +0 -81
- package/bin/_internal/opentelemetry_api-1.41.0.dist-info/WHEEL +0 -4
- package/bin/_internal/opentelemetry_api-1.41.0.dist-info/entry_points.txt +0 -15
- package/bin/_internal/opentelemetry_api-1.41.0.dist-info/licenses/LICENSE +0 -201
- package/bin/_internal/propcache/_helpers_c.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/pydantic-2.13.3.dist-info/INSTALLER +0 -1
- package/bin/_internal/pydantic-2.13.3.dist-info/METADATA +0 -1279
- package/bin/_internal/pydantic-2.13.3.dist-info/RECORD +0 -217
- package/bin/_internal/pydantic-2.13.3.dist-info/WHEEL +0 -4
- package/bin/_internal/pydantic-2.13.3.dist-info/licenses/LICENSE +0 -21
- package/bin/_internal/pydantic_core/_pydantic_core.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/pyexpat.pyd +0 -0
- package/bin/_internal/python3.dll +0 -0
- package/bin/_internal/python312.dll +0 -0
- package/bin/_internal/pywin32_system32/pythoncom312.dll +0 -0
- package/bin/_internal/pywin32_system32/pywintypes312.dll +0 -0
- package/bin/_internal/rpds/rpds.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/select.pyd +0 -0
- package/bin/_internal/setuptools/_vendor/jaraco/text/Lorem ipsum.txt +0 -2
- package/bin/_internal/ucrtbase.dll +0 -0
- package/bin/_internal/unicodedata.pyd +0 -0
- package/bin/_internal/vicoa/_bin/README.md +0 -28
- package/bin/_internal/vicoa-1.3.13.dist-info/INSTALLER +0 -1
- package/bin/_internal/vicoa-1.3.13.dist-info/METADATA +0 -311
- package/bin/_internal/vicoa-1.3.13.dist-info/RECORD +0 -11
- package/bin/_internal/vicoa-1.3.13.dist-info/REQUESTED +0 -0
- package/bin/_internal/vicoa-1.3.13.dist-info/WHEEL +0 -5
- package/bin/_internal/vicoa-1.3.13.dist-info/direct_url.json +0 -1
- package/bin/_internal/vicoa-1.3.13.dist-info/entry_points.txt +0 -2
- package/bin/_internal/vicoa-1.3.13.dist-info/licenses/LICENSE +0 -201
- package/bin/_internal/vicoa-1.3.13.dist-info/top_level.txt +0 -3
- package/bin/_internal/watchfiles/_rust_notify.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/websockets/speedups.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/websockets-16.0.dist-info/INSTALLER +0 -1
- package/bin/_internal/websockets-16.0.dist-info/METADATA +0 -179
- package/bin/_internal/websockets-16.0.dist-info/RECORD +0 -108
- package/bin/_internal/websockets-16.0.dist-info/WHEEL +0 -5
- package/bin/_internal/websockets-16.0.dist-info/entry_points.txt +0 -2
- package/bin/_internal/websockets-16.0.dist-info/licenses/LICENSE +0 -24
- package/bin/_internal/websockets-16.0.dist-info/top_level.txt +0 -1
- package/bin/_internal/win32/_win32sysloader.pyd +0 -0
- package/bin/_internal/win32/win32api.pyd +0 -0
- package/bin/_internal/win32/win32evtlog.pyd +0 -0
- package/bin/_internal/win32/win32job.pyd +0 -0
- package/bin/_internal/yaml/_yaml.cp312-win_amd64.pyd +0 -0
- package/bin/_internal/yarl/_quoting_c.cp312-win_amd64.pyd +0 -0
- package/bin/vicoa.exe +0 -0
package/bin/_internal/integrations/github/claude-code-action/src/mcp/github-inline-comment-server.ts
DELETED
|
@@ -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
|
-
}
|