Skip to content

feat(aio): public beta captureAi with dedicated AI capture lane - #4289

Merged
carlos-marchal-ph merged 2 commits into
mainfrom
posthog-code/feat(aio)/node-ai-capture-lane
Aug 13, 2026
Merged

feat(aio): public beta captureAi with dedicated AI capture lane#4289
carlos-marchal-ph merged 2 commits into
mainfrom
posthog-code/feat(aio)/node-ai-capture-lane

Conversation

@carlos-marchal-ph

@carlos-marchal-ph carlos-marchal-ph commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Problem

AI observability events routinely exceed analytics payload norms — multi-MB prompts and base64 media. Sending them through plain capture() risks both the AI event (dropped at the analytics cap) and the analytics pipeline (huge events sharing its batches). Per RFC 1198 and the cross-SDK contract in sdk-specs (capture-ai capability), posthog-node gets a dedicated AI capture surface — now as a public beta, matching the shape posthog-python ships.

Changes

  • Dedicated AI capture lane: events post to /i/v0/ai/batch/ on an isolated queue route (PostHogPersistedProperty.AiCaptureQueue) with an 8 MiB per-event cap, byte-aware sub-batching (~5 MiB target), in-lane recursive 413 bisection that never trips the shared analytics batching, lazy activation, and name+size-only drop logging.
  • Public surface: captureAi(props): string | undefined and captureAiImmediate(props): Promise<string | undefined>, both returning the event UUID (client-generated UUID when the caller supplies none; a supplied valid uuid wins and reaches the wire). undefined only when the client is disabled.
  • Configuration: single public option enableFullAiCapture@posthog/ai wrappers route through the AI endpoint, skip string truncation, and pass media through unredacted; privacy mode always wins. Replaces the internal _useAiLane / _enableMultimodalCapture (and the _INTERNAL_LLMA_MULTIMODAL env var); the OTel export path always redacts.
  • @posthog/core seams: explicitRoute on enqueue/sendImmediate, getBatchEndpointPath().
  • Package hygiene: @posthog/ai no longer exports the five internal lane helpers (captureAiEvent, captureAiEventImmediate, isMultimodalCaptureEnabled, MultimodalCaptureGate, AiLaneCapableClient); the internal gate is now isFullAiCaptureEnabled/FullAiCaptureGate.
  • Compliance adapter: implements POST /capture_ai (forwarding a caller-supplied uuid) and advertises capture_ai_v0, opting into the sdk-test-harness capture_ai suite.
  • API references: node + react-native JSONs regenerated, check:public-api clean; fixed a TSDoc {@link} the reference generator silently dropped.

How did you test this code?

  • Full turbo test + lint green across posthog-node, @posthog/ai, @posthog/core.
  • Wire-level UUID tests: returned uuid equals the wire event's uuid; supplied uuid preserved; v7 format; captureAiImmediate resolves only after the send completes.
  • Privacy-wins test: privacy mode strips wrapper-sanitized content even with enableFullAiCapture on.
  • Lane isolation pinned both directions: captureAi → AI endpoint only; capture() never reroutes $ai_* names.

Depends on: PostHog/sdk-specs@main...feat(aio)/add-capture-ai and PostHog/posthog.com@master...feat(aio)/capture-ai-docs


Created with PostHog Code

@carlos-marchal-ph carlos-marchal-ph self-assigned this Jul 28, 2026
@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Size Change: +24.5 kB (+0.13%)

Total Size: 19.3 MB

📦 View Changed
Filename Size Change
packages/ai/dist/anthropic/index.cjs 41.3 kB +582 B (+1.43%)
packages/ai/dist/anthropic/index.mjs 41 kB +582 B (+1.44%)
packages/ai/dist/gemini/index.cjs 40.9 kB +602 B (+1.49%)
packages/ai/dist/gemini/index.mjs 40.8 kB +602 B (+1.5%)
packages/ai/dist/index.cjs 63.4 kB +1.1 kB (+1.77%)
packages/ai/dist/index.mjs 63.3 kB +1.1 kB (+1.78%)
packages/ai/dist/langchain/index.cjs 42.5 kB +312 B (+0.74%)
packages/ai/dist/langchain/index.mjs 42.4 kB +312 B (+0.74%)
packages/ai/dist/openai-agents/index.cjs 31.8 kB +491 B (+1.57%)
packages/ai/dist/openai-agents/index.mjs 31.7 kB +491 B (+1.57%)
packages/ai/dist/openai/index.cjs 111 kB +1.03 kB (+0.94%)
packages/ai/dist/openai/index.mjs 110 kB +1.03 kB (+0.94%)
packages/ai/dist/otel/index.cjs 18.4 kB -131 B (-0.71%)
packages/ai/dist/otel/index.mjs 18.3 kB -131 B (-0.71%)
packages/ai/dist/vercel/index.cjs 53.5 kB +1.14 kB (+2.19%)
packages/ai/dist/vercel/index.mjs 53.5 kB +1.14 kB (+2.19%)
packages/browser/dist/array.full.es5.js 447 kB +36 B (+0.01%)
packages/browser/dist/array.full.js 515 kB +36 B (+0.01%)
packages/browser/dist/array.full.no-********.js 609 kB +36 B (+0.01%)
packages/browser/dist/array.js 248 kB +36 B (+0.01%)
packages/browser/dist/array.no-********.js 278 kB +36 B (+0.01%)
packages/browser/dist/default-extensions.js 247 kB +36 B (+0.01%)
packages/browser/dist/extension-bundles.js 138 kB +36 B (+0.03%)
packages/browser/dist/main.js 253 kB +36 B (+0.01%)
packages/browser/dist/module.full.js 518 kB +36 B (+0.01%)
packages/browser/dist/module.full.no-********.js 612 kB +36 B (+0.01%)
packages/browser/dist/module.js 252 kB +36 B (+0.01%)
packages/browser/dist/module.no-********.js 282 kB +36 B (+0.01%)
packages/core/dist/posthog-core-stateless.js 47.1 kB +381 B (+0.82%)
packages/core/dist/posthog-core-stateless.mjs 43.9 kB +194 B (+0.44%)
packages/core/dist/posthog-core.js 49.2 kB +91 B (+0.19%)
packages/core/dist/posthog-core.mjs 43.6 kB +57 B (+0.13%)
packages/core/dist/types.js 8.35 kB +69 B (+0.83%)
packages/core/dist/types.mjs 5.23 kB +69 B (+1.34%)
packages/node/dist/ai-capture/batching.js 2.61 kB +2.61 kB (new file) 🆕
packages/node/dist/ai-capture/batching.mjs 1.21 kB +1.21 kB (new file) 🆕
packages/node/dist/ai-capture/routing.js 1.87 kB +1.87 kB (new file) 🆕
packages/node/dist/ai-capture/routing.mjs 264 B +264 B (new file) 🆕
packages/node/dist/client.js 58.5 kB +3.8 kB (+6.95%) 🔍
packages/node/dist/client.mjs 55.1 kB +3.19 kB (+6.15%) 🔍
ℹ️ View Unchanged
Filename Size Change
packages/browser-common/dist/client.js 603 B 0 B
packages/browser-common/dist/client.mjs 0 B 0 B 🆕
packages/browser-common/dist/config.js 1.43 kB 0 B
packages/browser-common/dist/config.mjs 223 B 0 B
packages/browser-common/dist/constants.js 1.66 kB 0 B
packages/browser-common/dist/constants.mjs 219 B 0 B
packages/browser-common/dist/disposable.js 1.63 kB 0 B
packages/browser-common/dist/disposable.mjs 386 B 0 B
packages/browser-common/dist/extension-runtime.js 3 kB 0 B
packages/browser-common/dist/extension-runtime.mjs 1.76 kB 0 B
packages/browser-common/dist/extension.js 603 B 0 B
packages/browser-common/dist/extension.mjs 0 B 0 B 🆕
packages/browser-common/dist/index.js 3.08 kB 0 B
packages/browser-common/dist/index.mjs 170 B 0 B
packages/browser-common/dist/persistence.js 603 B 0 B
packages/browser-common/dist/persistence.mjs 0 B 0 B 🆕
packages/browser-common/dist/pubsub.js 2.23 kB 0 B
packages/browser-common/dist/pubsub.mjs 993 B 0 B
packages/browser-common/dist/types/compression.js 1.28 kB 0 B
packages/browser-common/dist/types/compression.mjs 93 B 0 B
packages/browser-common/dist/types/index.js 4.11 kB 0 B
packages/browser-common/dist/types/index.mjs 144 B 0 B
packages/browser-common/dist/types/network-recording.js 603 B 0 B
packages/browser-common/dist/types/network-recording.mjs 0 B 0 B 🆕
packages/browser-common/dist/types/remote-config.js 603 B 0 B
packages/browser-common/dist/types/remote-config.mjs 0 B 0 B 🆕
packages/browser-common/dist/types/surveys.js 4.55 kB 0 B
packages/browser-common/dist/types/surveys.mjs 2.17 kB 0 B
packages/browser-common/dist/utils/array-at-********.js 628 B 0 B
packages/browser-common/dist/utils/array-at-********.mjs 425 B 0 B
packages/browser-common/dist/utils/autocapture-utils.js 24 kB 0 B
packages/browser-common/dist/utils/autocapture-utils.mjs 18.5 kB 0 B
packages/browser-common/dist/utils/blocked-uas.js 2.1 kB 0 B
packages/browser-common/dist/utils/blocked-uas.mjs 598 B 0 B
packages/browser-common/dist/utils/cookie-utils.js 1.89 kB 0 B
packages/browser-common/dist/utils/cookie-utils.mjs 673 B 0 B
packages/browser-common/dist/utils/device-model-utils.js 1.98 kB 0 B
packages/browser-common/dist/utils/device-model-utils.mjs 678 B 0 B
packages/browser-common/dist/utils/element-utils.js 2.46 kB 0 B
packages/browser-common/dist/utils/element-utils.mjs 804 B 0 B
packages/browser-common/dist/utils/elements-chain-utils.js 2.77 kB 0 B
packages/browser-common/dist/utils/elements-chain-utils.mjs 1.23 kB 0 B
packages/browser-common/dist/utils/encode-utils.js 1.4 kB 0 B
packages/browser-common/dist/utils/encode-utils.mjs 205 B 0 B
packages/browser-common/dist/utils/event-utils.js 15.7 kB 0 B
packages/browser-common/dist/utils/event-utils.mjs 10 kB 0 B
packages/browser-common/dist/utils/general-utils.js 7.31 kB 0 B
packages/browser-common/dist/utils/general-utils.mjs 4.49 kB 0 B
packages/browser-common/dist/utils/globals.js 2.78 kB 0 B
packages/browser-common/dist/utils/globals.mjs 860 B 0 B
packages/browser-common/dist/utils/logger.js 3.4 kB 0 B
packages/browser-common/dist/utils/logger.mjs 1.61 kB 0 B
packages/browser-common/dist/utils/matcher-utils.js 2.85 kB 0 B
packages/browser-common/dist/utils/matcher-utils.mjs 1.33 kB 0 B
packages/browser-common/dist/utils/property-utils.js 5.38 kB 0 B
packages/browser-common/dist/utils/property-utils.mjs 3.34 kB 0 B
packages/browser-common/dist/utils/prototype-utils.js 3.51 kB 0 B
packages/browser-common/dist/utils/prototype-utils.mjs 1.86 kB 0 B
packages/browser-common/dist/utils/regex-utils.js 1.68 kB 0 B
packages/browser-common/dist/utils/regex-utils.mjs 378 B 0 B
packages/browser-common/dist/utils/request-utils.js 6.73 kB 0 B
packages/browser-common/dist/utils/request-utils.mjs 4.19 kB 0 B
packages/browser-common/dist/utils/simple-event-emitter.js 1.76 kB 0 B
packages/browser-common/dist/utils/simple-event-emitter.mjs 553 B 0 B
packages/browser-common/dist/utils/stylesheet-loader.js 2.13 kB 0 B
packages/browser-common/dist/utils/stylesheet-loader.mjs 823 B 0 B
packages/browser-common/dist/utils/type-utils.js 1.59 kB 0 B
packages/browser-common/dist/utils/type-utils.mjs 267 B 0 B
packages/browser-common/dist/utils/url-targeting-utils.js 2.35 kB 0 B
packages/browser-common/dist/utils/url-targeting-utils.mjs 863 B 0 B
packages/browser-common/dist/utils/uuidv7.js 6.66 kB 0 B
packages/browser-common/dist/utils/uuidv7.mjs 5.18 kB 0 B
packages/browser/dist/all-external-dependencies.js 293 kB 0 B
packages/browser/dist/conversations.js 68.2 kB 0 B
packages/browser/dist/crisp-chat-integration.js 2.03 kB 0 B
packages/browser/dist/customizations.full.js 16 kB 0 B
packages/browser/dist/customizations.js 15.8 kB 0 B
packages/browser/dist/dead-clicks-autocapture.js 17.9 kB 0 B
packages/browser/dist/element-inference.js 5.62 kB 0 B
packages/browser/dist/exception-autocapture.js 12.8 kB 0 B
packages/browser/dist/external-scripts-loader.js 3.16 kB 0 B
packages/browser/dist/intercom-integration.js 2.08 kB 0 B
packages/browser/dist/lazy-********.js 180 kB 0 B
packages/browser/dist/logs.js 4.41 kB 0 B
packages/browser/dist/module.slim.js 125 kB 0 B
packages/browser/dist/module.slim.no-********.js 134 kB 0 B
packages/browser/dist/posthog-********.js 180 kB 0 B
packages/browser/dist/product-tours-preview.js 82.4 kB 0 B
packages/browser/dist/product-tours.js 123 kB 0 B
packages/browser/dist/recorder-v2.js 118 kB 0 B
packages/browser/dist/recorder.js 118 kB 0 B
packages/browser/dist/rrweb-plugin-console-record.js 6.99 kB 0 B
packages/browser/dist/rrweb-types.js 2.33 kB 0 B
packages/browser/dist/rrweb.js 309 kB 0 B
packages/browser/dist/surveys-preview.js 80.4 kB 0 B
packages/browser/dist/surveys.js 100 kB 0 B
packages/browser/dist/tracing-headers.js 3.71 kB 0 B
packages/browser/dist/web-vitals-soft-navs.js 9.9 kB 0 B
packages/browser/dist/web-vitals-with-attribution-soft-navs.js 16.2 kB 0 B
packages/browser/dist/web-vitals-with-attribution.js 12.5 kB 0 B
packages/browser/dist/web-vitals.js 6.91 kB 0 B
packages/browser/react/dist/esm/index.js 21.1 kB 0 B
packages/browser/react/dist/esm/slim/index.js 17.5 kB 0 B
packages/browser/react/dist/esm/surveys/index.js 4.75 kB 0 B
packages/browser/react/dist/umd/index.js 24.3 kB 0 B
packages/browser/react/dist/umd/slim/index.js 20.3 kB 0 B
packages/browser/react/dist/umd/surveys/index.js 5.52 kB 0 B
packages/convex/dist/client/feature-flags/crypto.js 461 B 0 B
packages/convex/dist/client/feature-flags/evaluator.js 16.5 kB 0 B
packages/convex/dist/client/feature-flags/index.js 196 B 0 B
packages/convex/dist/client/feature-flags/match-********.js 15.3 kB 0 B
packages/convex/dist/client/feature-flags/types.js 44 B 0 B
packages/convex/dist/client/index.js 14.6 kB 0 B
packages/convex/dist/component/_generated/api.js 712 B 0 B
packages/convex/dist/component/_generated/component.js 212 B 0 B
packages/convex/dist/component/_generated/dataModel.js 230 B 0 B
packages/convex/dist/component/_generated/server.js 3.74 kB 0 B
packages/convex/dist/component/convex.config.js 1.66 kB 0 B
packages/convex/dist/component/crons.js 969 B 0 B
packages/convex/dist/component/lib.js 24.8 kB 0 B
packages/convex/dist/component/schema.js 1.17 kB 0 B
packages/convex/dist/component/version.js 67 B 0 B
packages/core/dist/cookie.js 5.34 kB 0 B
packages/core/dist/cookie.mjs 3.12 kB 0 B
packages/core/dist/error-tracking/chunk-ids.js 2.54 kB 0 B
packages/core/dist/error-tracking/chunk-ids.mjs 1.31 kB 0 B
packages/core/dist/error-tracking/coercers/dom-exception-coercer.js 2.3 kB 0 B
packages/core/dist/error-tracking/coercers/dom-exception-coercer.mjs 993 B 0 B
packages/core/dist/error-tracking/coercers/error-coercer.js 2.03 kB 0 B
packages/core/dist/error-tracking/coercers/error-coercer.mjs 789 B 0 B
packages/core/dist/error-tracking/coercers/error-event-coercer.js 2.35 kB 0 B
packages/core/dist/error-tracking/coercers/error-event-coercer.mjs 1.05 kB 0 B
packages/core/dist/error-tracking/coercers/event-coercer.js 1.82 kB 0 B
packages/core/dist/error-tracking/coercers/event-coercer.mjs 548 B 0 B
packages/core/dist/error-tracking/coercers/index.js 6.79 kB 0 B
packages/core/dist/error-tracking/coercers/index.mjs 326 B 0 B
packages/core/dist/error-tracking/coercers/object-coercer.js 3.85 kB 0 B
packages/core/dist/error-tracking/coercers/object-coercer.mjs 2.4 kB 0 B
packages/core/dist/error-tracking/coercers/primitive-coercer.js 1.67 kB 0 B
packages/core/dist/error-tracking/coercers/primitive-coercer.mjs 419 B 0 B
packages/core/dist/error-tracking/coercers/promise-rejection-event.js 2.59 kB 0 B
packages/core/dist/error-tracking/coercers/promise-rejection-event.mjs 1.25 kB 0 B
packages/core/dist/error-tracking/coercers/string-coercer.js 2.01 kB 0 B
packages/core/dist/error-tracking/coercers/string-coercer.mjs 820 B 0 B
packages/core/dist/error-tracking/coercers/utils.js 2.06 kB 0 B
packages/core/dist/error-tracking/coercers/utils.mjs 716 B 0 B
packages/core/dist/error-tracking/error-properties-builder.js 5.56 kB 0 B
packages/core/dist/error-tracking/error-properties-builder.mjs 4.23 kB 0 B
packages/core/dist/error-tracking/exception-steps.js 6.01 kB 0 B
packages/core/dist/error-tracking/exception-steps.mjs 3.84 kB 0 B
packages/core/dist/error-tracking/index.js 5.32 kB 0 B
packages/core/dist/error-tracking/index.mjs 222 B 0 B
packages/core/dist/error-tracking/parsers/base.js 1.83 kB 0 B
packages/core/dist/error-tracking/parsers/base.mjs 464 B 0 B
packages/core/dist/error-tracking/parsers/chrome.js 2.73 kB 0 B
packages/core/dist/error-tracking/parsers/chrome.mjs 1.32 kB 0 B
packages/core/dist/error-tracking/parsers/gecko.js 2.47 kB 0 B
packages/core/dist/error-tracking/parsers/gecko.mjs 1.13 kB 0 B
packages/core/dist/error-tracking/parsers/index.js 4.75 kB 0 B
packages/core/dist/error-tracking/parsers/index.mjs 2.1 kB 0 B
packages/core/dist/error-tracking/parsers/node.js 4.21 kB 0 B
packages/core/dist/error-tracking/parsers/node.mjs 2.95 kB 0 B
packages/core/dist/error-tracking/parsers/opera.js 2.26 kB 0 B
packages/core/dist/error-tracking/parsers/opera.mjs 746 B 0 B
packages/core/dist/error-tracking/parsers/safari.js 1.88 kB 0 B
packages/core/dist/error-tracking/parsers/safari.mjs 574 B 0 B
packages/core/dist/error-tracking/parsers/winjs.js 1.72 kB 0 B
packages/core/dist/error-tracking/parsers/winjs.mjs 426 B 0 B
packages/core/dist/error-tracking/release.js 1.42 kB 0 B
packages/core/dist/error-tracking/release.mjs 203 B 0 B
packages/core/dist/error-tracking/types.js 1.33 kB 0 B
packages/core/dist/error-tracking/types.mjs 131 B 0 B
packages/core/dist/error-tracking/utils.js 1.8 kB 0 B
packages/core/dist/error-tracking/utils.mjs 604 B 0 B
packages/core/dist/eventemitter.js 1.78 kB 0 B
packages/core/dist/eventemitter.mjs 571 B 0 B
packages/core/dist/featureFlagUtils.js 8.52 kB 0 B
packages/core/dist/featureFlagUtils.mjs 5.48 kB 0 B
packages/core/dist/gzip.js 5.73 kB 0 B
packages/core/dist/gzip.mjs 3.85 kB 0 B
packages/core/dist/index.js 19 kB 0 B
packages/core/dist/index.mjs 1.96 kB 0 B
packages/core/dist/logs/index.js 10.5 kB 0 B
packages/core/dist/logs/index.mjs 8.87 kB 0 B
packages/core/dist/logs/logs-utils.js 7.01 kB 0 B
packages/core/dist/logs/logs-utils.mjs 4.85 kB 0 B
packages/core/dist/logs/types.js 603 B 0 B
packages/core/dist/logs/types.mjs 0 B 0 B 🆕
packages/core/dist/metrics/config.js 1.95 kB 0 B
packages/core/dist/metrics/config.mjs 735 B 0 B
packages/core/dist/metrics/index.js 14.4 kB 0 B
packages/core/dist/metrics/index.mjs 12 kB 0 B
packages/core/dist/metrics/metrics-utils.js 3.86 kB 0 B
packages/core/dist/metrics/metrics-utils.mjs 1.97 kB 0 B
packages/core/dist/metrics/types.js 603 B 0 B
packages/core/dist/metrics/types.mjs 0 B 0 B 🆕
packages/core/dist/surveys/activation.js 2.2 kB 0 B
packages/core/dist/surveys/activation.mjs 572 B 0 B
packages/core/dist/surveys/events.js 4.21 kB 0 B
packages/core/dist/surveys/events.mjs 1.99 kB 0 B
packages/core/dist/surveys/index.js 5.73 kB 0 B
packages/core/dist/surveys/index.mjs 1.21 kB 0 B
packages/core/dist/surveys/keys.js 1.7 kB 0 B
packages/core/dist/surveys/keys.mjs 350 B 0 B
packages/core/dist/surveys/translations.js 9.09 kB 0 B
packages/core/dist/surveys/translations.mjs 6.83 kB 0 B
packages/core/dist/surveys/validation.js 3.06 kB 0 B
packages/core/dist/surveys/validation.mjs 1.51 kB 0 B
packages/core/dist/testing/index.js 2.93 kB 0 B
packages/core/dist/testing/index.mjs 79 B 0 B
packages/core/dist/testing/PostHogCoreTestClient.js 3.24 kB 0 B
packages/core/dist/testing/PostHogCoreTestClient.mjs 1.83 kB 0 B
packages/core/dist/testing/test-utils.js 2.83 kB 0 B
packages/core/dist/testing/test-utils.mjs 1.15 kB 0 B
packages/core/dist/tracing-headers.js 3.38 kB 0 B
packages/core/dist/tracing-headers.mjs 2.08 kB 0 B
packages/core/dist/utils/bot-detection.js 3.28 kB 0 B
packages/core/dist/utils/bot-detection.mjs 1.95 kB 0 B
packages/core/dist/utils/browser-utils.js 1.48 kB 0 B
packages/core/dist/utils/browser-utils.mjs 182 B 0 B
packages/core/dist/utils/bucketed-rate-limiter.js 4.23 kB 0 B
packages/core/dist/utils/bucketed-rate-limiter.mjs 2.22 kB 0 B
packages/core/dist/utils/index.js 16.6 kB 0 B
packages/core/dist/utils/index.mjs 3.06 kB 0 B
packages/core/dist/utils/json-utils.js 5.48 kB 0 B
packages/core/dist/utils/json-utils.mjs 4.29 kB 0 B
packages/core/dist/utils/logger.js 2.58 kB 0 B
packages/core/dist/utils/logger.mjs 1.29 kB 0 B
packages/core/dist/utils/number-utils.js 3.32 kB 0 B
packages/core/dist/utils/number-utils.mjs 1.68 kB 0 B
packages/core/dist/utils/promise-queue.js 2.48 kB 0 B
packages/core/dist/utils/promise-queue.mjs 1.25 kB 0 B
packages/core/dist/utils/string-utils.js 3.73 kB 0 B
packages/core/dist/utils/string-utils.mjs 1.97 kB 0 B
packages/core/dist/utils/type-utils.js 7.43 kB 0 B
packages/core/dist/utils/type-utils.mjs 3.28 kB 0 B
packages/core/dist/utils/user-agent-utils.js 17.7 kB 0 B
packages/core/dist/utils/user-agent-utils.mjs 14.2 kB 0 B
packages/core/dist/vendor/uuidv7.js 8.29 kB 0 B
packages/core/dist/vendor/uuidv7.mjs 6.72 kB 0 B
packages/mcp/dist/extensions/analytics-parameters.js 4.57 kB 0 B
packages/mcp/dist/extensions/analytics-parameters.mjs 2.54 kB 0 B
packages/mcp/dist/extensions/capture.js 3.85 kB 0 B
packages/mcp/dist/extensions/capture.mjs 2.49 kB 0 B
packages/mcp/dist/extensions/client-********.js 6.23 kB 0 B
packages/mcp/dist/extensions/client-********.mjs 3.71 kB 0 B
packages/mcp/dist/extensions/compatibility.js 5.36 kB 0 B
packages/mcp/dist/extensions/compatibility.mjs 3.4 kB 0 B
packages/mcp/dist/extensions/constants.js 4.77 kB 0 B
packages/mcp/dist/extensions/constants.mjs 2.53 kB 0 B
packages/mcp/dist/extensions/context-parameters.js 4.01 kB 0 B
packages/mcp/dist/extensions/context-parameters.mjs 2.12 kB 0 B
packages/mcp/dist/extensions/conversation-id.js 6.42 kB 0 B
packages/mcp/dist/extensions/conversation-id.mjs 3.69 kB 0 B
packages/mcp/dist/extensions/detect.js 3.77 kB 0 B
packages/mcp/dist/extensions/detect.mjs 1.49 kB 0 B
packages/mcp/dist/extensions/event-types.js 1.68 kB 0 B
packages/mcp/dist/extensions/event-types.mjs 459 B 0 B
packages/mcp/dist/extensions/exceptions.js 2.57 kB 0 B
packages/mcp/dist/extensions/exceptions.mjs 1.19 kB 0 B
packages/mcp/dist/extensions/headers.js 1.98 kB 0 B
packages/mcp/dist/extensions/headers.mjs 643 B 0 B
packages/mcp/dist/extensions/ids.js 2.01 kB 0 B
packages/mcp/dist/extensions/ids.mjs 637 B 0 B
packages/mcp/dist/extensions/instrument-********.js 4.79 kB 0 B
packages/mcp/dist/extensions/instrument-********.mjs 3.06 kB 0 B
packages/mcp/dist/extensions/instrument-highlevel.js 12.2 kB 0 B
packages/mcp/dist/extensions/instrument-highlevel.mjs 9.86 kB 0 B
packages/mcp/dist/extensions/instrumentation.js 26 kB 0 B
packages/mcp/dist/extensions/instrumentation.mjs 20.7 kB 0 B
packages/mcp/dist/extensions/intent.js 3.2 kB 0 B
packages/mcp/dist/extensions/intent.mjs 1.64 kB 0 B
packages/mcp/dist/extensions/internal.js 7.54 kB 0 B
packages/mcp/dist/extensions/internal.mjs 5.23 kB 0 B
packages/mcp/dist/extensions/lib-********.js 1.6 kB 0 B
packages/mcp/dist/extensions/lib-********.mjs 267 B 0 B
packages/mcp/dist/extensions/logger.js 1.72 kB 0 B
packages/mcp/dist/extensions/logger.mjs 380 B 0 B
packages/mcp/dist/extensions/mcp-********.js 4.68 kB 0 B
packages/mcp/dist/extensions/mcp-********.mjs 3.3 kB 0 B
packages/mcp/dist/extensions/mcp-sdk-compat.js 5.04 kB 0 B
packages/mcp/dist/extensions/mcp-sdk-compat.mjs 2.9 kB 0 B
packages/mcp/dist/extensions/output-instructions.js 6.43 kB 0 B
packages/mcp/dist/extensions/output-instructions.mjs 4.23 kB 0 B
packages/mcp/dist/extensions/posthog-events.js 11.4 kB 0 B
packages/mcp/dist/extensions/posthog-events.mjs 7.78 kB 0 B
packages/mcp/dist/extensions/posthog-mcp.js 6.94 kB 0 B
packages/mcp/dist/extensions/posthog-mcp.mjs 4.93 kB 0 B
packages/mcp/dist/extensions/request-headers.js 2.17 kB 0 B
packages/mcp/dist/extensions/request-headers.mjs 963 B 0 B
packages/mcp/dist/extensions/sanitization.js 4.49 kB 0 B
packages/mcp/dist/extensions/sanitization.mjs 2.86 kB 0 B
packages/mcp/dist/extensions/session-token.js 5.39 kB 0 B
packages/mcp/dist/extensions/session-token.mjs 3.62 kB 0 B
packages/mcp/dist/extensions/session.js 6.64 kB 0 B
packages/mcp/dist/extensions/session.mjs 4.12 kB 0 B
packages/mcp/dist/extensions/sink.js 4.37 kB 0 B
packages/mcp/dist/extensions/sink.mjs 2.67 kB 0 B
packages/mcp/dist/extensions/tools.js 3.51 kB 0 B
packages/mcp/dist/extensions/tools.mjs 1.63 kB 0 B
packages/mcp/dist/extensions/tracing-helpers.js 2.41 kB 0 B
packages/mcp/dist/extensions/tracing-helpers.mjs 772 B 0 B
packages/mcp/dist/extensions/transport-********.js 2.91 kB 0 B
packages/mcp/dist/extensions/transport-********.mjs 1.09 kB 0 B
packages/mcp/dist/extensions/truncation.js 11.4 kB 0 B
packages/mcp/dist/extensions/truncation.mjs 9.71 kB 0 B
packages/mcp/dist/index.js 8.78 kB 0 B
packages/mcp/dist/index.mjs 4.96 kB 0 B
packages/mcp/dist/types.js 603 B 0 B
packages/mcp/dist/types.mjs 0 B 0 B 🆕
packages/mcp/dist/version.js 1.21 kB 0 B
packages/mcp/dist/version.mjs 46 B 0 B
packages/next/dist/app/PostHogProvider.js 5.37 kB 0 B
packages/next/dist/client/ClientPostHogProvider.js 2.28 kB 0 B
packages/next/dist/client/hooks.js 172 B 0 B
packages/next/dist/client/PostHogPageView.js 1.76 kB 0 B
packages/next/dist/index.client.js 401 B 0 B
packages/next/dist/index.edge.js 570 B 0 B
packages/next/dist/index.js 554 B 0 B
packages/next/dist/index.react-server.js 420 B 0 B
packages/next/dist/middleware/postHogMiddleware.js 3.68 kB 0 B
packages/next/dist/pages.client.js 225 B 0 B
packages/next/dist/pages.edge.js 294 B 0 B
packages/next/dist/pages.js 347 B 0 B
packages/next/dist/pages/createPostHog.js 1.48 kB 0 B
packages/next/dist/pages/getServerSidePostHog.js 1.48 kB 0 B
packages/next/dist/pages/PostHogPageView.js 1.55 kB 0 B
packages/next/dist/pages/PostHogProvider.js 1.58 kB 0 B
packages/next/dist/server.edge.js 795 B 0 B
packages/next/dist/server/captureRequestError.js 5.26 kB 0 B
packages/next/dist/server/clientCache.edge.js 305 B 0 B
packages/next/dist/server/clientCache.js 1.54 kB 0 B
packages/next/dist/server/clientCache.node.js 305 B 0 B
packages/next/dist/server/createPostHog.js 1.44 kB 0 B
packages/next/dist/server/getPostHog.js 3.45 kB 0 B
packages/next/dist/server/onRequestError.js 1.39 kB 0 B
packages/next/dist/server/onRequestError.types.js 59 B 0 B
packages/next/dist/shared/browser.js 195 B 0 B
packages/next/dist/shared/config.js 2.23 kB 0 B
packages/next/dist/shared/constants.js 201 B 0 B
packages/next/dist/shared/cookie.js 540 B 0 B
packages/next/dist/shared/identity.js 2.56 kB 0 B
packages/next/dist/shared/tracing-headers.js 2.18 kB 0 B
packages/nextjs-config/dist/config.js 6.1 kB 0 B
packages/nextjs-config/dist/config.mjs 4.53 kB 0 B
packages/nextjs-config/dist/index.js 2.24 kB 0 B
packages/nextjs-config/dist/index.mjs 30 B 0 B
packages/nextjs-config/dist/strip-sourcemap-********.js 3.63 kB 0 B
packages/nextjs-config/dist/strip-sourcemap-********.mjs 1.77 kB 0 B
packages/nextjs-config/dist/utils.js 2.94 kB 0 B
packages/nextjs-config/dist/utils.mjs 826 B 0 B
packages/node/dist/capture-v1/config.js 1.5 kB 0 B
packages/node/dist/capture-v1/config.mjs 292 B 0 B
packages/node/dist/capture-v1/errors.js 1.89 kB 0 B
packages/node/dist/capture-v1/errors.mjs 694 B 0 B
packages/node/dist/capture-v1/routing.js 1.68 kB 0 B
packages/node/dist/capture-v1/routing.mjs 279 B 0 B
packages/node/dist/capture-v1/sender.js 11.4 kB 0 B
packages/node/dist/capture-v1/sender.mjs 9.94 kB 0 B
packages/node/dist/capture-v1/transform.js 4.86 kB 0 B
packages/node/dist/capture-v1/transform.mjs 3.38 kB 0 B
packages/node/dist/capture-v1/types.js 603 B 0 B
packages/node/dist/capture-v1/types.mjs 0 B 0 B 🆕
packages/node/dist/entrypoints/index.edge.js 3.85 kB 0 B
packages/node/dist/entrypoints/index.edge.mjs 720 B 0 B
packages/node/dist/entrypoints/index.node.js 6.05 kB 0 B
packages/node/dist/entrypoints/index.node.mjs 1.43 kB 0 B
packages/node/dist/entrypoints/nestjs.js 2.31 kB 0 B
packages/node/dist/entrypoints/nestjs.mjs 42 B 0 B
packages/node/dist/experimental.js 870 B 0 B
packages/node/dist/experimental.mjs 267 B 0 B
packages/node/dist/exports.js 6.75 kB 0 B
packages/node/dist/exports.mjs 582 B 0 B
packages/node/dist/extensions/context/context.js 2.13 kB 0 B
packages/node/dist/extensions/context/context.mjs 863 B 0 B
packages/node/dist/extensions/context/types.js 603 B 0 B
packages/node/dist/extensions/context/types.mjs 0 B 0 B 🆕
packages/node/dist/extensions/error-tracking/autocapture.js 5.19 kB 0 B
packages/node/dist/extensions/error-tracking/autocapture.mjs 3.62 kB 0 B
packages/node/dist/extensions/error-tracking/index.js 4.38 kB 0 B
packages/node/dist/extensions/error-tracking/index.mjs 3.17 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/context-lines.node.js 11.6 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/context-lines.node.mjs 9.64 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/module.node.js 2.78 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/module.node.mjs 1.45 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/relative-path.node.js 1.97 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/relative-path.node.mjs 624 B 0 B
packages/node/dist/extensions/express.js 4.97 kB 0 B
packages/node/dist/extensions/express.mjs 2.78 kB 0 B
packages/node/dist/extensions/feature-flags/cache.js 603 B 0 B
packages/node/dist/extensions/feature-flags/cache.mjs 0 B 0 B 🆕
packages/node/dist/extensions/feature-flags/crypto.js 1.57 kB 0 B
packages/node/dist/extensions/feature-flags/crypto.mjs 395 B 0 B
packages/node/dist/extensions/feature-flags/feature-flags.js 42.7 kB 0 B
packages/node/dist/extensions/feature-flags/feature-flags.mjs 40.6 kB 0 B
packages/node/dist/extensions/nestjs.js 5.62 kB 0 B
packages/node/dist/extensions/nestjs.mjs 3.42 kB 0 B
packages/node/dist/extensions/sentry-integration.js 4.88 kB 0 B
packages/node/dist/extensions/sentry-integration.mjs 3.36 kB 0 B
packages/node/dist/extensions/tracing-headers.js 3.31 kB 0 B
packages/node/dist/extensions/tracing-headers.mjs 1.53 kB 0 B
packages/node/dist/extensions/url-utils.js 2.22 kB 0 B
packages/node/dist/extensions/url-utils.mjs 785 B 0 B
packages/node/dist/feature-flag-evaluations.js 6.08 kB 0 B
packages/node/dist/feature-flag-evaluations.mjs 4.74 kB 0 B
packages/node/dist/gzip.node.js 1.77 kB 0 B
packages/node/dist/gzip.node.mjs 450 B 0 B
packages/node/dist/storage-memory.js 1.52 kB 0 B
packages/node/dist/storage-memory.mjs 297 B 0 B
packages/node/dist/types.js 1.43 kB 0 B
packages/node/dist/types.mjs 224 B 0 B
packages/node/dist/version.js 1.21 kB 0 B
packages/node/dist/version.mjs 46 B 0 B
packages/nuxt/dist/module.mjs 5.76 kB 0 B
packages/nuxt/dist/runtime/composables/useFeatureFlagEnabled.js 566 B 0 B
packages/nuxt/dist/runtime/composables/useFeatureFlagPayload.js 690 B 0 B
packages/nuxt/dist/runtime/composables/useFeatureFlagVariantKey.js 591 B 0 B
packages/nuxt/dist/runtime/composables/usePostHog.js 128 B 0 B
packages/nuxt/dist/runtime/nitro-plugin.js 1.08 kB 0 B
packages/nuxt/dist/runtime/vue-plugin.js 1.14 kB 0 B
packages/openfeature-node-provider/dist/index.js 1.76 kB 0 B
packages/openfeature-node-provider/dist/index.mjs 190 B 0 B
packages/openfeature-node-provider/dist/mapping.js 5.32 kB 0 B
packages/openfeature-node-provider/dist/mapping.mjs 3.21 kB 0 B
packages/openfeature-node-provider/dist/provider.js 3.99 kB 0 B
packages/openfeature-node-provider/dist/provider.mjs 2.6 kB 0 B
packages/openfeature-web-provider/dist/index.js 1.75 kB 0 B
packages/openfeature-web-provider/dist/index.mjs 184 B 0 B
packages/openfeature-web-provider/dist/mapping.js 5.29 kB 0 B
packages/openfeature-web-provider/dist/mapping.mjs 3.18 kB 0 B
packages/openfeature-web-provider/dist/provider.js 4.41 kB 0 B
packages/openfeature-web-provider/dist/provider.mjs 3.06 kB 0 B
packages/plugin-utils/dist/cli.js 3.14 kB 0 B
packages/plugin-utils/dist/cli.mjs 1.64 kB 0 B
packages/plugin-utils/dist/config.js 3.07 kB 0 B
packages/plugin-utils/dist/config.mjs 1.83 kB 0 B
packages/plugin-utils/dist/index.js 4.3 kB 0 B
packages/plugin-utils/dist/index.mjs 217 B 0 B
packages/plugin-utils/dist/spawn-local.js 2.17 kB 0 B
packages/plugin-utils/dist/spawn-local.mjs 918 B 0 B
packages/plugin-utils/dist/utils.js 3.27 kB 0 B
packages/plugin-utils/dist/utils.mjs 1.3 kB 0 B
packages/react-native/dist/autocapture.js 6.27 kB 0 B
packages/react-native/dist/error-tracking/index.js 9.97 kB 0 B
packages/react-native/dist/error-tracking/utils.js 2.58 kB 0 B
packages/react-native/dist/frameworks/wix-navigation.js 1.3 kB 0 B
packages/react-native/dist/hooks/useFeatureFlag.js 1.84 kB 0 B
packages/react-native/dist/hooks/useFeatureFlagResult.js 963 B 0 B
packages/react-native/dist/hooks/useFeatureFlags.js 921 B 0 B
packages/react-native/dist/hooks/useNavigationTracker.js 2.45 kB 0 B
packages/react-native/dist/hooks/usePostHog.js 544 B 0 B
packages/react-native/dist/hooks/utils.js 988 B 0 B
packages/react-native/dist/index.js 4.33 kB 0 B
packages/react-native/dist/logs-********.js 3.66 kB 0 B
packages/react-native/dist/native-deps.js 8.73 kB 0 B
packages/react-native/dist/optional/OptionalAsyncStorage.js 299 B 0 B
packages/react-native/dist/optional/OptionalExpoApplication.js 377 B 0 B
packages/react-native/dist/optional/OptionalExpoDevice.js 347 B 0 B
packages/react-native/dist/optional/OptionalExpoFileSystem.js 386 B 0 B
packages/react-native/dist/optional/OptionalExpoFileSystemLegacy.js 423 B 0 B
packages/react-native/dist/optional/OptionalExpoLocalization.js 383 B 0 B
packages/react-native/dist/optional/OptionalPlugin.js 569 B 0 B
packages/react-native/dist/optional/OptionalReactNativeDeviceInfo.js 415 B 0 B
packages/react-native/dist/optional/OptionalReactNativeLocalize.js 303 B 0 B
packages/react-native/dist/optional/OptionalReactNativeNavigation.js 415 B 0 B
packages/react-native/dist/optional/OptionalReactNativeNavigationWix.js 443 B 0 B
packages/react-native/dist/optional/OptionalReactNativeSafeArea.js 644 B 0 B
packages/react-native/dist/optional/OptionalReactNativeSvg.js 872 B 0 B
packages/react-native/dist/posthog-rn.js 66.4 kB 0 B
packages/react-native/dist/PostHogContext.js 329 B 0 B
packages/react-native/dist/PostHogErrorBoundary.js 3.19 kB 0 B
packages/react-native/dist/PostHogMaskView.js 1.68 kB 0 B
packages/react-native/dist/PostHogProvider.js 4.55 kB 0 B
packages/react-native/dist/storage.js 5.76 kB 0 B
packages/react-native/dist/surveys/components/BottomSection.js 1.51 kB 0 B
packages/react-native/dist/surveys/components/Cancel.js 968 B 0 B
packages/react-native/dist/surveys/components/ConfirmationMessage.js 1.71 kB 0 B
packages/react-native/dist/surveys/components/IntroMessage.js 1.6 kB 0 B
packages/react-native/dist/surveys/components/QuestionHeader.js 1.43 kB 0 B
packages/react-native/dist/surveys/components/QuestionTypes.js 14 kB 0 B
packages/react-native/dist/surveys/components/SurveyModal.js 7.24 kB 0 B
packages/react-native/dist/surveys/components/Surveys.js 6.58 kB 0 B
packages/react-native/dist/surveys/getActiveMatchingSurveys.js 2.73 kB 0 B
packages/react-native/dist/surveys/icons.js 10 kB 0 B
packages/react-native/dist/surveys/index.js 600 B 0 B
packages/react-native/dist/surveys/PostHogSurveyProvider.js 6.73 kB 0 B
packages/react-native/dist/surveys/safeStyleSheet.js 448 B 0 B
packages/react-native/dist/surveys/survey-translations.js 1.11 kB 0 B
packages/react-native/dist/surveys/surveys-utils.js 13.8 kB 0 B
packages/react-native/dist/surveys/useActivatedSurveys.js 3.73 kB 0 B
packages/react-native/dist/surveys/useSurveyStorage.js 2.48 kB 0 B
packages/react-native/dist/tooling/expoconfig.js 17.3 kB 0 B
packages/react-native/dist/tooling/metroconfig.js 2.32 kB 0 B
packages/react-native/dist/tooling/posthogMetroSerializer.js 4.86 kB 0 B
packages/react-native/dist/tooling/utils.js 4.05 kB 0 B
packages/react-native/dist/tooling/vendor/expo/expoconfig.js 70 B 0 B
packages/react-native/dist/tooling/vendor/metro/countLines.js 237 B 0 B
packages/react-native/dist/tooling/vendor/metro/utils.js 3.35 kB 0 B
packages/react-native/dist/types.js 70 B 0 B
packages/react-native/dist/utils.js 1.3 kB 0 B
packages/react-native/dist/version.js 130 B 0 B
packages/react/dist/esm/index.js 21.1 kB 0 B
packages/react/dist/esm/slim/index.js 17.5 kB 0 B
packages/react/dist/esm/surveys/index.js 4.75 kB 0 B
packages/react/dist/umd/index.js 24.3 kB 0 B
packages/react/dist/umd/slim/index.js 20.3 kB 0 B
packages/react/dist/umd/surveys/index.js 5.52 kB 0 B
packages/rollup-plugin/dist/index.js 2.47 kB 0 B
packages/rrweb/all/dist/rrweb-all.cjs 678 kB 0 B
packages/rrweb/all/dist/rrweb-all.js 678 kB 0 B
packages/rrweb/all/dist/rrweb-all.umd.cjs 681 kB 0 B
packages/rrweb/all/dist/rrweb-all.umd.min.cjs 319 kB 0 B
packages/rrweb/packer/dist/base-********.cjs 18.3 kB 0 B
packages/rrweb/packer/dist/base-********.js 18.2 kB 0 B
packages/rrweb/packer/dist/base-********.umd.cjs 18.7 kB 0 B
packages/rrweb/packer/dist/base-********.umd.min.cjs 9.5 kB 0 B
packages/rrweb/packer/dist/pack.cjs 347 B 0 B
packages/rrweb/packer/dist/pack.js 285 B 0 B
packages/rrweb/packer/dist/pack.umd.cjs 1.63 kB 0 B
packages/rrweb/packer/dist/pack.umd.min.cjs 1.11 kB 0 B
packages/rrweb/packer/dist/packer.cjs 257 B 0 B
packages/rrweb/packer/dist/packer.js 136 B 0 B
packages/rrweb/packer/dist/packer.umd.cjs 662 B 0 B
packages/rrweb/packer/dist/packer.umd.min.cjs 626 B 0 B
packages/rrweb/packer/dist/unpack.cjs 769 B 0 B
packages/rrweb/packer/dist/unpack.js 702 B 0 B
packages/rrweb/packer/dist/unpack.umd.cjs 1.17 kB 0 B
packages/rrweb/packer/dist/unpack.umd.min.cjs 955 B 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.cjs 37.6 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.js 37.5 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.umd.cjs 38 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.umd.min.cjs 22.2 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.cjs 34.3 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.js 34.2 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.umd.cjs 34.7 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.umd.min.cjs 20.5 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.cjs 15.6 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.js 15.5 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.umd.cjs 16.1 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.umd.min.cjs 7.61 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.cjs 5.01 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.js 4.9 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.umd.cjs 5.44 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.umd.min.cjs 2.64 kB 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.cjs 681 B 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.js 548 B 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.umd.cjs 1.12 kB 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.umd.min.cjs 829 B 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.cjs 933 B 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.js 820 B 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.umd.cjs 1.37 kB 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.umd.min.cjs 968 B 0 B
packages/rrweb/record/dist/rrweb-record.cjs 208 kB 0 B
packages/rrweb/record/dist/rrweb-record.js 208 kB 0 B
packages/rrweb/record/dist/rrweb-record.umd.cjs 209 kB 0 B
packages/rrweb/record/dist/rrweb-record.umd.min.cjs 98.6 kB 0 B
packages/rrweb/replay/dist/rrweb-replay.cjs 474 kB 0 B
packages/rrweb/replay/dist/rrweb-replay.js 474 kB 0 B
packages/rrweb/replay/dist/rrweb-replay.umd.cjs 476 kB 0 B
packages/rrweb/replay/dist/rrweb-replay.umd.min.cjs 224 kB 0 B
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.cjs 160 kB 0 B
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.js 160 kB 0 B
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.umd.cjs 162 kB 0 B
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.umd.min.cjs 74.9 kB 0 B
packages/rrweb/rrdom/dist/rrdom.cjs 186 kB 0 B
packages/rrweb/rrdom/dist/rrdom.js 185 kB 0 B
packages/rrweb/rrdom/dist/rrdom.umd.cjs 187 kB 0 B
packages/rrweb/rrdom/dist/rrdom.umd.min.cjs 85.5 kB 0 B
packages/rrweb/rrweb-snapshot/dist/record.cjs 38.2 kB 0 B
packages/rrweb/rrweb-snapshot/dist/record.js 36.9 kB 0 B
packages/rrweb/rrweb-snapshot/dist/record.umd.cjs 68.6 kB 0 B
packages/rrweb/rrweb-snapshot/dist/record.umd.min.cjs 32.1 kB 0 B
packages/rrweb/rrweb-snapshot/dist/replay.cjs 149 kB 0 B
packages/rrweb/rrweb-snapshot/dist/replay.js 148 kB 0 B
packages/rrweb/rrweb-snapshot/dist/replay.umd.cjs 180 kB 0 B
packages/rrweb/rrweb-snapshot/dist/replay.umd.min.cjs 81.2 kB 0 B
packages/rrweb/rrweb-snapshot/dist/rrweb-********.cjs 3.14 kB 0 B
packages/rrweb/rrweb-snapshot/dist/rrweb-********.js 1.89 kB 0 B
packages/rrweb/rrweb-snapshot/dist/rrweb-********.umd.cjs 245 kB 0 B
packages/rrweb/rrweb-snapshot/dist/rrweb-********.umd.min.cjs 103 kB 0 B
packages/rrweb/rrweb-snapshot/dist/types-********.cjs 25.7 kB 0 B
packages/rrweb/rrweb-snapshot/dist/types-********.js 24.9 kB 0 B
packages/rrweb/rrweb-snapshot/dist/types-********.umd.cjs 26.9 kB 0 B
packages/rrweb/rrweb-snapshot/dist/types-********.umd.min.cjs 12.7 kB 0 B
packages/rrweb/rrweb/dist/rrweb.cjs 662 kB 0 B
packages/rrweb/rrweb/dist/rrweb.js 662 kB 0 B
packages/rrweb/rrweb/dist/rrweb.umd.cjs 662 kB 0 B
packages/rrweb/rrweb/dist/rrweb.umd.min.cjs 309 kB 0 B
packages/rrweb/types/dist/rrweb-types.cjs 5.75 kB 0 B
packages/rrweb/types/dist/rrweb-types.js 5.46 kB 0 B
packages/rrweb/types/dist/rrweb-types.umd.cjs 6.16 kB 0 B
packages/rrweb/types/dist/rrweb-types.umd.min.cjs 2.86 kB 0 B
packages/rrweb/utils/dist/rrweb-utils.cjs 7.56 kB 0 B
packages/rrweb/utils/dist/rrweb-utils.js 7.1 kB 0 B
packages/rrweb/utils/dist/rrweb-utils.umd.cjs 7.97 kB 0 B
packages/rrweb/utils/dist/rrweb-utils.umd.min.cjs 4.04 kB 0 B
packages/types/dist/capture-log.js 603 B 0 B
packages/types/dist/capture-log.mjs 0 B 0 B 🆕
packages/types/dist/capture-metric.js 1.37 kB 0 B
packages/types/dist/capture-metric.mjs 93 B 0 B
packages/types/dist/capture.js 603 B 0 B
packages/types/dist/capture.mjs 0 B 0 B 🆕
packages/types/dist/common.js 603 B 0 B
packages/types/dist/common.mjs 0 B 0 B 🆕
packages/types/dist/feature-flags.js 603 B 0 B
packages/types/dist/feature-flags.mjs 0 B 0 B 🆕
packages/types/dist/index.js 1.45 kB 0 B
packages/types/dist/index.mjs 122 B 0 B
packages/types/dist/posthog-config.js 603 B 0 B
packages/types/dist/posthog-config.mjs 0 B 0 B 🆕
packages/types/dist/posthog.js 603 B 0 B
packages/types/dist/posthog.mjs 0 B 0 B 🆕
packages/types/dist/request.js 603 B 0 B
packages/types/dist/request.mjs 0 B 0 B 🆕
packages/types/dist/segment.js 603 B 0 B
packages/types/dist/segment.mjs 0 B 0 B 🆕
packages/types/dist/session-recording.js 603 B 0 B
packages/types/dist/session-recording.mjs 0 B 0 B 🆕
packages/types/dist/survey.js 603 B 0 B
packages/types/dist/survey.mjs 0 B 0 B 🆕
packages/types/dist/toolbar.js 603 B 0 B
packages/types/dist/toolbar.mjs 0 B 0 B 🆕
packages/types/dist/tree-shakeable.js 603 B 0 B
packages/types/dist/tree-shakeable.mjs 0 B 0 B 🆕
packages/web/dist/index.cjs 14 kB 0 B
packages/web/dist/index.mjs 14 kB 0 B
packages/webpack-plugin/dist/config.js 1.47 kB 0 B
packages/webpack-plugin/dist/config.mjs 480 B 0 B
packages/webpack-plugin/dist/index.js 6.7 kB 0 B
packages/webpack-plugin/dist/index.mjs 2.94 kB 0 B
tooling/changelog/dist/index.js 3.31 kB 0 B
tooling/rollup-utils/dist/index.js 1.17 kB 0 B

