Priority: P1
Problem
PostHogClient is marked as a Croco component but its constructor requires an erased TypeScript interface and no configuration token or factory is exported. Normal Container resolution cannot provide its required configuration.
Evidence
packages/integrations-posthog/src/libs/PostHogClient.ts:10-17 declares @Component() with constructor(config: PostHogConfig); the package index and README expose direct construction but no DI configuration token or factory.
Desired outcome
The public component integration surface works through Croco DI with a validated configuration contract.
Implementation path
- Export a configuration token and provider/factory.
- Validate and register configuration before resolving the client.
- Inject the runtime value through the token.
- Add container resolution and missing-configuration tests.
Acceptance criteria
Container.get(PostHogClient) resolves after documented setup.
- Missing or invalid configuration yields a stable diagnostic.
- Direct construction remains intentional or is explicitly deprecated.
Validation
pnpm --filter @croco/integrations-posthog test
pnpm --filter @croco/integrations-posthog typecheck
Scope boundaries
Does not add new PostHog event features.
Priority: P1
Problem
PostHogClient is marked as a Croco component but its constructor requires an erased TypeScript interface and no configuration token or factory is exported. Normal Container resolution cannot provide its required configuration.
Evidence
packages/integrations-posthog/src/libs/PostHogClient.ts:10-17declares@Component()withconstructor(config: PostHogConfig); the package index and README expose direct construction but no DI configuration token or factory.Desired outcome
The public component integration surface works through Croco DI with a validated configuration contract.
Implementation path
Acceptance criteria
Container.get(PostHogClient)resolves after documented setup.Validation
pnpm --filter @croco/integrations-posthog testpnpm --filter @croco/integrations-posthog typecheckScope boundaries
Does not add new PostHog event features.