txcode-sdk 0.8.0__tar.gz → 0.9.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.8.0/src/txcode_sdk.egg-info → txcode_sdk-0.9.0}/PKG-INFO +1 -1
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/pyproject.toml +1 -1
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/bash.py +74 -31
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/grep.py +18 -4
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0/src/txcode_sdk.egg-info}/PKG-INFO +1 -1
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_tools.py +704 -594
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/LICENSE +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/README.md +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/setup.cfg +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/setup.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/example/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/example/code_example.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/example/code_session.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/example/code_tool.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/example/constants.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/example/query_session.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/example/ws_server.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/_compat/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/_compat/dataclasses.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/_compat/resources.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/base_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/chat/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/chat/agent_tool.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/chat/chat_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/chat/prompts/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/chat/prompts/role.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/code/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/code/agent_tool.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/code/code_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/code/prompts/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/code/prompts/role.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/common/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/common/common_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/common/prompt/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/common/prompt/role.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/design/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/design/agent_tool.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/design/design_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/design/prompts/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/design/prompts/role.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/discuss/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/discuss/agent_tool.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/discuss/discuss_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/discuss/prompts/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/discuss/prompts/role.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/dream/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/dream/agent_tool.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/dream/dream_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/dream/prompts/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/dream/prompts/role.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/mem/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/mem/agent_tool.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/mem/mem_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/mem/prompts/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/mem/prompts/role.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/name/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/name/name_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/name/prompts/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/name/prompts/role.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/plan/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/plan/agent_tool.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/plan/plan_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/plan/prompts/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/plan/prompts/role.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/shell/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/shell/agent_tool.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/shell/prompts/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/shell/prompts/role.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/shell/shell_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/skill/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/skill/agent_tool.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/skill/prompts/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/skill/prompts/role.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/skill/skill_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/summarizer/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/summarizer/prompts/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/summarizer/prompts/role.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/summarizer/summarizer_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/task/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/task/agent_tool.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/task/prompts/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/task/prompts/role.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/task/task_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/test/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/test/agent_tool.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/test/prompts/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/test/prompts/role.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/test/test_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/agent/tool_registry.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/client.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/compact/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/compact/compressor.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/hooks/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/hooks/handlers/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/hooks/handlers/base.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/hooks/handlers/memory.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/hooks/processor.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/hooks/queue.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/hooks/types.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/provider/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/provider/base.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/provider/deepseek_provider.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/provider/openai_provider.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/provider/router.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/provider/txcode_ai.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/server/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/server/__main__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/server/config_store.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/server/handler.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/server/http.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/server/hub_client.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/server/json_store.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/server/plan_code.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/server/project_manager.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/server/provider_config.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/server/server.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/server/skill_manager.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/server/spec_manager.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/server/websocket.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/server/zip_utils.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/session/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/session/manager.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/skills/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/specs/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/__init__.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/_util.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/bash.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/bash_tool.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/code_search.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/code_search.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/edit_file.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/edit_file.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/email_tool.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/email_tool.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/glob.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/glob.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/glob_tool.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/grep.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/grep_tool.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/memory.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/memory.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/memory_tool.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/read_file.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/read_file.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/skill_tool.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/skill_tool.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/todo_read.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/todo_read.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/todo_write.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/todo_write.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/web_fetch.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/web_fetch.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/web_search.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/web_search.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/web_shell_exec.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/web_shell_exec.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/write_file.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/tools/write_file.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk/types.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk.egg-info/SOURCES.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk.egg-info/dependency_links.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk.egg-info/entry_points.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/src/txcode_sdk.egg-info/top_level.txt +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_cli.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_client.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_compat.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_deepseek_provider.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_design_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_discuss_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_dream_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_http_api.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_http_ext_api.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_json_store.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_name_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_plan_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_project_manager.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_provider_config.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_provider_model.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_session.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_session_query.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_shell_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_skill_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_test_agent.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_txcode_ai.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_websocket_protocol.py +0 -0
- {txcode_sdk-0.8.0 → txcode_sdk-0.9.0}/tests/test_ws_server.py +0 -0
|
@@ -10,6 +10,7 @@ import asyncio
|
|
|
10
10
|
import os
|
|
11
11
|
import signal
|
|
12
12
|
import sys
|
|
13
|
+
import time
|
|
13
14
|
|
|
14
15
|
from ..types import Tool, ToolContext, ToolResult
|
|
15
16
|
from .._compat.resources import get_resource
|
|
@@ -101,6 +102,36 @@ def _truncate_output(output: str) -> str:
|
|
|
101
102
|
return output
|
|
102
103
|
|
|
103
104
|
|
|
105
|
+
def _exceeds_limits(output: str) -> bool:
|
|
106
|
+
if len(output.encode("utf-8", errors="replace")) > MAX_BYTES:
|
|
107
|
+
return True
|
|
108
|
+
if len(output.split("\n")) > MAX_LINES:
|
|
109
|
+
return True
|
|
110
|
+
return False
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
async def _read_stream(stream, limit, kill_cb):
|
|
114
|
+
"""逐 chunk 读取子进程输出流,累计超过 limit 后截断并触发 kill_cb(对齐 TS 流式截断)。"""
|
|
115
|
+
chunks = []
|
|
116
|
+
total = 0
|
|
117
|
+
exceeded = False
|
|
118
|
+
try:
|
|
119
|
+
while True:
|
|
120
|
+
chunk = await stream.read(8192)
|
|
121
|
+
if not chunk:
|
|
122
|
+
break
|
|
123
|
+
if total + len(chunk) > limit:
|
|
124
|
+
chunks.append(chunk[: limit - total])
|
|
125
|
+
exceeded = True
|
|
126
|
+
await kill_cb()
|
|
127
|
+
break
|
|
128
|
+
chunks.append(chunk)
|
|
129
|
+
total += len(chunk)
|
|
130
|
+
except Exception:
|
|
131
|
+
pass
|
|
132
|
+
return b"".join(chunks), exceeded
|
|
133
|
+
|
|
134
|
+
|
|
104
135
|
async def _bash(params: dict, ctx: ToolContext) -> ToolResult:
|
|
105
136
|
command = params.get("command", "")
|
|
106
137
|
if not command:
|
|
@@ -124,38 +155,40 @@ async def _bash(params: dict, ctx: ToolContext) -> ToolResult:
|
|
|
124
155
|
except Exception as e:
|
|
125
156
|
return ToolResult(success=False, output="", error=str(e))
|
|
126
157
|
|
|
127
|
-
|
|
128
|
-
|
|
158
|
+
async def kill_cb():
|
|
159
|
+
await _kill_tree(proc)
|
|
160
|
+
|
|
161
|
+
read_out = asyncio.ensure_future(_read_stream(proc.stdout, MAX_BYTES, kill_cb))
|
|
162
|
+
read_err = asyncio.ensure_future(_read_stream(proc.stderr, MAX_BYTES, kill_cb))
|
|
163
|
+
wait_exit = asyncio.ensure_future(proc.wait())
|
|
164
|
+
|
|
129
165
|
abort_task = None
|
|
130
166
|
if ctx.abort_signal is not None:
|
|
131
167
|
abort_task = asyncio.ensure_future(_wait_abort(ctx.abort_signal))
|
|
132
|
-
tasks.append(abort_task)
|
|
133
168
|
|
|
134
169
|
timed_out = False
|
|
135
170
|
aborted = False
|
|
136
171
|
try:
|
|
172
|
+
waiters = [wait_exit]
|
|
137
173
|
if abort_task is not None:
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
try:
|
|
147
|
-
await asyncio.wait_for(comm, timeout=timeout / 1000.0)
|
|
148
|
-
except asyncio.TimeoutError:
|
|
149
|
-
timed_out = True
|
|
174
|
+
waiters.append(abort_task)
|
|
175
|
+
done, _pending = await asyncio.wait(
|
|
176
|
+
waiters, timeout=timeout / 1000.0, return_when=asyncio.FIRST_COMPLETED
|
|
177
|
+
)
|
|
178
|
+
if abort_task is not None and abort_task in done:
|
|
179
|
+
aborted = True
|
|
180
|
+
elif wait_exit not in done:
|
|
181
|
+
timed_out = True
|
|
150
182
|
except Exception:
|
|
151
183
|
aborted = True
|
|
152
184
|
|
|
153
185
|
if timed_out or aborted:
|
|
154
186
|
await _kill_tree(proc)
|
|
187
|
+
for t in (read_out, read_err):
|
|
188
|
+
if not t.done():
|
|
189
|
+
t.cancel()
|
|
155
190
|
try:
|
|
156
|
-
await asyncio.
|
|
157
|
-
except asyncio.CancelledError:
|
|
158
|
-
pass
|
|
191
|
+
await asyncio.wait([read_out, read_err, wait_exit], timeout=5)
|
|
159
192
|
except Exception:
|
|
160
193
|
pass
|
|
161
194
|
if timed_out:
|
|
@@ -171,27 +204,37 @@ async def _bash(params: dict, ctx: ToolContext) -> ToolResult:
|
|
|
171
204
|
)
|
|
172
205
|
|
|
173
206
|
try:
|
|
174
|
-
|
|
207
|
+
await asyncio.wait([read_out, read_err], timeout=10)
|
|
208
|
+
except Exception:
|
|
209
|
+
pass
|
|
210
|
+
try:
|
|
211
|
+
stdout_raw, out_exceeded = read_out.result()
|
|
212
|
+
except Exception:
|
|
213
|
+
stdout_raw, out_exceeded = b"", False
|
|
214
|
+
try:
|
|
215
|
+
stderr_raw, err_exceeded = read_err.result()
|
|
175
216
|
except Exception:
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
217
|
+
stderr_raw, err_exceeded = b"", False
|
|
218
|
+
|
|
219
|
+
out = stdout_raw.decode("utf-8", errors="replace")
|
|
220
|
+
err = stderr_raw.decode("utf-8", errors="replace")
|
|
221
|
+
raw = out
|
|
180
222
|
if err:
|
|
181
|
-
|
|
182
|
-
|
|
223
|
+
raw += ("\n" if raw else "") + err
|
|
224
|
+
truncated = out_exceeded or err_exceeded or _exceeds_limits(raw)
|
|
225
|
+
output = _truncate_output(raw)
|
|
226
|
+
if (out_exceeded or err_exceeded) and "[output truncated" not in output:
|
|
227
|
+
output += "\n\n[output truncated - exceeded {} bytes]".format(MAX_BYTES)
|
|
183
228
|
if not output:
|
|
184
229
|
output = "命令执行成功(无输出)"
|
|
185
230
|
return ToolResult(
|
|
186
|
-
success=proc.returncode == 0,
|
|
231
|
+
success=(proc.returncode == 0) or out_exceeded or err_exceeded,
|
|
187
232
|
output=output,
|
|
188
233
|
metadata={
|
|
189
234
|
"exitCode": proc.returncode,
|
|
190
|
-
"
|
|
191
|
-
"
|
|
192
|
-
"
|
|
193
|
-
"workdir": workdir,
|
|
194
|
-
"shell": shell,
|
|
235
|
+
"truncated": truncated,
|
|
236
|
+
"stdoutBytes": len(stdout_raw),
|
|
237
|
+
"stderrBytes": len(stderr_raw),
|
|
195
238
|
},
|
|
196
239
|
)
|
|
197
240
|
|
|
@@ -7,6 +7,10 @@ from typing import List, Tuple
|
|
|
7
7
|
from ..types import Tool, ToolContext, ToolResult
|
|
8
8
|
from .._compat.resources import get_resource
|
|
9
9
|
|
|
10
|
+
MAX_RESULTS = 100
|
|
11
|
+
MAX_LINE_LENGTH = 200
|
|
12
|
+
IGNORE_DIRS = {"node_modules", ".git", "dist", "build", ".next", "coverage", ".cache"}
|
|
13
|
+
|
|
10
14
|
|
|
11
15
|
def _grep_tool_desc() -> str:
|
|
12
16
|
return get_resource("txcode_sdk.tools", "grep.txt")
|
|
@@ -48,7 +52,7 @@ def _iter_files(base: Path, include: List[str], exclude: List[str], recursive: b
|
|
|
48
52
|
continue
|
|
49
53
|
for e in entries:
|
|
50
54
|
if e.is_dir():
|
|
51
|
-
if recursive:
|
|
55
|
+
if recursive and e.name not in IGNORE_DIRS and not e.name.startswith("."):
|
|
52
56
|
stack.append(e)
|
|
53
57
|
continue
|
|
54
58
|
name = e.name
|
|
@@ -88,6 +92,7 @@ async def _grep(params: dict, ctx: ToolContext) -> ToolResult:
|
|
|
88
92
|
exclude_list = [exclude] if isinstance(exclude, str) else (exclude or [])
|
|
89
93
|
|
|
90
94
|
matches: List[Tuple[str, int, str]] = []
|
|
95
|
+
truncated = False
|
|
91
96
|
for fp in _iter_files(base, include_list, exclude_list, recursive):
|
|
92
97
|
if _is_binary(fp):
|
|
93
98
|
continue
|
|
@@ -98,19 +103,28 @@ async def _grep(params: dict, ctx: ToolContext) -> ToolResult:
|
|
|
98
103
|
continue
|
|
99
104
|
for i, line in enumerate(lines):
|
|
100
105
|
if rx.search(line):
|
|
101
|
-
matches.append((str(fp), i + 1, line))
|
|
106
|
+
matches.append((str(fp), i + 1, line[:MAX_LINE_LENGTH]))
|
|
107
|
+
if len(matches) >= MAX_RESULTS:
|
|
108
|
+
truncated = True
|
|
109
|
+
break
|
|
110
|
+
if truncated:
|
|
111
|
+
break
|
|
102
112
|
|
|
103
113
|
if not matches:
|
|
104
114
|
return ToolResult(
|
|
105
115
|
success=True,
|
|
106
116
|
output="No matches found for pattern: {}".format(pattern),
|
|
107
|
-
metadata={"matches": 0, "pattern": pattern},
|
|
117
|
+
metadata={"matches": 0, "truncated": False, "pattern": pattern},
|
|
108
118
|
)
|
|
109
119
|
|
|
110
120
|
output = "Found {} matches:\n".format(len(matches))
|
|
111
121
|
output += "\n".join("{}:{}:{}".format(fp, ln, line) for fp, ln, line in matches)
|
|
122
|
+
if truncated:
|
|
123
|
+
output += "\n[output truncated - showing first {} matches]".format(MAX_RESULTS)
|
|
112
124
|
return ToolResult(
|
|
113
|
-
success=True,
|
|
125
|
+
success=True,
|
|
126
|
+
output=output,
|
|
127
|
+
metadata={"matches": len(matches), "truncated": truncated, "pattern": pattern},
|
|
114
128
|
)
|
|
115
129
|
|
|
116
130
|
|