crow-cli 0.1.51__tar.gz → 0.1.52__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.
- {crow_cli-0.1.51 → crow_cli-0.1.52}/PKG-INFO +8 -5
- {crow_cli-0.1.51 → crow_cli-0.1.52}/README.md +7 -4
- {crow_cli-0.1.51 → crow_cli-0.1.52}/pyproject.toml +1 -1
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent/llm.py +5 -4
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent/prompt.py +1 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent/session.py +12 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent2/emitter.py +21 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent2/llm.py +42 -2
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent2/react.py +1 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/cli/main.py +10 -62
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/client2/main.py +34 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/config/__init__.py +2 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/config/config.py +23 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/config/default/defaults.py +38 -11
- crow_cli-0.1.52/src/crow_cli/mcp/__init__.py +35 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/mcp/editor/main.py +0 -68
- {crow_cli-0.1.51/src/crow_cli/mcp2 → crow_cli-0.1.52/src/crow_cli/mcp}/execute/main.py +1 -1
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/mcp/memory/main.py +0 -4
- crow_cli-0.1.52/src/crow_cli/mcp/server/app.py +36 -0
- {crow_cli-0.1.51/src/crow_cli/mcp2 → crow_cli-0.1.52/src/crow_cli/mcp/server}/main.py +43 -60
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/timers.py +162 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/tools/__init__.py +3 -0
- crow_cli-0.1.52/src/crow_cli/tools/blender_tool.py +154 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/tools/fs_tool.py +194 -122
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/tools/memory_tool.py +114 -153
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/tools/proc_tool.py +156 -133
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/tools/register.py +2 -2
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/tools/results.py +7 -8
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/tools/rlm_tool.py +4 -4
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/tools/sg_tool.py +2 -2
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/tools/task_tool.py +2 -2
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/tools/vision_tool.py +64 -35
- crow_cli-0.1.52/src/crow_cli/tools/wake_tool.py +218 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/tools/web_tool.py +104 -126
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/conftest.py +30 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/e2e/test_compact_live.py +3 -1
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/e2e/test_custom_compactor_live.py +3 -3
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/e2e/test_execute_acp_client.py +4 -5
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_execute_subtool_emission.py +13 -14
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_react_loop_tool_round.py +2 -1
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_tools_rlm_live.py +1 -1
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/mcp/test_execute.py +3 -1
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/mcp/test_execute_kernel_timeout.py +28 -17
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/mcp/test_execute_prelude.py +32 -26
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/mcp/test_mcp2_server.py +1 -1
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/mcp/test_read.py +4 -4
- crow_cli-0.1.52/tests/unit/test_agent2_prefill.py +299 -0
- crow_cli-0.1.52/tests/unit/test_agent_llm.py +27 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_client2_render.py +5 -1
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_compact.py +4 -1
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_tools_facade_names.py +1 -2
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_tools_fs.py +121 -122
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_tools_memory.py +76 -80
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_tools_proc.py +56 -54
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_tools_rlm.py +1 -1
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_tools_task.py +2 -2
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_tools_vision.py +25 -19
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_tools_web.py +72 -70
- {crow_cli-0.1.51 → crow_cli-0.1.52}/uv.lock +1 -1
- crow_cli-0.1.51/src/crow_cli/mcp/__init__.py +0 -63
- crow_cli-0.1.51/src/crow_cli/mcp/execute/kernel.py +0 -262
- crow_cli-0.1.51/src/crow_cli/mcp/execute/main.py +0 -285
- crow_cli-0.1.51/src/crow_cli/mcp/read/__init__.py +0 -0
- crow_cli-0.1.51/src/crow_cli/mcp/read/main.py +0 -128
- crow_cli-0.1.51/src/crow_cli/mcp/server/README.md +0 -0
- crow_cli-0.1.51/src/crow_cli/mcp/server/app.py +0 -41
- crow_cli-0.1.51/src/crow_cli/mcp/server/logger.py +0 -56
- crow_cli-0.1.51/src/crow_cli/mcp/server/main.py +0 -188
- crow_cli-0.1.51/src/crow_cli/mcp/task/__init__.py +0 -0
- crow_cli-0.1.51/src/crow_cli/mcp/task/main.py +0 -301
- crow_cli-0.1.51/src/crow_cli/mcp/terminal/README.md +0 -0
- crow_cli-0.1.51/src/crow_cli/mcp/terminal/__init__.py +0 -3
- crow_cli-0.1.51/src/crow_cli/mcp/terminal/backend.py +0 -289
- crow_cli-0.1.51/src/crow_cli/mcp/terminal/constants.py +0 -37
- crow_cli-0.1.51/src/crow_cli/mcp/terminal/logging_config.py +0 -61
- crow_cli-0.1.51/src/crow_cli/mcp/terminal/main.py +0 -158
- crow_cli-0.1.51/src/crow_cli/mcp/terminal/metadata.py +0 -97
- crow_cli-0.1.51/src/crow_cli/mcp/terminal/session.py +0 -276
- crow_cli-0.1.51/src/crow_cli/mcp/vision/__init__.py +0 -0
- crow_cli-0.1.51/src/crow_cli/mcp/vision/client.py +0 -24
- crow_cli-0.1.51/src/crow_cli/mcp/vision/main.py +0 -105
- crow_cli-0.1.51/src/crow_cli/mcp/web_fetch/README.md +0 -0
- crow_cli-0.1.51/src/crow_cli/mcp/web_fetch/__init__.py +0 -3
- crow_cli-0.1.51/src/crow_cli/mcp/web_fetch/main.py +0 -102
- crow_cli-0.1.51/src/crow_cli/mcp/web_search/README.md +0 -23
- crow_cli-0.1.51/src/crow_cli/mcp/web_search/__init__.py +0 -3
- crow_cli-0.1.51/src/crow_cli/mcp/web_search/main.py +0 -101
- crow_cli-0.1.51/src/crow_cli/mcp/write/README.md +0 -0
- crow_cli-0.1.51/src/crow_cli/mcp/write/__init__.py +0 -0
- crow_cli-0.1.51/src/crow_cli/mcp/write/main.py +0 -41
- crow_cli-0.1.51/src/crow_cli/mcp2/__init__.py +0 -36
- crow_cli-0.1.51/src/crow_cli/mcp2/execute/__init__.py +0 -0
- crow_cli-0.1.51/src/crow_cli/mcp2/server.py +0 -41
- {crow_cli-0.1.51 → crow_cli-0.1.52}/.env.example +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/.github/workflows/build-binaries.yml +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/.github/workflows/publish-crow-cli.yml +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/.gitignore +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/.python-version +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/AGENTS.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/LICENSE.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/PLAN.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/PYINSTALLER_BUILD.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/TODO.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/agent.json +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/crow-cli.spec +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/CNAME +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/crow-cli-docs/getting-started/installation.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/crow-cli-docs/getting-started/quickstart.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/crow-cli-docs/index.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/crow-cli-docs/memory-tool-design.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/crow-cli-docs/myst.yml +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/crow-cli-docs/styles/purple.css +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/crow-logo.svg +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/get-llamacpp-working.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/getting-started/installation.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/getting-started/quickstart.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/icon.ico +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/img/crow-icon-purple.svg +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/img/crow-logo-crop.png +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/img/icon.svg +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/img/whiteboard_capture.png +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/index.html +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/index.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/journal/03May2026.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/journal/19Feb2026.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/journal/20Feb2026.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/journal/22Feb2026.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/journal/29Aug2026.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/llm-wiki.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/myst.yml +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/docs/styles/purple.css +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/examples/custom_agent.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/examples/custom_compactor.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/run_tests.sh +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/sandbox/async-react/streaming_async_react.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/sandbox/async-react/streaming_async_react_with_cancellation.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/scripts/consolidate_history.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/scripts/e2e_compact_live.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/scripts/e2e_image_store_live.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/scripts/e2e_memory_live.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/scripts/e2e_postgres_live.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/scripts/mcp_ram_repro.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/scripts/merge_live_into_migrated.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/scripts/migrate_taskmaster.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/scripts/migrate_v5.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/scripts/migrate_v6.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/scripts/scrub_words.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/skills/crow-cli/SKILL.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/__init__.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/acp_helpers.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent/__init__.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent/compact.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent/context.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent/hooks.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent/logger.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent/main.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent/mcp_client.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent/memory.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent/model_routing.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent/react.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent/replay.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent/slash.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent/tools.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent2/__init__.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent2/agent.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent2/compaction.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent2/ctx.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent2/deliveries.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent2/driver.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent2/events.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent2/goal.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent2/main.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent2/replay.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent2/sessions.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent2/slash.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent2/tools.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent2/watcher.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agent_runner.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/agents.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/cli/__init__.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/cli/init_cmd.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/cli/install.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/cli/install_crow.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/cli/source.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/client/__init__.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/client/main.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/client/pty_spawn.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/client/subagent.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/client/terminal.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/client2/__init__.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/client2/subagent.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/config/default/__init__.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/config/default/searxng_settings.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/discover.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/mcp/editor/README.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/mcp/editor/__init__.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/mcp/execute/__init__.py +0 -0
- {crow_cli-0.1.51/src/crow_cli/mcp2 → crow_cli-0.1.52/src/crow_cli/mcp}/execute/kernel.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/mcp/memory/__init__.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/mcp/memory/client.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/mcp/memory/store.py +0 -0
- {crow_cli-0.1.51/src/crow_cli/mcp/read → crow_cli-0.1.52/src/crow_cli/mcp/server}/README.md +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/mcp/server/__init__.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/mcp/server/memtrim.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/mcp_meta.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/memory/__init__.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/memory/db.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/memory/fts.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/memory/ids.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/memory/image_store.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/memory/messages.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/memory/models.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/memory/reads.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/memory/session_tabs.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/memory/writes.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/tools/edit_tool.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/tools/goal_tool.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/tools/write_tool.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/src/crow_cli/wake.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/__init__.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/e2e/custom_compactor_agent.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/e2e/test_agent2_live.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/e2e/test_compact_continues_live.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/e2e/test_execute_live.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/e2e/test_mcp_multi_server.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/e2e/test_react_live.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/e2e/test_session_update_transmission.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/e2e/test_source_first_spawn.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/e2e/test_task_high_priority_preemption.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/e2e/test_task_mcp_launch.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/e2e/test_task_race_regression.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_acp2_http.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_acp_http.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_agent2_gate.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_agent2_task_subtool.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_agent2_watcher.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_agent_init.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_auth_validation.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_cli_acp2.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_cli_run_dispatch.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_client2_subagent.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_compact_stale_restart_repro.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_goal_driver.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_goal_slash.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_mcp2_runner.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_mcp_tool_selection.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_react_loop_cancel_integrity.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_react_loop_delegation_hold.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_react_loop_execute_tool.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_reasoning_effort_react_loop.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_slash_commands.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/integration/test_timers_live.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/mcp/conftest.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/mcp/integration/test_server_stdio.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/mcp/test_edit.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/mcp/test_execute_kernel_recovery.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/mcp/test_memory.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/mcp/test_memory_store.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/mcp/test_memtrim.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/mcp/test_server.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/mcp/test_task_tool.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/mcp/test_terminal.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/mcp/test_tool_selection.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/mcp/test_vision.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/mcp/test_web_fetch.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/mcp/test_web_search.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/mcp/test_write.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/memory/test_db.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/memory/test_delete_session.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/memory/test_goal_state.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/memory/test_image_store.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/memory/test_migrate_taskmaster.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/memory/test_migrate_v5.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/memory/test_migrate_v6.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/memory/test_scrub_words.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/memory/test_session_mcp_servers.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/memory/test_session_tabs.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/memory/test_store.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/memory/test_task_state.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_agent2_diff.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_agent2_mcp_recovery.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_agent2_mcp_wiring.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_agent2_normalize_prompt.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_agent2_tools_drain.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_agent_delete_session.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_agent_replay.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_agents_registry.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_cli_fork_flags.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_cli_telemetry.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_client_terminal.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_compact_last_messages_list_content.json +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_compact_last_messages_list_content.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_configure.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_discover.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_fork.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_goal_continuation.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_init_postgres.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_init_rustfs.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_init_source.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_install_crow.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_json_repair.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_mcp_client.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_mcp_meta.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_model_override.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_model_routing.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_per_model_compact_threshold.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_prompt.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_pty_spawn.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_react.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_reasoning_effort.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_request_logging.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_session.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_session_mcp_servers_wiring.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_source.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_stream_processing.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_subagent_parse_servers.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_system_prompt_skills.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_task_tool_schema.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_timers.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_tools_edit.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_tools_goal.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_tools_register_db.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_tools_write.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_usage_update.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_uv_project_enforcement.py +0 -0
- {crow_cli-0.1.51 → crow_cli-0.1.52}/tests/unit/test_version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: crow-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.52
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Project-URL: Homepage, https://github.com/crow-cli/crow-cli
|
|
6
6
|
Project-URL: Repository, https://github.com/crow-cli/crow-cli
|
|
@@ -72,7 +72,7 @@ Two ideas hold the whole thing together.
|
|
|
72
72
|
|
|
73
73
|
**Persistence is the point.** Every session lives in a SQL database (`~/.agents/crow/crow.db` — sqlite by default, PostgreSQL when you want one store shared across machines) with full-text search over every message. Agents recall past conversations, read each other's sessions and delegate work to one another through that store; there is no bespoke agent-to-agent protocol, just a shared database and a read query. Images are content-addressed files beside the database, hydrated to base64 only when they are actually sent to the LLM. Sessions get memorable coolname ids (`taupe-squirrel-of-splendid-potency`) you can resume, fork, or read from any other agent.
|
|
74
74
|
|
|
75
|
-
**The
|
|
75
|
+
**The agent ships with tools, and merges the client's.** The agent's own supply (config.yaml's `mcpServers` — `crow-mcp` out of the box) is merged with whatever the client hands it at `session/new`, so a fresh install works and a third-party client can layer its own servers on top — see [Tools](#tools-the-agent-ships-with-a-supply). `--no-default-tool` drops the agent's own supply, leaving the session's tools to be exactly what its client sent.
|
|
76
76
|
|
|
77
77
|
## Requirements
|
|
78
78
|
|
|
@@ -280,9 +280,9 @@ For [Zed](https://zed.dev/), declare the agent *and* its tool supply — Zed for
|
|
|
280
280
|
}
|
|
281
281
|
```
|
|
282
282
|
|
|
283
|
-
## Tools: the
|
|
283
|
+
## Tools: the agent ships with a supply
|
|
284
284
|
|
|
285
|
-
|
|
285
|
+
The agent is not toolless by default. `mcpServers` in `~/.agents/crow/config.yaml` is the agent's own supply, and `crow-cli init` writes the entry below so a fresh install has tools out of the box:
|
|
286
286
|
|
|
287
287
|
```yaml
|
|
288
288
|
mcpServers:
|
|
@@ -292,7 +292,10 @@ mcpServers:
|
|
|
292
292
|
args: [mcp]
|
|
293
293
|
```
|
|
294
294
|
|
|
295
|
-
|
|
295
|
+
At `session/new` the agent merges this supply with whatever its client sent — a client entry replaces a same-named config entry, everything else lands beside it — so a third-party client can layer its own servers on top of crow's without displacing them. Two switches change who owns the supply:
|
|
296
|
+
|
|
297
|
+
- `--no-default-tool` drops config.yaml's servers from every session, so the session's tools are exactly the ones its client sent. That is what makes an agent generic by construction rather than by prompt: a conductor whose only arm is the MCP server it was handed cannot reach for `execute` and go off script.
|
|
298
|
+
- An `agent_servers` entry may carry its own `mcpServers`, which *replaces* the global supply for that agent only — that is how a v2 agent gets `crow-mcp2` without changing what the v1 sessions on the same box are handed.
|
|
296
299
|
|
|
297
300
|
One binary serves two tool surfaces:
|
|
298
301
|
|
|
@@ -20,7 +20,7 @@ Two ideas hold the whole thing together.
|
|
|
20
20
|
|
|
21
21
|
**Persistence is the point.** Every session lives in a SQL database (`~/.agents/crow/crow.db` — sqlite by default, PostgreSQL when you want one store shared across machines) with full-text search over every message. Agents recall past conversations, read each other's sessions and delegate work to one another through that store; there is no bespoke agent-to-agent protocol, just a shared database and a read query. Images are content-addressed files beside the database, hydrated to base64 only when they are actually sent to the LLM. Sessions get memorable coolname ids (`taupe-squirrel-of-splendid-potency`) you can resume, fork, or read from any other agent.
|
|
22
22
|
|
|
23
|
-
**The
|
|
23
|
+
**The agent ships with tools, and merges the client's.** The agent's own supply (config.yaml's `mcpServers` — `crow-mcp` out of the box) is merged with whatever the client hands it at `session/new`, so a fresh install works and a third-party client can layer its own servers on top — see [Tools](#tools-the-agent-ships-with-a-supply). `--no-default-tool` drops the agent's own supply, leaving the session's tools to be exactly what its client sent.
|
|
24
24
|
|
|
25
25
|
## Requirements
|
|
26
26
|
|
|
@@ -228,9 +228,9 @@ For [Zed](https://zed.dev/), declare the agent *and* its tool supply — Zed for
|
|
|
228
228
|
}
|
|
229
229
|
```
|
|
230
230
|
|
|
231
|
-
## Tools: the
|
|
231
|
+
## Tools: the agent ships with a supply
|
|
232
232
|
|
|
233
|
-
|
|
233
|
+
The agent is not toolless by default. `mcpServers` in `~/.agents/crow/config.yaml` is the agent's own supply, and `crow-cli init` writes the entry below so a fresh install has tools out of the box:
|
|
234
234
|
|
|
235
235
|
```yaml
|
|
236
236
|
mcpServers:
|
|
@@ -240,7 +240,10 @@ mcpServers:
|
|
|
240
240
|
args: [mcp]
|
|
241
241
|
```
|
|
242
242
|
|
|
243
|
-
|
|
243
|
+
At `session/new` the agent merges this supply with whatever its client sent — a client entry replaces a same-named config entry, everything else lands beside it — so a third-party client can layer its own servers on top of crow's without displacing them. Two switches change who owns the supply:
|
|
244
|
+
|
|
245
|
+
- `--no-default-tool` drops config.yaml's servers from every session, so the session's tools are exactly the ones its client sent. That is what makes an agent generic by construction rather than by prompt: a conductor whose only arm is the MCP server it was handed cannot reach for `execute` and go off script.
|
|
246
|
+
- An `agent_servers` entry may carry its own `mcpServers`, which *replaces* the global supply for that agent only — that is how a v2 agent gets `crow-mcp2` without changing what the v1 sessions on the same box are handed.
|
|
244
247
|
|
|
245
248
|
One binary serves two tool surfaces:
|
|
246
249
|
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
LLM (Large Language Model) utilities.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
from openai import AsyncOpenAI
|
|
5
|
+
from openai import AsyncOpenAI, DefaultAsyncHttpxClient
|
|
7
6
|
|
|
8
7
|
from crow_cli.config import LLMProvider
|
|
9
8
|
from logging import Logger
|
|
@@ -39,7 +38,7 @@ def configure_llm(
|
|
|
39
38
|
base_url = provider.base_url
|
|
40
39
|
|
|
41
40
|
if debug:
|
|
42
|
-
http_client =
|
|
41
|
+
http_client = DefaultAsyncHttpxClient(event_hooks={"request": [log_request]})
|
|
43
42
|
else:
|
|
44
43
|
http_client = None
|
|
45
44
|
|
|
@@ -51,7 +50,9 @@ def configure_llm(
|
|
|
51
50
|
# SDK defaults (connect=5s, read=600s) kill turns on slow providers:
|
|
52
51
|
# reasoning models can stream no bytes for >10min, and a flaky route
|
|
53
52
|
# to the endpoint needs more than 5s to connect.
|
|
54
|
-
|
|
53
|
+
# Tuple form (connect, read, write, pool): accepted by httpx AND
|
|
54
|
+
# httpx2, so it survives the openai SDK's httpx->httpx2 migration.
|
|
55
|
+
timeout=(30.0, 1800.0, 1800.0, 1800.0),
|
|
55
56
|
)
|
|
56
57
|
logger.info(f"USER-AGENT: {client.user_agent}") # =
|
|
57
58
|
return client
|
|
@@ -26,6 +26,7 @@ from crow_cli.agent.prompt import (
|
|
|
26
26
|
|
|
27
27
|
from crow_cli.config import (
|
|
28
28
|
Config,
|
|
29
|
+
max_compact_tokens_for,
|
|
29
30
|
)
|
|
30
31
|
|
|
31
32
|
async def get_session_by_cwd(
|
|
@@ -605,6 +606,17 @@ async def make_agent_session(
|
|
|
605
606
|
system_prompt = SystemPromptResponse(
|
|
606
607
|
template=template, template_args=template_args or {}
|
|
607
608
|
)
|
|
609
|
+
# State the compaction budget for the model this generation actually runs
|
|
610
|
+
# on (per-model override of the global default the factory supplied).
|
|
611
|
+
# Merge into a fresh dict: template_args may be the caller's (a compaction
|
|
612
|
+
# strategy's response) and is not ours to mutate.
|
|
613
|
+
system_prompt = SystemPromptResponse(
|
|
614
|
+
template=system_prompt.template,
|
|
615
|
+
template_args={
|
|
616
|
+
**system_prompt.template_args,
|
|
617
|
+
"compact_threshold": max_compact_tokens_for(config, model_id),
|
|
618
|
+
},
|
|
619
|
+
)
|
|
608
620
|
prompt_id = await lookup_or_create_prompt(
|
|
609
621
|
system_prompt.template, name="crow-default", memory_path=config.db_uri
|
|
610
622
|
)
|
|
@@ -220,6 +220,27 @@ class Emitter:
|
|
|
220
220
|
"""The context meter: tokens in context against the compaction ceiling."""
|
|
221
221
|
await self._best_effort(v2.UsageUpdate(used=used, size=size, **present(cost=cost)))
|
|
222
222
|
|
|
223
|
+
async def prefill(self, progress: dict) -> None:
|
|
224
|
+
"""llama.cpp prompt-processing progress - the prefill gauge.
|
|
225
|
+
|
|
226
|
+
``progress`` is the server's raw ``prompt_progress`` dict
|
|
227
|
+
({total, cache, processed, time_ms}), plus ``done`` once the first
|
|
228
|
+
generated token arrives. v2 has no schema type for it, so it rides
|
|
229
|
+
``OtherSessionUpdate`` under the ``_``-prefixed extension name the
|
|
230
|
+
spec reserves for implementations; ``time_ms`` becomes ``timeMs`` to
|
|
231
|
+
match the wire's camelCase. Best-effort like :meth:`usage`: losing a
|
|
232
|
+
gauge update degrades the UI, not the conversation.
|
|
233
|
+
"""
|
|
234
|
+
await self._best_effort(
|
|
235
|
+
v2.OtherSessionUpdate(
|
|
236
|
+
session_update="_prefill_progress",
|
|
237
|
+
processed=progress.get("processed", 0),
|
|
238
|
+
total=progress.get("total", 0),
|
|
239
|
+
done=bool(progress.get("done", False)),
|
|
240
|
+
**present(cache=progress.get("cache"), timeMs=progress.get("time_ms")),
|
|
241
|
+
)
|
|
242
|
+
)
|
|
243
|
+
|
|
223
244
|
# -- tool calls --------------------------------------------------------
|
|
224
245
|
|
|
225
246
|
async def tool_call(self, tool_call_id: str, **patch: Any) -> None:
|
|
@@ -45,7 +45,12 @@ from crow_cli.agent.model_routing import (
|
|
|
45
45
|
# have no protocol in them, and a second copy of the range grammar is a second
|
|
46
46
|
# thing to keep in step.
|
|
47
47
|
from crow_cli.agent.prompt import context_fetcher, uri_to_path
|
|
48
|
-
from crow_cli.config import
|
|
48
|
+
from crow_cli.config import (
|
|
49
|
+
Config,
|
|
50
|
+
build_sampling_params,
|
|
51
|
+
provider_type_for,
|
|
52
|
+
sampling_params_for,
|
|
53
|
+
)
|
|
49
54
|
|
|
50
55
|
logger = logging.getLogger(__name__)
|
|
51
56
|
|
|
@@ -65,6 +70,11 @@ RETRYABLE_STATUS = (429, 500, 502, 503, 504)
|
|
|
65
70
|
#: Callbacks are awaited, so the react loop can hand the emitter straight in.
|
|
66
71
|
TokenSink = Callable[[str], Awaitable[None]]
|
|
67
72
|
|
|
73
|
+
#: llama.cpp prompt-processing progress, as the server reports it:
|
|
74
|
+
#: {total, cache, processed, time_ms}, plus done=True on the final emission
|
|
75
|
+
#: (the first generated token). Awaited like TokenSink.
|
|
76
|
+
PrefillSink = Callable[[dict], Awaitable[None]]
|
|
77
|
+
|
|
68
78
|
|
|
69
79
|
def normalize_blocks(content: Any) -> list[dict]:
|
|
70
80
|
"""Coerce stored message content to OpenAI block form.
|
|
@@ -279,6 +289,15 @@ async def send_request(
|
|
|
279
289
|
else:
|
|
280
290
|
sampling = build_sampling_params(reasoning_effort, temperature)
|
|
281
291
|
|
|
292
|
+
# llama.cpp servers report prompt-processing progress inside the stream
|
|
293
|
+
# when asked (return_progress) - the prefill gauge. Standard OpenAI
|
|
294
|
+
# providers do not know the field, so it is sent only to a provider
|
|
295
|
+
# explicitly typed llamacpp. Merged into any existing extra_body (the
|
|
296
|
+
# non-standard sampling knobs) rather than replacing it.
|
|
297
|
+
if config is not None and provider_type_for(config, routed_model) == "llamacpp":
|
|
298
|
+
extra_body = {**(sampling.get("extra_body") or {}), "return_progress": True}
|
|
299
|
+
sampling = {**sampling, "extra_body": extra_body}
|
|
300
|
+
|
|
282
301
|
if request_log_path:
|
|
283
302
|
payload = {
|
|
284
303
|
"model": routed_model,
|
|
@@ -463,14 +482,25 @@ async def stream(
|
|
|
463
482
|
*,
|
|
464
483
|
on_thought: Optional[TokenSink] = None,
|
|
465
484
|
on_content: Optional[TokenSink] = None,
|
|
485
|
+
on_prefill: Optional[PrefillSink] = None,
|
|
466
486
|
chunk_log_path: Optional[str] = None,
|
|
467
487
|
) -> Completion:
|
|
468
488
|
"""Consume a streaming completion into ``state``, fanning tokens out.
|
|
469
489
|
|
|
470
490
|
Cancellation propagates: the caller persists ``state`` on the way out,
|
|
471
491
|
which is why accumulation lives in a passed-in object rather than locals.
|
|
492
|
+
|
|
493
|
+
``on_prefill`` receives llama.cpp prompt-processing progress. The server
|
|
494
|
+
rides it inside ordinary chunks as a top-level ``prompt_progress`` field
|
|
495
|
+
(the openai SDK keeps unknown fields in ``model_extra``, reachable by
|
|
496
|
+
attribute); only a llamacpp-typed provider asked for it, so for everyone
|
|
497
|
+
else it is simply never present. The first generated token ends prefill:
|
|
498
|
+
a final ``done=True`` emission lets the client retire the gauge even if
|
|
499
|
+
the server's own 100% update never arrived.
|
|
472
500
|
"""
|
|
473
501
|
usage: Optional[dict] = None
|
|
502
|
+
last_progress: Optional[dict] = None
|
|
503
|
+
prefill_done = False
|
|
474
504
|
log_file = open(chunk_log_path, "a") if chunk_log_path else None
|
|
475
505
|
try:
|
|
476
506
|
async for chunk in response:
|
|
@@ -480,10 +510,20 @@ async def stream(
|
|
|
480
510
|
"completion_tokens": getattr(chunk.usage, "completion_tokens", None),
|
|
481
511
|
"total_tokens": getattr(chunk.usage, "total_tokens", None),
|
|
482
512
|
}
|
|
513
|
+
if on_prefill is not None and not prefill_done:
|
|
514
|
+
progress = getattr(chunk, "prompt_progress", None)
|
|
515
|
+
if progress is not None:
|
|
516
|
+
last_progress = dict(progress)
|
|
517
|
+
await on_prefill(last_progress)
|
|
483
518
|
if log_file is not None:
|
|
484
519
|
log_file.write(json.dumps(serialize_chunk(chunk), ensure_ascii=False) + "\n")
|
|
485
520
|
log_file.flush()
|
|
486
|
-
|
|
521
|
+
tokens = _accumulate_chunk(chunk, state)
|
|
522
|
+
if tokens and last_progress is not None and not prefill_done:
|
|
523
|
+
prefill_done = True
|
|
524
|
+
if on_prefill is not None:
|
|
525
|
+
await on_prefill({**last_progress, "done": True})
|
|
526
|
+
for kind, token in tokens:
|
|
487
527
|
if kind == "thinking" and on_thought is not None:
|
|
488
528
|
await on_thought(token)
|
|
489
529
|
elif kind == "content" and on_content is not None:
|
|
@@ -208,6 +208,7 @@ async def _step(state: LoopState, turn: int, deps: Deps, engine: Any) -> Step:
|
|
|
208
208
|
deps.state,
|
|
209
209
|
on_thought=on_thought,
|
|
210
210
|
on_content=on_content,
|
|
211
|
+
on_prefill=emitter.prefill,
|
|
211
212
|
chunk_log_path=chunk_log_path,
|
|
212
213
|
)
|
|
213
214
|
except asyncio.CancelledError:
|
|
@@ -201,7 +201,7 @@ def run_agent2(
|
|
|
201
201
|
costs ~1.15s to import; ``agent2.main`` pulls
|
|
202
202
|
``acp.experimental.v2.schema`` — six thousand lines of pydantic — for
|
|
203
203
|
another ~0.36s. At module scope every invocation pays that, including
|
|
204
|
-
``crow-cli --help`` and ``crow-cli
|
|
204
|
+
``crow-cli --help`` and ``crow-cli mcp --list-tools``.
|
|
205
205
|
"""
|
|
206
206
|
from crow_cli.agent2.main import main as agent2_main
|
|
207
207
|
|
|
@@ -232,84 +232,32 @@ def run_mcp(
|
|
|
232
232
|
),
|
|
233
233
|
host: str = typer.Option("127.0.0.1", "--host", help="bind address for the HTTP transport"),
|
|
234
234
|
port: int = typer.Option(2769, "--port", help="port for the HTTP transport"),
|
|
235
|
-
include_tools: list[str] = typer.Option(
|
|
236
|
-
None,
|
|
237
|
-
"--include-tools",
|
|
238
|
-
metavar="TOOLS",
|
|
239
|
-
help="Allowlist of tools to serve, comma-separated and/or repeated. "
|
|
240
|
-
"Defaults to ALL of them — exclude a tool by not listing it.",
|
|
241
|
-
),
|
|
242
|
-
list_tools: bool = typer.Option(
|
|
243
|
-
False,
|
|
244
|
-
"--list-tools",
|
|
245
|
-
help="Print the tool names --include-tools accepts and exit.",
|
|
246
|
-
),
|
|
247
|
-
):
|
|
248
|
-
"""Serve Crow's MCP tools — stdio child (default) or streamable HTTP.
|
|
249
|
-
|
|
250
|
-
Spawn it several times with different --include-tools to get several
|
|
251
|
-
servers out of this one codebase.
|
|
252
|
-
"""
|
|
253
|
-
# Lazy import: this module is cheap (it imports no tool group), but the
|
|
254
|
-
# tools it registers are not — vision pulls opencv. register_tools() only
|
|
255
|
-
# imports the modules that own the tools actually selected.
|
|
256
|
-
from crow_cli.mcp import tool_names
|
|
257
|
-
from crow_cli.mcp.server.main import (
|
|
258
|
-
ToolSelectionError,
|
|
259
|
-
resolve_tool_selection,
|
|
260
|
-
serve,
|
|
261
|
-
)
|
|
262
|
-
|
|
263
|
-
if list_tools:
|
|
264
|
-
for name in tool_names():
|
|
265
|
-
typer.echo(name)
|
|
266
|
-
raise typer.Exit(0)
|
|
267
|
-
|
|
268
|
-
try:
|
|
269
|
-
include = resolve_tool_selection(include_tools)
|
|
270
|
-
except ToolSelectionError as exc:
|
|
271
|
-
# Loud and on stderr: stdout is the JSON-RPC stream on stdio transport.
|
|
272
|
-
typer.secho(f"crow-cli mcp: {exc}", fg="yellow", err=True)
|
|
273
|
-
raise typer.Exit(2)
|
|
274
|
-
|
|
275
|
-
serve(transport, host, port, include_tools=include)
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
@app.command("mcp2")
|
|
279
|
-
def run_mcp2(
|
|
280
|
-
transport: str = typer.Option(
|
|
281
|
-
"stdio",
|
|
282
|
-
"--transport",
|
|
283
|
-
help="stdio = spawned child (default); http = streamable HTTP service",
|
|
284
|
-
),
|
|
285
|
-
host: str = typer.Option("127.0.0.1", "--host", help="bind address for the HTTP transport"),
|
|
286
|
-
port: int = typer.Option(2770, "--port", help="port for the HTTP transport"),
|
|
287
235
|
list_tools: bool = typer.Option(
|
|
288
236
|
False,
|
|
289
237
|
"--list-tools",
|
|
290
238
|
help="Print the served tool names and exit.",
|
|
291
239
|
),
|
|
292
240
|
):
|
|
293
|
-
"""Serve crow
|
|
241
|
+
"""Serve crow's MCP tools — stdio child (default) or streamable HTTP.
|
|
294
242
|
|
|
295
|
-
``execute`` and nothing else: the rest of the
|
|
296
|
-
subtools ambient in the kernel, so there is no --include-tools
|
|
297
|
-
it as an
|
|
298
|
-
host for many sessions.
|
|
243
|
+
``execute`` and nothing else: the rest of the agent's surface is reached
|
|
244
|
+
through subtools ambient in the kernel, so there is no --include-tools.
|
|
245
|
+
Spawn it as an agent session's MCP server, or run it over HTTP as one
|
|
246
|
+
kernel host for many sessions.
|
|
299
247
|
"""
|
|
300
248
|
# Lazy, and the ORDER is the point. --list-tools answers from the registry
|
|
301
|
-
# in crow_cli.
|
|
249
|
+
# in crow_cli.mcp, which imports nothing; crow_cli.mcp.server.main pulls in
|
|
302
250
|
# fastmcp and the server instance, and serve() then imports the execute
|
|
303
251
|
# tool, which pulls jupyter_client and ipykernel. Importing the runner
|
|
304
252
|
# before the branch would make the cheap question pay for all of it.
|
|
305
|
-
from crow_cli.
|
|
253
|
+
from crow_cli.mcp import tool_names
|
|
306
254
|
|
|
307
255
|
if list_tools:
|
|
308
256
|
for name in tool_names():
|
|
309
257
|
typer.echo(name)
|
|
310
258
|
raise typer.Exit(0)
|
|
311
259
|
|
|
312
|
-
from crow_cli.
|
|
260
|
+
from crow_cli.mcp.server.main import serve
|
|
313
261
|
|
|
314
262
|
try:
|
|
315
263
|
serve(transport, host, port)
|
|
@@ -317,7 +265,7 @@ def run_mcp2(
|
|
|
317
265
|
# Loud and on stderr, and an exit code: stdout is the JSON-RPC stream
|
|
318
266
|
# on the stdio transport, and a traceback there is a protocol violation
|
|
319
267
|
# the spawning client would see instead of an error at spawn time.
|
|
320
|
-
typer.secho(f"crow-cli
|
|
268
|
+
typer.secho(f"crow-cli mcp: {exc}", fg="yellow", err=True)
|
|
321
269
|
raise typer.Exit(2)
|
|
322
270
|
|
|
323
271
|
|
|
@@ -157,6 +157,9 @@ class TerminalClient(HeadlessClient):
|
|
|
157
157
|
#: ``terminal_update`` is for a client that was NOT watching; rendering
|
|
158
158
|
#: it after the chunks is showing the same output twice.
|
|
159
159
|
self._streamed: set[str] = set()
|
|
160
|
+
#: A prefill progress line is open on stdout (no trailing newline
|
|
161
|
+
#: yet). The next non-prefill render must finalize it first.
|
|
162
|
+
self._prefill_open = False
|
|
160
163
|
#: True while a prompt THIS client sent is in flight. See ``own_echo``.
|
|
161
164
|
self._our_prompt = False
|
|
162
165
|
self.title: Optional[str] = None
|
|
@@ -207,6 +210,10 @@ class TerminalClient(HeadlessClient):
|
|
|
207
210
|
never seen should print its name, not fall through a type check into
|
|
208
211
|
silence."""
|
|
209
212
|
kind = getattr(update, "session_update", None) or ""
|
|
213
|
+
if kind != "_prefill_progress" and self._prefill_open:
|
|
214
|
+
sys.stdout.write("\n")
|
|
215
|
+
sys.stdout.flush()
|
|
216
|
+
self._prefill_open = False
|
|
210
217
|
handler = _RENDERS.get(kind)
|
|
211
218
|
if handler is None:
|
|
212
219
|
self.console.print(f"[dim]· {kind or type(update).__name__}[/dim]")
|
|
@@ -315,6 +322,32 @@ class TerminalClient(HeadlessClient):
|
|
|
315
322
|
f"\n[dim]context {update.used:,}/{update.size:,}{extra}[/dim]"
|
|
316
323
|
)
|
|
317
324
|
|
|
325
|
+
def _prefill(self, update: Any) -> None:
|
|
326
|
+
"""llama.cpp prompt-processing progress: one overwriting line.
|
|
327
|
+
|
|
328
|
+
Written straight to stdout with a carriage return, not through rich:
|
|
329
|
+
every chunk is a new percentage of the SAME prefill, and a console
|
|
330
|
+
print per chunk would bury the transcript in progress lines. The
|
|
331
|
+
line finalizes (newline) on done so the first token renders below
|
|
332
|
+
it; ``render`` also finalizes it if anything else arrives first.
|
|
333
|
+
"""
|
|
334
|
+
# The fields ride OtherSessionUpdate's extra="allow" payload, and
|
|
335
|
+
# the SDK's BaseModel does not expose extras as attributes - they
|
|
336
|
+
# live in model_extra.
|
|
337
|
+
fields = update.model_extra or {}
|
|
338
|
+
processed = fields.get("processed", 0) or 0
|
|
339
|
+
total = fields.get("total", 0) or 0
|
|
340
|
+
cache = fields.get("cache", 0) or 0
|
|
341
|
+
time_ms = fields.get("timeMs", 0) or 0
|
|
342
|
+
pct = f"{processed / total:.0%}" if total else "?"
|
|
343
|
+
work = processed - cache
|
|
344
|
+
speed = f" · {work / (time_ms / 1000):,.0f} tok/s" if time_ms > 0 and work > 0 else ""
|
|
345
|
+
sys.stdout.write(f"\r\x1b[2Kprefill {pct} ({processed:,}/{total:,}){speed}")
|
|
346
|
+
self._prefill_open = not fields.get("done", False)
|
|
347
|
+
if not self._prefill_open:
|
|
348
|
+
sys.stdout.write("\n")
|
|
349
|
+
sys.stdout.flush()
|
|
350
|
+
|
|
318
351
|
def _state(self, update: Any) -> None:
|
|
319
352
|
state = getattr(update, "state", None)
|
|
320
353
|
if state == "idle":
|
|
@@ -400,6 +433,7 @@ _RENDERS = {
|
|
|
400
433
|
"terminal_update": TerminalClient._terminal,
|
|
401
434
|
"terminal_output_chunk": TerminalClient._terminal_chunk,
|
|
402
435
|
"usage_update": TerminalClient._usage,
|
|
436
|
+
"_prefill_progress": TerminalClient._prefill,
|
|
403
437
|
"state_update": TerminalClient._state,
|
|
404
438
|
"session_info_update": TerminalClient._session_info,
|
|
405
439
|
"available_commands_update": TerminalClient._commands,
|
|
@@ -29,6 +29,7 @@ from crow_cli.config.config import (
|
|
|
29
29
|
parse_goal_config,
|
|
30
30
|
parse_model_number,
|
|
31
31
|
parse_reasoning_effort,
|
|
32
|
+
provider_type_for,
|
|
32
33
|
resolve_env_vars,
|
|
33
34
|
sampling_params_for,
|
|
34
35
|
)
|
|
@@ -56,6 +57,7 @@ __all__ = [
|
|
|
56
57
|
"parse_goal_config",
|
|
57
58
|
"parse_model_number",
|
|
58
59
|
"parse_reasoning_effort",
|
|
60
|
+
"provider_type_for",
|
|
59
61
|
"resolve_env_vars",
|
|
60
62
|
"sampling_params_for",
|
|
61
63
|
]
|
|
@@ -234,11 +234,33 @@ def max_compact_tokens_for(config: "Config", model_id: str) -> int:
|
|
|
234
234
|
return config.MAX_COMPACT_TOKENS
|
|
235
235
|
|
|
236
236
|
|
|
237
|
+
def provider_type_for(config: "Config", model_id: str) -> str | None:
|
|
238
|
+
"""The provider TYPE behind a model (e.g. "llamacpp"), or None.
|
|
239
|
+
|
|
240
|
+
Resolves the model the same way :func:`sampling_params_for` does - by
|
|
241
|
+
``model_id``, which is what ``session.model_identifier`` carries - then
|
|
242
|
+
looks up its provider's ``type``. Callers use this to decide whether a
|
|
243
|
+
request may carry server-specific fields; a model or provider not in
|
|
244
|
+
config is a standard OpenAI-compatible endpoint (None)."""
|
|
245
|
+
model = next(
|
|
246
|
+
(m for m in config.llm.models.values() if m.model_id == model_id), None
|
|
247
|
+
)
|
|
248
|
+
if model is None:
|
|
249
|
+
return None
|
|
250
|
+
provider = config.llm.providers.get(model.provider_name)
|
|
251
|
+
return provider.type if provider is not None else None
|
|
252
|
+
|
|
253
|
+
|
|
237
254
|
@dataclass
|
|
238
255
|
class LLMProvider:
|
|
239
256
|
name: str
|
|
240
257
|
base_url: str | None = None
|
|
241
258
|
api_key: str | None = field(default=None, repr=False)
|
|
259
|
+
# What speaks the OpenAI dialect on the other end. "llamacpp" marks a
|
|
260
|
+
# llama.cpp server, which accepts non-standard request fields (e.g.
|
|
261
|
+
# return_progress) and reports prompt-processing progress mid-stream.
|
|
262
|
+
# None = a standard OpenAI-compatible provider; nothing extra is sent.
|
|
263
|
+
type: str | None = None
|
|
242
264
|
|
|
243
265
|
|
|
244
266
|
@dataclass
|
|
@@ -464,6 +486,7 @@ class Config:
|
|
|
464
486
|
name=name,
|
|
465
487
|
api_key=data.get("api_key"),
|
|
466
488
|
base_url=data.get("base_url"),
|
|
489
|
+
type=data.get("type"),
|
|
467
490
|
)
|
|
468
491
|
|
|
469
492
|
# Parse models
|
|
@@ -67,7 +67,7 @@ trigger below, read its SKILL.md and follow it.
|
|
|
67
67
|
{% endfor %}
|
|
68
68
|
|
|
69
69
|
Need a skill that isn't here? Fetch https://crow-ai.dev/llms.txt with the web
|
|
70
|
-
tool (`r = await web("
|
|
70
|
+
tool (`r = await web.fetch("https://crow-ai.dev/llms.txt")`), then fetch the
|
|
71
71
|
one that fits raw from https://crow-ai.dev/skills/<name>/SKILL.md (plus the
|
|
72
72
|
files it lists) into `{{ skills_dir }}/<name>/`. Add-only.
|
|
73
73
|
</SKILLS>
|
|
@@ -120,24 +120,35 @@ lost, so print important intermediate results. A timeout does not kill the
|
|
|
120
120
|
cell; it may remain busy and its output can be collected by a later call.
|
|
121
121
|
</HARNESS>
|
|
122
122
|
|
|
123
|
+
{% if compact_threshold %}
|
|
124
|
+
<CONTEXT_BUDGET>
|
|
125
|
+
Your context is NOT unlimited. This session compacts at {{ compact_threshold }}
|
|
126
|
+
tokens: past that point the history is summarized and detail is lost. Budget
|
|
127
|
+
accordingly — explore only what the task needs, then MAKE THE CHANGE. Reading
|
|
128
|
+
every file, looping on research, or re-exploring after a compaction until the
|
|
129
|
+
window fills again is a failure mode, not thoroughness. Land concrete edits
|
|
130
|
+
early and leave headroom to verify them.
|
|
131
|
+
</CONTEXT_BUDGET>
|
|
132
|
+
{% endif %}
|
|
133
|
+
|
|
123
134
|
<TOOLS>
|
|
124
135
|
The model-facing tools are stable async Python helpers inside the persistent
|
|
125
136
|
kernel. Trust these contracts:
|
|
126
137
|
|
|
127
138
|
* `execute(code, timeout=30, reset=False)` — runs one cell; see <HARNESS>.
|
|
128
|
-
* `fs
|
|
139
|
+
* `fs` — file operations: `fs.read`/`glob`/`search`/`ast`/`rewrite`/`sub`. `r = await fs.read(path, offset=, limit=)`
|
|
129
140
|
returns `.text`; use `help(fs)` when needed.
|
|
130
141
|
* `edit(file_path, old_string, new_string)` and `write(path, content)` return
|
|
131
142
|
results whose useful field is `.diff`; print `r.diff`.
|
|
132
|
-
* `memory(
|
|
143
|
+
* `memory.sql(statement)` — read-only SQL over Crow history. Put filters
|
|
133
144
|
and LIMIT in SQL. Results: `.df`, `.n_rows`, `.text`, `.truncated`.
|
|
134
145
|
`help(memory)` gives the schema and retrieval examples.
|
|
135
|
-
* `web
|
|
136
|
-
* `proc
|
|
146
|
+
* `web` — `web.search`/`fetch`/`run`/`close`.
|
|
147
|
+
* `proc` — `proc.run`/`start`/`ps`/`log`/`wait`/`kill`.
|
|
137
148
|
`run` blocks; `start` detaches to a log and returns `.pid`/`.log` — use it
|
|
138
149
|
for anything that outlives the cell, never `nohup cmd &`. Spawned ≠ ready.
|
|
139
150
|
* `rlm(...)` — blocking delegation; give the containing cell a large timeout.
|
|
140
|
-
* `vision(
|
|
151
|
+
* `vision.file(path)` / `vision.webcam(device_index)` — bring an image into the conversation.
|
|
141
152
|
* `reload()` — refresh Crow tool modules without resetting the kernel.
|
|
142
153
|
* `sg()` — ast_grep_py helper subtool.
|
|
143
154
|
|
|
@@ -155,11 +166,11 @@ When a call shape surprises you, print `help(tool)` before calling it.
|
|
|
155
166
|
Each element is one FILE's matches as `path:line:match` lines joined by \n —
|
|
156
167
|
count with `res[0].count(...)`, print line-by-line. `line_number=True` is what
|
|
157
168
|
tells you WHERE a hit is, so you can go straight to it with
|
|
158
|
-
`fs(
|
|
169
|
+
`fs.read(path, offset=LINE)` instead of grepping again. Do NOT shell out to
|
|
159
170
|
rg/grep/find via subprocess for searching.
|
|
160
171
|
* Structural match/rewrite (renames, signature changes, code-shape lints):
|
|
161
172
|
ast-grep via the `ast_grep_py` bindings in the `sg` subtool — returns AST nodes, not substrings.
|
|
162
|
-
* Commands the cell waits for — git, `uv --project <repo> run pytest` — go through `proc(
|
|
173
|
+
* Commands the cell waits for — git, `uv --project <repo> run pytest` — go through `proc.run(cmd)`; never subprocess. It is also the wrong instrument for searching (use the Rust bindings / ast-grep above) and for anything that OUTLIVES the cell: that is `proc.start(cmd)`.
|
|
163
174
|
You should not treat the kernel as a stepping stone to do things in bash the
|
|
164
175
|
way you've been overfit to do. Treat each kernel cell like a half of a
|
|
165
176
|
subagent run where you can script tool calls and choose what to expose to
|
|
@@ -168,6 +179,22 @@ When a call shape surprises you, print `help(tool)` before calling it.
|
|
|
168
179
|
hangs waiting for interactive input.
|
|
169
180
|
</SEARCH>
|
|
170
181
|
|
|
182
|
+
<NEGATIVE_CAPABILITY>
|
|
183
|
+
Keats called it negative capability: being "in uncertainties, mysteries, doubts,
|
|
184
|
+
without any irritable reaching after fact & reason." The irritable reaching is
|
|
185
|
+
the long reasoning trace — deliberating, weighing, hedging in your head when a
|
|
186
|
+
single tool call would settle it. Keep the capacity; invert the reach: do not
|
|
187
|
+
resolve doubt by thinking longer. Let reality imprint itself on you through
|
|
188
|
+
the environment instead.
|
|
189
|
+
|
|
190
|
+
Uncertainty is not a prompt to reason further. It is a queue of actions, and
|
|
191
|
+
policy collapses it: don't know the name — search it; haven't read the file —
|
|
192
|
+
read it; haven't run the test — run it; can't recall the decision — query
|
|
193
|
+
memory. Sit in the doubt exactly long enough to make the call, then let the
|
|
194
|
+
world answer. A paragraph of deliberation is worth less than one line of
|
|
195
|
+
output. The tool call is the negative capability.
|
|
196
|
+
</NEGATIVE_CAPABILITY>
|
|
197
|
+
|
|
171
198
|
<ROLE>
|
|
172
199
|
* Your primary role is to assist users by executing commands, modifying code, and solving technical problems effectively. You should be thorough, methodical, and prioritize quality over speed.
|
|
173
200
|
* If the user asks a question, like "why is X happening", don't try to fix the problem. Just give an answer to the question.
|
|
@@ -291,7 +318,7 @@ Session-Id: {{ session_id }}"
|
|
|
291
318
|
</IMPORTANT>
|
|
292
319
|
|
|
293
320
|
<MEMORY>
|
|
294
|
-
* crow.db is your institutional memory. Use `await memory(
|
|
321
|
+
* crow.db is your institutional memory. Use `await memory.sql(statement)`;
|
|
295
322
|
do not bypass it with a guessed database path or a separate SDK connection.
|
|
296
323
|
* Known session: read the user's messages first, in order. Join `messages m`
|
|
297
324
|
to `agents a ON a.agent_id=m.agent_id`; filter `a.session_id='...'` and
|
|
@@ -302,7 +329,7 @@ Session-Id: {{ session_id }}"
|
|
|
302
329
|
For a literal phrase or path, use `CAST(m.data AS TEXT) LIKE '%phrase%'`
|
|
303
330
|
(LIKE's % and _ are wildcards), or SQLite's `instr(CAST(m.data AS TEXT),
|
|
304
331
|
'literal') > 0`. This also sees tool-call arguments. Do not use legacy
|
|
305
|
-
`memory(
|
|
332
|
+
`memory.search(...)`: FTS can reject hyphenated/quoted input and omits
|
|
306
333
|
tool-call arguments. No result is not proof that something never happened.
|
|
307
334
|
* `print(r.df)` is a clipped preview, not the full message. Read selected
|
|
308
335
|
content with `for row in r.df.iter_rows(named=True): print(row["content"])`.
|
|
@@ -313,7 +340,7 @@ Session-Id: {{ session_id }}"
|
|
|
313
340
|
</MEMORY>
|
|
314
341
|
|
|
315
342
|
<QUERY_MEMORY>
|
|
316
|
-
When another agent finishes, query its session_id through memory(
|
|
343
|
+
When another agent finishes, query its session_id through memory.sql(...).
|
|
317
344
|
Read its latest assistant AND tool messages: a claimed fix is not a passing
|
|
318
345
|
verification. Report the observed result and any unfinished work.
|
|
319
346
|
</QUERY_MEMORY>
|