feat(pilot): script_builder_sessions.origin on SQLAlchemy model
Mirrors the DB column added in the prior migration. App-level default is 'standalone' so existing callers of ScriptBuilderSession(...) work without code changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -62,6 +62,16 @@ class ScriptBuilderSession(Base):
|
||||
nullable=True,
|
||||
comment="Link to FlowPilot session if launched from there",
|
||||
)
|
||||
origin: Mapped[str] = mapped_column(
|
||||
String(20),
|
||||
nullable=False,
|
||||
default="standalone",
|
||||
comment=(
|
||||
"Session origin — 'standalone' (from /script-builder) or "
|
||||
"'pilot_inline' (from FlowPilot Script Builder tab). "
|
||||
"Invariant: pilot_inline rows must have ai_session_id set."
|
||||
),
|
||||
)
|
||||
created_at: Mapped[datetime] = mapped_column(
|
||||
DateTime(timezone=True), default=lambda: datetime.now(timezone.utc)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user