-
Notifications
You must be signed in to change notification settings - Fork 0
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
Create Github Client #104
Comments
@monilpat @jkbrooks PR #108 it is still very basic it registers the github plugin so that one can trigger those plugins action within the client github usage, next would be to incorporate the loop and allow client to use provider to get source code, then analyze the code and create a PR with the new changes related to logging would make sense |
Note for testing if you run into context window issues #113 (comment) If not then it could be fine to ship this as is with OpenAI and then use Gemini later after we do some demos on smaller apps |
We are currently trying to get the capacity through the OODA loop to create issues and add comments to issues. After that, we will potentially try to add PRs and maybe comments to PRs. We will want to take in all of the issues and all of the comments and pull requests, not just all of the code in the OODA loop. This is a new feature. |
Ticket: Implement GitHub Client for Eliza
Priority: High
Status: Open
Assignee: (Assign to a developer)
Due Date: (Set a realistic due date)
Description:
This ticket outlines the implementation of a dedicated GitHub client for the Eliza framework, mirroring the structure and functionality of existing clients like Discord, Telegram, and Twitter. This client will enable Eliza agents to interact with GitHub repositories, providing a foundation for building more sophisticated GitHub-related tools and integrations.
Goals:
Acceptance Criteria:
@ai16z/client-github
).Client
interface from@ai16z/eliza
, ensuring consistency with other clients.Out of Scope (for initial implementation):
Dependencies:
@octokit/rest
: For interacting with the GitHub API.@ai16z/eliza
: For core Eliza functionality.Open Questions and Decision Points:
Content
types or existing data models).Tasks:
@ai16z/client-github
.Client
interface.Core API Interaction Methods (All should be moved from the plugin):
authenticate(token: string)
: Handles authentication using a GitHub personal access token. (Exists in plugin, slightly different implementation)getRepository(owner: string, repo: string): Promise<Repository>
: Fetches repository information. (Exists in plugin)getIssues(owner: string, repo: string, options?: IssueOptions): Promise<Issue[]>
: Retrieves a list of issues. (Exists in plugin)getIssue(owner: string, repo: string, issueNumber: number): Promise<Issue>
: Gets details for a specific issue. (Exists in plugin)createIssue(owner: string, repo: string, title: string, body: string, labels?: string[]): Promise<Issue>
: Creates a new issue. (Exists in plugin)updateIssue(owner: string, repo: string, issueNumber: number, updates: IssueUpdates): Promise<Issue>
: Updates an existing issue. (Exists in plugin asmodifyIssue
)createComment(owner: string, repo: string, issueNumber: number, body: string): Promise<Comment>
: Creates a new comment on an issue. (Exists in plugin asaddCommentToIssue
)getPullRequests(owner: string, repo: string, options?: PullRequestOptions): Promise<PullRequest[]>
: Retrieves a list of pull requests. (Exists in plugin)getPullRequest(owner: string, repo: string, prNumber: number): Promise<PullRequest>
: Gets details for a specific pull request. (Not explicitly in plugin, but functionality can be derived)createPullRequest(owner: string, repo: string, title: string, head: string, base: string, body?: string): Promise<PullRequest>
: Creates a new pull request. (Exists in plugin)getFileContents(owner: string, repo: string, path: string, ref?: string): Promise<string>
: Accesses file contents at a specific ref (branch/commit). (Exists in plugin)getCommits(owner: string, repo: string, options?: CommitOptions): Promise<Commit[]>
: Retrieves commit history. (Not in plugin, needs implementation)Utility Methods (New, or refactor from the plugin):
getRepoPath(owner: string, repo: string): string
: Returns the local file path for a cloned repository. (Exists in plugin)cloneOrPullRepository(owner: string, repo: string, localPath: string): Promise<void>
: Clones or pulls a repository. (Exists in plugin as initialize, should be refactored to remove memory logic)checkoutBranch(repoPath: string, branch?: string): Promise<void>
: Checks out a specific branch in a local repository. (Exists in plugin, should be refactored)writeFiles(repoPath: string, files: { path: string; content: string }[]): Promise<void>
: Writes or overwrites files in a local repository. (Used in multiple plugin actions, needs to be a shared utility)Data Structures (Define in client package):
Custom Content types: Create GitHub-specific Content subtypes within Eliza's existing Memory model. This is likely the best approach for long-term maintainability and allows Eliza to understand GitHub data as distinct from other content types (Discord messages, tweets, etc.)
Repository
: Interface for repository information.Issue
: Interface for issue data. Include labels and state (open/closed).IssueOptions
: Interface for optional parameters togetIssues
(e.g., filtering by state, labels, assignees).IssueUpdates
: Interface for updating an issue (title, body, state, labels).Comment
: Interface for comment data.PullRequest
: Interface for pull request data.PullRequestOptions
: Interface for optional parameters togetPullRequests
(e.g., filtering by state, head branch).Commit
: Interface for commit data.CommitOptions
: Interface for optional parameters togetCommits
(e.g., specifying a branch or date range)."Refactor Existing Plugin: After the GitHub client is implemented, refactor the
@ai16z/plugin-github
plugin to use the new client package. This will ensure consistency, reduce code duplication, and make the plugin simpler to maintain."Related Issues:
Notes:
@ai16z/plugin-github
) for functionality and implementation patterns.The text was updated successfully, but these errors were encountered: