Releases: PostHog/posthog-opencode
Releases · PostHog/posthog-opencode
Release list
0.1.1
Immutable
release. Only release title and notes can be modified.
Patch Changes
- 22c1c34: Report tool calls on
$ai_generationso PostHog's AI observability Tools view is populated. Tool calls were only emitted as$ai_spanevents, but PostHog extracts tool usage exclusively from$ai_generation— so the Tools tab, Tool trends, and Tool co-occurrence stayed empty for every OpenCode user. Each generation now carries$ai_tools_calledwith the names of the tools that step called, in call order. Spans are unchanged, so the trace timeline keeps its existing shape.
0.1.0
Immutable
release. Only release title and notes can be modified.
Minor Changes
- b34542d: Align releases with PostHog Pi by publishing pending changesets after they reach
main. - 35efee1: Adopt as the official PostHog LLM Analytics plugin for OpenCode and align packaging with the PostHog standard: publish as
@posthog/opencode, migrate the toolchain from bun to pnpm, and adopt the approval-gated release workflow with npm OIDC trusted publishing and provenance.
Patch Changes
- 1ab7a60: Fix missing
$ai_inputand$ai_model/$ai_provideron generations and traces. OpenCode emitsmessage.updatedfor the same user message several times per turn, and the plugin was starting a fresh trace on each one — wiping the captured prompt and the assistant model info before the generation was built. A new trace now starts only for a genuinely new user message, and the generation resolves model/provider from the specific assistant message the step belongs to. - e64cb41: Flush and shut down the PostHog client on plugin dispose so short-lived
opencode runinvocations reliably deliver their final events. Previously the plugin only flushed onsession.idle, butposthog-node'sflush()resolves before the HTTP request completes, so a process that exits immediately could drop its last generation, span, and trace.