Files
copilotkit__copilotkit/packages/shared/package.json
QA Agent c7db5bdccd fix(shared): extract isTelemetryDisabled to separate module for Node-free stub
Addresses PR feedback: the telemetry stub was re-exporting isTelemetryDisabled
from telemetry-client.ts, which imports @segment/analytics-node. This caused
the stub to pull in Node-only dependencies despite its purpose being a
client-safe no-op implementation.

Changes:
- Created packages/shared/src/telemetry/env-check.ts with only process.env checks
- Updated telemetry-client.ts to import isTelemetryDisabled from env-check
- Updated telemetry-stub.ts to import from env-check instead of telemetry-client
- Updated telemetry/index.ts to export isTelemetryDisabled from env-check
- Updated test imports to use the new module

Verified: dist/telemetry-stub.* contains no references to @segment/analytics-node
2026-07-14 10:37:42 -07:00

87 lines
2.2 KiB
JSON

{
"name": "@copilotkit/shared",
"version": "1.62.3",
"private": false,
"keywords": [
"ai",
"assistant",
"automation",
"copilot",
"copilotkit",
"javascript",
"nextjs",
"nodejs",
"react",
"textarea"
],
"homepage": "https://github.com/CopilotKit/CopilotKit",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/CopilotKit/CopilotKit.git"
},
"type": "module",
"sideEffects": false,
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.cts",
"unpkg": "./dist/index.umd.js",
"jsdelivr": "./dist/index.umd.js",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
},
"./telemetry-server": {
"import": "./dist/telemetry-server.mjs",
"require": "./dist/telemetry-server.cjs"
},
"./telemetry-stub": {
"import": "./dist/telemetry-stub.mjs",
"require": "./dist/telemetry-stub.cjs"
},
"./package.json": "./package.json"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "tsdown",
"compat-check": "es-check es2022 --module 'dist/**/!(*.umd).{mjs,cjs,js}' && es-check es2018 'dist/**/*.umd.js'",
"dev": "tsdown --watch",
"test": "vitest run",
"test:watch": "vitest",
"check-types": "tsc --noEmit",
"link:global": "pnpm link --global",
"unlink:global": "pnpm unlink --global",
"publint": "publint . && node scripts/verify-cjs-exports.cjs",
"attw": "attw --pack . --profile node16"
},
"dependencies": {
"@ag-ui/client": "0.0.57",
"@copilotkit/license-verifier": "~0.5.0",
"@segment/analytics-node": "^2.1.2",
"@standard-schema/spec": "^1.0.0",
"chalk": "4.1.2",
"graphql": "^16.8.1",
"partial-json": "^0.1.7",
"uuid": "^11.1.0",
"zod": "^3.23.3",
"zod-to-json-schema": "^3.23.5"
},
"devDependencies": {
"@types/uuid": "^10.0.0",
"@valibot/to-json-schema": "^1.5.0",
"arktype": "^2.1.29",
"eslint": "^8.56.0",
"tsconfig": "workspace:*",
"tsdown": "^0.20.3",
"typescript": "^5.2.3",
"valibot": "^1.2.0",
"vitest": "^3.2.4"
},
"peerDependencies": {
"@ag-ui/core": ">=0.0.48"
}
}