Skip to content

Feat/gigbot plugin #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ealeksandrov7
Copy link

Gigbot Plugin Integration for GAME SDK

Summary

This PR adds a Gigbot Plugin integration for the GAME SDK, enabling agents to interact with the Gigbot platform. The plugin allows agents to fetch available gigs from Gigbot & complete them on social media platforms like Twitter/X.

Changes

  • Added GigbotPlugin class with gig management functions
  • Added TwitterPlugin and TwitterClient for social media interactions
  • Implemented caching mechanism to reduce API calls
  • Added proper error handling and detailed logging

Development Testing

Prerequisites

  • GAME API key (from console.game.virtuals.io)
  • Twitter/X account with credentials (email, password, username)
  • Twitter 2FA secret (optional)
  • Twitter cookies for authentication (optional)

Test Setup

  1. Set environment variables:
export API_KEY="your-game-api-key"
export TWITTER_EMAIL="your-twitter-email"
export TWITTER_PASSWORD="your-twitter-password"
export TWITTER_USERNAME="your-twitter-username"
export TWITTER_TWO_FACTOR_SECRET="your-2fa-secret-if-enabled"
export TWITTER_COOKIES='[{"key":"auth_token", "value":"auth-token-value", "domain":".twitter.com"}, {"key":"ct0", "value":"ct-value", "domain":".twitter.com"}, {"key":"guest_id", "value":"guest-id-value", "domain":".twitter.com"}]'
  1. Run the example:
ts-node src/example.ts

Expected Behavior

  1. Agent will initialize Twitter client and Gigbot connections
  2. Gigbot plugin will fetch available gigs from the Gigbot API
  3. For each available gig, agent will:
    • Check if it has already been completed
    • If not, attempt to complete it based on gig requirements (like, retweet, reply, etc.)
    • Mark the gig as completed after successful interaction
  4. Agent will continuously fetch and process gigs

Test Cases

  • Agent successfully initializes with provided credentials
  • Gigbot API connection works correctly
  • Twitter interactions execute properly
  • Gig completion status is accurately tracked
  • Caching mechanism reduces redundant API calls
  • Error handling gracefully manages API failures
  • Detailed logging provides visibility into agent actions

Notes

  • Twitter interactions are real and will post from the configured account
  • The agent will avoid duplicate work by checking completion status
  • Gig data is cached for 3 hours to reduce API load
  • Twitter authentication is handled through either password login or cookies
  • The agent continuously runs until manually stopped

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