{"_id":"@agentwatch-ai/bridge","_rev":"9-cb05cddefd0c64627b71e3b35290bd44","name":"@agentwatch-ai/bridge","dist-tags":{"latest":"0.2.6"},"versions":{"0.1.0":{"name":"@agentwatch-ai/bridge","version":"0.1.0","keywords":["telemetry","opentelemetry","claude-code","codex","ai-coding-agents","ai-cost","cost-attribution","feature-cost","observability","hooks"],"license":"MIT","_id":"@agentwatch-ai/bridge@0.1.0","maintainers":[{"name":"arepetskyi","email":"a.repetskyi@gmail.com"}],"homepage":"https://github.com/agentwatch/bridge#readme","bugs":{"url":"https://github.com/agentwatch/bridge/issues"},"bin":{"agentwatch":"dist/cli.js"},"dist":{"shasum":"ba39f89a9134ce0b1f195bf43dfce9e69360afbe","tarball":"https://registry.npmjs.org/@agentwatch-ai/bridge/-/bridge-0.1.0.tgz","fileCount":62,"integrity":"sha512-HiZPDtJnFnK2IJzCf2+VBCOOfpC4nHeX2d/6zCrsB5+q7D6OHMTaj9iLsOTDE/ohFVTIlqMsIDy02+IXGXsUEw==","signatures":[{"sig":"MEUCIQCVZr2L4g8YbdgiqqPFQCkHFv4beFM9cJBeaU/Ua2w6bQIgHDnDpfeRtIJfoYZUnjHpaU477PLEjWVEjxc41O9dHzo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":232707},"type":"module","engines":{"node":">=20"},"exports":{"./otlp":"./dist/otlp/normalize.js","./events":"./dist/events/product-event.js","./llm-call":"./dist/events/llm-call.js","./turn-summary":"./dist/turns/turn-summary.js","./aggregate-turn":"./dist/turns/aggregate-usage.js"},"gitHead":"dbc524d8761e3b572a298c86e295da0ca2f2bf56","scripts":{"lint":"eslint src tests","test":"vitest run","build":"tsc -p tsconfig.build.json","example":"node example/server.mjs","prepack":"npm run build","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"arepetskyi","email":"a.repetskyi@gmail.com"},"repository":{"url":"git+https://github.com/agentwatch/bridge.git","type":"git"},"_npmVersion":"11.8.0","description":"Telemetry bridge for Claude Code and Codex that attributes native OTel token costs to Git branches, Jira tickets and features.","directories":{},"_nodeVersion":"24.13.1","dependencies":{"zod":"^3.24.0","smol-toml":"^1.3.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.17.0","vitest":"^2.1.8","@eslint/js":"^9.17.0","typescript":"^5.7.0","@types/node":"^22.10.0","typescript-eslint":"^8.19.0"},"_npmOperationalInternal":{"tmp":"tmp/bridge_0.1.0_1786362579609_0.2802669198849377","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@agentwatch-ai/bridge","version":"0.1.1","keywords":["telemetry","opentelemetry","claude-code","codex","ai-coding-agents","ai-cost","cost-attribution","feature-cost","observability","hooks"],"license":"MIT","_id":"@agentwatch-ai/bridge@0.1.1","maintainers":[{"name":"arepetskyi","email":"a.repetskyi@gmail.com"}],"homepage":"https://github.com/alexrepetskyi/agentwatch#readme","bugs":{"url":"https://github.com/alexrepetskyi/agentwatch/issues"},"bin":{"agentwatch":"dist/cli.js"},"dist":{"shasum":"4d05361d2ceb3b89ce881354a9dcad7f288e9d8a","tarball":"https://registry.npmjs.org/@agentwatch-ai/bridge/-/bridge-0.1.1.tgz","fileCount":62,"integrity":"sha512-ZrjJ4XmBDzYGtNTjpILujmt4IGIqeZqy0J96Uda0w/zVIcCLOBeQ7zAW9OrGCY77PEcZYBSgj+1YGOGAJwGkFw==","signatures":[{"sig":"MEUCIQC4mw47zKui7JENXLPH/QhTwu91nzCiuoYb8x5ZqmbKAQIgBaavfW0sABwWPorbIvDLNY4sPBq9wLTj9I+seP3XnOc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":222624},"type":"module","engines":{"node":">=20"},"exports":{"./otlp":"./dist/otlp/normalize.js","./events":"./dist/events/product-event.js","./llm-call":"./dist/events/llm-call.js","./turn-summary":"./dist/turns/turn-summary.js","./aggregate-turn":"./dist/turns/aggregate-usage.js"},"gitHead":"dbc524d8761e3b572a298c86e295da0ca2f2bf56","scripts":{"lint":"eslint src tests","test":"vitest run","build":"tsc -p tsconfig.build.json","example":"node example/server.mjs","prepack":"npm run build","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"arepetskyi","email":"a.repetskyi@gmail.com"},"repository":{"url":"git+https://github.com/alexrepetskyi/agentwatch.git","type":"git"},"_npmVersion":"11.8.0","description":"Telemetry bridge for Claude Code and Codex that attributes native OTel token costs to Git branches, Jira tickets and features.","directories":{},"_nodeVersion":"24.13.1","dependencies":{"zod":"^3.24.0","smol-toml":"^1.3.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.17.0","vitest":"^2.1.8","@eslint/js":"^9.17.0","typescript":"^5.7.0","@types/node":"^22.10.0","typescript-eslint":"^8.19.0"},"_npmOperationalInternal":{"tmp":"tmp/bridge_0.1.1_1786363126501_0.544341845339638","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@agentwatch-ai/bridge","version":"0.2.0","keywords":["telemetry","opentelemetry","claude-code","codex","ai-coding-agents","ai-cost","cost-attribution","feature-cost","observability","hooks"],"license":"MIT","_id":"@agentwatch-ai/bridge@0.2.0","maintainers":[{"name":"arepetskyi","email":"a.repetskyi@gmail.com"}],"homepage":"https://github.com/alexrepetskyi/agentwatch#readme","bugs":{"url":"https://github.com/alexrepetskyi/agentwatch/issues"},"bin":{"agentwatch":"dist/cli.js"},"dist":{"shasum":"e7296f8a6f1a451dcbfc6c8acf10b5654e9a10ee","tarball":"https://registry.npmjs.org/@agentwatch-ai/bridge/-/bridge-0.2.0.tgz","fileCount":136,"integrity":"sha512-+rXwOBhUwNrW0wUVEfzGSANqxuwSxsnXwNoCPDydLtFgr++0grc9abdn9pOTZc3xBxwhQMJRxGPIZErC9TH1QA==","signatures":[{"sig":"MEUCIB0iyC1GoFglq4p2iqI44Yfs5t6jYIuRikddDM3ULL3eAiEAxmn6GpFYIR62DhKs6sgqRWNYN/ygktbCnPqFFT34Jlo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":363831},"type":"module","engines":{"node":">=20"},"exports":{"./otlp":{"types":"./dist/otlp/normalize.d.ts","default":"./dist/otlp/normalize.js"},"./events":{"types":"./dist/events/product-event.d.ts","default":"./dist/events/product-event.js"},"./llm-call":{"types":"./dist/events/llm-call.d.ts","default":"./dist/events/llm-call.js"},"./turn-summary":{"types":"./dist/turns/turn-summary.d.ts","default":"./dist/turns/turn-summary.js"},"./aggregate-turn":{"types":"./dist/turns/aggregate-usage.d.ts","default":"./dist/turns/aggregate-usage.js"}},"gitHead":"fa75ff7c26d1e5dad12111599f92b2d2661a461c","scripts":{"lint":"eslint src tests","test":"vitest run","build":"tsc -p tsconfig.build.json","example":"node example/server.mjs","prepack":"npm run build","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"arepetskyi","email":"a.repetskyi@gmail.com"},"repository":{"url":"git+https://github.com/alexrepetskyi/agentwatch.git","type":"git"},"_npmVersion":"11.8.0","description":"Connect Claude Code, Codex and Cursor telemetry to your backend with turn, Git and ticket-key attribution.","directories":{},"_nodeVersion":"24.13.1","dependencies":{"zod":"^3.24.0","smol-toml":"^1.3.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.17.0","vitest":"^2.1.8","@eslint/js":"^9.17.0","typescript":"^5.7.0","@types/node":"^22.10.0","typescript-eslint":"^8.19.0"},"_npmOperationalInternal":{"tmp":"tmp/bridge_0.2.0_1786530394720_0.23849415856529999","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@agentwatch-ai/bridge","version":"0.2.1","keywords":["telemetry","opentelemetry","claude-code","codex","ai-coding-agents","ai-cost","cost-attribution","feature-cost","observability","hooks"],"license":"MIT","_id":"@agentwatch-ai/bridge@0.2.1","maintainers":[{"name":"arepetskyi","email":"a.repetskyi@gmail.com"}],"homepage":"https://github.com/alexrepetskyi/agentwatch#readme","bugs":{"url":"https://github.com/alexrepetskyi/agentwatch/issues"},"bin":{"agentwatch":"dist/cli.js"},"dist":{"shasum":"07d9826cc70810163bdad4ec40472d40c853f1df","tarball":"https://registry.npmjs.org/@agentwatch-ai/bridge/-/bridge-0.2.1.tgz","fileCount":138,"integrity":"sha512-9fHlTFpGe6+Egu2UFBFsRJrAzHR4p7t+4e56xNFFTzzNicSo4ibOzkkAhJraL4vq27tUQ41eQLKicym66KvYxw==","signatures":[{"sig":"MEUCICivhrS9cAJcz0vG47iSFEz6ZBR5GzaBjq3TTinmFXe0AiEAi/ucFx5qRnC91Xfc7q+PLGOnCVi/UE+RTrQ8nh+IQfY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":374747},"type":"module","engines":{"node":">=20"},"exports":{"./otlp":{"types":"./dist/otlp/normalize.d.ts","default":"./dist/otlp/normalize.js"},"./events":{"types":"./dist/events/product-event.d.ts","default":"./dist/events/product-event.js"},"./llm-call":{"types":"./dist/events/llm-call.d.ts","default":"./dist/events/llm-call.js"},"./turn-summary":{"types":"./dist/turns/turn-summary.d.ts","default":"./dist/turns/turn-summary.js"},"./aggregate-turn":{"types":"./dist/turns/aggregate-usage.d.ts","default":"./dist/turns/aggregate-usage.js"}},"gitHead":"5d73929560fd0fea56aab0bc3151861e1e0d5897","scripts":{"lint":"eslint src tests","test":"vitest run","build":"tsc -p tsconfig.build.json","example":"node example/server.mjs","prepack":"npm run build","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"arepetskyi","email":"a.repetskyi@gmail.com"},"repository":{"url":"git+https://github.com/alexrepetskyi/agentwatch.git","type":"git"},"_npmVersion":"11.8.0","description":"Connect Claude Code, Codex and Cursor telemetry to your backend with turn, Git and ticket-key attribution.","directories":{},"_nodeVersion":"24.13.1","dependencies":{"zod":"^3.24.0","smol-toml":"^1.3.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.17.0","vitest":"^2.1.8","@eslint/js":"^9.17.0","typescript":"^5.7.0","@types/node":"^22.10.0","typescript-eslint":"^8.19.0"},"_npmOperationalInternal":{"tmp":"tmp/bridge_0.2.1_1786818915589_0.17713227512944085","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@agentwatch-ai/bridge","version":"0.2.2","keywords":["telemetry","opentelemetry","claude-code","codex","ai-coding-agents","ai-cost","cost-attribution","feature-cost","observability","hooks"],"license":"MIT","_id":"@agentwatch-ai/bridge@0.2.2","maintainers":[{"name":"arepetskyi","email":"a.repetskyi@gmail.com"}],"homepage":"https://github.com/alexrepetskyi/agentwatch#readme","bugs":{"url":"https://github.com/alexrepetskyi/agentwatch/issues"},"bin":{"agentwatch":"dist/cli.js"},"dist":{"shasum":"428bc277b7883c6d0ec60bf447c1b069de05e6e3","tarball":"https://registry.npmjs.org/@agentwatch-ai/bridge/-/bridge-0.2.2.tgz","fileCount":148,"integrity":"sha512-pcfQw3xcmXlKw3Xx4suNbpZRgrTfIzdSArkfLggtpgVDrz1W+jso3NxJwzfVhvJDHQ101LbK0GqfL68GiIBJ2g==","signatures":[{"sig":"MEUCIQD36VWF8vcPsaTqCquLDJCjY//AfOEiCTUjcmjfW+rpjAIgPjueaHIfGVKfno+NgVdTXtWnHijs6BmsF9bKsi5s8do=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":406258},"type":"module","engines":{"node":">=20"},"exports":{"./otlp":{"types":"./dist/otlp/normalize.d.ts","default":"./dist/otlp/normalize.js"},"./events":{"types":"./dist/events/product-event.d.ts","default":"./dist/events/product-event.js"},"./llm-call":{"types":"./dist/events/llm-call.d.ts","default":"./dist/events/llm-call.js"},"./turn-summary":{"types":"./dist/turns/turn-summary.d.ts","default":"./dist/turns/turn-summary.js"},"./aggregate-turn":{"types":"./dist/turns/aggregate-usage.d.ts","default":"./dist/turns/aggregate-usage.js"}},"gitHead":"aaf392e69e493461de78f165a8740b1dd0e3d40c","scripts":{"lint":"eslint src tests","test":"vitest run","build":"tsc -p tsconfig.build.json","example":"node example/server.mjs","prepack":"npm run build","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"arepetskyi","email":"a.repetskyi@gmail.com"},"repository":{"url":"git+https://github.com/alexrepetskyi/agentwatch.git","type":"git"},"_npmVersion":"11.8.0","description":"Connect Claude Code, Codex and Cursor telemetry to your backend with turn, Git and ticket-key attribution.","directories":{},"_nodeVersion":"24.13.1","dependencies":{"zod":"^3.24.0","smol-toml":"^1.3.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.17.0","vitest":"^2.1.8","@eslint/js":"^9.17.0","typescript":"^5.7.0","@types/node":"^22.10.0","typescript-eslint":"^8.19.0"},"_npmOperationalInternal":{"tmp":"tmp/bridge_0.2.2_1787138092875_0.9996738839336539","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@agentwatch-ai/bridge","version":"0.2.3","keywords":["telemetry","opentelemetry","claude-code","codex","ai-coding-agents","ai-cost","cost-attribution","feature-cost","observability","hooks"],"license":"MIT","_id":"@agentwatch-ai/bridge@0.2.3","maintainers":[{"name":"arepetskyi","email":"a.repetskyi@gmail.com"}],"homepage":"https://github.com/alexrepetskyi/agentwatch#readme","bugs":{"url":"https://github.com/alexrepetskyi/agentwatch/issues"},"bin":{"agentwatch":"dist/cli.js"},"dist":{"shasum":"e368880038d3f22770bc48ff989a94bde4440e84","tarball":"https://registry.npmjs.org/@agentwatch-ai/bridge/-/bridge-0.2.3.tgz","fileCount":148,"integrity":"sha512-lcetfVxkIlpQIZi4p8vHchaFAmya6jcpFJ9K1WH0CEoGLFroKRlF1FUCUCtZwJ0Nj/xiclmuCanbG/O96lsoBg==","signatures":[{"sig":"MEUCICmOWLXBZs8wS5iGPEymavfsEXa+6wTuNvJb5IjV07R0AiEA4OmduIN5ojWqo8r8HRL++o2XC/YpD6raXuFx+yMj3kQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":407060},"type":"module","engines":{"node":">=20"},"exports":{"./otlp":{"types":"./dist/otlp/normalize.d.ts","default":"./dist/otlp/normalize.js"},"./events":{"types":"./dist/events/product-event.d.ts","default":"./dist/events/product-event.js"},"./llm-call":{"types":"./dist/events/llm-call.d.ts","default":"./dist/events/llm-call.js"},"./turn-summary":{"types":"./dist/turns/turn-summary.d.ts","default":"./dist/turns/turn-summary.js"},"./aggregate-turn":{"types":"./dist/turns/aggregate-usage.d.ts","default":"./dist/turns/aggregate-usage.js"}},"gitHead":"12bfd279d256049dbf9a3046d67eb4c9e3688a27","scripts":{"lint":"eslint src tests","test":"vitest run","build":"tsc -p tsconfig.build.json","example":"node example/server.mjs","prepack":"npm run build","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"arepetskyi","email":"a.repetskyi@gmail.com"},"repository":{"url":"git+https://github.com/alexrepetskyi/agentwatch.git","type":"git"},"_npmVersion":"11.8.0","description":"Connect Claude Code, Codex and Cursor telemetry to your backend with turn, Git and ticket-key attribution.","directories":{},"_nodeVersion":"24.13.1","dependencies":{"zod":"^3.24.0","smol-toml":"^1.3.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.17.0","vitest":"^2.1.8","@eslint/js":"^9.17.0","typescript":"^5.7.0","@types/node":"^22.10.0","patch-package":"^8.0.1","typescript-eslint":"^8.19.0"},"_npmOperationalInternal":{"tmp":"tmp/bridge_0.2.3_1787153745770_0.4319726639244308","host":"s3://npm-registry-packages-npm-production"}},"0.2.4":{"name":"@agentwatch-ai/bridge","version":"0.2.4","keywords":["telemetry","opentelemetry","claude-code","codex","ai-coding-agents","ai-cost","cost-attribution","feature-cost","observability","hooks"],"license":"MIT","_id":"@agentwatch-ai/bridge@0.2.4","maintainers":[{"name":"arepetskyi","email":"a.repetskyi@gmail.com"}],"homepage":"https://github.com/alexrepetskyi/agentwatch#readme","bugs":{"url":"https://github.com/alexrepetskyi/agentwatch/issues"},"bin":{"agentwatch":"dist/cli.js"},"dist":{"shasum":"00f4a83c89aefaf440ecc5a19e9b0f7e47872e85","tarball":"https://registry.npmjs.org/@agentwatch-ai/bridge/-/bridge-0.2.4.tgz","fileCount":154,"integrity":"sha512-YvUXGg5EhGqDkM61aOvlXk+UhiqNXJLpBlk461A1AZhz6QrXkyJZa2BGQiaPyPoF29fvOyBhRBjFy25Fl5/9ZQ==","signatures":[{"sig":"MEYCIQCkcINl0m6AXCtTVUNkERwq23f/hcb2n0VoftLpoy/aIAIhAOeNnDeKLsoLqwstNf5laQY8GzUjqZWOpqRucuQ7KEG+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":413252},"type":"module","engines":{"node":">=20"},"exports":{"./otlp":{"types":"./dist/otlp/normalize.d.ts","default":"./dist/otlp/normalize.js"},"./events":{"types":"./dist/events/product-event.d.ts","default":"./dist/events/product-event.js"},"./llm-call":{"types":"./dist/events/llm-call.d.ts","default":"./dist/events/llm-call.js"},"./turn-summary":{"types":"./dist/turns/turn-summary.d.ts","default":"./dist/turns/turn-summary.js"},"./aggregate-turn":{"types":"./dist/turns/aggregate-usage.d.ts","default":"./dist/turns/aggregate-usage.js"}},"gitHead":"8efd7542ffa8c7889fd335c0e0d693c52da835cf","scripts":{"lint":"eslint src tests","test":"vitest run","build":"tsc -p tsconfig.build.json","example":"node example/server.mjs","prepack":"npm run build","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"arepetskyi","email":"a.repetskyi@gmail.com"},"repository":{"url":"git+https://github.com/alexrepetskyi/agentwatch.git","type":"git"},"_npmVersion":"11.8.0","description":"Connect Claude Code, Codex and Cursor telemetry to your backend with turn, Git and ticket-key attribution.","directories":{},"_nodeVersion":"24.13.1","dependencies":{"zod":"^3.24.0","smol-toml":"^1.3.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.17.0","vitest":"^2.1.8","@eslint/js":"^9.17.0","typescript":"^5.7.0","@types/node":"^22.10.0","patch-package":"^8.0.1","typescript-eslint":"^8.19.0"},"_npmOperationalInternal":{"tmp":"tmp/bridge_0.2.4_1787154997574_0.18875936373615287","host":"s3://npm-registry-packages-npm-production"}},"0.2.5":{"name":"@agentwatch-ai/bridge","version":"0.2.5","keywords":["telemetry","opentelemetry","claude-code","codex","ai-coding-agents","ai-cost","cost-attribution","feature-cost","observability","hooks"],"license":"MIT","_id":"@agentwatch-ai/bridge@0.2.5","maintainers":[{"name":"arepetskyi","email":"a.repetskyi@gmail.com"}],"homepage":"https://github.com/alexrepetskyi/agentwatch#readme","bugs":{"url":"https://github.com/alexrepetskyi/agentwatch/issues"},"bin":{"agentwatch":"dist/cli.js"},"dist":{"shasum":"137c39264db225118853cdc48ea33e033a22083c","tarball":"https://registry.npmjs.org/@agentwatch-ai/bridge/-/bridge-0.2.5.tgz","fileCount":322,"integrity":"sha512-2DuI2CPYRPpSNqsVhEmYbypAyqdg2QX4er33orZh1n20NEr+01yBky+Xb/4meAqflbk/SUFPAqNk+Nb2mYXq6g==","signatures":[{"sig":"MEQCIBF6qBZiGZLdxc6xTyCEnY+8/OVtYn7A/uqUvHvKfcTTAiAar0drOBsSLA0nTZkJWN4rtQSjLeN7NelazU/XbFKUxQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":795393},"type":"module","engines":{"node":">=20"},"exports":{"./otlp":{"types":"./dist/otlp/normalize.d.ts","default":"./dist/otlp/normalize.js"},"./events":{"types":"./dist/events/product-event.d.ts","default":"./dist/events/product-event.js"},"./llm-call":{"types":"./dist/events/llm-call.d.ts","default":"./dist/events/llm-call.js"},"./turn-summary":{"types":"./dist/turns/turn-summary.d.ts","default":"./dist/turns/turn-summary.js"},"./aggregate-turn":{"types":"./dist/turns/aggregate-usage.d.ts","default":"./dist/turns/aggregate-usage.js"}},"gitHead":"77ec1de36e4e4f5e37e6a2a9381fde7775641104","scripts":{"lint":"eslint src tests","test":"vitest run","build":"tsc -p tsconfig.build.json","example":"node example/server.mjs","prepack":"npm run build","prepare":"npm run build","lint:fix":"eslint src tests --fix","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"arepetskyi","email":"a.repetskyi@gmail.com"},"repository":{"url":"git+https://github.com/alexrepetskyi/agentwatch.git","type":"git"},"_npmVersion":"11.8.0","description":"Connect Claude Code, Codex and Cursor telemetry to your backend with turn, Git and ticket-key attribution.","directories":{},"_nodeVersion":"24.13.1","dependencies":{"zod":"^3.24.0","smol-toml":"^1.3.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.17.0","vitest":"^2.1.8","@eslint/js":"^9.17.0","typescript":"^5.7.0","@types/node":"^22.10.0","patch-package":"^8.0.1","typescript-eslint":"^8.19.0","eslint-plugin-jsdoc":"^63.3.3","eslint-plugin-import-x":"^4.17.1","@stylistic/eslint-plugin":"^5.10.0"},"_npmOperationalInternal":{"tmp":"tmp/bridge_0.2.5_1787242538885_0.48236920052379473","host":"s3://npm-registry-packages-npm-production"}},"0.2.6":{"name":"@agentwatch-ai/bridge","version":"0.2.6","description":"Connect Claude Code, Codex and Cursor telemetry to your backend with turn, Git and ticket-key attribution.","license":"MIT","type":"module","engines":{"node":">=20"},"bin":{"agentwatch":"dist/cli.js"},"exports":{"./events":{"types":"./dist/events/product-event.d.ts","default":"./dist/events/product-event.js"},"./llm-call":{"types":"./dist/events/llm-call.d.ts","default":"./dist/events/llm-call.js"},"./otlp":{"types":"./dist/otlp/normalize.d.ts","default":"./dist/otlp/normalize.js"},"./aggregate-turn":{"types":"./dist/turns/aggregate-usage.d.ts","default":"./dist/turns/aggregate-usage.js"},"./turn-summary":{"types":"./dist/turns/turn-summary.d.ts","default":"./dist/turns/turn-summary.js"}},"scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","lint":"eslint src tests","lint:fix":"eslint src tests --fix","test":"vitest run","test:watch":"vitest","example":"node example/server.mjs","prepack":"npm run build","prepare":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/alexrepetskyi/agentwatch.git"},"homepage":"https://github.com/alexrepetskyi/agentwatch#readme","bugs":{"url":"https://github.com/alexrepetskyi/agentwatch/issues"},"keywords":["telemetry","opentelemetry","claude-code","codex","ai-coding-agents","ai-cost","cost-attribution","feature-cost","observability","hooks"],"dependencies":{"smol-toml":"^1.3.1","zod":"^3.24.0"},"devDependencies":{"@eslint/js":"^9.17.0","@stylistic/eslint-plugin":"^5.10.0","@types/node":"^22.10.0","eslint":"^9.17.0","eslint-plugin-import-x":"^4.17.1","eslint-plugin-jsdoc":"^63.3.3","patch-package":"^8.0.1","typescript":"^5.7.0","typescript-eslint":"^8.19.0","vitest":"^2.1.8"},"gitHead":"52ef9eba9e0702a6377fece211d0fb49bc496820","_id":"@agentwatch-ai/bridge@0.2.6","_nodeVersion":"24.13.1","_npmVersion":"11.8.0","dist":{"integrity":"sha512-eiZHbESXonBUiiJKcMSwyLNMYzZ2DASejUOWOmX7mXDcjVfP+NpA8e6h59HsCR5GdIzhlOU4F+nLWd7Spt5k+A==","shasum":"8230167594fa9c8b6c2bd2ef5bff076653b30996","tarball":"https://registry.npmjs.org/@agentwatch-ai/bridge/-/bridge-0.2.6.tgz","fileCount":344,"unpackedSize":845251,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIB+nTrV/VdlH3NXNJJQoT3gZBfK8kr2Y4HLN4JgRGOuUAiAUuWAMUDhlUO76P9PrlWJGjYcd+pFTJmdqFLoNINEluQ=="}]},"_npmUser":{"name":"arepetskyi","email":"a.repetskyi@gmail.com"},"directories":{},"maintainers":[{"name":"arepetskyi","email":"a.repetskyi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bridge_0.2.6_1787814879131_0.9855237183785901"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-10T11:49:39.489Z","modified":"2026-08-27T07:14:39.502Z","0.1.0":"2026-08-10T11:49:39.759Z","0.1.1":"2026-08-10T11:58:46.649Z","0.2.0":"2026-08-12T10:26:34.892Z","0.2.1":"2026-08-15T18:35:15.745Z","0.2.2":"2026-08-19T11:14:53.034Z","0.2.3":"2026-08-19T15:35:45.973Z","0.2.4":"2026-08-19T15:56:37.730Z","0.2.5":"2026-08-20T16:15:39.052Z","0.2.6":"2026-08-27T07:14:39.296Z"},"bugs":{"url":"https://github.com/alexrepetskyi/agentwatch/issues"},"license":"MIT","homepage":"https://github.com/alexrepetskyi/agentwatch#readme","keywords":["telemetry","opentelemetry","claude-code","codex","ai-coding-agents","ai-cost","cost-attribution","feature-cost","observability","hooks"],"repository":{"type":"git","url":"git+https://github.com/alexrepetskyi/agentwatch.git"},"description":"Connect Claude Code, Codex and Cursor telemetry to your backend with turn, Git and ticket-key attribution.","maintainers":[{"name":"arepetskyi","email":"a.repetskyi@gmail.com"}],"readme":"# AgentWatch Bridge\n\n[![npm](https://img.shields.io/npm/v/@agentwatch-ai/bridge)](https://www.npmjs.com/package/@agentwatch-ai/bridge)\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\nA lightweight, zero-daemon telemetry bridge for AI coding agents (**Claude Code**, **OpenAI Codex**, **Cursor**, **Gemini CLI**, and **Google Antigravity**).\n\nIt connects agent lifecycle hooks and native OpenTelemetry (OTLP) to your observability backend to attribute LLM usage, costs, tool calls, Git branches, and ticket keys (e.g., `PAY-142`) — without model proxies, MITM intercepts, or background daemons.\n\n---\n\n## Quick Start\n\n**Requirements:** Node.js 20+\n\n```bash\n# 1. Install globally\nnpm install -g @agentwatch-ai/bridge\n\n# 2. Configure with your backend\nagentwatch setup --endpoint https://backend.example.com --token YOUR_TOKEN\n\n# 3. Verify status & diagnostics\nagentwatch status\nagentwatch doctor\n```\n\n---\n\n## Supported Agents & Limitations\n\n| Agent | Hook Configuration | Native OTel Signals | Status |\n|---|---|---|---|\n| **Claude Code** | `~/.claude/settings.json` | Logs, Traces, Metrics | Full support |\n| **OpenAI Codex** | `~/.codex/hooks.json` | Logs, Traces (`~/.codex/config.toml`) | Full support |\n| **Gemini CLI** | `~/.gemini/settings.json` | Logs, Traces, Metrics | Full support |\n| **Cursor** | `~/.cursor/hooks.json` | None | Partial support |\n| **Google Antigravity** | `~/.gemini/config/hooks.json` | None | Partial support |\n\n### Agent Limitations & Notes\n\n* **Claude Code**:\n  * Running sessions must be restarted after `agentwatch setup` to apply telemetry environment variables.\n* **OpenAI Codex**:\n  * Requires trusting new hooks: launch `codex`, type `/hooks`, and approve AgentWatch entries.\n* **Gemini CLI**:\n  * Running sessions must be restarted after setup to load new hooks and OpenTelemetry configuration.\n  * Telemetry is enabled through `GEMINI_TELEMETRY_ENABLED` with `GEMINI_TELEMETRY_TARGET=local`, and the ingest token travels in `OTEL_EXPORTER_OTLP_HEADERS`. Gemini CLI does not support Claude Code's `otelHeadersHelper`.\n* **Google Antigravity**:\n  * **No native token usage**: Antigravity exposes no OpenTelemetry exporter configuration and no readable transcript usage, so `turn.summary` events remain `usage_status: \"pending\"` and carry no cost.\n  * **Turns, not model calls**: a turn is one *execution*. `PreInvocation`/`PostInvocation` bracket the individual model calls inside an execution, and only the `Stop` hook closes a turn.\n  * The prompt is read from `common.lastUserInput` — Antigravity has no user-prompt hook of its own.\n  * Running sessions must be restarted after `agentwatch setup` to load new hooks.\n* **Cursor**:\n  * **No native token usage**: Cursor exposes no token usage in hooks or transcripts, so `turn.summary` events remain `usage_status: \"pending\"`.\n  * **Cursor CLI**: Currently emits only shell hook events. Full hook lifecycle is available only in Cursor IDE sessions.\n  * **Cloud VMs**: Cloud agents do not have access to the local user hook or binary by default; they require an explicit committed `.cursor/hooks.json` and package installation in the cloud environment.\n  * **Tab suggestions**: AgentWatch monitors accepted edits (`afterTabFileEdit`) and intentionally ignores high-frequency `beforeTabFileRead` events.\n\n---\n\n## CLI Commands\n\n```bash\n# Setup & Configuration\nagentwatch setup --endpoint https://backend.example.com    # Interactive / automated setup\nagentwatch config                                         # Print active configuration (secrets redacted)\nagentwatch agents                                         # List detected agents & status\n\n# Diagnostics & Status\nagentwatch status                                         # Backend, queue, and agent health\nagentwatch doctor                                         # Run environment checks (use --json for CI)\n\n# Hook Execution (invoked automatically by agents)\nagentwatch hook --agent claude                            # Process stdin payload from agent\nagentwatch hook --agent codex --dry-run                   # Test hook output without sending\n\n# Telemetry & Teardown\nagentwatch otel-headers                                   # Output formatted OTel headers\nagentwatch uninstall                                      # Remove hooks and restore backups\nagentwatch uninstall --purge                              # Also delete ~/.agentwatch and queues\n```\n\n---\n\n## Parameters & Flags\n\n| Flag | Description | Default |\n|---|---|---|\n| `--endpoint <url>` | Backend base URL for event ingestion | — |\n| `--token <token>` | Bearer token for backend authentication | — |\n| `--developer-email <email>` | Identity attached to turn summaries | `git config user.email` |\n| `--otel <signals>` | OTLP signals exported by agents: `logs`, `traces`, `metrics`, `all`, or `none` | `logs` |\n| `--agent <id>` | Limit command to a single agent (`claude`, `codex`, `cursor`, `gemini`, `antigravity`) | All detected |\n| `--yes`, `--non-interactive` | Non-interactive mode (fail instead of prompting on missing args) | `false` |\n| `--purge` | Used with `uninstall`: removes `~/.agentwatch` and local queues | `false` |\n| `--dry-run` | Used with `hook`: prints canonical events to stdout instead of sending | `false` |\n| `--json` | Used with `doctor`: output machine-readable JSON | `false` |\n| `--verbose` | Print verbose diagnostic logs to stderr | `false` |\n| `--version` | Display bridge version | — |\n\n---\n\n## Configuration\n\n* **Global configuration**: `~/.agentwatch/config.json` (managed via `agentwatch setup`).\n* **Repository overrides**: Place a `.agentwatch.json` in any repository root to adjust content capture:\n\n```json\n{\n  \"capture\": {\n    \"prompts\": true,\n    \"responses\": false,\n    \"toolInput\": true,\n    \"toolOutput\": false,\n    \"git\": true,\n    \"files\": true\n  }\n}\n```\n\n*Note: Infrastructure settings (`endpoint`, `token`, `developerEmail`, `enforcementUrl`) and the\n`delivery`, `otel` and `enforcement` blocks are global-only — a committed repo file cannot redirect\ndelivery or switch off a budget cap for everyone who clones the repository.*\n\n### Budget enforcement (pre-turn check)\n\nWhen a backend budget policy is set to **block** and the developer has breached it, the Bridge stops\nthe turn before the agent's first LLM call: the prompt is refused in the agent's own protocol\n(Claude Code, Codex, Cursor, Gemini CLI) with the backend's explanation shown to the developer.\n\n```json\n{\n  \"enforcement\": { \"enabled\": true, \"timeoutMs\": 300, \"cacheTtlMs\": 60000 }\n}\n```\n\nThe check **fails open, always**. A turn stops only on an explicit `{\"decision\":\"block\",\"message\":\"…\"}`\nfrom `GET <backend>/v1/enforcement/decision`; an unreachable backend, a timeout, any other status and\nany body the Bridge cannot read all let the turn proceed silently. Decisions are cached locally for\n`cacheTtlMs`, so the check costs one bounded request per turn at most. Set `enabled: false` to opt out.\n\nAntigravity is not gated: its pre-invocation hook carries no decision field, so there is no\nprompt-level refusal to send. Its usage is still reported and still raises alerts.\n\nTo try it locally: `BLOCK=1 npm run example` answers every check with a refusal.\n\n---\n\n## Data Flow & Backend Integration\n\n1. **`turn.summary`**: Generated via agent hooks (`POST <backend>/v1/events`). Captures user prompt, tools executed, files touched, Git branch, and ticket keys.\n2. **`llm.call`**: Emitted via native OTLP (`POST <backend>/v1/otlp/v1/logs`). Contains token usage, cost, and latency per model request.\n3. The backend joins `llm.call` to `turn.summary` records using conversation/turn IDs.\n\n### Backend SDK Helpers\n\n```ts\nimport type { ProductEvent } from '@agentwatch-ai/bridge/events';\nimport { normalizeOtlpLogs } from '@agentwatch-ai/bridge/otlp';\nimport { aggregateTurnUsage } from '@agentwatch-ai/bridge/aggregate-turn';\n```\n\n---\n\n## License\n\nMIT © [Aleksandr Repetskyi](https://github.com/alexrepetskyi)\n","readmeFilename":"README.md"}