compressed-size-action

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

@github-actions github-actions Bot added the stale label Aug 5, 2026
@carlos-marchal-ph
carlos-marchal-ph force-pushed the posthog-code/feat(aio)/node-ai-capture-lane branch from 14379a8 to e202647 Compare August 12, 2026 09:36
@github-actions

Copy link
Copy Markdown
Contributor
⚠️ `posthog-react-native` is modified but not declared in any changeset

This is informational — the PR is not blocked. Click the triangle above to collapse, or push a fix and this comment will auto-delete.

Modified in this PR but not in any changeset:

  • posthog-react-native

If this package should ship the change, add it to the changeset frontmatter:

---
"posthog-react-native": patch
---

Changesets in this PR:

  • @posthog/ai — minor
  • @posthog/core — minor
  • posthog-node — minor

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

posthog-node Compliance Report

Date: 2026-08-13 10:15:47 UTC
Duration: 197952ms

✅ All Tests Passed!

111/111 tests passed


Capture_V1 Tests

94/94 tests passed

View Details
Test Status Duration
Endpoint And Method.Targets V1 Endpoint 83ms
Endpoint And Method.Does Not Use Legacy Endpoints 11ms
Required Headers.Has Authorization Bearer Header 9ms
Required Headers.Has Content Type Json 11ms
Required Headers.Has Posthog Sdk Info Format 9ms
Required Headers.Has Posthog Attempt Header 9ms
Required Headers.Has Posthog Request Id 9ms
Required Headers.Has Posthog Request Timestamp 8ms
Required Headers.Has User Agent 8ms
Body Format.Body Has Created At And Batch 7ms
Body Format.No Api Key In Body 6ms
Body Format.No Sent At In Body 7ms
Event Format.Event Has Required Root Fields 7ms
Event Format.Event Uuid Is Valid 9ms
Event Format.Event Timestamp Is Rfc3339 6ms
Event Format.Distinct Id Is String 7ms
Event Format.Distinct Id At Root Not Properties 7ms
Event Format.Custom Properties Preserved 5ms
Event Format.Set Properties Preserved 6ms
Event Format.Set Once Properties Preserved 6ms
Event Format.Groups Properties Preserved 6ms
Event Format.Sdk Generates Uuid If Not Provided 6ms
Event Format.Event Has Required Root Fields Batch 7ms
Event Format.Event Uuid Is Valid Batch 8ms
Event Format.Event Timestamp Is Rfc3339 Batch 9ms
Event Format.Distinct Id Is String Batch 8ms
Event Format.Distinct Id At Root Not Properties Batch 8ms
Event Format.Custom Properties Preserved Batch 18ms
Event Format.Set Properties Preserved Batch 10ms
Event Format.Set Once Properties Preserved Batch 8ms
Event Format.Groups Properties Preserved Batch 9ms
Event Format.Sdk Generates Uuid If Not Provided Batch 9ms
Batch Behavior.Multiple Events In Single Batch 11ms
Batch Behavior.Batch Envelope Smoke 9ms
Batch Behavior.Flush With No Events Sends Nothing 3ms
Batch Behavior.Flush At Triggers Batch 1007ms
Batch Behavior.Created At Reflects Batch Creation Time 8ms
Deduplication.Generates Unique Uuids 16ms
Deduplication.Different Events Same Content Different Uuids 7ms
Deduplication.Preserves Uuid On Retry 6015ms
Deduplication.Preserves Timestamp On Retry 6019ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 6019ms
Deduplication.No Duplicate Events In Batch 13ms
Header Behavior On Retry.Attempt Header Starts At One 6ms
Header Behavior On Retry.Attempt Header Increments On Retry 12024ms
Header Behavior On Retry.Request Id Preserved On Retry 6017ms
Header Behavior On Retry.Different Requests Have Different Request Ids 2015ms
Header Behavior On Retry.Request Timestamp Changes On Retry 6017ms
Response Format Validation.Success Response Has Uuid Keyed Results 8ms
Response Format Validation.Success Response Has Ok For Each Event 8ms
Response Format Validation.Success No Retry After When All Ok 8ms
Response Format Validation.Success Retry After Present When Retry Events 1011ms
Response Format Validation.Success No Retry After When Drop Only 8ms
Response Format Validation.Response Echoes Request Id 6ms
Retry Behavior.Retries On 408 6017ms
Retry Behavior.Retries On 500 6013ms
Retry Behavior.Retries On 503 7020ms
Retry Behavior.Retries On 504 6018ms
Retry Behavior.Retryable Errors Have Retry After 3013ms
Retry Behavior.Respects Retry After On Retryable Error 11019ms
Retry Behavior.Does Not Retry On 400 2009ms
Retry Behavior.Does Not Retry On 401 2010ms
Retry Behavior.Does Not Retry On 402 2009ms
Retry Behavior.Does Not Retry On 413 2010ms
Retry Behavior.Does Not Retry On 415 2011ms
Retry Behavior.Non Retryable Errors Have No Retry After 2011ms
Retry Behavior.Implements Backoff 18018ms
Retry Behavior.Max Retries Respected 18034ms
Partial Batch Handling.Handles 200 Full Success 2010ms
Partial Batch Handling.Handles 200 With All Ok 3015ms
Partial Batch Handling.Does Not Retry Dropped Events 3013ms
Partial Batch Handling.Does Not Retry Limited Events 3013ms
Partial Batch Handling.Prunes Ok Events On Partial Retry 6019ms
Partial Batch Handling.Prunes Dropped Events On Partial Retry 6018ms
Partial Batch Handling.Retries Only Retry Events From Partial 6019ms
Partial Batch Handling.Partial Retry Preserves Uuids 6019ms
Partial Batch Handling.Partial Retry Attempt Header Increments 6020ms
Partial Batch Handling.Partial Retry Request Id Preserved 6017ms
Partial Batch Handling.Respects Retry After On Partial 8019ms
Partial Batch Handling.Unknown Result Treated As Terminal 3012ms
Partial Batch Handling.Mixed Ok Drop Limited No Retry 3014ms
Compression.Sends Gzip Content Encoding 8ms
Compression.No Content Encoding When Disabled 6ms
Compression.Compressed Body Is Decompressible 6ms
Error Handling.Does Not Retry On Unknown 4Xx 2008ms
Event Options.Cookieless Mode Override 9ms
Event Options.Disable Skew Correction Override 5ms
Event Options.Process Person Profile Override 7ms
Event Options.Product Tour Id Override 5ms
Event Options.Unset Options Omitted 6ms
Event Options.Options Override In Batch 8ms
Geoip And Historical Migration.Geoip Disable Injected Into Properties 6ms
Geoip And Historical Migration.Historical Migration Set In Body 5ms
Geoip And Historical Migration.Historical Migration Absent By Default 6ms

