|
|
@@ -1,4 +1,4 @@
|
|
|
-# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"1e692e567c95f76bc51ba8f68a84d8b186898fc4624a153630c7ba98360c0f06","compiler_version":"v0.68.3","strict":true,"agent_id":"claude","agent_model":"MiniMax-M2.7"}
|
|
|
+# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"1529c47b9757ffcc85cfba2eedb167b9c063f4f10bc8d3097668fb982b8ef9b0","compiler_version":"v0.68.3","strict":true,"agent_id":"claude","agent_model":"MiniMax-M2.7"}
|
|
|
# gh-aw-manifest: {"version":1,"secrets":["GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN","MINIMAX_API_KEY"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"373c709c69115d41ff229c7e5df9f8788daa9553","version":"v9"},{"repo":"actions/setup-node","sha":"53b83947a5a98c8d113130e565377fae1a50d02f","version":"v6.3.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"ba90f2186d7ad780ec640f364005fa24e797b360","version":"v0.68.3"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.20"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.20"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.20"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.2.19"},{"image":"ghcr.io/github/github-mcp-server:v0.32.0"},{"image":"node:lts-alpine"}]}
|
|
|
# ___ _ _
|
|
|
# / _ \ | | (_)
|
|
|
@@ -209,14 +209,14 @@ jobs:
|
|
|
run: |
|
|
|
bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh"
|
|
|
{
|
|
|
- cat << 'GH_AW_PROMPT_e09a6b14a7c981ab_EOF'
|
|
|
+ cat << 'GH_AW_PROMPT_398e6b044d59118d_EOF'
|
|
|
<system>
|
|
|
- GH_AW_PROMPT_e09a6b14a7c981ab_EOF
|
|
|
+ GH_AW_PROMPT_398e6b044d59118d_EOF
|
|
|
cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md"
|
|
|
cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md"
|
|
|
cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md"
|
|
|
cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md"
|
|
|
- cat << 'GH_AW_PROMPT_e09a6b14a7c981ab_EOF'
|
|
|
+ cat << 'GH_AW_PROMPT_398e6b044d59118d_EOF'
|
|
|
<safe-output-tools>
|
|
|
Tools: add_comment, update_issue, add_labels(max:3), missing_tool, missing_data, noop
|
|
|
</safe-output-tools>
|
|
|
@@ -248,14 +248,14 @@ jobs:
|
|
|
{{/if}}
|
|
|
</github-context>
|
|
|
|
|
|
- GH_AW_PROMPT_e09a6b14a7c981ab_EOF
|
|
|
+ GH_AW_PROMPT_398e6b044d59118d_EOF
|
|
|
cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md"
|
|
|
- cat << 'GH_AW_PROMPT_e09a6b14a7c981ab_EOF'
|
|
|
+ cat << 'GH_AW_PROMPT_398e6b044d59118d_EOF'
|
|
|
</system>
|
|
|
{{#runtime-import .github/workflows/shared/engine.md}}
|
|
|
{{#runtime-import .github/workflows/shared/network.md}}
|
|
|
{{#runtime-import .github/workflows/issue-handle-enhancement.md}}
|
|
|
- GH_AW_PROMPT_e09a6b14a7c981ab_EOF
|
|
|
+ GH_AW_PROMPT_398e6b044d59118d_EOF
|
|
|
} > "$GH_AW_PROMPT"
|
|
|
- name: Interpolate variables and render templates
|
|
|
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
|
|
|
@@ -435,17 +435,17 @@ jobs:
|
|
|
mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs"
|
|
|
mkdir -p /tmp/gh-aw/safeoutputs
|
|
|
mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs
|
|
|
- cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_950a753b0f411027_EOF'
|
|
|
- {"add_comment":{"max":1,"target":"*"},"add_labels":{"max":3,"target":"*"},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"report_incomplete":{},"update_issue":{"allow_body":true,"max":1,"target":"*"}}
|
|
|
- GH_AW_SAFE_OUTPUTS_CONFIG_950a753b0f411027_EOF
|
|
|
+ cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_c9fc89074d2f8fb2_EOF'
|
|
|
+ {"add_comment":{"max":1,"target":"${{ inputs.issue_number }}"},"add_labels":{"max":3,"target":"${{ inputs.issue_number }}"},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"report_incomplete":{},"update_issue":{"allow_body":true,"max":1,"target":"${{ inputs.issue_number }}"}}
|
|
|
+ GH_AW_SAFE_OUTPUTS_CONFIG_c9fc89074d2f8fb2_EOF
|
|
|
- name: Write Safe Outputs Tools
|
|
|
env:
|
|
|
GH_AW_TOOLS_META_JSON: |
|
|
|
{
|
|
|
"description_suffixes": {
|
|
|
- "add_comment": " CONSTRAINTS: Maximum 1 comment(s) can be added. Target: *. Supports reply_to_id for discussion threading.",
|
|
|
- "add_labels": " CONSTRAINTS: Maximum 3 label(s) can be added. Target: *.",
|
|
|
- "update_issue": " CONSTRAINTS: Maximum 1 issue(s) can be updated. Target: *."
|
|
|
+ "add_comment": " CONSTRAINTS: Maximum 1 comment(s) can be added. Target: ${{ inputs.issue_number }}. Supports reply_to_id for discussion threading.",
|
|
|
+ "add_labels": " CONSTRAINTS: Maximum 3 label(s) can be added. Target: ${{ inputs.issue_number }}.",
|
|
|
+ "update_issue": " CONSTRAINTS: Maximum 1 issue(s) can be updated. Target: ${{ inputs.issue_number }}."
|
|
|
},
|
|
|
"repo_params": {},
|
|
|
"dynamic_tools": []
|
|
|
@@ -693,7 +693,7 @@ jobs:
|
|
|
export GH_AW_ENGINE="claude"
|
|
|
export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host -v /var/run/docker.sock:/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.2.19'
|
|
|
|
|
|
- cat << GH_AW_MCP_CONFIG_732c945cb0133249_EOF | bash "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.sh"
|
|
|
+ cat << GH_AW_MCP_CONFIG_570a4a9d729c47a7_EOF | bash "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.sh"
|
|
|
{
|
|
|
"mcpServers": {
|
|
|
"github": {
|
|
|
@@ -736,7 +736,7 @@ jobs:
|
|
|
"payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}"
|
|
|
}
|
|
|
}
|
|
|
- GH_AW_MCP_CONFIG_732c945cb0133249_EOF
|
|
|
+ GH_AW_MCP_CONFIG_570a4a9d729c47a7_EOF
|
|
|
- name: Download activation artifact
|
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
|
with:
|
|
|
@@ -1358,7 +1358,7 @@ jobs:
|
|
|
GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,anthropic.com,api-inference.modelscope.cn,api.anthropic.com,api.github.com,api.minimaxi.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,open.bigmodel.cn,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com"
|
|
|
GITHUB_SERVER_URL: ${{ github.server_url }}
|
|
|
GITHUB_API_URL: ${{ github.api_url }}
|
|
|
- GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"max\":1,\"target\":\"*\"},\"add_labels\":{\"max\":3,\"target\":\"*\"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"true\"},\"report_incomplete\":{},\"update_issue\":{\"allow_body\":true,\"max\":1,\"target\":\"*\"}}"
|
|
|
+ GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"max\":1,\"target\":\"${{ inputs.issue_number }}\"},\"add_labels\":{\"max\":3,\"target\":\"${{ inputs.issue_number }}\"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"true\"},\"report_incomplete\":{},\"update_issue\":{\"allow_body\":true,\"max\":1,\"target\":\"${{ inputs.issue_number }}\"}}"
|
|
|
with:
|
|
|
github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
|
|
script: |
|