Files
insights-js/packages/ai/package.json
zooqueen a93e642791 chore: complete posthog->insights rebrand (zero @posthog/* identity)
Decomplect the half-finished fork so the dependency graph has ONE source
with no posthog package identity, living under github.com/hanzoinsights.

LAYER 1 (package identity): rename straggler package.json names —
@posthog/next->@hanzo/insights-next (Next.js SDK; distinct from the existing
@hanzo/insights-nextjs config helper), @posthog/mcp->@hanzo/insights-mcp,
@posthog/plugin-utils->@hanzo/insights-plugin-utils,
@posthog/react-slim->@hanzo/react-slim, @posthog-tooling/release->
@hanzo/insights-tooling-release, and the @posthog/rrweb* family->@hanzo/rrweb*
(matching the already-published @hanzo/rrweb*@0.0.47 + minimumReleaseAgeExclude).
Repoint every repository.url/homepage/bugs to github.com/hanzoinsights/insights-js
and rebrand the PostHog author/description identity to Hanzo AI.

LAYER 2 (cross-package imports): rewrite every internal @posthog/* import to its
@hanzo/insights*|@hanzo/rrweb* equivalent and the bare module specifiers
posthog-js->@hanzo/insights, posthog-node->@hanzo/insights-node, mirrored in
package.json deps + the pnpm-lock importer keys. Result: 0 @posthog/* specifiers
in packages/tooling/examples/playground source.

LAYER 4 (wire protocol) PRESERVED: window.posthog global, ph_* keys,
$-prefixed event names, distinct_id, /decide, /e/, /flags, and the
__PosthogExtensions__ hook are left unchanged — the Insights server expects them.

Also repair pre-existing fork merge damage that blocked compilation (unrelated to
naming; identical to origin/main): restore the @hanzo/insights-core ./process
subpath (spawn-local/utils, re-matching the published artifact), the lost
constructor/var declarations in core + node clients, the mangled
external-scripts-loader, the missing TreeShakeable/isPlainError imports, the
DeviceId enum member, and stale ../posthog-core-stateless module paths. 26/34
turbo build tasks now pass; remaining failures (browser/react-native and their
dependents) are pre-existing fork damage, not rebrand-caused.
2026-06-19 18:44:26 -07:00

149 lines
4.0 KiB
JSON

{
"name": "@hanzo/insights-ai",
"version": "7.9.4",
"description": "Hanzo Insights AI integrations for LLM observability.",
"repository": {
"type": "git",
"url": "git+https://github.com/hanzoinsights/insights-js.git",
"directory": "packages/ai"
},
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"license": "MIT",
"scripts": {
"clean": "rimraf dist",
"test:unit": "jest",
"lint": "eslint src tests",
"lint:fix": "eslint src tests --fix",
"build": "rollup -c",
"dev": "rollup -c --watch",
"prepublishOnly": "pnpm lint && pnpm test:unit && pnpm build",
"package": "pnpm pack --out $PACKAGE_DEST/%s.tgz"
},
"devDependencies": {
"@ai-sdk/provider": "^3.0.8",
"@openai/agents": "^0.8.0",
"@openai/agents-core": "^0.8.0",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/core": "^2.0.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.200.0",
"@opentelemetry/otlp-exporter-base": "^0.200.0",
"@opentelemetry/sdk-trace-base": "^2.0.0",
"@babel/preset-env": "catalog:",
"@babel/preset-typescript": "catalog:",
"@hanzo/insights-tooling-rollup-utils": "workspace:*",
"@hanzo/insights-tooling-tsconfig-base": "workspace:*",
"@types/jest": "catalog:",
"jest": "catalog:",
"node-fetch": "^3.3.2",
"@hanzo/insights-node": "workspace:*"
},
"keywords": [
"hanzo",
"insights",
"ai",
"openai",
"anthropic",
"gemini",
"llm",
"observability",
"agents"
],
"engines": {
"node": "^20.20.0 || >=22.22.0"
},
"dependencies": {
"@anthropic-ai/sdk": "^0.78.0",
"@google/genai": "^1.43.0",
"@langchain/core": "^1.1.29",
"@hanzo/insights-core": "workspace:*",
"langchain": "^1.2.28",
"openai": "^6.25.0",
"uuid": "^11.1.0",
"zod": "^4.1.13"
},
"peerDependencies": {
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/exporter-trace-otlp-http": ">=0.200.0 <1.0.0",
"@opentelemetry/sdk-trace-base": "^2.0.0",
"@ai-sdk/provider": "^2.0.0 || ^3.0.0",
"@hanzo/insights-node": "^5.0.0"
},
"peerDependenciesMeta": {
"@opentelemetry/api": {
"optional": true
},
"@opentelemetry/exporter-trace-otlp-http": {
"optional": true
},
"@opentelemetry/sdk-trace-base": {
"optional": true
},
"@ai-sdk/provider": {
"optional": true
},
"@openai/agents": {
"optional": true
}
},
"files": [
"dist"
],
"exports": {
".": {
"require": "./dist/index.cjs",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
},
"./anthropic": {
"require": "./dist/anthropic/index.cjs",
"import": "./dist/anthropic/index.mjs",
"types": "./dist/anthropic/index.d.ts"
},
"./gemini": {
"require": "./dist/gemini/index.cjs",
"import": "./dist/gemini/index.mjs",
"types": "./dist/gemini/index.d.ts"
},
"./openai": {
"require": "./dist/openai/index.cjs",
"import": "./dist/openai/index.mjs",
"types": "./dist/openai/index.d.ts"
},
"./vercel": {
"require": "./dist/vercel/index.cjs",
"import": "./dist/vercel/index.mjs",
"types": "./dist/vercel/index.d.ts"
},
"./otel": {
"require": "./dist/otel/index.cjs",
"import": "./dist/otel/index.mjs",
"types": "./dist/otel/index.d.ts"
},
"./langchain": {
"require": "./dist/langchain/index.cjs",
"import": "./dist/langchain/index.mjs",
"types": "./dist/langchain/index.d.ts"
},
"./openai-agents": {
"require": "./dist/openai-agents/index.cjs",
"import": "./dist/openai-agents/index.mjs",
"types": "./dist/openai-agents/index.d.ts"
}
},
"directories": {
"lib": "lib",
"test": "tests"
},
"author": {
"name": "Hanzo AI",
"email": "[email protected]",
"url": "https://hanzo.ai"
},
"bugs": {
"url": "https://github.com/hanzoinsights/insights-js/issues"
},
"homepage": "https://docs.hanzo.ai/insights/ai"
}