Skip to content

feat(api): add session timeline API endpoint#31

Merged
naory merged 3 commits into
mainfrom
feat/session-timeline-api
Mar 8, 2026
Merged

feat(api): add session timeline API endpoint#31
naory merged 3 commits into
mainfrom
feat/session-timeline-api

Conversation

@naory
Copy link
Copy Markdown
Owner

@naory naory commented Mar 8, 2026

Summary

  • add GET /api/sessions/:sessionId/timeline returning { sessionId, eventCount, events }
  • enforce timeline contract with UUID validation (400), session existence checks (404), and internal-safe API key gating (401 when configured)
  • keep timeline ordering in DB helper path (route delegates to db.getSessionTimeline) and add route tests for deterministic order + empty timelines
  • update API/docs with response shape and planned future filtering (?type=...)

Test plan

  • pnpm --filter api test -- test/routes/sessions.test.ts test/events/getSessionTimeline.test.ts

Made with Cursor

NAOR YUVAL added 3 commits March 8, 2026 19:34
Expose lifecycle timeline events through the sessions API with UUID validation, session existence checks, internal-safe access control, and eventCount summaries, plus tests and docs for deterministic ordering and response contract.

Made-with: Cursor
Add current session state snapshot to the timeline endpoint by reading the sessions row, preserving 404 semantics for unknown sessions and updating tests/docs to reflect the enriched response payload.

Made-with: Cursor
Emit a structured timeline.fetch log on successful timeline reads so operators can trace session timeline lookups and returned event volumes.

Made-with: Cursor
@naory naory merged commit 3316bab into main Mar 8, 2026
1 check failed
@naory naory deleted the feat/session-timeline-api branch March 8, 2026 17:44
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