Skip to content
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

feat: client GitHub triggers actions #108

Merged
merged 2 commits into from
Dec 14, 2024

Conversation

snobbee
Copy link
Collaborator

@snobbee snobbee commented Dec 14, 2024

  • Added '@ai16z/client-github' to the project, enabling GitHub integration.
  • Updated agent to support GitHub client initialization and interaction.
  • Register github plugin actions within the new github client.
  • Removed unnecessary GitHub configuration fields from the environment schema.
  • Enhanced logging and error handling in the GitHub client.

- Added '@ai16z/client-github' to the project, enabling GitHub integration.
- Updated agent to support GitHub client initialization and interaction.
- Register github plugin actions within the new github client.
- Removed unnecessary GitHub configuration fields from the environment schema.
- Enhanced logging and error handling in the GitHub client.
@snobbee snobbee requested review from jkbrooks and monilpat December 14, 2024 00:07
@snobbee
Copy link
Collaborator Author

snobbee commented Dec 14, 2024

@monilpat test result when running client with character "logging addict" using client github and init repo registered action:

 ["✓ Registering action: INITIALIZE_REPOSITORY"] 

 ["✓ Registering action: CREATE_COMMIT"] 

 ["✓ Registering action: CREATE_MEMORIES_FROM_FILES"] 

 ["✓ Registering action: CREATE_PULL_REQUEST"] 

 ["✓ Registering action: CREATE_ISSUE"] 

 ["✓ Registering action: MODIFY_ISSUE"] 

 ["✓ Registering action: ADD_COMMENT_TO_ISSUE"] 

 ◎ LOGS
   client keys 
   ["github"] 

 ["◎ Chat started. Type 'exit' to quit."] 

