fix: исправить auth routing Composio Direct#203
Merged
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: xlabtg#202
Author
Working session summaryГотово: PR #203 обновлён и переведён из draft в ready for review. PR: #203 Что сделано:
Проверки:
Источник для auth-схем Composio: https://backend.composio.dev/api/v3.1/openapi.json This summary was automatically extracted from the AI working session output. |
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (331.8K + 6.6M cached) input tokens, 36.9K output tokens, $11.548060 cost 🤖 Models used:
📎 Log file uploaded as Gist (4320KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
Author
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Что изменено
autoрежимеcomposio-directтеперь распознаёт известные префиксы ключей:ak_сразу идёт какx-api-key,uak_сразу идёт какx-user-api-key.oak_больше не отправляются на обычные tool/auth/connection endpoints: плагин возвращает локальную диагностическую ошибку с рекомендацией использовать project или user key.x-api-key->x-user-api-key.composio-directдо1.9.5.Причина
По OpenAPI Composio v3.1 (
https://backend.composio.dev/api/v3.1/openapi.json) обычные endpoints инструментов используют project/user auth (x-api-keyиx-user-api-key), аx-org-api-keyотносится к/org/*organization-management endpoints. Предыдущий universal fallback наx-org-api-keyмог превращать проблему выбора ключа в удалённый 403 и не помогал выполнить tools endpoints.Как воспроизведено
Добавлены regression tests, которые до исправления падали:
uak_...вautoрежиме не должен сначала отправляться какx-api-key.oak_...не должен отправляться на/tools/execute/...и должен давать понятную локальную ошибку.Проверка
Перед push выполнено:
node --test plugins/composio-direct/tests/guide.test.js plugins/composio-direct/tests/index.test.js plugins/composio-direct/test/unit/composio-direct.test.js plugins/composio-direct/test/integration/composio-api.test.jsnode scripts/build-sdk.mjsnpm run validatenpm run lintnpm run typechecknpm testДля локального соответствия CI перед общими проверками были установлены root dependencies и plugin dependencies по тому же шаблону, что в
.github/workflows/ci.yml.Fixes #202