Исправить обработку 403 в composio-direct#197
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: xlabtg#196
🚨 Solution Draft FailedThe automated solution draft encountered an error: 🤖 Models used:
📎 Failure log uploaded as Gist (3342KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
🤖 AI Work Session Started Starting automated work session at 2026-06-21T19:41:00.670Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback. |
Working session summaryГотово: PR #197 обновлён и переведён в ready for review: #197 Исправил корень проблемы в index.js: Проверки прошли локально: Источник по API Composio, который сверял: https://docs.composio.dev/reference/api-reference/tools/postToolsExecuteByToolSlug This summary was automatically extracted from the AI working session output. |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (207.7K + 6.9M cached) input tokens, 30.1K output tokens, $10.301708 cost 🤖 Models used:
📎 Log file uploaded as Repository (30718KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
This reverts commit ceb995a.
Что сделано
auth_required) и ошибки доступа Composio API key (401/403).403 Forbiddenбольше не превращается вauth_requiredи не отправляет агента в бесполезныйcomposio_auth_linkцикл.401/403возвращается явная диагностика поcomposio_api_key: project API key, permissions и Composio IP allowlist.composio-directдо1.9.2.Как воспроизвести
До исправления ответ Composio вида
HTTP 403/HTTP_Forbiddenс текстом про permissions попадал вisAuthError()и возвращался как:{ "success": false, "error": "auth_required", "auth": { ... } }Из-за этого агент пытался повторно подключать внешний сервис, хотя проблема была в доступе Composio API key. Новый тест
does not treat Composio API key permission failures as toolkit auth_requiredфиксирует этот сценарий.Проверка
node --test plugins/composio-direct/tests/index.test.jsnode --test plugins/composio-direct/test/unit/composio-direct.test.jsnode --test plugins/composio-direct/test/integration/composio-api.test.jsnpm run validate— 0 errors, 1 существующий warning поcasinonpm run lint— 0 errors, существующие warnings вне этой правкиnpm run typechecknpm test— 490 passednode scripts/build-sdk.mjsFixes #196