adam-community 1.0.14__tar.gz → 1.0.16__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {adam_community-1.0.14 → adam_community-1.0.16}/PKG-INFO +1 -1
- adam_community-1.0.16/adam_community/__version__.py +1 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/build.py +35 -7
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community.egg-info/PKG-INFO +1 -1
- adam_community-1.0.14/adam_community/__version__.py +0 -1
- {adam_community-1.0.14 → adam_community-1.0.16}/README.md +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community/__init__.py +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/__init__.py +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/cli.py +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/init.py +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/parser.py +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/templates/Makefile.j2 +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/templates/README_agent.md.j2 +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/templates/README_kit.md.j2 +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/templates/__init__.py +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/templates/agent_python.py.j2 +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/templates/configure.json.j2 +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/templates/initial_assistant_message.md.j2 +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/templates/initial_system_prompt.md.j2 +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/templates/input.json.j2 +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/templates/kit_python.py.j2 +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/templates/long_description.md.j2 +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/templates/rag_python.py.j2 +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/updater.py +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community/tool.py +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community/util.py +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community.egg-info/SOURCES.txt +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community.egg-info/dependency_links.txt +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community.egg-info/entry_points.txt +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community.egg-info/requires.txt +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/adam_community.egg-info/top_level.txt +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/setup.cfg +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/setup.py +0 -0
- {adam_community-1.0.14 → adam_community-1.0.16}/test/test_util_tool.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.0.16"
|
|
@@ -123,9 +123,13 @@ def check_configuration(directory: Path) -> Tuple[bool, List[str]]:
|
|
|
123
123
|
console.print(f" ✓ 包信息: {config['name']} v{config['version']}")
|
|
124
124
|
|
|
125
125
|
return len(errors) == 0, errors
|
|
126
|
-
except json.JSONDecodeError:
|
|
127
|
-
console.print(
|
|
128
|
-
|
|
126
|
+
except json.JSONDecodeError as e:
|
|
127
|
+
console.print(Panel.fit(
|
|
128
|
+
f"[bold red]❌ configure.json 解析失败[/bold red]\n{str(e)}",
|
|
129
|
+
border_style="red"
|
|
130
|
+
))
|
|
131
|
+
console.print("[red]构建失败,请检查并修复 configure.json 文件后重试。[/red]")
|
|
132
|
+
sys.exit(1)
|
|
129
133
|
|
|
130
134
|
def check_markdown_files(directory: Path) -> Tuple[bool, List[str]]:
|
|
131
135
|
"""检查必要的 Markdown 文件"""
|
|
@@ -140,8 +144,13 @@ def check_markdown_files(directory: Path) -> Tuple[bool, List[str]]:
|
|
|
140
144
|
with open(config_path, 'r', encoding='utf-8') as f:
|
|
141
145
|
config = json.load(f)
|
|
142
146
|
config_type = config.get("type", "agent")
|
|
143
|
-
except json.JSONDecodeError:
|
|
144
|
-
|
|
147
|
+
except json.JSONDecodeError as e:
|
|
148
|
+
console.print(Panel.fit(
|
|
149
|
+
f"[bold red]❌ configure.json 解析失败[/bold red]\n{str(e)}",
|
|
150
|
+
border_style="red"
|
|
151
|
+
))
|
|
152
|
+
console.print("[red]构建失败,请检查并修复 configure.json 文件后重试。[/red]")
|
|
153
|
+
sys.exit(1)
|
|
145
154
|
|
|
146
155
|
# 根据 type 设置不同的 required_files
|
|
147
156
|
if config_type == "kit":
|
|
@@ -187,8 +196,16 @@ def check_markdown_files(directory: Path) -> Tuple[bool, List[str]]:
|
|
|
187
196
|
|
|
188
197
|
def create_zip_package(directory: Path) -> str:
|
|
189
198
|
"""创建 zip 包"""
|
|
190
|
-
|
|
191
|
-
config =
|
|
199
|
+
try:
|
|
200
|
+
with open(directory / "config" / "configure.json", 'r', encoding='utf-8') as f:
|
|
201
|
+
config = json.load(f)
|
|
202
|
+
except json.JSONDecodeError as e:
|
|
203
|
+
console.print(Panel.fit(
|
|
204
|
+
f"[bold red]❌ configure.json 解析失败[/bold red]\n{str(e)}",
|
|
205
|
+
border_style="red"
|
|
206
|
+
))
|
|
207
|
+
console.print("[red]构建失败,请检查并修复 configure.json 文件后重试。[/red]")
|
|
208
|
+
sys.exit(1)
|
|
192
209
|
|
|
193
210
|
zip_name = f"{config['name']}_{config['version']}.zip"
|
|
194
211
|
zip_path = directory / zip_name
|
|
@@ -207,6 +224,16 @@ def create_zip_package(directory: Path) -> str:
|
|
|
207
224
|
zipf.write(py_file, py_file.relative_to(directory))
|
|
208
225
|
file_count += 1
|
|
209
226
|
|
|
227
|
+
# 添加其他文件(Markdown 和 Jinja2 模板)
|
|
228
|
+
other_files = []
|
|
229
|
+
for pattern in ['*.md', '*.jinja2']:
|
|
230
|
+
files = [f for f in directory.rglob(pattern) if not f.name.startswith('_')]
|
|
231
|
+
other_files.extend(files)
|
|
232
|
+
|
|
233
|
+
for other_file in other_files:
|
|
234
|
+
zipf.write(other_file, other_file.relative_to(directory))
|
|
235
|
+
file_count += 1
|
|
236
|
+
|
|
210
237
|
# 添加配置文件
|
|
211
238
|
zipf.write(directory / "config" / "configure.json", "config/configure.json")
|
|
212
239
|
file_count += 1
|
|
@@ -244,6 +271,7 @@ def create_zip_package(directory: Path) -> str:
|
|
|
244
271
|
file_count += 1
|
|
245
272
|
|
|
246
273
|
console.print(f" ✓ Python 文件: {len(py_files)} 个")
|
|
274
|
+
console.print(f" ✓ 其他文件: {len(other_files)} 个")
|
|
247
275
|
console.print(f" ✓ 配置文件: 1 个")
|
|
248
276
|
if demos_files > 0:
|
|
249
277
|
console.print(f" ✓ 演示文件: {demos_files} 个")
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.0.14"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/templates/README_agent.md.j2
RENAMED
|
File without changes
|
{adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/templates/README_kit.md.j2
RENAMED
|
File without changes
|
|
File without changes
|
{adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/templates/agent_python.py.j2
RENAMED
|
File without changes
|
{adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/templates/configure.json.j2
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/templates/kit_python.py.j2
RENAMED
|
File without changes
|
{adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/templates/long_description.md.j2
RENAMED
|
File without changes
|
{adam_community-1.0.14 → adam_community-1.0.16}/adam_community/cli/templates/rag_python.py.j2
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adam_community-1.0.14 → adam_community-1.0.16}/adam_community.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|