{"_id":"@donslaine/openclaw-braintrust-otel","_rev":"8-e748a62d968ea715437eea771cc9b474","name":"@donslaine/openclaw-braintrust-otel","dist-tags":{"latest":"0.4.1"},"versions":{"0.1.0":{"name":"@donslaine/openclaw-braintrust-otel","version":"0.1.0","keywords":["openclaw","openclaw-plugin","braintrust","opentelemetry","otel","observability"],"author":{"name":"donslaine"},"license":"MIT","_id":"@donslaine/openclaw-braintrust-otel@0.1.0","maintainers":[{"name":"donslaine","email":"truittpaul39@gmail.com"}],"homepage":"https://github.com/donslaine/openclaw-braintrust-otel#readme","bugs":{"url":"https://github.com/donslaine/openclaw-braintrust-otel/issues"},"dist":{"shasum":"12a4d6bbd2bd5c54cb3d6ec708276bc5f8882586","tarball":"https://registry.npmjs.org/@donslaine/openclaw-braintrust-otel/-/openclaw-braintrust-otel-0.1.0.tgz","fileCount":17,"integrity":"sha512-O4kfmTgSl1J1B6N/YmmJejCZ3CwVohgOx40fwfZDWMpnPcI7QlSJ90iTflbU1kY+v6SyMEAO8aSBqo3BuIy4fw==","signatures":[{"sig":"MEUCIQD+qxgMWsO6j7nRNLvqYgHTCfS8OPPiNfpo3DUPlZXoIQIgCZesvomb2floZXz/Isv4MKxlRCA234CFl2vBASeH0Jo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":54239},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"5b7d252be6882e4041a05460da5e54d843659aeb","scripts":{"test":"vitest run","build":"tsc","typecheck":"tsc --noEmit","test:watch":"vitest","inspect:real":"tsx scripts/inspect-real.ts","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"donslaine","email":"truittpaul39@gmail.com"},"openclaw":{"build":{"openclawVersion":"2026.5.20","pluginSdkVersion":"2026.5.20"},"compat":{"pluginApi":">=2026.5.20","minGatewayVersion":"2026.5.20"},"install":{"npmSpec":"@donslaine/openclaw-braintrust-otel","defaultChoice":"npm"},"extensions":["./dist/index.js"]},"repository":{"url":"git+https://github.com/donslaine/openclaw-braintrust-otel.git","type":"git"},"_npmVersion":"11.11.0","description":"OpenClaw plugin: subscribes to internal diagnostics and emits Braintrust-shaped OTEL spans","directories":{},"_nodeVersion":"24.14.1","dependencies":{"@opentelemetry/api":"1.9.1","@opentelemetry/resources":"2.7.1","@opentelemetry/sdk-trace-base":"2.7.1","@opentelemetry/semantic-conventions":"1.41.1","@opentelemetry/exporter-trace-otlp-proto":"0.218.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","vitest":"^4.1.7","openclaw":"^2026.5.20","typescript":"^5.6.3","@types/node":"^22.10.2","@vitest/coverage-v8":"^4.1.7"},"peerDependencies":{"openclaw":">=2026.5.20"},"_npmOperationalInternal":{"tmp":"tmp/openclaw-braintrust-otel_0.1.0_1779805993293_0.89356919373098","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@donslaine/openclaw-braintrust-otel","version":"0.2.0","keywords":["openclaw","openclaw-plugin","braintrust","opentelemetry","otel","observability"],"author":{"name":"donslaine"},"license":"MIT","_id":"@donslaine/openclaw-braintrust-otel@0.2.0","maintainers":[{"name":"donslaine","email":"truittpaul39@gmail.com"}],"homepage":"https://github.com/donslaine/openclaw-braintrust-otel#readme","bugs":{"url":"https://github.com/donslaine/openclaw-braintrust-otel/issues"},"dist":{"shasum":"58bee15ca4efc2a44a367998ac99f695849701aa","tarball":"https://registry.npmjs.org/@donslaine/openclaw-braintrust-otel/-/openclaw-braintrust-otel-0.2.0.tgz","fileCount":25,"integrity":"sha512-9OIz8x8abkXA6gg49UMcku2U7PEvjjnPWh5BYIhsN1W+AnMEASa9p8McBqFJnHOvc4aDtn6WQ9YGQLXnvY6/kw==","signatures":[{"sig":"MEYCIQC2C9e3BtgTIKDK92MgmbSiOoFO50QCUqo9XyNYvNyR7QIhALK8ej0JMrhUy5hhGZ0KDHiUYa9B8fb8en9jtr9Qfj5S","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@donslaine%2fopenclaw-braintrust-otel@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":106226},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"ea21a8e09e3aef1b456ea9ef57e7272f8882a9b5","scripts":{"lint":"eslint .","test":"vitest run","build":"tsc","format":"prettier --write .","lint:fix":"eslint . --fix","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"prettier --check .","inspect:real":"tsx scripts/inspect-real.ts","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1a1ceca4-7f84-478f-8b37-9a08e468886e"}},"openclaw":{"build":{"openclawVersion":"2026.5.20","pluginSdkVersion":"2026.5.20"},"compat":{"pluginApi":">=2026.5.20","minGatewayVersion":"2026.5.20"},"install":{"npmSpec":"@donslaine/openclaw-braintrust-otel","defaultChoice":"npm"},"extensions":["./dist/index.js"]},"repository":{"url":"git+https://github.com/donslaine/openclaw-braintrust-otel.git","type":"git"},"_npmVersion":"11.16.0","description":"OpenClaw plugin: subscribes to internal diagnostics and emits Braintrust-shaped OTEL spans","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@opentelemetry/api":"1.9.1","@opentelemetry/resources":"2.7.1","@opentelemetry/sdk-trace-base":"2.7.1","@opentelemetry/semantic-conventions":"1.41.1","@opentelemetry/exporter-trace-otlp-proto":"0.218.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","eslint":"^10.4.0","vitest":"^4.1.7","openclaw":"^2026.5.20","prettier":"^3.8.3","@eslint/js":"^10.0.1","typescript":"^5.6.3","@types/node":"^22.10.2","typescript-eslint":"^8.60.0","@vitest/coverage-v8":"^4.1.7"},"peerDependencies":{"openclaw":">=2026.5.20"},"_npmOperationalInternal":{"tmp":"tmp/openclaw-braintrust-otel_0.2.0_1779970792740_0.46758791404734135","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@donslaine/openclaw-braintrust-otel","version":"0.2.1","keywords":["openclaw","openclaw-plugin","braintrust","opentelemetry","otel","observability"],"author":{"name":"donslaine"},"license":"MIT","_id":"@donslaine/openclaw-braintrust-otel@0.2.1","maintainers":[{"name":"donslaine","email":"truittpaul39@gmail.com"}],"homepage":"https://github.com/donslaine/openclaw-braintrust-otel#readme","bugs":{"url":"https://github.com/donslaine/openclaw-braintrust-otel/issues"},"dist":{"shasum":"f94517867d2ace16ee52cb160cd9b9208f6080c4","tarball":"https://registry.npmjs.org/@donslaine/openclaw-braintrust-otel/-/openclaw-braintrust-otel-0.2.1.tgz","fileCount":25,"integrity":"sha512-5kUvst6ei/wd5TlkrjMX2Op70MLUm/rrxSvMocp1/SGfjPhEL3Ko4lGcGg9yRCYXDl6asWwxZazXkiDyXZnhXg==","signatures":[{"sig":"MEUCIQDFJTzGjhX+pgJe7bmxeWqPI8a/5rXJVskSHAyboBLfgAIgdfo8qGps0h+j5YUhCg7DgVxv0Uu0ClE5rmAXY2QZsno=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@donslaine%2fopenclaw-braintrust-otel@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":120213},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"98bcbbb50ef7d46a92d9faba1b968c2b64361855","scripts":{"lint":"eslint .","test":"vitest run","build":"tsc","format":"prettier --write .","lint:fix":"eslint . --fix","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"prettier --check .","inspect:real":"tsx scripts/inspect-real.ts","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1a1ceca4-7f84-478f-8b37-9a08e468886e"}},"openclaw":{"build":{"openclawVersion":"2026.5.20","pluginSdkVersion":"2026.5.20"},"compat":{"pluginApi":">=2026.5.20","minGatewayVersion":"2026.5.20"},"install":{"npmSpec":"@donslaine/openclaw-braintrust-otel","defaultChoice":"npm"},"extensions":["./dist/index.js"]},"repository":{"url":"git+https://github.com/donslaine/openclaw-braintrust-otel.git","type":"git"},"_npmVersion":"11.16.0","description":"OpenClaw plugin: subscribes to internal diagnostics and emits Braintrust-shaped OTEL spans","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@opentelemetry/api":"1.9.1","@opentelemetry/resources":"2.7.1","@opentelemetry/sdk-trace-base":"2.7.1","@opentelemetry/semantic-conventions":"1.41.1","@opentelemetry/exporter-trace-otlp-proto":"0.218.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","eslint":"^10.4.0","vitest":"^4.1.7","openclaw":"^2026.5.20","prettier":"^3.8.3","@eslint/js":"^10.0.1","typescript":"^5.6.3","@types/node":"^22.10.2","typescript-eslint":"^8.60.0","@vitest/coverage-v8":"^4.1.7"},"peerDependencies":{"openclaw":">=2026.5.20"},"_npmOperationalInternal":{"tmp":"tmp/openclaw-braintrust-otel_0.2.1_1779983539575_0.822317681422611","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@donslaine/openclaw-braintrust-otel","version":"0.3.0","keywords":["openclaw","openclaw-plugin","braintrust","opentelemetry","otel","observability"],"author":{"name":"donslaine"},"license":"MIT","_id":"@donslaine/openclaw-braintrust-otel@0.3.0","maintainers":[{"name":"donslaine","email":"truittpaul39@gmail.com"}],"homepage":"https://github.com/donslaine/openclaw-braintrust-otel#readme","bugs":{"url":"https://github.com/donslaine/openclaw-braintrust-otel/issues"},"dist":{"shasum":"dcc6cfeb412963f0ea7ac0236779c9da17e786dc","tarball":"https://registry.npmjs.org/@donslaine/openclaw-braintrust-otel/-/openclaw-braintrust-otel-0.3.0.tgz","fileCount":25,"integrity":"sha512-+pTF8IldMeaw8Mjk/JDIzTT1IbWl9fgTL/PXFDfnZAgZqokzZn14pZeDv8/33NeYiI++AiGLjS4F0PzeGhcHnw==","signatures":[{"sig":"MEYCIQC37ZQQt5WmuPp75/8GZXqWfJyFK8KJ7zuCDeEUmGfF0QIhAPO6FhJtEEbAwK21gy3AZ/TobFfIyHH1zL5tBtS4s1az","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@donslaine%2fopenclaw-braintrust-otel@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":134634},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"067131dcd802f01849dc346647141cccee6fe933","scripts":{"lint":"eslint .","test":"vitest run","build":"tsc","format":"prettier --write .","lint:fix":"eslint . --fix","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"prettier --check .","inspect:real":"tsx scripts/inspect-real.ts","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1a1ceca4-7f84-478f-8b37-9a08e468886e"}},"openclaw":{"build":{"openclawVersion":"2026.5.20","pluginSdkVersion":"2026.5.20"},"compat":{"pluginApi":">=2026.5.20","minGatewayVersion":"2026.5.20"},"install":{"npmSpec":"@donslaine/openclaw-braintrust-otel","defaultChoice":"npm"},"extensions":["./dist/index.js"]},"repository":{"url":"git+https://github.com/donslaine/openclaw-braintrust-otel.git","type":"git"},"_npmVersion":"11.16.0","description":"OpenClaw plugin: subscribes to internal diagnostics and emits Braintrust-shaped OTEL spans","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@opentelemetry/api":"1.9.1","@opentelemetry/resources":"2.7.1","@opentelemetry/sdk-trace-base":"2.7.1","@opentelemetry/semantic-conventions":"1.41.1","@opentelemetry/exporter-trace-otlp-proto":"0.218.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","eslint":"^10.4.0","vitest":"^4.1.7","openclaw":"^2026.5.20","prettier":"^3.8.3","@eslint/js":"^10.0.1","typescript":"^5.6.3","@types/node":"^22.10.2","typescript-eslint":"^8.60.0","@vitest/coverage-v8":"^4.1.7"},"peerDependencies":{"openclaw":">=2026.5.20"},"_npmOperationalInternal":{"tmp":"tmp/openclaw-braintrust-otel_0.3.0_1779991162949_0.6724886363583602","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@donslaine/openclaw-braintrust-otel","version":"0.3.1","keywords":["openclaw","openclaw-plugin","braintrust","opentelemetry","otel","observability"],"author":{"name":"donslaine"},"license":"MIT","_id":"@donslaine/openclaw-braintrust-otel@0.3.1","maintainers":[{"name":"donslaine","email":"truittpaul39@gmail.com"}],"homepage":"https://github.com/donslaine/openclaw-braintrust-otel#readme","bugs":{"url":"https://github.com/donslaine/openclaw-braintrust-otel/issues"},"dist":{"shasum":"074051a66ab7a3dedeac37a146f151ea1edb7a33","tarball":"https://registry.npmjs.org/@donslaine/openclaw-braintrust-otel/-/openclaw-braintrust-otel-0.3.1.tgz","fileCount":25,"integrity":"sha512-a7pPDw8k8tjuyqboiZNey6fPQbe9CNHAv3HmYXtF9ett3J+iBa9I+3MPx18eFFP4PQNpLNUla6OV3LqsJ64T9Q==","signatures":[{"sig":"MEUCIAJcDed9YJHSiUEONc8hvRK6rAUJ35oH0ML7ta0aOrmmAiEAmNIY6RNT7j/rVyw8TFazaiy9eOBh8eao+edJ/XN/55k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@donslaine%2fopenclaw-braintrust-otel@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":136606},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"87bd322c59b5e07a14630ab97eefb70850162ef0","scripts":{"lint":"eslint .","test":"vitest run","build":"tsc","format":"prettier --write .","lint:fix":"eslint . --fix","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"prettier --check .","inspect:real":"tsx scripts/inspect-real.ts","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1a1ceca4-7f84-478f-8b37-9a08e468886e"}},"openclaw":{"build":{"openclawVersion":"2026.5.20","pluginSdkVersion":"2026.5.20"},"compat":{"pluginApi":">=2026.5.20","minGatewayVersion":"2026.5.20"},"install":{"npmSpec":"@donslaine/openclaw-braintrust-otel","defaultChoice":"npm"},"extensions":["./dist/index.js"]},"repository":{"url":"git+https://github.com/donslaine/openclaw-braintrust-otel.git","type":"git"},"_npmVersion":"11.16.0","description":"OpenClaw plugin: subscribes to internal diagnostics and emits Braintrust-shaped OTEL spans","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@opentelemetry/api":"1.9.1","@opentelemetry/resources":"2.7.1","@opentelemetry/sdk-trace-base":"2.7.1","@opentelemetry/semantic-conventions":"1.41.1","@opentelemetry/exporter-trace-otlp-proto":"0.218.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","eslint":"^10.4.0","vitest":"^4.1.7","openclaw":"^2026.5.20","prettier":"^3.8.3","@eslint/js":"^10.0.1","typescript":"^5.6.3","@types/node":"^22.10.2","typescript-eslint":"^8.60.0","@vitest/coverage-v8":"^4.1.7"},"peerDependencies":{"openclaw":">=2026.5.20"},"_npmOperationalInternal":{"tmp":"tmp/openclaw-braintrust-otel_0.3.1_1780064856750_0.03286175219751075","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@donslaine/openclaw-braintrust-otel","version":"0.3.2","keywords":["openclaw","openclaw-plugin","braintrust","opentelemetry","otel","observability"],"author":{"name":"donslaine"},"license":"MIT","_id":"@donslaine/openclaw-braintrust-otel@0.3.2","maintainers":[{"name":"donslaine","email":"truittpaul39@gmail.com"}],"homepage":"https://github.com/donslaine/openclaw-braintrust-otel#readme","bugs":{"url":"https://github.com/donslaine/openclaw-braintrust-otel/issues"},"dist":{"shasum":"68ba5d7109c3262f90afbeb0e07e5ecdac831142","tarball":"https://registry.npmjs.org/@donslaine/openclaw-braintrust-otel/-/openclaw-braintrust-otel-0.3.2.tgz","fileCount":25,"integrity":"sha512-tBEQLTfCjZxi4NNmrFk3TEGq2A654PVvM40Itr5vmtbWHaOVUPYUYF+k0dVLUYzjgKn7+uSfxjpQ1i6+oXJnzg==","signatures":[{"sig":"MEUCIQCwwTzFMbjQmzsdeNEdMXVu+9JxYl1tHNJvwWWSoWk8ywIgfdtv8ZmugHG3vsKMxfgkbdARGgh5pIJWrziwzDMdpvE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@donslaine%2fopenclaw-braintrust-otel@0.3.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":140406},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"b47d6632b15e5af2354afd4222cf59338367c6a2","scripts":{"lint":"eslint .","test":"vitest run","build":"tsc","format":"prettier --write .","lint:fix":"eslint . --fix","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"prettier --check .","inspect:real":"tsx scripts/inspect-real.ts","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1a1ceca4-7f84-478f-8b37-9a08e468886e"}},"openclaw":{"build":{"openclawVersion":"2026.5.20","pluginSdkVersion":"2026.5.20"},"compat":{"pluginApi":">=2026.5.20","minGatewayVersion":"2026.5.20"},"install":{"npmSpec":"@donslaine/openclaw-braintrust-otel","defaultChoice":"npm"},"extensions":["./dist/index.js"]},"repository":{"url":"git+https://github.com/donslaine/openclaw-braintrust-otel.git","type":"git"},"_npmVersion":"11.16.0","description":"OpenClaw plugin: subscribes to internal diagnostics and emits Braintrust-shaped OTEL spans","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@opentelemetry/api":"1.9.1","@opentelemetry/resources":"2.7.1","@opentelemetry/sdk-trace-base":"2.7.1","@opentelemetry/semantic-conventions":"1.41.1","@opentelemetry/exporter-trace-otlp-proto":"0.218.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","eslint":"^10.4.0","vitest":"^4.1.7","openclaw":"^2026.5.20","prettier":"^3.8.3","@eslint/js":"^10.0.1","typescript":"^5.6.3","@types/node":"^22.10.2","typescript-eslint":"^8.60.0","@vitest/coverage-v8":"^4.1.7"},"peerDependencies":{"openclaw":">=2026.5.20"},"_npmOperationalInternal":{"tmp":"tmp/openclaw-braintrust-otel_0.3.2_1780065842243_0.8245870496289431","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@donslaine/openclaw-braintrust-otel","version":"0.4.0","keywords":["openclaw","openclaw-plugin","braintrust","opentelemetry","otel","observability"],"author":{"name":"donslaine"},"license":"MIT","_id":"@donslaine/openclaw-braintrust-otel@0.4.0","maintainers":[{"name":"donslaine","email":"truittpaul39@gmail.com"}],"homepage":"https://github.com/donslaine/openclaw-braintrust-otel#readme","bugs":{"url":"https://github.com/donslaine/openclaw-braintrust-otel/issues"},"dist":{"shasum":"57e69da57e246b962c3cec554263719239d7cdab","tarball":"https://registry.npmjs.org/@donslaine/openclaw-braintrust-otel/-/openclaw-braintrust-otel-0.4.0.tgz","fileCount":25,"integrity":"sha512-7j/a2ToFT71cwKEZUEMd+zcjTXFRGykcBwYuzQmpM/GVnLr5sqgQdklIdAIIRhxF2K5MqDApjrUMoPdvZsPJdA==","signatures":[{"sig":"MEYCIQDo7pz4Pyp2muDH/1RFT1I3Hn0XEAkl3BAP3G67AN6MUwIhAO4JUgn2nCHNocKTgoWZ2kp+IhSC0D4PxEqTsURL6vrd","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@donslaine%2fopenclaw-braintrust-otel@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":163035},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"f94aaad83356e388213c99049d349b4ee011e0e1","scripts":{"lint":"eslint .","test":"vitest run","build":"tsc","format":"prettier --write .","lint:fix":"eslint . --fix","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"prettier --check .","inspect:real":"tsx scripts/inspect-real.ts","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1a1ceca4-7f84-478f-8b37-9a08e468886e"}},"openclaw":{"build":{"openclawVersion":"2026.5.20","pluginSdkVersion":"2026.5.20"},"compat":{"pluginApi":">=2026.5.20","minGatewayVersion":"2026.5.20"},"install":{"npmSpec":"@donslaine/openclaw-braintrust-otel","defaultChoice":"npm"},"extensions":["./dist/index.js"]},"repository":{"url":"git+https://github.com/donslaine/openclaw-braintrust-otel.git","type":"git"},"_npmVersion":"11.16.0","description":"OpenClaw plugin: subscribes to internal diagnostics and emits Braintrust-shaped OTEL spans","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@opentelemetry/api":"1.9.1","@opentelemetry/resources":"2.7.1","@opentelemetry/sdk-trace-base":"2.7.1","@opentelemetry/semantic-conventions":"1.41.1","@opentelemetry/exporter-trace-otlp-proto":"0.218.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","eslint":"^10.4.0","vitest":"^4.1.7","openclaw":"^2026.5.20","prettier":"^3.8.3","@eslint/js":"^10.0.1","typescript":"^5.6.3","@types/node":"^22.10.2","typescript-eslint":"^8.60.0","@vitest/coverage-v8":"^4.1.7"},"peerDependencies":{"openclaw":">=2026.5.20"},"_npmOperationalInternal":{"tmp":"tmp/openclaw-braintrust-otel_0.4.0_1780422287141_0.11469003140864009","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@donslaine/openclaw-braintrust-otel","version":"0.4.1","description":"OpenClaw plugin: subscribes to internal diagnostics and emits Braintrust-shaped OTEL spans","license":"MIT","author":{"name":"donslaine"},"repository":{"type":"git","url":"git+https://github.com/donslaine/openclaw-braintrust-otel.git"},"homepage":"https://github.com/donslaine/openclaw-braintrust-otel#readme","bugs":{"url":"https://github.com/donslaine/openclaw-braintrust-otel/issues"},"keywords":["openclaw","openclaw-plugin","braintrust","opentelemetry","otel","observability"],"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"tsc","typecheck":"tsc --noEmit","test":"vitest run","test:watch":"vitest","lint":"eslint .","lint:fix":"eslint . --fix","format":"prettier --write .","format:check":"prettier --check .","inspect:real":"tsx scripts/inspect-real.ts","prepublishOnly":"npm run build && npm test"},"dependencies":{"@opentelemetry/api":"1.9.1","@opentelemetry/exporter-trace-otlp-proto":"0.218.0","@opentelemetry/resources":"2.7.1","@opentelemetry/sdk-trace-base":"2.7.1","@opentelemetry/semantic-conventions":"1.41.1"},"peerDependencies":{"openclaw":">=2026.5.20"},"devDependencies":{"@eslint/js":"^10.0.1","@types/node":"^22.10.2","@vitest/coverage-v8":"^4.1.7","eslint":"^10.4.0","openclaw":"^2026.5.20","prettier":"^3.8.3","tsx":"^4.19.2","typescript":"^5.6.3","typescript-eslint":"^8.60.0","vitest":"^4.1.7"},"openclaw":{"extensions":["./dist/index.js"],"compat":{"pluginApi":">=2026.5.20","minGatewayVersion":"2026.5.20"},"build":{"openclawVersion":"2026.5.20","pluginSdkVersion":"2026.5.20"},"install":{"npmSpec":"@donslaine/openclaw-braintrust-otel","defaultChoice":"npm"}},"gitHead":"e5ce3bdc92066959f9b538438e6c431470e87f32","_id":"@donslaine/openclaw-braintrust-otel@0.4.1","_nodeVersion":"22.22.3","_npmVersion":"11.16.0","dist":{"integrity":"sha512-mYsgxDZtvrMp3UvURmcHasaehf/nsBJpmvGWfRbYllm5snZmDoS7Z9gQEBtyneh2y4dlxV279V79R4rnlXY29g==","shasum":"e789cf2839a3e624c33c118b5664075a9783975f","tarball":"https://registry.npmjs.org/@donslaine/openclaw-braintrust-otel/-/openclaw-braintrust-otel-0.4.1.tgz","fileCount":25,"unpackedSize":176634,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@donslaine%2fopenclaw-braintrust-otel@0.4.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCY2CVCa01raHGUaHD/P7TRClGpxJugmD2nZRF3ToTLZwIhALO/DDOajlfG7zqUDBmjNw8eCNu5hDjpbMyVa5FJyGhY"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1a1ceca4-7f84-478f-8b37-9a08e468886e"}},"directories":{},"maintainers":[{"name":"donslaine","email":"truittpaul39@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/openclaw-braintrust-otel_0.4.1_1780490734134_0.6194522240567075"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-26T14:33:12.868Z","modified":"2026-06-03T12:45:34.557Z","0.1.0":"2026-05-26T14:33:13.490Z","0.2.0":"2026-05-28T12:19:52.881Z","0.2.1":"2026-05-28T15:52:19.744Z","0.3.0":"2026-05-28T17:59:23.089Z","0.3.1":"2026-05-29T14:27:36.863Z","0.3.2":"2026-05-29T14:44:02.428Z","0.4.0":"2026-06-02T17:44:47.306Z","0.4.1":"2026-06-03T12:45:34.302Z"},"bugs":{"url":"https://github.com/donslaine/openclaw-braintrust-otel/issues"},"author":{"name":"donslaine"},"license":"MIT","homepage":"https://github.com/donslaine/openclaw-braintrust-otel#readme","keywords":["openclaw","openclaw-plugin","braintrust","opentelemetry","otel","observability"],"repository":{"type":"git","url":"git+https://github.com/donslaine/openclaw-braintrust-otel.git"},"description":"OpenClaw plugin: subscribes to internal diagnostics and emits Braintrust-shaped OTEL spans","maintainers":[{"name":"donslaine","email":"truittpaul39@gmail.com"}],"readme":"# @donslaine/openclaw-braintrust-otel\n\nOpenClaw plugin that subscribes to internal diagnostic events and exports Braintrust-shaped OTLP spans to [Braintrust](https://braintrust.dev).\n\nGives you per-run, per-model-call, per-tool, per-turn observability for any [OpenClaw](https://github.com/openclaw/openclaw) agent — without needing to wrap your model client or instrument tool code.\n\n## What you get\n\nFive span types, all carrying `braintrust.tags`, `braintrust.metadata.service_name`, and session identifiers (raw by default, hashable for client-facing deployments) so any span is filterable by tag, service, or session in Braintrust:\n\n| Span                         | Source events                                                  | Highlights                                                                                                                                                                                                   |\n| ---------------------------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `openclaw.run`               | `run.started/completed`, `harness.run.started/completed/error` | channel, provider, model, trigger, agent, session kind                                                                                                                                                       |\n| `openclaw.model.call`        | typed hooks `model_call_started` / `model_call_ended`          | provider/model/api/transport, request/response bytes, TTFB, duration, error category, upstream request id hash. callId-keyed for reliable 1:1 pairing with each model call within a turn.                    |\n| `openclaw.model.usage`       | `model.usage`                                                  | `prompt_tokens`, `completion_tokens`, `tokens`, `prompt_cached_tokens`, `prompt_cache_creation_tokens`, `cost` (auto-mapped to Braintrust's metrics column), plus per-call deltas and context-budget metrics |\n| `openclaw.tool.execution`    | `tool.execution.started/completed/error/blocked`               | tool name, duration, error category / blocked reason                                                                                                                                                         |\n| `openclaw.context.assembled` | `context.assembled`                                            | per-turn token-budget visibility: message count, history/system/prompt chars, image blocks, context token budget, reserve tokens                                                                             |\n\n`openclaw.run` is the trace root. `model.call`, `tool.execution`, and `context.assembled` parent to it via `runId`. `model.usage` parents to its matching `model.call` span (callId resolved via session lookup with a short TTL across the bus/hook race), falls back to the open `run` span as a backstop, and only goes fully orphan if neither is registered.\n\nWith `captureContent.enabled = true` (see [Eval-grade capture](#eval-grade-capture)), `tool.execution` spans carry full `braintrust.input_json` / `braintrust.output_json`, and the `openclaw.run` span carries `braintrust.input` / `braintrust.output` derived from the run's first prompt and last assistant response. Per-call `braintrust.input_json` / `braintrust.output_json` on `model.call` spans was removed in v0.3.0 because the underlying `llm_input` / `llm_output` hooks fire once per turn (not per call), so per-call attribution was structurally impossible to get right — see CHANGELOG for the v0.2.x bug this fixes.\n\n## Install\n\n```sh\nnpm install @donslaine/openclaw-braintrust-otel\n```\n\nThen add to your OpenClaw plugins config. Set required env vars:\n\n```sh\nexport BRAINTRUST_API_KEY=sk_...\nexport BRAINTRUST_PARENT=project_name:my-agent\nexport BRAINTRUST_SESSION_HASH_SALT=$(openssl rand -hex 16)\n```\n\n## Plugin config\n\nTwo sibling blocks live under `plugins.entries[\"braintrust-otel\"]`: `hooks` (permission grants) and `config` (plugin behavior). Both optional, but **`hooks.allowConversationAccess: true` is required for `braintrust.input` / `braintrust.output` on the run span to populate** (the `llm_input` / `llm_output` hooks are gated as conversation-content access).\n\n```json\n{\n  \"hooks\": {\n    \"allowConversationAccess\": true\n  },\n  \"config\": {\n    \"endpoint\": \"https://api.braintrust.dev/otel\",\n    \"serviceName\": \"openclaw-myagent\",\n    \"tags\": [\"agent-myagent\"],\n    \"sessionIdentifiers\": {\n      \"raw\": true,\n      \"hash\": false,\n      \"hashSaltSecretRef\": \"BRAINTRUST_SESSION_HASH_SALT\"\n    },\n    \"captureContent\": {\n      \"enabled\": false\n    },\n    \"versioning\": {\n      \"agentPromptVersion\": \"jeffery-v3\",\n      \"toolPolicyVersion\": \"default-v2\",\n      \"runbookVersion\": \"m1-runbook-2026-05-28\",\n      \"environment\": \"prod\"\n    }\n  }\n}\n```\n\n- **`hooks.allowConversationAccess`** — required to grant the plugin's `llm_input` / `llm_output` hook subscriptions at the OpenClaw runtime gate. Without this, the plugin still emits lifecycle spans (timing, tool I/O, model.usage, model.call) but `braintrust.input` / `braintrust.output` will be empty on `run` spans. Tool I/O hooks (`before_tool_call` / `after_tool_call`) and per-call hooks (`model_call_started` / `model_call_ended`) do NOT require this grant.\n\n- **`endpoint`** — OTLP base URL (`tracesEndpoint` derives as `${endpoint}/v1/traces`). Defaults to `https://api.braintrust.dev/otel`.\n- **`serviceName`** — value sent as `service.name` resource attribute and Braintrust metadata. Defaults to `openclaw`.\n- **`tags`** — array of strings written to `braintrust.tags` on every span. Filterable in the Braintrust UI.\n- **`sessionIdentifiers.raw`** — emits raw `sessionKey` / `sessionId` / `runId`. **Default true** (v0.3.1+). `sessionId` and `runId` are openclaw-internal UUIDs with no identifying content. `sessionKey` is the channel-native identifier (Telegram chat IDs, phone numbers, Discord user IDs) and IS PII — set to `false` for client-facing deployments and enable `hash` instead.\n- **`sessionIdentifiers.hash`** — emits SHA-256(salt + id) truncated to 16 hex chars under `*_hash` keys. **Default false** (v0.3.1+). Both `raw` and `hash` can be true simultaneously. Required for client-facing deployments where `sessionKey` PII can't land in Braintrust raw.\n- **`sessionIdentifiers.hashSaltSecretRef`** — name of the env var holding the salt. Defaults to `BRAINTRUST_SESSION_HASH_SALT`. Only used when `hash` is true.\n- **`captureContent.enabled`** — when true, exports raw LLM prompts, assistant outputs, tool args, and tool results. **Default false.** See [Eval-grade capture](#eval-grade-capture) for the privacy posture before enabling.\n- **`versioning.*`** — operator labels that travel on every span as top-level `braintrust.metadata.*`. Promoted dataset examples carry them automatically, so experiments can slice regressions by prompt/policy/runbook/environment. `openclaw_version` is added automatically from the resolved openclaw package; the four below are operator-supplied.\n\n## Eval-grade capture\n\n`captureContent.enabled = true` turns this plugin from observability-grade into eval-grade. The same span tree gets:\n\n- `braintrust.input` and `braintrust.output` on `openclaw.run` spans, derived from the first user prompt and the last assistant response of the run.\n- `braintrust.input_json` and `braintrust.output_json` on `openclaw.tool.execution` spans (tool args and result), plus `braintrust.metadata.tool_call_id` and `braintrust.metadata.is_error`.\n\nMechanism: an in-memory `IoBuffer` subscribes to OpenClaw's public typed plugin hooks (`llm_input`, `llm_output`, `before_tool_call`, `after_tool_call`, `model_call_started`, `model_call_ended`) via `api.on(name, handler)` and joins payloads to the matching span at close time. Tool I/O is captured in two phases (args at `before_tool_call`, result at `after_tool_call`) and merged by `toolCallId` at consume time. Hooks register at plugin init but the content-bearing ones (`llm_input` / `llm_output`, tool I/O) no-op until `captureContent.enabled` flips to true.\n\n**Per-call LLM I/O is not captured** as of v0.3.0. The underlying `llm_input` / `llm_output` typed hooks are turn-level — they fire once per turn, regardless of how many model calls the turn contains (compaction calls, retries, tool-result-handling shortcuts can all add additional model calls). v0.2.x tried to attribute the turn-level content to per-call spans and produced silent N:1 mismatches on every multi-call turn. v0.3.0 attributes LLM content to the run span only, which the data accurately supports.\n\n**Activation requirement.** v0.2.1+ declares `activation.onCapabilities: [\"hook\"]` in its manifest so the plugin is automatically considered for gateway startup on OpenClaw ≥ 2026.5.20. Plugins built against older OpenClaw releases that pre-date this manifest field need to be installed against OpenClaw 2026.5.20 or newer.\n\n### Privacy posture\n\n- **Content capture is OFF by default.**\n- When enabled, the plugin exfiltrates raw user prompts, assistant outputs, tool args, and tool results to the configured Braintrust endpoint.\n- This is acceptable **only** when the destination Braintrust instance is internal/admin-only and approved for that data.\n- For client-facing or externally shared deployments: do **not** enable `captureContent` without an explicit per-deployment privacy review. The plugin logs a loud warning at startup whenever the flag is on so accidental enablement is hard to miss.\n- Session identifiers are raw by default as of v0.3.1. Set `sessionIdentifiers.hash = true` (and configure the salt) for client-facing deployments where `sessionKey` carries PII.\n\n## Known limitations\n\n- **Trust gate inconsistency.** Upstream openclaw allowlists only `diagnostics-otel` and `diagnostics-prometheus` to receive `ctx.internalDiagnostics`. However, `onInternalDiagnosticEvent` is publicly exported from `openclaw/plugin-sdk/diagnostic-runtime`, so any plugin can subscribe regardless. This plugin prefers the host-granted `ctx.internalDiagnostics` path when available and falls back to the public SDK export otherwise. The startup log records which path is active (`subscriptionSource: \"ctx\" | \"sdk\"`). The bus is still load-bearing because `run.*`, `model.usage`, `context.assembled`, and `tool.execution.blocked` have no typed-hook equivalents.\n- **`model.usage` parenting is best-effort.** `DiagnosticUsageEvent` carries `sessionKey`/`sessionId` but not `runId` or `callId`. v0.3.0 parents the usage span via, in order: (1) the matching `model.call` span via a dual-keyed session registry with a 5 s post-close TTL across the bus/hook race, (2) the open `run` span via a backstop registry as a fallback, (3) fully orphan when neither is available (groups visually via `session_id` metadata). In practice fully orphan should be rare; the run-backstop catches the case where a usage event arrives outside any model.call window.\n\n## Development\n\n```sh\nnpm install\nnpm run typecheck\nnpm test          # 81 tests: attribute mapping, IoBuffer lifecycle (two-phase tool capture, usage parenting TTL + dual-key + run backstop), integration-shape event→span+hook flow\nnpm run build     # tsc -> dist/\n```\n\nLive trace inspection against Braintrust (requires `BRAINTRUST_API_KEY`):\n\n```sh\nnpm run inspect:real -- --project my-project --tag agent-myagent --summary\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}