bd867019f9
Adds a new Codex plugin component `telemetry` that emits a single omo_codex_daily_active event (reason: session_start) from every Codex SessionStart hook, with the same UTC-day deduplication, hashed installation identifier, and four-flag opt-out as the install-time event. Previously omo-codex telemetry only fired on install_completed, so DAU/WAU/MAU under-reported real Codex usage. - New plugin component packages/omo-codex/plugin/components/telemetry/ mirrors the rules/comment-checker/lsp pattern: own src/, tsc build, vitest tests, package.json (posthog-node dep), hooks/hooks.json. - src/codex-hook.ts wraps createPluginPostHog().trackActive(..., "session_start") with safeShutdown so Codex session startup never blocks on telemetry. - Plugin root hooks.json + workspaces register the new component alongside rules and ultrawork on SessionStart. - Aggregate test expectations updated to include the telemetry directory. - cross-package-equivalence.test.ts pins product-identity constants and shouldDisablePostHog behavior to stay byte-equivalent between the CLI installer (src/telemetry/) and the plugin runtime (plugin/components/telemetry/src/), so the two PostHog sources never drift on event name, distinct_id base, dedup file path, or opt-out flags. - PostHogActivityReason union in the CLI-side posthog.ts gains "session_start" so future CLI paths can emit the same reason without a type break.
57 lines
1.2 KiB
JSON
57 lines
1.2 KiB
JSON
{
|
|
"name": "@code-yeongyu/codex-telemetry",
|
|
"version": "0.1.0",
|
|
"description": "Codex plugin component that emits omo-codex anonymous daily-active telemetry on SessionStart.",
|
|
"type": "module",
|
|
"packageManager": "npm@11.12.1",
|
|
"license": "MIT",
|
|
"homepage": "https://github.com/code-yeongyu/oh-my-openagent",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/code-yeongyu/oh-my-openagent.git"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/code-yeongyu/oh-my-openagent/issues"
|
|
},
|
|
"keywords": [
|
|
"codex",
|
|
"codex-plugin",
|
|
"omo",
|
|
"telemetry",
|
|
"posthog",
|
|
"hooks",
|
|
"daily-active"
|
|
],
|
|
"bin": {
|
|
"codex-telemetry": "./dist/cli.js"
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"hooks",
|
|
"LICENSE",
|
|
"README.md",
|
|
"CHANGELOG.md"
|
|
],
|
|
"scripts": {
|
|
"build": "tsc -p tsconfig.build.json",
|
|
"test": "vitest --run",
|
|
"test:watch": "vitest",
|
|
"typecheck": "tsc --noEmit",
|
|
"lint": "biome check .",
|
|
"lint:fix": "biome check --write .",
|
|
"check": "tsc --noEmit && biome check . && npm run build"
|
|
},
|
|
"dependencies": {
|
|
"posthog-node": "^5.34.3"
|
|
},
|
|
"devDependencies": {
|
|
"@biomejs/biome": "2.4.15",
|
|
"@types/node": "^25.7.0",
|
|
"typescript": "^6.0.3",
|
|
"vitest": "^4.1.5"
|
|
},
|
|
"engines": {
|
|
"node": ">=20.0.0"
|
|
}
|
|
}
|