steerdev 0.4.27__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 (67) hide show
  1. steerdev-0.4.27/.github/workflows/pre-commit.yml +34 -0
  2. steerdev-0.4.27/.github/workflows/publish.yml +65 -0
  3. steerdev-0.4.27/.gitignore +104 -0
  4. steerdev-0.4.27/.pre-commit-config.yaml +45 -0
  5. steerdev-0.4.27/AGENTS.md +57 -0
  6. steerdev-0.4.27/CLAUDE.md +1 -0
  7. steerdev-0.4.27/PKG-INFO +224 -0
  8. steerdev-0.4.27/README.md +188 -0
  9. steerdev-0.4.27/pyproject.toml +136 -0
  10. steerdev-0.4.27/scripts/pre-commit-version-bump.sh +30 -0
  11. steerdev-0.4.27/src/steerdev_agent/__init__.py +10 -0
  12. steerdev-0.4.27/src/steerdev_agent/api/__init__.py +32 -0
  13. steerdev-0.4.27/src/steerdev_agent/api/activity.py +278 -0
  14. steerdev-0.4.27/src/steerdev_agent/api/agents.py +145 -0
  15. steerdev-0.4.27/src/steerdev_agent/api/client.py +158 -0
  16. steerdev-0.4.27/src/steerdev_agent/api/commands.py +399 -0
  17. steerdev-0.4.27/src/steerdev_agent/api/configs.py +238 -0
  18. steerdev-0.4.27/src/steerdev_agent/api/context.py +306 -0
  19. steerdev-0.4.27/src/steerdev_agent/api/events.py +294 -0
  20. steerdev-0.4.27/src/steerdev_agent/api/hooks.py +178 -0
  21. steerdev-0.4.27/src/steerdev_agent/api/implementation_plan.py +408 -0
  22. steerdev-0.4.27/src/steerdev_agent/api/messages.py +231 -0
  23. steerdev-0.4.27/src/steerdev_agent/api/prd.py +281 -0
  24. steerdev-0.4.27/src/steerdev_agent/api/runs.py +526 -0
  25. steerdev-0.4.27/src/steerdev_agent/api/sessions.py +403 -0
  26. steerdev-0.4.27/src/steerdev_agent/api/specs.py +321 -0
  27. steerdev-0.4.27/src/steerdev_agent/api/tasks.py +659 -0
  28. steerdev-0.4.27/src/steerdev_agent/api/workflow_runs.py +351 -0
  29. steerdev-0.4.27/src/steerdev_agent/api/workflows.py +191 -0
  30. steerdev-0.4.27/src/steerdev_agent/cli.py +2254 -0
  31. steerdev-0.4.27/src/steerdev_agent/config/__init__.py +19 -0
  32. steerdev-0.4.27/src/steerdev_agent/config/models.py +236 -0
  33. steerdev-0.4.27/src/steerdev_agent/config/platform.py +272 -0
  34. steerdev-0.4.27/src/steerdev_agent/config/settings.py +62 -0
  35. steerdev-0.4.27/src/steerdev_agent/daemon.py +675 -0
  36. steerdev-0.4.27/src/steerdev_agent/executor/__init__.py +64 -0
  37. steerdev-0.4.27/src/steerdev_agent/executor/base.py +121 -0
  38. steerdev-0.4.27/src/steerdev_agent/executor/claude.py +328 -0
  39. steerdev-0.4.27/src/steerdev_agent/executor/stream.py +163 -0
  40. steerdev-0.4.27/src/steerdev_agent/git/__init__.py +1 -0
  41. steerdev-0.4.27/src/steerdev_agent/handlers/__init__.py +5 -0
  42. steerdev-0.4.27/src/steerdev_agent/handlers/prd.py +533 -0
  43. steerdev-0.4.27/src/steerdev_agent/integration.py +334 -0
  44. steerdev-0.4.27/src/steerdev_agent/prompt/__init__.py +10 -0
  45. steerdev-0.4.27/src/steerdev_agent/prompt/builder.py +263 -0
  46. steerdev-0.4.27/src/steerdev_agent/prompt/templates.py +422 -0
  47. steerdev-0.4.27/src/steerdev_agent/py.typed +0 -0
  48. steerdev-0.4.27/src/steerdev_agent/runner.py +829 -0
  49. steerdev-0.4.27/src/steerdev_agent/setup/__init__.py +5 -0
  50. steerdev-0.4.27/src/steerdev_agent/setup/claude_setup.py +560 -0
  51. steerdev-0.4.27/src/steerdev_agent/setup/templates/claude_md_section.md +140 -0
  52. steerdev-0.4.27/src/steerdev_agent/setup/templates/settings.json +69 -0
  53. steerdev-0.4.27/src/steerdev_agent/setup/templates/skills/activity/SKILL.md +160 -0
  54. steerdev-0.4.27/src/steerdev_agent/setup/templates/skills/context/SKILL.md +122 -0
  55. steerdev-0.4.27/src/steerdev_agent/setup/templates/skills/git-workflow/SKILL.md +218 -0
  56. steerdev-0.4.27/src/steerdev_agent/setup/templates/skills/progress-logging/SKILL.md +211 -0
  57. steerdev-0.4.27/src/steerdev_agent/setup/templates/skills/specs-management/SKILL.md +161 -0
  58. steerdev-0.4.27/src/steerdev_agent/setup/templates/skills/task-management/SKILL.md +343 -0
  59. steerdev-0.4.27/src/steerdev_agent/setup/templates/steerdev.yaml +51 -0
  60. steerdev-0.4.27/src/steerdev_agent/version.py +149 -0
  61. steerdev-0.4.27/src/steerdev_agent/workflow/__init__.py +10 -0
  62. steerdev-0.4.27/src/steerdev_agent/workflow/executor.py +494 -0
  63. steerdev-0.4.27/src/steerdev_agent/workflow/memory.py +185 -0
  64. steerdev-0.4.27/tests/__init__.py +1 -0
  65. steerdev-0.4.27/tests/test_config.py +94 -0
  66. steerdev-0.4.27/tests/test_executor.py +198 -0
  67. steerdev-0.4.27/tests/test_prompt.py +247 -0