Feature_Flags Tests

17/17 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id 9ms
Request Payload.Flags Request Uses V2 Query Param 8ms
Request Payload.Flags Request Hits Flags Path Not Decide 7ms
Request Payload.Flags Request Omits Authorization Header 7ms
Request Payload.Token In Flags Body Matches Init 9ms
Request Payload.Groups Round Trip 10ms
Request Payload.Groups Default To Empty Object 9ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False 8ms
Request Payload.Disable Geoip Omitted Defaults To False 8ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key 8ms
Request Lifecycle.No Flags Request On Init Alone 2ms
Request Lifecycle.No Flags Request On Normal Capture 6ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests 10ms
Request Lifecycle.Mock Response Value Is Returned To Caller 8ms
Retry Behavior.Retries Flags On 502 264ms
Retry Behavior.Retries Flags On 504 268ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event 8ms

@github-actions github-actions Bot removed the stale label Aug 12, 2026
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

posthog-js Compliance Report

Date: 2026-08-13 10:25:17 UTC
Duration: 88817ms

✅ All Tests Passed!

26/26 tests passed


Capture Tests

26/26 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields Client 113ms
Format Validation.Event Has Uuid 19ms
Format Validation.Event Has Lib Properties 12ms
Format Validation.Distinct Id Is String Client 15ms
Format Validation.Token Is Present Client 16ms
Format Validation.Custom Properties Preserved 14ms
Format Validation.Event Has Timestamp 15ms
Retry Behavior.Retries On 503 5019ms
Retry Behavior.Does Not Retry On 400 2017ms
Retry Behavior.Does Not Retry On 401 2016ms
Retry Behavior.Respects Retry After Header 5017ms
Retry Behavior.Implements Backoff 15026ms
Retry Behavior.Retries On 500 5018ms
Retry Behavior.Retries On 502 5014ms
Retry Behavior.Retries On 504 5015ms
Retry Behavior.Max Retries Respected 15018ms
Deduplication.Generates Unique Uuids 20ms
Deduplication.Preserves Uuid On Retry 5012ms
Deduplication.Preserves Uuid And Timestamp On Retry 10023ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 5022ms
Deduplication.No Duplicate Events In Batch 20ms
Deduplication.Different Events Have Different Uuids 12ms
Batch Format.Flush With No Events Sends Nothing 7ms
Error Handling.Does Not Retry On 403 2011ms
Error Handling.Does Not Retry On 413 2015ms
Error Handling.Retries On 408 5014ms

