terminal-agent-cli 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.
Files changed (142) hide show
  1. terminal_agent_cli-0.1.0/.env.example +17 -0
  2. terminal_agent_cli-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
  3. terminal_agent_cli-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +30 -0
  4. terminal_agent_cli-0.1.0/.github/pull_request_template.md +37 -0
  5. terminal_agent_cli-0.1.0/.github/workflows/ci.yml +44 -0
  6. terminal_agent_cli-0.1.0/.gitignore +85 -0
  7. terminal_agent_cli-0.1.0/CODE_OF_CONDUCT.md +121 -0
  8. terminal_agent_cli-0.1.0/CONTRIBUTING.md +166 -0
  9. terminal_agent_cli-0.1.0/LICENSE +23 -0
  10. terminal_agent_cli-0.1.0/PKG-INFO +438 -0
  11. terminal_agent_cli-0.1.0/README.md +399 -0
  12. terminal_agent_cli-0.1.0/SECURITY.md +70 -0
  13. terminal_agent_cli-0.1.0/benchmarks/__init__.py +2 -0
  14. terminal_agent_cli-0.1.0/benchmarks/runner.py +193 -0
  15. terminal_agent_cli-0.1.0/benchmarks/tasks/task_01_auth_expiry/repo/auth.py +11 -0
  16. terminal_agent_cli-0.1.0/benchmarks/tasks/task_01_auth_expiry/repo/test_auth.py +16 -0
  17. terminal_agent_cli-0.1.0/benchmarks/tasks/task_01_auth_expiry/solution/auth.py +10 -0
  18. terminal_agent_cli-0.1.0/benchmarks/tasks/task_01_auth_expiry/task.yaml +15 -0
  19. terminal_agent_cli-0.1.0/benchmarks/tasks/task_02_payment_retry/repo/payment.py +10 -0
  20. terminal_agent_cli-0.1.0/benchmarks/tasks/task_02_payment_retry/repo/test_payment.py +38 -0
  21. terminal_agent_cli-0.1.0/benchmarks/tasks/task_02_payment_retry/solution/payment.py +15 -0
  22. terminal_agent_cli-0.1.0/benchmarks/tasks/task_02_payment_retry/task.yaml +14 -0
  23. terminal_agent_cli-0.1.0/benchmarks/tasks/task_03_rate_limiter/repo/limiter.py +19 -0
  24. terminal_agent_cli-0.1.0/benchmarks/tasks/task_03_rate_limiter/repo/test_limiter.py +22 -0
  25. terminal_agent_cli-0.1.0/benchmarks/tasks/task_03_rate_limiter/solution/limiter.py +22 -0
  26. terminal_agent_cli-0.1.0/benchmarks/tasks/task_03_rate_limiter/task.yaml +13 -0
  27. terminal_agent_cli-0.1.0/benchmarks/tasks/task_04_user_pagination/repo/test_users.py +26 -0
  28. terminal_agent_cli-0.1.0/benchmarks/tasks/task_04_user_pagination/repo/users.py +13 -0
  29. terminal_agent_cli-0.1.0/benchmarks/tasks/task_04_user_pagination/solution/users.py +15 -0
  30. terminal_agent_cli-0.1.0/benchmarks/tasks/task_04_user_pagination/task.yaml +13 -0
  31. terminal_agent_cli-0.1.0/benchmarks/tasks/task_05_cache_invalidation/repo/cache.py +20 -0
  32. terminal_agent_cli-0.1.0/benchmarks/tasks/task_05_cache_invalidation/repo/test_cache.py +28 -0
  33. terminal_agent_cli-0.1.0/benchmarks/tasks/task_05_cache_invalidation/solution/cache.py +24 -0
  34. terminal_agent_cli-0.1.0/benchmarks/tasks/task_05_cache_invalidation/task.yaml +13 -0
  35. terminal_agent_cli-0.1.0/benchmarks/tasks/task_06_sql_injection_guard/repo/query_builder.py +9 -0
  36. terminal_agent_cli-0.1.0/benchmarks/tasks/task_06_sql_injection_guard/repo/test_query_builder.py +19 -0
  37. terminal_agent_cli-0.1.0/benchmarks/tasks/task_06_sql_injection_guard/solution/query_builder.py +11 -0
  38. terminal_agent_cli-0.1.0/benchmarks/tasks/task_06_sql_injection_guard/task.yaml +13 -0
  39. terminal_agent_cli-0.1.0/benchmarks/tasks/task_07_env_config_parser/repo/env_parser.py +8 -0
  40. terminal_agent_cli-0.1.0/benchmarks/tasks/task_07_env_config_parser/repo/test_env_parser.py +21 -0
  41. terminal_agent_cli-0.1.0/benchmarks/tasks/task_07_env_config_parser/solution/env_parser.py +16 -0
  42. terminal_agent_cli-0.1.0/benchmarks/tasks/task_07_env_config_parser/task.yaml +13 -0
  43. terminal_agent_cli-0.1.0/benchmarks/tasks/task_08_jwt_signature_verify/repo/signer.py +11 -0
  44. terminal_agent_cli-0.1.0/benchmarks/tasks/task_08_jwt_signature_verify/repo/test_signer.py +22 -0
  45. terminal_agent_cli-0.1.0/benchmarks/tasks/task_08_jwt_signature_verify/solution/signer.py +13 -0
  46. terminal_agent_cli-0.1.0/benchmarks/tasks/task_08_jwt_signature_verify/task.yaml +13 -0
  47. terminal_agent_cli-0.1.0/benchmarks/tasks/task_09_webhook_signature/repo/test_webhook.py +23 -0
  48. terminal_agent_cli-0.1.0/benchmarks/tasks/task_09_webhook_signature/repo/webhook.py +9 -0
  49. terminal_agent_cli-0.1.0/benchmarks/tasks/task_09_webhook_signature/solution/webhook.py +9 -0
  50. terminal_agent_cli-0.1.0/benchmarks/tasks/task_09_webhook_signature/task.yaml +13 -0
  51. terminal_agent_cli-0.1.0/benchmarks/tasks/task_10_csv_stream_parser/repo/csv_stream.py +9 -0
  52. terminal_agent_cli-0.1.0/benchmarks/tasks/task_10_csv_stream_parser/repo/test_csv_stream.py +22 -0
  53. terminal_agent_cli-0.1.0/benchmarks/tasks/task_10_csv_stream_parser/solution/csv_stream.py +21 -0
  54. terminal_agent_cli-0.1.0/benchmarks/tasks/task_10_csv_stream_parser/task.yaml +13 -0
  55. terminal_agent_cli-0.1.0/pyproject.toml +76 -0
  56. terminal_agent_cli-0.1.0/src/terminal_agent/__init__.py +7 -0
  57. terminal_agent_cli-0.1.0/src/terminal_agent/__main__.py +7 -0
  58. terminal_agent_cli-0.1.0/src/terminal_agent/agent/__init__.py +9 -0
  59. terminal_agent_cli-0.1.0/src/terminal_agent/agent/loop.py +338 -0
  60. terminal_agent_cli-0.1.0/src/terminal_agent/checkpoints/__init__.py +9 -0
  61. terminal_agent_cli-0.1.0/src/terminal_agent/checkpoints/manager.py +151 -0
  62. terminal_agent_cli-0.1.0/src/terminal_agent/cli/commands/__init__.py +26 -0
  63. terminal_agent_cli-0.1.0/src/terminal_agent/cli/commands/checkpoint.py +76 -0
  64. terminal_agent_cli-0.1.0/src/terminal_agent/cli/commands/clean.py +170 -0
  65. terminal_agent_cli-0.1.0/src/terminal_agent/cli/commands/config_cmd.py +32 -0
  66. terminal_agent_cli-0.1.0/src/terminal_agent/cli/commands/diff.py +45 -0
  67. terminal_agent_cli-0.1.0/src/terminal_agent/cli/commands/doctor.py +136 -0
  68. terminal_agent_cli-0.1.0/src/terminal_agent/cli/commands/resume.py +109 -0
  69. terminal_agent_cli-0.1.0/src/terminal_agent/cli/commands/run.py +184 -0
  70. terminal_agent_cli-0.1.0/src/terminal_agent/cli/commands/setup.py +229 -0
  71. terminal_agent_cli-0.1.0/src/terminal_agent/cli/commands/status.py +62 -0
  72. terminal_agent_cli-0.1.0/src/terminal_agent/cli/commands/test.py +38 -0
  73. terminal_agent_cli-0.1.0/src/terminal_agent/cli/commands/trace.py +60 -0
  74. terminal_agent_cli-0.1.0/src/terminal_agent/cli/main.py +94 -0
  75. terminal_agent_cli-0.1.0/src/terminal_agent/cli/theme.py +55 -0
  76. terminal_agent_cli-0.1.0/src/terminal_agent/cli/ui.py +147 -0
  77. terminal_agent_cli-0.1.0/src/terminal_agent/config/__init__.py +30 -0
  78. terminal_agent_cli-0.1.0/src/terminal_agent/config/schema.py +100 -0
  79. terminal_agent_cli-0.1.0/src/terminal_agent/config/settings.py +85 -0
  80. terminal_agent_cli-0.1.0/src/terminal_agent/context/__init__.py +11 -0
  81. terminal_agent_cli-0.1.0/src/terminal_agent/context/engine.py +173 -0
  82. terminal_agent_cli-0.1.0/src/terminal_agent/context/ranker.py +87 -0
  83. terminal_agent_cli-0.1.0/src/terminal_agent/git/__init__.py +10 -0
  84. terminal_agent_cli-0.1.0/src/terminal_agent/git/adapter.py +219 -0
  85. terminal_agent_cli-0.1.0/src/terminal_agent/planner/__init__.py +10 -0
  86. terminal_agent_cli-0.1.0/src/terminal_agent/planner/contract.py +58 -0
  87. terminal_agent_cli-0.1.0/src/terminal_agent/planner/planner.py +30 -0
  88. terminal_agent_cli-0.1.0/src/terminal_agent/providers/__init__.py +30 -0
  89. terminal_agent_cli-0.1.0/src/terminal_agent/providers/anthropic_provider.py +141 -0
  90. terminal_agent_cli-0.1.0/src/terminal_agent/providers/base.py +57 -0
  91. terminal_agent_cli-0.1.0/src/terminal_agent/providers/detector.py +397 -0
  92. terminal_agent_cli-0.1.0/src/terminal_agent/providers/factory.py +29 -0
  93. terminal_agent_cli-0.1.0/src/terminal_agent/providers/gemini_provider.py +130 -0
  94. terminal_agent_cli-0.1.0/src/terminal_agent/providers/mock_provider.py +80 -0
  95. terminal_agent_cli-0.1.0/src/terminal_agent/providers/ollama_provider.py +124 -0
  96. terminal_agent_cli-0.1.0/src/terminal_agent/providers/openai_provider.py +124 -0
  97. terminal_agent_cli-0.1.0/src/terminal_agent/recovery/__init__.py +10 -0
  98. terminal_agent_cli-0.1.0/src/terminal_agent/recovery/classifier.py +64 -0
  99. terminal_agent_cli-0.1.0/src/terminal_agent/recovery/strategies.py +62 -0
  100. terminal_agent_cli-0.1.0/src/terminal_agent/sandbox/__init__.py +13 -0
  101. terminal_agent_cli-0.1.0/src/terminal_agent/sandbox/base.py +41 -0
  102. terminal_agent_cli-0.1.0/src/terminal_agent/sandbox/docker.py +129 -0
  103. terminal_agent_cli-0.1.0/src/terminal_agent/sandbox/local.py +129 -0
  104. terminal_agent_cli-0.1.0/src/terminal_agent/security/__init__.py +13 -0
  105. terminal_agent_cli-0.1.0/src/terminal_agent/security/classifier.py +151 -0
  106. terminal_agent_cli-0.1.0/src/terminal_agent/security/policy.py +51 -0
  107. terminal_agent_cli-0.1.0/src/terminal_agent/security/secrets.py +105 -0
  108. terminal_agent_cli-0.1.0/src/terminal_agent/session/__init__.py +33 -0
  109. terminal_agent_cli-0.1.0/src/terminal_agent/session/manager.py +195 -0
  110. terminal_agent_cli-0.1.0/src/terminal_agent/session/models.py +160 -0
  111. terminal_agent_cli-0.1.0/src/terminal_agent/telemetry/__init__.py +12 -0
  112. terminal_agent_cli-0.1.0/src/terminal_agent/telemetry/events.py +87 -0
  113. terminal_agent_cli-0.1.0/src/terminal_agent/telemetry/metrics.py +38 -0
  114. terminal_agent_cli-0.1.0/src/terminal_agent/tools/__init__.py +33 -0
  115. terminal_agent_cli-0.1.0/src/terminal_agent/tools/base.py +59 -0
  116. terminal_agent_cli-0.1.0/src/terminal_agent/tools/checkpoint_tools.py +72 -0
  117. terminal_agent_cli-0.1.0/src/terminal_agent/tools/command_tools.py +125 -0
  118. terminal_agent_cli-0.1.0/src/terminal_agent/tools/file_tools.py +340 -0
  119. terminal_agent_cli-0.1.0/src/terminal_agent/tools/git_tools.py +124 -0
  120. terminal_agent_cli-0.1.0/src/terminal_agent/tools/registry.py +109 -0
  121. terminal_agent_cli-0.1.0/src/terminal_agent/verifier/__init__.py +13 -0
  122. terminal_agent_cli-0.1.0/src/terminal_agent/verifier/assertions.py +115 -0
  123. terminal_agent_cli-0.1.0/src/terminal_agent/verifier/engine.py +125 -0
  124. terminal_agent_cli-0.1.0/src/terminal_agent/verifier/runners.py +80 -0
  125. terminal_agent_cli-0.1.0/terminal-agent.config.yaml +43 -0
  126. terminal_agent_cli-0.1.0/tests/e2e/test_full_agent_flow.py +148 -0
  127. terminal_agent_cli-0.1.0/tests/integration/test_git_integration.py +39 -0
  128. terminal_agent_cli-0.1.0/tests/integration/test_sandbox.py +27 -0
  129. terminal_agent_cli-0.1.0/tests/integration/test_session_persistence.py +56 -0
  130. terminal_agent_cli-0.1.0/tests/unit/test_benchmarks.py +32 -0
  131. terminal_agent_cli-0.1.0/tests/unit/test_checkpoints.py +36 -0
  132. terminal_agent_cli-0.1.0/tests/unit/test_clean_command.py +115 -0
  133. terminal_agent_cli-0.1.0/tests/unit/test_cli_version.py +21 -0
  134. terminal_agent_cli-0.1.0/tests/unit/test_config.py +37 -0
  135. terminal_agent_cli-0.1.0/tests/unit/test_context.py +44 -0
  136. terminal_agent_cli-0.1.0/tests/unit/test_provider_detection.py +211 -0
  137. terminal_agent_cli-0.1.0/tests/unit/test_providers.py +30 -0
  138. terminal_agent_cli-0.1.0/tests/unit/test_recovery.py +39 -0
  139. terminal_agent_cli-0.1.0/tests/unit/test_security.py +74 -0
  140. terminal_agent_cli-0.1.0/tests/unit/test_tools.py +65 -0
  141. terminal_agent_cli-0.1.0/tests/unit/test_verifier.py +29 -0
  142. terminal_agent_cli-0.1.0/tests/validation/test_comprehensive_validation.py +307 -0
