myagent-ai 1.2.1 → 1.2.2
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.
- package/config.py +2 -1
- package/core/version.py +1 -1
- package/package.json +1 -1
- package/web/api_server.py +14 -10
- package/agents/__pycache__/main_agent.cpython-312.pyc +0 -0
- package/departments/__pycache__/__init__.cpython-312.pyc +0 -0
- package/departments/__pycache__/manager.cpython-312.pyc +0 -0
- package/executor/__pycache__/engine.cpython-312.pyc +0 -0
- package/organization/__pycache__/manager.cpython-312.pyc +0 -0
- package/skills/aminer-open-academic/scripts/__pycache__/aminer_client.cpython-312.pyc +0 -0
- package/skills/blog-writer/__pycache__/manage_examples.cpython-312.pyc +0 -0
- package/skills/docx/ooxml/scripts/__pycache__/pack.cpython-312.pyc +0 -0
- package/skills/docx/ooxml/scripts/__pycache__/unpack.cpython-312.pyc +0 -0
- package/skills/docx/ooxml/scripts/__pycache__/validate.cpython-312.pyc +0 -0
- package/skills/docx/ooxml/scripts/validation/__pycache__/__init__.cpython-312.pyc +0 -0
- package/skills/docx/ooxml/scripts/validation/__pycache__/base.cpython-312.pyc +0 -0
- package/skills/docx/ooxml/scripts/validation/__pycache__/docx.cpython-312.pyc +0 -0
- package/skills/docx/ooxml/scripts/validation/__pycache__/pptx.cpython-312.pyc +0 -0
- package/skills/docx/ooxml/scripts/validation/__pycache__/redlining.cpython-312.pyc +0 -0
- package/skills/docx/scripts/__pycache__/__init__.cpython-312.pyc +0 -0
- package/skills/docx/scripts/__pycache__/add_toc_placeholders.cpython-312.pyc +0 -0
- package/skills/docx/scripts/__pycache__/document.cpython-312.pyc +0 -0
- package/skills/docx/scripts/__pycache__/utilities.cpython-312.pyc +0 -0
- package/skills/market-research-reports/scripts/__pycache__/generate_market_visuals.cpython-312.pyc +0 -0
- package/skills/pdf/scripts/__pycache__/add_zai_metadata.cpython-312.pyc +0 -0
- package/skills/pdf/scripts/__pycache__/check_bounding_boxes.cpython-312.pyc +0 -0
- package/skills/pdf/scripts/__pycache__/check_bounding_boxes_test.cpython-312.pyc +0 -0
- package/skills/pdf/scripts/__pycache__/check_fillable_fields.cpython-312.pyc +0 -0
- package/skills/pdf/scripts/__pycache__/convert_pdf_to_images.cpython-312.pyc +0 -0
- package/skills/pdf/scripts/__pycache__/create_validation_image.cpython-312.pyc +0 -0
- package/skills/pdf/scripts/__pycache__/extract_form_field_info.cpython-312.pyc +0 -0
- package/skills/pdf/scripts/__pycache__/fill_fillable_fields.cpython-312.pyc +0 -0
- package/skills/pdf/scripts/__pycache__/fill_pdf_form_with_annotations.cpython-312.pyc +0 -0
- package/skills/pdf/scripts/__pycache__/sanitize_code.cpython-312.pyc +0 -0
- package/skills/pptx/ooxml/scripts/__pycache__/pack.cpython-312.pyc +0 -0
- package/skills/pptx/ooxml/scripts/__pycache__/unpack.cpython-312.pyc +0 -0
- package/skills/pptx/ooxml/scripts/__pycache__/validate.cpython-312.pyc +0 -0
- package/skills/pptx/ooxml/scripts/validation/__pycache__/__init__.cpython-312.pyc +0 -0
- package/skills/pptx/ooxml/scripts/validation/__pycache__/base.cpython-312.pyc +0 -0
- package/skills/pptx/ooxml/scripts/validation/__pycache__/docx.cpython-312.pyc +0 -0
- package/skills/pptx/ooxml/scripts/validation/__pycache__/pptx.cpython-312.pyc +0 -0
- package/skills/pptx/ooxml/scripts/validation/__pycache__/redlining.cpython-312.pyc +0 -0
- package/skills/pptx/scripts/__pycache__/inventory.cpython-312.pyc +0 -0
- package/skills/pptx/scripts/__pycache__/inventory.cpython-313.pyc +0 -0
- package/skills/pptx/scripts/__pycache__/rearrange.cpython-312.pyc +0 -0
- package/skills/pptx/scripts/__pycache__/replace.cpython-312.pyc +0 -0
- package/skills/pptx/scripts/__pycache__/thumbnail.cpython-312.pyc +0 -0
- package/skills/qingyan-research/__pycache__/generate_html.cpython-312.pyc +0 -0
- package/skills/skill-creator/eval-viewer/__pycache__/generate_review.cpython-312.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/__init__.cpython-312.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/aggregate_benchmark.cpython-312.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/generate_report.cpython-312.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/improve_description.cpython-312.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/package_skill.cpython-312.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/quick_validate.cpython-312.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/run_eval.cpython-312.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/run_loop.cpython-312.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/utils.cpython-312.pyc +0 -0
- package/skills/storyboard-manager/scripts/__pycache__/consistency_checker.cpython-312.pyc +0 -0
- package/skills/storyboard-manager/scripts/__pycache__/timeline_tracker.cpython-312.pyc +0 -0
- package/skills/ui-ux-pro-max/scripts/__pycache__/__init__.cpython-312.pyc +0 -0
- package/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-312.pyc +0 -0
- package/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-312.pyc +0 -0
- package/skills/ui-ux-pro-max/scripts/__pycache__/search.cpython-312.pyc +0 -0
- package/skills/xlsx/__pycache__/recalc.cpython-312.pyc +0 -0
- package/web/__pycache__/api_server.cpython-312.pyc +0 -0
package/config.py
CHANGED
|
@@ -270,8 +270,9 @@ class ConfigManager:
|
|
|
270
270
|
"""应用平台相关的默认值"""
|
|
271
271
|
if not self._config.memory.db_path:
|
|
272
272
|
self._config.memory.db_path = str(self.data_dir / "memory.db")
|
|
273
|
+
# data_dir 由 property 自动计算为 _data_dir / "data",无需在此设置
|
|
273
274
|
if not self._config.data_dir:
|
|
274
|
-
self._config.data_dir =
|
|
275
|
+
self._config.data_dir = ""
|
|
275
276
|
|
|
276
277
|
# 设置 Ollama base_url
|
|
277
278
|
if self._config.llm.provider == "ollama" and not self._config.llm.base_url:
|
package/core/version.py
CHANGED
package/package.json
CHANGED
package/web/api_server.py
CHANGED
|
@@ -92,14 +92,14 @@ class ApiServer:
|
|
|
92
92
|
|
|
93
93
|
def _setup_routes(self):
|
|
94
94
|
r = self.app.router
|
|
95
|
+
# ── 系统状态 ──
|
|
95
96
|
r.add_get("/api/status", self.handle_status)
|
|
96
97
|
r.add_post("/api/shutdown", self.handle_shutdown)
|
|
98
|
+
# ── Agent 列表/创建 ──
|
|
97
99
|
r.add_get("/api/agents", self.handle_list_agents)
|
|
98
100
|
r.add_get("/api/agents/tree", self.handle_agents_tree)
|
|
99
101
|
r.add_post("/api/agents", self.handle_create_agent)
|
|
100
|
-
|
|
101
|
-
r.add_put("/api/agents/{name:[a-zA-Z0-9_/-]+}", self.handle_update_agent)
|
|
102
|
-
r.add_delete("/api/agents/{name:.+}", self.handle_delete_agent)
|
|
102
|
+
# ── Agent 子资源路由(必须在通用 {name} 路由之前注册) ──
|
|
103
103
|
r.add_get("/api/agents/{name:[a-zA-Z0-9_/-]+}/soul", self.handle_get_soul)
|
|
104
104
|
r.add_put("/api/agents/{name:[a-zA-Z0-9_/-]+}/soul", self.handle_set_soul)
|
|
105
105
|
r.add_get("/api/agents/{name:[a-zA-Z0-9_/-]+}/identity", self.handle_get_identity)
|
|
@@ -109,6 +109,15 @@ class ApiServer:
|
|
|
109
109
|
r.add_get("/api/agents/{name:[a-zA-Z0-9_/-]+}/sessions", self.handle_agent_sessions)
|
|
110
110
|
r.add_get("/api/agents/{name:[a-zA-Z0-9_/-]+}/children", self.handle_list_children)
|
|
111
111
|
r.add_post("/api/agents/{name:[a-zA-Z0-9_/-]+}/children", self.handle_create_child)
|
|
112
|
+
r.add_get("/api/agents/{name:[a-zA-Z0-9_/-]+}/bindings", self.handle_agent_bindings)
|
|
113
|
+
r.add_get("/api/agents/{name:[a-zA-Z0-9_/-]+}/knowledge", self.handle_list_agent_knowledge)
|
|
114
|
+
r.add_post("/api/agents/{name:[a-zA-Z0-9_/-]+}/knowledge/upload", self.handle_upload_agent_knowledge)
|
|
115
|
+
r.add_delete("/api/agents/{name:[a-zA-Z0-9_/-]+}/knowledge", self.handle_delete_agent_knowledge)
|
|
116
|
+
# ── Agent 通用 CRUD(放在子资源之后,name 不含斜杠避免吞掉子路由) ──
|
|
117
|
+
r.add_get("/api/agents/{name:[a-zA-Z0-9_\\-]+}", self.handle_get_agent)
|
|
118
|
+
r.add_put("/api/agents/{name:[a-zA-Z0-9_\\-]+}", self.handle_update_agent)
|
|
119
|
+
r.add_delete("/api/agents/{name:.+}", self.handle_delete_agent)
|
|
120
|
+
# ── 平台管理 ──
|
|
112
121
|
r.add_get("/api/platforms", self.handle_list_platforms)
|
|
113
122
|
r.add_post("/api/platforms", self.handle_add_platform)
|
|
114
123
|
r.add_get("/api/platforms/{name}", self.handle_get_platform)
|
|
@@ -122,8 +131,7 @@ class ApiServer:
|
|
|
122
131
|
r.add_post("/api/models", self.handle_add_model)
|
|
123
132
|
r.add_put("/api/models/{model_id}", self.handle_update_model)
|
|
124
133
|
r.add_delete("/api/models/{model_id}", self.handle_delete_model)
|
|
125
|
-
# ──
|
|
126
|
-
r.add_get("/api/agents/{name:[a-zA-Z0-9_/-]+}/bindings", self.handle_agent_bindings)
|
|
134
|
+
# ── 会话管理 ──
|
|
127
135
|
r.add_get("/api/sessions", self.handle_list_sessions)
|
|
128
136
|
r.add_get("/api/sessions/{sid}/messages", self.handle_get_messages)
|
|
129
137
|
r.add_delete("/api/sessions/{sid}", self.handle_clear_session)
|
|
@@ -165,10 +173,6 @@ class ApiServer:
|
|
|
165
173
|
r.add_get("/api/organization/knowledge/file", self.handle_read_org_knowledge)
|
|
166
174
|
r.add_post("/api/organization/knowledge/upload", self.handle_upload_org_knowledge)
|
|
167
175
|
r.add_delete("/api/organization/knowledge", self.handle_delete_org_knowledge)
|
|
168
|
-
# ── Agent 知识库 ──
|
|
169
|
-
r.add_get("/api/agents/{name:[a-zA-Z0-9_/-]+}/knowledge", self.handle_list_agent_knowledge)
|
|
170
|
-
r.add_post("/api/agents/{name:[a-zA-Z0-9_/-]+}/knowledge/upload", self.handle_upload_agent_knowledge)
|
|
171
|
-
r.add_delete("/api/agents/{name:[a-zA-Z0-9_/-]+}/knowledge", self.handle_delete_agent_knowledge)
|
|
172
176
|
# ── 知识库 RAG 搜索 ──
|
|
173
177
|
r.add_post("/api/knowledge/search", self.handle_knowledge_search)
|
|
174
178
|
# ── 配置管理 (热重载/导入/导出) ──
|
|
@@ -1044,7 +1048,7 @@ class ApiServer:
|
|
|
1044
1048
|
return web.json_response({"ok": True})
|
|
1045
1049
|
|
|
1046
1050
|
async def handle_get_soul(self, request):
|
|
1047
|
-
path = request.match_info
|
|
1051
|
+
path = request.match_info.get("name", "")
|
|
1048
1052
|
p = self._agent_dir(path) / "soul.md"
|
|
1049
1053
|
if not p.parent.exists() or not (p.parent / "config.json").exists():
|
|
1050
1054
|
return web.json_response({"error": "not found"}, status=404)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/skills/market-research-reports/scripts/__pycache__/generate_market_visuals.cpython-312.pyc
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|