* Write GitHub Actions outputs to $GITHUB_OUTPUT. * @param {{ inferenceAccessError: boolean, mcpPolicyError: boolean, agenticEngineTimeout: boolean, modelNotSupportedError: boolean, http400ResponseError: boolean, capiQuotaExceededError: boolean }} results
(results)
| 110 | * @param {{ inferenceAccessError: boolean, mcpPolicyError: boolean, agenticEngineTimeout: boolean, modelNotSupportedError: boolean, http400ResponseError: boolean, capiQuotaExceededError: boolean }} results |
| 111 | */ |
| 112 | function writeOutputs(results) { |
| 113 | const outputFile = process.env.GITHUB_OUTPUT; |
| 114 | if (!outputFile) { |
| 115 | process.stderr.write("[detect-agent-errors] GITHUB_OUTPUT not set — skipping output\n"); |
| 116 | return; |
| 117 | } |
| 118 | |
| 119 | const lines = [ |
| 120 | `inference_access_error=${results.inferenceAccessError}`, |
| 121 | `mcp_policy_error=${results.mcpPolicyError}`, |
| 122 | `agentic_engine_timeout=${results.agenticEngineTimeout}`, |
| 123 | `model_not_supported_error=${results.modelNotSupportedError}`, |
| 124 | `http_400_response_error=${results.http400ResponseError}`, |
| 125 | `capi_quota_exceeded_error=${results.capiQuotaExceededError}`, |
| 126 | ]; |
| 127 | fs.appendFileSync(outputFile, lines.join("\n") + "\n"); |
| 128 | } |
| 129 | |
| 130 | function main() { |
| 131 | let logContent = ""; |