txcode-sdk 0.9.0__tar.gz → 1.0.0__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.
- {txcode_sdk-0.9.0/src/txcode_sdk.egg-info → txcode_sdk-1.0.0}/PKG-INFO +1 -1
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/pyproject.toml +1 -1
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/base_agent.py +187 -62
- txcode_sdk-1.0.0/src/txcode_sdk/agent/summarizer/summarizer_agent.py +130 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/client.py +390 -359
- txcode_sdk-1.0.0/src/txcode_sdk/compact/compressor.py +132 -0
- txcode_sdk-1.0.0/src/txcode_sdk/config/__init__.py +5 -0
- txcode_sdk-1.0.0/src/txcode_sdk/config/context_config.py +19 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/provider/deepseek_provider.py +127 -121
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/provider/openai_provider.py +99 -94
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/session/manager.py +3 -2
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0/src/txcode_sdk.egg-info}/PKG-INFO +1 -1
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk.egg-info/SOURCES.txt +3 -25
- txcode_sdk-0.9.0/src/txcode_sdk/agent/summarizer/summarizer_agent.py +0 -101
- txcode_sdk-0.9.0/src/txcode_sdk/compact/compressor.py +0 -75
- txcode_sdk-0.9.0/tests/test_cli.py +0 -253
- txcode_sdk-0.9.0/tests/test_client.py +0 -245
- txcode_sdk-0.9.0/tests/test_compat.py +0 -149
- txcode_sdk-0.9.0/tests/test_deepseek_provider.py +0 -161
- txcode_sdk-0.9.0/tests/test_design_agent.py +0 -47
- txcode_sdk-0.9.0/tests/test_discuss_agent.py +0 -35
- txcode_sdk-0.9.0/tests/test_dream_agent.py +0 -35
- txcode_sdk-0.9.0/tests/test_http_api.py +0 -682
- txcode_sdk-0.9.0/tests/test_http_ext_api.py +0 -612
- txcode_sdk-0.9.0/tests/test_json_store.py +0 -99
- txcode_sdk-0.9.0/tests/test_name_agent.py +0 -56
- txcode_sdk-0.9.0/tests/test_plan_agent.py +0 -87
- txcode_sdk-0.9.0/tests/test_project_manager.py +0 -122
- txcode_sdk-0.9.0/tests/test_provider_config.py +0 -248
- txcode_sdk-0.9.0/tests/test_provider_model.py +0 -75
- txcode_sdk-0.9.0/tests/test_session.py +0 -52
- txcode_sdk-0.9.0/tests/test_session_query.py +0 -358
- txcode_sdk-0.9.0/tests/test_shell_agent.py +0 -62
- txcode_sdk-0.9.0/tests/test_skill_agent.py +0 -70
- txcode_sdk-0.9.0/tests/test_test_agent.py +0 -126
- txcode_sdk-0.9.0/tests/test_tools.py +0 -711
- txcode_sdk-0.9.0/tests/test_txcode_ai.py +0 -208
- txcode_sdk-0.9.0/tests/test_websocket_protocol.py +0 -218
- txcode_sdk-0.9.0/tests/test_ws_server.py +0 -1093
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/LICENSE +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/README.md +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/setup.cfg +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/setup.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/example/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/example/code_example.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/example/code_session.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/example/code_tool.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/example/constants.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/example/query_session.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/example/ws_server.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/_compat/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/_compat/dataclasses.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/_compat/resources.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/chat/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/chat/agent_tool.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/chat/chat_agent.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/chat/prompts/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/chat/prompts/role.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/code/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/code/agent_tool.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/code/code_agent.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/code/prompts/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/code/prompts/role.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/common/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/common/common_agent.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/common/prompt/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/common/prompt/role.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/design/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/design/agent_tool.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/design/design_agent.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/design/prompts/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/design/prompts/role.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/discuss/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/discuss/agent_tool.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/discuss/discuss_agent.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/discuss/prompts/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/discuss/prompts/role.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/dream/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/dream/agent_tool.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/dream/dream_agent.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/dream/prompts/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/dream/prompts/role.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/mem/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/mem/agent_tool.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/mem/mem_agent.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/mem/prompts/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/mem/prompts/role.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/name/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/name/name_agent.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/name/prompts/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/name/prompts/role.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/plan/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/plan/agent_tool.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/plan/plan_agent.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/plan/prompts/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/plan/prompts/role.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/shell/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/shell/agent_tool.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/shell/prompts/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/shell/prompts/role.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/shell/shell_agent.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/skill/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/skill/agent_tool.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/skill/prompts/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/skill/prompts/role.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/skill/skill_agent.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/summarizer/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/summarizer/prompts/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/summarizer/prompts/role.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/task/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/task/agent_tool.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/task/prompts/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/task/prompts/role.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/task/task_agent.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/test/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/test/agent_tool.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/test/prompts/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/test/prompts/role.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/test/test_agent.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/agent/tool_registry.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/compact/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/hooks/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/hooks/handlers/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/hooks/handlers/base.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/hooks/handlers/memory.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/hooks/processor.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/hooks/queue.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/hooks/types.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/provider/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/provider/base.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/provider/router.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/provider/txcode_ai.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/server/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/server/__main__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/server/config_store.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/server/handler.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/server/http.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/server/hub_client.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/server/json_store.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/server/plan_code.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/server/project_manager.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/server/provider_config.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/server/server.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/server/skill_manager.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/server/spec_manager.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/server/websocket.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/server/zip_utils.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/session/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/skills/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/specs/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/__init__.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/_util.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/bash.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/bash.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/bash_tool.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/code_search.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/code_search.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/edit_file.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/edit_file.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/email_tool.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/email_tool.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/glob.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/glob.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/glob_tool.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/grep.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/grep.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/grep_tool.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/memory.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/memory.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/memory_tool.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/read_file.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/read_file.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/skill_tool.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/skill_tool.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/todo_read.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/todo_read.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/todo_write.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/todo_write.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/web_fetch.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/web_fetch.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/web_search.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/web_search.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/web_shell_exec.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/web_shell_exec.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/write_file.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/tools/write_file.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk/types.py +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk.egg-info/dependency_links.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk.egg-info/entry_points.txt +0 -0
- {txcode_sdk-0.9.0 → txcode_sdk-1.0.0}/src/txcode_sdk.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""BaseAgent 抽象基类(ReAct 主循环),Python 3.6 兼容。"""
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
|
+
import logging
|
|
4
5
|
import platform as _platform
|
|
5
6
|
from abc import ABC, abstractmethod
|
|
6
7
|
from pathlib import Path
|
|
@@ -25,6 +26,8 @@ from ..specs import SpecInjector
|
|
|
25
26
|
from .._compat.resources import get_resource
|
|
26
27
|
from .tool_registry import ToolRegistry
|
|
27
28
|
|
|
29
|
+
logger = logging.getLogger(__name__)
|
|
30
|
+
|
|
28
31
|
|
|
29
32
|
def _format_tool_args(tool_name: str, args: dict) -> str:
|
|
30
33
|
key_map = {
|
|
@@ -74,6 +77,30 @@ def _build_step_print_msg(step: StepInfo) -> Optional[str]:
|
|
|
74
77
|
return "\n".join(lines) if lines else None
|
|
75
78
|
|
|
76
79
|
|
|
80
|
+
def _format_last_response(resp: ProviderResponse) -> str:
|
|
81
|
+
lines = ["<last-ai-response>"]
|
|
82
|
+
lines.append("finish_reason: %s" % (resp.finish_reason or ""))
|
|
83
|
+
if resp.usage:
|
|
84
|
+
lines.append(
|
|
85
|
+
"usage: prompt=%s completion=%s total=%s"
|
|
86
|
+
% (resp.usage.prompt_tokens, resp.usage.completion_tokens, resp.usage.total_tokens)
|
|
87
|
+
)
|
|
88
|
+
if resp.reasoning:
|
|
89
|
+
lines.append("--- reasoning ---")
|
|
90
|
+
lines.append(resp.reasoning)
|
|
91
|
+
if resp.content:
|
|
92
|
+
lines.append("--- content ---")
|
|
93
|
+
lines.append(resp.content)
|
|
94
|
+
if resp.tool_calls:
|
|
95
|
+
lines.append("--- tool_calls ---")
|
|
96
|
+
for tc in resp.tool_calls:
|
|
97
|
+
name = tc.get("function", {}).get("name", "?")
|
|
98
|
+
args = tc.get("function", {}).get("arguments", "")
|
|
99
|
+
lines.append("- %s(%s)" % (name, args))
|
|
100
|
+
lines.append("</last-ai-response>")
|
|
101
|
+
return "\n".join(lines)
|
|
102
|
+
|
|
103
|
+
|
|
77
104
|
PROMPT_TEMPLATE = """
|
|
78
105
|
## 可用 Skills
|
|
79
106
|
|
|
@@ -226,6 +253,7 @@ class BaseAgent(ABC):
|
|
|
226
253
|
iteration = 0
|
|
227
254
|
final_answer = ""
|
|
228
255
|
total_usage = TokenUsage()
|
|
256
|
+
last_response: Optional[ProviderResponse] = None
|
|
229
257
|
|
|
230
258
|
while iteration < self._max_iterations:
|
|
231
259
|
if abort_signal and getattr(abort_signal, "aborted", False):
|
|
@@ -254,10 +282,11 @@ class BaseAgent(ABC):
|
|
|
254
282
|
"work_dir": self._work_dir,
|
|
255
283
|
} if self._log_enabled else None,
|
|
256
284
|
)
|
|
285
|
+
last_response = response
|
|
257
286
|
|
|
258
|
-
if response.usage:
|
|
259
|
-
total_usage.prompt_tokens = response.usage.prompt_tokens
|
|
260
|
-
total_usage.completion_tokens = response.usage.completion_tokens
|
|
287
|
+
if response.usage:
|
|
288
|
+
total_usage.prompt_tokens = response.usage.prompt_tokens
|
|
289
|
+
total_usage.completion_tokens = response.usage.completion_tokens
|
|
261
290
|
total_usage.total_tokens = response.usage.total_tokens
|
|
262
291
|
|
|
263
292
|
if response.finish_reason == "stop" and response.content:
|
|
@@ -287,7 +316,7 @@ class BaseAgent(ABC):
|
|
|
287
316
|
results=results,
|
|
288
317
|
iteration=iteration,
|
|
289
318
|
usage=response.usage,
|
|
290
|
-
|
|
319
|
+
)
|
|
291
320
|
step.printMsg = _build_step_print_msg(step)
|
|
292
321
|
steps.append(step)
|
|
293
322
|
|
|
@@ -308,12 +337,12 @@ class BaseAgent(ABC):
|
|
|
308
337
|
reasoning_content=response.reasoning,
|
|
309
338
|
)
|
|
310
339
|
self._base_messages.append(assistant_msg)
|
|
311
|
-
self._save_message(
|
|
312
|
-
"
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
340
|
+
self._save_message(
|
|
341
|
+
session_id, "assistant", "",
|
|
342
|
+
keep_context=True,
|
|
343
|
+
tool_calls=assistant_msg.tool_calls,
|
|
344
|
+
reasoning=response.reasoning,
|
|
345
|
+
)
|
|
317
346
|
|
|
318
347
|
# tool message
|
|
319
348
|
tool_msg = ChatMessage(
|
|
@@ -322,9 +351,16 @@ class BaseAgent(ABC):
|
|
|
322
351
|
tool_call_id=tc.id,
|
|
323
352
|
)
|
|
324
353
|
self._base_messages.append(tool_msg)
|
|
325
|
-
self._save_message(
|
|
354
|
+
self._save_message(
|
|
355
|
+
session_id, "tool", tool_msg.content,
|
|
356
|
+
keep_context=False, tool_call_id=tc.id,
|
|
357
|
+
)
|
|
326
358
|
|
|
327
|
-
|
|
359
|
+
new_messages_start_index = len(self._base_messages) - 2 * len(tool_calls)
|
|
360
|
+
await self._check_and_compact(
|
|
361
|
+
session_id, on_compact, self._base_messages,
|
|
362
|
+
total_usage, new_messages_start_index,
|
|
363
|
+
)
|
|
328
364
|
continue
|
|
329
365
|
|
|
330
366
|
if response.content:
|
|
@@ -334,18 +370,58 @@ class BaseAgent(ABC):
|
|
|
334
370
|
break
|
|
335
371
|
|
|
336
372
|
self._check_hooks("end")
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
373
|
+
|
|
374
|
+
err: Optional[str] = None
|
|
375
|
+
answer = final_answer
|
|
376
|
+
if final_answer == "":
|
|
377
|
+
if iteration >= self._max_iterations:
|
|
378
|
+
header = "已达到最大循环次数 %d 次,任务未完成" % self._max_iterations
|
|
379
|
+
err = "Max iterations reached (%d)" % self._max_iterations
|
|
380
|
+
elif last_response is not None:
|
|
381
|
+
fr = last_response.finish_reason or ""
|
|
382
|
+
if fr == "length":
|
|
383
|
+
header = "AI 响应被截断(finish_reason=length)"
|
|
384
|
+
err = "Response truncated (length)"
|
|
385
|
+
elif fr and fr not in ("stop", "tool_calls"):
|
|
386
|
+
header = "AI 返回异常 finish_reason=%s" % fr
|
|
387
|
+
err = "Unexpected finish_reason: %s" % fr
|
|
388
|
+
elif not last_response.content and not last_response.tool_calls:
|
|
389
|
+
header = "AI 返回空响应"
|
|
390
|
+
err = "Empty response from provider"
|
|
391
|
+
else:
|
|
392
|
+
header = "Unable to complete task"
|
|
393
|
+
err = "Unknown"
|
|
394
|
+
else:
|
|
395
|
+
header = "Unable to complete task"
|
|
396
|
+
err = "Unknown"
|
|
397
|
+
|
|
398
|
+
if last_response is not None:
|
|
399
|
+
answer = header + "\n" + _format_last_response(last_response)
|
|
400
|
+
else:
|
|
401
|
+
answer = header
|
|
402
|
+
|
|
403
|
+
logger.warning(
|
|
404
|
+
"agent run failed | session=%s iter=%d | %s",
|
|
405
|
+
session_id, iteration, err,
|
|
406
|
+
)
|
|
407
|
+
if last_response is not None:
|
|
408
|
+
logger.warning("last response: %s", _format_last_response(last_response))
|
|
409
|
+
|
|
410
|
+
success = final_answer != ""
|
|
411
|
+
return ChatResult(
|
|
412
|
+
answer=answer,
|
|
413
|
+
steps=steps,
|
|
414
|
+
session_id=session_id or "",
|
|
415
|
+
iterations=iteration,
|
|
416
|
+
success=success,
|
|
417
|
+
error=err,
|
|
418
|
+
usage=total_usage,
|
|
347
419
|
)
|
|
348
420
|
|
|
421
|
+
def set_compressor(self, compressor: Any):
|
|
422
|
+
"""注入客户端的 ContextCompressor,确保 _check_and_compact 使用同一实例。"""
|
|
423
|
+
self._compressor = compressor
|
|
424
|
+
|
|
349
425
|
def _check_hooks(self, trigger: str):
|
|
350
426
|
try:
|
|
351
427
|
from ..hooks import create_hooks
|
|
@@ -405,14 +481,32 @@ class BaseAgent(ABC):
|
|
|
405
481
|
is_original: bool = False,
|
|
406
482
|
tool_call_id: Optional[str] = None,
|
|
407
483
|
media_files: Optional[List[MediaFile]] = None,
|
|
484
|
+
tool_calls: Optional[List[dict]] = None,
|
|
485
|
+
reasoning: Optional[str] = None,
|
|
408
486
|
):
|
|
409
487
|
if not session_id or not self._session_manager:
|
|
410
488
|
return
|
|
411
489
|
mf_list = None
|
|
412
490
|
if media_files:
|
|
413
491
|
mf_list = [{"file_path": mf.file_path, "type": mf.type} for mf in media_files]
|
|
492
|
+
|
|
493
|
+
if role == "tool" and tool_call_id:
|
|
494
|
+
saved_content = json.dumps({
|
|
495
|
+
"type": "tool_result",
|
|
496
|
+
"toolCallId": tool_call_id,
|
|
497
|
+
"output": content,
|
|
498
|
+
}, ensure_ascii=False)
|
|
499
|
+
elif role == "assistant" and tool_calls:
|
|
500
|
+
saved_content = json.dumps({
|
|
501
|
+
"type": "assistant_with_tools",
|
|
502
|
+
"toolCalls": tool_calls,
|
|
503
|
+
"thought": reasoning or "",
|
|
504
|
+
}, ensure_ascii=False)
|
|
505
|
+
else:
|
|
506
|
+
saved_content = content
|
|
507
|
+
|
|
414
508
|
self._session_manager.add_message(
|
|
415
|
-
session_id, role,
|
|
509
|
+
session_id, role, saved_content,
|
|
416
510
|
keep_context=keep_context, is_original=is_original,
|
|
417
511
|
tool_call_id=tool_call_id, media_files=mf_list,
|
|
418
512
|
)
|
|
@@ -421,58 +515,89 @@ class BaseAgent(ABC):
|
|
|
421
515
|
self,
|
|
422
516
|
session_id: Optional[str],
|
|
423
517
|
on_compact: Optional[Callable[[dict], None]],
|
|
518
|
+
base_messages: Optional[List[ChatMessage]] = None,
|
|
519
|
+
total_usage: Optional[TokenUsage] = None,
|
|
520
|
+
new_messages_start_index: int = 0,
|
|
424
521
|
):
|
|
425
522
|
if not session_id or not self._session_manager:
|
|
426
523
|
return
|
|
427
|
-
try:
|
|
428
|
-
from ..compact.compressor import ContextCompressor
|
|
429
|
-
compressor = getattr(self, "_compressor", None)
|
|
430
|
-
if compressor is None:
|
|
431
|
-
compressor = ContextCompressor(
|
|
432
|
-
max_tokens=150_000,
|
|
433
|
-
provider=self._provider,
|
|
434
|
-
session_manager=self._session_manager,
|
|
435
|
-
)
|
|
436
|
-
self._compressor = compressor
|
|
437
524
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
return
|
|
525
|
+
if base_messages is None:
|
|
526
|
+
base_messages = getattr(self, "_base_messages", [])
|
|
441
527
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
528
|
+
compressor = getattr(self, "_compressor", None)
|
|
529
|
+
if compressor is None:
|
|
530
|
+
from ..compact.compressor import ContextCompressor
|
|
531
|
+
compressor = ContextCompressor(
|
|
532
|
+
max_tokens=150_000,
|
|
533
|
+
provider=self._provider,
|
|
534
|
+
session_manager=self._session_manager,
|
|
535
|
+
)
|
|
536
|
+
self._compressor = compressor
|
|
445
537
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
538
|
+
prompt_tokens = total_usage.prompt_tokens if total_usage else 0
|
|
539
|
+
check = compressor.check_needs_compact(prompt_tokens=prompt_tokens)
|
|
540
|
+
if not check.needed:
|
|
541
|
+
return
|
|
449
542
|
|
|
450
|
-
|
|
543
|
+
self._check_hooks("before_compact")
|
|
544
|
+
self._round_count = 0
|
|
451
545
|
|
|
452
|
-
|
|
546
|
+
current_tool_results: List[ChatMessage] = [
|
|
547
|
+
m for m in base_messages[new_messages_start_index:]
|
|
548
|
+
if m.role == "tool" or (m.role == "assistant" and m.tool_calls)
|
|
549
|
+
]
|
|
453
550
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
if hasattr(self, "_injected_user_message") and self._injected_user_message:
|
|
457
|
-
self._base_messages.append(ChatMessage(
|
|
458
|
-
role="user",
|
|
459
|
-
content=self._injected_user_message,
|
|
460
|
-
))
|
|
461
|
-
self._original_user_index = 0
|
|
551
|
+
try:
|
|
552
|
+
result = await compressor.compact(session_id)
|
|
462
553
|
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
554
|
+
if result.success:
|
|
555
|
+
injected = getattr(self, "_injected_user_message", "")
|
|
556
|
+
new_base: List[ChatMessage] = []
|
|
557
|
+
if injected:
|
|
558
|
+
new_base.append(ChatMessage(role="user", content=injected))
|
|
559
|
+
self._original_user_index = 0 if new_base else None
|
|
560
|
+
|
|
561
|
+
session = self._session_manager.get(session_id)
|
|
562
|
+
summary_index = (session or {}).get("summary_message_index")
|
|
563
|
+
summary_msgs = self._session_manager.get_messages_for_ai(
|
|
564
|
+
session_id, summary_index=summary_index
|
|
565
|
+
)
|
|
566
|
+
for m in summary_msgs:
|
|
567
|
+
if m.get("role") == "system":
|
|
568
|
+
continue
|
|
569
|
+
new_base.append(self._history_to_chat_message(m))
|
|
467
570
|
|
|
468
|
-
|
|
571
|
+
new_base.extend(current_tool_results)
|
|
572
|
+
base_messages.clear()
|
|
573
|
+
base_messages.extend(new_base)
|
|
574
|
+
self._base_messages = base_messages
|
|
469
575
|
|
|
470
576
|
if on_compact:
|
|
471
577
|
on_compact({
|
|
472
|
-
"
|
|
473
|
-
"
|
|
474
|
-
"threshold": check.threshold,
|
|
578
|
+
"beforeTokens": check.current_tokens,
|
|
579
|
+
"afterTokens": result.tokens_after,
|
|
475
580
|
"summary": result.summary,
|
|
476
581
|
})
|
|
477
|
-
except Exception:
|
|
478
|
-
|
|
582
|
+
except Exception as e:
|
|
583
|
+
logger.warning("[AutoCompact] Error: %s", e)
|
|
584
|
+
|
|
585
|
+
def _history_to_chat_message(self, msg: dict) -> ChatMessage:
|
|
586
|
+
"""历史记录中的 dict → ChatMessage(仅支持 assistant/user/tool)。"""
|
|
587
|
+
role = msg.get("role", "")
|
|
588
|
+
content = msg.get("content", "")
|
|
589
|
+
tool_calls = None
|
|
590
|
+
if role == "assistant":
|
|
591
|
+
try:
|
|
592
|
+
parsed = json.loads(content)
|
|
593
|
+
if isinstance(parsed, dict) and parsed.get("type") == "assistant_with_tools":
|
|
594
|
+
tool_calls = parsed.get("toolCalls")
|
|
595
|
+
content = ""
|
|
596
|
+
except (json.JSONDecodeError, TypeError, ValueError):
|
|
597
|
+
pass
|
|
598
|
+
return ChatMessage(
|
|
599
|
+
role=role,
|
|
600
|
+
content=content,
|
|
601
|
+
tool_call_id=msg.get("tool_call_id") if role == "tool" else None,
|
|
602
|
+
tool_calls=tool_calls,
|
|
603
|
+
)
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"""SummarizerAgent:会话压缩总结(Python 3.6 兼容)。
|
|
2
|
+
|
|
3
|
+
行为对齐 txcode `summarizer.agent.ts:compact`:
|
|
4
|
+
- /compact user 占位消息(keep_context=True)
|
|
5
|
+
- 过滤 role=='tool' 且 JSON 解析后 type=='tool_result' 的消息
|
|
6
|
+
- assistant_with_tools 反向解包 text/content,tool_result 反向解包 output
|
|
7
|
+
- provider.chat(messages)(max_tokens 由 Provider 内部硬编码,不在此处传参)
|
|
8
|
+
- 摘要写入 assistant(keep_context=True)后 update_summary + reset_tokens
|
|
9
|
+
- tokens_after = round(tokens_before * 0.3)
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
import json
|
|
13
|
+
from typing import Any, Optional
|
|
14
|
+
|
|
15
|
+
from ..._compat.dataclasses import dataclass
|
|
16
|
+
from ..._compat.resources import get_resource
|
|
17
|
+
from ...provider.base import BaseProvider
|
|
18
|
+
from ...types import ChatMessage
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@dataclass
|
|
22
|
+
class CompactCheck:
|
|
23
|
+
needed: bool
|
|
24
|
+
current_tokens: int
|
|
25
|
+
threshold: int
|
|
26
|
+
reason: str = ""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@dataclass
|
|
30
|
+
class CompactResult:
|
|
31
|
+
success: bool
|
|
32
|
+
summary: str = ""
|
|
33
|
+
tokens_before: int = 0
|
|
34
|
+
tokens_after: int = 0
|
|
35
|
+
error: Optional[str] = None
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class SummarizerAgent:
|
|
39
|
+
def __init__(self, provider: BaseProvider, max_tokens: int = 150_000):
|
|
40
|
+
self._provider = provider
|
|
41
|
+
self._max_tokens = max_tokens
|
|
42
|
+
|
|
43
|
+
def check_needs_compact(self, session_data: Optional[dict], additional_tokens: int = 0) -> CompactCheck:
|
|
44
|
+
if not session_data:
|
|
45
|
+
return CompactCheck(needed=False, current_tokens=0, threshold=self._max_tokens, reason="No session")
|
|
46
|
+
|
|
47
|
+
prompt = session_data.get("prompt_tokens", 0)
|
|
48
|
+
completion = session_data.get("completion_tokens", 0)
|
|
49
|
+
total = prompt + completion + additional_tokens
|
|
50
|
+
threshold = self._max_tokens
|
|
51
|
+
needed = total >= threshold
|
|
52
|
+
return CompactCheck(
|
|
53
|
+
needed=needed,
|
|
54
|
+
current_tokens=total,
|
|
55
|
+
threshold=threshold,
|
|
56
|
+
reason="Above threshold" if needed else "Below threshold",
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
async def compact(self, session_manager: Any, session_id: str) -> CompactResult:
|
|
60
|
+
try:
|
|
61
|
+
session = session_manager.get(session_id)
|
|
62
|
+
if not session:
|
|
63
|
+
return CompactResult(success=False, error="Session not found")
|
|
64
|
+
|
|
65
|
+
summary_index = session.get("summary_message_index")
|
|
66
|
+
msgs = session_manager.get_messages_for_ai(session_id, summary_index=summary_index)
|
|
67
|
+
if not msgs:
|
|
68
|
+
return CompactResult(success=False, error="No messages to compact")
|
|
69
|
+
|
|
70
|
+
tokens_before = (
|
|
71
|
+
session.get("prompt_tokens", 0) + session.get("completion_tokens", 0)
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
session_manager.add_message(
|
|
75
|
+
session_id, "user", "/compact", keep_context=True,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
chat_messages: list = []
|
|
79
|
+
for m in msgs:
|
|
80
|
+
role = m.get("role")
|
|
81
|
+
content = m.get("content", "")
|
|
82
|
+
if role == "tool":
|
|
83
|
+
continue
|
|
84
|
+
try:
|
|
85
|
+
parsed = json.loads(content)
|
|
86
|
+
if isinstance(parsed, dict):
|
|
87
|
+
ptype = parsed.get("type")
|
|
88
|
+
if ptype == "tool_result":
|
|
89
|
+
continue
|
|
90
|
+
if ptype == "assistant_with_tools":
|
|
91
|
+
content = parsed.get("text") or parsed.get("content") or content
|
|
92
|
+
elif ptype == "tool_result":
|
|
93
|
+
content = parsed.get("output") or content
|
|
94
|
+
except (json.JSONDecodeError, TypeError, ValueError):
|
|
95
|
+
pass
|
|
96
|
+
chat_messages.append(ChatMessage(role=role, content=content))
|
|
97
|
+
|
|
98
|
+
if not chat_messages:
|
|
99
|
+
return CompactResult(
|
|
100
|
+
success=False, error="No messages to compact after filter",
|
|
101
|
+
tokens_before=tokens_before, tokens_after=tokens_before,
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
role_template = get_resource(
|
|
105
|
+
"txcode_sdk.agent.summarizer.prompts", "role.txt"
|
|
106
|
+
)
|
|
107
|
+
chat_messages.append(ChatMessage(role="user", content=role_template))
|
|
108
|
+
|
|
109
|
+
response = await self._provider.chat(chat_messages)
|
|
110
|
+
summary = (getattr(response, "content", "") or "").strip()
|
|
111
|
+
if not summary:
|
|
112
|
+
return CompactResult(
|
|
113
|
+
success=False, error="Empty summary",
|
|
114
|
+
tokens_before=tokens_before, tokens_after=tokens_before,
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
summary_index = session_manager.add_message(
|
|
118
|
+
session_id, "assistant", summary, keep_context=True,
|
|
119
|
+
)
|
|
120
|
+
session_manager.update_summary(session_id, summary_index)
|
|
121
|
+
session_manager.reset_tokens(session_id)
|
|
122
|
+
|
|
123
|
+
return CompactResult(
|
|
124
|
+
success=True,
|
|
125
|
+
summary=summary,
|
|
126
|
+
tokens_before=tokens_before,
|
|
127
|
+
tokens_after=int(round(tokens_before * 0.3)),
|
|
128
|
+
)
|
|
129
|
+
except Exception as e:
|
|
130
|
+
return CompactResult(success=False, error=str(e))
|