@@ -0,0 +1,34 @@
1
+ name: Pre-commit Checks
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, synchronize, reopened]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ pre-commit:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout code
13
+ uses: actions/checkout@v4
14
+ with:
15
+ submodules: true
16
+ token: ${{ secrets.PAT_TOKEN }}
17
+
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: "3.12"
22
+
23
+ - name: Install uv
24
+ uses: astral-sh/setup-uv@v5
25
+ with:
26
+ version: "latest"
27
+
28
+ - name: Install dependencies
29
+ run: uv sync --extra dev
30
+
31
+ - name: Run pre-commit
32
+ env:
33
+ SKIP: bump-version # Skip version bumping in CI
34
+ run: uv run pre-commit run --all-files
@@ -0,0 +1,65 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ permissions:
7
+ id-token: write
8
+ contents: write
9
+
10
+ jobs:
11
+ lint:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Checkout code
15
+ uses: actions/checkout@v4
16
+
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: "3.12"
21
+
22
+ - name: Install uv
23
+ uses: astral-sh/setup-uv@v5
24
+ with:
25
+ version: "latest"
26
+
27
+ - name: Install dependencies
28
+ run: uv sync --extra dev
29
+
30
+ - name: Run pre-commit
31
+ env:
32
+ SKIP: bump-version
33
+ run: uv run pre-commit run --all-files
34
+
35
+ publish:
36
+ needs: lint
37
+ runs-on: ubuntu-latest
38
+ environment: pypi
39
+ steps:
40
+ - name: Checkout code
41
+ uses: actions/checkout@v4
42
+
43
+ - name: Install uv
44
+ uses: astral-sh/setup-uv@v5
45
+ with:
46
+ version: "latest"
47
+
48
+ - name: Get package version
49
+ id: version
50
+ run: echo "version=$(uv version --short)" >> "$GITHUB_OUTPUT"
51
+
52
+ - name: Build package
53
+ run: uv build
54
+
55
+ - name: Publish to PyPI
56
+ run: uv publish --trusted-publishing always
57
+
58
+ - name: Create git tag and GitHub release
59
+ env:
60
+ GH_TOKEN: ${{ github.token }}
61
+ run: |
62
+ VERSION="v${{ steps.version.outputs.version }}"
63
+ git tag "${VERSION}"
64
+ git push origin "${VERSION}"
65
+ gh release create "${VERSION}" --title "${VERSION}" --generate-notes
@@ -0,0 +1,104 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ *.manifest
31
+ *.spec
32
+
33
+ # Installer logs
34
+ pip-log.txt
35
+ pip-delete-this-directory.txt
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ .tox/
40
+ .nox/
41
+ .coverage
42
+ .coverage.*
43
+ .cache
44
+ nosetests.xml
45
+ coverage.xml
46
+ *.cover
47
+ *.py,cover
48
+ .hypothesis/
49
+ .pytest_cache/
50
+
51
+ # Translations
52
+ *.mo
53
+ *.pot
54
+
55
+ # Environments
56
+ .env
57
+ .venv
58
+ env/
59
+ venv/
60
+ ENV/
61
+ env.bak/
62
+ venv.bak/
63
+
64
+ # IDEs
65
+ .idea/
66
+ .vscode/
67
+ .cursor/
68
+ *.swp
69
+ *.swo
70
+ *~
71
+
72
+ # AI tools
73
+ .claude/
74
+
75
+ # Jupyter Notebook
76
+ .ipynb_checkpoints
77
+
78
+ # pyenv
79
+ .python-version
80
+
81
+ # mypy
82
+ .mypy_cache/
83
+ .dmypy.json
84
+ dmypy.json
85
+
86
+ # Pyre type checker
87
+ .pyre/
88
+
89
+ # pyright
90
+ .pyright/
91
+
92
+ # ruff
93
+ .ruff_cache/
94
+
95
+ # uv
96
+ uv.lock
97
+
98
+ # Local development
99
+ *.local
100
+ .DS_Store
101
+
102
+ # Project specific
103
+ outputs/
104
+ cc-orc
@@ -0,0 +1,45 @@
1
+ # See https://pre-commit.com for more information
2
+ # See https://pre-commit.com/hooks.html for more hooks
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v5.0.0
6
+ hooks:
7
+ - id: trailing-whitespace
8
+ - id: end-of-file-fixer
9
+ - id: check-yaml
10
+ - id: check-added-large-files
11
+ args: [--maxkb=1024]
12
+ - id: check-toml
13
+ - id: check-merge-conflict
14
+ - id: detect-private-key
15
+
16
+ - repo: https://github.com/astral-sh/ruff-pre-commit
17
+ rev: v0.8.4
18
+ hooks:
19
+ # Run the linter
20
+ - id: ruff
21
+ args: [--fix]
22
+ # Run the formatter
23
+ - id: ruff-format
24
+
25
+ # Use local basedpyright with project config
26
+ - repo: local
27
+ hooks:
28
+ - id: basedpyright
29
+ name: basedpyright
30
+ entry: uv run basedpyright src/ tests/
31
+ language: system
32
+ types: [python]
33
+ pass_filenames: false
34
+
35
+ # Automatic version bumping on commit
36
+ # Note: This hook modifies files (pyproject.toml), which is not typical for pre-commit hooks.
37
+ # Uncomment below to enable automatic patch version bumping on each commit:
38
+ - repo: local
39
+ hooks:
40
+ - id: bump-version
41
+ name: Bump version
42
+ entry: bash scripts/pre-commit-version-bump.sh
43
+ language: system
44
+ pass_filenames: false
45
+ always_run: true
@@ -0,0 +1,57 @@
1
+ # AGENTS.md
2
+
3
+ Guidance for AI coding agents working in this repository.
4
+
5
+ ## Overview
6
+
7
+ **steerdev-agent** is a Python CLI that orchestrates AI coding agents via subprocess execution, streaming events to the steerdev.com API. It fetches tasks, builds prompts, launches agents (Claude Code, Codex, Aider), and reports activity.
8
+
9
+ ## Project Structure
10
+
11
+ ```
12
+ src/steerdev_agent/
13
+ ├── cli.py # Typer CLI commands
14
+ ├── runner.py # Main orchestrator
15
+ ├── daemon.py # Daemon mode
16
+ ├── version.py # Version management
17
+ ├── integration.py # Integration utilities
18
+ ├── api/ # API clients (tasks, sessions, events, workflows, etc.)
19
+ ├── config/ # Pydantic config models and settings
20
+ ├── executor/ # Agent subprocess execution (base, claude, stream)
21
+ ├── workflow/ # Multi-phase workflow execution and memory
22
+ ├── prompt/ # Prompt building and templates
23
+ ├── setup/ # Project setup and templates
24
+ ├── handlers/ # Task/PRD handlers
25
+ └── git/ # Git utilities
26
+ ```
27
+
28
+ ## Development
29
+
30
+ - **Python 3.12+** with **uv** package manager
31
+ - `uv sync` — install deps
32
+ - `uv run pytest` — run tests
33
+ - `uv run ruff check . && uv run ruff format .` — lint and format
34
+ - `uv run basedpyright` — type check
35
+
36
+ ## Conventions
37
+
38
+ - Type hints on all function signatures
39
+ - Pydantic v2 for data models and config
40
+ - Async/await for I/O (HTTP, subprocess)
41
+ - `loguru` for logging
42
+ - Specific exception classes (no bare `except`)
43
+ - Absolute imports (`from steerdev_agent.config.models import ...`)
44
+ - Import order: stdlib, third-party, local
45
+
46
+ ## Key Integration Points
47
+
48
+ - **steerdev.com API**: Bearer auth via `STEERDEV_API_KEY`. Events POSTed to `/api/v1/sessions/{id}/events`.
49
+ - **Executor**: Launches agents as subprocesses with `--output-format stream-json`. Parses newline-delimited JSON events.
50
+ - **Config**: YAML config file + environment variable overrides.
51
+
52
+ ## Environment Variables
53
+
54
+ | Variable | Purpose |
55
+ | --- | --- |
56
+ | `STEERDEV_API_KEY` | API authentication |
57
+ | `STEERDEV_PROJECT_ID` | Default project |
@@ -0,0 +1 @@
1
+ AGENTS.md
@@ -0,0 +1,224 @@
1
+ Metadata-Version: 2.4
2
+ Name: steerdev
3
+ Version: 0.4.27
4
+ Summary: Backend task runner for steerdev.com - orchestrates CLI coding agents with activity reporting
5
+ Project-URL: Homepage, https://github.com/pentoai/steerdev-agent
6
+ Project-URL: Repository, https://github.com/pentoai/steerdev-agent
7
+ Project-URL: Documentation, https://github.com/pentoai/steerdev-agent#readme
8
+ Author-email: Leonardo Piñeyro <leopiney@gmail.com>
9
+ License: MIT
10
+ Keywords: agent,ai,automation,cli,terminal
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
+ Classifier: Topic :: Terminals
18
+ Requires-Python: >=3.12
19
+ Requires-Dist: httpx>=0.27.0
20
+ Requires-Dist: loguru>=0.7.3
21
+ Requires-Dist: pydantic-settings>=2.0.0
22
+ Requires-Dist: pydantic>=2.0.0
23
+ Requires-Dist: python-dotenv>=1.2.1
24
+ Requires-Dist: pyyaml>=6.0.0
25
+ Requires-Dist: rich>=13.0.0
26
+ Requires-Dist: typer>=0.12.0
27
+ Provides-Extra: dev
28
+ Requires-Dist: basedpyright>=1.21.0; extra == 'dev'
29
+ Requires-Dist: ipdb>=0.13.13; extra == 'dev'
30
+ Requires-Dist: pre-commit>=4.0.0; extra == 'dev'
31
+ Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
32
+ Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
33
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
34
+ Requires-Dist: ruff>=0.8.0; extra == 'dev'
35
+ Description-Content-Type: text/markdown
36
+
37
+ # SteerDev Agent
38
+
39
+ Task runner for [steerdev.com](https://steerdev.com) — orchestrates AI coding agents via subprocess execution while streaming events to the SteerDev platform.
40
+
41
+ ## What It Does
42
+
43
+ SteerDev Agent connects your AI coding agent (Claude Code, Codex, Aider) to the steerdev.com platform:
44
+
45
+ 1. **Fetches tasks** from your SteerDev project
46
+ 2. **Builds prompts** with project context, task details, and workflow instructions
47
+ 3. **Launches the agent** as a subprocess with JSON streaming
48
+ 4. **Streams events** back to the API for real-time monitoring
49
+ 5. **Manages sessions** for tracking and resuming conversations
50
+
51
+ ## Installation
52
+
53
+ ```bash
54
+ # Install with uv (recommended)
55
+ uv tool install steerdev-agent
56
+
57
+ # Or from source
58
+ git clone https://github.com/pentoai/steerdev-agent.git
59
+ cd steerdev-agent
60
+ uv tool install .
61
+ ```
62
+
63
+ ## Quick Start
64
+
65
+ ### 1. Set Up Your Project
66
+
67
+ ```bash
68
+ # Configure the agent for your project
69
+ steerdev-agent setup --project-id YOUR_PROJECT_ID --api-key YOUR_API_KEY
70
+ ```
71
+
72
+ ### 2. Set Environment Variables
73
+
74
+ ```bash
75
+ export STEERDEV_API_KEY="your-api-key"
76
+
77
+ # Ensure your CLI agent is logged in (e.g., `claude login` for Claude Code)
78
+ ```
79
+
80
+ ### 3. Run the Agent
81
+
82
+ ```bash
83
+ # Run the next task in your project
84
+ steerdev-agent run --project-id YOUR_PROJECT_ID
85
+
86
+ # Run a specific task
87
+ steerdev-agent run --project-id YOUR_PROJECT_ID --task-id TASK_ID
88
+
89
+ # Resume an existing session
90
+ steerdev-agent resume --session-id SESSION_ID --message "Continue working..."
91
+ ```
92
+
93
+ ## CLI Commands
94
+
95
+ ### `steerdev-agent run`
96
+
97
+ Run the agent against a project or specific task.
98
+
99
+ ```bash
100
+ steerdev-agent run --project-id PROJECT_ID
101
+ steerdev-agent run --project-id PROJECT_ID --task-id TASK_ID
102
+ steerdev-agent run -c agent.yaml --prompt "Fix the failing tests"
103
+ ```
104
+
105
+ ### `steerdev-agent tasks`
106
+
107
+ Manage tasks from your SteerDev project.
108
+
109
+ ```bash
110
+ steerdev-agent tasks next # Get the next task to work on
111
+ steerdev-agent tasks list # List all tasks
112
+ steerdev-agent tasks get TASK_ID # Get task details
113
+ steerdev-agent tasks update TASK_ID --status in-progress
114
+ ```
115
+
116
+ ### `steerdev-agent setup`
117
+
118
+ Configure your project for use with the agent.
119
+
120
+ ```bash
121
+ steerdev-agent setup --project-id YOUR_PROJECT_ID --api-key YOUR_API_KEY
122
+ ```
123
+
124
+ ### `steerdev-agent config`
125
+
126
+ Manage YAML configuration files.
127
+
128
+ ```bash
129
+ steerdev-agent config init --output agent.yaml # Generate config
130
+ steerdev-agent config validate agent.yaml # Validate config
131
+ steerdev-agent config show agent.yaml # Show config
132
+ ```
133
+
134
+ ## Configuration
135
+
136
+ ### YAML Config File
137
+
138
+ ```yaml
139
+ agent:
140
+ model: null # Model override
141
+ max_turns: null # Max agent turns per task
142
+ timeout_seconds: 3600 # Max execution time
143
+ workflow_id: null # Workflow ID for multi-phase execution
144
+
145
+ api:
146
+ api_endpoint: "https://steerdev.com/api/v1"
147
+ api_key_env: STEERDEV_API_KEY
148
+ project_id_env: STEERDEV_PROJECT_ID
149
+
150
+ executor:
151
+ type: claude # claude, codex, aider
152
+ permission_mode: default
153
+ allowed_tools: []
154
+ disallowed_tools: []
155
+ mcp_config: null
156
+
157
+ worktrees:
158
+ enabled: false
159
+ ```
160
+
161
+ ### Environment Variables
162
+
163
+ | Variable | Description |
164
+ | --- | --- |
165
+ | `STEERDEV_API_KEY` | API key for steerdev.com |
166
+ | `STEERDEV_PROJECT_ID` | Default project ID |
167
+
168
+ > **Note:** CLI agents (Claude Code, Codex, etc.) must be logged in independently before running steerdev-agent. No LLM API keys are needed here.
169
+
170
+ ## Architecture
171
+
172
+ ```
173
+ steerdev-agent run
174
+
175
+ ├── Fetch task from steerdev.com API
176
+ ├── Build prompt (project context + task + workflow)
177
+ ├── Create session
178
+ ├── Launch agent subprocess (Claude Code)
179
+ │ └── Stream JSON events
180
+ │ ├── Parse (assistant, tool_use, tool_result)
181
+ │ └── Batch & send to steerdev.com API
182
+ └── Complete session
183
+ ```
184
+
185
+ ### Key Modules
186
+
187
+ | Module | Purpose |
188
+ | --- | --- |
189
+ | `cli.py` | Typer CLI entry point |
190
+ | `runner.py` | Main orchestrator |
191
+ | `executor/` | Agent subprocess management |
192
+ | `api/` | SteerDev API clients |
193
+ | `prompt/` | Prompt building and templates |
194
+ | `workflow/` | Multi-phase workflow execution |
195
+ | `config/` | Configuration models and settings |
196
+ | `setup/` | Project setup utilities |
197
+
198
+ ## Development
199
+
200
+ ```bash
201
+ # Install dependencies
202
+ uv sync --extra dev
203
+
204
+ # Run tests
205
+ uv run pytest
206
+
207
+ # Lint & format
208
+ uv run ruff check .
209
+ uv run ruff format .
210
+
211
+ # Type check
212
+ uv run basedpyright
213
+ ```
214
+
215
+ ## Requirements
216
+
217
+ - Python 3.12+
218
+ - [uv](https://docs.astral.sh/uv/) package manager
219
+ - An AI coding agent CLI (e.g., `claude` for Claude Code)
220
+ - SteerDev API key
221
+
222
+ ## License
223
+
224
+ MIT — see [LICENSE](LICENSE) for details.