kin: auto-commit after pipeline
This commit is contained in:
parent
94591ab7ae
commit
3d9b5766ab
10 changed files with 250 additions and 30 deletions
12
web/api.py
12
web/api.py
|
|
@ -9,6 +9,7 @@ import mimetypes
|
|||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
# Ensure project root on sys.path
|
||||
|
|
@ -27,6 +28,7 @@ from agents.bootstrap import (
|
|||
detect_tech_stack, detect_modules, extract_decisions_from_claude_md,
|
||||
find_vault_root, scan_obsidian, save_to_db,
|
||||
)
|
||||
from core.deploy import VALID_RUNTIMES, deploy_with_dependents
|
||||
|
||||
DB_PATH = Path.home() / ".kin" / "kin.db"
|
||||
|
||||
|
|
@ -226,9 +228,6 @@ class ProjectCreate(BaseModel):
|
|||
return self
|
||||
|
||||
|
||||
VALID_DEPLOY_RUNTIMES = {"docker", "node", "python", "static"}
|
||||
|
||||
|
||||
class ProjectPatch(BaseModel):
|
||||
execution_mode: str | None = None
|
||||
autocommit_enabled: bool | None = None
|
||||
|
|
@ -266,8 +265,8 @@ def patch_project(project_id: str, body: ProjectPatch):
|
|||
raise HTTPException(400, f"Invalid execution_mode '{body.execution_mode}'. Must be one of: {', '.join(VALID_EXECUTION_MODES)}")
|
||||
if body.project_type is not None and body.project_type not in VALID_PROJECT_TYPES:
|
||||
raise HTTPException(400, f"Invalid project_type '{body.project_type}'. Must be one of: {', '.join(VALID_PROJECT_TYPES)}")
|
||||
if body.deploy_runtime is not None and body.deploy_runtime != "" and body.deploy_runtime not in VALID_DEPLOY_RUNTIMES:
|
||||
raise HTTPException(400, f"Invalid deploy_runtime '{body.deploy_runtime}'. Must be one of: {', '.join(sorted(VALID_DEPLOY_RUNTIMES))}")
|
||||
if body.deploy_runtime is not None and body.deploy_runtime != "" and body.deploy_runtime not in VALID_RUNTIMES:
|
||||
raise HTTPException(400, f"Invalid deploy_runtime '{body.deploy_runtime}'. Must be one of: {', '.join(sorted(VALID_RUNTIMES))}")
|
||||
conn = get_conn()
|
||||
p = models.get_project(conn, project_id)
|
||||
if not p:
|
||||
|
|
@ -352,9 +351,6 @@ def deploy_project(project_id: str):
|
|||
|
||||
WARNING: shell=True — deploy commands are admin-only, set in Settings by the project owner.
|
||||
"""
|
||||
import time
|
||||
from core.deploy import deploy_with_dependents
|
||||
|
||||
conn = get_conn()
|
||||
p = models.get_project(conn, project_id)
|
||||
if not p:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue