Skip to content

Commit a12667d

Browse files
elenazherdevalily-de
authored andcommitted
fix (#24)
1 parent a107c41 commit a12667d

File tree

2 files changed

+12
-23
lines changed

2 files changed

+12
-23
lines changed

pyproject.toml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[project]
22
name = "goose-ai"
33
description = "a programming agent that runs on your machine"
4-
version = "0.8.1"
4+
version = "0.8.2"
55
readme = "README.md"
66
requires-python = ">=3.10"
77
dependencies = [
88
"attrs>=23.2.0",
99
"rich>=13.7.1",
1010
"ruamel-yaml>=0.18.6",
11-
"ai-exchange>=0.8.0",
11+
"ai-exchange>=0.8.1",
1212
"click>=8.1.7",
1313
"prompt-toolkit>=3.0.47",
1414
]
@@ -18,6 +18,9 @@ packages = [{ include = "goose", from = "src" }]
1818
[tool.hatch.build.targets.wheel]
1919
packages = ["src/goose"]
2020

21+
[project.entry-points."metadata.plugins"]
22+
goose-ai = ""
23+
2124
[project.entry-points."goose.toolkit"]
2225
developer = "goose.toolkit.developer:Developer"
2326
github = "goose.toolkit.github:Github"
@@ -47,4 +50,3 @@ dev-dependencies = [
4750
"pytest>=8.3.2",
4851
"codecov>=2.1.13",
4952
]
50-

src/goose/cli/main.py

+7-20
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,15 @@ def version() -> None:
2121
"""Lists the version of goose and any plugins"""
2222
from importlib.metadata import entry_points, version
2323

24-
print(f"[green]Goose[/green]: [bold][cyan]{version('goose')}[/cyan][/bold]")
24+
print(f"[green]Goose-ai[/green]: [bold][cyan]{version('goose-ai')}[/cyan][/bold]")
2525
print("[green]Plugins[/green]:")
26-
filtered_groups = {}
26+
entry_points = entry_points(group="metadata.plugins")
2727
modules = set()
28-
if sys.version_info.minor >= 12:
29-
for ep in entry_points():
30-
group = getattr(ep, "group", None)
31-
if group and (group.startswith("exchange.") or group.startswith("goose.")):
32-
filtered_groups.setdefault(group, []).append(ep)
33-
for eps in filtered_groups.values():
34-
for ep in eps:
35-
module_name = ep.module.split(".")[0]
36-
modules.add(module_name)
37-
else:
38-
eps = entry_points()
39-
for group, entries in eps.items():
40-
if group.startswith("exchange.") or group.startswith("goose."):
41-
for entry in entries:
42-
module_name = entry.value.split(".")[0]
43-
modules.add(module_name)
44-
45-
modules.remove("goose")
28+
29+
for ep in entry_points:
30+
module_name = ep.name
31+
modules.add(module_name)
32+
modules.remove("goose-ai")
4633
for module in sorted(list(modules)):
4734
# TODO: figure out how to get this to work for goose plugins block
4835
# as the module name is set to block.goose.cli

0 commit comments

Comments
 (0)