补齐平台模板与场景 DSL、预算控制、执行看板和企业场景脚本,增强 Windows 启动/迁移与前端代理和聊天会话记忆,修复执行创建阶段 500 与异步链路排障体验。 Made-with: Cursor
31 lines
675 B
Python
31 lines
675 B
Python
"""add agents.budget_config JSON for per-agent budget
|
|
|
|
Revision ID: 008_add_agent_budget_config
|
|
Revises: 007_add_execution_pause_state
|
|
Create Date: 2026-04-08
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
revision = "008_add_agent_budget_config"
|
|
down_revision = "007_add_execution_pause_state"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column(
|
|
"agents",
|
|
sa.Column(
|
|
"budget_config",
|
|
sa.JSON(),
|
|
nullable=True,
|
|
comment="执行预算 max_steps/max_llm_invocations/max_tool_calls 等",
|
|
),
|
|
)
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_column("agents", "budget_config")
|