myagent-ai 1.8.8 → 1.9.0
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/agents/main_agent.py +38 -0
- package/core/deps_checker.py +0 -0
- package/install/uninstall.ps1 +0 -0
- package/install/uninstall.sh +0 -0
- package/main.py +6 -1
- package/memory/manager.py +1 -1
- package/package.json +1 -1
- package/skills/docx/LICENSE.txt +8 -25
- package/skills/docx/SKILL.md +158 -413
- package/skills/docx/scripts/add_toc_placeholders.py +609 -80
- package/skills/docx/scripts/document.py +55 -24
- package/skills/gui_skill.py +0 -0
- package/skills/pdf/LICENSE.txt +8 -25
- package/skills/pdf/SKILL.md +757 -1364
- package/skills/xlsx/LICENSE.txt +8 -25
- package/skills/xlsx/SKILL.md +163 -429
- package/web/api_server.py +276 -113
- package/web/ui/chat/chat.css +7 -0
- package/web/ui/chat/chat.js +0 -0
- package/web/ui/chat/chat_container.html +0 -0
- package/web/ui/chat/chat_main.js +73 -2
- package/web/ui/chat/flow_engine.js +13 -0
- package/web/ui/chat/groupchat.js +0 -0
- package/web/ui/chat/left_sessions.html +0 -0
- package/web/ui/chat/middle_chat.html +0 -0
- package/web/ui/chat/right_agents.html +0 -0
- package/web/ui/index.html +71 -11
- package/skills/pptx/LICENSE.txt +0 -30
- package/skills/pptx/SKILL.md +0 -507
- package/skills/pptx/html2pptx.md +0 -625
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +0 -1499
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +0 -146
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +0 -1085
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +0 -11
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +0 -3081
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +0 -23
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +0 -185
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +0 -287
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +0 -1676
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +0 -28
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +0 -144
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +0 -174
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +0 -25
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +0 -18
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +0 -59
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +0 -56
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +0 -195
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +0 -582
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +0 -25
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +0 -4439
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +0 -570
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +0 -509
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +0 -12
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +0 -108
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +0 -96
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +0 -3646
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +0 -116
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +0 -42
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +0 -50
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +0 -49
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +0 -33
- package/skills/pptx/ooxml/schemas/mce/mc.xsd +0 -75
- package/skills/pptx/ooxml/schemas/microsoft/wml-2010.xsd +0 -560
- package/skills/pptx/ooxml/schemas/microsoft/wml-2012.xsd +0 -67
- package/skills/pptx/ooxml/schemas/microsoft/wml-2018.xsd +0 -14
- package/skills/pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +0 -20
- package/skills/pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +0 -13
- package/skills/pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +0 -4
- package/skills/pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +0 -8
- package/skills/pptx/ooxml/scripts/pack.py +0 -159
- package/skills/pptx/ooxml/scripts/unpack.py +0 -29
- package/skills/pptx/ooxml/scripts/validate.py +0 -69
- package/skills/pptx/ooxml/scripts/validation/__init__.py +0 -15
- package/skills/pptx/ooxml/scripts/validation/base.py +0 -951
- package/skills/pptx/ooxml/scripts/validation/docx.py +0 -274
- package/skills/pptx/ooxml/scripts/validation/pptx.py +0 -315
- package/skills/pptx/ooxml/scripts/validation/redlining.py +0 -279
- package/skills/pptx/ooxml.md +0 -427
- package/skills/pptx/scripts/html2pptx.js +0 -1044
- package/skills/pptx/scripts/inventory.py +0 -1020
- package/skills/pptx/scripts/rearrange.py +0 -231
- package/skills/pptx/scripts/replace.py +0 -385
- package/skills/pptx/scripts/thumbnail.py +0 -450
- package/web/__pycache__/api_server.cpython-312.pyc +0 -0
package/agents/main_agent.py
CHANGED
|
@@ -479,6 +479,44 @@ status 取值:
|
|
|
479
479
|
content=final_response,
|
|
480
480
|
)
|
|
481
481
|
|
|
482
|
+
# ── 保存工具调用过程到短期记忆(供历史记录查看)──
|
|
483
|
+
if self.memory and self._execution_events:
|
|
484
|
+
try:
|
|
485
|
+
tool_summary_parts = []
|
|
486
|
+
for evt in self._execution_events:
|
|
487
|
+
etype = evt.get("type", "")
|
|
488
|
+
if etype in ("tool_call", "skill_call"):
|
|
489
|
+
tool_name = evt.get("tool_name") or evt.get("skill_name", "")
|
|
490
|
+
args = evt.get("arguments") or evt.get("params", {})
|
|
491
|
+
tool_summary_parts.append(f"🔧 调用工具: {tool_name}({json.dumps(args, ensure_ascii=False)[:200]})")
|
|
492
|
+
elif etype in ("tool_result", "skill_result"):
|
|
493
|
+
tool_name = evt.get("tool_name") or evt.get("skill_name", "")
|
|
494
|
+
success = evt.get("success", False)
|
|
495
|
+
summary = evt.get("summary", "")
|
|
496
|
+
status = "✅" if success else "❌"
|
|
497
|
+
tool_summary_parts.append(f" {status} 结果: {summary[:300]}")
|
|
498
|
+
elif etype == "code_exec":
|
|
499
|
+
lang = evt.get("language", "")
|
|
500
|
+
code_preview = evt.get("code_preview", "")
|
|
501
|
+
stdout = evt.get("stdout", "")
|
|
502
|
+
success = evt.get("success", False)
|
|
503
|
+
status = "✅" if success else "❌"
|
|
504
|
+
tool_summary_parts.append(f"💻 执行 {lang}: {code_preview[:150]}")
|
|
505
|
+
if stdout:
|
|
506
|
+
tool_summary_parts.append(f" {status} 输出: {stdout[:300]}")
|
|
507
|
+
elif etype == "code_result":
|
|
508
|
+
pass # code_result is duplicate of code_exec with final status
|
|
509
|
+
if tool_summary_parts:
|
|
510
|
+
exec_log = "\n".join(tool_summary_parts)
|
|
511
|
+
self.memory.add_short_term(
|
|
512
|
+
session_id=context.session_id,
|
|
513
|
+
role="tool",
|
|
514
|
+
content=exec_log,
|
|
515
|
+
importance=0.3,
|
|
516
|
+
)
|
|
517
|
+
except Exception as e:
|
|
518
|
+
logger.warning(f"保存工具调用过程失败: {e}")
|
|
519
|
+
|
|
482
520
|
# 清理工作记忆
|
|
483
521
|
context.working_memory["final_response"] = final_response
|
|
484
522
|
context.working_memory["iterations"] = self._iteration_count
|
package/core/deps_checker.py
CHANGED
|
File without changes
|
package/install/uninstall.ps1
CHANGED
|
File without changes
|
package/install/uninstall.sh
CHANGED
|
File without changes
|
package/main.py
CHANGED
|
@@ -54,12 +54,17 @@ def _open_browser_kiosk(url: str):
|
|
|
54
54
|
|
|
55
55
|
async def _launch():
|
|
56
56
|
pw = await async_playwright().start()
|
|
57
|
+
# 使用 window-size 和 window-position 确保窗口最大化
|
|
58
|
+
# --app 模式下 --start-maximized 不生效,需要手动设置窗口大小
|
|
59
|
+
screen_width = 1920
|
|
60
|
+
screen_height = 1080
|
|
57
61
|
browser = await pw.chromium.launch(
|
|
58
62
|
headless=False,
|
|
59
63
|
args=[
|
|
60
64
|
"--no-sandbox",
|
|
61
65
|
f"--app={url}", # app 模式: 无地址栏、无标签页
|
|
62
|
-
"--
|
|
66
|
+
f"--window-size={screen_width},{screen_height}",
|
|
67
|
+
"--window-position=0,0",
|
|
63
68
|
],
|
|
64
69
|
)
|
|
65
70
|
# 保持进程运行,浏览器关闭后退出
|
package/memory/manager.py
CHANGED
package/package.json
CHANGED
package/skills/docx/LICENSE.txt
CHANGED
|
@@ -1,30 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
Copyright (c) 2026 Z.ai All rights reserved.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
and other components of this Skill) is governed by your agreement with
|
|
5
|
-
Anthropic regarding use of Anthropic's services. If no separate agreement
|
|
6
|
-
exists, use is governed by Anthropic's Consumer Terms of Service or
|
|
7
|
-
Commercial Terms of Service, as applicable:
|
|
8
|
-
https://www.anthropic.com/legal/consumer-terms
|
|
9
|
-
https://www.anthropic.com/legal/commercial-terms
|
|
10
|
-
Your applicable agreement is referred to as the "Agreement." "Services" are
|
|
11
|
-
as defined in the Agreement.
|
|
3
|
+
Permission is granted for personal, educational, and non-commercial use only.
|
|
12
4
|
|
|
13
|
-
|
|
14
|
-
contrary, users may not:
|
|
5
|
+
Commercial use is strictly prohibited without prior written permission from the author.
|
|
15
6
|
|
|
16
|
-
|
|
17
|
-
materials outside the Services
|
|
18
|
-
- Reproduce or copy these materials, except for temporary copies created
|
|
19
|
-
automatically during authorized use of the Services
|
|
20
|
-
- Create derivative works based on these materials
|
|
21
|
-
- Distribute, sublicense, or transfer these materials to any third party
|
|
22
|
-
- Make, offer to sell, sell, or import any inventions embodied in these
|
|
23
|
-
materials
|
|
24
|
-
- Reverse engineer, decompile, or disassemble these materials
|
|
7
|
+
Unauthorized copying, modification, or distribution of the software for commercial purposes is prohibited.
|
|
25
8
|
|
|
26
|
-
The
|
|
27
|
-
imply any license or right beyond those expressly granted above.
|
|
9
|
+
The author reserves the right to make the final determination of what constitutes "commercial use".
|
|
28
10
|
|
|
29
|
-
|
|
30
|
-
|
|
11
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
12
|
+
|
|
13
|
+
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ARISING FROM THE USE OF THE SOFTWARE.
|