From 8d51b80a7f99bb5ad66115f7c1f929efdb8e4953 Mon Sep 17 00:00:00 2001 From: Robert Sloan <89170263+RobertSloan22@users.noreply.github.com> Date: Fri, 3 Jan 2025 19:57:19 -0600 Subject: [PATCH 1/4] Create README.md Adding README.md for the client-github package --- packages/client-github/README.md | 147 +++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 packages/client-github/README.md diff --git a/packages/client-github/README.md b/packages/client-github/README.md new file mode 100644 index 0000000000..43bcc90ccb --- /dev/null +++ b/packages/client-github/README.md @@ -0,0 +1,147 @@ +# Client-GitHub for Eliza Framework + +## Overview + +The `client-github` module is a component of the Eliza framework designed to interact with GitHub repositories. It provides functionalities to clone repositories, manage branches, create pull requests, and maintain file-based knowledge for Eliza agents. + +This client leverages GitHub's REST API via the `@octokit/rest` library and includes robust error handling and configuration validation. + +## Features + +- **Repository Management**: Clone, pull, and switch branches +- **File Processing**: Generate agent memories from repository files +- **Pull Request Management**: Create and manage pull requests programmatically +- **Commit Operations**: Stage, commit, and push files with ease +- **Knowledge Base Integration**: Convert repository content into agent memories +- **Branch Management**: Flexible branch switching and creation + +## Installation + +Install the package as part of the Eliza framework: +bash +pnpm add @elizaos/client-github + +## Configuration + +The GitHub client requires the following environment variables: + +| Variable | Description | Required | +|-------------------|------------------------------------|----------| +| `GITHUB_OWNER` | Owner of the GitHub repository | Yes | +| `GITHUB_REPO` | Repository name | Yes | +| `GITHUB_BRANCH` | Target branch (default: `main`) | Yes | +| `GITHUB_PATH` | Path to focus on within the repo | Yes | +| `GITHUB_API_TOKEN`| GitHub API token for authentication| Yes | + +## Usage + +### Initialization +typescript:packages/client-github/README.md +import { GitHubClientInterface } from "@elizaos/client-github"; +// Initialize the client +const client = await GitHubClientInterface.start(runtime); + +### Creating Memories + +```typescript +// Convert repository files to agent memories +await client.createMemoriesFromFiles(); + +typescript +// Convert repository files to agent memories +await client.createMemoriesFromFiles(); +``` + +### Creating Pull Requests + +```typescript +await client.createPullRequest( + "Feature: Add new functionality", + "feature/new-feature", + [ + { + path: "src/feature.ts", + content: "// New feature implementation" + } + ], + "Implements new functionality with tests" +); + + +typescript +await client.createPullRequest( +"Feature: Add new functionality", +"feature/new-feature", +[ +{ +path: "src/feature.ts", +content: "// New feature implementation" +} +], +"Implements new functionality with tests" +); +``` + +### Direct Commits + +```typescript +await client.createCommit( + "Update configuration", + [ + { + path: "config.json", + content: JSON.stringify(config, null, 2) + } + ] +); + + +``` + +## API Reference + +### GitHubClientInterface + +- `start(runtime: IAgentRuntime)`: Initialize the client +- `stop(runtime: IAgentRuntime)`: Clean up resources + +### GitHubClient + +- `initialize()`: Set up repository and configuration +- `createMemoriesFromFiles()`: Generate agent memories +- `createPullRequest(title: string, branch: string, files: Array<{path: string, content: string}>, description?: string)`: Create PR +- `createCommit(message: string, files: Array<{path: string, content: string}>)`: Direct commit + +## Scripts + +```bash +# Build the project +pnpm run build + +# Development with watch mode +pnpm run dev + +# Lint the codebase +pnpm run lint +``` + +## Dependencies + +- `@elizaos/core`: ^0.1.7-alpha.2 +- `@octokit/rest`: ^20.1.1 +- `@octokit/types`: ^12.6.0 +- `glob`: ^10.4.5 +- `simple-git`: ^3.27.0 + +## Development Dependencies + +- `@types/glob`: ^8.1.0 +- `tsup`: ^8.3.5 + +## Contribution + +Contributions are welcome! Please ensure all code adheres to the framework's standards and passes linting checks. + +## License + +This project is licensed under the MIT License. See the LICENSE file for details. From 87bb7d37d6111d1a769cadad7ba16ce4b0bae70a Mon Sep 17 00:00:00 2001 From: Shakker Nerd <165377636+shakkernerd@users.noreply.github.com> Date: Sat, 4 Jan 2025 06:44:48 +0000 Subject: [PATCH 2/4] chore: install with no frozen-lockfile flag --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 086bfe3c77..d640179b54 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -35,7 +35,7 @@ jobs: run: sudo apt-get install -y protobuf-compiler - name: Install dependencies - run: pnpm install + run: pnpm install -r --no-frozen-lockfile - name: Build packages run: pnpm run build From cb5de7a6df305888acb3f71022505817d4ecf03f Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 4 Jan 2025 07:19:39 +0000 Subject: [PATCH 3/4] chore: update changelog --- CHANGELOG.md | 157 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 156 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a4af4e5f6..4646b5f74a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,160 @@ # Changelog +## [v0.1.7](https://github.com/elizaOS/eliza/tree/v0.1.7) (2025-01-04) + +[Full Changelog](https://github.com/elizaOS/eliza/compare/v0.1.7-alpha.2...v0.1.7) + +**Implemented enhancements:** + +- Implement Caching for API Responses [\#1794](https://github.com/elizaOS/eliza/issues/1794) +- Implement Caching for API Responses [\#1792](https://github.com/elizaOS/eliza/issues/1792) +- Implement Caching for API Responses [\#1791](https://github.com/elizaOS/eliza/issues/1791) +- Implement Caching for API Responses [\#1789](https://github.com/elizaOS/eliza/issues/1789) +- Feature Request: Implement Enhanced Error Logging for API Calls [\#1736](https://github.com/elizaOS/eliza/issues/1736) +- Implement feature for issue \#1725 on repository elizaOS/eliza branch develop [\#1734](https://github.com/elizaOS/eliza/issues/1734) +- Enhance API Documentation [\#1732](https://github.com/elizaOS/eliza/issues/1732) +- Implement feature for issue \#1725 [\#1731](https://github.com/elizaOS/eliza/issues/1731) +- Implement feature for issue \#1725 [\#1730](https://github.com/elizaOS/eliza/issues/1730) +- Enhance API Documentation [\#1729](https://github.com/elizaOS/eliza/issues/1729) +- Implement a Caching Mechanism for API Responses [\#1726](https://github.com/elizaOS/eliza/issues/1726) +- Implement a Structured Logging Framework [\#1724](https://github.com/elizaOS/eliza/issues/1724) +- Add support for Coinbase Commerce integration [\#1723](https://github.com/elizaOS/eliza/issues/1723) +- Serve docusaurus docs from a docker container for quick docs verification [\#1720](https://github.com/elizaOS/eliza/issues/1720) +- Use Caret \(^\) for Dependency Versions in package.json [\#1662](https://github.com/elizaOS/eliza/issues/1662) +- Deduplicate dependencies across plugins and move shared dependencies to the root package.json [\#1658](https://github.com/elizaOS/eliza/issues/1658) +- Deduplicate Dependencies Across Plugins [\#1656](https://github.com/elizaOS/eliza/issues/1656) +- Deduplicate Dependencies Across Plugins [\#1652](https://github.com/elizaOS/eliza/issues/1652) +- Deduplicate Dependencies Across Plugins [\#1650](https://github.com/elizaOS/eliza/issues/1650) +- Viem version too old to include Arthera EVM chain [\#1635](https://github.com/elizaOS/eliza/issues/1635) +- Add Spanish Translation for Documentation README \(docs/README\_es.md\) [\#1592](https://github.com/elizaOS/eliza/issues/1592) +- Expand Support for Non-OpenAI Models in Token Trimming [\#1565](https://github.com/elizaOS/eliza/issues/1565) +- spades [\#1563](https://github.com/elizaOS/eliza/issues/1563) +- Support better in-monorepo navigation with custom conditions [\#1363](https://github.com/elizaOS/eliza/issues/1363) +- Add Livepeer as an Image Generation Provider [\#1271](https://github.com/elizaOS/eliza/issues/1271) +- Arbitrum Integration [\#851](https://github.com/elizaOS/eliza/issues/851) +- Twitter Spaces Voice Client [\#301](https://github.com/elizaOS/eliza/issues/301) +- 🐛 fix plugins.md formatting for docs with dockerized docs validation [\#1722](https://github.com/elizaOS/eliza/pull/1722) ([marcellodesales](https://github.com/marcellodesales)) + +**Fixed bugs:** + +- Fix: Standardize ACTION\_INTERVAL unit to minutes in Twitter client [\#1788](https://github.com/elizaOS/eliza/issues/1788) +- pdf js crashes the agent [\#1751](https://github.com/elizaOS/eliza/issues/1751) +- Failed to run on Macbook M1 [\#1742](https://github.com/elizaOS/eliza/issues/1742) +- Issue Created: http proxy error: /e0e10e6f-ff2b-0d4c-8011-1fc1eee7cb32/message [\#1733](https://github.com/elizaOS/eliza/issues/1733) +- can't build framework - followed quick start - pnpm build error [\#1714](https://github.com/elizaOS/eliza/issues/1714) +- Google Model Not Working [\#1709](https://github.com/elizaOS/eliza/issues/1709) +- failed: @elizaos/plugin-echochambers\#build [\#1691](https://github.com/elizaOS/eliza/issues/1691) +- initial setup not working. help needed please. [\#1666](https://github.com/elizaOS/eliza/issues/1666) +- ImageDescriptionService [\#1643](https://github.com/elizaOS/eliza/issues/1643) +- Dockerfile errors when building image [\#1623](https://github.com/elizaOS/eliza/issues/1623) +- Initial setup based on docs not working [\#1622](https://github.com/elizaOS/eliza/issues/1622) +- Running Eliza with LLAMALOCAL fails after first query [\#1575](https://github.com/elizaOS/eliza/issues/1575) +- Quick start guide bug - pnpm start [\#1552](https://github.com/elizaOS/eliza/issues/1552) +- callback throws - \["⛔ TypeError: callback is not a function"\] - when action is called from the Twitter Client [\#1544](https://github.com/elizaOS/eliza/issues/1544) +- Bug: generateText is ignoring dynamic parameters due to a hard-coded model class [\#1439](https://github.com/elizaOS/eliza/issues/1439) +- fix: Slack client Media type implementation missing required properties in message attachments [\#1384](https://github.com/elizaOS/eliza/issues/1384) +- Error when trying deploy using dockerfile [\#1168](https://github.com/elizaOS/eliza/issues/1168) + +**Closed issues:** + +- Pull Request Created: Simulate discord typing while generating a response [\#1786](https://github.com/elizaOS/eliza/issues/1786) +- Fix Public Solana Wallet Not Found! [\#1781](https://github.com/elizaOS/eliza/issues/1781) +- \