Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
pi: ${{ steps.filter.outputs.pi }}
opencode: ${{ steps.filter.outputs.opencode }}
pydantic_ai: ${{ steps.filter.outputs.pydantic_ai }}
smolagents: ${{ steps.filter.outputs.smolagents }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
Expand All @@ -45,6 +46,8 @@ jobs:
- 'packages/opencode-plugin/**'
pydantic_ai:
- 'packages/pydantic-ai-daytona/**'
smolagents:
- 'packages/smolagents-daytona/**'

adk:
needs: changes
Expand Down Expand Up @@ -208,14 +211,53 @@ jobs:
# NOTE: live tests (tests/integration_tests, real Daytona sandboxes) run via
# the separate integration workflow, not per-PR CI.

smolagents:
needs: changes
if: needs.changes.outputs.smolagents == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
# Pinned: obstore (pulled via the daytona SDK) ships no wheels for the
# newest Python; 3.12 has wheels so `pip install` succeeds.
python-version: "3.12"
- name: Detect package
id: guard
run: |
test -f packages/smolagents-daytona/pyproject.toml && echo "ready=true" >> "$GITHUB_OUTPUT" || echo "ready=false" >> "$GITHUB_OUTPUT"
- name: Install
if: steps.guard.outputs.ready == 'true'
working-directory: packages/smolagents-daytona
# TEMPORARY (until smolagents>=1.27.0 is on PyPI): the pluggable executor
# contract this package builds on (huggingface/smolagents#2724) is not
# released yet, so smolagents is installed from the PR head SHA and the
# package itself with --no-deps to skip resolving the unreleased floor.
# Once smolagents 1.27.0 releases, replace all of this with:
# python -m pip install -e ".[dev]"
run: |
python -m pip install "smolagents @ git+https://github.com/huggingface/smolagents.git@5d49484a8c0959fd511c8904f632b60e3dc36b32"
python -m pip install "daytona>=0.211.0,<0.212.0" "pytest>=7.0.0" "black>=23.0.0" "ruff>=0.15,<0.17" "mypy>=1.0.0"
python -m pip install --no-deps -e .
- name: Lint (ruff)
if: steps.guard.outputs.ready == 'true'
working-directory: packages/smolagents-daytona
run: ruff check .
- name: Unit tests (offline)
if: steps.guard.outputs.ready == 'true'
working-directory: packages/smolagents-daytona
run: pytest
# NOTE: live tests (tests/integration_tests, real Daytona sandboxes) run via
# the separate integration workflow, not per-PR CI.

# Single, stable status check to require in branch protection.
# It ALWAYS runs (if: always()) and fails only if a relevant job failed or
# was cancelled. A "skipped" job (a package this PR didn't touch) is fine —
# so requiring just this one check never wedges a PR, while still blocking
# merges when a touched package's lint/test/build fails.
ci-success:
name: ci-success
needs: [changes, adk, langchain, n8n, pi, opencode, pydantic-ai]
needs: [changes, adk, langchain, n8n, pi, opencode, pydantic-ai, smolagents]
if: always()
runs-on: ubuntu-latest
steps:
Expand Down
37 changes: 36 additions & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ on:
- n8n
- pi
- pydantic-ai
- smolagents

permissions:
contents: read
Expand All @@ -62,6 +63,7 @@ jobs:
n8n: ${{ steps.decide.outputs.n8n }}
pi: ${{ steps.decide.outputs.pi }}
pydantic_ai: ${{ steps.decide.outputs.pydantic_ai }}
smolagents: ${{ steps.decide.outputs.smolagents }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
Expand All @@ -79,6 +81,8 @@ jobs:
- 'packages/pi-extension/**'
pydantic_ai:
- 'packages/pydantic-ai-daytona/**'
smolagents:
- 'packages/smolagents-daytona/**'
- name: Decide which packages run
id: decide
env:
Expand All @@ -91,6 +95,7 @@ jobs:
CH_N8N: ${{ steps.filter.outputs.n8n }}
CH_PI: ${{ steps.filter.outputs.pi }}
CH_PYDANTIC_AI: ${{ steps.filter.outputs.pydantic_ai }}
CH_SMOLAGENTS: ${{ steps.filter.outputs.smolagents }}
run: |
set -euo pipefail
# Two lanes, one lane per PR type: same-repo PRs run on `pull_request`,
Expand Down Expand Up @@ -118,6 +123,7 @@ jobs:
echo "n8n=$(decide n8n "${CH_N8N:-false}")"
echo "pi=$(decide pi "${CH_PI:-false}")"
echo "pydantic_ai=$(decide pydantic-ai "${CH_PYDANTIC_AI:-false}")"
echo "smolagents=$(decide smolagents "${CH_SMOLAGENTS:-false}")"
} >> "$GITHUB_OUTPUT"

adk:
Expand Down Expand Up @@ -248,6 +254,35 @@ jobs:
DAYTONA_API_KEY: ${{ secrets.DAYTONA_API_KEY }}
run: pytest tests/integration_tests

smolagents:
needs: changes
if: needs.changes.outputs.smolagents == 'true'
runs-on: ubuntu-latest
environment: integration-tests
timeout-minutes: 30
steps:
# Fork lane checks out the PR head (see the adk job note).
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || '' }}
- uses: actions/setup-python@v5
with:
# Pinned to 3.12 for the same reason as ci.yml (obstore wheels).
python-version: "3.12"
- name: Install
working-directory: packages/smolagents-daytona
# TEMPORARY (until smolagents>=1.27.0 is on PyPI): see the ci.yml
# smolagents job for details; collapse to `pip install -e ".[dev]"` then.
run: |
python -m pip install "smolagents @ git+https://github.com/huggingface/smolagents.git@5d49484a8c0959fd511c8904f632b60e3dc36b32"
python -m pip install "daytona>=0.211.0,<0.212.0" "pytest>=7.0.0"
python -m pip install --no-deps -e .
- name: Integration tests (live Daytona)
working-directory: packages/smolagents-daytona
env:
DAYTONA_API_KEY: ${{ secrets.DAYTONA_API_KEY }}
run: pytest tests/integration_tests