@carlos-marchal-ph
carlos-marchal-ph force-pushed the posthog-code/feat(aio)/node-ai-capture-lane branch from e202647 to eb4c850 Compare August 12, 2026 10:03
@carlos-marchal-ph carlos-marchal-ph changed the title feat(aio): dedicated AI capture lane and multimodal passthrough feat(aio): public beta captureAi with dedicated AI capture lane Aug 12, 2026
@carlos-marchal-ph
carlos-marchal-ph force-pushed the posthog-code/feat(aio)/node-ai-capture-lane branch from eb4c850 to cfea24b Compare August 12, 2026 11:13
@carlos-marchal-ph
carlos-marchal-ph marked this pull request as ready for review August 12, 2026 11:30
@carlos-marchal-ph
carlos-marchal-ph requested a review from a team as a code owner August 12, 2026 11:30
@greptile-apps

greptile-apps Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor
Prompt To Fix All With AI
### Issue 1
packages/node/src/client.ts:504-506
**Partial sub-batch success is retried**

When an earlier AI sub-batch is accepted and a later one fails with a network error, the core flush path retains the entire original queue batch and resends the accepted events on the next flush. Capture does not guarantee strict immediate UUID deduplication, so this produces duplicate AI events.

### Issue 2
packages/core/src/types.ts:275
**Reset discards queued AI events**