@@ -0,0 +1,17 @@
1
+ # Terminal Agent Environment Variables Configuration
2
+ # Optional: Set provider overrides
3
+ TERMINAL_AGENT_PROVIDER=mock
4
+ TERMINAL_AGENT_MODEL=mock-model
5
+
6
+ # For Ollama Provider (Local open models)
7
+ OLLAMA_HOST=http://localhost:11434
8
+
9
+ # For OpenAI Provider
10
+ # OPENAI_API_KEY=sk-...
11
+
12
+ # For Anthropic Provider
13
+ # ANTHROPIC_API_KEY=sk-ant-...
14
+
15
+ # For Google Gemini Provider
16
+ # GEMINI_API_KEY=AIzaSy...
17
+
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Create a report to help us reproduce and resolve an issue
4
+ title: "[BUG] "
5
+ labels: ["bug"]
6
+ assignees: ""
7
+ ---
8
+
9
+ ## Description
10
+ A clear and concise description of the bug.
11
+
12
+ ## Steps to Reproduce
13
+ 1. Run command: `terminal-agent run "..."`
14
+ 2. Configure provider: `...`
15
+ 3. Execute step: `...`
16
+ 4. Observe failure.
17
+
18
+ ## Expected Behavior
19
+ What should have occurred (e.g., successful repair, specific failure category classification, or clean rollback).
20
+
21
+ ## Actual Behavior
22
+ What actually occurred (include error messages or stack traces).
23
+
24
+ ## Environment Details
25
+ - **Operating System**: (e.g., Linux Ubuntu 22.04, macOS 14.4, Windows 11)
26
+ - **Python Version**: (`python --version`, e.g., 3.11.8)
27
+ - **Terminal Agent Version**: (`terminal-agent --version` or git commit SHA)
28
+ - **Model Provider**: (e.g., Ollama / OpenAI / Anthropic / Gemini / Mock)
29
+ - **Sandbox Mode**: (e.g., Local / Docker)
30
+
31
+ ## Logs & Trace Output
32
+ ```bash
33
+ # Attach output of 'terminal-agent doctor' or 'terminal-agent trace <session_id>' if available
34
+ ```
35
+
36
+ ## Additional Context
37
+ Add any other context, repository layout, or screenshots about the problem here.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Suggest a new feature, provider adapter, tool, or architectural improvement
4
+ title: "[FEATURE] "
5
+ labels: ["enhancement"]
6
+ assignees: ""
7
+ ---
8
+
9
+ ## Problem & Use Case
10
+ Is your feature request related to a specific limitation or problem? (e.g., "I want to verify Rust projects using cargo test parser...")
11
+
12
+ ## Proposed Solution
13
+ A clear and concise description of what you want to happen and how it fits into the verify-first architecture.
14
+
15
+ ## Alternatives Considered
16
+ Describe any alternative solutions or workarounds you have considered.
17
+
18
+ ## Component Affected
19
+ - [ ] Agent Loop / Orchestrator (`src/terminal_agent/agent/`)
20
+ - [ ] Context Engine & Ranker (`src/terminal_agent/context/`)
21
+ - [ ] Independent Verifier (`src/terminal_agent/verifier/`)
22
+ - [ ] Security & Sandboxing (`src/terminal_agent/security/`, `src/terminal_agent/sandbox/`)
23
+ - [ ] Tool Registry (`src/terminal_agent/tools/`)
24
+ - [ ] Failure Classifier & Recovery (`src/terminal_agent/recovery/`)
25
+ - [ ] Model Providers (`src/terminal_agent/providers/`)
26
+ - [ ] CLI & UX (`src/terminal_agent/cli/`)
27
+ - [ ] Documentation / Benchmarks
28
+
29
+ ## Additional Context
30
+ Add any other context, mockups, or references about the feature request here.
@@ -0,0 +1,37 @@
1
+ ## Summary
2
+
3
+ Provide a concise summary of the changes proposed in this pull request.
4
+
5
+ ## Motivation & Context
6
+
7
+ Why is this change required? What problem does it solve or what feature does it introduce? (Link related issues with `Fixes #...` if applicable).
8
+
9
+ ## Changes Made
10
+
11
+ - **Component A**: Description of change
12
+ - **Component B**: Description of change
13
+
14
+ ## Testing Performed
15
+
16
+ Describe the testing performed to ensure functionality and non-regression:
17
+ - [ ] Automated Unit Tests: `pytest tests/ -v` (Attach output or count)
18
+ - [ ] SWE Benchmark Suite: `python -m benchmarks.runner`
19
+ - [ ] Manual CLI Verification: (e.g., `terminal-agent run "..."`)
20
+
21
+ ```text
22
+ # Paste test execution summary here
23
+ ```
24
+
25
+ ## Breaking Changes
26
+
27
+ Does this change introduce any breaking changes to existing CLI commands, configuration schemas, or APIs?
28
+ - [ ] No
29
+ - [ ] Yes (Explain migration path):
30
+
31
+ ## Checklist
32
+
33
+ - [ ] My code follows the code style and typing standards of this repository.
34
+ - [ ] I have verified that all existing and new tests pass locally.
35
+ - [ ] I have updated the documentation (`README.md`, `SECURITY.md`, etc.) where relevant.
36
+ - [ ] I have not committed any API keys, credentials, or secrets.
37
+ - [ ] I have added appropriate test cases covering the new behavior.
@@ -0,0 +1,44 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, master ]
6
+ pull_request:
7
+ branches: [ main, master ]
8
+
9
+ jobs:
10
+ test:
11
+ name: Test (Python ${{ matrix.python-version }})
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ python-version: ["3.10", "3.11", "3.12"]
17
+
18
+ steps:
19
+ - name: Checkout code
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Set up Python ${{ matrix.python-version }}
23
+ uses: actions/setup-python@v5
24
+ with:
25
+ python-version: ${{ matrix.python-version }}
26
+ cache: "pip"
27
+
28
+ - name: Configure Git for Testing
29
+ run: |
30
+ git config --global user.name "github-actions[bot]"
31
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
32
+
33
+ - name: Install dependencies
34
+ run: |
35
+ python -m pip install --upgrade pip
36
+ pip install -e ".[dev]"
37
+
38
+ - name: Run automated test suite
39
+ run: |
40
+ pytest tests/ -v
41
+
42
+ - name: Run benchmark evaluation harness
43
+ run: |
44
+ python -m benchmarks.runner
@@ -0,0 +1,85 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+
8
+ # Distribution / packaging
9
+ build/
10
+ develop-eggs/
11
+ dist/
12
+ downloads/
13
+ eggs/
14
+ .eggs/
15
+ lib/
16
+ lib64/
17
+ parts/
18
+ sdist/
19
+ var/
20
+ wheels/
21
+ share/python-wheels/
22
+ *.egg-info/
23
+ .installed.cfg
24
+ *.egg
25
+ MANIFEST
26
+
27
+ # Virtual Environments
28
+ .venv/
29
+ venv/
30
+ ENV/
31
+ env/
32
+ ENV*/
33
+ env*/
34
+
35
+ # Testing, coverage, and linters
36
+ .pytest_cache/
37
+ .hypothesis/
38
+ .coverage
39
+ .coverage.*
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ coverage.xml
44
+ *.cover
45
+ *.log
46
+
47
+ # IDEs and Editors
48
+ .idea/
49
+ .vscode/
50
+ *.swp
51
+ *.swo
52
+ *.swn
53
+ *~
54
+ .project
55
+ .pydevproject
56
+ .settings/
57
+
58
+ # Operating System Files
59
+ .DS_Store
60
+ .DS_Store?
61
+ ._*
62
+ .Spotlight-V100
63
+ .Trashes
64
+ ehthumbs.db
65
+ Thumbs.db
66
+
67
+ # Secrets, Credentials, and Environment Configurations
68
+ .env
69
+ .env.*
70
+ !.env.example
71
+ *.pem
72
+ *.key
73
+ *.pfx
74
+ *.p12
75
+ *.crt
76
+ *.cert
77
+
78
+ # Terminal Agent Session & Checkpoint Storage
79
+ .terminal_agent/
80
+
81
+ # Internal Development Scratch & Notes
82
+ project.md
83
+ terminal_agent_project.md
84
+ scratch/
85
+ benchmarks/results/
@@ -0,0 +1,121 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at **picadolabs@gmail.com**.
63
+ All complaints will be reviewed and investigated promptly and fairly.
64
+
65
+ All community leaders are obligated to respect the privacy and security of the
66
+ reporter of any incident.
67
+
68
+ ## Enforcement Guidelines
69
+
70
+ Community leaders will follow these Community Impact Guidelines in determining
71
+ the consequences for any action they deem in violation of this Code of Conduct:
72
+
73
+ ### 1. Correction
74
+
75
+ **Community Impact**: Use of inappropriate language or other behavior deemed
76
+ unprofessional or unwelcome in the community.
77
+
78
+ **Consequence**: A private, written warning from community leaders, providing
79
+ clarity around the nature of the violation and an explanation of why the
80
+ behavior was inappropriate. A public apology may be requested.
81
+
82
+ ### 2. Warning
83
+
84
+ **Community Impact**: A violation through a single incident or series of
85
+ actions.
86
+
87
+ **Consequence**: A warning with consequences for continued behavior. No
88
+ interaction with the people involved, including unsolicited interaction with
89
+ those enforcing the Code of Conduct, for a specified period of time. This
90
+ includes avoiding interactions in community spaces as well as external channels
91
+ like social media. Violating these terms may lead to a temporary or
92
+ permanent ban.
93
+
94
+ ### 3. Temporary Ban
95
+
96
+ **Community Impact**: A serious violation of community standards, including
97
+ sustained inappropriate behavior.
98
+
99
+ **Consequence**: A temporary ban from any sort of interaction or public
100
+ communication with the community for a specified period of time. No public or
101
+ private interaction with the people involved, including unsolicited interaction
102
+ with those enforcing the Code of Conduct, is allowed during this period.
103
+ Violating these terms may lead to a permanent ban.
104
+
105
+ ### 4. Permanent Ban
106
+
107
+ **Community Impact**: Demonstrating a pattern of violation of community
108
+ standards, including sustained inappropriate behavior, harassment of an
109
+ individual, or aggression toward or disparagement of classes of individuals.
110
+
111
+ **Consequence**: A permanent ban from any sort of public interaction within
112
+ the community.
113
+
114
+ ## Attribution
115
+
116
+ This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
117
+ version 2.1, available at
118
+ https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
119
+
120
+ For answers to common questions about this code of conduct, see the FAQ at
121
+ https://www.contributor-covenant.org/faq.
@@ -0,0 +1,166 @@
1
+ # Contributing to Terminal Agent
2
+
3
+ Thank you for your interest in contributing to **Terminal Agent** by **PicadoLabs**!
4
+
5
+ Terminal Agent is built on the **Verify-First** architectural paradigm. We welcome contributions that improve reliability, enhance provider integrations, strengthen security sandboxing, or extend autonomous verification capabilities.
6
+
7
+ ---
8
+
9
+ ## 1. Code of Conduct
10
+
11
+ All contributors and participants must adhere to our [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
12
+
13
+ ---
14
+
15
+ ## 2. Prerequisites
16
+
17
+ Ensure you have the following installed on your development machine:
18
+ - **Python**: Version `3.10`, `3.11`, or `3.12`
19
+ - **Git**: Version `2.30+`
20
+ - **Optional (for container sandboxing)**: Docker Engine
21
+ - **Optional (for local LLM inference)**: [Ollama](https://ollama.com)
22
+
23
+ ---
24
+
25
+ ## 3. Local Development Setup
26
+
27
+ 1. **Fork and clone the repository**:
28
+ ```bash
29
+ git clone https://github.com/PicadoLabs/terminal-agent.git
30
+ cd terminal-agent
31
+ ```
32
+
33
+ 2. **Create and activate a virtual environment**:
34
+ ```bash
35
+ python -m venv .venv
36
+
37
+ # On Linux / macOS:
38
+ source .venv/bin/activate
39
+
40
+ # On Windows (PowerShell):
41
+ .venv\Scripts\Activate.ps1
42
+ ```
43
+
44
+ 3. **Install the package in editable mode with development dependencies**:
45
+ ```bash
46
+ python -m pip install --upgrade pip
47
+ pip install -e ".[dev]"
48
+ ```
49
+
50
+ 4. **Verify the installation**:
51
+ ```bash
52
+ terminal-agent --help
53
+ terminal-agent doctor
54
+ ```
55
+
56
+ ---
57
+
58
+ ## 4. Branching Strategy & Workflow
59
+
60
+ 1. Create a dedicated branch from `main`:
61
+ ```bash
62
+ git checkout -b feat/add-new-verifier-runner
63
+ # or
64
+ git checkout -b fix/resolve-windows-path-traversal
65
+ ```
66
+
67
+ 2. Follow semantic branch naming:
68
+ - `feat/<feature-name>`: New feature or capability.
69
+ - `fix/<bug-description>`: Bug fix or error resolution.
70
+ - `docs/<documentation-change>`: Documentation improvements.
71
+ - `test/<test-suite>`: New test cases or benchmark tasks.
72
+ - `refactor/<component>`: Internal refactoring with preserved functionality.
73
+
74
+ ---
75
+
76
+ ## 5. Development & Code Quality Guidelines
77
+
78
+ ### Architectural Principles
79
+ - **Verify-First Autonomy**: Any code modification mechanism must be verifiable through external, objective tests. The agent must never declare completion without test confirmation.
80
+ - **Defense in Depth**: All tool executions must route through `SecurityPolicyEnforcer` and `SecretGuard`. Never bypass sandboxing boundaries.
81
+ - **Deterministic Context**: Keep context discovery fast, bounded by token budgets, and deterministic.
82
+
83
+ ### Typing & Code Style
84
+ - Use standard Python type annotations (`typing` and Python 3.10+ union types).
85
+ - Use Pydantic v2 models for structured schemas and configuration.
86
+ - Preserve backward compatibility with Python 3.10+.
87
+
88
+ ---
89
+
90
+ ## 6. Testing & Validation
91
+
92
+ Before submitting changes, run the full test and benchmark suite locally:
93
+
94
+ ### Run Automated Unit and Integration Tests
95
+ ```bash
96
+ pytest tests/ -v
97
+ ```
98
+
99
+ ### Run Full SWE Benchmark Evaluation Suite
100
+ ```bash
101
+ python -m benchmarks.runner
102
+ ```
103
+
104
+ ### Run Type and Syntax Sanity
105
+ ```bash
106
+ python -m py_compile src/terminal_agent/**/*.py
107
+ ```
108
+
109
+ All 37 test cases and 10 benchmark evaluation tasks must pass cleanly.
110
+
111
+ ---
112
+
113
+ ## 7. Commit Message Guidelines
114
+
115
+ We follow the [Conventional Commits](https://www.conventionalcommits.org/) specification:
116
+
117
+ ```
118
+ <type>(<scope>): <short description>
119
+
120
+ [optional body]
121
+
122
+ [optional footer(s)]
123
+ ```
124
+
125
+ ### Examples:
126
+ - `feat(verifier): add support for rust cargo test parser`
127
+ - `fix(sandbox): terminate child processes on local timeout`
128
+ - `docs(readme): add docker sandboxing guide`
129
+ - `test(security): add test for path traversal with symlinks`
130
+
131
+ ---
132
+
133
+ ## 8. Submitting a Pull Request (PR)
134
+
135
+ 1. Ensure your branch is rebased on the latest `main`:
136
+ ```bash
137
+ git fetch origin
138
+ git rebase origin/main
139
+ ```
140
+ 2. Push your branch to your fork:
141
+ ```bash
142
+ git push origin feat/my-feature
143
+ ```
144
+ 3. Open a Pull Request on GitHub against `PicadoLabs/terminal-agent:main`.
145
+ 4. Fill out the [Pull Request Template](.github/pull_request_template.md) completely:
146
+ - Provide a clear summary of what was changed and why.
147
+ - Attach test execution results and commands run.
148
+ - Highlight any potential breaking changes.
149
+
150
+ ---
151
+
152
+ ## 9. Reporting Issues
153
+
154
+ - **Bug Reports**: Use the [Bug Report Template](.github/ISSUE_TEMPLATE/bug_report.md). Include your OS, Python version, steps to reproduce, and terminal output.
155
+ - **Feature Requests**: Use the [Feature Request Template](.github/ISSUE_TEMPLATE/feature_request.md). Explain the problem, proposed solution, and alternatives considered.
156
+ - **Security Vulnerabilities**: **DO NOT** file public issues. Follow the private disclosure process in [SECURITY.md](SECURITY.md) by contacting `picadolabs@gmail.com`.
157
+
158
+ ---
159
+
160
+ ## 10. Community & Organization
161
+
162
+ Terminal Agent is maintained by **PicadoLabs**.
163
+
164
+ - **Organization**: [https://github.com/PicadoLabs](https://github.com/PicadoLabs)
165
+ - **Website**: [https://picadolabs.me](https://picadolabs.me)
166
+ - **Contact**: [picadolabs@gmail.com](mailto:picadolabs@gmail.com)
@@ -0,0 +1,23 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Terminal Agent Maintainers
4
+ Copyright (c) 2026 PicadoLabs
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
23
+