{"_id":"@brahmasuite/agent","_rev":"2-30c8d3116e3cd4fa7cca1cfec60580cf","name":"@brahmasuite/agent","dist-tags":{"latest":"0.2.1"},"versions":{"0.2.0":{"name":"@brahmasuite/agent","version":"0.2.0","keywords":["brahmasuite","agent","sdk"],"author":{"name":"Delpat LLP"},"license":"MIT","_id":"@brahmasuite/agent@0.2.0","maintainers":[{"name":"omjagdeesh42","email":"omjagdeesh42@gmail.com"}],"dist":{"shasum":"dafbff024de081797d84258ae72b8fcaa48b4937","tarball":"https://registry.npmjs.org/@brahmasuite/agent/-/agent-0.2.0.tgz","fileCount":70,"integrity":"sha512-1MzQzyx/YYqlxYGLwrLlArsiiBCrpn1nG7nMxyIt2NngQUIHncoq66cgI4ivBZuSR0NgL0174bGOmNiPqRBxJQ==","signatures":[{"sig":"MEUCIHwbjyUTGetFfg4kUyec7ANFuMyhMs/AxpSfO326vmkoAiEA9EX7+AaRZhGbKDE+Y7NTRpjFQ3HW7+0EfUv9oAhyK/Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":207521},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.js"},"./next":{"types":"./dist/next/index.d.ts","import":"./dist/next/index.js","default":"./dist/next/index.js","require":"./dist/next/index.js"},"./react":{"types":"./dist/react/index.d.ts","import":"./dist/react/index.js","default":"./dist/react/index.js","require":"./dist/react/index.js"}},"gitHead":"84d16e315d914e2f2f66ec814c5d09e4c56fa62b","scripts":{"dev":"tsx watch src/index.ts","test":"echo \"Error: no test specified\" && exit 1","build":"tsc","postinstall":"node scripts/postinstall.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"omjagdeesh42","email":"omjagdeesh42@gmail.com"},"_npmVersion":"10.9.8","description":"BrahmaSuite agent SDK for client applications — heartbeat, support, notifications, subscription guard","directories":{},"_nodeVersion":"22.16.0","dependencies":{"axios":"^1.7.0","socket.io-client":"^4.8.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.1","typescript":"^5.0.0","@types/node":"^20.19.43","@types/react":"^19.0.0","@types/express":"^5.0.6"},"peerDependencies":{"react":">=18.0.0"},"peerDependenciesMeta":{"react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/agent_0.2.0_1786001680022_0.33859199564254006","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@brahmasuite/agent","version":"0.2.1","description":"BrahmaSuite agent SDK for client applications — heartbeat, support, notifications, subscription guard","main":"dist/index.js","types":"dist/index.d.ts","type":"commonjs","exports":{".":{"import":"./dist/index.js","require":"./dist/index.js","types":"./dist/index.d.ts","default":"./dist/index.js"},"./react":{"import":"./dist/react/index.js","require":"./dist/react/index.js","types":"./dist/react/index.d.ts","default":"./dist/react/index.js"},"./next":{"import":"./dist/next/index.js","require":"./dist/next/index.js","types":"./dist/next/index.d.ts","default":"./dist/next/index.js"}},"scripts":{"dev":"tsx watch src/index.ts","build":"tsc","prepublishOnly":"npm run build","postinstall":"node scripts/postinstall.js","test":"echo \"Error: no test specified\" && exit 1"},"keywords":["brahmasuite","agent","sdk"],"author":{"name":"Delpat LLP"},"license":"MIT","dependencies":{"axios":"^1.7.0","socket.io-client":"^4.8.3"},"peerDependencies":{"react":">=18.0.0"},"peerDependenciesMeta":{"react":{"optional":true}},"devDependencies":{"@types/express":"^5.0.6","@types/node":"^20.19.43","@types/react":"^19.0.0","tsx":"^4.23.1","typescript":"^5.0.0"},"publishConfig":{"access":"public"},"_id":"@brahmasuite/agent@0.2.1","gitHead":"eba7d24769a1c7b07a7266068f6f757b59f77cad","_nodeVersion":"22.16.0","_npmVersion":"10.9.8","dist":{"integrity":"sha512-UGNrkFHF24fbATZxEArPYq/DNNAhxFUD3KXHDyu7cjHZikIMfMpJG38WrGYsGOtfKE4CQ1VoWKFTghEIckc48A==","shasum":"9c1117d08c9b9d5336e7b375cf5a2c932e8cad5b","tarball":"https://registry.npmjs.org/@brahmasuite/agent/-/agent-0.2.1.tgz","fileCount":70,"unpackedSize":210240,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQChmX0PsamcNJL59RYdUWCRJMM8BhCKNEpFDWvIvNsFCQIhAPfWrXQuhfCrCqF1j7Vya2EceQVszNjGEjsCfa6RJv1M"}]},"_npmUser":{"name":"omjagdeesh42","email":"omjagdeesh42@gmail.com"},"directories":{},"maintainers":[{"name":"omjagdeesh42","email":"omjagdeesh42@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent_0.2.1_1786345706196_0.18735228012351968"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-06T07:34:39.907Z","modified":"2026-08-10T07:08:26.588Z","0.2.0":"2026-08-06T07:34:40.192Z","0.2.1":"2026-08-10T07:08:26.340Z"},"author":{"name":"Delpat LLP"},"license":"MIT","keywords":["brahmasuite","agent","sdk"],"description":"BrahmaSuite agent SDK for client applications — heartbeat, support, notifications, subscription guard","maintainers":[{"name":"omjagdeesh42","email":"omjagdeesh42@gmail.com"}],"readme":"# @brahmasuite/agent\r\n\r\nOfficial BrahmaSuite Agent SDK for Node.js, Express, Next.js, and React tenant applications.\r\n\r\n## Features\r\n\r\n- 🛡️ **Subscription Guard**: Server-side subscription caching & API middleware.\r\n- 🔔 **Real-Time Notifications**: Socket.IO client integration for in-app & push alerts.\r\n- 💬 **Support Desk UI**: Floating widget & components for tickets & customer support.\r\n- 🔄 **Heartbeat & Telemetry**: Automated health reporting to BrahmaSuite Core.\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @brahmasuite/agent\r\n# or\r\nyarn add @brahmasuite/agent\r\n# or\r\npnpm add @brahmasuite/agent\r\n```\r\n\r\n## Quick Start (Next.js App Router)\r\n\r\n### 1. Server Integration (`src/lib/brahmasuite.ts`)\r\n\r\n```typescript\r\nimport { BrahmaSuiteAgent } from '@brahmasuite/agent';\r\n\r\nexport const agent = new BrahmaSuiteAgent({\r\n  coreUrl: process.env.BRAHMASUITE_URL!,\r\n  tenantId: process.env.BRAHMASUITE_TENANT_ID!,\r\n  tenantKey: process.env.BRAHMASUITE_TENANT_KEY!,\r\n  internalSecret: process.env.BRAHMASUITE_INTERNAL_SECRET!,\r\n  notificationSvcUrl: process.env.NEXT_PUBLIC_BRAHMASUITE_NOTIF_URL!,\r\n});\r\n```\r\n\r\n### 2. Protect API Routes\r\n\r\n```typescript\r\nimport { withSubscriptionGuard } from '@brahmasuite/agent/next';\r\n\r\nexport const GET = withSubscriptionGuard(async (req) => {\r\n  return Response.json({ success: true });\r\n});\r\n```\r\n\r\n### 3. React Frontend Provider\r\n\r\n```tsx\r\n'use client';\r\n\r\nimport { BrahmaProvider, SupportDesk } from '@brahmasuite/agent/react';\r\n\r\nexport default function App({ children }: { children: React.ReactNode }) {\r\n  return (\r\n    <BrahmaProvider\r\n      tenantId={process.env.NEXT_PUBLIC_BRAHMASUITE_TENANT_ID!}\r\n      notificationUrl={process.env.NEXT_PUBLIC_BRAHMASUITE_NOTIF_URL!}\r\n      tokenEndpoint=\"/api/brahmasuite/notification-token\"\r\n      subscriptionStatusEndpoint=\"/api/brahmasuite/subscription-status\"\r\n    >\r\n      {children}\r\n      <SupportDesk />\r\n    </BrahmaProvider>\r\n  );\r\n}\r\n```\r\n\r\n## License\r\n\r\nMIT © Delpat LLP\r\n","readmeFilename":"README.md"}