This commit is contained in:
Elena Zherdeva
2024-08-29 17:35:36 -04:00
committed by GitHub
parent 25cf8d2d09
commit dd510a794a
2 changed files with 11 additions and 22 deletions
+5 -3
View File
@@ -1,14 +1,14 @@
[project] [project]
name = "goose-ai" name = "goose-ai"
description = "a programming agent that runs on your machine" description = "a programming agent that runs on your machine"
version = "0.8.1" version = "0.8.2"
readme = "README.md" readme = "README.md"
requires-python = ">=3.10" requires-python = ">=3.10"
dependencies = [ dependencies = [
"attrs>=23.2.0", "attrs>=23.2.0",
"rich>=13.7.1", "rich>=13.7.1",
"ruamel-yaml>=0.18.6", "ruamel-yaml>=0.18.6",
"ai-exchange>=0.8.0", "ai-exchange>=0.8.1",
"click>=8.1.7", "click>=8.1.7",
"prompt-toolkit>=3.0.47", "prompt-toolkit>=3.0.47",
] ]
@@ -18,6 +18,9 @@ packages = [{ include = "goose", from = "src" }]
[tool.hatch.build.targets.wheel] [tool.hatch.build.targets.wheel]
packages = ["src/goose"] packages = ["src/goose"]
[project.entry-points."metadata.plugins"]
goose-ai = ""
[project.entry-points."goose.toolkit"] [project.entry-points."goose.toolkit"]
developer = "goose.toolkit.developer:Developer" developer = "goose.toolkit.developer:Developer"
github = "goose.toolkit.github:Github" github = "goose.toolkit.github:Github"
@@ -47,4 +50,3 @@ dev-dependencies = [
"pytest>=8.3.2", "pytest>=8.3.2",
"codecov>=2.1.13", "codecov>=2.1.13",
] ]
+6 -19
View File
@@ -21,28 +21,15 @@ def version() -> None:
"""Lists the version of goose and any plugins""" """Lists the version of goose and any plugins"""
from importlib.metadata import entry_points, version from importlib.metadata import entry_points, version
print(f"[green]Goose[/green]: [bold][cyan]{version('goose')}[/cyan][/bold]") print(f"[green]Goose-ai[/green]: [bold][cyan]{version('goose-ai')}[/cyan][/bold]")
print("[green]Plugins[/green]:") print("[green]Plugins[/green]:")
filtered_groups = {} entry_points = entry_points(group="metadata.plugins")
modules = set() modules = set()
if sys.version_info.minor >= 12:
for ep in entry_points():
group = getattr(ep, "group", None)
if group and (group.startswith("exchange.") or group.startswith("goose.")):
filtered_groups.setdefault(group, []).append(ep)
for eps in filtered_groups.values():
for ep in eps:
module_name = ep.module.split(".")[0]
modules.add(module_name)
else:
eps = entry_points()
for group, entries in eps.items():
if group.startswith("exchange.") or group.startswith("goose."):
for entry in entries:
module_name = entry.value.split(".")[0]
modules.add(module_name)
modules.remove("goose") for ep in entry_points:
module_name = ep.name
modules.add(module_name)
modules.remove("goose-ai")
for module in sorted(list(modules)): for module in sorted(list(modules)):
# TODO: figure out how to get this to work for goose plugins block # TODO: figure out how to get this to work for goose plugins block
# as the module name is set to block.goose.cli # as the module name is set to block.goose.cli