When `captureAi` queues an event and `reset()` runs before it is flushed, the inherited reset logic clears `AiCaptureQueue` because the new key is absent from its queue-preservation allowlist. The pending AI event is silently deleted and never delivered.

### Issue 3
packages/ai/src/vercel/middleware.ts:796
**Redundant output property expression**

The explicit `output: output` repeats the identifier unnecessarily; property shorthand expresses the same payload with less noise.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "feat: node ai capture lane" | Re-trigger Greptile

Comment thread packages/node/src/client.ts
Comment thread packages/core/src/types.ts
Comment thread packages/ai/src/vercel/middleware.ts
Generated-By: PostHog Code
Task-Id: 4b5e5cda-81f1-41a2-8fcd-4f335d19217e
@carlos-marchal-ph
carlos-marchal-ph force-pushed the posthog-code/feat(aio)/node-ai-capture-lane branch from cfea24b to 3bcd7c5 Compare August 12, 2026 12:02
* @param props - The event properties
* @returns The event UUID, or `undefined` when the client is disabled
*/
captureAi(props: EventMessage): string | undefined {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocking: Expose the new methods through IPostHog

captureAi() and captureAiImmediate() are public here but absent from the exported IPostHog interface, so consumers typed against it (including @posthog/next) cannot call the advertised API without casting. Please add both signatures alongside capture() and captureImmediate().

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

}

