diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ede81c2c..95a04168 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ on: push: branches: [ master ] pull_request: - branches: [ master ] + branches: [ master, stable ] concurrency: group: ${{ format('ci-{0}', github.head_ref && format('pr-{0}', github.event.pull_request.number) || github.sha) }} diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index c933202f..28576d02 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -4,7 +4,7 @@ on: push: branches: [ master ] pull_request: - branches: [ master ] + branches: [ master, stable ] concurrency: group: ${{ format('docker-ci-{0}', github.head_ref && format('pr-{0}', github.event.pull_request.number) || github.sha) }} diff --git a/BULLETIN.md b/BULLETIN.md index 6c2b5c0a..5190b448 100644 --- a/BULLETIN.md +++ b/BULLETIN.md @@ -1,9 +1,24 @@ -Welcome to Auto-GPT! We'll keep you informed of the latest news and features by printing messages here. -If you don't wish to see this message, you can run Auto-GPT with the --skip-news flag +# Website and Documentation Site 📰📖 +Check out *https://agpt.co*, the official news & updates site for Auto-GPT! +The documentation also has a place here, at *https://docs.agpt.co* -# INCLUDED COMMAND 'send_tweet' IS DEPRICATED, AND WILL BE REMOVED IN THE NEXT STABLE RELEASE -Base Twitter functionality (and more) is now covered by plugins: https://github.com/Significant-Gravitas/Auto-GPT-Plugins +# 🚀 v0.3.0 Release 🚀 +Over a week and 275 pull requests have passed since v0.2.2, and we are happy to announce +the release of v0.3.0! *From now on, we will be focusing on major improvements* rather +than bugfixes, as we feel stability has reached a reasonable level. Most remaining +issues relate to limitations in prompt generation and the memory system, which will be +the focus of our efforts for the next release. -## Changes to Docker configuration -The workdir has been changed from /home/appuser to /app. Be sure to update any volume mounts accordingly. +Highlights and notable changes in this release: +## Plugin support 🔌 +Auto-GPT now has support for plugins! With plugins, you can extend Auto-GPT's abilities, +adding support for third-party services and more. +See https://github.com/Significant-Gravitas/Auto-GPT-Plugins for instructions and available plugins. + +## Changes to Docker configuration 🐋 +The workdir has been changed from */home/appuser* to */app*. +Be sure to update any volume mounts accordingly! + +# ⚠️ Command `send_tweet` is DEPRECATED, and will be removed in v0.4.0 ⚠️ +Twitter functionality (and more) is now covered by plugins, see [Plugin support 🔌] diff --git a/autogpt/main.py b/autogpt/main.py index fca8b47d..355e1085 100644 --- a/autogpt/main.py +++ b/autogpt/main.py @@ -3,7 +3,7 @@ import logging import sys from pathlib import Path -from colorama import Fore +from colorama import Fore, Style from autogpt.agent.agent import Agent from autogpt.commands.command import CommandRegistry @@ -13,7 +13,11 @@ from autogpt.logs import logger from autogpt.memory import get_memory from autogpt.plugins import scan_plugins from autogpt.prompts.prompt import DEFAULT_TRIGGERING_PROMPT, construct_main_ai_config -from autogpt.utils import get_current_git_branch, get_latest_bulletin +from autogpt.utils import ( + get_current_git_branch, + get_latest_bulletin, + markdown_to_ansi_style, +) from autogpt.workspace import Workspace from scripts.install_plugin_deps import install_plugin_dependencies @@ -57,9 +61,19 @@ def run_auto_gpt( ) if not cfg.skip_news: - motd = get_latest_bulletin() + motd, is_new_motd = get_latest_bulletin() if motd: - logger.typewriter_log("NEWS: ", Fore.GREEN, motd) + motd = markdown_to_ansi_style(motd) + for motd_line in motd.split("\n"): + logger.info(motd_line, "NEWS:", Fore.GREEN) + if is_new_motd and not cfg.chat_messages_enabled: + input( + Fore.MAGENTA + + Style.BRIGHT + + "NEWS: Bulletin was updated! Press Enter to continue..." + + Style.RESET_ALL + ) + git_branch = get_current_git_branch() if git_branch and git_branch != "stable": logger.typewriter_log( diff --git a/autogpt/utils.py b/autogpt/utils.py index 601254d7..112a1508 100644 --- a/autogpt/utils.py +++ b/autogpt/utils.py @@ -1,8 +1,9 @@ import os +import re import requests import yaml -from colorama import Fore +from colorama import Fore, Style from git.repo import Repo from autogpt.logs import logger @@ -107,15 +108,46 @@ def get_current_git_branch() -> str: return "" -def get_latest_bulletin() -> str: +def get_latest_bulletin() -> tuple[str, bool]: exists = os.path.exists("CURRENT_BULLETIN.md") current_bulletin = "" if exists: current_bulletin = open("CURRENT_BULLETIN.md", "r", encoding="utf-8").read() new_bulletin = get_bulletin_from_web() - is_new_news = new_bulletin != current_bulletin + is_new_news = new_bulletin != "" and new_bulletin != current_bulletin + + news_header = Fore.YELLOW + "Welcome to Auto-GPT!\n" + if new_bulletin or current_bulletin: + news_header += ( + "Below you'll find the latest Auto-GPT News and updates regarding features!\n" + "If you don't wish to see this message, you " + "can run Auto-GPT with the *--skip-news* flag.\n" + ) if new_bulletin and is_new_news: open("CURRENT_BULLETIN.md", "w", encoding="utf-8").write(new_bulletin) - return f" {Fore.RED}::UPDATED:: {Fore.CYAN}{new_bulletin}{Fore.RESET}" - return current_bulletin + current_bulletin = f"{Fore.RED}::NEW BULLETIN::{Fore.RESET}\n\n{new_bulletin}" + + return f"{news_header}\n{current_bulletin}", is_new_news + + +def markdown_to_ansi_style(markdown: str): + ansi_lines: list[str] = [] + for line in markdown.split("\n"): + line_style = "" + + if line.startswith("# "): + line_style += Style.BRIGHT + else: + line = re.sub( + r"(?