Repository navigation
feat(sandbox): run agents in pydantic ai workspaces #2011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
42c382d
refactor(sandbox): run agents in pydantic ai workspaces
DEENUU1 190036a
test(sandbox): port the workspace tests to pydantic ai workspaces
DEENUU1 49318a3
fix(sandbox): list a combined capability's tools and document named s…
DEENUU1 fb07b02
test(sandbox): cover an untouched run sandbox and a loose skills file
DEENUU1 fa0cb87
fix(subagents): keep unshared delegates out of the parent's workspace
DEENUU1 63b7e47
fix(sandbox): handle a container's shell failures and unmeasured files
DEENUU1 865df04
feat(sandbox): attach to an opened session and report a purged one
DEENUU1 fe21cea
test(sandbox): cover a session settled after its conversation was del…
DEENUU1 9ab1f19
fix(compaction): check the budget again after a paid summary
DEENUU1 991180b
fix(system-reminders): inject after compaction so a reminder is not lost
DEENUU1 43407a1
fix(sandbox): notice a lost session wherever it surfaces, and clear D…
DEENUU1 e532b82
docs(sandbox): bring comments, licences and changelog up to the port
DEENUU1 1f2cd67
chore(migrations): renumber workspace directories to 0105 after #2037
DEENUU1 8c9f440
Merge remote-tracking branch 'origin/main' into feat/2003-pydantic-ai…
DEENUU1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| """Keep a stored workspace's empty directories beside its files. | ||
|
|
||
| pydantic-ai-backend 0.2.30 moved the agent's files onto Pydantic AI workspaces, | ||
| and the `StateBackend` a `state` workspace is stored as became a filesystem with | ||
| directories of its own: one `make_dir` created, or one the agent emptied, still | ||
| exists. `files` cannot say so - it holds files by path - so the document is | ||
| stored as both, the way the library persists it. Existing rows keep null, which | ||
| loads as no directories created: every directory holding a file exists anyway, | ||
| so their trees are unchanged. | ||
|
|
||
| Revision ID: 0105_workspace_directories | ||
| Revises: 0104_model_profile_api | ||
| Create Date: 2026-10-05 | ||
| """ | ||
|
|
||
| from collections.abc import Sequence | ||
|
|
||
| import sqlalchemy as sa | ||
| from sqlalchemy.dialects import postgresql | ||
|
|
||
| from alembic import op | ||
|
|
||
| revision: str = "0105_workspace_directories" | ||
| down_revision: str | None = "0104_model_profile_api" | ||
|
DEENUU1 marked this conversation as resolved.
|
||
| branch_labels: str | Sequence[str] | None = None | ||
|
github-code-quality[bot] marked this conversation as resolved.
Fixed
DEENUU1 marked this conversation as resolved.
|
||
| depends_on: str | Sequence[str] | None = None | ||
|
github-code-quality[bot] marked this conversation as resolved.
Fixed
DEENUU1 marked this conversation as resolved.
|
||
|
|
||
|
|
||
| def upgrade() -> None: | ||
| op.add_column( | ||
| "agent_workspaces", | ||
| sa.Column("directories", postgresql.JSONB(astext_type=sa.Text()), nullable=True), | ||
| ) | ||
|
|
||
|
|
||
| def downgrade() -> None: | ||
| op.drop_column("agent_workspaces", "directories") | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.