sycommon-python-lib 0.2.6a3__tar.gz → 0.2.6a5__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.
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/PKG-INFO +10 -9
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/pyproject.toml +10 -9
- sycommon_python_lib-0.2.6a5/src/sycli/acp/__init__.py +48 -0
- sycommon_python_lib-0.2.6a5/src/sycli/acp/config.py +112 -0
- sycommon_python_lib-0.2.6a5/src/sycli/acp/executor.py +332 -0
- sycommon_python_lib-0.2.6a5/src/sycli/acp/registry.py +155 -0
- sycommon_python_lib-0.2.6a5/src/sycli/acp/server.py +69 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/cli.py +11 -0
- sycommon_python_lib-0.2.6a5/src/sycli/commands/acp_cmd.py +116 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/agent/deep_agent.py +13 -1
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/agent/summarization_utils.py +62 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/llm/token_utils.py +8 -1
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon_python_lib.egg-info/PKG-INFO +10 -9
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon_python_lib.egg-info/SOURCES.txt +6 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon_python_lib.egg-info/requires.txt +9 -8
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/README.md +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/setup.cfg +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/cli.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/core/console.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/core/models.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/core/project.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/core/utils.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/agent/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/agent/main_agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/agent/nodes/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/agent/nodes/example_node.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/agent/states/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/agent/states/agent_state.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/api/query.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/api/sse/agent.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/db/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/db/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/db/model/entity.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/db/service.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/model/parse.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/agent/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/base/.env.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/base/.gitignore.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/base/Dockerfile.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/base/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/base/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/base/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/base/app.yaml.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/base/client/FileServiceClient.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/base/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/base/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/base/model/file_info.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/base/requirements.txt.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/cli/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/cli/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/cli/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/cli/commands/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/cli/commands/hello.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/cli/pyproject.toml.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/cli/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/web/README.md.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/web/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/web/api/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/web/api/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/web/api/sse/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/web/api/sse/echo.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/web/app.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/web/client/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/web/model/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/web/tools/__init__.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/command/templates/web/tools/mq.py.tpl +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/nexus/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/__main__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/agents/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/agents/factory.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/agents/prompts.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/cdp/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/cdp/browser.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/cdp/capabilities/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/cdp/capabilities/console.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/cdp/capabilities/dom.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/cdp/capabilities/network.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/cdp/capabilities/page_errors.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/cdp/capabilities/performance.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/cdp/capabilities/screenshot.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/cdp/client.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/cdp/protocol.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/cdp/repl.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/commands/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/commands/cdp_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/commands/chat_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/commands/create_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/commands/evaluate_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/commands/init_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/commands/memory_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/commands/resume_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/commands/rollback_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/commands/run_cmd.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/core/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/core/backend.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/core/config.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/core/display.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/core/git_integration.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/core/llm.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/core/state.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/evaluate/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/evaluate/api_evaluator.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/memory/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/memory/compressor.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/memory/full.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/memory/hot.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/memory/manager.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/memory/warm.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/mode/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/mode/create.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/mode/optimize.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/models/config_models.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/rl/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/rl/baseline_tests.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/rl/checkpoint.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/rl/convergence.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/rl/diagnosis.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/rl/engine.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/rl/environment.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/rl/experience.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/rl/harness_prompts.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/rl/history.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/rl/optimization_logger.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/rl/pre_validation.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/rl/reward.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/rl/strategy_bandit.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/rl/strategy_generator.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/rl/strategy_prompts.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycli/skills/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/agent/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/agent/agent_manager.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/agent/chat_events.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/agent/mcp/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/agent/mcp/models.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/agent/mcp/tool_loader.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/agent/multi_agent_team.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/agent/sandbox/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/agent/sandbox/consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/agent/sandbox/file_ops.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/agent/sandbox/http_sandbox_backend.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/agent/sandbox/minio_sync.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/agent/sandbox/sandbox_pool.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/agent/sandbox/sandbox_recovery.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/agent/sandbox/session.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/auth/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/auth/ldap_service.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/auth/oa_cache.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/auth/oa_crypto.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/auth/oa_service.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/auth/wecom_ldap_service.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/config/Config.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/config/DatabaseConfig.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/config/ElasticsearchConfig.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/config/EmbeddingConfig.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/config/LLMConfig.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/config/LangfuseConfig.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/config/MQConfig.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/config/PgConfig.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/config/RedisConfig.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/config/RerankerConfig.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/config/SentryConfig.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/config/XxlJobConfig.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/config/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/database/async_base_db_service.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/database/async_database_service.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/database/base_db_service.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/database/database_service.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/database/elasticsearch_service.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/database/pg_checkpoint_service.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/database/redis_service.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/database/token_usage_db_service.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/health/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/health/health_check.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/health/metrics.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/health/ping.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/heartbeat_process/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/heartbeat_process/heartbeat_config.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/heartbeat_process/heartbeat_process_manager.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/heartbeat_process/heartbeat_process_worker.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/llm/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/llm/embedding.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/llm/get_llm.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/llm/llm_logger.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/llm/llm_tokens.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/llm/llm_with_token_tracking.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/llm/native_with_fallback_runnable.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/llm/output_fixing_runnable.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/llm/struct_token.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/llm/sy_langfuse.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/llm/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4 +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/llm/tiktoken_cache/fb374d419588a4632f3f557e76b4b70aebbca790 +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/llm/token_usage_es_service.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/llm/token_usage_mysql_service.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/llm/usage_token.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/logging/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/logging/async_sql_logger.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/logging/kafka_log.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/logging/logger_levels.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/logging/logger_wrapper.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/logging/process_logger.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/logging/sql_logger.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/mcp_server/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/mcp_server/server.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/middleware/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/middleware/context.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/middleware/cors.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/middleware/docs.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/middleware/exception.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/middleware/middleware.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/middleware/monitor_memory.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/middleware/mq.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/middleware/sandbox.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/middleware/timeout.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/middleware/token_tracking.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/middleware/tool_result_truncation.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/middleware/traceid.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/models/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/models/base_http.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/models/log.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/models/mcp_server_config.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/models/mqlistener_config.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/models/mqmsg_model.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/models/mqsend_config.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/models/sandbox.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/models/sso_user.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/models/token_usage.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/models/token_usage_mysql.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/models/xxljob_handler_config.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/notice/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/notice/uvicorn_monitor.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/notice/wecom_message.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/rabbitmq/process_pool_consumer.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/rabbitmq/rabbitmq_client.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/rabbitmq/rabbitmq_pool.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/rabbitmq/rabbitmq_service.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/rabbitmq/rabbitmq_service_client_manager.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/rabbitmq/rabbitmq_service_connection_monitor.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/rabbitmq/rabbitmq_service_consumer_manager.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/rabbitmq/rabbitmq_service_core.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/rabbitmq/rabbitmq_service_producer_manager.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/sentry/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/sentry/sy_sentry.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/services.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/sse/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/sse/event.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/sse/sse.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/synacos/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/synacos/example.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/synacos/example2.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/synacos/feign.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/synacos/feign_client.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/synacos/nacos_client_base.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/synacos/nacos_config_manager.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/synacos/nacos_heartbeat_manager.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/synacos/nacos_service.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/synacos/nacos_service_discovery.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/synacos/nacos_service_registration.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/synacos/param.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tests/deep_agent_server.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tests/test_consistent_hash.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tests/test_consumer_loss_rootcause.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tests/test_consumer_recovery.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tests/test_deep_agent.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tests/test_dynamic_max_tokens.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tests/test_email.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tests/test_encoding_cache.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tests/test_fix_verification.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tests/test_mcp_server.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tests/test_minimax_reasoning.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tests/test_mq.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tests/test_oa_login.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tests/test_real_summarization.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tests/test_summarization_config.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tests/test_summarization_real.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tests/test_summary_leak_e2e.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tools/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tools/async_utils.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tools/docs.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tools/env.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tools/merge_headers.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tools/snowflake.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tools/syemail.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/tools/timing.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/xxljob/__init__.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon/xxljob/xxljob_service.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon_python_lib.egg-info/dependency_links.txt +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon_python_lib.egg-info/entry_points.txt +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/src/sycommon_python_lib.egg-info/top_level.txt +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/tests/test_asyncio_logging.py +0 -0
- {sycommon_python_lib-0.2.6a3 → sycommon_python_lib-0.2.6a5}/tests/test_sycli.py +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sycommon-python-lib
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6a5
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
7
7
|
Requires-Dist: aio-pika==9.6.2
|
|
8
|
-
Requires-Dist: aiohttp==3.
|
|
8
|
+
Requires-Dist: aiohttp==3.14.1
|
|
9
9
|
Requires-Dist: aiomysql==0.3.2
|
|
10
10
|
Requires-Dist: anyio==4.13.0
|
|
11
11
|
Requires-Dist: decorator==5.3.1
|
|
@@ -13,9 +13,9 @@ Requires-Dist: deepagents==0.6.8
|
|
|
13
13
|
Requires-Dist: elasticsearch==9.4.1
|
|
14
14
|
Requires-Dist: fastapi==0.136.3
|
|
15
15
|
Requires-Dist: jinja2==3.1.6
|
|
16
|
-
Requires-Dist: kafka-python==2.3.
|
|
17
|
-
Requires-Dist: langchain==1.3.
|
|
18
|
-
Requires-Dist: langchain-core==1.4.
|
|
16
|
+
Requires-Dist: kafka-python==2.3.2
|
|
17
|
+
Requires-Dist: langchain==1.3.7
|
|
18
|
+
Requires-Dist: langchain-core==1.4.6
|
|
19
19
|
Requires-Dist: langchain-openai==1.2.2
|
|
20
20
|
Requires-Dist: langfuse==4.7.1
|
|
21
21
|
Requires-Dist: langgraph==1.2.4
|
|
@@ -29,20 +29,21 @@ Requires-Dist: psutil==7.2.2
|
|
|
29
29
|
Requires-Dist: pyxxl==0.4.7
|
|
30
30
|
Requires-Dist: pydantic==2.13.4
|
|
31
31
|
Requires-Dist: python-dotenv==1.2.2
|
|
32
|
-
Requires-Dist: python-multipart==0.0.
|
|
32
|
+
Requires-Dist: python-multipart==0.0.32
|
|
33
33
|
Requires-Dist: pyyaml==6.0.3
|
|
34
34
|
Requires-Dist: redis==7.4.0
|
|
35
|
-
Requires-Dist: sentry-sdk[fastapi]==2.
|
|
35
|
+
Requires-Dist: sentry-sdk[fastapi]==2.62.0
|
|
36
36
|
Requires-Dist: sqlalchemy[asyncio]==2.0.50
|
|
37
|
-
Requires-Dist: starlette[full]==1.
|
|
37
|
+
Requires-Dist: starlette[full]==1.3.0
|
|
38
38
|
Requires-Dist: tiktoken==0.13.0
|
|
39
|
-
Requires-Dist: uvicorn==0.
|
|
39
|
+
Requires-Dist: uvicorn==0.49.0
|
|
40
40
|
Requires-Dist: wecom-aibot-python-sdk==1.0.2
|
|
41
41
|
Requires-Dist: twine==6.2.0
|
|
42
42
|
Requires-Dist: minio==7.2.20
|
|
43
43
|
Requires-Dist: langchain-mcp-adapters==0.2.2
|
|
44
44
|
Requires-Dist: fastapi-mcp==0.4.0
|
|
45
45
|
Requires-Dist: psycopg[binary,pool]==3.3.4
|
|
46
|
+
Requires-Dist: acp-sdk>=1.0.3
|
|
46
47
|
|
|
47
48
|
# sycommon-python-lib
|
|
48
49
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "sycommon-python-lib"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.6a5"
|
|
4
4
|
description = "Add your description here"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
7
7
|
dependencies = [
|
|
8
8
|
"aio-pika==9.6.2",
|
|
9
|
-
"aiohttp==3.
|
|
9
|
+
"aiohttp==3.14.1",
|
|
10
10
|
"aiomysql==0.3.2",
|
|
11
11
|
"anyio==4.13.0",
|
|
12
12
|
"decorator==5.3.1",
|
|
@@ -14,9 +14,9 @@ dependencies = [
|
|
|
14
14
|
"elasticsearch==9.4.1",
|
|
15
15
|
"fastapi==0.136.3",
|
|
16
16
|
"jinja2==3.1.6",
|
|
17
|
-
"kafka-python==2.3.
|
|
18
|
-
"langchain==1.3.
|
|
19
|
-
"langchain-core==1.4.
|
|
17
|
+
"kafka-python==2.3.2",
|
|
18
|
+
"langchain==1.3.7",
|
|
19
|
+
"langchain-core==1.4.6",
|
|
20
20
|
"langchain-openai==1.2.2",
|
|
21
21
|
"langfuse==4.7.1",
|
|
22
22
|
"langgraph==1.2.4",
|
|
@@ -30,20 +30,21 @@ dependencies = [
|
|
|
30
30
|
"pyxxl==0.4.7",
|
|
31
31
|
"pydantic==2.13.4",
|
|
32
32
|
"python-dotenv==1.2.2",
|
|
33
|
-
"python-multipart==0.0.
|
|
33
|
+
"python-multipart==0.0.32",
|
|
34
34
|
"pyyaml==6.0.3",
|
|
35
35
|
"redis==7.4.0",
|
|
36
|
-
"sentry-sdk[fastapi]==2.
|
|
36
|
+
"sentry-sdk[fastapi]==2.62.0",
|
|
37
37
|
"sqlalchemy[asyncio]==2.0.50",
|
|
38
|
-
"starlette[full]==1.
|
|
38
|
+
"starlette[full]==1.3.0",
|
|
39
39
|
"tiktoken==0.13.0",
|
|
40
|
-
"uvicorn==0.
|
|
40
|
+
"uvicorn==0.49.0",
|
|
41
41
|
"wecom-aibot-python-sdk==1.0.2",
|
|
42
42
|
"twine==6.2.0",
|
|
43
43
|
"minio==7.2.20",
|
|
44
44
|
"langchain-mcp-adapters==0.2.2",
|
|
45
45
|
"fastapi-mcp==0.4.0",
|
|
46
46
|
"psycopg[binary,pool]==3.3.4",
|
|
47
|
+
"acp-sdk>=1.0.3",
|
|
47
48
|
]
|
|
48
49
|
|
|
49
50
|
[tool.setuptools]
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"""ACP (Agent Communication Protocol) support for sycli.
|
|
2
|
+
|
|
3
|
+
Dynamically exposes local CLI tools as ACP agents.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# Patch uvicorn config type aliases for compatibility with uvicorn>=0.34
|
|
7
|
+
# acp-sdk uses uvicorn.config.LoopSetupType etc. which were removed in uvicorn 0.48+
|
|
8
|
+
import uvicorn.config as _uvicorn_config
|
|
9
|
+
|
|
10
|
+
_TYPE_ALIASES = (
|
|
11
|
+
"LoopSetupType",
|
|
12
|
+
"HTTPProtocolType",
|
|
13
|
+
"WSProtocolType",
|
|
14
|
+
"LifespanType",
|
|
15
|
+
"InterfaceType",
|
|
16
|
+
)
|
|
17
|
+
for _alias in _TYPE_ALIASES:
|
|
18
|
+
if not hasattr(_uvicorn_config, _alias):
|
|
19
|
+
setattr(_uvicorn_config, _alias, str)
|
|
20
|
+
|
|
21
|
+
if not hasattr(_uvicorn_config, "LOGGING_CONFIG"):
|
|
22
|
+
_uvicorn_config.LOGGING_CONFIG = {
|
|
23
|
+
"version": 1,
|
|
24
|
+
"disable_existing_loggers": False,
|
|
25
|
+
"formatters": {},
|
|
26
|
+
"handlers": {},
|
|
27
|
+
"loggers": {},
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
del _uvicorn_config, _TYPE_ALIASES, _alias
|
|
31
|
+
|
|
32
|
+
from sycli.acp.config import ACPConfig, ToolArgument, ToolDef
|
|
33
|
+
from sycli.acp.executor import build_cli_command, execute_command, stream_command
|
|
34
|
+
from sycli.acp.registry import CLIToolAgent, build_agents
|
|
35
|
+
from sycli.acp.server import create_acp_server, run_acp_server
|
|
36
|
+
|
|
37
|
+
__all__ = [
|
|
38
|
+
"ACPConfig",
|
|
39
|
+
"CLIToolAgent",
|
|
40
|
+
"ToolArgument",
|
|
41
|
+
"ToolDef",
|
|
42
|
+
"build_agents",
|
|
43
|
+
"build_cli_command",
|
|
44
|
+
"create_acp_server",
|
|
45
|
+
"execute_command",
|
|
46
|
+
"run_acp_server",
|
|
47
|
+
"stream_command",
|
|
48
|
+
]
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"""ACP configuration models.
|
|
2
|
+
|
|
3
|
+
Defines the Pydantic models for declaring which CLI tools to expose
|
|
4
|
+
as ACP agents. Configuration is loaded from a YAML or JSON file.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import json
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
import yaml
|
|
13
|
+
from pydantic import BaseModel, Field
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ToolArgument(BaseModel):
|
|
17
|
+
"""Definition of a named argument that the CLI tool accepts."""
|
|
18
|
+
|
|
19
|
+
name: str = Field(description="Argument name (used for key=value parsing)")
|
|
20
|
+
description: str = Field(default="", description="Human-readable description")
|
|
21
|
+
required: bool = Field(default=False, description="Whether this argument is required")
|
|
22
|
+
default: str | None = Field(default=None, description="Default value if not provided")
|
|
23
|
+
flag: str | None = Field(
|
|
24
|
+
default=None,
|
|
25
|
+
description="CLI flag (e.g. '--path', '-v'); None means positional",
|
|
26
|
+
)
|
|
27
|
+
separator: str = Field(
|
|
28
|
+
default=" ",
|
|
29
|
+
description="Separator between flag and value: ' ' for '--flag value', '=' for '--flag=value'",
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class ToolDef(BaseModel):
|
|
34
|
+
"""Definition of a single CLI tool to expose as an ACP agent."""
|
|
35
|
+
|
|
36
|
+
name: str = Field(description="ACP agent name")
|
|
37
|
+
command: str = Field(description="The actual CLI command to run")
|
|
38
|
+
description: str = Field(default="", description="Agent description for ACP discovery")
|
|
39
|
+
args: list[str] = Field(default_factory=list, description="Fixed arguments always appended")
|
|
40
|
+
tool_args: list[ToolArgument] = Field(
|
|
41
|
+
default_factory=list, description="Dynamic arguments mapped from ACP message input"
|
|
42
|
+
)
|
|
43
|
+
timeout: int = Field(default=120, description="Execution timeout in seconds")
|
|
44
|
+
working_dir: str | None = Field(default=None, description="Override working directory")
|
|
45
|
+
env: dict[str, str] = Field(default_factory=dict, description="Extra environment variables")
|
|
46
|
+
stream_output: bool = Field(default=True, description="Stream stdout line-by-line")
|
|
47
|
+
input_mode: str = Field(
|
|
48
|
+
default="args",
|
|
49
|
+
description="How to pass input: 'args' (parse into CLI args) | 'stdin' (pipe to stdin)",
|
|
50
|
+
)
|
|
51
|
+
output_content_type: str = Field(
|
|
52
|
+
default="text/plain", description="ACP content type for output"
|
|
53
|
+
)
|
|
54
|
+
allowed_exit_codes: list[int] = Field(
|
|
55
|
+
default_factory=lambda: [0], description="Exit codes considered success"
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class ACPConfig(BaseModel):
|
|
60
|
+
"""Root ACP server configuration."""
|
|
61
|
+
|
|
62
|
+
host: str = Field(default="127.0.0.1", description="Server bind host")
|
|
63
|
+
port: int = Field(default=8100, description="Server bind port")
|
|
64
|
+
tools: list[ToolDef] = Field(default_factory=list, description="Registered CLI tools")
|
|
65
|
+
global_timeout: int = Field(default=300, description="Global maximum execution timeout")
|
|
66
|
+
max_output_bytes: int = Field(
|
|
67
|
+
default=100_000, description="Maximum output size in bytes (matches sandbox.py)"
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
@classmethod
|
|
71
|
+
def load(cls, path: Path) -> ACPConfig:
|
|
72
|
+
"""Load ACP configuration from a YAML or JSON file.
|
|
73
|
+
|
|
74
|
+
Args:
|
|
75
|
+
path: Path to the configuration file.
|
|
76
|
+
|
|
77
|
+
Returns:
|
|
78
|
+
Parsed ACPConfig instance.
|
|
79
|
+
|
|
80
|
+
Raises:
|
|
81
|
+
FileNotFoundError: If the config file doesn't exist.
|
|
82
|
+
ValueError: If the file cannot be parsed.
|
|
83
|
+
"""
|
|
84
|
+
if not path.exists():
|
|
85
|
+
raise FileNotFoundError(f"ACP config file not found: {path}")
|
|
86
|
+
|
|
87
|
+
text = path.read_text(encoding="utf-8")
|
|
88
|
+
|
|
89
|
+
if path.suffix in (".yaml", ".yml"):
|
|
90
|
+
try:
|
|
91
|
+
data = yaml.safe_load(text)
|
|
92
|
+
except yaml.YAMLError as e:
|
|
93
|
+
raise ValueError(f"Failed to parse YAML config: {e}") from e
|
|
94
|
+
elif path.suffix == ".json":
|
|
95
|
+
try:
|
|
96
|
+
data = json.loads(text)
|
|
97
|
+
except json.JSONDecodeError as e:
|
|
98
|
+
raise ValueError(f"Failed to parse JSON config: {e}") from e
|
|
99
|
+
else:
|
|
100
|
+
# Try YAML first, then JSON
|
|
101
|
+
try:
|
|
102
|
+
data = yaml.safe_load(text)
|
|
103
|
+
except yaml.YAMLError:
|
|
104
|
+
try:
|
|
105
|
+
data = json.loads(text)
|
|
106
|
+
except json.JSONDecodeError as e:
|
|
107
|
+
raise ValueError(f"Failed to parse config file: {e}") from e
|
|
108
|
+
|
|
109
|
+
if not isinstance(data, dict):
|
|
110
|
+
raise ValueError("Config file must contain a mapping (dict)")
|
|
111
|
+
|
|
112
|
+
return cls.model_validate(data)
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
"""Async subprocess executor for ACP tool agents.
|
|
2
|
+
|
|
3
|
+
Provides command execution with process isolation, timeout handling,
|
|
4
|
+
output truncation, and line-by-line streaming — reusing patterns from
|
|
5
|
+
sycommon's sandbox service.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import asyncio
|
|
11
|
+
import os
|
|
12
|
+
import signal
|
|
13
|
+
import sys
|
|
14
|
+
from collections.abc import AsyncGenerator
|
|
15
|
+
from typing import TYPE_CHECKING
|
|
16
|
+
|
|
17
|
+
from pydantic import BaseModel
|
|
18
|
+
|
|
19
|
+
if TYPE_CHECKING:
|
|
20
|
+
from sycli.acp.config import ToolDef
|
|
21
|
+
|
|
22
|
+
# Process group isolation on Unix
|
|
23
|
+
_SUBPROCESS_NEW_SESSION = sys.platform != "win32"
|
|
24
|
+
|
|
25
|
+
# Maximum output size per stream (matches sandbox.py)
|
|
26
|
+
MAX_OUTPUT_BYTES = 100_000
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class ExecutionResult(BaseModel):
|
|
30
|
+
"""Result of a CLI command execution."""
|
|
31
|
+
|
|
32
|
+
stdout: str = ""
|
|
33
|
+
stderr: str = ""
|
|
34
|
+
exit_code: int = 0
|
|
35
|
+
truncated: bool = False
|
|
36
|
+
timed_out: bool = False
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _kill_process_tree(process: asyncio.subprocess.Process) -> None:
|
|
40
|
+
"""Kill a process and its entire process group.
|
|
41
|
+
|
|
42
|
+
Mirrors sandbox.py's _kill_process_tree pattern.
|
|
43
|
+
"""
|
|
44
|
+
try:
|
|
45
|
+
if sys.platform == "win32":
|
|
46
|
+
process.kill()
|
|
47
|
+
else:
|
|
48
|
+
pgid = os.getpgid(process.pid)
|
|
49
|
+
os.killpg(pgid, signal.SIGKILL)
|
|
50
|
+
except (ProcessLookupError, PermissionError, OSError):
|
|
51
|
+
try:
|
|
52
|
+
process.kill()
|
|
53
|
+
except ProcessLookupError:
|
|
54
|
+
pass
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def _truncate_output(output: str, max_bytes: int = MAX_OUTPUT_BYTES) -> tuple[str, bool]:
|
|
58
|
+
"""Truncate output to max_bytes, returning (truncated_output, was_truncated)."""
|
|
59
|
+
encoded = output.encode("utf-8", errors="replace")
|
|
60
|
+
if len(encoded) <= max_bytes:
|
|
61
|
+
return output, False
|
|
62
|
+
truncated = encoded[:max_bytes].decode("utf-8", errors="replace")
|
|
63
|
+
return truncated + f"\n... (truncated, {len(encoded)} bytes total)", True
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
async def execute_command(
|
|
67
|
+
command: str,
|
|
68
|
+
*,
|
|
69
|
+
cwd: str | None = None,
|
|
70
|
+
timeout: int = 120,
|
|
71
|
+
env: dict[str, str] | None = None,
|
|
72
|
+
max_output_bytes: int = MAX_OUTPUT_BYTES,
|
|
73
|
+
stdin_input: str | None = None,
|
|
74
|
+
) -> ExecutionResult:
|
|
75
|
+
"""Execute a CLI command asynchronously.
|
|
76
|
+
|
|
77
|
+
Mirrors sandbox.py execute endpoint logic:
|
|
78
|
+
- asyncio.create_subprocess_shell with process group isolation
|
|
79
|
+
- Timeout with process tree kill
|
|
80
|
+
- Output truncation at max_output_bytes
|
|
81
|
+
|
|
82
|
+
Args:
|
|
83
|
+
command: Shell command string to execute.
|
|
84
|
+
cwd: Working directory for the command.
|
|
85
|
+
timeout: Maximum execution time in seconds.
|
|
86
|
+
env: Additional environment variables (merged with os.environ).
|
|
87
|
+
max_output_bytes: Maximum output size before truncation.
|
|
88
|
+
stdin_input: Optional text to pipe to stdin.
|
|
89
|
+
|
|
90
|
+
Returns:
|
|
91
|
+
ExecutionResult with stdout, stderr, exit_code, and status flags.
|
|
92
|
+
"""
|
|
93
|
+
full_env = None
|
|
94
|
+
if env:
|
|
95
|
+
full_env = {**os.environ, **env}
|
|
96
|
+
|
|
97
|
+
stdin_data = stdin_input.encode("utf-8") if stdin_input else None
|
|
98
|
+
|
|
99
|
+
process = await asyncio.create_subprocess_shell(
|
|
100
|
+
command,
|
|
101
|
+
stdout=asyncio.subprocess.PIPE,
|
|
102
|
+
stderr=asyncio.subprocess.PIPE,
|
|
103
|
+
stdin=asyncio.subprocess.PIPE if stdin_data else asyncio.subprocess.DEVNULL,
|
|
104
|
+
start_new_session=_SUBPROCESS_NEW_SESSION,
|
|
105
|
+
cwd=cwd,
|
|
106
|
+
env=full_env,
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
timed_out = False
|
|
110
|
+
try:
|
|
111
|
+
stdout_bytes, stderr_bytes = await asyncio.wait_for(
|
|
112
|
+
process.communicate(input=stdin_data),
|
|
113
|
+
timeout=timeout,
|
|
114
|
+
)
|
|
115
|
+
except asyncio.TimeoutError:
|
|
116
|
+
_kill_process_tree(process)
|
|
117
|
+
try:
|
|
118
|
+
await process.wait()
|
|
119
|
+
except Exception:
|
|
120
|
+
pass
|
|
121
|
+
timed_out = True
|
|
122
|
+
stdout_bytes = b""
|
|
123
|
+
stderr_bytes = b""
|
|
124
|
+
|
|
125
|
+
stdout_raw = stdout_bytes.decode("utf-8", errors="replace") if stdout_bytes else ""
|
|
126
|
+
stderr_raw = stderr_bytes.decode("utf-8", errors="replace") if stderr_bytes else ""
|
|
127
|
+
|
|
128
|
+
stdout, stdout_truncated = _truncate_output(stdout_raw, max_output_bytes)
|
|
129
|
+
stderr, stderr_truncated = _truncate_output(stderr_raw, max_output_bytes)
|
|
130
|
+
|
|
131
|
+
return ExecutionResult(
|
|
132
|
+
stdout=stdout,
|
|
133
|
+
stderr=stderr,
|
|
134
|
+
exit_code=process.returncode if process.returncode is not None else -1,
|
|
135
|
+
truncated=stdout_truncated or stderr_truncated,
|
|
136
|
+
timed_out=timed_out,
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
async def stream_command(
|
|
141
|
+
command: str,
|
|
142
|
+
*,
|
|
143
|
+
cwd: str | None = None,
|
|
144
|
+
timeout: int = 120,
|
|
145
|
+
env: dict[str, str] | None = None,
|
|
146
|
+
max_output_bytes: int = MAX_OUTPUT_BYTES,
|
|
147
|
+
) -> AsyncGenerator[str, None]:
|
|
148
|
+
"""Execute a CLI command and yield stdout lines as they arrive.
|
|
149
|
+
|
|
150
|
+
For ACP stream mode: each yielded line becomes a MessagePart.
|
|
151
|
+
Uses asyncio.create_subprocess_shell with stdout=PIPE and
|
|
152
|
+
iterates process.stdout line by line.
|
|
153
|
+
|
|
154
|
+
Args:
|
|
155
|
+
command: Shell command string to execute.
|
|
156
|
+
cwd: Working directory for the command.
|
|
157
|
+
timeout: Maximum execution time in seconds.
|
|
158
|
+
env: Additional environment variables.
|
|
159
|
+
max_output_bytes: Maximum total output before stopping.
|
|
160
|
+
|
|
161
|
+
Yields:
|
|
162
|
+
Each line from stdout as a string.
|
|
163
|
+
"""
|
|
164
|
+
full_env = None
|
|
165
|
+
if env:
|
|
166
|
+
full_env = {**os.environ, **env}
|
|
167
|
+
|
|
168
|
+
process = await asyncio.create_subprocess_shell(
|
|
169
|
+
command,
|
|
170
|
+
stdout=asyncio.subprocess.PIPE,
|
|
171
|
+
stderr=asyncio.subprocess.PIPE,
|
|
172
|
+
start_new_session=_SUBPROCESS_NEW_SESSION,
|
|
173
|
+
cwd=cwd,
|
|
174
|
+
env=full_env,
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
total_bytes = 0
|
|
178
|
+
try:
|
|
179
|
+
try:
|
|
180
|
+
async with asyncio.timeout(timeout):
|
|
181
|
+
if process.stdout is not None:
|
|
182
|
+
async for raw_line in process.stdout:
|
|
183
|
+
line = raw_line.decode("utf-8", errors="replace")
|
|
184
|
+
total_bytes += len(raw_line)
|
|
185
|
+
if total_bytes > max_output_bytes:
|
|
186
|
+
yield "... (output truncated)"
|
|
187
|
+
break
|
|
188
|
+
yield line
|
|
189
|
+
except asyncio.TimeoutError:
|
|
190
|
+
_kill_process_tree(process)
|
|
191
|
+
yield f"\n... (timed out after {timeout}s)"
|
|
192
|
+
|
|
193
|
+
# Wait for process to finish
|
|
194
|
+
try:
|
|
195
|
+
await asyncio.wait_for(process.wait(), timeout=5)
|
|
196
|
+
except asyncio.TimeoutError:
|
|
197
|
+
_kill_process_tree(process)
|
|
198
|
+
finally:
|
|
199
|
+
try:
|
|
200
|
+
if process.returncode is None:
|
|
201
|
+
_kill_process_tree(process)
|
|
202
|
+
try:
|
|
203
|
+
await process.wait()
|
|
204
|
+
except Exception:
|
|
205
|
+
pass
|
|
206
|
+
except Exception:
|
|
207
|
+
pass
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
def build_cli_command(tool_def: ToolDef, input_text: str) -> str:
|
|
211
|
+
"""Build the full CLI command string from a ToolDef and user input.
|
|
212
|
+
|
|
213
|
+
Parses the input message text to extract tool_args values.
|
|
214
|
+
|
|
215
|
+
For input_mode="args":
|
|
216
|
+
Parses key=value pairs or positional args from message text.
|
|
217
|
+
Example: "target=tests/test_api.py verbose=true"
|
|
218
|
+
-> "pytest tests/test_api.py -v"
|
|
219
|
+
|
|
220
|
+
For input_mode="stdin":
|
|
221
|
+
Returns the command as-is (input will be piped to stdin).
|
|
222
|
+
|
|
223
|
+
Args:
|
|
224
|
+
tool_def: Tool configuration.
|
|
225
|
+
input_text: Raw text extracted from ACP input messages.
|
|
226
|
+
|
|
227
|
+
Returns:
|
|
228
|
+
Complete shell command string ready for execution.
|
|
229
|
+
"""
|
|
230
|
+
parts = [tool_def.command]
|
|
231
|
+
|
|
232
|
+
# Add fixed arguments
|
|
233
|
+
if tool_def.args:
|
|
234
|
+
parts.extend(tool_def.args)
|
|
235
|
+
|
|
236
|
+
if tool_def.input_mode == "stdin":
|
|
237
|
+
# Input will be piped separately; no arg mapping needed
|
|
238
|
+
return " ".join(parts)
|
|
239
|
+
|
|
240
|
+
# Parse input text into key-value pairs
|
|
241
|
+
parsed_args = _parse_input_text(input_text)
|
|
242
|
+
|
|
243
|
+
# Map tool_args to CLI flags/positionals
|
|
244
|
+
for arg_def in tool_def.tool_args:
|
|
245
|
+
value = parsed_args.get(arg_def.name)
|
|
246
|
+
|
|
247
|
+
if value is None:
|
|
248
|
+
if arg_def.required and arg_def.default is None:
|
|
249
|
+
# Required arg missing — skip gracefully, let the CLI tool report the error
|
|
250
|
+
continue
|
|
251
|
+
if arg_def.default is not None:
|
|
252
|
+
value = arg_def.default
|
|
253
|
+
else:
|
|
254
|
+
continue
|
|
255
|
+
|
|
256
|
+
if arg_def.flag is not None:
|
|
257
|
+
if _is_truthy(value):
|
|
258
|
+
# Boolean flag present — only emit the flag itself (e.g. -v, --verbose)
|
|
259
|
+
parts.append(arg_def.flag)
|
|
260
|
+
else:
|
|
261
|
+
# Value flag (e.g. --path /some/dir, -e PATTERN)
|
|
262
|
+
parts.append(f"{arg_def.flag}{arg_def.separator}{value}")
|
|
263
|
+
else:
|
|
264
|
+
# Positional argument
|
|
265
|
+
parts.append(value)
|
|
266
|
+
|
|
267
|
+
# Any remaining unparsed input text becomes trailing positional args
|
|
268
|
+
remaining = _get_remaining_input(parsed_args, tool_def.tool_args)
|
|
269
|
+
if remaining:
|
|
270
|
+
parts.append(remaining)
|
|
271
|
+
|
|
272
|
+
return " ".join(parts)
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
def _parse_input_text(text: str) -> dict[str, str]:
|
|
276
|
+
"""Parse input text into key=value pairs.
|
|
277
|
+
|
|
278
|
+
Supports:
|
|
279
|
+
- "key=value" pairs (space or newline separated)
|
|
280
|
+
- Bare values are stored under the key "__positional__"
|
|
281
|
+
|
|
282
|
+
Args:
|
|
283
|
+
text: Raw input text from ACP message.
|
|
284
|
+
|
|
285
|
+
Returns:
|
|
286
|
+
Dict mapping argument names to values.
|
|
287
|
+
"""
|
|
288
|
+
result: dict[str, str] = {}
|
|
289
|
+
positional: list[str] = []
|
|
290
|
+
|
|
291
|
+
# Split on whitespace (spaces, newlines, tabs)
|
|
292
|
+
tokens = text.strip().split()
|
|
293
|
+
|
|
294
|
+
for token in tokens:
|
|
295
|
+
if "=" in token:
|
|
296
|
+
key, _, val = token.partition("=")
|
|
297
|
+
key = key.strip()
|
|
298
|
+
val = val.strip()
|
|
299
|
+
if key:
|
|
300
|
+
result[key] = val
|
|
301
|
+
else:
|
|
302
|
+
positional.append(token)
|
|
303
|
+
|
|
304
|
+
if positional:
|
|
305
|
+
result["__positional__"] = " ".join(positional)
|
|
306
|
+
|
|
307
|
+
return result
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
def _is_truthy(value: str) -> bool:
|
|
311
|
+
"""Check if a string value represents a boolean 'true' (flag present, no value needed)."""
|
|
312
|
+
return value.lower() in ("true", "yes", "1", "")
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
def _get_remaining_input(
|
|
316
|
+
parsed: dict[str, str], tool_args: list
|
|
317
|
+
) -> str:
|
|
318
|
+
"""Get remaining input that wasn't matched to any tool_arg definition."""
|
|
319
|
+
known_keys = {arg.name for arg in tool_args}
|
|
320
|
+
known_keys.add("__positional__")
|
|
321
|
+
|
|
322
|
+
remaining = []
|
|
323
|
+
for key, value in parsed.items():
|
|
324
|
+
if key not in known_keys:
|
|
325
|
+
remaining.append(f"{key}={value}" if "=" in f"{key}={value}" else value)
|
|
326
|
+
|
|
327
|
+
# Also include positional text
|
|
328
|
+
positional = parsed.get("__positional__")
|
|
329
|
+
if positional:
|
|
330
|
+
remaining.insert(0, positional)
|
|
331
|
+
|
|
332
|
+
return " ".join(remaining)
|