Revert "[STG-1566] Flow logger schema and collection cleanup to prepare for Observability"
Merged
PI
8mo ago+1286+1286+0123456789012345678901234567890123456789-1380-1380-0123456789012345678901234567890123456789
Reverts browserbase/stagehand#1824
See https://github.com/browserbase/stagehand/pull/1836 for context
Summary by cubic
Reverts the new flow-logging schema and event store, restoring the previous session file–based logger. Updates agents, handlers, and evals to use SessionFileLogger and removes the sessionId option from V3Options. This undoes the STG-1566 observability changes to stabilize logging.
-
Refactors
- Remove
packages/core/lib/v3/eventStore.tsand related wiring. - Restore
SessionFileLoggerinflowLogger.tswith helpers likeformatCuaPromptPreview,formatLlmPromptPreview,logAction, andlogStagehandStep. - Replace
FlowLoggerusage withSessionFileLoggeracross agents/handlers; update LLM clients (OpenAICUAClient,AnthropicCUAClient,GoogleCUAClient,AISdkClient) to log requests/responses with operation names. - Simplify Understudy/CDP instrumentation; remove FlowLogger context in
cdp.ts; uselogActioninpage.ts. - Remove
toTitleCaseand log explicit action names (e.g.,Understudy.<method>,Page.close). - Evals: switch to event-driven screenshot collection via the V3 event bus; drop interval polling.
- Remove
sessionIdhandling and related code inv3.ts.
- Remove
-
Migration
- Remove
sessionIdfromV3Optionsif you were passing it. - Any direct uses of the reverted
eventStoreor the new observability schema are no longer available.
- Remove