# Single, stable status check to require in branch protection -- the
# integration counterpart of ci.yml's ci-success. Suites skipped because a PR
# does not touch their package pass through; a failed, cancelled, or
Expand All @@ -257,7 +292,7 @@ jobs:
# required checks treat as satisfied, so the owning lane's verdict governs.
integration-success:
name: integration-success
needs: [changes, adk, langchain, n8n, pi, pydantic-ai]
needs: [changes, adk, langchain, n8n, pi, pydantic-ai, smolagents]
if: >-
always() && (
github.event_name == 'workflow_dispatch' ||
Expand Down
3 changes: 2 additions & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"packages/n8n-nodes-daytona": "0.1.3",
"packages/pi-extension": "0.191.0",
"packages/opencode-plugin": "0.192.1",
"packages/pydantic-ai-daytona": "0.1.0"
"packages/pydantic-ai-daytona": "0.1.0",
"packages/smolagents-daytona": "0.1.0"
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Packages published to **a package registry** live in [`packages/`](packages/):
| [`pi-extension`](packages/pi-extension) — Pi coding-agent extension | npm · [`@daytona/pi`](https://www.npmjs.com/package/@daytona/pi) |
| [`opencode-plugin`](packages/opencode-plugin) — OpenCode plugin | npm · [`@daytona/opencode`](https://www.npmjs.com/package/@daytona/opencode) |
| [`pydantic-ai-daytona`](packages/pydantic-ai-daytona) — Pydantic AI sandbox capability | PyPI · [`pydantic-ai-daytona`](https://pypi.org/project/pydantic-ai-daytona/) |
| [`smolagents-daytona`](packages/smolagents-daytona) — smolagents sandbox code executor | PyPI · [`smolagents-daytona`](https://pypi.org/project/smolagents-daytona/) |

## Apps

Expand Down
76 changes: 76 additions & 0 deletions packages/smolagents-daytona/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
*.manifest
*.spec

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# IDEs
.vscode/
.idea/
*.swp
*.swo
*~

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Daytona specific
daytona_config.json
Loading
Loading