// Unlike /capture, forward a supplied uuid so it's echoed back to the caller.
const returnedUuid = state.client.captureAi({

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocking: Discard the dedicated queue during reset

This activates ai_capture_queue, but discardClient() clears only queue and ai_queue. A later /reset can therefore send an event that should have been discarded when shutdown() drains this active route. Please clear ai_capture_queue too and cover /capture_ai followed by /reset.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

provider: 'azure',
input: sanitizeOpenAI(openAIParams.messages),
output: sanitizeOpenAIResponse(formattedOutput),
input: sanitizeOpenAI(openAIParams.messages, this.phClient),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocking: Propagate full-capture behavior across all Azure paths

The client gate is added only to streaming chat here. Non-streaming chat and Azure Responses create/parse/streaming/background/error paths still sanitize without this.phClient, so enableFullAiCapture: true still redacts multimodal content. Please pass the gate through every Azure capture path and test streaming and non-streaming behavior.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

provider: 'openai',
input: formatOpenAIResponsesInput(
sanitizeOpenAIResponse(openAIParams.input),
sanitizeOpenAIResponse(openAIParams.input, this.phClient),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocking: Complete gate propagation for OpenAI Responses

This makes streaming Responses input honor the gate, but the corresponding output still calls sanitizeOpenAIResponse(finalContent) without it, and background-response input has the same omission. Full capture is therefore only partial; please pass this.phClient to those sanitizers and add regression coverage.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

const generation: GenerationMetadata = {
name: runNameFound,
input: sanitizeLangChain(messages),
input: sanitizeLangChain(messages, this.client),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocking: Apply the gate to trace and span state

This updates generation input, but $ai_trace/$ai_span input, output, and interrupt state still call sanitizeLangChain without this.client, so they remain redacted under enableFullAiCapture. Please propagate the client through all trace/span state sanitizer calls.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

}

const mapVercelPrompt = (messages: LanguageModelPrompt): PostHogInput[] => {
const mapVercelPrompt = (messages: LanguageModelPrompt, client?: FullAiCaptureGate): PostHogInput[] => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocking: Preserve opted-in Vercel tool results

Although this mapper now receives the client, its tool-result branch still calls sanitizeVercel(c.output) without it. Binary or multimodal tool results remain redacted under full capture; please pass the gate there and add a full-capture tool-result test.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

{
type: 'text',
text: truncate(toContentString(message.content)),
text: truncate(toContentString(message.content), client),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocking: Skip aggregate prompt trimming under full capture

Individual truncation now honors the client gate, but the aggregate 200 KB trimming loop below still runs unconditionally and removes whole messages. Please bypass aggregate trimming when enableFullAiCapture is enabled, or document and consistently enforce a different contract.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went with bypassing aggregate trimming under full capture!

@marandaneto
marandaneto requested a review from a team August 12, 2026 12:55
@posthog

posthog Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

🦔 ReviewHog reviewed this pull request

Found 0 must fix, 4 should fix, 1 consider.

Published 5 findings (view the review).

@posthog

posthog Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

ReviewHog Alpha 🦔 If you find any issues helpful - please reply "valid", "invalid", etc., for evaluation purposes 🙏

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReviewHog Report

Feature

Issues: 4 issues

Files (10)
  • packages/core/src/posthog-core-stateless.ts
  • packages/core/src/types.ts
  • packages/node/src/ai-capture/routing.ts
  • packages/node/src/ai-capture/batching.ts
  • packages/node/src/client.ts
  • packages/node/src/types.ts
  • compliance/node/adapter.js
  • .changeset/node-ai-capture-lane.md
  • packages/node/references/posthog-node-references-latest.json
  • packages/react-native/references/posthog-react-native-references-latest.json
What were the main changes
  • @posthog/core: new AiCaptureQueue persisted property plus explicitRoute (enqueue/sendImmediate) and getBatchEndpointPath() seams so a caller can route events onto an isolated queue/endpoint
  • posthog-node: new ai-capture/{routing,batching}.ts implement the 8 MiB per-event cap, ~5 MiB byte-aware sub-batching, and name+size-only drop logging for POST /i/v0/ai/batch/
  • posthog-node client.ts adds public captureAi()/captureAiImmediate() (client-generated or caller-supplied UUID returned), lazy AI route activation, and in-lane recursive 413 bisection isolated from the analytics batch path
  • posthog-node types.ts adds the single public enableFullAiCapture option
  • compliance adapter implements POST /capture_ai (echoing a supplied uuid) and advertises capture_ai_v0/opts into the capture_ai sdk-test-harness suite
  • Regenerated node + react-native API reference JSONs for the new methods/enum/option
  • Review flags: partial AI sub-batch success can be retried on a later network error (duplicate events); reset() discards a queued-but-unflushed AI event because AiCaptureQueue isn't in the preservation allowlist; captureAi/captureAiImmediate missing from IPostHog interface; compliance adapter's discardClient() doesn't clear ai_capture_queue on reset

Feature

Issues: 1 issue

Files (13)
  • packages/ai/src/captureAiEvent.ts
  • packages/ai/src/captureAiGeneration.ts
  • packages/ai/src/sanitization.ts
  • packages/ai/src/sanitization/binary_content_redactor.ts
  • packages/ai/src/utils.ts
  • packages/ai/src/otel/redact.ts
  • packages/ai/src/anthropic/index.ts
  • packages/ai/src/gemini/index.ts
  • packages/ai/src/langchain/callbacks.ts
  • packages/ai/src/openai/azure.ts
  • packages/ai/src/openai/index.ts
  • packages/ai/src/openai-agents/processor.ts
  • packages/ai/src/vercel/middleware.ts
What were the main changes
  • New captureAiEvent.ts defines FullAiCaptureGate/isFullAiCaptureEnabled plus internal captureAiEvent/captureAiEventImmediate routing helpers, replacing the previously-exported captureAiEvent/captureAiEventImmediate/isMultimodalCaptureEnabled/MultimodalCaptureGate/AiLaneCapableClient surface
  • sanitization.ts and binary_content_redactor.ts gate redaction on the client's enableFullAiCapture flag instead of the removed _INTERNAL_LLMA_MULTIMODAL env var
  • utils.ts truncate()/formatResponse()/formatResponseGemini() now accept an optional gate to skip truncation/redaction
  • Provider wrappers (Anthropic, Gemini, LangChain callbacks, OpenAI, Azure OpenAI, OpenAI Agents processor, Vercel middleware) thread this.phClient/this.client through sanitize/truncate calls so enableFullAiCapture skips redaction, with privacy mode still enforced separately
  • otel/redact.ts intentionally keeps unconditional redaction since the OTel export path has no per-client gate
  • Review flags incomplete gate propagation: Azure non-streaming/Responses create/parse/streaming/background/error paths, OpenAI Responses output and background-response input, LangChain trace/span input/output/interrupt state, and Vercel tool-result output plus the aggregate 200KB prompt-trimming loop still redact/truncate under enableFullAiCapture; also a nit on redundant output: output shorthand

Comment thread packages/node/src/client.ts
Comment thread packages/node/src/client.ts Outdated
Comment thread packages/ai/src/sanitization.ts
Comment thread packages/node/src/ai-capture/batching.ts
Comment thread packages/node/src/ai-capture/routing.ts
Generated-By: PostHog Code
Task-Id: 4b5e5cda-81f1-41a2-8fcd-4f335d19217e
@carlos-marchal-ph
carlos-marchal-ph merged commit c9086de into main Aug 13, 2026
89 checks passed
@carlos-marchal-ph
carlos-marchal-ph deleted the posthog-code/feat(aio)/node-ai-capture-lane branch August 13, 2026 11:54
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.

2 participants