kubiya-control-plane-api 0.1.0__py3-none-any.whl → 0.3.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of kubiya-control-plane-api might be problematic. Click here for more details.
- control_plane_api/README.md +266 -0
- control_plane_api/__init__.py +0 -0
- control_plane_api/__version__.py +1 -0
- control_plane_api/alembic/README +1 -0
- control_plane_api/alembic/env.py +98 -0
- control_plane_api/alembic/script.py.mako +28 -0
- control_plane_api/alembic/versions/1382bec74309_initial_migration_with_all_models.py +251 -0
- control_plane_api/alembic/versions/1f54bc2a37e3_add_analytics_tables.py +162 -0
- control_plane_api/alembic/versions/2e4cb136dc10_rename_toolset_ids_to_skill_ids_in_teams.py +30 -0
- control_plane_api/alembic/versions/31cd69a644ce_add_skill_templates_table.py +28 -0
- control_plane_api/alembic/versions/89e127caa47d_add_jobs_and_job_executions_tables.py +161 -0
- control_plane_api/alembic/versions/add_llm_models_table.py +51 -0
- control_plane_api/alembic/versions/b0e10697f212_add_runtime_column_to_teams_simple.py +42 -0
- control_plane_api/alembic/versions/ce43b24b63bf_add_execution_trigger_source_and_fix_.py +155 -0
- control_plane_api/alembic/versions/d4eaf16e3f8d_rename_toolsets_to_skills.py +84 -0
- control_plane_api/alembic/versions/efa2dc427da1_rename_metadata_to_custom_metadata.py +32 -0
- control_plane_api/alembic/versions/f973b431d1ce_add_workflow_executor_to_skill_types.py +44 -0
- control_plane_api/alembic.ini +148 -0
- control_plane_api/api/index.py +12 -0
- control_plane_api/app/__init__.py +11 -0
- control_plane_api/app/activities/__init__.py +20 -0
- control_plane_api/app/activities/agent_activities.py +379 -0
- control_plane_api/app/activities/team_activities.py +410 -0
- control_plane_api/app/activities/temporal_cloud_activities.py +577 -0
- control_plane_api/app/config/__init__.py +35 -0
- control_plane_api/app/config/api_config.py +354 -0
- control_plane_api/app/config/model_pricing.py +318 -0
- control_plane_api/app/config.py +95 -0
- control_plane_api/app/database.py +135 -0
- control_plane_api/app/exceptions.py +408 -0
- control_plane_api/app/lib/__init__.py +11 -0
- control_plane_api/app/lib/job_executor.py +312 -0
- control_plane_api/app/lib/kubiya_client.py +235 -0
- control_plane_api/app/lib/litellm_pricing.py +166 -0
- control_plane_api/app/lib/planning_tools/__init__.py +22 -0
- control_plane_api/app/lib/planning_tools/agents.py +155 -0
- control_plane_api/app/lib/planning_tools/base.py +189 -0
- control_plane_api/app/lib/planning_tools/environments.py +214 -0
- control_plane_api/app/lib/planning_tools/resources.py +240 -0
- control_plane_api/app/lib/planning_tools/teams.py +198 -0
- control_plane_api/app/lib/policy_enforcer_client.py +939 -0
- control_plane_api/app/lib/redis_client.py +436 -0
- control_plane_api/app/lib/supabase.py +71 -0
- control_plane_api/app/lib/temporal_client.py +138 -0
- control_plane_api/app/lib/validation/__init__.py +20 -0
- control_plane_api/app/lib/validation/runtime_validation.py +287 -0
- control_plane_api/app/main.py +128 -0
- control_plane_api/app/middleware/__init__.py +8 -0
- control_plane_api/app/middleware/auth.py +513 -0
- control_plane_api/app/middleware/exception_handler.py +267 -0
- control_plane_api/app/middleware/rate_limiting.py +384 -0
- control_plane_api/app/middleware/request_id.py +202 -0
- control_plane_api/app/models/__init__.py +27 -0
- control_plane_api/app/models/agent.py +79 -0
- control_plane_api/app/models/analytics.py +206 -0
- control_plane_api/app/models/associations.py +81 -0
- control_plane_api/app/models/environment.py +63 -0
- control_plane_api/app/models/execution.py +93 -0
- control_plane_api/app/models/job.py +179 -0
- control_plane_api/app/models/llm_model.py +75 -0
- control_plane_api/app/models/presence.py +49 -0
- control_plane_api/app/models/project.py +47 -0
- control_plane_api/app/models/session.py +38 -0
- control_plane_api/app/models/team.py +66 -0
- control_plane_api/app/models/workflow.py +55 -0
- control_plane_api/app/policies/README.md +121 -0
- control_plane_api/app/policies/approved_users.rego +62 -0
- control_plane_api/app/policies/business_hours.rego +51 -0
- control_plane_api/app/policies/rate_limiting.rego +100 -0
- control_plane_api/app/policies/tool_restrictions.rego +86 -0
- control_plane_api/app/routers/__init__.py +4 -0
- control_plane_api/app/routers/agents.py +364 -0
- control_plane_api/app/routers/agents_v2.py +1260 -0
- control_plane_api/app/routers/analytics.py +1014 -0
- control_plane_api/app/routers/context_manager.py +562 -0
- control_plane_api/app/routers/environment_context.py +270 -0
- control_plane_api/app/routers/environments.py +715 -0
- control_plane_api/app/routers/execution_environment.py +517 -0
- control_plane_api/app/routers/executions.py +1911 -0
- control_plane_api/app/routers/health.py +92 -0
- control_plane_api/app/routers/health_v2.py +326 -0
- control_plane_api/app/routers/integrations.py +274 -0
- control_plane_api/app/routers/jobs.py +1344 -0
- control_plane_api/app/routers/models.py +82 -0
- control_plane_api/app/routers/models_v2.py +361 -0
- control_plane_api/app/routers/policies.py +639 -0
- control_plane_api/app/routers/presence.py +234 -0
- control_plane_api/app/routers/projects.py +902 -0
- control_plane_api/app/routers/runners.py +379 -0
- control_plane_api/app/routers/runtimes.py +172 -0
- control_plane_api/app/routers/secrets.py +155 -0
- control_plane_api/app/routers/skills.py +1001 -0
- control_plane_api/app/routers/skills_definitions.py +140 -0
- control_plane_api/app/routers/task_planning.py +1256 -0
- control_plane_api/app/routers/task_queues.py +654 -0
- control_plane_api/app/routers/team_context.py +270 -0
- control_plane_api/app/routers/teams.py +1400 -0
- control_plane_api/app/routers/worker_queues.py +1545 -0
- control_plane_api/app/routers/workers.py +935 -0
- control_plane_api/app/routers/workflows.py +204 -0
- control_plane_api/app/runtimes/__init__.py +6 -0
- control_plane_api/app/runtimes/validation.py +344 -0
- control_plane_api/app/schemas/job_schemas.py +295 -0
- control_plane_api/app/services/__init__.py +1 -0
- control_plane_api/app/services/agno_service.py +619 -0
- control_plane_api/app/services/litellm_service.py +190 -0
- control_plane_api/app/services/policy_service.py +525 -0
- control_plane_api/app/services/temporal_cloud_provisioning.py +150 -0
- control_plane_api/app/skills/__init__.py +44 -0
- control_plane_api/app/skills/base.py +229 -0
- control_plane_api/app/skills/business_intelligence.py +189 -0
- control_plane_api/app/skills/data_visualization.py +154 -0
- control_plane_api/app/skills/docker.py +104 -0
- control_plane_api/app/skills/file_generation.py +94 -0
- control_plane_api/app/skills/file_system.py +110 -0
- control_plane_api/app/skills/python.py +92 -0
- control_plane_api/app/skills/registry.py +65 -0
- control_plane_api/app/skills/shell.py +102 -0
- control_plane_api/app/skills/workflow_executor.py +469 -0
- control_plane_api/app/utils/workflow_executor.py +354 -0
- control_plane_api/app/workflows/__init__.py +11 -0
- control_plane_api/app/workflows/agent_execution.py +507 -0
- control_plane_api/app/workflows/agent_execution_with_skills.py +222 -0
- control_plane_api/app/workflows/namespace_provisioning.py +326 -0
- control_plane_api/app/workflows/team_execution.py +399 -0
- control_plane_api/scripts/seed_models.py +239 -0
- control_plane_api/worker/__init__.py +0 -0
- control_plane_api/worker/activities/__init__.py +0 -0
- control_plane_api/worker/activities/agent_activities.py +1241 -0
- control_plane_api/worker/activities/approval_activities.py +234 -0
- control_plane_api/worker/activities/runtime_activities.py +388 -0
- control_plane_api/worker/activities/skill_activities.py +267 -0
- control_plane_api/worker/activities/team_activities.py +1217 -0
- control_plane_api/worker/config/__init__.py +31 -0
- control_plane_api/worker/config/worker_config.py +275 -0
- control_plane_api/worker/control_plane_client.py +529 -0
- control_plane_api/worker/examples/analytics_integration_example.py +362 -0
- control_plane_api/worker/models/__init__.py +1 -0
- control_plane_api/worker/models/inputs.py +89 -0
- control_plane_api/worker/runtimes/__init__.py +31 -0
- control_plane_api/worker/runtimes/base.py +789 -0
- control_plane_api/worker/runtimes/claude_code_runtime.py +1443 -0
- control_plane_api/worker/runtimes/default_runtime.py +617 -0
- control_plane_api/worker/runtimes/factory.py +173 -0
- control_plane_api/worker/runtimes/validation.py +93 -0
- control_plane_api/worker/services/__init__.py +1 -0
- control_plane_api/worker/services/agent_executor.py +422 -0
- control_plane_api/worker/services/agent_executor_v2.py +383 -0
- control_plane_api/worker/services/analytics_collector.py +457 -0
- control_plane_api/worker/services/analytics_service.py +464 -0
- control_plane_api/worker/services/approval_tools.py +310 -0
- control_plane_api/worker/services/approval_tools_agno.py +207 -0
- control_plane_api/worker/services/cancellation_manager.py +177 -0
- control_plane_api/worker/services/data_visualization.py +827 -0
- control_plane_api/worker/services/jira_tools.py +257 -0
- control_plane_api/worker/services/runtime_analytics.py +328 -0
- control_plane_api/worker/services/session_service.py +194 -0
- control_plane_api/worker/services/skill_factory.py +175 -0
- control_plane_api/worker/services/team_executor.py +574 -0
- control_plane_api/worker/services/team_executor_v2.py +465 -0
- control_plane_api/worker/services/workflow_executor_tools.py +1418 -0
- control_plane_api/worker/tests/__init__.py +1 -0
- control_plane_api/worker/tests/e2e/__init__.py +0 -0
- control_plane_api/worker/tests/e2e/test_execution_flow.py +571 -0
- control_plane_api/worker/tests/integration/__init__.py +0 -0
- control_plane_api/worker/tests/integration/test_control_plane_integration.py +308 -0
- control_plane_api/worker/tests/unit/__init__.py +0 -0
- control_plane_api/worker/tests/unit/test_control_plane_client.py +401 -0
- control_plane_api/worker/utils/__init__.py +1 -0
- control_plane_api/worker/utils/chunk_batcher.py +305 -0
- control_plane_api/worker/utils/retry_utils.py +60 -0
- control_plane_api/worker/utils/streaming_utils.py +373 -0
- control_plane_api/worker/worker.py +753 -0
- control_plane_api/worker/workflows/__init__.py +0 -0
- control_plane_api/worker/workflows/agent_execution.py +589 -0
- control_plane_api/worker/workflows/team_execution.py +429 -0
- kubiya_control_plane_api-0.3.4.dist-info/METADATA +229 -0
- kubiya_control_plane_api-0.3.4.dist-info/RECORD +182 -0
- kubiya_control_plane_api-0.3.4.dist-info/entry_points.txt +2 -0
- kubiya_control_plane_api-0.3.4.dist-info/top_level.txt +1 -0
- kubiya_control_plane_api-0.1.0.dist-info/METADATA +0 -66
- kubiya_control_plane_api-0.1.0.dist-info/RECORD +0 -5
- kubiya_control_plane_api-0.1.0.dist-info/top_level.txt +0 -1
- {kubiya_control_plane_api-0.1.0.dist-info/licenses → control_plane_api}/LICENSE +0 -0
- {kubiya_control_plane_api-0.1.0.dist-info → kubiya_control_plane_api-0.3.4.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"""rename_skills_to_skills
|
|
2
|
+
|
|
3
|
+
Revision ID: d4eaf16e3f8d
|
|
4
|
+
Revises: ce43b24b63bf
|
|
5
|
+
Create Date: 2025-11-06 20:58:29.015408
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
from typing import Sequence, Union
|
|
9
|
+
|
|
10
|
+
from alembic import op
|
|
11
|
+
import sqlalchemy as sa
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# revision identifiers, used by Alembic.
|
|
15
|
+
revision: str = 'd4eaf16e3f8d'
|
|
16
|
+
down_revision: Union[str, Sequence[str], None] = 'ce43b24b63bf'
|
|
17
|
+
branch_labels: Union[str, Sequence[str], None] = None
|
|
18
|
+
depends_on: Union[str, Sequence[str], None] = None
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def upgrade() -> None:
|
|
22
|
+
"""Upgrade schema: Rename toolsets to skills."""
|
|
23
|
+
|
|
24
|
+
# Rename enum type from toolset_type to skill_type
|
|
25
|
+
op.execute("ALTER TYPE toolset_type RENAME TO skill_type")
|
|
26
|
+
|
|
27
|
+
# Rename toolsets table to skills
|
|
28
|
+
op.rename_table('toolsets', 'skills')
|
|
29
|
+
|
|
30
|
+
# Rename toolset_associations table to skill_associations
|
|
31
|
+
op.rename_table('toolset_associations', 'skill_associations')
|
|
32
|
+
|
|
33
|
+
# Rename columns in skills table
|
|
34
|
+
op.alter_column('skills', 'type', new_column_name='skill_type')
|
|
35
|
+
|
|
36
|
+
# Rename column in skill_associations table
|
|
37
|
+
op.alter_column('skill_associations', 'toolset_id', new_column_name='skill_id')
|
|
38
|
+
|
|
39
|
+
# Update index names
|
|
40
|
+
op.execute("ALTER INDEX IF EXISTS idx_toolsets_org RENAME TO idx_skills_org")
|
|
41
|
+
op.execute("ALTER INDEX IF EXISTS idx_toolsets_type RENAME TO idx_skills_type")
|
|
42
|
+
op.execute("ALTER INDEX IF EXISTS idx_toolsets_enabled RENAME TO idx_skills_enabled")
|
|
43
|
+
|
|
44
|
+
op.execute("ALTER INDEX IF EXISTS idx_toolset_associations_org RENAME TO idx_skill_associations_org")
|
|
45
|
+
op.execute("ALTER INDEX IF EXISTS idx_toolset_associations_toolset RENAME TO idx_skill_associations_skill")
|
|
46
|
+
op.execute("ALTER INDEX IF EXISTS idx_toolset_associations_entity RENAME TO idx_skill_associations_entity")
|
|
47
|
+
|
|
48
|
+
# Update constraint names (actual constraint is named unique_toolset_association)
|
|
49
|
+
op.execute("ALTER TABLE skill_associations RENAME CONSTRAINT unique_toolset_association TO unique_skill_entity")
|
|
50
|
+
|
|
51
|
+
# Update table comments
|
|
52
|
+
op.execute("COMMENT ON TABLE skills IS 'Skill definitions with type-specific configurations'")
|
|
53
|
+
op.execute("COMMENT ON TABLE skill_associations IS 'Associates skills with agents, teams, or environments'")
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def downgrade() -> None:
|
|
57
|
+
"""Downgrade schema: Rename skills back to toolsets."""
|
|
58
|
+
|
|
59
|
+
# Reverse table comments
|
|
60
|
+
op.execute("COMMENT ON TABLE skill_associations IS 'Associates toolsets with agents, teams, or environments'")
|
|
61
|
+
op.execute("COMMENT ON TABLE skills IS 'Toolset definitions with type-specific configurations'")
|
|
62
|
+
|
|
63
|
+
# Reverse constraint names
|
|
64
|
+
op.execute("ALTER TABLE skill_associations RENAME CONSTRAINT unique_skill_entity TO unique_toolset_association")
|
|
65
|
+
|
|
66
|
+
# Reverse index names
|
|
67
|
+
op.execute("ALTER INDEX IF EXISTS idx_skill_associations_entity RENAME TO idx_toolset_associations_entity")
|
|
68
|
+
op.execute("ALTER INDEX IF EXISTS idx_skill_associations_skill RENAME TO idx_toolset_associations_toolset")
|
|
69
|
+
op.execute("ALTER INDEX IF EXISTS idx_skill_associations_org RENAME TO idx_toolset_associations_org")
|
|
70
|
+
|
|
71
|
+
op.execute("ALTER INDEX IF EXISTS idx_skills_enabled RENAME TO idx_toolsets_enabled")
|
|
72
|
+
op.execute("ALTER INDEX IF EXISTS idx_skills_type RENAME TO idx_toolsets_type")
|
|
73
|
+
op.execute("ALTER INDEX IF EXISTS idx_skills_org RENAME TO idx_toolsets_org")
|
|
74
|
+
|
|
75
|
+
# Reverse column renames
|
|
76
|
+
op.alter_column('skill_associations', 'skill_id', new_column_name='toolset_id')
|
|
77
|
+
op.alter_column('skills', 'skill_type', new_column_name='type')
|
|
78
|
+
|
|
79
|
+
# Reverse table renames
|
|
80
|
+
op.rename_table('skill_associations', 'toolset_associations')
|
|
81
|
+
op.rename_table('skills', 'toolsets')
|
|
82
|
+
|
|
83
|
+
# Reverse enum type rename
|
|
84
|
+
op.execute("ALTER TYPE skill_type RENAME TO toolset_type")
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""rename metadata to custom_metadata
|
|
2
|
+
|
|
3
|
+
Revision ID: efa2dc427da1
|
|
4
|
+
Revises: 1f54bc2a37e3
|
|
5
|
+
Create Date: 2025-01-08 17:30:00.000000
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
from alembic import op
|
|
9
|
+
import sqlalchemy as sa
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
# revision identifiers, used by Alembic.
|
|
13
|
+
revision = 'efa2dc427da1'
|
|
14
|
+
down_revision = '1f54bc2a37e3'
|
|
15
|
+
branch_labels = None
|
|
16
|
+
depends_on = None
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def upgrade():
|
|
20
|
+
# Rename metadata to custom_metadata in execution_tool_calls
|
|
21
|
+
op.alter_column('execution_tool_calls', 'metadata', new_column_name='custom_metadata')
|
|
22
|
+
|
|
23
|
+
# Rename metadata to custom_metadata in execution_tasks
|
|
24
|
+
op.alter_column('execution_tasks', 'metadata', new_column_name='custom_metadata')
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def downgrade():
|
|
28
|
+
# Revert custom_metadata back to metadata in execution_tasks
|
|
29
|
+
op.alter_column('execution_tasks', 'custom_metadata', new_column_name='metadata')
|
|
30
|
+
|
|
31
|
+
# Revert custom_metadata back to metadata in execution_tool_calls
|
|
32
|
+
op.alter_column('execution_tool_calls', 'custom_metadata', new_column_name='metadata')
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""add_workflow_executor_to_skill_types
|
|
2
|
+
|
|
3
|
+
Revision ID: f973b431d1ce
|
|
4
|
+
Revises: 2e4cb136dc10
|
|
5
|
+
Create Date: 2025-11-07 14:27:34.063089
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
from typing import Sequence, Union
|
|
9
|
+
|
|
10
|
+
from alembic import op
|
|
11
|
+
import sqlalchemy as sa
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# revision identifiers, used by Alembic.
|
|
15
|
+
revision: str = 'f973b431d1ce'
|
|
16
|
+
down_revision: Union[str, Sequence[str], None] = '2e4cb136dc10'
|
|
17
|
+
branch_labels: Union[str, Sequence[str], None] = None
|
|
18
|
+
depends_on: Union[str, Sequence[str], None] = None
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def upgrade() -> None:
|
|
22
|
+
"""Upgrade schema."""
|
|
23
|
+
# Drop existing constraint
|
|
24
|
+
op.execute("ALTER TABLE skills DROP CONSTRAINT IF EXISTS toolsets_type_check")
|
|
25
|
+
|
|
26
|
+
# Add constraint with workflow_executor included
|
|
27
|
+
op.execute("""
|
|
28
|
+
ALTER TABLE skills ADD CONSTRAINT toolsets_type_check
|
|
29
|
+
CHECK (skill_type IN ('file_system', 'shell', 'python', 'docker', 'sleep',
|
|
30
|
+
'file_generation', 'data_visualization', 'workflow_executor', 'custom'))
|
|
31
|
+
""")
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def downgrade() -> None:
|
|
35
|
+
"""Downgrade schema."""
|
|
36
|
+
# Drop existing constraint
|
|
37
|
+
op.execute("ALTER TABLE skills DROP CONSTRAINT IF EXISTS toolsets_type_check")
|
|
38
|
+
|
|
39
|
+
# Add constraint without workflow_executor
|
|
40
|
+
op.execute("""
|
|
41
|
+
ALTER TABLE skills ADD CONSTRAINT toolsets_type_check
|
|
42
|
+
CHECK (skill_type IN ('file_system', 'shell', 'python', 'docker', 'sleep',
|
|
43
|
+
'file_generation', 'data_visualization', 'custom'))
|
|
44
|
+
""")
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# A generic, single database configuration.
|
|
2
|
+
|
|
3
|
+
[alembic]
|
|
4
|
+
# path to migration scripts.
|
|
5
|
+
# this is typically a path given in POSIX (e.g. forward slashes)
|
|
6
|
+
# format, relative to the token %(here)s which refers to the location of this
|
|
7
|
+
# ini file
|
|
8
|
+
script_location = %(here)s/alembic
|
|
9
|
+
|
|
10
|
+
# template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
|
|
11
|
+
# Uncomment the line below if you want the files to be prepended with date and time
|
|
12
|
+
# see https://alembic.sqlalchemy.org/en/latest/tutorial.html#editing-the-ini-file
|
|
13
|
+
# for all available tokens
|
|
14
|
+
# file_template = %%(year)d_%%(month).2d_%%(day).2d_%%(hour).2d%%(minute).2d-%%(rev)s_%%(slug)s
|
|
15
|
+
|
|
16
|
+
# sys.path path, will be prepended to sys.path if present.
|
|
17
|
+
# defaults to the current working directory. for multiple paths, the path separator
|
|
18
|
+
# is defined by "path_separator" below.
|
|
19
|
+
# We need the parent directory so control_plane_api is importable
|
|
20
|
+
prepend_sys_path = ..
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# timezone to use when rendering the date within the migration file
|
|
24
|
+
# as well as the filename.
|
|
25
|
+
# If specified, requires the tzdata library which can be installed by adding
|
|
26
|
+
# `alembic[tz]` to the pip requirements.
|
|
27
|
+
# string value is passed to ZoneInfo()
|
|
28
|
+
# leave blank for localtime
|
|
29
|
+
# timezone =
|
|
30
|
+
|
|
31
|
+
# max length of characters to apply to the "slug" field
|
|
32
|
+
# truncate_slug_length = 40
|
|
33
|
+
|
|
34
|
+
# set to 'true' to run the environment during
|
|
35
|
+
# the 'revision' command, regardless of autogenerate
|
|
36
|
+
# revision_environment = false
|
|
37
|
+
|
|
38
|
+
# set to 'true' to allow .pyc and .pyo files without
|
|
39
|
+
# a source .py file to be detected as revisions in the
|
|
40
|
+
# versions/ directory
|
|
41
|
+
# sourceless = false
|
|
42
|
+
|
|
43
|
+
# version location specification; This defaults
|
|
44
|
+
# to <script_location>/versions. When using multiple version
|
|
45
|
+
# directories, initial revisions must be specified with --version-path.
|
|
46
|
+
# The path separator used here should be the separator specified by "path_separator"
|
|
47
|
+
# below.
|
|
48
|
+
# version_locations = %(here)s/bar:%(here)s/bat:%(here)s/alembic/versions
|
|
49
|
+
|
|
50
|
+
# path_separator; This indicates what character is used to split lists of file
|
|
51
|
+
# paths, including version_locations and prepend_sys_path within configparser
|
|
52
|
+
# files such as alembic.ini.
|
|
53
|
+
# The default rendered in new alembic.ini files is "os", which uses os.pathsep
|
|
54
|
+
# to provide os-dependent path splitting.
|
|
55
|
+
#
|
|
56
|
+
# Note that in order to support legacy alembic.ini files, this default does NOT
|
|
57
|
+
# take place if path_separator is not present in alembic.ini. If this
|
|
58
|
+
# option is omitted entirely, fallback logic is as follows:
|
|
59
|
+
#
|
|
60
|
+
# 1. Parsing of the version_locations option falls back to using the legacy
|
|
61
|
+
# "version_path_separator" key, which if absent then falls back to the legacy
|
|
62
|
+
# behavior of splitting on spaces and/or commas.
|
|
63
|
+
# 2. Parsing of the prepend_sys_path option falls back to the legacy
|
|
64
|
+
# behavior of splitting on spaces, commas, or colons.
|
|
65
|
+
#
|
|
66
|
+
# Valid values for path_separator are:
|
|
67
|
+
#
|
|
68
|
+
# path_separator = :
|
|
69
|
+
# path_separator = ;
|
|
70
|
+
# path_separator = space
|
|
71
|
+
# path_separator = newline
|
|
72
|
+
#
|
|
73
|
+
# Use os.pathsep. Default configuration used for new projects.
|
|
74
|
+
path_separator = os
|
|
75
|
+
|
|
76
|
+
# set to 'true' to search source files recursively
|
|
77
|
+
# in each "version_locations" directory
|
|
78
|
+
# new in Alembic version 1.10
|
|
79
|
+
# recursive_version_locations = false
|
|
80
|
+
|
|
81
|
+
# the output encoding used when revision files
|
|
82
|
+
# are written from script.py.mako
|
|
83
|
+
# output_encoding = utf-8
|
|
84
|
+
|
|
85
|
+
# database URL. This is consumed by the user-maintained env.py script only.
|
|
86
|
+
# other means of configuring database URLs may be customized within the env.py
|
|
87
|
+
# file.
|
|
88
|
+
sqlalchemy.url = driver://user:pass@localhost/dbname
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
[post_write_hooks]
|
|
92
|
+
# post_write_hooks defines scripts or Python functions that are run
|
|
93
|
+
# on newly generated revision scripts. See the documentation for further
|
|
94
|
+
# detail and examples
|
|
95
|
+
|
|
96
|
+
# format using "black" - use the console_scripts runner, against the "black" entrypoint
|
|
97
|
+
# hooks = black
|
|
98
|
+
# black.type = console_scripts
|
|
99
|
+
# black.entrypoint = black
|
|
100
|
+
# black.options = -l 79 REVISION_SCRIPT_FILENAME
|
|
101
|
+
|
|
102
|
+
# lint with attempts to fix using "ruff" - use the module runner, against the "ruff" module
|
|
103
|
+
# hooks = ruff
|
|
104
|
+
# ruff.type = module
|
|
105
|
+
# ruff.module = ruff
|
|
106
|
+
# ruff.options = check --fix REVISION_SCRIPT_FILENAME
|
|
107
|
+
|
|
108
|
+
# Alternatively, use the exec runner to execute a binary found on your PATH
|
|
109
|
+
# hooks = ruff
|
|
110
|
+
# ruff.type = exec
|
|
111
|
+
# ruff.executable = ruff
|
|
112
|
+
# ruff.options = check --fix REVISION_SCRIPT_FILENAME
|
|
113
|
+
|
|
114
|
+
# Logging configuration. This is also consumed by the user-maintained
|
|
115
|
+
# env.py script only.
|
|
116
|
+
[loggers]
|
|
117
|
+
keys = root,sqlalchemy,alembic
|
|
118
|
+
|
|
119
|
+
[handlers]
|
|
120
|
+
keys = console
|
|
121
|
+
|
|
122
|
+
[formatters]
|
|
123
|
+
keys = generic
|
|
124
|
+
|
|
125
|
+
[logger_root]
|
|
126
|
+
level = WARNING
|
|
127
|
+
handlers = console
|
|
128
|
+
qualname =
|
|
129
|
+
|
|
130
|
+
[logger_sqlalchemy]
|
|
131
|
+
level = WARNING
|
|
132
|
+
handlers =
|
|
133
|
+
qualname = sqlalchemy.engine
|
|
134
|
+
|
|
135
|
+
[logger_alembic]
|
|
136
|
+
level = INFO
|
|
137
|
+
handlers =
|
|
138
|
+
qualname = alembic
|
|
139
|
+
|
|
140
|
+
[handler_console]
|
|
141
|
+
class = StreamHandler
|
|
142
|
+
args = (sys.stderr,)
|
|
143
|
+
level = NOTSET
|
|
144
|
+
formatter = generic
|
|
145
|
+
|
|
146
|
+
[formatter_generic]
|
|
147
|
+
format = %(levelname)-5.5s [%(name)s] %(message)s
|
|
148
|
+
datefmt = %H:%M:%S
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Vercel serverless entry point for Agent Control Plane API.
|
|
3
|
+
|
|
4
|
+
This file exports the FastAPI app for Vercel's Python runtime.
|
|
5
|
+
Vercel automatically detects and handles FastAPI apps without needing Mangum.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from control_plane_api.app.main import app
|
|
9
|
+
|
|
10
|
+
# Vercel expects the FastAPI app to be exported as 'app'
|
|
11
|
+
# No additional wrapper or Mangum needed with modern Vercel Python runtime
|
|
12
|
+
__all__ = ["app"]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""Temporal activity definitions"""
|
|
2
|
+
|
|
3
|
+
from control_plane_api.app.activities.agent_activities import (
|
|
4
|
+
execute_agent_llm,
|
|
5
|
+
update_execution_status,
|
|
6
|
+
update_agent_status,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
from control_plane_api.app.activities.team_activities import (
|
|
10
|
+
get_team_agents,
|
|
11
|
+
execute_team_coordination,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"execute_agent_llm",
|
|
16
|
+
"update_execution_status",
|
|
17
|
+
"update_agent_status",
|
|
18
|
+
"get_team_agents",
|
|
19
|
+
"execute_team_coordination",
|
|
20
|
+
]
|