turnloop 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- turnloop-0.1.0/.github/workflows/ci.yml +36 -0
- turnloop-0.1.0/.gitignore +13 -0
- turnloop-0.1.0/.turnloop/.gitignore +2 -0
- turnloop-0.1.0/PKG-INFO +916 -0
- turnloop-0.1.0/README.md +887 -0
- turnloop-0.1.0/pyproject.toml +84 -0
- turnloop-0.1.0/tests/conftest.py +95 -0
- turnloop-0.1.0/tests/fixtures/anthropic_tool_call.sse +36 -0
- turnloop-0.1.0/tests/fixtures/glm_tool_call.sse +18 -0
- turnloop-0.1.0/tests/fixtures/mcp_echo_server.py +83 -0
- turnloop-0.1.0/tests/test_bash.py +150 -0
- turnloop-0.1.0/tests/test_compaction.py +276 -0
- turnloop-0.1.0/tests/test_config.py +201 -0
- turnloop-0.1.0/tests/test_experiments.py +508 -0
- turnloop-0.1.0/tests/test_hooks_mcp_commands.py +379 -0
- turnloop-0.1.0/tests/test_loop.py +372 -0
- turnloop-0.1.0/tests/test_permissions.py +213 -0
- turnloop-0.1.0/tests/test_providers.py +424 -0
- turnloop-0.1.0/tests/test_tools_files.py +296 -0
- turnloop-0.1.0/tests/test_tui.py +170 -0
- turnloop-0.1.0/turnloop/__init__.py +3 -0
- turnloop-0.1.0/turnloop/__main__.py +4 -0
- turnloop-0.1.0/turnloop/agent/__init__.py +0 -0
- turnloop-0.1.0/turnloop/agent/factory.py +175 -0
- turnloop-0.1.0/turnloop/agent/headless.py +150 -0
- turnloop-0.1.0/turnloop/agent/loop.py +396 -0
- turnloop-0.1.0/turnloop/agent/subagent.py +182 -0
- turnloop-0.1.0/turnloop/agent/system_prompt.py +263 -0
- turnloop-0.1.0/turnloop/cli.py +202 -0
- turnloop-0.1.0/turnloop/commands/__init__.py +0 -0
- turnloop-0.1.0/turnloop/commands/dispatch.py +428 -0
- turnloop-0.1.0/turnloop/commands/loader.py +140 -0
- turnloop-0.1.0/turnloop/config.py +425 -0
- turnloop-0.1.0/turnloop/context/__init__.py +0 -0
- turnloop-0.1.0/turnloop/context/budget.py +74 -0
- turnloop-0.1.0/turnloop/context/compaction.py +441 -0
- turnloop-0.1.0/turnloop/context/memory.py +120 -0
- turnloop-0.1.0/turnloop/core/__init__.py +0 -0
- turnloop-0.1.0/turnloop/core/events.py +145 -0
- turnloop-0.1.0/turnloop/core/ids.py +29 -0
- turnloop-0.1.0/turnloop/core/messages.py +217 -0
- turnloop-0.1.0/turnloop/core/tokens.py +104 -0
- turnloop-0.1.0/turnloop/diagnostics.py +233 -0
- turnloop-0.1.0/turnloop/errors.py +64 -0
- turnloop-0.1.0/turnloop/experiments/__init__.py +0 -0
- turnloop-0.1.0/turnloop/experiments/configs/bakeoff.yaml +50 -0
- turnloop-0.1.0/turnloop/experiments/configs/ceiling-check.yaml +31 -0
- turnloop-0.1.0/turnloop/experiments/configs/context-glm.yaml +59 -0
- turnloop-0.1.0/turnloop/experiments/configs/context.yaml +65 -0
- turnloop-0.1.0/turnloop/experiments/configs/glm-selfhosted.yaml +36 -0
- turnloop-0.1.0/turnloop/experiments/configs/groq-free.yaml +28 -0
- turnloop-0.1.0/turnloop/experiments/configs/hard-calibration.yaml +26 -0
- turnloop-0.1.0/turnloop/experiments/configs/hard-glm.yaml +41 -0
- turnloop-0.1.0/turnloop/experiments/configs/loop.yaml +34 -0
- turnloop-0.1.0/turnloop/experiments/configs/nvidia-smoke.yaml +22 -0
- turnloop-0.1.0/turnloop/experiments/configs/reliability.yaml +44 -0
- turnloop-0.1.0/turnloop/experiments/configs/rewrite-calibration.yaml +24 -0
- turnloop-0.1.0/turnloop/experiments/configs/smoke.yaml +22 -0
- turnloop-0.1.0/turnloop/experiments/graders.py +209 -0
- turnloop-0.1.0/turnloop/experiments/report.py +371 -0
- turnloop-0.1.0/turnloop/experiments/runner.py +495 -0
- turnloop-0.1.0/turnloop/experiments/suite/default.yaml +185 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/bulky/module_1.py +670 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/bulky/module_2.py +670 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/bulky/module_3.py +670 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/bulky/module_4.py +670 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/bulky/module_5.py +670 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/bulky/module_6.py +672 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/bulky/module_7.py +670 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/bulky/module_8.py +670 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/circular_import/models.py +11 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/circular_import/services.py +15 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/circular_import/test_cancel.py +12 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/cli_flag/app.py +16 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/cross_file_contract/decode.py +7 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/cross_file_contract/encode.py +10 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/cross_file_contract/test_roundtrip.py +11 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/cross_file_contract/test_wire_format.py +7 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/empty/.keep +1 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/failing_test/calc.py +14 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/failing_test/test_calc.py +17 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/generate_bulky.py +80 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/grep_edit/ingest.py +5 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/grep_edit/load.py +5 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/grep_edit/transform.py +5 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/misleading_traceback/checkout.py +21 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/misleading_traceback/invoice.py +8 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/misleading_traceback/pricing.py +11 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/misleading_traceback/test_checkout.py +12 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/misleading_traceback/test_invoice.py +6 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/needle/inventory.py +18 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/needle/pricing.py +17 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/needle/shipping.py +13 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/regression_trap/test_validators.py +14 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/regression_trap/validators.py +23 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/rename/billing.py +7 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/rename/report.py +5 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/rename/test_billing.py +11 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/spec/parser.py +19 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/spec/test_parser.py +28 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/subtle_spec_edge/leaderboard.py +12 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/subtle_spec_edge/test_leaderboard.py +28 -0
- turnloop-0.1.0/turnloop/experiments/suite/fixtures/util/util.py +9 -0
- turnloop-0.1.0/turnloop/hooks/__init__.py +0 -0
- turnloop-0.1.0/turnloop/hooks/runner.py +221 -0
- turnloop-0.1.0/turnloop/mcp/__init__.py +0 -0
- turnloop-0.1.0/turnloop/mcp/adapter.py +109 -0
- turnloop-0.1.0/turnloop/mcp/client.py +299 -0
- turnloop-0.1.0/turnloop/permissions/__init__.py +0 -0
- turnloop-0.1.0/turnloop/permissions/engine.py +211 -0
- turnloop-0.1.0/turnloop/permissions/rules.py +325 -0
- turnloop-0.1.0/turnloop/providers/__init__.py +0 -0
- turnloop-0.1.0/turnloop/providers/anthropic.py +318 -0
- turnloop-0.1.0/turnloop/providers/base.py +329 -0
- turnloop-0.1.0/turnloop/providers/gemini.py +217 -0
- turnloop-0.1.0/turnloop/providers/mock.py +226 -0
- turnloop-0.1.0/turnloop/providers/openai_compat.py +357 -0
- turnloop-0.1.0/turnloop/providers/pricing.py +148 -0
- turnloop-0.1.0/turnloop/providers/registry.py +75 -0
- turnloop-0.1.0/turnloop/providers/sse.py +114 -0
- turnloop-0.1.0/turnloop/sessions/__init__.py +0 -0
- turnloop-0.1.0/turnloop/sessions/models.py +139 -0
- turnloop-0.1.0/turnloop/sessions/store.py +271 -0
- turnloop-0.1.0/turnloop/tools/__init__.py +0 -0
- turnloop-0.1.0/turnloop/tools/ask.py +133 -0
- turnloop-0.1.0/turnloop/tools/base.py +286 -0
- turnloop-0.1.0/turnloop/tools/bash.py +423 -0
- turnloop-0.1.0/turnloop/tools/builtin.py +63 -0
- turnloop-0.1.0/turnloop/tools/edit.py +238 -0
- turnloop-0.1.0/turnloop/tools/glob.py +235 -0
- turnloop-0.1.0/turnloop/tools/grep.py +314 -0
- turnloop-0.1.0/turnloop/tools/read.py +151 -0
- turnloop-0.1.0/turnloop/tools/runner.py +284 -0
- turnloop-0.1.0/turnloop/tools/shell.py +222 -0
- turnloop-0.1.0/turnloop/tools/skill.py +89 -0
- turnloop-0.1.0/turnloop/tools/task.py +161 -0
- turnloop-0.1.0/turnloop/tools/textio.py +87 -0
- turnloop-0.1.0/turnloop/tools/todo.py +140 -0
- turnloop-0.1.0/turnloop/tools/webfetch.py +235 -0
- turnloop-0.1.0/turnloop/tools/write.py +97 -0
- turnloop-0.1.0/turnloop/tui/__init__.py +0 -0
- turnloop-0.1.0/turnloop/tui/app.py +330 -0
- turnloop-0.1.0/turnloop/tui/app.tcss +84 -0
- turnloop-0.1.0/turnloop/tui/bridge.py +142 -0
- turnloop-0.1.0/turnloop/tui/widgets/__init__.py +0 -0
- turnloop-0.1.0/turnloop/tui/widgets/permission.py +131 -0
- turnloop-0.1.0/turnloop/tui/widgets/status.py +110 -0
- turnloop-0.1.0/turnloop/tui/widgets/transcript.py +146 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
strategy:
|
|
11
|
+
fail-fast: false
|
|
12
|
+
matrix:
|
|
13
|
+
# Windows is not optional here: shell resolution and process-tree kill are
|
|
14
|
+
# platform-specific and are exactly where this project's bugs live.
|
|
15
|
+
os: [ubuntu-latest, windows-latest]
|
|
16
|
+
python: ["3.11", "3.13"]
|
|
17
|
+
runs-on: ${{ matrix.os }}
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python }}
|
|
24
|
+
|
|
25
|
+
- run: pip install -e ".[dev]"
|
|
26
|
+
|
|
27
|
+
- name: Tests
|
|
28
|
+
# Network is blocked at the transport layer by conftest, so `not live` is
|
|
29
|
+
# belt and braces rather than the only guard.
|
|
30
|
+
run: pytest -m "not live"
|
|
31
|
+
|
|
32
|
+
- name: Lint
|
|
33
|
+
run: ruff check turnloop tests
|
|
34
|
+
|
|
35
|
+
- name: Types
|
|
36
|
+
run: mypy turnloop
|