同步完整源码 - 2026-05-24
This commit is contained in:
commit
4608c06bb3
|
|
@ -0,0 +1,165 @@
|
|||
---
|
||||
name: bump-version
|
||||
description: Bump Skyvern OSS version, build Python and TypeScript SDKs with Fern, and create release PR. Use when releasing a new version or when the user asks to bump version.
|
||||
argument-hint: [version]
|
||||
disable-model-invocation: true
|
||||
---
|
||||
|
||||
# Bump Version Skill
|
||||
|
||||
Automate the complete OSS version bump and release workflow for Skyvern.
|
||||
|
||||
## What this does
|
||||
|
||||
|
||||
1. Validates and updates version in `pyproject.toml`
|
||||
2. Builds Python SDK with Fern
|
||||
3. Builds TypeScript SDK with Fern
|
||||
4. Creates commit with all changes
|
||||
5. Optionally runs SDK tests
|
||||
6. Pushes branch and creates PR
|
||||
|
||||
## Version argument
|
||||
|
||||
The version can be provided as an argument or you'll be prompted:
|
||||
|
||||
- If `$ARGUMENTS` is provided, use it as the new version
|
||||
- If not provided, ask user for the new version number
|
||||
- Validate it follows semver format: `MAJOR.MINOR.PATCH` (e.g., `1.0.14`, `1.1.0`, `2.0.0`)
|
||||
|
||||
**Semver guidance:**
|
||||
- PATCH: Bug fixes, backwards compatible (e.g., 1.0.13 → 1.0.14)
|
||||
- MINOR: New features, backwards compatible (e.g., 1.0.13 → 1.1.0)
|
||||
- MAJOR: Breaking changes (e.g., 1.0.13 → 2.0.0)
|
||||
|
||||
## Step-by-step process
|
||||
|
||||
### 1. Get and validate version
|
||||
|
||||
- Read current version from `pyproject.toml` line 3
|
||||
- Determine new version from `$ARGUMENTS` or prompt user
|
||||
- Validate semver format using regex: `^\d+\.\d+\.\d+$`
|
||||
- Confirm with user: "Bumping version from {current} to {new}. Continue?"
|
||||
|
||||
### 2. Create feature branch
|
||||
|
||||
```bash
|
||||
git checkout -b bump-version-$ARGUMENTS
|
||||
```
|
||||
|
||||
Branch naming: `bump-version-{version}` (e.g., `bump-version-1.0.14`)
|
||||
|
||||
### 3. Update pyproject.toml
|
||||
|
||||
Update line 3 in `pyproject.toml`:
|
||||
|
||||
```toml
|
||||
version = "{new_version}"
|
||||
```
|
||||
|
||||
Use the Edit tool to make this single-line change.
|
||||
|
||||
### 4. Build Python SDK
|
||||
|
||||
```bash
|
||||
bash scripts/fern_build_python_sdk.sh
|
||||
```
|
||||
|
||||
- Wait for completion
|
||||
- Check output for errors
|
||||
- Fern reads version from `pyproject.toml`
|
||||
|
||||
### 5. Build TypeScript SDK
|
||||
|
||||
```bash
|
||||
bash scripts/fern_build_ts_sdk.sh
|
||||
```
|
||||
|
||||
- Wait for completion
|
||||
- Check output for errors
|
||||
- Verify `skyvern-ts/client/package.json` version matches new version
|
||||
|
||||
### 6. Review changes
|
||||
|
||||
```bash
|
||||
git status
|
||||
git diff --stat
|
||||
```
|
||||
|
||||
Show user:
|
||||
- Number of files changed
|
||||
- Which files were modified
|
||||
- Summary of changes
|
||||
|
||||
### 7. Commit changes
|
||||
|
||||
```bash
|
||||
git add .
|
||||
git commit -m "Bump version to {version}
|
||||
|
||||
- Update version in pyproject.toml
|
||||
- Regenerate Python SDK with Fern
|
||||
- Regenerate TypeScript SDK with Fern
|
||||
|
||||
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>"
|
||||
```
|
||||
|
||||
### 8. Verify SDKs (optional)
|
||||
|
||||
Ask user: "Would you like to run SDK tests to verify nothing broke?"
|
||||
|
||||
If yes:
|
||||
- Python SDK tests: `pytest tests/sdk/python_sdk/`
|
||||
- Note that TypeScript tests require manual Chrome setup (see `tests/sdk/README.md`)
|
||||
- Display test results
|
||||
- If tests fail, STOP and report errors - do not proceed to push
|
||||
|
||||
If no:
|
||||
- Skip to push step
|
||||
|
||||
### 9. Push and create PR
|
||||
|
||||
Ask user: "Ready to push and create PR?"
|
||||
|
||||
If yes:
|
||||
|
||||
```bash
|
||||
git push -u origin bump-version-{version}
|
||||
|
||||
gh pr create --title "Bump version to {version}" --body "## Summary
|
||||
Bump Skyvern OSS version to {version}
|
||||
|
||||
## Changes
|
||||
- Updated version in \`pyproject.toml\`
|
||||
- Regenerated Python SDK with Fern
|
||||
- Regenerated TypeScript SDK with Fern
|
||||
|
||||
## Deployment
|
||||
After merge, GitHub will automatically:
|
||||
- Deploy Python package to PyPI (version change in \`pyproject.toml\`)
|
||||
- Deploy TypeScript package to NPM (version change in \`package.json\`)
|
||||
|
||||
## Testing
|
||||
- [ ] Python SDK tests passed locally
|
||||
- [ ] TypeScript SDK tests passed locally (if applicable)
|
||||
|
||||
🤖 Generated with [Claude Code](https://claude.com/claude-code)"
|
||||
```
|
||||
|
||||
Display the PR URL to the user.
|
||||
|
||||
## Important notes
|
||||
|
||||
- **Single PR**: All changes (version bump, SDK generation, commit) happen in one PR
|
||||
- **Fern sync**: Fern reads version from `pyproject.toml` and syncs to `package.json`
|
||||
- **Testing**: SDK tests require `.env` with `SKYVERN_API_KEY`
|
||||
- **Deployment**: Automatic on PR merge via GitHub Actions
|
||||
- **No force push**: Never use `--force` when pushing
|
||||
|
||||
## Error handling
|
||||
|
||||
If any step fails:
|
||||
1. Display the error message clearly
|
||||
2. Explain what went wrong
|
||||
3. Ask user how to proceed (fix, skip, or abort)
|
||||
4. Do not continue to next steps if critical operations fail
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
**/videos
|
||||
**/artifacts
|
||||
!skyvern/client/artifacts
|
||||
**/traces
|
||||
**/inputs
|
||||
**/har
|
||||
**/.git
|
||||
**/.github
|
||||
**/.mypy_cache
|
||||
**/.venv
|
||||
**/.vscode
|
||||
*.env*
|
||||
!/.env
|
||||
# Generated local deployment credentials
|
||||
**/.skyvern
|
||||
**/secrets*.toml
|
||||
|
||||
# Skyvern
|
||||
docs
|
||||
images
|
||||
|
||||
# Front
|
||||
skyvern-frontend/.env*
|
||||
skyvern-frontend/dist
|
||||
skyvern-frontend/node_modules
|
||||
|
||||
.dockerignore
|
||||
.gitignore
|
||||
Dockerfile
|
||||
|
|
@ -0,0 +1,157 @@
|
|||
# Environment that the agent will run in.
|
||||
ENV=local
|
||||
|
||||
# Browser streaming mode: "cdp" for local browser streaming, "vnc" for VNC streaming.
|
||||
# Quickstart writes "cdp" for new local installs; app code falls back to "vnc" if unset.
|
||||
BROWSER_STREAMING_MODE=cdp
|
||||
|
||||
# LLM Provider Configurations:
|
||||
# ENABLE_OPENAI: Set to true to enable OpenAI as a language model provider.
|
||||
ENABLE_OPENAI=false
|
||||
# OPENAI_API_KEY: Your OpenAI API key for accessing models like GPT-4.
|
||||
OPENAI_API_KEY=""
|
||||
# OPENAI_API_BASE: Your OpenAI API Base url. Optional.
|
||||
# OPENAI_API_BASE=""
|
||||
# OPENAI_ORGANIZATION: Your OpenAI org-id. Optional.
|
||||
# OPENAI_ORGANIZATION=""
|
||||
|
||||
# ENABLE_ANTHROPIC: Set to true to enable Anthropic as a language model provider.
|
||||
ENABLE_ANTHROPIC=false
|
||||
# ANTHROPIC_API_KEY: Your Anthropic API key for accessing models like Claude-3, Claude-4, and Claude-4.5.
|
||||
ANTHROPIC_API_KEY=""
|
||||
|
||||
# ENABLE_AZURE: Set to true to enable Azure as a language model provider.
|
||||
ENABLE_AZURE=false
|
||||
# AZURE_DEPLOYMENT: Your Azure deployment name for accessing specific models.
|
||||
AZURE_DEPLOYMENT=""
|
||||
# AZURE_API_KEY: Your API key for accessing Azure's language models.
|
||||
AZURE_API_KEY=""
|
||||
# AZURE_API_BASE: The base URL for Azure's API.
|
||||
AZURE_API_BASE=""
|
||||
# AZURE_API_VERSION: The version of Azure's API to use.
|
||||
AZURE_API_VERSION=""
|
||||
|
||||
ENABLE_AZURE_GPT4O_MINI=false
|
||||
AZURE_GPT4O_MINI_DEPLOYMENT=""
|
||||
AZURE_GPT4O_MINI_API_KEY=""
|
||||
AZURE_GPT4O_MINI_API_BASE=""
|
||||
AZURE_GPT4O_MINI_API_VERSION=""
|
||||
|
||||
# Azure GPT-5 Model Configurations
|
||||
ENABLE_AZURE_GPT5=false
|
||||
AZURE_GPT5_DEPLOYMENT="gpt-5"
|
||||
AZURE_GPT5_API_KEY=""
|
||||
AZURE_GPT5_API_BASE=""
|
||||
AZURE_GPT5_API_VERSION="2025-01-01-preview"
|
||||
|
||||
ENABLE_AZURE_GPT5_MINI=false
|
||||
AZURE_GPT5_MINI_DEPLOYMENT="gpt-5-mini"
|
||||
AZURE_GPT5_MINI_API_KEY=""
|
||||
AZURE_GPT5_MINI_API_BASE=""
|
||||
AZURE_GPT5_MINI_API_VERSION="2025-01-01-preview"
|
||||
|
||||
ENABLE_AZURE_GPT5_NANO=false
|
||||
AZURE_GPT5_NANO_DEPLOYMENT="gpt-5-nano"
|
||||
AZURE_GPT5_NANO_API_KEY=""
|
||||
AZURE_GPT5_NANO_API_BASE=""
|
||||
AZURE_GPT5_NANO_API_VERSION="2025-01-01-preview"
|
||||
|
||||
# ENABLE_GEMINI: Set to true to enable Gemini as a language model provider.
|
||||
ENABLE_GEMINI=false
|
||||
# GEMINI_API_KEY: Your Gemini API key for accessing models like Gemini 2.5 Pro.
|
||||
GEMINI_API_KEY=""
|
||||
|
||||
# LLM_KEY: The chosen language model to use. This should be one of the models
|
||||
# provided by the enabled LLM providers (e.g., OPENAI_GPT5_5, OPENAI_GPT5_4,
|
||||
# ANTHROPIC_CLAUDE4.7_OPUS, ANTHROPIC_CLAUDE4.6_SONNET, GEMINI_3_PRO,
|
||||
# BEDROCK_ANTHROPIC_CLAUDE4.7_OPUS_INFERENCE_PROFILE).
|
||||
# See docs: https://www.skyvern.com/docs/self-hosted/llm-configuration
|
||||
LLM_KEY=""
|
||||
# a cheaper LLM providers to help finishing some small tasks, like custom selection or svg conversion. If empty, it will be the same as LLM_KEY
|
||||
SECONDARY_LLM_KEY=""
|
||||
|
||||
# Web browser configuration for scraping:
|
||||
# BROWSER_TYPE: Can be either "chromium-headless" or "chromium-headful".
|
||||
BROWSER_TYPE="chromium-headful"
|
||||
# BROWSER_REMOTE_DEBUGGING_HOST_HEADER: Optional Host header for cdp-connect.
|
||||
# Windows chrome://inspect Docker bridges may need this set to 127.0.0.1:<chrome-port>.
|
||||
BROWSER_REMOTE_DEBUGGING_HOST_HEADER=
|
||||
# BROWSER_CDP_CONNECT_TIMEOUT_MS: Timeout for cdp-connect startup/approval in milliseconds.
|
||||
BROWSER_CDP_CONNECT_TIMEOUT_MS=120000
|
||||
# MAX_SCRAPING_RETRIES: Number of times to retry scraping a page before giving up, currently set to 0.
|
||||
MAX_SCRAPING_RETRIES=0
|
||||
# VIDEO_PATH: Path to the directory where videos will be saved.
|
||||
VIDEO_PATH=./videos
|
||||
# BROWSER_ACTION_TIMEOUT_MS: Timeout for browser actions in milliseconds.
|
||||
BROWSER_ACTION_TIMEOUT_MS=5000
|
||||
|
||||
# Agent run configuration:
|
||||
# MAX_STEPS_PER_RUN: Maximum number of steps to execute per run unless the agent finishes with a terminal state (last step or error).
|
||||
MAX_STEPS_PER_RUN=50
|
||||
|
||||
# Logging and database configuration:
|
||||
# LOG_LEVEL: Control log level (e.g., INFO, DEBUG).
|
||||
LOG_LEVEL=INFO
|
||||
# DATABASE_STRING: Database connection string.
|
||||
DATABASE_STRING="postgresql+psycopg://skyvern@localhost/skyvern"
|
||||
# If you are using Windows use this DATABASE_STRING.
|
||||
# DATABASE_STRING="postgresql+asyncpg://skyvern@localhost/skyvern"
|
||||
|
||||
# PORT: Port to run the agent on.
|
||||
PORT=8000
|
||||
|
||||
# Analytics configuration:
|
||||
# ANALYTICS_ID: Distinct analytics ID (a UUID is generated if left blank).
|
||||
ANALYTICS_ID="anonymous"
|
||||
|
||||
# LAMINAR
|
||||
# Skyvern's backend runs on port 8000 by default. Consider updating your self-hosted laminar to env vars to avoid conflicts
|
||||
# LMNR_HTTP_PORT=8010
|
||||
# LMNR_GRPC_PORT=8011
|
||||
# LMNR_BASE_URL=http://localhost
|
||||
# LMNR_PROJECT_API_KEY=<your-laminar-project-api-key>
|
||||
|
||||
# 1Password Integration
|
||||
# OP_SERVICE_ACCOUNT_TOKEN: API token for 1Password integration
|
||||
OP_SERVICE_ACCOUNT_TOKEN=""
|
||||
|
||||
# Enable recording skyvern logs as artifacts
|
||||
ENABLE_LOG_ARTIFACTS=false
|
||||
|
||||
# =============================================================================
|
||||
# SKYVERN BITWARDEN CONFIGURATION
|
||||
# =============================================================================
|
||||
# Your organization ID in official Bitwarden server or vaultwarden (if using organizations)
|
||||
SKYVERN_AUTH_BITWARDEN_ORGANIZATION_ID=your-org-id-here
|
||||
|
||||
# These should match the values for bitwarden cli server for consistency
|
||||
SKYVERN_AUTH_BITWARDEN_MASTER_PASSWORD=your-master-password-here
|
||||
SKYVERN_AUTH_BITWARDEN_CLIENT_ID=user.your-client-id-here
|
||||
SKYVERN_AUTH_BITWARDEN_CLIENT_SECRET=your-client-secret-here
|
||||
|
||||
# The CLI server will run on localhost:8002 by default
|
||||
# Optional, because by default Bitwarden is used directly
|
||||
# BITWARDEN_SERVER=http://localhost
|
||||
# BITWARDEN_SERVER_PORT=8002
|
||||
|
||||
# =============================================================================
|
||||
# OPTIONAL: ADDITIONAL SKYVERN CONFIGURATION
|
||||
# =============================================================================
|
||||
# If you need to override the default Bitwarden server settings in Skyvern
|
||||
# These will be automatically set by the Docker Compose, but you can override them here
|
||||
|
||||
# Maximum number of retries for Bitwarden operations
|
||||
# BITWARDEN_MAX_RETRIES=3
|
||||
|
||||
# Timeout in seconds for Bitwarden operations
|
||||
# BITWARDEN_TIMEOUT_SECONDS=60
|
||||
|
||||
# Shared Redis URL used by any service that needs Redis (pub/sub, cache, etc.)
|
||||
# REDIS_URL=redis://localhost:6379/0
|
||||
|
||||
# Notification registry type: "local" (default, in-process) or "redis" (multi-pod)
|
||||
# NOTIFICATION_REGISTRY_TYPE=local
|
||||
|
||||
# Optional: override Redis URL specifically for notifications (falls back to REDIS_URL)
|
||||
# NOTIFICATION_REDIS_URL=
|
||||
# REDIS_URL=redis://localhost:6379/0
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
[flake8]
|
||||
max-line-length = 88
|
||||
select = "E303, W293, W292, E305, E231, E302"
|
||||
exclude =
|
||||
.tox,
|
||||
__pycache__,
|
||||
*.pyc,
|
||||
.env
|
||||
venv*/*,
|
||||
.venv/*,
|
||||
reports/*,
|
||||
dist/*,
|
||||
code,
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
# Set default behavior to automatically normalize line endings
|
||||
* text=auto
|
||||
|
||||
# Force Unix LF line endings for shell scripts
|
||||
*.sh text eol=lf
|
||||
bitwarden-cli-server/entrypoint.sh text eol=lf
|
||||
|
||||
# Force Unix LF line endings for Python files
|
||||
*.py text eol=lf
|
||||
|
||||
# Force Unix LF line endings for Docker files
|
||||
Dockerfile text eol=lf
|
||||
*.dockerfile text eol=lf
|
||||
|
||||
# Force Unix LF line endings for YAML and config files
|
||||
*.yml text eol=lf
|
||||
*.yaml text eol=lf
|
||||
*.json text eol=lf
|
||||
*.md text eol=lf
|
||||
|
||||
# Binary files
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.jpeg binary
|
||||
*.gif binary
|
||||
*.ico binary
|
||||
*.pdf binary
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
uv_sync_args=(sync)
|
||||
IFS=',' read -ra extra_array <<< "${UV_SYNC_EXTRAS:-}"
|
||||
for extra in "${extra_array[@]}"; do
|
||||
trimmed=$(printf '%s' "$extra" | xargs)
|
||||
if [[ -n "$trimmed" ]]; then
|
||||
uv_sync_args+=(--extra "$trimmed")
|
||||
fi
|
||||
done
|
||||
|
||||
IFS=',' read -ra group_array <<< "${UV_SYNC_GROUPS:-}"
|
||||
for group in "${group_array[@]}"; do
|
||||
trimmed=$(printf '%s' "$group" | xargs)
|
||||
if [[ -n "$trimmed" ]]; then
|
||||
uv_sync_args+=(--group "$trimmed")
|
||||
fi
|
||||
done
|
||||
|
||||
uv "${uv_sync_args[@]}"
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
## Description
|
||||
|
||||
<!--- Describe your changes in detail -->
|
||||
|
||||
## How Has This Been Tested?
|
||||
|
||||
<!--- Please describe in detail how you tested your changes. -->
|
||||
|
||||
<!--- Include details of your testing environment, and the tests you ran to -->
|
||||
|
||||
<!--- see how your change affects other areas of the code, etc. -->
|
||||
|
||||
## Artifacts (if appropriate):
|
||||
|
||||
<!--- Include videos and pictures that validate your work -->
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
Skyvern-AI/skyvern-cloud:
|
||||
- source: skyvern/
|
||||
dest: skyvern/
|
||||
deleteOrphaned: true
|
||||
- source: pyproject.toml
|
||||
dest: pyproject.toml
|
||||
- source: uv.lock
|
||||
dest: uv.lock
|
||||
- source: setup.sh
|
||||
dest: setup.sh
|
||||
- source: .env.example
|
||||
dest: .env.example
|
||||
- source: .nvmrc
|
||||
dest: .nvmrc
|
||||
- source: run_ui.sh
|
||||
dest: run_ui.sh
|
||||
- source: run_alembic_check.sh
|
||||
dest: run_alembic_check.sh
|
||||
- source: skyvern-frontend/src/
|
||||
dest: skyvern-frontend/src/
|
||||
deleteOrphaned: true
|
||||
- source: evaluation/
|
||||
dest: evaluation/
|
||||
deleteOrphaned: true
|
||||
- source: fern/
|
||||
dest: fern/
|
||||
deleteOrphaned: true
|
||||
- source: docs/
|
||||
dest: docs/
|
||||
deleteOrphaned: true
|
||||
- source: tests/__init__.py
|
||||
dest: tests/__init__.py
|
||||
- source: tests/conftest.py
|
||||
dest: tests/conftest.py
|
||||
- source: tests/test_agent.py
|
||||
dest: tests/test_agent.py
|
||||
- source: tests/unit/
|
||||
dest: tests/unit/
|
||||
deleteOrphaned: true
|
||||
- source: tests/unit_tests/
|
||||
dest: tests/unit_tests/
|
||||
deleteOrphaned: true
|
||||
- source: tests/smoke_tests/
|
||||
dest: tests/smoke_tests/
|
||||
deleteOrphaned: true
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
name: Auto-merge sync PRs
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, ready_for_review, labeled, synchronize]
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
checks: read
|
||||
jobs:
|
||||
auto-merge:
|
||||
if: >
|
||||
contains(join(github.event.pull_request.labels.*.name, ','), 'sync') && contains('suchintan,wintonzheng,LawyZheng,pedrohsdb,marcmuon,celalzamanoglu,AronPerez,andrewneilson,cindehaa,trevor-cheung,cursoragent,claude[bot],copilot-swe-agent[bot]', github.event.pull_request.user.login)
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Wait for all required checks to pass
|
||||
uses: lewagon/wait-on-check-action@3603e826ee561ea102b58accb5ea55a1a7482343 # v1.4.1
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
wait-interval: 10
|
||||
ignore-checks: auto-merge, Mintlify Deployment
|
||||
allowed-conclusions: success, skipped, neutral
|
||||
- name: Set token for author
|
||||
id: set-token
|
||||
run: |
|
||||
case "${{ github.event.pull_request.user.login }}" in
|
||||
wintonzheng)
|
||||
echo "GH_PAT=${{ secrets.SKYVERN_CLOUD_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
LawyZheng)
|
||||
echo "GH_PAT=${{ secrets.LAWY_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
suchintan)
|
||||
echo "GH_PAT=${{ secrets.SUCHINTAN_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
pedrohsdb)
|
||||
echo "GH_PAT=${{ secrets.PEDROHSDB_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
marcmuon)
|
||||
echo "GH_PAT=${{ secrets.MARC_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
celalzamanoglu)
|
||||
echo "GH_PAT=${{ secrets.CELAL_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
andrewneilson)
|
||||
echo "GH_PAT=${{ secrets.ANDREW_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
cindehaa)
|
||||
echo "GH_PAT=${{ secrets.CINDY_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
trevor-cheung)
|
||||
echo "GH_PAT=${{ secrets.TREVOR_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
AronPerez)
|
||||
echo "GH_PAT=${{ secrets.AARON_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
cursoragent)
|
||||
echo "GH_PAT=${{ secrets.SKYVERN_CLOUD_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
claude\[bot\])
|
||||
echo "GH_PAT=${{ secrets.SKYVERN_CLOUD_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
copilot-swe-agent\[bot\])
|
||||
echo "GH_PAT=${{ secrets.SKYVERN_CLOUD_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
*)
|
||||
echo "GH_PAT=${{ secrets.SKYVERN_CLOUD_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
echo "Author $PR_AUTHOR is not in the approved list"
|
||||
;;
|
||||
esac
|
||||
- name: Auto-merge PR
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.set-token.outputs.GH_PAT }}
|
||||
run: |
|
||||
gh pr merge ${{ github.event.pull_request.number }} \
|
||||
--squash \
|
||||
--admin \
|
||||
--repo "${{ github.repository }}"
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
name: Auto Create GitHub Release on Version Change
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'pyproject.toml'
|
||||
jobs:
|
||||
check-version-change:
|
||||
permissions:
|
||||
contents: read
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version_changed: ${{ steps.check.outputs.version_changed }}
|
||||
new_version: ${{ steps.check.outputs.new_version }}
|
||||
previous_version: ${{ steps.check.outputs.previous_version }}
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
persist-credentials: false
|
||||
- name: Check if version changed
|
||||
id: check
|
||||
run: |
|
||||
# Get version from current pyproject.toml
|
||||
CURRENT_VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
|
||||
|
||||
# Get version from previous commit
|
||||
git checkout HEAD^1
|
||||
PREVIOUS_VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
|
||||
|
||||
# Return to current commit
|
||||
git checkout -
|
||||
|
||||
if [ "$CURRENT_VERSION" != "$PREVIOUS_VERSION" ]; then
|
||||
echo "Version changed from $PREVIOUS_VERSION to $CURRENT_VERSION"
|
||||
echo "version_changed=true" >> $GITHUB_OUTPUT
|
||||
echo "new_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
|
||||
echo "previous_version=$PREVIOUS_VERSION" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "Version remained at $CURRENT_VERSION"
|
||||
echo "version_changed=false" >> $GITHUB_OUTPUT
|
||||
echo "new_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
|
||||
echo "previous_version=$PREVIOUS_VERSION" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
create-release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: check-version-change
|
||||
if: needs.check-version-change.outputs.version_changed == 'true'
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
- name: Generate release notes
|
||||
id: release_notes
|
||||
run: |
|
||||
VERSION="v${{ needs.check-version-change.outputs.new_version }}"
|
||||
PREVIOUS_VERSION="v${{ needs.check-version-change.outputs.previous_version }}"
|
||||
|
||||
# Try to find the previous version tag
|
||||
if git rev-parse "$PREVIOUS_VERSION" >/dev/null 2>&1; then
|
||||
# Generate changelog from commits since last version
|
||||
CHANGELOG=$(git log --pretty=format:"- %s (%h)" "$PREVIOUS_VERSION"..HEAD)
|
||||
else
|
||||
# If no previous tag exists, get recent commits
|
||||
CHANGELOG=$(git log --pretty=format:"- %s (%h)" -10)
|
||||
fi
|
||||
|
||||
# Create release notes
|
||||
cat << EOF > release_notes.md
|
||||
## What's Changed
|
||||
|
||||
Version bumped from ${{ needs.check-version-change.outputs.previous_version }} to ${{ needs.check-version-change.outputs.new_version }}
|
||||
|
||||
### Recent Changes
|
||||
$CHANGELOG
|
||||
|
||||
**Full Changelog**: https://github.com/Skyvern-AI/skyvern/compare/$PREVIOUS_VERSION...$VERSION
|
||||
EOF
|
||||
|
||||
echo "Release notes generated"
|
||||
cat release_notes.md
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2
|
||||
with:
|
||||
tag_name: v${{ needs.check-version-change.outputs.new_version }}
|
||||
name: Release v${{ needs.check-version-change.outputs.new_version }}
|
||||
body_path: release_notes.md
|
||||
draft: false
|
||||
prerelease: false
|
||||
generate_release_notes: true
|
||||
env:
|
||||
# Using PAT instead of GITHUB_TOKEN to trigger downstream workflows (e.g., build-docker-image)
|
||||
# GITHUB_TOKEN events don't trigger other workflows to prevent infinite loops
|
||||
GITHUB_TOKEN: ${{ secrets.SKYVERN_OSS_GITHUB_TOKEN }}
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
name: Build Docker Image and Push to ECR
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag_name:
|
||||
description: 'Tag name for the release (e.g., v1.0.11)'
|
||||
required: true
|
||||
type: string
|
||||
env:
|
||||
AWS_REGION: us-east-1
|
||||
ECR_BACKEND_REPOSITORY: skyvern
|
||||
ECR_UI_REPOSITORY: skyvern-ui
|
||||
REGISTRY_ALIAS: skyvern # t6d4b5t4
|
||||
DOCKERHUB_USERNAME: skyvern
|
||||
jobs:
|
||||
run-ci:
|
||||
uses: ./.github/workflows/ci.yml
|
||||
build-docker-image:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [run-ci]
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: ${{ env.AWS_REGION }}
|
||||
- name: Login to Amazon ECR Public
|
||||
id: login-ecr-public
|
||||
uses: aws-actions/amazon-ecr-login@183a1442edf41672e66566b7fc560e297a290896 # v2
|
||||
with:
|
||||
registry-type: public
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
|
||||
with:
|
||||
username: ${{ env.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
|
||||
- name: Build, tag, and push backend image to Amazon Public ECR and Docker Hub
|
||||
id: build-image
|
||||
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
|
||||
env:
|
||||
ECR_REGISTRY: ${{ steps.login-ecr-public.outputs.registry }}
|
||||
with:
|
||||
context: .
|
||||
platforms: |
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
push: true
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
tags: |
|
||||
${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_BACKEND_REPOSITORY }}:${{ github.sha }}
|
||||
${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_BACKEND_REPOSITORY }}:${{ inputs.tag_name || github.event.release.tag_name }}
|
||||
${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_BACKEND_REPOSITORY }}:latest
|
||||
${{ env.DOCKERHUB_USERNAME }}/${{ env.ECR_BACKEND_REPOSITORY }}:${{ github.sha }}
|
||||
${{ env.DOCKERHUB_USERNAME }}/${{ env.ECR_BACKEND_REPOSITORY }}:${{ inputs.tag_name || github.event.release.tag_name }}
|
||||
${{ env.DOCKERHUB_USERNAME }}/${{ env.ECR_BACKEND_REPOSITORY }}:latest
|
||||
- name: Build, tag, and push ui image to Amazon Public ECR and Docker Hub
|
||||
id: build-ui-image
|
||||
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
|
||||
env:
|
||||
ECR_REGISTRY: ${{ steps.login-ecr-public.outputs.registry }}
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.ui
|
||||
build-args: |
|
||||
APP_VERSION=${{ github.sha }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
platforms: |
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_UI_REPOSITORY }}:${{ github.sha }}
|
||||
${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_UI_REPOSITORY }}:${{ inputs.tag_name || github.event.release.tag_name }}
|
||||
${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_UI_REPOSITORY }}:latest
|
||||
${{ env.DOCKERHUB_USERNAME }}/${{ env.ECR_UI_REPOSITORY }}:${{ github.sha }}
|
||||
${{ env.DOCKERHUB_USERNAME }}/${{ env.ECR_UI_REPOSITORY }}:${{ inputs.tag_name || github.event.release.tag_name }}
|
||||
${{ env.DOCKERHUB_USERNAME }}/${{ env.ECR_UI_REPOSITORY }}:latest
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
name: Run tests and pre-commit
|
||||
# Run this job on pushes to `main`, and for pull requests. If you don't specify
|
||||
# `branches: [main], then this actions runs _twice_ on pull requests, which is
|
||||
# annoying.
|
||||
on:
|
||||
workflow_call:
|
||||
pull_request:
|
||||
push:
|
||||
branches: [main]
|
||||
jobs:
|
||||
test:
|
||||
name: Run tests and pre-commit hooks
|
||||
runs-on: ubuntu-latest
|
||||
# Service containers to run with `container-job`
|
||||
services:
|
||||
# Label used to access the service container
|
||||
postgres:
|
||||
# Docker Hub image
|
||||
image: postgres
|
||||
# Provide the password for postgres
|
||||
env:
|
||||
POSTGRES_USER: skyvern
|
||||
POSTGRES_DATABASE: skyvern
|
||||
POSTGRES_HOST_AUTH_METHOD: trust
|
||||
# Set health checks to wait until postgres has started
|
||||
options: >-
|
||||
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||
ports:
|
||||
# Maps tcp port 5432 on service container to the host
|
||||
- 5432:5432
|
||||
steps:
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
with:
|
||||
persist-credentials: false
|
||||
# If you wanted to use multiple Python versions, you'd have specify a matrix in the job and
|
||||
# reference the matrixe python version here.
|
||||
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
|
||||
with:
|
||||
python-version: "3.11"
|
||||
# Install uv (fast, single-file binary)
|
||||
- name: Install uv
|
||||
run: |
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
# Cache uv's download/resolve cache to speed up CI (optional but nice)
|
||||
- name: Cache uv global cache
|
||||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
|
||||
with:
|
||||
path: ~/.cache/uv
|
||||
key: uv-cache-${{ runner.os }}-${{ hashFiles('**/pyproject.toml', '**/uv.lock') }}
|
||||
# Cache the project virtualenv (keyed by Python version + lockfile)
|
||||
- name: Cache venv
|
||||
id: cache-venv
|
||||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
|
||||
with:
|
||||
path: .venv
|
||||
key: venv-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version || '3.11' }}-${{ hashFiles('**/uv.lock') }}
|
||||
# Create/refresh the environment (installs main + dev groups)
|
||||
- name: Sync deps with uv
|
||||
if: steps.cache-venv.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
uv lock
|
||||
uv sync --extra server --group dev
|
||||
# Ensure venv is current even on cache hit (cheap no-op if up to date)
|
||||
- name: Ensure environment is up to date
|
||||
if: steps.cache-venv.outputs.cache-hit == 'true'
|
||||
run: |
|
||||
uv sync --extra server --group dev
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
cache: npm
|
||||
cache-dependency-path: skyvern-frontend/package-lock.json
|
||||
- name: Install frontend dependencies
|
||||
working-directory: skyvern-frontend
|
||||
run: npm ci
|
||||
# Finally, run pre-commit.
|
||||
- name: Run all pre-commit hooks
|
||||
run: uv run pre-commit run --all-files
|
||||
env:
|
||||
ENABLE_OPENAI: "true"
|
||||
OPENAI_API_KEY: "sk-dummy"
|
||||
ENABLE_AZURE_GPT4O_MINI: "true"
|
||||
AZURE_GPT4O_MINI_DEPLOYMENT: "dummy"
|
||||
AZURE_GPT4O_MINI_API_KEY: "dummy"
|
||||
AZURE_GPT4O_MINI_API_BASE: "dummy"
|
||||
AZURE_GPT4O_MINI_API_VERSION: "dummy"
|
||||
AWS_REGION: "us-east-1"
|
||||
ENABLE_BEDROCK: "true"
|
||||
- name: Run alembic check
|
||||
env:
|
||||
ENABLE_OPENAI: "true"
|
||||
OPENAI_API_KEY: "sk-dummy"
|
||||
ENABLE_AZURE_GPT4O_MINI: "true"
|
||||
AZURE_GPT4O_MINI_DEPLOYMENT: "dummy"
|
||||
AZURE_GPT4O_MINI_API_KEY: "dummy"
|
||||
AZURE_GPT4O_MINI_API_BASE: "dummy"
|
||||
AZURE_GPT4O_MINI_API_VERSION: "dummy"
|
||||
AWS_REGION: "us-east-1"
|
||||
ENABLE_BEDROCK: "true"
|
||||
run: uv run ./run_alembic_check.sh
|
||||
- name: trigger tests
|
||||
env:
|
||||
ENABLE_OPENAI: "true"
|
||||
OPENAI_API_KEY: "sk-dummy"
|
||||
AWS_ACCESS_KEY_ID: "dummy"
|
||||
AWS_SECRET_ACCESS_KEY: "dummy"
|
||||
run: uv run pytest
|
||||
fe-lint-build:
|
||||
name: Frontend Lint and Build
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./skyvern-frontend
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
- name: Install Node.js dependencies
|
||||
run: npm ci
|
||||
- name: Run linter
|
||||
run: npm run lint
|
||||
- name: Run build
|
||||
run: npm run build
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
name: Claude Code Review
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, ready_for_review, reopened]
|
||||
jobs:
|
||||
claude-review:
|
||||
# Only auto-review PRs from external contributors (not maintainers)
|
||||
# This helps community contributors get quick feedback while saving costs
|
||||
if: |
|
||||
github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' ||
|
||||
github.event.pull_request.author_association == 'FIRST_TIMER' ||
|
||||
github.event.pull_request.author_association == 'NONE'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
issues: read
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
persist-credentials: false
|
||||
- name: Run Claude Code Review
|
||||
id: claude-review
|
||||
uses: anthropics/claude-code-action@0ee1beea589a67d33340072691a5d42abec7ae6b # v1
|
||||
with:
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
||||
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
|
||||
plugins: 'code-review@claude-code-plugins'
|
||||
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
|
||||
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
|
||||
# or https://code.claude.com/docs/en/cli-reference for available options
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
name: Claude Code
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
pull_request_review_comment:
|
||||
types: [created]
|
||||
pull_request_review:
|
||||
types: [submitted]
|
||||
jobs:
|
||||
claude:
|
||||
# Only allow @claude mentions from repository collaborators (not from issue/PR authors who may be external)
|
||||
if: |
|
||||
(
|
||||
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
|
||||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
|
||||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude'))
|
||||
) && (
|
||||
github.event.sender.type == 'Bot' ||
|
||||
github.event.comment.author_association == 'OWNER' ||
|
||||
github.event.comment.author_association == 'MEMBER' ||
|
||||
github.event.comment.author_association == 'COLLABORATOR' ||
|
||||
github.event.review.author_association == 'OWNER' ||
|
||||
github.event.review.author_association == 'MEMBER' ||
|
||||
github.event.review.author_association == 'COLLABORATOR'
|
||||
)
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
issues: read
|
||||
id-token: write
|
||||
actions: read # Required for Claude to read CI results on PRs
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
persist-credentials: false
|
||||
- name: Run Claude Code
|
||||
id: claude
|
||||
uses: anthropics/claude-code-action@0ee1beea589a67d33340072691a5d42abec7ae6b # v1
|
||||
with:
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
||||
# This is an optional setting that allows Claude to read CI results on PRs
|
||||
additional_permissions: |
|
||||
actions: read
|
||||
|
||||
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
|
||||
# prompt: 'Update the pull request description to include a summary of changes.'
|
||||
|
||||
# Optional: Add claude_args to customize behavior and configuration
|
||||
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
|
||||
# or https://code.claude.com/docs/en/cli-reference for available options
|
||||
# claude_args: '--allowed-tools Bash(gh pr:*)'
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
name: Close inactive issues
|
||||
on:
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
close-issues:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/stale@f7176fd3007623b69d27091f9b9d4ab7995f0a06 # v5
|
||||
with:
|
||||
days-before-issue-stale: 30
|
||||
days-before-issue-close: 14
|
||||
stale-issue-label: "stale"
|
||||
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
|
||||
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
|
||||
days-before-pr-stale: 14
|
||||
stale-pr-message: "This pull request is stale because it has been open for 14 days with no activity."
|
||||
days-before-pr-close: -1
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
name: Preview Fern Docs
|
||||
|
||||
on:
|
||||
pull_request
|
||||
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ubuntu-latest
|
||||
permissions: write-all
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install Fern
|
||||
run: npm install -g fern-api
|
||||
|
||||
- name: Generate preview URL
|
||||
id: generate-docs
|
||||
env:
|
||||
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
|
||||
run: |
|
||||
OUTPUT=$(fern generate --docs --preview 2>&1) || true
|
||||
echo "$OUTPUT"
|
||||
URL=$(echo "$OUTPUT" | grep -oP 'Published docs to \K.*(?= \()')
|
||||
echo "Preview URL: $URL"
|
||||
echo "🌿 Preview your docs: $URL" > preview_url.txt
|
||||
|
||||
- name: Comment URL in PR
|
||||
uses: thollander/actions-comment-pull-request@1d3973dc4b8e1399c0620d3f2b1aa5e795465308 # v2.4.3
|
||||
with:
|
||||
filePath: preview_url.txt
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
name: Publish Fern Docs
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install Fern
|
||||
run: npm install -g fern-api
|
||||
- name: Publish Docs
|
||||
env:
|
||||
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
|
||||
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
|
||||
run: fern generate --docs
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
name: Build Skyvern SDK and publish to PyPI
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'pyproject.toml'
|
||||
jobs:
|
||||
check-version-change:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version_changed: ${{ steps.check.outputs.version_changed }}
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
persist-credentials: false
|
||||
- name: Check if version changed
|
||||
id: check
|
||||
run: |
|
||||
# Get version from current pyproject.toml
|
||||
CURRENT_VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
|
||||
|
||||
# Get version from previous commit
|
||||
git checkout HEAD^1
|
||||
PREVIOUS_VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
|
||||
|
||||
if [ "$CURRENT_VERSION" != "$PREVIOUS_VERSION" ]; then
|
||||
echo "Version changed from $PREVIOUS_VERSION to $CURRENT_VERSION"
|
||||
echo "version_changed=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "Version remained at $CURRENT_VERSION"
|
||||
echo "version_changed=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
run-ci:
|
||||
needs: check-version-change
|
||||
if: needs.check-version-change.outputs.version_changed == 'true'
|
||||
uses: ./.github/workflows/ci.yml
|
||||
build-sdk:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [check-version-change, run-ci]
|
||||
if: needs.check-version-change.outputs.version_changed == 'true'
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
# If you wanted to use multiple Python versions, you'd have specify a matrix in the job and
|
||||
# reference the matrixe python version here.
|
||||
- name: Setup Python
|
||||
id: setup-python
|
||||
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
|
||||
with:
|
||||
python-version: "3.11"
|
||||
# Cache the installation of `uv` itself, e.g. the next step. This prevents the workflow
|
||||
# from installing `uv` every time, which can be slow.
|
||||
- name: Install uv
|
||||
run: |
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
# Cache uv's global cache (resolver/downloads) for speed
|
||||
- name: Cache uv cache
|
||||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
|
||||
with:
|
||||
path: ~/.cache/uv
|
||||
key: uv-cache-${{ runner.os }}-${{ hashFiles('**/pyproject.toml', '**/uv.lock') }}
|
||||
# Cache the project venv (keyed by lockfile + Python)
|
||||
- name: Cache venv
|
||||
id: cache-venv
|
||||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
|
||||
with:
|
||||
path: .venv
|
||||
key: venv-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version || '3.11' }}-${{ hashFiles('**/uv.lock') }}
|
||||
# Create/refresh environment. We install dev deps to get twine/build.
|
||||
- name: Sync dependencies
|
||||
if: steps.cache-venv.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
uv sync --group dev
|
||||
- name: Ensure environment is up to date (on cache hit)
|
||||
if: steps.cache-venv.outputs.cache-hit == 'true'
|
||||
run: uv sync --group dev
|
||||
- name: Clean dist directory
|
||||
run: rm -rf dist
|
||||
- name: Build Package
|
||||
run: uv build
|
||||
- name: Publish to PyPI
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
||||
run: uv run twine upload --repository pypi dist/*
|
||||
|
|
@ -0,0 +1,199 @@
|
|||
name: Sync to skyvern-cloud
|
||||
# Syncs merged OSS PRs (e.g. external contributions) to the cloud repo.
|
||||
# Skips sync PRs that originated from cloud to prevent infinite loops.
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [closed]
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
pr_number:
|
||||
description: 'PR number to sync. Input JUST the number, no #'
|
||||
required: true
|
||||
type: string
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
# Only run when:
|
||||
# 1. PR was merged (not just closed) OR manual dispatch
|
||||
# 2. PR is NOT a sync PR from cloud (prevents infinite sync loops)
|
||||
if: >
|
||||
(github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch') && !contains(join(github.event.pull_request.labels.*.name, ','), 'sync') && !startsWith(github.event.pull_request.head.ref, 'repo-sync/')
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Determine Git credentials
|
||||
id: git-creds
|
||||
run: |
|
||||
case "${{ github.event.pull_request.user.login }}" in
|
||||
wintonzheng)
|
||||
echo "GH_PAT=${{ secrets.SKYVERN_CLOUD_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
echo "GIT_EMAIL=shu@skyvern.com" >> $GITHUB_OUTPUT
|
||||
echo "GIT_USERNAME=Shuchang Zheng" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
LawyZheng)
|
||||
echo "GH_PAT=${{ secrets.LAWY_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
echo "GIT_EMAIL=lawy@skyvern.com" >> $GITHUB_OUTPUT
|
||||
echo "GIT_USERNAME=Lawy Zheng" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
suchintan)
|
||||
echo "GH_PAT=${{ secrets.SUCHINTAN_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
echo "GIT_EMAIL=suchintansingh@gmail.com" >> $GITHUB_OUTPUT
|
||||
echo "GIT_USERNAME=Suchintan Singh" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
pedrohsdb)
|
||||
echo "GH_PAT=${{ secrets.PEDROHSDB_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
echo "GIT_EMAIL=pedro@skyvern.com" >> $GITHUB_OUTPUT
|
||||
echo "GIT_USERNAME=pedrohsdb" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
marcmuon)
|
||||
echo "GH_PAT=${{ secrets.MARC_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
echo "GIT_EMAIL=marc@skyvern.com" >> $GITHUB_OUTPUT
|
||||
echo "GIT_USERNAME=marcmuon" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
celalzamanoglu)
|
||||
echo "GH_PAT=${{ secrets.CELAL_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
echo "GIT_EMAIL=celal@skyvern.com" >> $GITHUB_OUTPUT
|
||||
echo "GIT_USERNAME=celalzamanoglu" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
AronPerez)
|
||||
echo "GH_PAT=${{ secrets.AARON_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
echo "GIT_EMAIL=aaron@skyvern.com" >> $GITHUB_OUTPUT
|
||||
echo "GIT_USERNAME=AronPerez" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
andrewneilson)
|
||||
echo "GH_PAT=${{ secrets.ANDREW_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
echo "GIT_EMAIL=andrew@skyvern.com" >> $GITHUB_OUTPUT
|
||||
echo "GIT_USERNAME=andrewneilson" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
cindehaa)
|
||||
echo "GH_PAT=${{ secrets.CINDY_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
echo "GIT_EMAIL=cindy@skyvern.com" >> $GITHUB_OUTPUT
|
||||
echo "GIT_USERNAME=cindehaa" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
trevor-cheung)
|
||||
echo "GH_PAT=${{ secrets.TREVOR_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
echo "GIT_EMAIL=trevor@skyvern.com" >> $GITHUB_OUTPUT
|
||||
echo "GIT_USERNAME=trevor-cheung" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
cursoragent)
|
||||
echo "GH_PAT=${{ secrets.SKYVERN_CLOUD_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
echo "GIT_EMAIL=199161495+cursoragent@users.noreply.github.com" >> $GITHUB_OUTPUT
|
||||
echo "GIT_USERNAME=cursoragent" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
claude\[bot\])
|
||||
echo "GH_PAT=${{ secrets.SKYVERN_CLOUD_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
echo "GIT_EMAIL=209825114+claude[bot]@users.noreply.github.com" >> $GITHUB_OUTPUT
|
||||
echo "GIT_USERNAME=claude[bot]" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
copilot-swe-agent\[bot\])
|
||||
echo "GH_PAT=${{ secrets.SKYVERN_CLOUD_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
echo "GIT_EMAIL=198982749+copilot-swe-agent[bot]@users.noreply.github.com" >> $GITHUB_OUTPUT
|
||||
echo "GIT_USERNAME=copilot-swe-agent[bot]" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
*)
|
||||
echo "GH_PAT=${{ secrets.SKYVERN_CLOUD_GH_PAT }}" >> $GITHUB_OUTPUT
|
||||
echo "GIT_EMAIL=shu@skyvern.com" >> $GITHUB_OUTPUT
|
||||
echo "GIT_USERNAME=Shuchang Zheng" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
esac
|
||||
- name: Fetch PR details
|
||||
id: pr_details
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
|
||||
PR_NUMBER=${{ inputs.pr_number }}
|
||||
else
|
||||
PR_NUMBER=${{ github.event.pull_request.number }}
|
||||
fi
|
||||
PR_INFO=$(gh pr view $PR_NUMBER --json number,headRefName,body,title,url,author)
|
||||
BRANCH_NAME=$(echo "$PR_INFO" | jq -r .headRefName)
|
||||
PR_BODY=$(echo "$PR_INFO" | jq -r .body)
|
||||
PR_TITLE=$(echo "$PR_INFO" | jq -r .title)
|
||||
PR_URL=$(echo "$PR_INFO" | jq -r .url)
|
||||
PR_AUTHOR=$(echo "$PR_INFO" | jq -r .author.login)
|
||||
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_OUTPUT
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_OUTPUT
|
||||
PR_BODY_ESCAPED=$(echo "$PR_BODY" | jq -aRs .)
|
||||
echo "PR_BODY=$PR_BODY_ESCAPED" >> $GITHUB_OUTPUT
|
||||
echo "PR_TITLE=$PR_TITLE" >> $GITHUB_OUTPUT
|
||||
echo "PR_URL=$PR_URL" >> $GITHUB_OUTPUT
|
||||
echo "PR_AUTHOR=$PR_AUTHOR" >> $GITHUB_OUTPUT
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Check for migration changes
|
||||
id: check-migrations
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
|
||||
PR_NUMBER=${{ inputs.pr_number }}
|
||||
else
|
||||
PR_NUMBER=${{ github.event.pull_request.number }}
|
||||
fi
|
||||
CHANGED_FILES=$(gh pr diff $PR_NUMBER --name-only || true)
|
||||
HAS_MIGRATIONS=false
|
||||
for file in $CHANGED_FILES; do
|
||||
if [[ "$file" == alembic/versions/* ]]; then
|
||||
HAS_MIGRATIONS=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
echo "has_migrations=$HAS_MIGRATIONS" >> $GITHUB_OUTPUT
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Run GitHub File Sync
|
||||
id: file-sync
|
||||
uses: Skyvern-AI/repo-file-sync-action@590c4ddbe1d7b5c4ca1e4b4edc85c7f919b6c26a # main
|
||||
with:
|
||||
GH_PAT: ${{ steps.git-creds.outputs.GH_PAT }}
|
||||
GIT_EMAIL: ${{ steps.git-creds.outputs.GIT_EMAIL }}
|
||||
GIT_USERNAME: ${{ steps.git-creds.outputs.GIT_USERNAME }}
|
||||
PR_LABELS: |
|
||||
sync
|
||||
${{ steps.pr_details.outputs.PR_AUTHOR }}
|
||||
BRANCH_NAME: repo-sync/${{ steps.pr_details.outputs.BRANCH_NAME }}
|
||||
PR_BODY: "PR: ${{ steps.pr_details.outputs.PR_URL }}\nAuthor: @${{ steps.pr_details.outputs.PR_AUTHOR }}\n\n${{ steps.pr_details.outputs.PR_BODY }}"
|
||||
PR_TITLE: ${{ steps.pr_details.outputs.PR_TITLE }}
|
||||
# Flag migration changes that need manual attention in the cloud repo
|
||||
- name: Comment migration warning on cloud sync PR
|
||||
if: >
|
||||
steps.check-migrations.outputs.has_migrations == 'true' && steps.file-sync.outputs.pull_request_urls
|
||||
|
||||
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6
|
||||
env:
|
||||
PR_URLS_RAW: ${{ steps.file-sync.outputs.pull_request_urls }}
|
||||
SOURCE_PR_URL: ${{ steps.pr_details.outputs.PR_URL }}
|
||||
with:
|
||||
github-token: ${{ steps.git-creds.outputs.GH_PAT }}
|
||||
script: |
|
||||
const urlsRaw = process.env.PR_URLS_RAW;
|
||||
const sourcePrUrl = process.env.SOURCE_PR_URL;
|
||||
let urls;
|
||||
try {
|
||||
urls = JSON.parse(urlsRaw);
|
||||
} catch {
|
||||
urls = [urlsRaw].filter(Boolean);
|
||||
}
|
||||
|
||||
for (const url of urls) {
|
||||
const match = url.match(/github\.com\/([^/]+)\/([^/]+)\/pull\/(\d+)/);
|
||||
if (match) {
|
||||
const [, owner, repo, prNumber] = match;
|
||||
await github.rest.issues.createComment({
|
||||
owner,
|
||||
repo,
|
||||
issue_number: parseInt(prNumber),
|
||||
body: [
|
||||
'⚠️ **Migration Alert**',
|
||||
'',
|
||||
'The source OSS PR included database migration changes in `alembic/versions/` that are **NOT automatically synced**.',
|
||||
'',
|
||||
'Please check if corresponding migrations need to be created in the cloud repo.',
|
||||
'',
|
||||
`Source PR: ${sourcePrUrl}`
|
||||
].join('\n')
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
name: Build Skyvern TS SDK and publish to npm
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'skyvern-ts/client/package.json'
|
||||
jobs:
|
||||
check-version-change:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version_changed: ${{ steps.check.outputs.version_changed }}
|
||||
current_version: ${{ steps.check.outputs.current_version }}
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
persist-credentials: false
|
||||
- name: Check if version changed
|
||||
id: check
|
||||
run: |
|
||||
# Get version from current package.json
|
||||
CURRENT_VERSION=$(node -p "require('./skyvern-ts/client/package.json').version")
|
||||
|
||||
# Get version from previous commit
|
||||
git checkout HEAD^1
|
||||
PREVIOUS_VERSION=$(node -p "require('./skyvern-ts/client/package.json').version")
|
||||
git checkout -
|
||||
|
||||
if [ "$CURRENT_VERSION" != "$PREVIOUS_VERSION" ]; then
|
||||
echo "Version changed from $PREVIOUS_VERSION to $CURRENT_VERSION"
|
||||
echo "version_changed=true" >> $GITHUB_OUTPUT
|
||||
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "Version remained at $CURRENT_VERSION"
|
||||
echo "version_changed=false" >> $GITHUB_OUTPUT
|
||||
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
build-and-publish-sdk:
|
||||
runs-on: ubuntu-latest
|
||||
needs: check-version-change
|
||||
if: needs.check-version-change.outputs.version_changed == 'true' || github.event_name == 'workflow_dispatch'
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./skyvern-ts/client
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
with:
|
||||
node-version: '20'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- name: Upgrade npm to a Trusted Publishing-capable version
|
||||
run: npm i -g npm@^11.5.1
|
||||
- name: Install Fern dependencies
|
||||
run: npm install -g patch-package
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Build CJS
|
||||
run: npx tsc --project ./tsconfig.cjs.json
|
||||
- name: Build ESM
|
||||
run: npx tsc --project ./tsconfig.esm.json
|
||||
- name: Rename ESM files
|
||||
run: node scripts/rename-to-esm-files.js dist/esm
|
||||
- name: Publish to npm with provenance via OIDC
|
||||
env:
|
||||
NPM_CONFIG_PROVENANCE: "true"
|
||||
run: npm publish --access public --provenance
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
name: Update OpenAPI Specification
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
jobs:
|
||||
update-openapi:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
token: ${{ secrets.SKYVERN_OSS_GITHUB_TOKEN }}
|
||||
- name: Update OpenAPI Spec
|
||||
uses: fern-api/sync-openapi@8e936a4bac8ad11d698d7114f3074fa3397398ea # v2
|
||||
with:
|
||||
token: ${{ secrets.SKYVERN_OSS_GITHUB_TOKEN }}
|
||||
branch: 'update-openapi-spec'
|
||||
update_from_source: true
|
||||
add_timestamp: true
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
name: zizmor
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
jobs:
|
||||
zizmor:
|
||||
name: Audit GitHub Actions
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
security-events: write
|
||||
contents: read
|
||||
actions: read
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Run zizmor
|
||||
uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
@ -0,0 +1,195 @@
|
|||
## Original ignores
|
||||
*.env
|
||||
.vscode
|
||||
.idea/*
|
||||
log.txt
|
||||
log-ingestion.txt
|
||||
logs
|
||||
log
|
||||
*.log
|
||||
current.json
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
develop-eggs/
|
||||
dist/
|
||||
plugins/
|
||||
plugins_config.yaml
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
pip-wheel-metadata/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
*.py,cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
db.sqlite3-journal
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
site/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# pyenv
|
||||
.python-version
|
||||
|
||||
# pipenv
|
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||
# install all needed dependencies.
|
||||
#Pipfile.lock
|
||||
|
||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
||||
__pypackages__/
|
||||
|
||||
# Celery stuff
|
||||
celerybeat-schedule
|
||||
celerybeat.pid
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.direnv/
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv*/
|
||||
ENV/
|
||||
env.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
llama-*
|
||||
vicuna-*
|
||||
|
||||
# mac
|
||||
.DS_Store
|
||||
|
||||
openai/
|
||||
|
||||
# news
|
||||
CURRENT_BULLETIN.md
|
||||
|
||||
*.sqlite
|
||||
.mypy_cache
|
||||
.pytest_cache
|
||||
.vscode
|
||||
ig_*
|
||||
|
||||
# IntelliJ
|
||||
.idea/
|
||||
|
||||
# Skyvern ignores
|
||||
browser_sessions/
|
||||
videos/
|
||||
skyvern/artifacts/
|
||||
artifacts/
|
||||
traces/
|
||||
*.pkl
|
||||
har/
|
||||
postgres-data
|
||||
files/
|
||||
temp/
|
||||
|
||||
# Generated local deployment credentials
|
||||
.skyvern/
|
||||
**/secrets*.toml
|
||||
|
||||
## Frontend
|
||||
node_modules
|
||||
.env.backup
|
||||
.env.old
|
||||
|
||||
# ctags
|
||||
tags
|
||||
tags.lock
|
||||
tags.temp
|
||||
tags.temp.tmp
|
||||
|
||||
# copy of Chrome user profile from Chrome >= 136
|
||||
tmp/user_data_dir
|
||||
|
||||
# Claude
|
||||
.claude/*
|
||||
!.claude/skills/
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
[submodule "integrations/n8n"]
|
||||
path = integrations/n8n
|
||||
url = https://github.com/Skyvern-AI/skyvern-n8n
|
||||
|
|
@ -0,0 +1,134 @@
|
|||
default_language_version:
|
||||
python: python3
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
- id: check-added-large-files
|
||||
args: ['--maxkb=15000']
|
||||
exclude: 'inputs.*|skyvern_demo_video\.mp4|demo_visualizer.mp4'
|
||||
- id: check-byte-order-marker
|
||||
- id: check-case-conflict
|
||||
- id: check-merge-conflict
|
||||
- id: check-symlinks
|
||||
- id: debug-statements
|
||||
- id: detect-private-key
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: check-python-version
|
||||
name: Check Python Version (3.11-3.13)
|
||||
entry: uv run python -c "import sys; assert (3,11) <= sys.version_info[:2] <= (3,13), f'Python {sys.version_info[:2]} not supported. Use Python 3.11-3.13'"
|
||||
language: system
|
||||
pass_filenames: false
|
||||
always_run: true
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
# Ruff version.
|
||||
rev: v0.14.1
|
||||
hooks:
|
||||
# Run the linter.
|
||||
- id: ruff
|
||||
args: [--fix]
|
||||
exclude: |
|
||||
(?x)(
|
||||
^skyvern/client/.*
|
||||
)
|
||||
# Run the formatter.
|
||||
- id: ruff-format
|
||||
- repo: https://github.com/pycqa/isort
|
||||
rev: 7.0.0
|
||||
hooks:
|
||||
- id: isort
|
||||
language_version: python3
|
||||
exclude: |
|
||||
(?x)(
|
||||
^skyvern/client/.*|
|
||||
^skyvern/__init__.py
|
||||
)
|
||||
- repo: https://github.com/pre-commit/pygrep-hooks
|
||||
rev: v1.10.0
|
||||
hooks:
|
||||
- id: python-check-blanket-noqa
|
||||
- id: python-check-mock-methods
|
||||
- id: python-no-log-warn
|
||||
- id: python-use-type-annotations
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v3.21.0
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
exclude: |
|
||||
(?x)(
|
||||
^skyvern/client/.*
|
||||
)
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: v1.18.2
|
||||
hooks:
|
||||
- id: mypy
|
||||
args: [--show-error-codes, --warn-unused-configs, --disallow-untyped-calls, --disallow-untyped-defs, --disallow-incomplete-defs, --check-untyped-defs]
|
||||
additional_dependencies:
|
||||
- requests
|
||||
- types-requests
|
||||
- types-cachetools
|
||||
- alembic
|
||||
- 'sqlalchemy[mypy]'
|
||||
- types-PyYAML
|
||||
- types-toml
|
||||
- types-redis
|
||||
- types-aiofiles
|
||||
exclude: |
|
||||
(?x)(
|
||||
^tests.*|
|
||||
^streamlit_app.*|
|
||||
^alembic.*|
|
||||
^skyvern/client/.*
|
||||
)
|
||||
- repo: https://github.com/PyCQA/autoflake
|
||||
rev: v2.3.1
|
||||
hooks:
|
||||
- id: autoflake
|
||||
name: autoflake
|
||||
entry: autoflake --in-place --remove-all-unused-imports --recursive --ignore-init-module-imports
|
||||
language: python
|
||||
types: [python]
|
||||
exclude: |
|
||||
(?x)(
|
||||
^skyvern/client/.*
|
||||
)
|
||||
# Mono repo has bronken this TODO: fix
|
||||
# - id: pytest-check
|
||||
# name: pytest-check
|
||||
# entry: pytest
|
||||
# language: system
|
||||
# pass_filenames: false
|
||||
# always_run: true
|
||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||
rev: 'v4.0.0-alpha.8' # Use the sha or tag you want to point at
|
||||
hooks:
|
||||
- id: prettier
|
||||
types: [javascript]
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: frontend-precommit
|
||||
name: Frontend Precommit (lint-staged)
|
||||
entry: bash -c 'cd skyvern-frontend && npm run precommit'
|
||||
language: system
|
||||
files: ^skyvern-frontend/src/
|
||||
pass_filenames: false
|
||||
- id: vitest-type-check
|
||||
name: vitest
|
||||
entry: bash -c 'cd skyvern-frontend && ([ -d node_modules ] || npm ci) && npm run test'
|
||||
language: system
|
||||
pass_filenames: false
|
||||
files: ^skyvern-frontend/
|
||||
- id: alembic-check
|
||||
name: Alembic Check
|
||||
entry: ./run_alembic_check.sh
|
||||
language: script
|
||||
stages: [manual]
|
||||
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||
rev: v0.10.0.1
|
||||
hooks:
|
||||
- id: shellcheck
|
||||
- repo: https://github.com/google/yamlfmt
|
||||
rev: v0.17.2
|
||||
hooks:
|
||||
- id: yamlfmt
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"setup": [
|
||||
"cp \"$SUPERSET_ROOT_PATH/skyvern-frontend/.env\" ./skyvern-frontend/.env",
|
||||
"cp \"$SUPERSET_ROOT_PATH/.env\" ./.env",
|
||||
"uv sync --group cloud --reinstall",
|
||||
"pre-commit install"
|
||||
],
|
||||
"teardown": []
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# yamlfmt configuration
|
||||
# Force Unix LF line endings for all YAML files
|
||||
line_ending: lf
|
||||
|
||||
# Additional formatting options
|
||||
formatter:
|
||||
type: basic
|
||||
indent: 2
|
||||
include_document_start: false
|
||||
pad_line_comments: 1
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
# Skyvern Agent Guide
|
||||
This AGENTS.md file provides comprehensive guidance for AI agents working with the Skyvern codebase. Follow these guidelines to ensure consistency and quality in all contributions.
|
||||
|
||||
## Project Structure for Agent Navigation
|
||||
|
||||
- `/skyvern`: Main Python package
|
||||
- `/cli`: Command-line interface components
|
||||
- `/client`: Client implementations and integrations
|
||||
- `/forge`: Core automation logic and workflows
|
||||
- `/library`: Shared utilities and helpers
|
||||
- `/schemas`: Data models and validation schemas
|
||||
- `/services`: Business logic and service layers
|
||||
- `/utils`: Common utility functions
|
||||
- `/webeye`: Web interaction and browser automation
|
||||
- `/skyvern-frontend`: Frontend application
|
||||
- `/integrations`: Third-party service integrations
|
||||
- `/alembic`: Database migrations
|
||||
- `/scripts`: Utility and deployment scripts
|
||||
|
||||
## Coding Conventions for Agents
|
||||
|
||||
### Python Standards
|
||||
|
||||
- Use Python 3.11+ features and type hints
|
||||
- Follow PEP 8 with a line length of 100 characters
|
||||
- Use absolute imports for all modules
|
||||
- Document all public functions and classes with Google-style docstrings
|
||||
- Use `snake_case` for variables and functions, `PascalCase` for classes
|
||||
|
||||
### Asynchronous Programming
|
||||
|
||||
- Prefer async/await over callbacks
|
||||
- Use `asyncio` for concurrency
|
||||
- Always handle exceptions in async code
|
||||
- Use context managers for resource cleanup
|
||||
|
||||
### Error Handling
|
||||
|
||||
- Use specific exception classes
|
||||
- Include meaningful error messages
|
||||
- Log errors with appropriate severity levels
|
||||
- Never expose sensitive information in error messages
|
||||
|
||||
## Pull Request Process
|
||||
|
||||
1. **Branch Naming**
|
||||
- `feature/descriptive-name` for new features
|
||||
- `fix/issue-description` for bug fixes
|
||||
- `chore/task-description` for maintenance tasks
|
||||
|
||||
2. **PR Guidelines**
|
||||
- Reference related issues with `Fixes #123` or `Closes #123`
|
||||
- Include a clear description of changes
|
||||
- Update relevant documentation
|
||||
- Ensure all tests pass
|
||||
- Get at least one approval before merging
|
||||
|
||||
3. **Commit Message Format**
|
||||
```
|
||||
[Component] Action: Brief description
|
||||
|
||||
More detailed explanation if needed.
|
||||
|
||||
- Bullet points for additional context
|
||||
- Reference issues with #123
|
||||
```
|
||||
|
||||
## Code Quality Checks
|
||||
|
||||
Before submitting code, run:
|
||||
```bash
|
||||
pre-commit run --all-files
|
||||
```
|
||||
|
||||
## Performance Considerations
|
||||
- Optimize database queries
|
||||
- Use appropriate data structures
|
||||
- Implement caching where beneficial
|
||||
- Monitor memory usage
|
||||
|
||||
## Security Best Practices
|
||||
- Never commit secrets or credentials
|
||||
- Validate all inputs
|
||||
- Use environment variables for configuration
|
||||
- Follow the principle of least privilege
|
||||
- Keep dependencies updated
|
||||
|
||||
## Getting Help
|
||||
- Check existing issues before opening new ones
|
||||
- Reference relevant documentation
|
||||
- Provide reproduction steps for bugs
|
||||
- Be specific about the problem and expected behavior
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## Development Commands
|
||||
|
||||
### Python Backend Commands
|
||||
- **Install dependencies**: `uv sync`
|
||||
- **Run Skyvern service**: `skyvern run all` (starts both backend and UI)
|
||||
- **Run backend only**: `skyvern run server`
|
||||
- **Run UI only**: `skyvern run ui`
|
||||
- **Check status**: `skyvern status`
|
||||
- **Stop services**: `skyvern stop all`
|
||||
- **Quickstart**: `skyvern quickstart` (for first-time setup with DB migrations)
|
||||
|
||||
### Code Quality & Testing
|
||||
- **Lint**: `ruff check` and `ruff format`
|
||||
- **Type checking**: `mypy skyvern`
|
||||
- **Run tests**: `pytest tests/`
|
||||
- **Pre-commit hooks**: `pre-commit run --all-files`
|
||||
|
||||
### Frontend Commands (in skyvern-frontend/)
|
||||
- **Install dependencies**: `npm install`
|
||||
- **Development**: `npm run dev`
|
||||
- **Build**: `npm run build`
|
||||
- **Lint**: `npm run lint`
|
||||
- **Format**: `npm run format`
|
||||
|
||||
### Database Management
|
||||
- **Run migrations**: `alembic upgrade head`
|
||||
- **Create migration**: `alembic revision --autogenerate -m "description"`
|
||||
|
||||
## Architecture Overview
|
||||
|
||||
Skyvern is a browser automation platform that uses LLMs and computer vision to interact with websites. The architecture consists of:
|
||||
|
||||
### Core Components
|
||||
- **Agent System** (`skyvern/forge/agent.py`): LLM-powered agent loop for web navigation and task execution
|
||||
- **Public Library** (`skyvern/library/`): User-facing `from skyvern import Skyvern` interface and SDK-style page/browser/locator wrappers
|
||||
- **Browser Engine** (`skyvern/webeye/`): Playwright-based browser automation with computer vision
|
||||
- **Workflow Engine** (`skyvern/services/`): Orchestrates complex multi-step workflows
|
||||
- **API Layer** (`skyvern/forge/`): FastAPI-based REST API and WebSocket support
|
||||
|
||||
### Key Directories
|
||||
- `skyvern/forge/agent.py` + `skyvern/forge/agent_functions.py`: LLM-powered agent loop for web interaction
|
||||
- `skyvern/library/`: Public `Skyvern` class and library-facing SDK wrappers
|
||||
- `skyvern/webeye/`: Browser automation, DOM scraping, action execution
|
||||
- `skyvern/forge/`: FastAPI server, API endpoints, request handling
|
||||
- `skyvern/forge/sdk/`: Internal SDK — DB, routes, schemas, workflow, copilot, executor, cache
|
||||
- `skyvern/services/`: Business logic for tasks, workflows, and browser sessions
|
||||
- `skyvern/cli/`: Command-line interface
|
||||
- `skyvern/client/`: Generated Python client SDK
|
||||
- `skyvern-frontend/`: React-based UI for task management and monitoring
|
||||
- `alembic/`: Database migrations
|
||||
|
||||
### Workflow System
|
||||
- **Blocks**: Modular components (navigation, extraction, validation, loops, etc.)
|
||||
- **Parameters**: Dynamic values passed between blocks
|
||||
- **Runs**: Execution instances of workflows
|
||||
- **Browser Sessions**: Persistent browser state across workflow steps
|
||||
|
||||
### Data Flow
|
||||
1. User creates tasks/workflows via UI or API
|
||||
2. Agent system plans actions using LLM analysis of screenshots
|
||||
3. Browser engine executes actions via Playwright
|
||||
4. Results are captured, processed, and stored
|
||||
5. Workflow orchestrator manages multi-step sequences
|
||||
|
||||
## Development Notes
|
||||
|
||||
### Environment Setup
|
||||
- Requires Python 3.11+ and Node.js
|
||||
- Uses UV for Python dependency management
|
||||
- PostgreSQL database (managed via Docker or local install)
|
||||
- Browser dependencies installed via Playwright
|
||||
|
||||
### LLM Configuration
|
||||
Configure via environment variables or `skyvern init llm`:
|
||||
- Supports OpenAI, Anthropic, Azure OpenAI, AWS Bedrock, Gemini, Ollama
|
||||
- Uses `LLM_KEY` to specify which model to use
|
||||
- `SECONDARY_LLM_KEY` for lightweight agent operations
|
||||
|
||||
### Testing Strategy
|
||||
- Unit tests in `tests/unit_tests/`
|
||||
- Integration tests require browser automation setup
|
||||
- Use `pytest` with async support for testing
|
||||
|
||||
### Code Style
|
||||
- Python: Ruff for linting and formatting (configured in pyproject.toml)
|
||||
- TypeScript: ESLint + Prettier (configured in skyvern-frontend/)
|
||||
- Line length: 120 characters
|
||||
- Use type hints and async/await patterns
|
||||
|
|
@ -0,0 +1,134 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
|
||||
- [Code of Conduct - Skyvern](#code-of-conduct---skyvern)
|
||||
- [Our Pledge](#our-pledge)
|
||||
- [Our Standards](#our-standards)
|
||||
- [Our Responsibilities](#our-responsibilities)
|
||||
- [Scope](#scope)
|
||||
- [Enforcement](#enforcement)
|
||||
- [Enforcement Guidelines](#enforcement-guidelines)
|
||||
- [1. Correction](#1-correction)
|
||||
- [2. Warning](#2-warning)
|
||||
- [3. Temporary Ban](#3-temporary-ban)
|
||||
- [4. Permanent Ban](#4-permanent-ban)
|
||||
- [Attribution](#attribution)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
# Code of Conduct - Skyvern
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to make participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||
level of experience, education, socio-economic status, nationality, personal
|
||||
appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or
|
||||
advances
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will
|
||||
communicate reasons for moderation decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at <enforcement@skyvern.com>.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series
|
||||
of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org/), version
|
||||
[1.4](https://www.contributor-covenant.org/version/1/4/code-of-conduct/code_of_conduct.md) and
|
||||
[2.0](https://www.contributor-covenant.org/version/2/0/code_of_conduct/code_of_conduct.md),
|
||||
and was generated by [contributing-gen](https://github.com/bttger/contributing-gen).
|
||||
|
|
@ -0,0 +1,200 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
|
||||
- [Contributing to Skyvern](#contributing-to-skyvern)
|
||||
- [Table of Contents](#table-of-contents)
|
||||
- [Code of Conduct](#code-of-conduct)
|
||||
- [I Have a Question](#i-have-a-question)
|
||||
- [I Want To Contribute](#i-want-to-contribute)
|
||||
- [Reporting Bugs](#reporting-bugs)
|
||||
- [Before Submitting a Bug Report](#before-submitting-a-bug-report)
|
||||
- [How Do I Submit a Good Bug Report?](#how-do-i-submit-a-good-bug-report)
|
||||
- [Suggesting Enhancements](#suggesting-enhancements)
|
||||
- [Before Submitting an Enhancement](#before-submitting-an-enhancement)
|
||||
- [How Do I Submit a Good Enhancement Suggestion?](#how-do-i-submit-a-good-enhancement-suggestion)
|
||||
- [Your First Code Contribution](#your-first-code-contribution)
|
||||
- [Improving The Documentation](#improving-the-documentation)
|
||||
- [Styleguides](#styleguides)
|
||||
- [Pre Commit Hooks](#pre-commit-hooks)
|
||||
- [Commit Messages](#commit-messages)
|
||||
- [Join The Project Team](#join-the-project-team)
|
||||
- [Attribution](#attribution)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
<!-- omit in toc -->
|
||||
# Contributing to Skyvern
|
||||
|
||||
First off, thanks for taking the time to contribute! ❤️
|
||||
|
||||
All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉
|
||||
|
||||
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
|
||||
> - Star the project
|
||||
> - Tweet about it
|
||||
> - Refer this project in your project's readme
|
||||
> - Mention the project at local meetups and tell your friends/colleagues
|
||||
|
||||
<!-- omit in toc -->
|
||||
## Table of Contents
|
||||
|
||||
- [Code of Conduct](#code-of-conduct)
|
||||
- [I Have a Question](#i-have-a-question)
|
||||
- [I Want To Contribute](#i-want-to-contribute)
|
||||
- [Reporting Bugs](#reporting-bugs)
|
||||
- [Suggesting Enhancements](#suggesting-enhancements)
|
||||
- [Your First Code Contribution](#your-first-code-contribution)
|
||||
- [Improving The Documentation](#improving-the-documentation)
|
||||
- [Styleguides](#styleguides)
|
||||
- [Commit Messages](#commit-messages)
|
||||
- [Join The Project Team](#join-the-project-team)
|
||||
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
This project and everyone participating in it is governed by the
|
||||
[Skyvern Code of Conduct](https://github.com/Skyvern-AI/skyvern-agentblob/master/CODE_OF_CONDUCT.md).
|
||||
By participating, you are expected to uphold this code. Please report unacceptable behavior
|
||||
to <enforcement@skyvern.com>.
|
||||
|
||||
|
||||
## I Have a Question
|
||||
|
||||
> If you want to ask a question, we assume that you have read the available [Documentation](www.skyvern.com/docs).
|
||||
|
||||
Before you ask a question, it is best to search for existing [Issues](https://github.com/Skyvern-AI/skyvern-agent/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.
|
||||
|
||||
If you then still feel the need to ask a question and need clarification, we recommend the following:
|
||||
|
||||
- Open an [Issue](https://github.com/Skyvern-AI/skyvern-agent/issues/new).
|
||||
- Provide as much context as you can about what you're running into.
|
||||
- Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant.
|
||||
|
||||
We will then take care of the issue as soon as possible.
|
||||
|
||||
<!--
|
||||
You might want to create a separate issue tag for questions and include it in this description. People should then tag their issues accordingly.
|
||||
|
||||
Depending on how large the project is, you may want to outsource the questioning, e.g. to Stack Overflow or Gitter. You may add additional contact and information possibilities:
|
||||
- IRC
|
||||
- Slack
|
||||
- Gitter
|
||||
- Stack Overflow tag
|
||||
- Blog
|
||||
- FAQ
|
||||
- Roadmap
|
||||
- E-Mail List
|
||||
- Forum
|
||||
-->
|
||||
|
||||
## I Want To Contribute
|
||||
|
||||
> ### Legal Notice <!-- omit in toc -->
|
||||
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
|
||||
|
||||
### Reporting Bugs
|
||||
|
||||
<!-- omit in toc -->
|
||||
#### Before Submitting a Bug Report
|
||||
|
||||
A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
|
||||
|
||||
- Make sure that you are using the latest version.
|
||||
- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](www.skyvern.com/docs). If you are looking for support, you might want to check [this section](#i-have-a-question)).
|
||||
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/Skyvern-AI/skyvern-agentissues?q=label%3Abug).
|
||||
- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
|
||||
- Collect information about the bug:
|
||||
- Stack trace (Traceback)
|
||||
- OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
|
||||
- Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant.
|
||||
- Possibly your input and the output
|
||||
- Can you reliably reproduce the issue? And can you also reproduce it with older versions?
|
||||
|
||||
<!-- omit in toc -->
|
||||
#### How Do I Submit a Good Bug Report?
|
||||
|
||||
> You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to <security@skyvern.com>.
|
||||
<!-- You may add a PGP key to allow the messages to be sent encrypted as well. -->
|
||||
|
||||
We use GitHub issues to track bugs and errors. If you run into an issue with the project:
|
||||
|
||||
- Open an [Issue](https://github.com/Skyvern-AI/skyvern-agent/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
|
||||
- Explain the behavior you would expect and the actual behavior.
|
||||
- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
|
||||
- Provide the information you collected in the previous section.
|
||||
|
||||
Once it's filed:
|
||||
|
||||
- The project team will label the issue accordingly.
|
||||
- A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
|
||||
- If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#your-first-code-contribution).
|
||||
|
||||
<!-- You might want to create an issue template for bugs and errors that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. -->
|
||||
|
||||
|
||||
### Suggesting Enhancements
|
||||
|
||||
This section guides you through submitting an enhancement suggestion for Skyvern, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
|
||||
|
||||
<!-- omit in toc -->
|
||||
#### Before Submitting an Enhancement
|
||||
|
||||
- Make sure that you are using the latest version.
|
||||
- Read the [documentation](www.skyvern.com/docs) carefully and find out if the functionality is already covered, maybe by an individual configuration.
|
||||
- Perform a [search](https://github.com/Skyvern-AI/skyvern-agent/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
|
||||
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
|
||||
|
||||
<!-- omit in toc -->
|
||||
#### How Do I Submit a Good Enhancement Suggestion?
|
||||
|
||||
Enhancement suggestions are tracked as [GitHub issues](https://github.com/Skyvern-AI/skyvern-agent/issues).
|
||||
|
||||
- Use a **clear and descriptive title** for the issue to identify the suggestion.
|
||||
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
|
||||
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
|
||||
- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux. <!-- this should only be included if the project has a GUI -->
|
||||
- **Explain why this enhancement would be useful** to most Skyvern users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
|
||||
|
||||
<!-- You might want to create an issue template for enhancement suggestions that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. -->
|
||||
|
||||
### Your First Code Contribution
|
||||
<!-- TODO
|
||||
include Setup of env, IDE and typical getting started instructions?
|
||||
|
||||
-->
|
||||
|
||||
### Improving The Documentation
|
||||
<!-- TODO
|
||||
Updating, improving and correcting the documentation
|
||||
|
||||
-->
|
||||
|
||||
## Styleguides
|
||||
|
||||
### Pre Commit Hooks
|
||||
Make sure to install and run the pre-commit hooks before committing your code.
|
||||
This will help you to automatically format your code and catch CI/CD failures early.
|
||||
```bash
|
||||
# Make sure `pre-commit` is installed
|
||||
pip install pre-commit
|
||||
|
||||
# Install the git hook scripts (one-time setup)
|
||||
pre-commit install
|
||||
|
||||
# (Optional) Run pre-commit hooks manually on all files
|
||||
pre-commit run --all-files
|
||||
```
|
||||
|
||||
Once installed, the hooks will run automatically on `git commit`.
|
||||
|
||||
### Commit Messages
|
||||
<!-- TODO
|
||||
|
||||
-->
|
||||
|
||||
## Join The Project Team
|
||||
<!-- TODO -->
|
||||
|
||||
<!-- omit in toc -->
|
||||
## Attribution
|
||||
This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)!
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
FROM python:3.11 AS requirements-stage
|
||||
# Run `skyvern init llm` before building to generate the .env file
|
||||
|
||||
WORKDIR /tmp
|
||||
RUN curl -LsSf https://astral.sh/uv/install.sh | sh \
|
||||
&& ln -s /root/.local/bin/uv /usr/local/bin/uv
|
||||
COPY ./pyproject.toml /tmp/pyproject.toml
|
||||
COPY ./uv.lock /tmp/uv.lock
|
||||
RUN uv pip compile pyproject.toml --extra server --python-version 3.11 -o requirements.txt --no-annotate --no-header
|
||||
|
||||
FROM python:3.11-slim-bookworm
|
||||
WORKDIR /app
|
||||
COPY --from=requirements-stage /tmp/requirements.txt /app/requirements.txt
|
||||
RUN pip install --upgrade pip setuptools wheel
|
||||
# --no-deps: requirements.txt is fully resolved by uv, including the
|
||||
# pyproject overrides that loosen litellm's jsonschema==4.23.0 pin.
|
||||
# Letting pip re-resolve here would re-introduce that conflict.
|
||||
RUN pip install --no-cache-dir --no-deps -r requirements.txt
|
||||
RUN playwright install-deps
|
||||
RUN playwright install
|
||||
RUN apt-get install -y xauth x11-apps netpbm gpg ca-certificates x11vnc && apt-get clean
|
||||
RUN pip install --no-cache-dir websockify
|
||||
|
||||
COPY .nvmrc /app/.nvmrc
|
||||
COPY nodesource-repo.gpg.key /tmp/nodesource-repo.gpg.key
|
||||
RUN cat /tmp/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
|
||||
NODE_MAJOR=$(cut -d. -f1 < /app/.nvmrc) && \
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" >> /etc/apt/sources.list.d/nodesource.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y nodejs && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm /tmp/nodesource-repo.gpg.key && \
|
||||
# confirm installation
|
||||
npm -v && node -v
|
||||
|
||||
|
||||
# install bitwarden cli
|
||||
RUN npm install -g @bitwarden/cli@2025.9.0
|
||||
# checking bw version also initializes the bw config
|
||||
RUN bw --version
|
||||
|
||||
COPY . /app
|
||||
|
||||
ENV PYTHONPATH="/app"
|
||||
ENV VIDEO_PATH=/data/videos
|
||||
ENV HAR_PATH=/data/har
|
||||
ENV LOG_PATH=/data/log
|
||||
ENV ARTIFACT_STORAGE_PATH=/data/artifacts
|
||||
|
||||
# cache tiktoken
|
||||
RUN python /app/scripts/load_tiktoken.py
|
||||
|
||||
COPY ./entrypoint-skyvern.sh /app/entrypoint-skyvern.sh
|
||||
RUN chmod +x /app/entrypoint-skyvern.sh
|
||||
|
||||
CMD [ "/bin/bash", "/app/entrypoint-skyvern.sh" ]
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
FROM node:20.12-slim
|
||||
|
||||
# Install tini for proper signal handling and zombie reaping
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends tini && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
COPY ./skyvern-frontend /app
|
||||
COPY ./entrypoint-skyvernui.sh /app/entrypoint-skyvernui.sh
|
||||
RUN npm install
|
||||
|
||||
# Placeholders for runtime injection (will be replaced by entrypoint script)
|
||||
ENV VITE_API_BASE_URL=__VITE_API_BASE_URL_PLACEHOLDER__
|
||||
ENV VITE_WSS_BASE_URL=__VITE_WSS_BASE_URL_PLACEHOLDER__
|
||||
ENV VITE_ARTIFACT_API_BASE_URL=__VITE_ARTIFACT_API_BASE_URL_PLACEHOLDER__
|
||||
ENV VITE_SKYVERN_API_KEY=__SKYVERN_API_KEY_PLACEHOLDER__
|
||||
ENV VITE_BROWSER_STREAMING_MODE=__VITE_BROWSER_STREAMING_MODE_PLACEHOLDER__
|
||||
|
||||
# APP_VERSION is baked into the JS bundle at build time via Vite's define.
|
||||
# Pass --build-arg APP_VERSION=$(git rev-parse HEAD) when building the image.
|
||||
ARG APP_VERSION=development
|
||||
ENV APP_VERSION=$APP_VERSION
|
||||
|
||||
# Build at image time
|
||||
RUN npm run build
|
||||
|
||||
# Use tini as init for proper signal handling and zombie reaping
|
||||
ENTRYPOINT ["/usr/bin/tini", "--"]
|
||||
CMD ["/bin/bash", "/app/entrypoint-skyvernui.sh"]
|
||||
|
|
@ -0,0 +1,661 @@
|
|||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
|
@ -0,0 +1,583 @@
|
|||
<!-- DOCTOC SKIP -->
|
||||
|
||||
<h1 align="center">
|
||||
<a href="https://www.skyvern.com">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="fern/images/skyvern_logo.png"/>
|
||||
<img height="120" src="fern/images/skyvern_logo_blackbg.png"/>
|
||||
</picture>
|
||||
</a>
|
||||
<br />
|
||||
</h1>
|
||||
<p align="center">
|
||||
🐉 Automate Browser-based workflows using LLMs and Computer Vision 🐉
|
||||
</p>
|
||||
<p align="center">
|
||||
<a href="https://www.skyvern.com/"><img src="https://img.shields.io/badge/Website-blue?logo=googlechrome&logoColor=black"/></a>
|
||||
<a href="https://www.skyvern.com/docs/"><img src="https://img.shields.io/badge/Docs-yellow?logo=gitbook&logoColor=black"/></a>
|
||||
<a href="https://discord.gg/fG2XXEuQX3"><img src="https://img.shields.io/discord/1212486326352617534?logo=discord&label=discord"/></a>
|
||||
<!-- <a href="https://pepy.tech/project/skyvern" target="_blank"><img src="https://static.pepy.tech/badge/skyvern" alt="Total Downloads"/></a> -->
|
||||
<a href="https://github.com/skyvern-ai/skyvern"><img src="https://img.shields.io/github/stars/skyvern-ai/skyvern" /></a>
|
||||
<a href="https://github.com/Skyvern-AI/skyvern/blob/main/LICENSE"><img src="https://img.shields.io/github/license/skyvern-ai/skyvern"/></a>
|
||||
<a href="https://twitter.com/skyvernai"><img src="https://img.shields.io/twitter/follow/skyvernai?style=social"/></a>
|
||||
<a href="https://www.linkedin.com/company/95726232"><img src="https://img.shields.io/badge/Follow%20 on%20LinkedIn-8A2BE2?logo=linkedin"/></a>
|
||||
</p>
|
||||
|
||||
[Skyvern](https://www.skyvern.com) automates browser-based workflows using LLMs and computer vision. It provides a Playwright-compatible SDK that adds AI functionality on top of playwright, as well as a no-code workflow builder to help both technical and non-technical users automate manual workflows on any website, replacing brittle or unreliable automation solutions.
|
||||
|
||||
<p align="center">
|
||||
<img src="fern/images/geico_shu_recording_cropped.gif"/>
|
||||
</p>
|
||||
|
||||
Traditional approaches to browser automations required writing custom scripts for websites, often relying on DOM parsing and XPath-based interactions which would break whenever the website layouts changed.
|
||||
|
||||
Instead of only relying on code-defined XPath interactions, Skyvern relies on Vision LLMs to learn and interact with the websites.
|
||||
|
||||
# How it works
|
||||
Skyvern was inspired by the Task-Driven autonomous agent design popularized by [BabyAGI](https://github.com/yoheinakajima/babyagi) and [AutoGPT](https://github.com/Significant-Gravitas/AutoGPT) -- with one major bonus: we give Skyvern the ability to interact with websites using browser automation libraries like [Playwright](https://playwright.dev/).
|
||||
|
||||
Skyvern uses a swarm of agents to comprehend a website, and plan and execute its actions:
|
||||
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="fern/images/skyvern_2_0_system_diagram.png" />
|
||||
<img src="fern/images/skyvern_2_0_system_diagram.png" />
|
||||
</picture>
|
||||
|
||||
This approach has a few advantages:
|
||||
|
||||
1. Skyvern can operate on websites it's never seen before, as it's able to map visual elements to actions necessary to complete a workflow, without any customized code
|
||||
1. Skyvern is resistant to website layout changes, as there are no pre-determined XPaths or other selectors our system is looking for while trying to navigate
|
||||
1. Skyvern is able to take a single workflow and apply it to a large number of websites, as it's able to reason through the interactions necessary to complete the workflow
|
||||
A detailed technical report can be found [here](https://www.skyvern.com/blog/skyvern-2-0-state-of-the-art-web-navigation-with-85-8-on-webvoyager-eval/).
|
||||
|
||||
# Demo
|
||||
<!-- Redo demo -->
|
||||
https://github.com/user-attachments/assets/5cab4668-e8e2-4982-8551-aab05ff73a7f
|
||||
|
||||
# Quickstart
|
||||
|
||||
## Skyvern Cloud
|
||||
[Skyvern Cloud](https://app.skyvern.com) is a managed cloud version of Skyvern that allows you to run Skyvern without worrying about the infrastructure. It allows you to run multiple Skyvern instances in parallel and comes bundled with anti-bot detection mechanisms, proxy network, and CAPTCHA solvers.
|
||||
|
||||
If you'd like to try it out, navigate to [app.skyvern.com](https://app.skyvern.com) and create an account.
|
||||
|
||||
## Run Locally (UI + Server)
|
||||
|
||||
Choose your preferred setup method:
|
||||
|
||||
> **Database default**: As of skyvern 1.0.31+, `skyvern run server` defaults to a SQLite database at `~/.skyvern/data.db` so it works out of the box with no Postgres setup. To use Postgres instead, set `DATABASE_STRING` in `.env` or pass `--database-string` to `skyvern quickstart`. Docker Compose always uses the bundled Postgres service.
|
||||
|
||||
### Option A: pip install (Recommended)
|
||||
|
||||
Dependencies needed:
|
||||
- [Python 3.11.x](https://www.python.org/downloads/), works with 3.12, not ready yet for 3.13
|
||||
- [NodeJS & NPM](https://nodejs.org/en/download/)
|
||||
|
||||
Additionally, for Windows:
|
||||
- [Rust](https://rustup.rs/)
|
||||
- VS Code with C++ dev tools and Windows SDK
|
||||
|
||||
#### 1. Install Skyvern
|
||||
|
||||
```bash
|
||||
pip install skyvern
|
||||
```
|
||||
|
||||
#### 2. Run Skyvern
|
||||
|
||||
```bash
|
||||
skyvern quickstart
|
||||
```
|
||||
|
||||
### Option B: Docker Compose
|
||||
|
||||
Use this option if you want everything containerized (Postgres, API, UI) and don't want to install Python/Node locally.
|
||||
|
||||
1. Install [Docker Desktop](https://www.docker.com/products/docker-desktop/)
|
||||
2. Clone the repository:
|
||||
```bash
|
||||
git clone https://github.com/skyvern-ai/skyvern.git && cd skyvern
|
||||
```
|
||||
3. Configure your LLM provider in `.env` (the `quickstart --docker-compose` command below will create it from `.env.example` if missing):
|
||||
```bash
|
||||
cp .env.example .env # if not already created
|
||||
# edit .env to add your LLM API key
|
||||
```
|
||||
4. Start everything:
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
5. Open http://localhost:8080
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
**`(sqlite3.OperationalError) table organizations already exists`** — You hit a known bug in `pip install skyvern==1.0.31`. Fix:
|
||||
|
||||
```bash
|
||||
rm ~/.skyvern/data.db # remove the leftover SQLite file
|
||||
pip install --upgrade skyvern # 1.0.32+ contains the fix
|
||||
skyvern quickstart
|
||||
```
|
||||
|
||||
If you are still on 1.0.31 and cannot upgrade, install via uv instead:
|
||||
|
||||
```bash
|
||||
uv pip install skyvern
|
||||
```
|
||||
|
||||
**`pip install skyvern` fails with ResolutionImpossible (litellm / fastmcp)** — You hit a dependency-resolution conflict in 1.0.31. Either upgrade to 1.0.32+ or use uv: `uv pip install skyvern`.
|
||||
|
||||
## SDK
|
||||
|
||||
**Skyvern is a Playwright extension that adds AI-powered browser automation.** It gives you the full power of Playwright with additional AI capabilities—use natural language prompts to interact with elements, extract data, and automate complex multi-step workflows.
|
||||
|
||||
**Installation:**
|
||||
- Python: `pip install skyvern` then run `skyvern quickstart` for local setup
|
||||
- TypeScript: `npm install @skyvern/client`
|
||||
|
||||
### AI-Powered Page Commands
|
||||
|
||||
Skyvern adds four core AI commands directly on the page object:
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `page.act(prompt)` | Perform actions using natural language (e.g., "Click the login button") |
|
||||
| `page.extract(prompt, schema)` | Extract structured data from the page with optional JSON schema |
|
||||
| `page.validate(prompt)` | Validate page state, returns `bool` (e.g., "Check if user is logged in") |
|
||||
| `page.prompt(prompt, schema)` | Send arbitrary prompts to the LLM with optional response schema |
|
||||
|
||||
Additionally, `page.agent` provides higher-level workflow commands:
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `page.agent.run_task(prompt)` | Execute complex multi-step tasks |
|
||||
| `page.agent.login(credential_type, credential_id)` | Authenticate with stored credentials (Skyvern, Bitwarden, 1Password) |
|
||||
| `page.agent.download_files(prompt)` | Navigate and download files |
|
||||
| `page.agent.run_workflow(workflow_id)` | Execute pre-built workflows |
|
||||
|
||||
### AI-Augmented Playwright Actions
|
||||
|
||||
All standard Playwright actions support an optional `prompt` parameter for AI-powered element location:
|
||||
|
||||
| Action | Playwright | AI-Augmented |
|
||||
|--------|------------|--------------|
|
||||
| Click | `page.click("#btn")` | `page.click(prompt="Click login button")` |
|
||||
| Fill | `page.fill("#email", "a@b.com")` | `page.fill(prompt="Email field", value="a@b.com")` |
|
||||
| Select | `page.select_option("#country", "US")` | `page.select_option(prompt="Country dropdown", value="US")` |
|
||||
| Upload | `page.upload_file("#file", "doc.pdf")` | `page.upload_file(prompt="Upload area", files="doc.pdf")` |
|
||||
|
||||
**Three interaction modes:**
|
||||
```python
|
||||
# 1. Traditional Playwright - CSS/XPath selectors
|
||||
await page.click("#submit-button")
|
||||
|
||||
# 2. AI-powered - natural language
|
||||
await page.click(prompt="Click the green Submit button")
|
||||
|
||||
# 3. AI fallback - tries selector first, falls back to AI if it fails
|
||||
await page.click("#submit-btn", prompt="Click the Submit button")
|
||||
```
|
||||
|
||||
### Core AI Commands - Examples
|
||||
|
||||
```python
|
||||
# act - Perform actions using natural language
|
||||
await page.act("Click the login button and wait for the dashboard to load")
|
||||
|
||||
# extract - Extract structured data with optional JSON schema
|
||||
result = await page.extract("Get the product name and price")
|
||||
result = await page.extract(
|
||||
prompt="Extract order details",
|
||||
schema={"order_id": "string", "total": "number", "items": "array"}
|
||||
)
|
||||
|
||||
# validate - Check page state (returns bool)
|
||||
is_logged_in = await page.validate("Check if the user is logged in")
|
||||
|
||||
# prompt - Send arbitrary prompts to the LLM
|
||||
summary = await page.prompt("Summarize what's on this page")
|
||||
```
|
||||
|
||||
### Quick Start Examples
|
||||
|
||||
**Run via UI:**
|
||||
```bash
|
||||
skyvern run all
|
||||
```
|
||||
Navigate to http://localhost:8080 to run tasks through the web interface.
|
||||
|
||||
**Python SDK:**
|
||||
```python
|
||||
from skyvern import Skyvern
|
||||
|
||||
# Local mode
|
||||
skyvern = Skyvern.local()
|
||||
|
||||
# Or connect to Skyvern Cloud
|
||||
skyvern = Skyvern(api_key="your-api-key")
|
||||
|
||||
# Launch browser and get page
|
||||
browser = await skyvern.launch_cloud_browser()
|
||||
page = await browser.get_working_page()
|
||||
|
||||
# Mix Playwright with AI-powered actions
|
||||
await page.goto("https://example.com")
|
||||
await page.click("#login-button") # Traditional Playwright
|
||||
await page.agent.login(credential_type="skyvern", credential_id="cred_123") # AI login
|
||||
await page.click(prompt="Add first item to cart") # AI-augmented click
|
||||
await page.agent.run_task("Complete checkout with: John Snow, 12345") # AI task
|
||||
```
|
||||
|
||||
**TypeScript SDK:**
|
||||
```typescript
|
||||
import { Skyvern } from "@skyvern/client";
|
||||
|
||||
const skyvern = new Skyvern({ apiKey: "your-api-key" });
|
||||
const browser = await skyvern.launchCloudBrowser();
|
||||
const page = await browser.getWorkingPage();
|
||||
|
||||
// Mix Playwright with AI-powered actions
|
||||
await page.goto("https://example.com");
|
||||
await page.click("#login-button"); // Traditional Playwright
|
||||
await page.agent.login("skyvern", { credentialId: "cred_123" }); // AI login
|
||||
await page.click({ prompt: "Add first item to cart" }); // AI-augmented click
|
||||
await page.agent.runTask("Complete checkout with: John Snow, 12345"); // AI task
|
||||
|
||||
await browser.close();
|
||||
```
|
||||
|
||||
**Simple task execution:**
|
||||
```python
|
||||
from skyvern import Skyvern
|
||||
|
||||
skyvern = Skyvern()
|
||||
task = await skyvern.run_task(prompt="Find the top post on hackernews today")
|
||||
print(task)
|
||||
```
|
||||
|
||||
## Advanced Usage
|
||||
|
||||
### Control your own browser (Chrome)
|
||||
|
||||
Let Skyvern control your existing Chrome browser — with all your cookies, logins, and extensions.
|
||||
|
||||
#### Step 1: Enable remote debugging in Chrome
|
||||
|
||||
1. Open Chrome and navigate to `chrome://inspect/#remote-debugging`
|
||||
2. Click **Enable** to start the debugging server
|
||||
3. You should see: **Server running at: 127.0.0.1:9222**
|
||||
|
||||
> [!TIP]
|
||||
> The `skyvern init browser` command can do this automatically — it opens `chrome://inspect/#remote-debugging`, waits for you to enable it, and saves the config.
|
||||
|
||||
#### Step 2: Connect Skyvern
|
||||
|
||||
**Option A — Python Code:**
|
||||
```python
|
||||
from skyvern import Skyvern
|
||||
|
||||
skyvern = Skyvern(
|
||||
base_url="http://localhost:8000",
|
||||
api_key="YOUR_API_KEY",
|
||||
browser_address="http://127.0.0.1:9222",
|
||||
)
|
||||
task = await skyvern.run_task(
|
||||
prompt="Find the top post on hackernews today",
|
||||
)
|
||||
```
|
||||
|
||||
**Option B — Skyvern Service:**
|
||||
|
||||
Add two variables to your .env file:
|
||||
```bash
|
||||
BROWSER_TYPE=cdp-connect
|
||||
BROWSER_REMOTE_DEBUGGING_URL=http://127.0.0.1:9222
|
||||
```
|
||||
|
||||
Restart Skyvern service `skyvern run all` and run the task through UI or code
|
||||
|
||||
### Connect Skyvern Cloud to your local browser
|
||||
|
||||
Let Skyvern Cloud control a Chrome browser running on your machine — with all your existing cookies, logins, and extensions. Useful for automating sites where you're already logged in or behind a VPN.
|
||||
|
||||
```bash
|
||||
# One command to start Chrome + create a tunnel to Skyvern Cloud
|
||||
skyvern browser serve --tunnel
|
||||
```
|
||||
|
||||
Then use the tunnel URL in your task:
|
||||
|
||||
```python
|
||||
from skyvern import Skyvern
|
||||
|
||||
skyvern = Skyvern(api_key="your-api-key")
|
||||
task = await skyvern.run_task(
|
||||
prompt="Download the latest invoice from my account",
|
||||
browser_address="https://abc123.ngrok-free.dev",
|
||||
)
|
||||
```
|
||||
|
||||
> [!WARNING]
|
||||
> Always use `--api-key` when exposing your browser via a tunnel. Without it, anyone with the URL has full control of your browser. See the [security docs](https://www.skyvern.com/docs/optimization/browser-tunneling#security).
|
||||
|
||||
See the [full documentation](https://www.skyvern.com/docs/optimization/browser-tunneling) for all options, manual tunnel setup, and troubleshooting.
|
||||
|
||||
### Get consistent output schema from your run
|
||||
You can do this by adding the `data_extraction_schema` parameter:
|
||||
```python
|
||||
from skyvern import Skyvern
|
||||
|
||||
skyvern = Skyvern()
|
||||
task = await skyvern.run_task(
|
||||
prompt="Find the top post on hackernews today",
|
||||
data_extraction_schema={
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"title": {
|
||||
"type": "string",
|
||||
"description": "The title of the top post"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "The URL of the top post"
|
||||
},
|
||||
"points": {
|
||||
"type": "integer",
|
||||
"description": "Number of points the post has received"
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
### Helpful commands to debug issues
|
||||
|
||||
|
||||
```bash
|
||||
# Launch the Skyvern Server Separately*
|
||||
skyvern run server
|
||||
|
||||
# Launch the Skyvern UI
|
||||
skyvern run ui
|
||||
|
||||
# Check status of the Skyvern service
|
||||
skyvern status
|
||||
|
||||
# Stop the Skyvern service
|
||||
skyvern stop all
|
||||
|
||||
# Stop the Skyvern UI
|
||||
skyvern stop ui
|
||||
|
||||
# Stop the Skyvern Server Separately
|
||||
skyvern stop server
|
||||
```
|
||||
|
||||
# Performance & Evaluation
|
||||
|
||||
Skyvern has SOTA performance on the [WebBench benchmark](webbench.ai) with a 64.4% accuracy. The technical report + evaluation can be found [here](https://www.skyvern.com/blog/web-bench-a-new-way-to-compare-ai-browser-agents/)
|
||||
|
||||
<p align="center">
|
||||
<img src="fern/images/performance/webbench_overall.png"/>
|
||||
</p>
|
||||
|
||||
## Performance on WRITE tasks (eg filling out forms, logging in, downloading files, etc)
|
||||
|
||||
Skyvern is the best performing agent on WRITE tasks (eg filling out forms, logging in, downloading files, etc), which is primarily used for RPA (Robotic Process Automation) adjacent tasks.
|
||||
|
||||
<p align="center">
|
||||
<img src="fern/images/performance/webbench_write.png"/>
|
||||
</p>
|
||||
|
||||
# Skyvern Features
|
||||
|
||||
## Skyvern Tasks
|
||||
Tasks are the fundamental building block inside Skyvern. Each task is a single request to Skyvern, instructing it to navigate through a website and accomplish a specific goal.
|
||||
|
||||
Tasks require you to specify a `url`, `prompt`, and can optionally include a `data schema` (if you want the output to conform to a specific schema) and `error codes` (if you want Skyvern to stop running in specific situations).
|
||||
|
||||
<p align="center">
|
||||
<img src="fern/images/skyvern_2_0_screenshot.png"/>
|
||||
</p>
|
||||
|
||||
|
||||
## Skyvern Workflows
|
||||
Workflows are a way to chain multiple tasks together to form a cohesive unit of work.
|
||||
|
||||
For example, if you wanted to download all invoices newer than January 1st, you could create a workflow that first navigated to the invoices page, then filtered down to only show invoices newer than January 1st, extracted a list of all eligible invoices, and iterated through each invoice to download it.
|
||||
|
||||
Another example is if you wanted to automate purchasing products from an e-commerce store, you could create a workflow that first navigated to the desired product, then added it to a cart. Second, it would navigate to the cart and validate the cart state. Finally, it would go through the checkout process to purchase the items.
|
||||
|
||||
Supported workflow features include:
|
||||
1. Browser Task
|
||||
1. Browser Action
|
||||
1. Data Extraction
|
||||
1. Validation
|
||||
1. For Loops
|
||||
1. File parsing
|
||||
1. Sending emails
|
||||
1. Text Prompts
|
||||
1. HTTP Request Block
|
||||
1. Custom Code Block
|
||||
1. Uploading files to block storage
|
||||
1. (Coming soon) Conditionals
|
||||
|
||||
<p align="center">
|
||||
<img src="fern/images/block_example_v2.png"/>
|
||||
</p>
|
||||
|
||||
## Livestreaming
|
||||
Skyvern allows you to livestream the viewport of the browser to your local machine so that you can see exactly what Skyvern is doing on the web. This is useful for debugging and understanding how Skyvern is interacting with a website, and intervening when necessary
|
||||
|
||||
## Form Filling
|
||||
Skyvern is natively capable of filling out form inputs on websites. Passing in information via the `navigation_goal` will allow Skyvern to comprehend the information and fill out the form accordingly.
|
||||
|
||||
## Data Extraction
|
||||
Skyvern is also capable of extracting data from a website.
|
||||
|
||||
You can also specify a `data_extraction_schema` directly within the main prompt to tell Skyvern exactly what data you'd like to extract from the website, in jsonc format. Skyvern's output will be structured in accordance to the supplied schema.
|
||||
|
||||
## File Downloading
|
||||
Skyvern is also capable of downloading files from a website. All downloaded files are automatically uploaded to block storage (if configured), and you can access them via the UI.
|
||||
|
||||
## Authentication
|
||||
Skyvern supports a number of different authentication methods to make it easier to automate tasks behind a login. If you'd like to try it out, please reach out to us [via email](mailto:founders@skyvern.com) or [discord](https://discord.gg/fG2XXEuQX3).
|
||||
|
||||
<p align="center">
|
||||
<img src="fern/images/secure_password_task_example.png"/>
|
||||
</p>
|
||||
|
||||
|
||||
### 🔐 2FA Support (TOTP)
|
||||
Skyvern supports a number of different 2FA methods to allow you to automate workflows that require 2FA.
|
||||
|
||||
Examples include:
|
||||
1. QR-based 2FA (e.g. Google Authenticator, Authy)
|
||||
1. Email based 2FA
|
||||
1. SMS based 2FA
|
||||
|
||||
🔐 Learn more about 2FA support [here](https://www.skyvern.com/docs/credentials/totp).
|
||||
|
||||
### Password Manager Integrations
|
||||
Skyvern currently supports the following password manager integrations:
|
||||
- [x] Bitwarden
|
||||
- [x] Custom Credential Service (HTTP API)
|
||||
- [ ] 1Password
|
||||
- [ ] LastPass
|
||||
|
||||
|
||||
## Model Context Protocol (MCP)
|
||||
|
||||
Skyvern supports the Model Context Protocol (MCP) to allow you to use any LLM that supports MCP.
|
||||
|
||||
See the MCP documentation [here](https://www.skyvern.com/docs/integrations/mcp#mcp-server)
|
||||
|
||||
## Zapier / Make.com / N8N Integration
|
||||
Skyvern supports Zapier, Make.com, and N8N to allow you to connect your Skyvern workflows to other apps.
|
||||
|
||||
* [Zapier](https://www.skyvern.com/docs/integrations/zapier)
|
||||
* [Make.com](https://www.skyvern.com/docs/integrations/make.com)
|
||||
* [N8N](https://www.skyvern.com/docs/integrations/n8n)
|
||||
|
||||
🔐 Learn more about 2FA support [here](https://www.skyvern.com/docs/credentials/totp).
|
||||
|
||||
|
||||
# Real-world examples of Skyvern
|
||||
We love to see how Skyvern is being used in the wild. Here are some examples of how Skyvern is being used to automate workflows in the real world. Please open PRs to add your own examples!
|
||||
|
||||
## Invoice Downloading on many different websites
|
||||
[Book a demo to see it live](https://meetings.hubspot.com/skyvern/demo)
|
||||
|
||||
<p align="center">
|
||||
<img src="fern/images/invoice_downloading.gif"/>
|
||||
</p>
|
||||
|
||||
## Automate the job application process
|
||||
[💡 See it in action](https://app.skyvern.com/tasks/create/job_application)
|
||||
<p align="center">
|
||||
<img src="fern/images/job_application_demo.gif"/>
|
||||
</p>
|
||||
|
||||
## Automate materials procurement for a manufacturing company
|
||||
[💡 See it in action](https://app.skyvern.com/tasks/create/finditparts)
|
||||
<p align="center">
|
||||
<img src="fern/images/finditparts_recording_crop.gif"/>
|
||||
</p>
|
||||
|
||||
## Navigating to government websites to register accounts or fill out forms
|
||||
[💡 See it in action](https://app.skyvern.com/tasks/create/california_edd)
|
||||
<p align="center">
|
||||
<img src="fern/images/edd_services.gif"/>
|
||||
</p>
|
||||
<!-- Add example of delaware entity lookups x2 -->
|
||||
|
||||
## Filling out random contact us forms
|
||||
[💡 See it in action](https://app.skyvern.com/tasks/create/contact_us_forms)
|
||||
<p align="center">
|
||||
<img src="fern/images/contact_forms.gif"/>
|
||||
</p>
|
||||
|
||||
|
||||
## Retrieving insurance quotes from insurance providers in any language
|
||||
[💡 See it in action](https://app.skyvern.com/tasks/create/bci_seguros)
|
||||
<p align="center">
|
||||
<img src="fern/images/bci_seguros_recording.gif"/>
|
||||
</p>
|
||||
|
||||
[💡 See it in action](https://app.skyvern.com/tasks/create/geico)
|
||||
|
||||
<p align="center">
|
||||
<img src="fern/images/geico_shu_recording_cropped.gif"/>
|
||||
</p>
|
||||
|
||||
# Contributor Setup
|
||||
Make sure to have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed.
|
||||
1. Run this to create your virtual environment (`.venv`)
|
||||
```bash
|
||||
uv sync --group dev
|
||||
```
|
||||
2. Perform initial server configuration
|
||||
```bash
|
||||
uv run skyvern quickstart
|
||||
```
|
||||
3. Navigate to `http://localhost:8080` in your browser to start using the UI
|
||||
*The Skyvern CLI supports Windows, WSL, macOS, and Linux environments.*
|
||||
|
||||
# Documentation
|
||||
|
||||
More extensive documentation can be found on our [📕 docs page](https://www.skyvern.com/docs). Please let us know if something is unclear or missing by opening an issue or reaching out to us [via email](mailto:founders@skyvern.com) or [discord](https://discord.gg/fG2XXEuQX3).
|
||||
|
||||
# Supported LLMs
|
||||
| Provider | Supported Models |
|
||||
| -------- | ------- |
|
||||
| OpenAI | GPT-5.5, GPT-5.4, GPT-5, GPT-4.1, o3, o4-mini |
|
||||
| Anthropic | Claude 4.7 Opus, Claude 4.6 (Sonnet, Opus), Claude 4.5 (Haiku, Sonnet, Opus) |
|
||||
| Azure OpenAI | Any GPT models deployed to your Azure subscription |
|
||||
| AWS Bedrock | Claude 4.7, Claude 4.6 (Sonnet, Opus), Claude 4.5 (Sonnet, Opus) |
|
||||
| Gemini | Gemini 3.1 Pro, Gemini 3 Flash, Gemini 2.5 Pro/Flash |
|
||||
| Ollama | Run any locally hosted model via [Ollama](https://github.com/ollama/ollama) |
|
||||
| OpenRouter | Access models through [OpenRouter](https://openrouter.ai) |
|
||||
| OpenAI-compatible | Any custom API endpoint that follows OpenAI's API format (via [liteLLM](https://docs.litellm.ai/docs/providers/openai_compatible)) |
|
||||
|
||||
For detailed LLM configuration including all available model keys, environment variables, and multi-model setups, see the [LLM Configuration docs](https://www.skyvern.com/docs/self-hosted/llm-configuration).
|
||||
|
||||
# Contributing
|
||||
|
||||
We welcome PRs and suggestions! Don't hesitate to open a PR/issue or to reach out to us [via email](mailto:founders@skyvern.com) or [discord](https://discord.gg/fG2XXEuQX3).
|
||||
Please have a look at our [contribution guide](CONTRIBUTING.md) and
|
||||
["Help Wanted" issues](https://github.com/skyvern-ai/skyvern/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) to get started!
|
||||
|
||||
If you want to chat with the skyvern repository to get a high level overview of how it is structured, how to build off it, and how to resolve usage questions, check out [Code Sage](https://sage.storia.ai?utm_source=github&utm_medium=referral&utm_campaign=skyvern-readme).
|
||||
|
||||
# Telemetry
|
||||
|
||||
By Default, Skyvern collects basic usage statistics to help us understand how Skyvern is being used. If you would like to opt-out of telemetry, please set the `SKYVERN_TELEMETRY` environment variable to `false`.
|
||||
|
||||
# License
|
||||
Skyvern's open source repository is supported via a managed cloud. All of the core logic powering Skyvern is available in this open source repository licensed under the [AGPL-3.0 License](LICENSE), with the exception of anti-bot measures available in our managed cloud offering.
|
||||
|
||||
If you have any questions or concerns around licensing, please [contact us](mailto:support@skyvern.com) and we would be happy to help.
|
||||
|
||||
# Star History
|
||||
|
||||
[](https://star-history.com/#Skyvern-AI/skyvern&Date)
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
|
||||
- [Security Policy](#security-policy)
|
||||
- [Supported Versions](#supported-versions)
|
||||
- [Reporting a Vulnerability](#reporting-a-vulnerability)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
Use this section to tell people about which versions of your project are
|
||||
currently being supported with security updates.
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | ------------------ |
|
||||
| 0.1.x | :white_check_mark: |
|
||||
| < 0.1.0 | :x: |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Navigate to the [GitHub Advisories page](https://github.com/Skyvern-AI/skyvern/security/advisories) for the repository and click 'Report a Vulnerability'.
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
# A generic, single database configuration.
|
||||
|
||||
[alembic]
|
||||
# path to migration scripts
|
||||
script_location = alembic
|
||||
|
||||
# template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
|
||||
# Uncomment the line below if you want the files to be prepended with date and time
|
||||
# see https://alembic.sqlalchemy.org/en/latest/tutorial.html#editing-the-ini-file
|
||||
# for all available tokens
|
||||
file_template = %%(year)d_%%(month).2d_%%(day).2d_%%(hour).2d%%(minute).2d-%%(rev)s_%%(slug)s
|
||||
|
||||
# sys.path path, will be prepended to sys.path if present.
|
||||
# defaults to the current working directory.
|
||||
prepend_sys_path = .
|
||||
|
||||
# timezone to use when rendering the date within the migration file
|
||||
# as well as the filename.
|
||||
# If specified, requires the python-dateutil library that can be
|
||||
# installed by adding `alembic[tz]` to the pip requirements
|
||||
# string value is passed to dateutil.tz.gettz()
|
||||
# leave blank for localtime
|
||||
timezone = UTC
|
||||
|
||||
# max length of characters to apply to the
|
||||
# "slug" field
|
||||
# truncate_slug_length = 40
|
||||
|
||||
# set to 'true' to run the environment during
|
||||
# the 'revision' command, regardless of autogenerate
|
||||
# revision_environment = false
|
||||
|
||||
# set to 'true' to allow .pyc and .pyo files without
|
||||
# a source .py file to be detected as revisions in the
|
||||
# versions/ directory
|
||||
# sourceless = false
|
||||
|
||||
# version location specification; This defaults
|
||||
# to alembic/versions. When using multiple version
|
||||
# directories, initial revisions must be specified with --version-path.
|
||||
# The path separator used here should be the separator specified by "version_path_separator" below.
|
||||
# version_locations = %(here)s/bar:%(here)s/bat:alembic/versions
|
||||
|
||||
# version path separator; As mentioned above, this is the character used to split
|
||||
# version_locations. The default within new alembic.ini files is "os", which uses os.pathsep.
|
||||
# If this key is omitted entirely, it falls back to the legacy behavior of splitting on spaces and/or commas.
|
||||
# Valid values for version_path_separator are:
|
||||
#
|
||||
# version_path_separator = :
|
||||
# version_path_separator = ;
|
||||
# version_path_separator = space
|
||||
version_path_separator = os # Use os.pathsep. Default configuration used for new projects.
|
||||
|
||||
# set to 'true' to search source files recursively
|
||||
# in each "version_locations" directory
|
||||
# new in Alembic version 1.10
|
||||
# recursive_version_locations = false
|
||||
|
||||
# the output encoding used when revision files
|
||||
# are written from script.py.mako
|
||||
# output_encoding = utf-8
|
||||
|
||||
; sqlalchemy.url = driver://user:pass@localhost/dbname
|
||||
sqlalchemy.url = postgresql+psycopg://skyvern@localhost/skyvern
|
||||
|
||||
|
||||
[post_write_hooks]
|
||||
# post_write_hooks defines scripts or Python functions that are run
|
||||
# on newly generated revision scripts. See the documentation for further
|
||||
# detail and examples
|
||||
|
||||
# format using "black" - use the console_scripts runner, against the "black" entrypoint
|
||||
# hooks = black
|
||||
# black.type = console_scripts
|
||||
# black.entrypoint = black
|
||||
# black.options = -l 79 REVISION_SCRIPT_FILENAME
|
||||
|
||||
# lint with attempts to fix using "ruff" - use the exec runner, execute a binary
|
||||
# hooks = ruff
|
||||
# ruff.type = exec
|
||||
# ruff.executable = %(here)s/.venv/bin/ruff
|
||||
# ruff.options = --fix REVISION_SCRIPT_FILENAME
|
||||
|
||||
# Logging configuration
|
||||
[loggers]
|
||||
keys = root,sqlalchemy,alembic
|
||||
|
||||
[handlers]
|
||||
keys = console
|
||||
|
||||
[formatters]
|
||||
keys = generic
|
||||
|
||||
[logger_root]
|
||||
level = WARN
|
||||
handlers = console
|
||||
qualname =
|
||||
|
||||
[logger_sqlalchemy]
|
||||
level = WARN
|
||||
handlers =
|
||||
qualname = sqlalchemy.engine
|
||||
|
||||
[logger_alembic]
|
||||
level = INFO
|
||||
handlers =
|
||||
qualname = alembic
|
||||
|
||||
[handler_console]
|
||||
class = StreamHandler
|
||||
args = (sys.stderr,)
|
||||
level = NOTSET
|
||||
formatter = generic
|
||||
|
||||
[formatter_generic]
|
||||
format = %(levelname)-5.5s [%(name)s] %(message)s
|
||||
datefmt = %H:%M:%S
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
|
||||
- [Creating a new revision](#creating-a-new-revision)
|
||||
- [Running migrations](#running-migrations)
|
||||
- [Downgrading migrations](#downgrading-migrations)
|
||||
- [Check your current alembic setup](#check-your-current-alembic-setup)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
# Creating a new revision
|
||||
```
|
||||
alembic revision --autogenerate -m "enter description here"
|
||||
```
|
||||
**Note:** Please read [What does Autogenerate Detect (and what does it not detect?)](https://alembic.sqlalchemy.org/en/latest/autogenerate.html#what-does-autogenerate-detect-and-what-does-it-not-detect) and always make sure to review the generated revision file before running it.
|
||||
|
||||
# Running migrations
|
||||
```
|
||||
alembic upgrade head
|
||||
```
|
||||
# Downgrading migrations
|
||||
```
|
||||
alembic downgrade -1
|
||||
```
|
||||
|
||||
# Check your current alembic setup
|
||||
```
|
||||
alembic current
|
||||
```
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
import asyncio
|
||||
from logging.config import fileConfig
|
||||
|
||||
from sqlalchemy import pool
|
||||
from sqlalchemy.engine import Connection
|
||||
from sqlalchemy.ext.asyncio import create_async_engine
|
||||
|
||||
from alembic import context
|
||||
|
||||
# this is the Alembic Config object, which provides
|
||||
# access to the values within the .ini file in use.
|
||||
config = context.config
|
||||
|
||||
# Interpret the config file for Python logging.
|
||||
# This line sets up loggers basically.
|
||||
if config.config_file_name is not None:
|
||||
fileConfig(config.config_file_name)
|
||||
|
||||
# add your model's MetaData object here
|
||||
# for 'autogenerate' support
|
||||
# from myapp import mymodel
|
||||
# target_metadata = mymodel.Base.metadata
|
||||
from skyvern.forge.sdk.db import models
|
||||
|
||||
target_metadata = models.Base.metadata
|
||||
|
||||
# other values from the config, defined by the needs of env.py,
|
||||
# can be acquired:
|
||||
# my_important_option = config.get_main_option("my_important_option")
|
||||
# ... etc.
|
||||
from skyvern.forge.sdk.settings_manager import SettingsManager
|
||||
|
||||
config.set_main_option("sqlalchemy.url", SettingsManager.get_settings().DATABASE_STRING)
|
||||
|
||||
|
||||
def run_migrations_offline() -> None:
|
||||
"""Run migrations in 'offline' mode.
|
||||
|
||||
This configures the context with just a URL
|
||||
and not an Engine, though an Engine is acceptable
|
||||
here as well. By skipping the Engine creation
|
||||
we don't even need a DBAPI to be available.
|
||||
|
||||
Calls to context.execute() here emit the given string to the
|
||||
script output.
|
||||
|
||||
"""
|
||||
url = config.get_main_option("sqlalchemy.url")
|
||||
context.configure(
|
||||
url=url,
|
||||
target_metadata=target_metadata,
|
||||
literal_binds=True,
|
||||
dialect_opts={"paramstyle": "named"},
|
||||
)
|
||||
|
||||
with context.begin_transaction():
|
||||
context.run_migrations()
|
||||
|
||||
|
||||
def do_run_migrations(connection: Connection):
|
||||
"""Run migrations in 'online' mode.
|
||||
|
||||
In this scenario we need to create an Engine
|
||||
and associate a connection with the context.
|
||||
|
||||
"""
|
||||
context.configure(connection=connection, target_metadata=target_metadata)
|
||||
with context.begin_transaction():
|
||||
context.run_migrations()
|
||||
|
||||
|
||||
async def run_migrations_online():
|
||||
connectable = create_async_engine(
|
||||
config.get_main_option("sqlalchemy.url"),
|
||||
poolclass=pool.NullPool,
|
||||
)
|
||||
|
||||
async with connectable.connect() as connection:
|
||||
await connection.run_sync(do_run_migrations)
|
||||
|
||||
await connectable.dispose()
|
||||
|
||||
|
||||
if context.is_offline_mode():
|
||||
run_migrations_offline()
|
||||
else:
|
||||
|
||||
async def async_main():
|
||||
await run_migrations_online()
|
||||
|
||||
try:
|
||||
loop = asyncio.get_running_loop()
|
||||
except RuntimeError:
|
||||
asyncio.run(async_main())
|
||||
else:
|
||||
import concurrent.futures
|
||||
|
||||
with concurrent.futures.ThreadPoolExecutor() as executor:
|
||||
future = executor.submit(asyncio.run, async_main())
|
||||
future.result()
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
"""${message}
|
||||
|
||||
Revision ID: ${up_revision}
|
||||
Revises: ${down_revision | comma,n}
|
||||
Create Date: ${create_date}
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
${imports if imports else ""}
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = ${repr(up_revision)}
|
||||
down_revision: Union[str, None] = ${repr(down_revision)}
|
||||
branch_labels: Union[str, Sequence[str], None] = ${repr(branch_labels)}
|
||||
depends_on: Union[str, Sequence[str], None] = ${repr(depends_on)}
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
${upgrades if upgrades else "pass"}
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
${downgrades if downgrades else "pass"}
|
||||
|
|
@ -0,0 +1,353 @@
|
|||
"""Create tables
|
||||
|
||||
Revision ID: 99423c1dec60
|
||||
Revises:
|
||||
Create Date: 2024-03-01 05:37:31.862957+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "99423c1dec60"
|
||||
down_revision: Union[str, None] = None
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"organizations",
|
||||
sa.Column("organization_id", sa.String(), nullable=False),
|
||||
sa.Column("organization_name", sa.String(), nullable=False),
|
||||
sa.Column("webhook_callback_url", sa.UnicodeText(), nullable=True),
|
||||
sa.Column("max_steps_per_run", sa.Integer(), nullable=True),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("modified_at", sa.DateTime(), nullable=False),
|
||||
sa.PrimaryKeyConstraint("organization_id"),
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_organizations_organization_id"),
|
||||
"organizations",
|
||||
["organization_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_table(
|
||||
"organization_auth_tokens",
|
||||
sa.Column("id", sa.String(), nullable=False),
|
||||
sa.Column("organization_id", sa.String(), nullable=False),
|
||||
sa.Column(
|
||||
"token_type",
|
||||
sa.Enum("api", name="organizationauthtokentype"),
|
||||
nullable=False,
|
||||
),
|
||||
sa.Column("token", sa.String(), nullable=False),
|
||||
sa.Column("valid", sa.Boolean(), nullable=False),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("modified_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("deleted_at", sa.DateTime(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["organization_id"],
|
||||
["organizations.organization_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_organization_auth_tokens_id"),
|
||||
"organization_auth_tokens",
|
||||
["id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_organization_auth_tokens_organization_id"),
|
||||
"organization_auth_tokens",
|
||||
["organization_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_organization_auth_tokens_token"),
|
||||
"organization_auth_tokens",
|
||||
["token"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_table(
|
||||
"workflows",
|
||||
sa.Column("workflow_id", sa.String(), nullable=False),
|
||||
sa.Column("organization_id", sa.String(), nullable=True),
|
||||
sa.Column("title", sa.String(), nullable=False),
|
||||
sa.Column("description", sa.String(), nullable=True),
|
||||
sa.Column("workflow_definition", sa.JSON(), nullable=False),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("modified_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("deleted_at", sa.DateTime(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["organization_id"],
|
||||
["organizations.organization_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("workflow_id"),
|
||||
)
|
||||
op.create_index(op.f("ix_workflows_workflow_id"), "workflows", ["workflow_id"], unique=False)
|
||||
op.create_table(
|
||||
"aws_secret_parameters",
|
||||
sa.Column("aws_secret_parameter_id", sa.String(), nullable=False),
|
||||
sa.Column("workflow_id", sa.String(), nullable=False),
|
||||
sa.Column("key", sa.String(), nullable=False),
|
||||
sa.Column("description", sa.String(), nullable=True),
|
||||
sa.Column("aws_key", sa.String(), nullable=False),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("modified_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("deleted_at", sa.DateTime(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["workflow_id"],
|
||||
["workflows.workflow_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("aws_secret_parameter_id"),
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_aws_secret_parameters_aws_secret_parameter_id"),
|
||||
"aws_secret_parameters",
|
||||
["aws_secret_parameter_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_aws_secret_parameters_workflow_id"),
|
||||
"aws_secret_parameters",
|
||||
["workflow_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_table(
|
||||
"workflow_parameters",
|
||||
sa.Column("workflow_parameter_id", sa.String(), nullable=False),
|
||||
sa.Column("workflow_parameter_type", sa.String(), nullable=False),
|
||||
sa.Column("key", sa.String(), nullable=False),
|
||||
sa.Column("description", sa.String(), nullable=True),
|
||||
sa.Column("workflow_id", sa.String(), nullable=False),
|
||||
sa.Column("default_value", sa.String(), nullable=True),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("modified_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("deleted_at", sa.DateTime(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["workflow_id"],
|
||||
["workflows.workflow_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("workflow_parameter_id"),
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_workflow_parameters_workflow_id"),
|
||||
"workflow_parameters",
|
||||
["workflow_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_workflow_parameters_workflow_parameter_id"),
|
||||
"workflow_parameters",
|
||||
["workflow_parameter_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_table(
|
||||
"workflow_runs",
|
||||
sa.Column("workflow_run_id", sa.String(), nullable=False),
|
||||
sa.Column("workflow_id", sa.String(), nullable=False),
|
||||
sa.Column("status", sa.String(), nullable=False),
|
||||
sa.Column(
|
||||
"proxy_location",
|
||||
sa.Enum(
|
||||
"US_CA",
|
||||
"US_NY",
|
||||
"US_TX",
|
||||
"US_FL",
|
||||
"US_WA",
|
||||
"RESIDENTIAL",
|
||||
"NONE",
|
||||
name="proxylocation",
|
||||
),
|
||||
nullable=True,
|
||||
),
|
||||
sa.Column("webhook_callback_url", sa.String(), nullable=True),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("modified_at", sa.DateTime(), nullable=False),
|
||||
sa.ForeignKeyConstraint(
|
||||
["workflow_id"],
|
||||
["workflows.workflow_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("workflow_run_id"),
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_workflow_runs_workflow_run_id"),
|
||||
"workflow_runs",
|
||||
["workflow_run_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_table(
|
||||
"tasks",
|
||||
sa.Column("task_id", sa.String(), nullable=False),
|
||||
sa.Column("organization_id", sa.String(), nullable=True),
|
||||
sa.Column("status", sa.String(), nullable=True),
|
||||
sa.Column("webhook_callback_url", sa.String(), nullable=True),
|
||||
sa.Column("url", sa.String(), nullable=True),
|
||||
sa.Column("navigation_goal", sa.String(), nullable=True),
|
||||
sa.Column("data_extraction_goal", sa.String(), nullable=True),
|
||||
sa.Column("navigation_payload", sa.JSON(), nullable=True),
|
||||
sa.Column("extracted_information", sa.JSON(), nullable=True),
|
||||
sa.Column("failure_reason", sa.String(), nullable=True),
|
||||
sa.Column(
|
||||
"proxy_location",
|
||||
sa.Enum(
|
||||
"US_CA",
|
||||
"US_NY",
|
||||
"US_TX",
|
||||
"US_FL",
|
||||
"US_WA",
|
||||
"RESIDENTIAL",
|
||||
"NONE",
|
||||
name="proxylocation",
|
||||
),
|
||||
nullable=True,
|
||||
),
|
||||
sa.Column("extracted_information_schema", sa.JSON(), nullable=True),
|
||||
sa.Column("workflow_run_id", sa.String(), nullable=True),
|
||||
sa.Column("order", sa.Integer(), nullable=True),
|
||||
sa.Column("retry", sa.Integer(), nullable=True),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("modified_at", sa.DateTime(), nullable=False),
|
||||
sa.ForeignKeyConstraint(
|
||||
["organization_id"],
|
||||
["organizations.organization_id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["workflow_run_id"],
|
||||
["workflow_runs.workflow_run_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("task_id"),
|
||||
)
|
||||
op.create_index(op.f("ix_tasks_task_id"), "tasks", ["task_id"], unique=False)
|
||||
op.create_table(
|
||||
"workflow_run_parameters",
|
||||
sa.Column("workflow_run_id", sa.String(), nullable=False),
|
||||
sa.Column("workflow_parameter_id", sa.String(), nullable=False),
|
||||
sa.Column("value", sa.String(), nullable=False),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.ForeignKeyConstraint(
|
||||
["workflow_parameter_id"],
|
||||
["workflow_parameters.workflow_parameter_id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["workflow_run_id"],
|
||||
["workflow_runs.workflow_run_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("workflow_run_id", "workflow_parameter_id"),
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_workflow_run_parameters_workflow_parameter_id"),
|
||||
"workflow_run_parameters",
|
||||
["workflow_parameter_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_workflow_run_parameters_workflow_run_id"),
|
||||
"workflow_run_parameters",
|
||||
["workflow_run_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_table(
|
||||
"steps",
|
||||
sa.Column("step_id", sa.String(), nullable=False),
|
||||
sa.Column("organization_id", sa.String(), nullable=True),
|
||||
sa.Column("task_id", sa.String(), nullable=True),
|
||||
sa.Column("status", sa.String(), nullable=True),
|
||||
sa.Column("output", sa.JSON(), nullable=True),
|
||||
sa.Column("order", sa.Integer(), nullable=True),
|
||||
sa.Column("is_last", sa.Boolean(), nullable=True),
|
||||
sa.Column("retry_index", sa.Integer(), nullable=True),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("modified_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("input_token_count", sa.Integer(), nullable=True),
|
||||
sa.Column("output_token_count", sa.Integer(), nullable=True),
|
||||
sa.Column("step_cost", sa.Numeric(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["organization_id"],
|
||||
["organizations.organization_id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["task_id"],
|
||||
["tasks.task_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("step_id"),
|
||||
)
|
||||
op.create_index(op.f("ix_steps_step_id"), "steps", ["step_id"], unique=False)
|
||||
op.create_table(
|
||||
"artifacts",
|
||||
sa.Column("artifact_id", sa.String(), nullable=False),
|
||||
sa.Column("organization_id", sa.String(), nullable=True),
|
||||
sa.Column("task_id", sa.String(), nullable=True),
|
||||
sa.Column("step_id", sa.String(), nullable=True),
|
||||
sa.Column("artifact_type", sa.String(), nullable=True),
|
||||
sa.Column("uri", sa.String(), nullable=True),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("modified_at", sa.DateTime(), nullable=False),
|
||||
sa.ForeignKeyConstraint(
|
||||
["organization_id"],
|
||||
["organizations.organization_id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["step_id"],
|
||||
["steps.step_id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["task_id"],
|
||||
["tasks.task_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("artifact_id"),
|
||||
)
|
||||
op.create_index(op.f("ix_artifacts_artifact_id"), "artifacts", ["artifact_id"], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f("ix_artifacts_artifact_id"), table_name="artifacts")
|
||||
op.drop_table("artifacts")
|
||||
op.drop_index(op.f("ix_steps_step_id"), table_name="steps")
|
||||
op.drop_table("steps")
|
||||
op.drop_index(
|
||||
op.f("ix_workflow_run_parameters_workflow_run_id"),
|
||||
table_name="workflow_run_parameters",
|
||||
)
|
||||
op.drop_index(
|
||||
op.f("ix_workflow_run_parameters_workflow_parameter_id"),
|
||||
table_name="workflow_run_parameters",
|
||||
)
|
||||
op.drop_table("workflow_run_parameters")
|
||||
op.drop_index(op.f("ix_tasks_task_id"), table_name="tasks")
|
||||
op.drop_table("tasks")
|
||||
op.drop_index(op.f("ix_workflow_runs_workflow_run_id"), table_name="workflow_runs")
|
||||
op.drop_table("workflow_runs")
|
||||
op.drop_index(
|
||||
op.f("ix_workflow_parameters_workflow_parameter_id"),
|
||||
table_name="workflow_parameters",
|
||||
)
|
||||
op.drop_index(op.f("ix_workflow_parameters_workflow_id"), table_name="workflow_parameters")
|
||||
op.drop_table("workflow_parameters")
|
||||
op.drop_index(op.f("ix_aws_secret_parameters_workflow_id"), table_name="aws_secret_parameters")
|
||||
op.drop_index(
|
||||
op.f("ix_aws_secret_parameters_aws_secret_parameter_id"),
|
||||
table_name="aws_secret_parameters",
|
||||
)
|
||||
op.drop_table("aws_secret_parameters")
|
||||
op.drop_index(op.f("ix_workflows_workflow_id"), table_name="workflows")
|
||||
op.drop_table("workflows")
|
||||
op.drop_index(op.f("ix_organization_auth_tokens_token"), table_name="organization_auth_tokens")
|
||||
op.drop_index(
|
||||
op.f("ix_organization_auth_tokens_organization_id"),
|
||||
table_name="organization_auth_tokens",
|
||||
)
|
||||
op.drop_index(op.f("ix_organization_auth_tokens_id"), table_name="organization_auth_tokens")
|
||||
op.drop_table("organization_auth_tokens")
|
||||
op.drop_index(op.f("ix_organizations_organization_id"), table_name="organizations")
|
||||
op.drop_table("organizations")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
"""Add title, error_code_mapping, and errors to tasks
|
||||
|
||||
Revision ID: 82a0c686152d
|
||||
Revises: 99423c1dec60
|
||||
Create Date: 2024-03-13 05:18:52.674264+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "82a0c686152d"
|
||||
down_revision: Union[str, None] = "99423c1dec60"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("tasks", sa.Column("title", sa.String(), nullable=True))
|
||||
op.add_column("tasks", sa.Column("error_code_mapping", sa.JSON(), nullable=True))
|
||||
# In order to add a column with a default value, we need to add the column
|
||||
# as nullable, then set the default value, then set the column to not
|
||||
op.add_column("tasks", sa.Column("errors", sa.JSON(), nullable=True))
|
||||
op.execute("UPDATE tasks SET errors = '[]'::jsonb")
|
||||
op.alter_column("tasks", "errors", nullable=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("tasks", "errors")
|
||||
op.drop_column("tasks", "error_code_mapping")
|
||||
op.drop_column("tasks", "title")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
"""Create output parameter
|
||||
|
||||
Revision ID: ffe2f57bd288
|
||||
Revises: 82a0c686152d
|
||||
Create Date: 2024-03-22 00:10:16.225454+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "ffe2f57bd288"
|
||||
down_revision: Union[str, None] = "82a0c686152d"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"output_parameters",
|
||||
sa.Column("output_parameter_id", sa.String(), nullable=False),
|
||||
sa.Column("key", sa.String(), nullable=False),
|
||||
sa.Column("description", sa.String(), nullable=True),
|
||||
sa.Column("workflow_id", sa.String(), nullable=False),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("modified_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("deleted_at", sa.DateTime(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["workflow_id"],
|
||||
["workflows.workflow_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("output_parameter_id"),
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_output_parameters_output_parameter_id"),
|
||||
"output_parameters",
|
||||
["output_parameter_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_output_parameters_workflow_id"),
|
||||
"output_parameters",
|
||||
["workflow_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_table(
|
||||
"workflow_run_output_parameters",
|
||||
sa.Column("workflow_run_id", sa.String(), nullable=False),
|
||||
sa.Column("output_parameter_id", sa.String(), nullable=False),
|
||||
sa.Column("value", sa.JSON(), nullable=False),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.ForeignKeyConstraint(
|
||||
["output_parameter_id"],
|
||||
["output_parameters.output_parameter_id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["workflow_run_id"],
|
||||
["workflow_runs.workflow_run_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("workflow_run_id", "output_parameter_id"),
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_workflow_run_output_parameters_output_parameter_id"),
|
||||
"workflow_run_output_parameters",
|
||||
["output_parameter_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_workflow_run_output_parameters_workflow_run_id"),
|
||||
"workflow_run_output_parameters",
|
||||
["workflow_run_id"],
|
||||
unique=False,
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(
|
||||
op.f("ix_workflow_run_output_parameters_workflow_run_id"),
|
||||
table_name="workflow_run_output_parameters",
|
||||
)
|
||||
op.drop_index(
|
||||
op.f("ix_workflow_run_output_parameters_output_parameter_id"),
|
||||
table_name="workflow_run_output_parameters",
|
||||
)
|
||||
op.drop_table("workflow_run_output_parameters")
|
||||
op.drop_index(op.f("ix_output_parameters_workflow_id"), table_name="output_parameters")
|
||||
op.drop_index(op.f("ix_output_parameters_output_parameter_id"), table_name="output_parameters")
|
||||
op.drop_table("output_parameters")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
"""Create bitwarden credential parameter table
|
||||
|
||||
Revision ID: 4630ab8c198e
|
||||
Revises: ffe2f57bd288
|
||||
Create Date: 2024-04-03 22:57:03.231654+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "4630ab8c198e"
|
||||
down_revision: Union[str, None] = "ffe2f57bd288"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"bitwarden_login_credential_parameters",
|
||||
sa.Column("bitwarden_login_credential_parameter_id", sa.String(), nullable=False),
|
||||
sa.Column("workflow_id", sa.String(), nullable=False),
|
||||
sa.Column("key", sa.String(), nullable=False),
|
||||
sa.Column("description", sa.String(), nullable=True),
|
||||
sa.Column("bitwarden_client_id_aws_secret_key", sa.String(), nullable=False),
|
||||
sa.Column("bitwarden_client_secret_aws_secret_key", sa.String(), nullable=False),
|
||||
sa.Column("bitwarden_master_password_aws_secret_key", sa.String(), nullable=False),
|
||||
sa.Column("url_parameter_key", sa.String(), nullable=False),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("modified_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("deleted_at", sa.DateTime(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["workflow_id"],
|
||||
["workflows.workflow_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("bitwarden_login_credential_parameter_id"),
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_bitwarden_login_credential_parameters_bitwarden_login_credential_parameter_id"),
|
||||
"bitwarden_login_credential_parameters",
|
||||
["bitwarden_login_credential_parameter_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_bitwarden_login_credential_parameters_workflow_id"),
|
||||
"bitwarden_login_credential_parameters",
|
||||
["workflow_id"],
|
||||
unique=False,
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(
|
||||
op.f("ix_bitwarden_login_credential_parameters_workflow_id"),
|
||||
table_name="bitwarden_login_credential_parameters",
|
||||
)
|
||||
op.drop_index(
|
||||
op.f("ix_bitwarden_login_credential_parameters_bitwarden_login_credential_parameter_id"),
|
||||
table_name="bitwarden_login_credential_parameters",
|
||||
)
|
||||
op.drop_table("bitwarden_login_credential_parameters")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
"""Add orgs.max_retries_per_step
|
||||
|
||||
Revision ID: ea8e24d0bc8e
|
||||
Revises: 4630ab8c198e
|
||||
Create Date: 2024-04-08 23:47:46.306300+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "ea8e24d0bc8e"
|
||||
down_revision: Union[str, None] = "4630ab8c198e"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("organizations", sa.Column("max_retries_per_step", sa.Integer(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("organizations", "max_retries_per_step")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
"""Add new indices to tasks table
|
||||
|
||||
Revision ID: 8335d7fecef9
|
||||
Revises: ea8e24d0bc8e
|
||||
Create Date: 2024-04-09 00:58:53.060477+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "8335d7fecef9"
|
||||
down_revision: Union[str, None] = "ea8e24d0bc8e"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_index(op.f("ix_tasks_created_at"), "tasks", ["created_at"], unique=False)
|
||||
op.create_index(op.f("ix_tasks_modified_at"), "tasks", ["modified_at"], unique=False)
|
||||
op.create_index(op.f("ix_tasks_status"), "tasks", ["status"], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f("ix_tasks_status"), table_name="tasks")
|
||||
op.drop_index(op.f("ix_tasks_modified_at"), table_name="tasks")
|
||||
op.drop_index(op.f("ix_tasks_created_at"), table_name="tasks")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
"""add domain to organizations table
|
||||
|
||||
Revision ID: 24303f1669a7
|
||||
Revises: 8335d7fecef9
|
||||
Create Date: 2024-04-23 21:53:45.475199+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "24303f1669a7"
|
||||
down_revision: Union[str, None] = "8335d7fecef9"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("organizations", sa.Column("domain", sa.String(), nullable=True))
|
||||
op.create_index(op.f("ix_organizations_domain"), "organizations", ["domain"], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f("ix_organizations_domain"), table_name="organizations")
|
||||
op.drop_column("organizations", "domain")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
"""Add org_task_step_index
|
||||
|
||||
Revision ID: 68d78072fdb5
|
||||
Revises: 24303f1669a7
|
||||
Create Date: 2024-04-28 23:20:28.953686+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "68d78072fdb5"
|
||||
down_revision: Union[str, None] = "24303f1669a7"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_index(
|
||||
"org_task_step_index",
|
||||
"artifacts",
|
||||
["organization_id", "task_id", "step_id"],
|
||||
unique=False,
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index("org_task_step_index", table_name="artifacts")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
"""Add org_task_index for steps table
|
||||
|
||||
Revision ID: c4dca14a5e69
|
||||
Revises: 68d78072fdb5
|
||||
Create Date: 2024-05-05 02:49:34.719311+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "c4dca14a5e69"
|
||||
down_revision: Union[str, None] = "68d78072fdb5"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_index("org_task_index", "steps", ["organization_id", "task_id"], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index("org_task_index", table_name="steps")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
"""add max_steps_per_run to task
|
||||
|
||||
Revision ID: 8792454ce498
|
||||
Revises: c4dca14a5e69
|
||||
Create Date: 2024-05-11 21:04:38.384261+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "8792454ce498"
|
||||
down_revision: Union[str, None] = "c4dca14a5e69"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("tasks", sa.Column("max_steps_per_run", sa.Integer(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("tasks", "max_steps_per_run")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
"""Add workflow_permanent_id and version to workflows table
|
||||
|
||||
Revision ID: bf561125112f
|
||||
Revises: 8792454ce498
|
||||
Create Date: 2024-05-14 01:14:15.024575+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "bf561125112f"
|
||||
down_revision: Union[str, None] = "8792454ce498"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("workflows", sa.Column("workflow_permanent_id", sa.String(), nullable=True))
|
||||
op.add_column("workflows", sa.Column("version", sa.Integer(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("workflows", "version")
|
||||
op.drop_column("workflows", "workflow_permanent_id")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
"""Add workflow_permanent_id constraint and index to workflows table
|
||||
|
||||
Revision ID: baec12642d77
|
||||
Revises: bf561125112f
|
||||
Create Date: 2024-05-14 02:45:11.284376+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "baec12642d77"
|
||||
down_revision: Union[str, None] = "bf561125112f"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.alter_column("workflows", "workflow_permanent_id", existing_type=sa.VARCHAR(), nullable=False)
|
||||
op.alter_column("workflows", "version", existing_type=sa.INTEGER(), nullable=False)
|
||||
op.create_index(
|
||||
op.f("ix_workflows_workflow_permanent_id"),
|
||||
"workflows",
|
||||
["workflow_permanent_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(
|
||||
"permanent_id_version_idx",
|
||||
"workflows",
|
||||
["workflow_permanent_id", "version"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_unique_constraint(
|
||||
"uc_org_permanent_id_version",
|
||||
"workflows",
|
||||
["organization_id", "workflow_permanent_id", "version"],
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_constraint("uc_org_permanent_id_version", "workflows", type_="unique")
|
||||
op.drop_index("permanent_id_version_idx", table_name="workflows")
|
||||
op.drop_index(op.f("ix_workflows_workflow_permanent_id"), table_name="workflows")
|
||||
op.alter_column("workflows", "version", existing_type=sa.INTEGER(), nullable=True)
|
||||
op.alter_column("workflows", "workflow_permanent_id", existing_type=sa.VARCHAR(), nullable=True)
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
"""add proxy_location and webhook_callback_url to workflows table
|
||||
|
||||
Revision ID: 04bf06540db6
|
||||
Revises: baec12642d77
|
||||
Create Date: 2024-05-16 17:29:55.083124+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "04bf06540db6"
|
||||
down_revision: Union[str, None] = "baec12642d77"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column(
|
||||
"workflows",
|
||||
sa.Column(
|
||||
"proxy_location",
|
||||
sa.Enum(
|
||||
"US_CA",
|
||||
"US_NY",
|
||||
"US_TX",
|
||||
"US_FL",
|
||||
"US_WA",
|
||||
"RESIDENTIAL",
|
||||
"RESIDENTIAL_ES",
|
||||
"NONE",
|
||||
name="proxylocation",
|
||||
),
|
||||
nullable=True,
|
||||
),
|
||||
)
|
||||
op.add_column("workflows", sa.Column("webhook_callback_url", sa.String(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("workflows", "webhook_callback_url")
|
||||
op.drop_column("workflows", "proxy_location")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
"""add task_generations table
|
||||
|
||||
Revision ID: 312d305c6b18
|
||||
Revises: 04bf06540db6
|
||||
Create Date: 2024-06-07 22:57:18.228793+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "312d305c6b18"
|
||||
down_revision: Union[str, None] = "04bf06540db6"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"task_generations",
|
||||
sa.Column("task_generation_id", sa.String(), nullable=False),
|
||||
sa.Column("organization_id", sa.String(), nullable=False),
|
||||
sa.Column("user_prompt", sa.String(), nullable=False),
|
||||
sa.Column("url", sa.String(), nullable=True),
|
||||
sa.Column("navigation_goal", sa.String(), nullable=True),
|
||||
sa.Column("navigation_payload", sa.JSON(), nullable=True),
|
||||
sa.Column("data_extraction_goal", sa.String(), nullable=True),
|
||||
sa.Column("extracted_information_schema", sa.JSON(), nullable=True),
|
||||
sa.Column("llm", sa.String(), nullable=True),
|
||||
sa.Column("llm_prompt", sa.String(), nullable=True),
|
||||
sa.Column("llm_response", sa.String(), nullable=True),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("modified_at", sa.DateTime(), nullable=False),
|
||||
sa.ForeignKeyConstraint(
|
||||
["organization_id"],
|
||||
["organizations.organization_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("task_generation_id"),
|
||||
)
|
||||
op.create_index(op.f("ix_task_generations_user_prompt"), "task_generations", ["user_prompt"], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f("ix_task_generations_user_prompt"), table_name="task_generations")
|
||||
op.drop_table("task_generations")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
"""Add collection id to bitwarden credential parameters
|
||||
|
||||
Revision ID: 2c163e606a3d
|
||||
Revises: 312d305c6b18
|
||||
Create Date: 2024-06-11 05:02:25.023252+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "2c163e606a3d"
|
||||
down_revision: Union[str, None] = "312d305c6b18"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column(
|
||||
"bitwarden_login_credential_parameters", sa.Column("bitwarden_collection_id", sa.String(), nullable=True)
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("bitwarden_login_credential_parameters", "bitwarden_collection_id")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
"""Add is_saved_task to workflows
|
||||
|
||||
Revision ID: 485667adef01
|
||||
Revises: 2c163e606a3d
|
||||
Create Date: 2024-06-27 19:49:41.506447+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "485667adef01"
|
||||
down_revision: Union[str, None] = "2c163e606a3d"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("workflows", sa.Column("is_saved_task", sa.Boolean(), server_default=sa.false(), nullable=False))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("workflows", "is_saved_task")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
"""Add workflow_permanent_id and organization_id to workflow_runs table
|
||||
|
||||
Revision ID: bea545cb21b4
|
||||
Revises: 485667adef01
|
||||
Create Date: 2024-07-09 18:23:03.641136+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "bea545cb21b4"
|
||||
down_revision: Union[str, None] = "485667adef01"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column("workflow_runs", sa.Column("workflow_permanent_id", sa.String(), nullable=True))
|
||||
op.add_column("workflow_runs", sa.Column("organization_id", sa.String(), nullable=True))
|
||||
|
||||
# Backfill the new columns with data from the workflows table
|
||||
connection = op.get_bind()
|
||||
connection.execute(
|
||||
sa.text("""
|
||||
UPDATE workflow_runs wr
|
||||
SET workflow_permanent_id = (
|
||||
SELECT workflow_permanent_id
|
||||
FROM workflows w
|
||||
WHERE w.workflow_id = wr.workflow_id
|
||||
),
|
||||
organization_id = (
|
||||
SELECT organization_id
|
||||
FROM workflows w
|
||||
WHERE w.workflow_id = wr.workflow_id
|
||||
)
|
||||
""")
|
||||
)
|
||||
|
||||
# Now set the columns to be non-nullable
|
||||
op.alter_column("workflow_runs", "workflow_permanent_id", nullable=False)
|
||||
op.alter_column("workflow_runs", "organization_id", nullable=False)
|
||||
|
||||
# Create foreign keys and indices after backfilling
|
||||
op.create_foreign_key(
|
||||
"fk_workflow_runs_organization_id", "workflow_runs", "organizations", ["organization_id"], ["organization_id"]
|
||||
)
|
||||
op.create_index("ix_workflow_runs_organization_id", "workflow_runs", ["organization_id"], unique=False)
|
||||
op.create_index("ix_workflow_runs_workflow_permanent_id", "workflow_runs", ["workflow_permanent_id"], unique=False)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_constraint("fk_workflow_runs_organization_id", "workflow_runs", type_="foreignkey")
|
||||
op.drop_column("workflow_runs", "organization_id")
|
||||
op.drop_column("workflow_runs", "workflow_permanent_id")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
"""Create bitwarden identity parameter table
|
||||
|
||||
Revision ID: ac679ea03578
|
||||
Revises: bea545cb21b4
|
||||
Create Date: 2024-07-11 16:44:54.145819+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "ac679ea03578"
|
||||
down_revision: Union[str, None] = "bea545cb21b4"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"bitwarden_sensitive_information_parameters",
|
||||
sa.Column("bitwarden_sensitive_information_parameter_id", sa.String(), nullable=False),
|
||||
sa.Column("workflow_id", sa.String(), nullable=False),
|
||||
sa.Column("key", sa.String(), nullable=False),
|
||||
sa.Column("description", sa.String(), nullable=True),
|
||||
sa.Column("bitwarden_client_id_aws_secret_key", sa.String(), nullable=False),
|
||||
sa.Column("bitwarden_client_secret_aws_secret_key", sa.String(), nullable=False),
|
||||
sa.Column("bitwarden_master_password_aws_secret_key", sa.String(), nullable=False),
|
||||
sa.Column("bitwarden_collection_id", sa.String(), nullable=False),
|
||||
sa.Column("bitwarden_identity_key", sa.String(), nullable=False),
|
||||
sa.Column("bitwarden_identity_fields", sa.JSON(), nullable=False),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("modified_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("deleted_at", sa.DateTime(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["workflow_id"],
|
||||
["workflows.workflow_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("bitwarden_sensitive_information_parameter_id"),
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_bitwarden_sensitive_information_parameters_bitwarden_sensitive_information_parameter_id"),
|
||||
"bitwarden_sensitive_information_parameters",
|
||||
["bitwarden_sensitive_information_parameter_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_bitwarden_sensitive_information_parameters_workflow_id"),
|
||||
"bitwarden_sensitive_information_parameters",
|
||||
["workflow_id"],
|
||||
unique=False,
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(
|
||||
op.f("ix_bitwarden_sensitive_information_parameters_workflow_id"),
|
||||
table_name="bitwarden_sensitive_information_parameters",
|
||||
)
|
||||
op.drop_index(
|
||||
op.f("ix_bitwarden_sensitive_information_parameters_bitwarden_sensitive_information_parameter_id"),
|
||||
table_name="bitwarden_sensitive_information_parameters",
|
||||
)
|
||||
op.drop_table("bitwarden_sensitive_information_parameters")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
"""add totp_verification_url to tasks, workflows and workflow_runs tables
|
||||
|
||||
Revision ID: 370cb81c73e7
|
||||
Revises: ac679ea03578
|
||||
Create Date: 2024-07-12 03:21:27.128748+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "370cb81c73e7"
|
||||
down_revision: Union[str, None] = "ac679ea03578"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("tasks", sa.Column("totp_verification_url", sa.String(), nullable=True))
|
||||
op.add_column("workflow_runs", sa.Column("totp_verification_url", sa.String(), nullable=True))
|
||||
op.add_column("workflows", sa.Column("totp_verification_url", sa.String(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("workflows", "totp_verification_url")
|
||||
op.drop_column("workflow_runs", "totp_verification_url")
|
||||
op.drop_column("tasks", "totp_verification_url")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
"""add step_id index to artifacts table
|
||||
|
||||
Revision ID: 94bc3829eed6
|
||||
Revises: 370cb81c73e7
|
||||
Create Date: 2024-07-17 22:27:30.734057+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "94bc3829eed6"
|
||||
down_revision: Union[str, None] = "370cb81c73e7"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_index(op.f("ix_artifacts_step_id"), "artifacts", ["step_id"], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f("ix_artifacts_step_id"), table_name="artifacts")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
"""Add RESIDENTIAL_IE to ProxyLocation enum
|
||||
|
||||
Revision ID: c5ed5a3a14eb
|
||||
Revises: 94bc3829eed6
|
||||
Create Date: 2024-07-31 09:32:03.548241+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "c5ed5a3a14eb"
|
||||
down_revision: Union[str, None] = "94bc3829eed6"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.execute("ALTER TYPE proxylocation ADD VALUE 'RESIDENTIAL_IE'")
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
"""Add GB proxy
|
||||
|
||||
Revision ID: 8f237f00faeb
|
||||
Revises: c5ed5a3a14eb
|
||||
Create Date: 2024-08-06 15:15:15.369986+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "8f237f00faeb"
|
||||
down_revision: Union[str, None] = "c5ed5a3a14eb"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.execute("ALTER TYPE proxylocation ADD VALUE 'RESIDENTIAL_GB'")
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
pass
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
"""Add suggested_title to task_generations table
|
||||
|
||||
Revision ID: 6de11b2be7c8
|
||||
Revises: 8f237f00faeb
|
||||
Create Date: 2024-08-23 20:12:13.426060+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "6de11b2be7c8"
|
||||
down_revision: Union[str, None] = "8f237f00faeb"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("task_generations", sa.Column("suggested_title", sa.String(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("task_generations", "suggested_title")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
"""update task_generation table - use user_prompt_hash as the index of a user prompt
|
||||
|
||||
Revision ID: 0de9150bc624
|
||||
Revises: 6de11b2be7c8
|
||||
Create Date: 2024-09-03 03:56:58.352307+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "0de9150bc624"
|
||||
down_revision: Union[str, None] = "6de11b2be7c8"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("task_generations", sa.Column("user_prompt_hash", sa.String(), nullable=True))
|
||||
op.add_column("task_generations", sa.Column("source_task_generation_id", sa.String(), nullable=True))
|
||||
op.drop_index("ix_task_generations_user_prompt", table_name="task_generations")
|
||||
op.create_index(
|
||||
op.f("ix_task_generations_source_task_generation_id"),
|
||||
"task_generations",
|
||||
["source_task_generation_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_task_generations_user_prompt_hash"), "task_generations", ["user_prompt_hash"], unique=False
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f("ix_task_generations_user_prompt_hash"), table_name="task_generations")
|
||||
op.drop_index(op.f("ix_task_generations_source_task_generation_id"), table_name="task_generations")
|
||||
op.create_index("ix_task_generations_user_prompt", "task_generations", ["user_prompt"], unique=False)
|
||||
op.drop_column("task_generations", "source_task_generation_id")
|
||||
op.drop_column("task_generations", "user_prompt_hash")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
"""Add persist_browser_session flag to workflows
|
||||
|
||||
Revision ID: c50f0aa0ef24
|
||||
Revises: 0de9150bc624
|
||||
Create Date: 2024-09-06 18:42:42.677573+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "c50f0aa0ef24"
|
||||
down_revision: Union[str, None] = "0de9150bc624"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("workflows", sa.Column("persist_browser_session", sa.Boolean(), nullable=True))
|
||||
op.execute("UPDATE workflows SET persist_browser_session = False WHERE persist_browser_session IS NULL")
|
||||
op.alter_column("workflows", "persist_browser_session", nullable=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("workflows", "persist_browser_session")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
"""create totp_codes table and add task.totp_identifier
|
||||
|
||||
Revision ID: c5848cc524b1
|
||||
Revises: c50f0aa0ef24
|
||||
Create Date: 2024-09-08 21:59:56.666276+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "c5848cc524b1"
|
||||
down_revision: Union[str, None] = "c50f0aa0ef24"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"totp_codes",
|
||||
sa.Column("totp_code_id", sa.String(), nullable=False),
|
||||
sa.Column("totp_identifier", sa.String(), nullable=False),
|
||||
sa.Column("organization_id", sa.String(), nullable=True),
|
||||
sa.Column("task_id", sa.String(), nullable=True),
|
||||
sa.Column("workflow_id", sa.String(), nullable=True),
|
||||
sa.Column("content", sa.String(), nullable=False),
|
||||
sa.Column("code", sa.String(), nullable=False),
|
||||
sa.Column("source", sa.String(), nullable=True),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("modified_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("expired_at", sa.DateTime(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["organization_id"],
|
||||
["organizations.organization_id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["task_id"],
|
||||
["tasks.task_id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["workflow_id"],
|
||||
["workflows.workflow_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("totp_code_id"),
|
||||
)
|
||||
op.create_index(op.f("ix_totp_codes_created_at"), "totp_codes", ["created_at"], unique=False)
|
||||
op.create_index(op.f("ix_totp_codes_expired_at"), "totp_codes", ["expired_at"], unique=False)
|
||||
op.create_index(op.f("ix_totp_codes_totp_identifier"), "totp_codes", ["totp_identifier"], unique=False)
|
||||
op.add_column("tasks", sa.Column("totp_identifier", sa.String(), nullable=True))
|
||||
op.add_column("workflow_runs", sa.Column("totp_identifier", sa.String(), nullable=True))
|
||||
op.add_column("workflows", sa.Column("totp_identifier", sa.String(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("workflows", "totp_identifier")
|
||||
op.drop_column("workflow_runs", "totp_identifier")
|
||||
op.drop_column("tasks", "totp_identifier")
|
||||
op.drop_index(op.f("ix_totp_codes_totp_identifier"), table_name="totp_codes")
|
||||
op.drop_index(op.f("ix_totp_codes_expired_at"), table_name="totp_codes")
|
||||
op.drop_index(op.f("ix_totp_codes_created_at"), table_name="totp_codes")
|
||||
op.drop_table("totp_codes")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
"""Add bitwarden details to organizations
|
||||
|
||||
Revision ID: 6c90d565076b
|
||||
Revises: c5848cc524b1
|
||||
Create Date: 2024-10-02 22:12:34.959165+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "6c90d565076b"
|
||||
down_revision: Union[str, None] = "c5848cc524b1"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("organizations", sa.Column("bw_organization_id", sa.String(), nullable=True))
|
||||
op.add_column("organizations", sa.Column("bw_collection_ids", sa.JSON(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("organizations", "bw_collection_ids")
|
||||
op.drop_column("organizations", "bw_organization_id")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
"""create bitwarden_credit_card_data_parameters table
|
||||
|
||||
Revision ID: a575628e1965
|
||||
Revises: 6c90d565076b
|
||||
Create Date: 2024-10-03 23:01:05.810580+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "a575628e1965"
|
||||
down_revision: Union[str, None] = "6c90d565076b"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"bitwarden_credit_card_data_parameters",
|
||||
sa.Column("bitwarden_credit_card_data_parameter_id", sa.String(), nullable=False),
|
||||
sa.Column("workflow_id", sa.String(), nullable=False),
|
||||
sa.Column("key", sa.String(), nullable=False),
|
||||
sa.Column("description", sa.String(), nullable=True),
|
||||
sa.Column("bitwarden_client_id_aws_secret_key", sa.String(), nullable=False),
|
||||
sa.Column("bitwarden_client_secret_aws_secret_key", sa.String(), nullable=False),
|
||||
sa.Column("bitwarden_master_password_aws_secret_key", sa.String(), nullable=False),
|
||||
sa.Column("bitwarden_collection_id", sa.String(), nullable=False),
|
||||
sa.Column("bitwarden_item_id", sa.String(), nullable=False),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("modified_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("deleted_at", sa.DateTime(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["workflow_id"],
|
||||
["workflows.workflow_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("bitwarden_credit_card_data_parameter_id"),
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_bitwarden_credit_card_data_parameters_bitwarden_credit_card_data_parameter_id"),
|
||||
"bitwarden_credit_card_data_parameters",
|
||||
["bitwarden_credit_card_data_parameter_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_bitwarden_credit_card_data_parameters_workflow_id"),
|
||||
"bitwarden_credit_card_data_parameters",
|
||||
["workflow_id"],
|
||||
unique=False,
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(
|
||||
op.f("ix_bitwarden_credit_card_data_parameters_workflow_id"), table_name="bitwarden_credit_card_data_parameters"
|
||||
)
|
||||
op.drop_index(
|
||||
op.f("ix_bitwarden_credit_card_data_parameters_bitwarden_credit_card_data_parameter_id"),
|
||||
table_name="bitwarden_credit_card_data_parameters",
|
||||
)
|
||||
op.drop_table("bitwarden_credit_card_data_parameters")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
"""Add workflow_run_id index to tasks
|
||||
|
||||
Revision ID: 12fb2dede685
|
||||
Revises: a575628e1965
|
||||
Create Date: 2024-10-09 16:52:36.095562+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "12fb2dede685"
|
||||
down_revision: Union[str, None] = "a575628e1965"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_index(op.f("ix_tasks_workflow_run_id"), "tasks", ["workflow_run_id"], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f("ix_tasks_workflow_run_id"), table_name="tasks")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
"""actions table
|
||||
|
||||
Revision ID: 137eee1d3b3e
|
||||
Revises: 12fb2dede685
|
||||
Create Date: 2024-10-15 19:03:29.086340+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "137eee1d3b3e"
|
||||
down_revision: Union[str, None] = "12fb2dede685"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"actions",
|
||||
sa.Column("action_id", sa.String(), nullable=False),
|
||||
sa.Column("action_type", sa.String(), nullable=False),
|
||||
sa.Column("source_action_id", sa.String(), nullable=True),
|
||||
sa.Column("organization_id", sa.String(), nullable=True),
|
||||
sa.Column("workflow_run_id", sa.String(), nullable=True),
|
||||
sa.Column("task_id", sa.String(), nullable=False),
|
||||
sa.Column("step_id", sa.String(), nullable=False),
|
||||
sa.Column("step_order", sa.Integer(), nullable=False),
|
||||
sa.Column("action_order", sa.Integer(), nullable=False),
|
||||
sa.Column("status", sa.String(), nullable=False),
|
||||
sa.Column("reasoning", sa.String(), nullable=True),
|
||||
sa.Column("intention", sa.String(), nullable=True),
|
||||
sa.Column("response", sa.String(), nullable=True),
|
||||
sa.Column("element_id", sa.String(), nullable=True),
|
||||
sa.Column("skyvern_element_hash", sa.String(), nullable=True),
|
||||
sa.Column("skyvern_element_data", sa.JSON(), nullable=True),
|
||||
sa.Column("action_json", sa.JSON(), nullable=True),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("modified_at", sa.DateTime(), nullable=False),
|
||||
sa.ForeignKeyConstraint(
|
||||
["organization_id"],
|
||||
["organizations.organization_id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["source_action_id"],
|
||||
["actions.action_id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["step_id"],
|
||||
["steps.step_id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["task_id"],
|
||||
["tasks.task_id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["workflow_run_id"],
|
||||
["workflow_runs.workflow_run_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("action_id"),
|
||||
)
|
||||
op.create_index("action_org_task_step_index", "actions", ["organization_id", "task_id", "step_id"], unique=False)
|
||||
op.create_index(op.f("ix_actions_action_id"), "actions", ["action_id"], unique=False)
|
||||
op.create_index(op.f("ix_actions_source_action_id"), "actions", ["source_action_id"], unique=False)
|
||||
op.create_index(op.f("ix_actions_task_id"), "actions", ["task_id"], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f("ix_actions_task_id"), table_name="actions")
|
||||
op.drop_index(op.f("ix_actions_source_action_id"), table_name="actions")
|
||||
op.drop_index(op.f("ix_actions_action_id"), table_name="actions")
|
||||
op.drop_index("action_org_task_step_index", table_name="actions")
|
||||
op.drop_table("actions")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
"""add actions.confidence_float
|
||||
|
||||
Revision ID: 2873c5c8c41e
|
||||
Revises: 137eee1d3b3e
|
||||
Create Date: 2024-10-18 20:03:10.612242+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "2873c5c8c41e"
|
||||
down_revision: Union[str, None] = "137eee1d3b3e"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("actions", sa.Column("confidence_float", sa.Numeric(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("actions", "confidence_float")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
"""Add IN and JP proxylocation
|
||||
|
||||
Revision ID: b8f9e09e181d
|
||||
Revises: 2873c5c8c41e
|
||||
Create Date: 2024-11-04 19:14:36.603689+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "b8f9e09e181d"
|
||||
down_revision: Union[str, None] = "2873c5c8c41e"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.execute("ALTER TYPE proxylocation ADD VALUE 'RESIDENTIAL_IN'")
|
||||
op.execute("ALTER TYPE proxylocation ADD VALUE 'RESIDENTIAL_JP'")
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
"""Add failure_reason column to workflow_runs
|
||||
|
||||
Revision ID: 1909715536dc
|
||||
Revises: b8f9e09e181d
|
||||
Create Date: 2024-11-15 02:51:33.553177+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "1909715536dc"
|
||||
down_revision: Union[str, None] = "b8f9e09e181d"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("workflow_runs", sa.Column("failure_reason", sa.String(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("workflow_runs", "failure_reason")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
"""Add task prompt template, complete criterion and complete criterion
|
||||
|
||||
Revision ID: 2d79d5fc1baa
|
||||
Revises: 1909715536dc
|
||||
Create Date: 2024-11-21 07:08:19.177274+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "2d79d5fc1baa"
|
||||
down_revision: Union[str, None] = "1909715536dc"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("tasks", sa.Column("prompt_template", sa.String(), nullable=True))
|
||||
op.add_column("tasks", sa.Column("complete_criterion", sa.String(), nullable=True))
|
||||
op.add_column("tasks", sa.Column("terminate_criterion", sa.String(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("tasks", "terminate_criterion")
|
||||
op.drop_column("tasks", "complete_criterion")
|
||||
op.drop_column("tasks", "prompt_template")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
"""use task type instead of prompt template
|
||||
|
||||
Revision ID: 56085e451bec
|
||||
Revises: 2d79d5fc1baa
|
||||
Create Date: 2024-11-26 03:22:11.224805+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "56085e451bec"
|
||||
down_revision: Union[str, None] = "2d79d5fc1baa"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("tasks", sa.Column("task_type", sa.String(), nullable=True))
|
||||
op.drop_column("tasks", "prompt_template")
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("tasks", sa.Column("prompt_template", sa.VARCHAR(), autoincrement=False, nullable=True))
|
||||
op.drop_column("tasks", "task_type")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
"""Add application column to tasks
|
||||
|
||||
Revision ID: a5feab7712fe
|
||||
Revises: 56085e451bec
|
||||
Create Date: 2024-11-29 13:32:58.845703+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "a5feab7712fe"
|
||||
down_revision: Union[str, None] = "56085e451bec"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column("tasks", sa.Column("application", sa.String(), nullable=True))
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_column("tasks", "application")
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
"""steps DB change: add created_at index
|
||||
|
||||
Revision ID: db41106b9f1a
|
||||
Revises: a5feab7712fe
|
||||
Create Date: 2024-12-02 16:09:57.679626+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "db41106b9f1a"
|
||||
down_revision: Union[str, None] = "a5feab7712fe"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_index("created_at_org_index", "steps", ["created_at", "organization_id"], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index("created_at_org_index", table_name="steps")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
"""Introduce workflow_run_blocks
|
||||
|
||||
Revision ID: de0254717601
|
||||
Revises: db41106b9f1a
|
||||
Create Date: 2024-12-06 01:13:07.932965+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "de0254717601"
|
||||
down_revision: Union[str, None] = "db41106b9f1a"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"workflow_run_blocks",
|
||||
sa.Column("workflow_run_block_id", sa.String(), nullable=False),
|
||||
sa.Column("workflow_run_id", sa.String(), nullable=False),
|
||||
sa.Column("parent_workflow_run_block_id", sa.String(), nullable=True),
|
||||
sa.Column("organization_id", sa.String(), nullable=True),
|
||||
sa.Column("task_id", sa.String(), nullable=True),
|
||||
sa.Column("label", sa.String(), nullable=True),
|
||||
sa.Column("block_type", sa.String(), nullable=False),
|
||||
sa.Column("status", sa.String(), nullable=False),
|
||||
sa.Column("output", sa.JSON(), nullable=True),
|
||||
sa.Column("continue_on_failure", sa.Boolean(), nullable=False),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("modified_at", sa.DateTime(), nullable=False),
|
||||
sa.ForeignKeyConstraint(
|
||||
["organization_id"],
|
||||
["organizations.organization_id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["parent_workflow_run_block_id"],
|
||||
["workflow_run_blocks.workflow_run_block_id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["task_id"],
|
||||
["tasks.task_id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["workflow_run_id"],
|
||||
["workflow_runs.workflow_run_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("workflow_run_block_id"),
|
||||
)
|
||||
op.create_index("wfrb_org_wfr_index", "workflow_run_blocks", ["organization_id", "workflow_run_id"], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index("wfrb_org_wfr_index", table_name="workflow_run_blocks")
|
||||
op.drop_table("workflow_run_blocks")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
"""Introduce ObserverCruise and ObserverThought. Add workflow_run_block_id and observer_cruise_id to artifacts
|
||||
|
||||
Revision ID: 4d51ed4719d5
|
||||
Revises: de0254717601
|
||||
Create Date: 2024-12-06 08:52:52.111448+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "4d51ed4719d5"
|
||||
down_revision: Union[str, None] = "de0254717601"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"observer_cruises",
|
||||
sa.Column("observer_cruise_id", sa.String(), nullable=False),
|
||||
sa.Column("status", sa.String(), nullable=False),
|
||||
sa.Column("organization_id", sa.String(), nullable=True),
|
||||
sa.Column("workflow_run_id", sa.String(), nullable=True),
|
||||
sa.Column("workflow_id", sa.String(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["organization_id"],
|
||||
["organizations.organization_id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["workflow_id"],
|
||||
["workflows.workflow_id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["workflow_run_id"],
|
||||
["workflow_runs.workflow_run_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("observer_cruise_id"),
|
||||
)
|
||||
op.create_table(
|
||||
"observer_thoughts",
|
||||
sa.Column("observer_thought_id", sa.String(), nullable=False),
|
||||
sa.Column("organization_id", sa.String(), nullable=True),
|
||||
sa.Column("observer_cruise_id", sa.String(), nullable=False),
|
||||
sa.Column("workflow_run_id", sa.String(), nullable=True),
|
||||
sa.Column("workflow_run_block_id", sa.String(), nullable=True),
|
||||
sa.Column("workflow_id", sa.String(), nullable=True),
|
||||
sa.Column("thought", sa.String(), nullable=True),
|
||||
sa.Column("answer", sa.String(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["observer_cruise_id"],
|
||||
["observer_cruises.observer_cruise_id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["organization_id"],
|
||||
["organizations.organization_id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["workflow_id"],
|
||||
["workflows.workflow_id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["workflow_run_block_id"],
|
||||
["workflow_run_blocks.workflow_run_block_id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["workflow_run_id"],
|
||||
["workflow_runs.workflow_run_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("observer_thought_id"),
|
||||
)
|
||||
op.add_column("artifacts", sa.Column("workflow_run_id", sa.String(), nullable=True))
|
||||
op.add_column("artifacts", sa.Column("workflow_run_block_id", sa.String(), nullable=True))
|
||||
op.add_column("artifacts", sa.Column("observer_cruise_id", sa.String(), nullable=True))
|
||||
op.create_index("org_workflow_run_index", "artifacts", ["organization_id", "workflow_run_id"], unique=False)
|
||||
op.create_foreign_key(
|
||||
"artifacts_workflow_run_block_id_fkey",
|
||||
"artifacts",
|
||||
"workflow_run_blocks",
|
||||
["workflow_run_block_id"],
|
||||
["workflow_run_block_id"],
|
||||
)
|
||||
op.create_foreign_key(
|
||||
"artifacts_observer_cruise_id_fkey",
|
||||
"artifacts",
|
||||
"observer_cruises",
|
||||
["observer_cruise_id"],
|
||||
["observer_cruise_id"],
|
||||
)
|
||||
op.create_foreign_key(
|
||||
"artifacts_workflow_run_id_fkey", "artifacts", "workflow_runs", ["workflow_run_id"], ["workflow_run_id"]
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_constraint("artifacts_workflow_run_block_id_fkey", "artifacts", type_="foreignkey")
|
||||
op.drop_constraint("artifacts_observer_cruise_id_fkey", "artifacts", type_="foreignkey")
|
||||
op.drop_constraint("artifacts_workflow_run_id_fkey", "artifacts", type_="foreignkey")
|
||||
op.drop_index("org_workflow_run_index", table_name="artifacts")
|
||||
op.drop_column("artifacts", "observer_cruise_id")
|
||||
op.drop_column("artifacts", "workflow_run_block_id")
|
||||
op.drop_column("artifacts", "workflow_run_id")
|
||||
op.drop_table("observer_thoughts")
|
||||
op.drop_table("observer_cruises")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
"""Add observer_thought_id column to artifacts table. Add user_input, observation to ObserverThoughts
|
||||
|
||||
Revision ID: fe49b59d836c
|
||||
Revises: 4d51ed4719d5
|
||||
Create Date: 2024-12-06 18:19:23.286827+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "fe49b59d836c"
|
||||
down_revision: Union[str, None] = "4d51ed4719d5"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("artifacts", sa.Column("observer_thought_id", sa.String(), nullable=True))
|
||||
op.create_foreign_key(
|
||||
"artifacts_observer_thought_id_fkey",
|
||||
"artifacts",
|
||||
"observer_thoughts",
|
||||
["observer_thought_id"],
|
||||
["observer_thought_id"],
|
||||
)
|
||||
op.add_column("observer_thoughts", sa.Column("user_input", sa.UnicodeText(), nullable=True))
|
||||
op.add_column("observer_thoughts", sa.Column("observation", sa.String(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("observer_thoughts", "observation")
|
||||
op.drop_column("observer_thoughts", "user_input")
|
||||
op.drop_constraint("artifacts_observer_thought_id_fkey", "artifacts", type_="foreignkey")
|
||||
op.drop_column("artifacts", "observer_thought_id")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
"""drop all the foreign keys on artifacts table except for orgnaization_id
|
||||
|
||||
Revision ID: 8069e38dc1b4
|
||||
Revises: fe49b59d836c
|
||||
Create Date: 2024-12-08 01:31:56.328245+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "8069e38dc1b4"
|
||||
down_revision: Union[str, None] = "fe49b59d836c"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_index("org_observer_cruise_index", "artifacts", ["organization_id", "observer_cruise_id"], unique=False)
|
||||
op.drop_constraint("artifacts_workflow_run_id_fkey", "artifacts", type_="foreignkey")
|
||||
op.drop_constraint("artifacts_observer_cruise_id_fkey", "artifacts", type_="foreignkey")
|
||||
op.drop_constraint("artifacts_observer_thought_id_fkey", "artifacts", type_="foreignkey")
|
||||
op.drop_constraint("artifacts_workflow_run_block_id_fkey", "artifacts", type_="foreignkey")
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_foreign_key(
|
||||
"artifacts_workflow_run_block_id_fkey",
|
||||
"artifacts",
|
||||
"workflow_run_blocks",
|
||||
["workflow_run_block_id"],
|
||||
["workflow_run_block_id"],
|
||||
)
|
||||
op.create_foreign_key(
|
||||
"artifacts_observer_thought_id_fkey",
|
||||
"artifacts",
|
||||
"observer_thoughts",
|
||||
["observer_thought_id"],
|
||||
["observer_thought_id"],
|
||||
)
|
||||
op.create_foreign_key(
|
||||
"artifacts_observer_cruise_id_fkey",
|
||||
"artifacts",
|
||||
"observer_cruises",
|
||||
["observer_cruise_id"],
|
||||
["observer_cruise_id"],
|
||||
)
|
||||
op.create_foreign_key(
|
||||
"artifacts_workflow_run_id_fkey", "artifacts", "workflow_runs", ["workflow_run_id"], ["workflow_run_id"]
|
||||
)
|
||||
op.drop_index("org_observer_cruise_index", table_name="artifacts")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
"""add prompt and url to observer_cruises table
|
||||
|
||||
Revision ID: dc2a8facf0d7
|
||||
Revises: 8069e38dc1b4
|
||||
Create Date: 2024-12-08 05:32:21.240122+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "dc2a8facf0d7"
|
||||
down_revision: Union[str, None] = "8069e38dc1b4"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("observer_cruises", sa.Column("prompt", sa.UnicodeText(), nullable=True))
|
||||
op.add_column("observer_cruises", sa.Column("url", sa.String(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("observer_cruises", "url")
|
||||
op.drop_column("observer_cruises", "prompt")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
"""add created_at and modified_at to observer tables;
|
||||
|
||||
Revision ID: c502ecf908c6
|
||||
Revises: dc2a8facf0d7
|
||||
Create Date: 2024-12-09 00:40:30.098534+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "c502ecf908c6"
|
||||
down_revision: Union[str, None] = "dc2a8facf0d7"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("observer_cruises", sa.Column("created_at", sa.DateTime(), nullable=False))
|
||||
op.add_column("observer_cruises", sa.Column("modified_at", sa.DateTime(), nullable=False))
|
||||
op.add_column("observer_thoughts", sa.Column("created_at", sa.DateTime(), nullable=False))
|
||||
op.add_column("observer_thoughts", sa.Column("modified_at", sa.DateTime(), nullable=False))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("observer_thoughts", "modified_at")
|
||||
op.drop_column("observer_thoughts", "created_at")
|
||||
op.drop_column("observer_cruises", "modified_at")
|
||||
op.drop_column("observer_cruises", "created_at")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
"""add workflow_permanent_id to observer_cruises and observer_thoughts
|
||||
|
||||
Revision ID: 411dd89f3df9
|
||||
Revises: c502ecf908c6
|
||||
Create Date: 2024-12-16 22:20:52.174896+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "411dd89f3df9"
|
||||
down_revision: Union[str, None] = "c502ecf908c6"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("observer_cruises", sa.Column("workflow_permanent_id", sa.String(), nullable=True))
|
||||
op.add_column("observer_thoughts", sa.Column("workflow_permanent_id", sa.String(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("observer_thoughts", "workflow_permanent_id")
|
||||
op.drop_column("observer_cruises", "workflow_permanent_id")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
"""introduce persistent browser sessions
|
||||
|
||||
Revision ID: 282b0548d443
|
||||
Revises: 411dd89f3df9
|
||||
Create Date: 2024-12-17 18:41:30.400052+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "282b0548d443"
|
||||
down_revision: Union[str, None] = "411dd89f3df9"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"persistent_browser_sessions",
|
||||
sa.Column("persistent_browser_session_id", sa.String(), nullable=False),
|
||||
sa.Column("organization_id", sa.String(), nullable=False),
|
||||
sa.Column("runnable_type", sa.String(), nullable=False),
|
||||
sa.Column("runnable_id", sa.String(), nullable=False),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("modified_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("deleted_at", sa.DateTime(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["organization_id"],
|
||||
["organizations.organization_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("persistent_browser_session_id"),
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table("persistent_browser_sessions")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
"""add observer_cruise_index to the observer_thoughts table
|
||||
|
||||
Revision ID: f81d59b4aed5
|
||||
Revises: 282b0548d443
|
||||
Create Date: 2024-12-18 05:37:23.366137+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "f81d59b4aed5"
|
||||
down_revision: Union[str, None] = "282b0548d443"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_index(
|
||||
"observer_cruise_index", "observer_thoughts", ["organization_id", "observer_cruise_id"], unique=False
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index("observer_cruise_index", table_name="observer_thoughts")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
"""add failure_reason to workflow_run_blocks
|
||||
|
||||
Revision ID: 5be249d8dc96
|
||||
Revises: f81d59b4aed5
|
||||
Create Date: 2024-12-20 16:37:55.955910+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "5be249d8dc96"
|
||||
down_revision: Union[str, None] = "f81d59b4aed5"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("workflow_run_blocks", sa.Column("failure_reason", sa.String(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("workflow_run_blocks", "failure_reason")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
"""add current_value, current_index, loop_values to workflow_run_blocks table
|
||||
|
||||
Revision ID: cf3cd8d666b0
|
||||
Revises: 5be249d8dc96
|
||||
Create Date: 2024-12-23 09:07:57.592369+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "cf3cd8d666b0"
|
||||
down_revision: Union[str, None] = "5be249d8dc96"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("workflow_run_blocks", sa.Column("loop_values", sa.JSON(), nullable=True))
|
||||
op.add_column("workflow_run_blocks", sa.Column("current_value", sa.String(), nullable=True))
|
||||
op.add_column("workflow_run_blocks", sa.Column("current_index", sa.Integer(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("workflow_run_blocks", "current_index")
|
||||
op.drop_column("workflow_run_blocks", "current_value")
|
||||
op.drop_column("workflow_run_blocks", "loop_values")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
"""add more columns for different blocks
|
||||
|
||||
Revision ID: 835522a23b19
|
||||
Revises: cf3cd8d666b0
|
||||
Create Date: 2024-12-23 19:41:48.849308+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "835522a23b19"
|
||||
down_revision: Union[str, None] = "cf3cd8d666b0"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_index("oc_org_wfr_index", "observer_cruises", ["organization_id", "workflow_run_id"], unique=False)
|
||||
op.add_column("workflow_run_blocks", sa.Column("recipients", sa.JSON(), nullable=True))
|
||||
op.add_column("workflow_run_blocks", sa.Column("attachments", sa.JSON(), nullable=True))
|
||||
op.add_column("workflow_run_blocks", sa.Column("subject", sa.String(), nullable=True))
|
||||
op.add_column("workflow_run_blocks", sa.Column("body", sa.String(), nullable=True))
|
||||
op.add_column("workflow_run_blocks", sa.Column("prompt", sa.String(), nullable=True))
|
||||
op.add_column("workflow_run_blocks", sa.Column("wait_sec", sa.Integer(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("workflow_run_blocks", "wait_sec")
|
||||
op.drop_column("workflow_run_blocks", "prompt")
|
||||
op.drop_column("workflow_run_blocks", "body")
|
||||
op.drop_column("workflow_run_blocks", "subject")
|
||||
op.drop_column("workflow_run_blocks", "attachments")
|
||||
op.drop_column("workflow_run_blocks", "recipients")
|
||||
op.drop_index("oc_org_wfr_index", table_name="observer_cruises")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
"""new observer thoughts
|
||||
|
||||
Revision ID: d13af1e466fa
|
||||
Revises: 835522a23b19
|
||||
Create Date: 2024-12-27 16:10:36.555540+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "d13af1e466fa"
|
||||
down_revision: Union[str, None] = "835522a23b19"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("observer_thoughts", sa.Column("observer_thought_type", sa.String(), nullable=True))
|
||||
op.add_column("observer_thoughts", sa.Column("observer_thought_scenario", sa.String(), nullable=True))
|
||||
op.add_column("observer_thoughts", sa.Column("output", sa.JSON(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("observer_thoughts", "output")
|
||||
op.drop_column("observer_thoughts", "observer_thought_scenario")
|
||||
op.drop_column("observer_thoughts", "observer_thought_type")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
"""artifacts index - workflow run block id index
|
||||
|
||||
Revision ID: 172cdfb3e2ee
|
||||
Revises: d13af1e466fa
|
||||
Create Date: 2024-12-30 18:16:04.102156+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "172cdfb3e2ee"
|
||||
down_revision: Union[str, None] = "d13af1e466fa"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_index("org_observer_thought_index", "artifacts", ["organization_id", "observer_thought_id"], unique=False)
|
||||
op.create_index("org_wfrb_index", "artifacts", ["organization_id", "workflow_run_block_id"], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index("org_wfrb_index", table_name="artifacts")
|
||||
op.drop_index("org_observer_thought_index", table_name="artifacts")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
"""re-introduce indexes for artifacts
|
||||
|
||||
Revision ID: 521241e64aed
|
||||
Revises: 172cdfb3e2ee
|
||||
Create Date: 2024-12-31 09:36:18.974818+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "521241e64aed"
|
||||
down_revision: Union[str, None] = "172cdfb3e2ee"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index("org_observer_cruise_index", table_name="artifacts")
|
||||
op.drop_index("org_observer_thought_index", table_name="artifacts")
|
||||
op.drop_index("org_wfrb_index", table_name="artifacts")
|
||||
op.drop_index("org_workflow_run_index", table_name="artifacts")
|
||||
op.create_index(op.f("ix_artifacts_observer_cruise_id"), "artifacts", ["observer_cruise_id"], unique=False)
|
||||
op.create_index(op.f("ix_artifacts_observer_thought_id"), "artifacts", ["observer_thought_id"], unique=False)
|
||||
op.create_index(op.f("ix_artifacts_workflow_run_block_id"), "artifacts", ["workflow_run_block_id"], unique=False)
|
||||
op.create_index(op.f("ix_artifacts_workflow_run_id"), "artifacts", ["workflow_run_id"], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f("ix_artifacts_workflow_run_id"), table_name="artifacts")
|
||||
op.drop_index(op.f("ix_artifacts_workflow_run_block_id"), table_name="artifacts")
|
||||
op.drop_index(op.f("ix_artifacts_observer_thought_id"), table_name="artifacts")
|
||||
op.drop_index(op.f("ix_artifacts_observer_cruise_id"), table_name="artifacts")
|
||||
op.create_index("org_workflow_run_index", "artifacts", ["organization_id", "workflow_run_id"], unique=False)
|
||||
op.create_index("org_wfrb_index", "artifacts", ["organization_id", "workflow_run_block_id"], unique=False)
|
||||
op.create_index("org_observer_thought_index", "artifacts", ["organization_id", "observer_thought_id"], unique=False)
|
||||
op.create_index("org_observer_cruise_index", "artifacts", ["organization_id", "observer_cruise_id"], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
"""add description to workflow run block
|
||||
|
||||
Revision ID: 32e2f138f7fd
|
||||
Revises: 521241e64aed
|
||||
Create Date: 2025-01-03 23:49:40.290858+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "32e2f138f7fd"
|
||||
down_revision: Union[str, None] = "521241e64aed"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("workflow_run_blocks", sa.Column("description", sa.String(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("workflow_run_blocks", "description")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
"""make browser session runnable type and id nullable
|
||||
|
||||
Revision ID: d47a586d7036
|
||||
Revises: 32e2f138f7fd
|
||||
Create Date: 2025-01-06 12:14:00.216039+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "d47a586d7036"
|
||||
down_revision: Union[str, None] = "32e2f138f7fd"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("persistent_browser_sessions", sa.Column("browser_id", sa.String(), nullable=True))
|
||||
op.alter_column("persistent_browser_sessions", "runnable_type", existing_type=sa.VARCHAR(), nullable=True)
|
||||
op.alter_column("persistent_browser_sessions", "runnable_id", existing_type=sa.VARCHAR(), nullable=True)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.alter_column("persistent_browser_sessions", "runnable_id", existing_type=sa.VARCHAR(), nullable=False)
|
||||
op.alter_column("persistent_browser_sessions", "runnable_type", existing_type=sa.VARCHAR(), nullable=False)
|
||||
op.drop_column("persistent_browser_sessions", "browser_id")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
"""add ai_suggestions table
|
||||
|
||||
Revision ID: d5640aa644b9
|
||||
Revises: d47a586d7036
|
||||
Create Date: 2025-01-09 05:41:43.872901+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "d5640aa644b9"
|
||||
down_revision: Union[str, None] = "d47a586d7036"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"ai_suggestions",
|
||||
sa.Column("ai_suggestion_id", sa.String(), nullable=False),
|
||||
sa.Column("organization_id", sa.String(), nullable=True),
|
||||
sa.Column("ai_suggestion_type", sa.String(), nullable=True),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("modified_at", sa.DateTime(), nullable=False),
|
||||
sa.ForeignKeyConstraint(
|
||||
["organization_id"],
|
||||
["organizations.organization_id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("ai_suggestion_id"),
|
||||
)
|
||||
op.add_column("artifacts", sa.Column("ai_suggestion_id", sa.String(), nullable=True))
|
||||
op.create_index(op.f("ix_artifacts_ai_suggestion_id"), "artifacts", ["ai_suggestion_id"], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f("ix_artifacts_ai_suggestion_id"), table_name="artifacts")
|
||||
op.drop_column("artifacts", "ai_suggestion_id")
|
||||
op.drop_table("ai_suggestions")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
"""observer summary and output
|
||||
|
||||
Revision ID: 6a947c379c02
|
||||
Revises: d5640aa644b9
|
||||
Create Date: 2025-01-10 22:46:41.757862+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "6a947c379c02"
|
||||
down_revision: Union[str, None] = "d5640aa644b9"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("observer_cruises", sa.Column("summary", sa.String(), nullable=True))
|
||||
op.add_column("observer_cruises", sa.Column("output", sa.JSON(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("observer_cruises", "output")
|
||||
op.drop_column("observer_cruises", "summary")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
"""observer webhook_callback_url, totp_verification_url, totp_identifier, proxy_location
|
||||
|
||||
Revision ID: 46e38fc53f64
|
||||
Revises: 6a947c379c02
|
||||
Create Date: 2025-01-14 16:41:46.037751+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "46e38fc53f64"
|
||||
down_revision: Union[str, None] = "6a947c379c02"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("observer_cruises", sa.Column("webhook_callback_url", sa.String(), nullable=True))
|
||||
op.add_column("observer_cruises", sa.Column("totp_verification_url", sa.String(), nullable=True))
|
||||
op.add_column("observer_cruises", sa.Column("totp_identifier", sa.String(), nullable=True))
|
||||
op.add_column(
|
||||
"observer_cruises",
|
||||
sa.Column(
|
||||
"proxy_location",
|
||||
sa.Enum(
|
||||
"US_CA",
|
||||
"US_NY",
|
||||
"US_TX",
|
||||
"US_FL",
|
||||
"US_WA",
|
||||
"RESIDENTIAL",
|
||||
"RESIDENTIAL_ES",
|
||||
"RESIDENTIAL_IE",
|
||||
"RESIDENTIAL_GB",
|
||||
"RESIDENTIAL_IN",
|
||||
"RESIDENTIAL_JP",
|
||||
"RESIDENTIAL_FR",
|
||||
"NONE",
|
||||
name="proxylocation",
|
||||
),
|
||||
nullable=True,
|
||||
),
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("observer_cruises", "proxy_location")
|
||||
op.drop_column("observer_cruises", "totp_identifier")
|
||||
op.drop_column("observer_cruises", "totp_verification_url")
|
||||
op.drop_column("observer_cruises", "webhook_callback_url")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
"""persistent browser add status and browser address
|
||||
|
||||
Revision ID: 9adef4708ca8
|
||||
Revises: 46e38fc53f64
|
||||
Create Date: 2025-01-15 15:04:38.423921+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "9adef4708ca8"
|
||||
down_revision: Union[str, None] = "46e38fc53f64"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("persistent_browser_sessions", sa.Column("browser_address", sa.String(), nullable=True))
|
||||
op.add_column("persistent_browser_sessions", sa.Column("status", sa.String(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("persistent_browser_sessions", "status")
|
||||
op.drop_column("persistent_browser_sessions", "browser_address")
|
||||
# ### end Alembic commands ###
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
"""Add thought cost, input token count and output token count
|
||||
|
||||
Revision ID: 13e4af5c975c
|
||||
Revises: 9adef4708ca8
|
||||
Create Date: 2025-01-21 23:37:35.122761+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "13e4af5c975c"
|
||||
down_revision: Union[str, None] = "9adef4708ca8"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("observer_thoughts", sa.Column("input_token_count", sa.Integer(), nullable=True))
|
||||
op.add_column("observer_thoughts", sa.Column("output_token_count", sa.Integer(), nullable=True))
|
||||
op.add_column("observer_thoughts", sa.Column("thought_cost", sa.Numeric(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("observer_thoughts", "thought_cost")
|
||||
op.drop_column("observer_thoughts", "output_token_count")
|
||||
op.drop_column("observer_thoughts", "input_token_count")
|
||||
# ### end Alembic commands ###
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue