Code Metrics¶
Generated: 2026-06-05 04:09 UTC
Lines of Code¶
| Files | Code | Comment | Blank | Total | |
|---|---|---|---|---|---|
| Source | 98 | 12 306 | 3 108 | 1 154 | 16 568 |
| Tests | 40 | 11 590 | 968 | 1 095 | 13 653 |
| Combined | 138 | 23 896 | 4 076 | 2 249 | 30 221 |
- Comment/code ratio: 25%
- Test/source ratio: 94.2%
Source by module (click to expand)
| Module | Files | Code | Comment | Blank |
|---|---|---|---|---|
terok_executor/ |
98 | 12 306 | 3 108 | 1 154 |
terok_executor/_util/ |
2 | 47 | 12 | 6 |
terok_executor/_util/__init__.py |
— | 4 | 9 | 3 |
terok_executor/_util/_timezone.py |
— | 43 | 3 | 3 |
terok_executor/acp/ |
8 | 1 220 | 382 | 59 |
terok_executor/acp/__init__.py |
— | 48 | 18 | 3 |
terok_executor/acp/cache.py |
— | 58 | 22 | 1 |
terok_executor/acp/daemon.py |
— | 184 | 58 | 8 |
terok_executor/acp/endpoint.py |
— | 20 | 12 | 3 |
terok_executor/acp/model_options.py |
— | 97 | 55 | 7 |
terok_executor/acp/probe.py |
— | 124 | 27 | 5 |
terok_executor/acp/proxy.py |
— | 479 | 144 | 17 |
terok_executor/acp/roster.py |
— | 210 | 46 | 15 |
terok_executor/container/ |
7 | 2 513 | 617 | 173 |
terok_executor/container/build.py |
— | 813 | 251 | 69 |
terok_executor/container/cache.py |
— | 102 | 17 | 8 |
terok_executor/container/env.py |
— | 487 | 70 | 40 |
terok_executor/container/inject.py |
— | 12 | 20 | 9 |
terok_executor/container/runner.py |
— | 990 | 200 | 40 |
terok_executor/container/sidecar.py |
— | 109 | 51 | 6 |
terok_executor/credentials/ |
6 | 1 790 | 382 | 153 |
terok_executor/credentials/auth.py |
— | 848 | 143 | 36 |
terok_executor/credentials/extractors.py |
— | 162 | 39 | 16 |
terok_executor/credentials/vault_commands.py |
— | 130 | 43 | 29 |
terok_executor/credentials/vault_config.py |
— | 469 | 104 | 39 |
terok_executor/credentials/vendor_files.py |
— | 181 | 44 | 32 |
terok_executor/integrations/ |
2 | 51 | 87 | 4 |
terok_executor/integrations/__init__.py |
— | 1 | 14 | 2 |
terok_executor/integrations/sandbox.py |
— | 50 | 73 | 2 |
terok_executor/provider/ |
5 | 977 | 191 | 69 |
terok_executor/provider/agents.py |
— | 360 | 57 | 12 |
terok_executor/provider/instructions.py |
— | 63 | 42 | 21 |
terok_executor/provider/providers.py |
— | 442 | 39 | 15 |
terok_executor/provider/wrappers.py |
— | 112 | 42 | 20 |
terok_executor/resources/ |
51 | 2 534 | 766 | 374 |
terok_executor/resources/agents/ |
16 | 640 | 159 | 133 |
terok_executor/resources/instructions/ |
2 | 36 | 3 | 19 |
terok_executor/resources/scripts/ |
26 | 1 563 | 580 | 209 |
terok_executor/resources/scripts/mistral-model-sync.py |
— | 269 | 21 | 2 |
terok_executor/resources/scripts/terok-trust-workspace.py |
— | 69 | 20 | 15 |
terok_executor/resources/templates/ |
2 | 241 | 13 | 4 |
terok_executor/resources/tmux/ |
1 | 0 | 3 | 1 |
terok_executor/resources/toad-agents/ |
3 | 54 | 5 | 7 |
terok_executor/roster/ |
4 | 1 033 | 189 | 109 |
terok_executor/roster/__init__.py |
— | 8 | 7 | 3 |
terok_executor/roster/loader.py |
— | 522 | 88 | 32 |
terok_executor/roster/schema.py |
— | 371 | 67 | 50 |
terok_executor/roster/types.py |
— | 132 | 27 | 24 |
terok_executor/__init__.py |
— | 102 | 53 | 24 |
terok_executor/_tree.py |
— | 31 | 2 | 6 |
terok_executor/cli.py |
— | 69 | 19 | 3 |
terok_executor/commands.py |
— | 811 | 113 | 31 |
terok_executor/config.py |
— | 16 | 12 | 3 |
terok_executor/config_schema.py |
— | 110 | 31 | 9 |
terok_executor/doctor.py |
— | 198 | 76 | 51 |
terok_executor/krun.py |
— | 281 | 71 | 17 |
terok_executor/paths.py |
— | 7 | 25 | 8 |
terok_executor/preflight.py |
— | 358 | 46 | 43 |
terok_executor/sandbox.py |
— | 29 | 20 | 4 |
terok_executor/storage.py |
— | 96 | 8 | 6 |
terok_executor/vault_addr.py |
— | 33 | 6 | 2 |
Architecture¶
Module Dependency Graph¶
graph TD
terok_executor.vault_addr --> terok_executor.integrations.sandbox
terok_executor.config_schema --> terok_executor.config
terok_executor.config_schema --> terok_executor.integrations.sandbox
terok_executor.roster.schema --> terok_executor.credentials.auth
terok_executor.roster.schema --> terok_executor.provider.providers
terok_executor.roster.schema --> terok_executor.roster.types
terok_executor.roster.loader --> terok_executor.credentials.auth
terok_executor.roster.loader --> terok_executor.integrations.sandbox
terok_executor.roster.loader --> terok_executor.provider.providers
terok_executor.roster.loader --> terok_executor.roster.schema
terok_executor.roster.loader --> terok_executor.roster.types
terok_executor.roster.loader --> terok_executor.doctor
terok_executor.roster --> terok_executor.roster.loader
terok_executor.provider.wrappers --> terok_executor.provider.providers
terok_executor.provider.instructions --> terok_executor.provider.providers
terok_executor.provider.agents --> terok_executor.provider.providers
terok_executor.provider.agents --> terok_executor.provider.wrappers
terok_executor.container.build --> terok_executor.roster
terok_executor.container.cache --> terok_executor.integrations.sandbox
terok_executor.container.env --> terok_executor._util
terok_executor.container.env --> terok_executor.credentials.vault_commands
terok_executor.container.env --> terok_executor.credentials.vault_config
terok_executor.container.env --> terok_executor.integrations.sandbox
terok_executor.container.env --> terok_executor.paths
terok_executor.container.env --> terok_executor.vault_addr
terok_executor.container.runner --> terok_executor._util
terok_executor.container.runner --> terok_executor.container.build
terok_executor.container.runner --> terok_executor.container.cache
terok_executor.container.runner --> terok_executor.container.env
terok_executor.container.runner --> terok_executor.container.sidecar
terok_executor.container.runner --> terok_executor.integrations.sandbox
terok_executor.container.runner --> terok_executor.paths
terok_executor.container.runner --> terok_executor.provider.agents
terok_executor.container.runner --> terok_executor.provider.instructions
terok_executor.container.runner --> terok_executor.roster
terok_executor.credentials.extractors --> terok_executor.credentials.vendor_files
terok_executor.credentials.auth --> terok_executor.credentials.extractors
terok_executor.credentials.auth --> terok_executor.integrations.sandbox
terok_executor.credentials.auth --> terok_executor.paths
terok_executor.credentials.vault_config --> terok_executor.integrations.sandbox
terok_executor.credentials.vault_config --> terok_executor.paths
terok_executor.credentials.vault_config --> terok_executor.vault_addr
terok_executor.credentials.vault_config --> terok_executor.roster
terok_executor.credentials.vault_commands --> terok_executor.credentials.vendor_files
terok_executor.credentials.vault_commands --> terok_executor.integrations.sandbox
terok_executor.credentials.vault_commands --> terok_executor.paths
terok_executor.credentials.vault_commands --> terok_executor.roster
terok_executor.sandbox --> terok_executor.integrations.sandbox
terok_executor.sandbox --> terok_executor.roster
terok_executor.acp --> terok_executor.container.build
terok_executor.acp --> terok_executor.integrations.sandbox
terok_executor.preflight --> terok_executor.container.build
terok_executor.preflight --> terok_executor.credentials.auth
terok_executor.preflight --> terok_executor.credentials.vault_config
terok_executor.preflight --> terok_executor.integrations.sandbox
terok_executor.preflight --> terok_executor.paths
terok_executor.preflight --> terok_executor.sandbox
terok_executor.preflight --> terok_executor.roster
terok_executor.commands --> terok_executor.acp
terok_executor.commands --> terok_executor.config_schema
terok_executor.commands --> terok_executor.container.build
terok_executor.commands --> terok_executor.container.runner
terok_executor.commands --> terok_executor.credentials.auth
terok_executor.commands --> terok_executor.credentials.vault_config
terok_executor.commands --> terok_executor.integrations.sandbox
terok_executor.commands --> terok_executor.paths
terok_executor.commands --> terok_executor.preflight
terok_executor.commands --> terok_executor.roster.loader
terok_executor.commands --> terok_executor.sandbox
terok_executor.commands --> terok_executor.roster
terok_executor._tree --> terok_executor.commands
terok_executor._tree --> terok_executor.credentials.vault_commands
terok_executor.cli --> terok_executor._tree
terok_executor.doctor --> terok_executor.integrations.sandbox
terok_executor.doctor --> terok_executor.vault_addr
terok_executor --> terok_executor._tree
terok_executor --> terok_executor.acp
terok_executor --> terok_executor.commands
terok_executor --> terok_executor.config_schema
terok_executor --> terok_executor.container.build
terok_executor --> terok_executor.container.cache
terok_executor --> terok_executor.container.env
terok_executor --> terok_executor.container.runner
terok_executor --> terok_executor.credentials.auth
terok_executor --> terok_executor.credentials.vault_commands
terok_executor --> terok_executor.integrations.sandbox
terok_executor --> terok_executor.paths
terok_executor --> terok_executor.provider.agents
terok_executor --> terok_executor.provider.instructions
terok_executor --> terok_executor.provider.providers
terok_executor --> terok_executor.roster
terok_executor --> terok_executor.sandbox
terok_executor.integrations.sandbox
terok_executor.paths
terok_executor._util
terok_executor.resources
terok_executor.config
terok_executor.roster.types
terok_executor.provider.providers
terok_executor.container.sidecar
terok_executor.credentials.vendor_files
Module Boundaries¶
33 modules, 92 dependency edges — all boundaries validated.
Module Summary¶
33 modules (click to expand)
| Module | Deps | Description |
|---|---|---|
terok_executor.integrations.sandbox |
0 | contract enforces that no other module reaches past it. |
terok_executor.paths |
0 | Path resolution — standalone XDG/FHS helpers |
terok_executor._util |
0 | Vendored utilities — standalone, no internal deps |
terok_executor.resources |
0 | Bundled resources — data files |
terok_executor.vault_addr |
1 | config patcher, and doctor. Depends on terok_sandbox symbols via the integrations adapter. |
terok_executor.config |
0 | module hosts only the path helper they call. |
terok_executor.config_schema |
2 | which is why it imports the sandbox YAML writer + the path helper. |
terok_executor.roster.types |
0 | Runtime dataclasses — pure data, zero deps |
terok_executor.roster.schema |
3 | Pydantic schema — strict YAML validation, projects onto runtime dataclasses |
terok_executor.roster.loader |
6 | YAML agent roster — loads bundled + user agent definitions, drives the schema |
terok_executor.roster |
1 | Roster package waypoint (re-exports from loader) |
terok_executor.provider.providers |
0 | behaviour live together. |
terok_executor.provider.wrappers |
1 | Shell wrapper generation |
terok_executor.provider.instructions |
1 | Instruction resolution |
terok_executor.provider.agents |
2 | Agent config dir preparation + wrapper generation |
terok_executor.container.build |
1 | Build resource staging — standalone |
terok_executor.container.cache |
1 | Clone-cache workspace seeding — copies cached clone into task workspace |
terok_executor.container.env |
6 | Container environment assembly — single source of truth for env + volumes |
terok_executor.container.sidecar |
0 | so no runtime depends_on is needed. |
terok_executor.container.runner |
10 | Agent runner facade — composes sandbox + agent config + container launch |
terok_executor.credentials.vendor_files |
0 | Lax (extra="ignore"); zero internal deps. |
terok_executor.credentials.extractors |
1 | Credential extractors — per-provider credential file parsers |
terok_executor.credentials.auth |
3 | Auth flows |
terok_executor.credentials.vault_config |
4 | Post-auth shared config patching (vault URL writes) |
terok_executor.credentials.vault_commands |
4 | Credential proxy CLI commands — wraps sandbox lifecycle + route generation |
terok_executor.sandbox |
2 | delegation to the sandbox aggregator and doesn't live here. |
terok_executor.acp |
2 | pull the runner along by accident. |
terok_executor.preflight |
7 | Pre-launch checks + interactive fixers for terok-executor run |
terok_executor.commands |
12 | Command registry — defines all CLI commands |
terok_executor._tree |
2 | dep graph and nothing else may import it. |
terok_executor.cli |
1 | CLI entry point — wires command registry to argparse |
terok_executor.doctor |
2 | Agent-level container health checks |
terok_executor |
17 | Package root — public API re-exports + roster bootstrap |
Test Coverage¶
Overall line coverage: 84.1% (3818/4542 statements).
Each rectangle is a source file. Area is proportional to the number of statements; colour encodes the coverage percentage (green = fully covered, red = uncovered). Files are grouped by the first 3 directory levels.
Cognitive Complexity¶
Threshold: 15 (functions above this are listed below)
Warning
complexipy cache not found — skipping complexity report.
Dead Code Analysis¶
No dead code found at 80% confidence threshold.
Docstring Coverage¶
- Needed: 8; Found: 7; Missing: 1; Coverage: 87.5%
- Needed: 37; Found: 36; Missing: 1; Coverage: 97.3%
- Needed: 12; Found: 10; Missing: 2; Coverage: 83.3%
- Needed: 21; Found: 20; Missing: 1; Coverage: 95.2%
- Needed: 51; Found: 50; Missing: 1; Coverage: 98.0%
- Needed: 26; Found: 25; Missing: 1; Coverage: 96.2%
- Needed: 34; Found: 32; Missing: 2; Coverage: 94.1%
- Needed: 519 - Found: 510 - Missing: 9
- Total coverage: 98.3% - Grade: Excellent
Generated by scc, complexipy, vulture, tach, and docstr-coverage.