You: Initialize the repository snobbee/test-repo on main branch
 ["✓ User User created successfully."] 

 ["◎ Room 6f6b9c28-b0e0-0e30-86a3-8154524fbd2b created successfully."] 

 ["◎ User 12dea96f-ec20-0935-a6ab-75692c994959 linked to room 6f6b9c28-b0e0-0e30-86a3-8154524fbd2b successfully."] 

 ["◎ Agent LoggingAddict linked to room 6f6b9c28-b0e0-0e30-86a3-8154524fbd2b successfully."] 

 ◎ LOGS
   Creating Memory 
   81013fad-e986-0241-b644-162e37215d7d 
   Initialize the repository snobbee/test-repo on main branch 

 ["◎ Matched fragment: experience with various logging frameworks and libraries across different tech stacks with similarity: 0.8207547068595886"] 

 ["◎ Matched fragment: expertise in analyzing and extending existing logging implementations across different codebases with similarity: 0.8532577157020569"] 

 ["◎ Matched fragment: familiarity with logging standards and rfcs related to log formats and protocols with similarity: 0.8738099336624146"] 

 ["◎ Matched fragment: expertise in debugging production issues through log analysis and pattern recognition with similarity: 0.888544499874115"] 

 ["◎ Matched fragment: extensive knowledge of log levels trace debug info warn error fatal and when to use each appropriately with similarity: 0.8982301354408264"] 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ◎ LOGS
   Composing state for message: 
   {"content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd"} 

 ["ℹ Fetching source code from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Fetching workflow files from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Fetching test files from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Fetching documentation files from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Fetching workflow files from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Fetching documentation files from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Fetching test files from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Fetching source code from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Fetching releases from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Fetching documentation files from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Fetching test files from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Fetching test files from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Fetching workflow files from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Fetching test files from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Fetching source code from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Retrieved 0 files from snobbee/test-repo for test files"] 

 ["ℹ Retrieved 0 files from snobbee/test-repo for workflow files"] 

 ["ℹ Retrieved 0 files from snobbee/test-repo for workflow files"] 

 ["ℹ Fetching releases from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Retrieved 0 files from snobbee/test-repo for test files"] 

 ["ℹ Fetching releases from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Fetching documentation files from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Fetching releases from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Fetching source code from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Fetching workflow files from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Fetching workflow files from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Fetching releases from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Fetching source code from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Retrieved 0 files from snobbee/test-repo for releases"] 

 ["ℹ Retrieved 0 files from snobbee/test-repo for test files"] 

 ["ℹ Retrieved 0 files from snobbee/test-repo for test files"] 

 ["ℹ Retrieved 3 files from snobbee/test-repo for source code"] 

 ["ℹ Retrieved 1 files from snobbee/test-repo for documentation files"] 

 ["ℹ Retrieved 0 files from snobbee/test-repo for workflow files"] 

 ["ℹ Retrieved 0 files from snobbee/test-repo for test files"] 

 ["ℹ Retrieved 1 files from snobbee/test-repo for documentation files"] 

 ["ℹ Retrieved 1 files from snobbee/test-repo for documentation files"] 

 ["ℹ Retrieved 3 files from snobbee/test-repo for source code"] 

 ["ℹ Retrieved 0 files from snobbee/test-repo for workflow files"] 

 ["ℹ Retrieved 0 files from snobbee/test-repo for releases"] 

 ["ℹ Retrieved 0 files from snobbee/test-repo for workflow files"] 

 ["ℹ Retrieved 0 files from snobbee/test-repo for releases"] 

 ["ℹ Retrieved 0 files from snobbee/test-repo for releases"] 

 ["ℹ Retrieved 0 files from snobbee/test-repo for releases"] 

 ["ℹ Retrieved 1 files from snobbee/test-repo for documentation files"] 

 ["ℹ Retrieved 3 files from snobbee/test-repo for source code"] 

 ["ℹ Retrieved 3 files from snobbee/test-repo for source code"] 

 ["ℹ Retrieved 3 files from snobbee/test-repo for source code"] 

 ["ℹ Fetching documentation files from GitHub snobbee/test-repo on branch main"] 

 ["ℹ Retrieved 1 files from snobbee/test-repo for documentation files"] 

 ["◎ Generating message response.."] 

 ["◎ Generating text..."] 

 ℹ INFORMATIONS
   Generating text with options: 
   {"modelProvider":"openai","model":"small"} 

 ℹ INFORMATIONS
   Selected model: 
   gpt-4o-mini 

 ["ℹ Fetching https://api.openai.com/v1/chat/completions"] 

 ["ℹ [object Object]"] 

 ◎ LOGS
   Creating Memory 
    
   Initializing a repository without proper logging practices? I can already feel the anxiety creeping in! Remember, every repository should have structured logging from the get-go. Let's make sure to implement standardized log levels and correlation IDs right from the start. This will ensure we have the observability we need down the line. Now, let's get that repository initialized! 

 ◎ LOGS
   Evaluating 
   GET_FACTS 

 ◎ LOGS
   Evaluating 
   UPDATE_GOAL 

 ["✓ Normalized action: initializerepository"] 

 ["ℹ Executing handler for action: INITIALIZE_REPOSITORY"] 

 ◎ LOGS
   Composing state for message: 
   {"id":"81013fad-e986-0241-b644-162e37215d7d","agentId":"1b200cce-e5b5-0d90-bbf3-f0dce0a8dafd","userId":"12dea96f-ec20-0935-a6ab-75692c994959","roomId":"6f6b9c28-b0e0-0e30-86a3-8154524fbd2b","content":{"text":"Initialize the repository snobbee/test-repo on main branch","attachments":[],"source":"direct"},"createdAt":1734134620157} 

 ["ℹ Initializing repository..."] 

 ["ℹ Repository path: /tmp/eliza/agent/.repos/snobbee/test-repo"] 

 ["ℹ Cloning or pulling repository snobbee/test-repo..."] 

 ["ℹ URL: https://github.com/snobbee/test-repo.git"] 

 ["ℹ Repository initialized successfully! URL: https://github.com/snobbee/test-repo"] 

 ["◎ Agent: Initializing a repository without proper logging practices? I can already feel the anxiety creeping in! Remember, every repository should have structured logging from the get-go. Let's make sure to implement standardized log levels and correlation IDs right from the start. This will ensure we have the observability we need down the line. Now, let's get that repository initialized!"] 

 ["◎ Agent: Repository initialized successfully! URL: https://github.com/snobbee/test-repo"] 

You: 

Copy link
Collaborator

@monilpat monilpat left a comment

Choose a reason for hiding this comment

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

LGTM as the initial starting PR great work

@monilpat monilpat merged commit 8c32f1e into sif-dev Dec 14, 2024
2 of 4 checks passed
@monilpat monilpat deleted the feat/client-github-triggers-actions branch December 14, 2024 00:16
@snobbee snobbee mentioned this pull request Dec 14, 2024
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.

2 participants