Skip to content

feat: add interactive session support#88

Open
DocArmoryTech wants to merge 1 commit intoail-project:mainfrom
UCD-CCI:feature/interactive-sessions
Open

feat: add interactive session support#88
DocArmoryTech wants to merge 1 commit intoail-project:mainfrom
UCD-CCI:feature/interactive-sessions

Conversation

@DocArmoryTech
Copy link
Copy Markdown

Add client-side support for Lacus interactive capture sessions - new parameters on enqueue(), new typed responses, and two new API methods for managing interactive sessions.

Changes

New types (api.py)

  • SessionStatus IntEnum - mirrors LacusCore's session lifecycle states (UNKNOWN, STARTING, READY, ERROR, STOPPED, EXPIRED, CAPTURE_REQUESTED).
  • InteractiveSessionResponse TypedDict - typed response for the interactive session endpoints (uuid, status, raw_status, finish_requested, view_url, created_at, expires_at, error).

enqueue() changes (api.py)

  • Add interactive: bool = False and interactive_ttl: int = 600 parameters to both the kwargs overload and the implementation.
  • Both values are passed through to CaptureSettings for Pydantic validation (including the 1–600s TTL bound from lookyloo-models).

New methods (api.py)

  • get_interactive_session(uuid)GET /interactive/<uuid> - returns InteractiveSessionResponse.
  • request_interactive_capture(uuid)POST /interactive/<uuid>/finish - returns InteractiveSessionResponse.

Deprecated TypedDict (__init__.py)

  • Add interactive: bool and interactive_ttl: int to the deprecated CaptureSettings TypedDict for completeness.

Exports (__init__.py)

  • SessionStatus and InteractiveSessionResponse added to imports and __all__.

Dependencies

Requires lookyloo-models with the interactive/interactive_ttl fields on CaptureSettings (companion PR: Lookyloo/lookyloo-models#1).

- Add `interactive` and `interactive_ttl` parameters to enqueue()
- Add SessionStatus enum (UNKNOWN, STARTING, READY, ERROR, STOPPED,
  EXPIRED, CAPTURE_REQUESTED)
- Add InteractiveSessionResponse TypedDict for session status responses
- Add get_interactive_session() — GET /interactive/<uuid>
- Add request_interactive_capture() — POST /interactive/<uuid>/finish
- Update deprecated CaptureSettings TypedDict with new fields
- Export new types in __all__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant