Skip to content

Add optional Xquik search backend#11

Open
kriptoburak wants to merge 2 commits into
sint-ai:mainfrom
kriptoburak:codex/add-xquik-search-backend
Open

Add optional Xquik search backend#11
kriptoburak wants to merge 2 commits into
sint-ai:mainfrom
kriptoburak:codex/add-xquik-search-backend

Conversation

@kriptoburak

Copy link
Copy Markdown

Summary

  • add an optional SEARCH_BACKEND=xquik / hermes-tweet path for the search_tweets MCP tool
  • keep retweet, like, post, and default Twitter search on the existing OAuth flow
  • normalize Xquik/Hermes Tweet response shapes into the existing formatter and add timeout/error handling
  • document the new environment variables and add Vitest coverage for the adapter and MCP branch

Validation

  • npm ci --ignore-scripts --no-audit --no-fund
  • npm run build
  • npm run check-types
  • npm test
  • git diff --cached --check
  • secret-pattern scan over tracked public text

Notes

  • npm pack --dry-run --json is not available on current main because package.json has no name field; this PR does not change package metadata.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 696917516a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/mcp.ts Outdated
const { tweets, users } = env.SEARCH_BACKEND === 'twitter'
? await createTwitterClient(clientInfo).searchTweets(input.query, input.count)
: await searchTweetsWithXquik(input.query, input.count, {
apiKey: env.XQUIK_API_KEY ?? env.HERMES_TWEET_API_KEY,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Honor Hermes API key when XQUIK key is blank

apiKey is selected with nullish coalescing, so an empty XQUIK_API_KEY (common when .env contains XQUIK_API_KEY=) wins over a populated HERMES_TWEET_API_KEY. In that configuration, searchTweetsWithXquik receives "", fails the trim check, and every search_tweets call errors even though the alternate key is set as documented. Use a fallback that treats blank strings as missing (e.g., trim before choosing, or use a non-empty check) so the Hermes key path actually works.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant