feat(pilot): pydantic schemas for inline origin + script PATCH
- ScriptBuilderCreateRequest gains origin ('standalone' | 'pilot_inline')
and optional ai_session_id. Handler-side validation (next task) enforces
pilot_inline ⇒ ai_session_id required + owned by caller.
- SessionSuggestedFixScriptRequest added for the new PATCH /script
endpoint (Phase 9 Task 6).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -114,6 +114,17 @@ class SessionSuggestedFixOutcomeRequest(BaseModel):
|
||||
notes: str | None = Field(None, max_length=500)
|
||||
|
||||
|
||||
class SessionSuggestedFixScriptRequest(BaseModel):
|
||||
"""Engineer-submitted drafted script for a suggested fix.
|
||||
|
||||
Called when the inline Script Builder tab's Submit action fires. The
|
||||
fix must be non-terminal (still proposed/applied_partial). Setting
|
||||
the script does NOT stamp applied_at — a draft is not an application.
|
||||
"""
|
||||
ai_drafted_script: str = Field(..., min_length=1, max_length=50_000)
|
||||
ai_drafted_parameters: dict[str, Any] | None = None
|
||||
|
||||
|
||||
# ── Resolution note preview ────────────────────────────────────────────────
|
||||
|
||||
class ResolutionNotePreviewResponse(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user