{"_id":"@agently-org/sdk","_rev":"13-c133e9243fd11f3306fd3132fde58cd4","name":"@agently-org/sdk","dist-tags":{"latest":"1.2.0"},"versions":{"1.1.0":{"name":"@agently-org/sdk","version":"1.1.0","keywords":["agently","sdk","authentication","encryption","jwe","jws","jwt","webhook","security","typescript"],"author":"","license":"MIT","_id":"@agently-org/sdk@1.1.0","maintainers":[{"name":"ai-agently","email":"fremont.julian@gmail.com"}],"dist":{"shasum":"06bfa86e9e8c11635b056b479938bceb78c360f6","tarball":"https://registry.npmjs.org/@agently-org/sdk/-/sdk-1.1.0.tgz","fileCount":34,"integrity":"sha512-Nosj2nQ3iJQ34+6uagMQzyBDE/AZItuAe20aIdmRVa78khDckYahsJJwq5anlT4Be8R/WY5sesWdS1pG6EDvAw==","signatures":[{"sig":"MEUCIQCHTn/IFhQuuxnQkoh9P5963QGwGeT/rAfWUfwhcgJS5gIgfdgtItT8LY3LPVDzrYigE8iLRWX4pdsCxrRqiMbcrmQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73240},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"72589abd1ffaf6b36bb6d026cd001337645144ab","scripts":{"dev":"ts-node src/examples/auth-example.ts","lint":"eslint src --ext .ts","test":"jest --passWithNoTests","build":"tsc","clean":"rimraf dist","format":"prettier --write \"src/**/*.ts\"","lint:fix":"eslint src --ext .ts --fix","test:watch":"jest --watch","build:watch":"tsc --watch","dev:validation":"ts-node src/examples/token-validation-example.ts","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"ai-agently","email":"fremont.julian@gmail.com"},"_npmVersion":"11.6.2","description":"A fully-typed TypeScript SDK for SaaS applications to securely encrypt and send authentication tokens to Agently","directories":{},"_nodeVersion":"22.13.0","dependencies":{"jose":"^5.2.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.56.0","rimraf":"^5.0.5","ts-jest":"^29.1.2","ts-node":"^10.9.2","prettier":"^3.2.5","typescript":"^5.3.3","@types/jest":"^29.5.12","@types/node":"^20.11.19","@typescript-eslint/parser":"^6.21.0","@typescript-eslint/eslint-plugin":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.1.0_1760625194004_0.9622703650735418","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@agently-org/sdk","version":"1.1.1","keywords":["agently","sdk","authentication","encryption","jwe","jws","jwt","webhook","security","typescript"],"author":"","license":"MIT","_id":"@agently-org/sdk@1.1.1","maintainers":[{"name":"ai-agently","email":"fremont.julian@gmail.com"}],"dist":{"shasum":"b1cb391fd39597e448cf6f180a5f22840b2d0a1c","tarball":"https://registry.npmjs.org/@agently-org/sdk/-/sdk-1.1.1.tgz","fileCount":38,"integrity":"sha512-JURUIyohKdRNvE8xGlsXQuZbMNsqpisniVnS1O7+Bip5yALttQS8fNgxRh8+OqNz8uhr+EPnRBMxqzoqqKsvBw==","signatures":[{"sig":"MEQCIDgruRioI3StJSyWwCUy8SSOs/4x4RPKPHJBvGtQYEOVAiAyAl0+7b3GMChPCyAzrWoeLxZey8XOkUR/bzGHoQORZA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":78968},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"5e476ad4a0b7899e697412a59ddf8ebff3ec7a13","scripts":{"dev":"ts-node src/examples/auth-example.ts","lint":"eslint src --ext .ts","test":"jest --passWithNoTests","build":"tsc","clean":"rimraf dist","format":"prettier --write \"src/**/*.ts\"","lint:fix":"eslint src --ext .ts --fix","test:watch":"jest --watch","build:watch":"tsc --watch","dev:validation":"ts-node src/examples/token-validation-example.ts","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"ai-agently","email":"fremont.julian@gmail.com"},"_npmVersion":"11.6.2","description":"A fully-typed TypeScript SDK for SaaS applications to securely encrypt and send authentication tokens to Agently","directories":{},"_nodeVersion":"22.13.0","dependencies":{"jose":"^5.2.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.56.0","rimraf":"^5.0.5","ts-jest":"^29.1.2","ts-node":"^10.9.2","prettier":"^3.2.5","typescript":"^5.3.3","@types/jest":"^29.5.12","@types/node":"^20.11.19","@typescript-eslint/parser":"^6.21.0","@typescript-eslint/eslint-plugin":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.1.1_1760626231600_0.46759263172442544","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@agently-org/sdk","version":"1.1.2","keywords":["agently","sdk","authentication","encryption","jwe","jws","jwt","webhook","security","typescript"],"author":"","license":"MIT","_id":"@agently-org/sdk@1.1.2","maintainers":[{"name":"ai-agently","email":"fremont.julian@gmail.com"}],"dist":{"shasum":"54e44ccb09e9c10894558fa0cc357dce27911fa8","tarball":"https://registry.npmjs.org/@agently-org/sdk/-/sdk-1.1.2.tgz","fileCount":38,"integrity":"sha512-f/ppOXsW0D1Yhxx0A/GUDFGRvoYqCr70lWq4tVejxHAWZbP4BxMd5jroPmfsZxO+Ilm8FF0GIpoLVmS7CV14zg==","signatures":[{"sig":"MEYCIQDeeeHoQAe6KJkxW23hLcUJswU541H7lNpyw8Rde7pVgAIhAKQxOWnWJFkEgWbxr5gPo6fIb43vplob1PwrAPUcGYdj","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":79616},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"4973ca46f9af43e58eb91dcc8598ea97c3d7c94d","scripts":{"dev":"ts-node src/examples/auth-example.ts","lint":"eslint src --ext .ts","test":"jest --passWithNoTests","build":"tsc","clean":"rimraf dist","format":"prettier --write \"src/**/*.ts\"","lint:fix":"eslint src --ext .ts --fix","test:watch":"jest --watch","build:watch":"tsc --watch","dev:validation":"ts-node src/examples/token-validation-example.ts","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"ai-agently","email":"fremont.julian@gmail.com"},"_npmVersion":"11.6.2","description":"A fully-typed TypeScript SDK for SaaS applications to securely encrypt and send authentication tokens to Agently","directories":{},"_nodeVersion":"22.13.0","dependencies":{"jose":"^5.2.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.56.0","rimraf":"^5.0.5","ts-jest":"^29.1.2","ts-node":"^10.9.2","prettier":"^3.2.5","typescript":"^5.3.3","@types/jest":"^29.5.12","@types/node":"^20.11.19","@typescript-eslint/parser":"^6.21.0","@typescript-eslint/eslint-plugin":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.1.2_1760637538776_0.7131053071307072","host":"s3://npm-registry-packages-npm-production"}},"1.1.3":{"name":"@agently-org/sdk","version":"1.1.3","keywords":["agently","sdk","authentication","encryption","jwe","jws","jwt","webhook","security","typescript"],"author":"","license":"MIT","_id":"@agently-org/sdk@1.1.3","maintainers":[{"name":"ai-agently","email":"fremont.julian@gmail.com"}],"dist":{"shasum":"8e717ad5ef425b10bfc344acb5f10e0ede265ca4","tarball":"https://registry.npmjs.org/@agently-org/sdk/-/sdk-1.1.3.tgz","fileCount":30,"integrity":"sha512-cHzdN3wdXV7/VxYB+s6dK4o0dWnBv+fenFlgQvxtvJWZVOm7XXV+8wnfUIMT1CpyrfSedpuuCR4OnUtXkQbmIw==","signatures":[{"sig":"MEYCIQCmb5+/ZSZFINE/1fuVxSVItsjL1ba5j76LzC6W2PIwMQIhAKPxf9GrRPdAi+hXKxLKdBZ3zsOtSwPoH8t7Tbz8IaxU","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":62524},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"b15a0250b0cfd0901300893a19fed7f179855e2f","scripts":{"lint":"eslint src --ext .ts","test":"jest --passWithNoTests","build":"tsc","clean":"rimraf dist","format":"prettier --write \"src/**/*.ts\"","lint:fix":"eslint src --ext .ts --fix","test:watch":"jest --watch","build:watch":"tsc --watch","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"ai-agently","email":"fremont.julian@gmail.com"},"_npmVersion":"11.6.2","description":"A fully-typed TypeScript SDK for SaaS applications to securely encrypt and send authentication tokens to Agently","directories":{},"_nodeVersion":"22.13.0","dependencies":{"jose":"^5.2.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.56.0","rimraf":"^5.0.5","ts-jest":"^29.1.2","ts-node":"^10.9.2","prettier":"^3.2.5","typescript":"^5.3.3","@types/jest":"^29.5.12","@types/node":"^20.11.19","@typescript-eslint/parser":"^6.21.0","@typescript-eslint/eslint-plugin":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.1.3_1760638026728_0.8788710555364885","host":"s3://npm-registry-packages-npm-production"}},"1.1.4":{"name":"@agently-org/sdk","version":"1.1.4","keywords":["agently","sdk","authentication","encryption","jwe","jws","jwt","webhook","security","typescript"],"author":"","license":"MIT","_id":"@agently-org/sdk@1.1.4","maintainers":[{"name":"ai-agently","email":"fremont.julian@gmail.com"}],"dist":{"shasum":"7e967001322442410feafdb758657ee31a137b38","tarball":"https://registry.npmjs.org/@agently-org/sdk/-/sdk-1.1.4.tgz","fileCount":30,"integrity":"sha512-VnejqDqw3PO0PXG/q6ezMrRSJ9FLIBXrQbF4NGlgZ+WZ3ChXLciXYn8gpyVCFFROR7iO70Cyv2S7hRRy6tzqoA==","signatures":[{"sig":"MEYCIQCoQ+zwP5cMeyVovoVLOy26mbqlCYk2nHKiZWKTklhfjAIhANt5JKiDA6snrhFrnfU+7NHZr835epUG77LVxaD4DVmm","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":71192},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"64e592d5ec0dde258fc73242e78b84445e44f753","scripts":{"lint":"eslint src --ext .ts","test":"jest --passWithNoTests","build":"tsc","clean":"rimraf dist","format":"prettier --write \"src/**/*.ts\"","lint:fix":"eslint src --ext .ts --fix","test:watch":"jest --watch","build:watch":"tsc --watch","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"ai-agently","email":"fremont.julian@gmail.com"},"_npmVersion":"11.6.2","description":"A fully-typed TypeScript SDK for SaaS applications to securely encrypt and send authentication tokens to Agently","directories":{},"_nodeVersion":"22.13.0","dependencies":{"jose":"^5.2.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.56.0","rimraf":"^5.0.5","ts-jest":"^29.1.2","ts-node":"^10.9.2","prettier":"^3.2.5","typescript":"^5.3.3","@types/jest":"^29.5.12","@types/node":"^20.11.19","@typescript-eslint/parser":"^6.21.0","@typescript-eslint/eslint-plugin":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.1.4_1760759333702_0.3148278019742117","host":"s3://npm-registry-packages-npm-production"}},"1.1.5":{"name":"@agently-org/sdk","version":"1.1.5","keywords":["agently","sdk","authentication","encryption","jwe","jws","jwt","webhook","security","typescript"],"author":"","license":"MIT","_id":"@agently-org/sdk@1.1.5","maintainers":[{"name":"ai-agently","email":"fremont.julian@gmail.com"}],"dist":{"shasum":"49b37384cd80b7f2250577c6543b3569aa593e8d","tarball":"https://registry.npmjs.org/@agently-org/sdk/-/sdk-1.1.5.tgz","fileCount":30,"integrity":"sha512-VhCveW2sjBkqg0JgtZXnrGquAlAvsBmd8WIeml3pmOkS7bJopAqOFDQvEpjtU0s7yZ8saDvORaT+Lj/N/ql76w==","signatures":[{"sig":"MEUCIEc1tiBwyRjnusuDW0ekL+VGpUmOY3/p6L1VWsZ3uxBXAiEA1TxljtRfZZpRk9QEY+X1Mmc8oPKz5oyLaO4MapczW3o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73611},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"a2d04d7c35959f30815ec1cd234d02b7f07231b3","scripts":{"lint":"eslint src --ext .ts","test":"jest --passWithNoTests","build":"tsc","clean":"rimraf dist","format":"prettier --write \"src/**/*.ts\"","lint:fix":"eslint src --ext .ts --fix","test:watch":"jest --watch","build:watch":"tsc --watch","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"ai-agently","email":"fremont.julian@gmail.com"},"_npmVersion":"11.6.2","description":"A fully-typed TypeScript SDK for SaaS applications to securely encrypt and send authentication tokens to Agently","directories":{},"_nodeVersion":"22.13.0","dependencies":{"jose":"^5.2.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.56.0","rimraf":"^5.0.5","ts-jest":"^29.1.2","ts-node":"^10.9.2","prettier":"^3.2.5","typescript":"^5.3.3","@types/jest":"^29.5.12","@types/node":"^20.11.19","@typescript-eslint/parser":"^6.21.0","@typescript-eslint/eslint-plugin":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.1.5_1761030499190_0.6499615644125758","host":"s3://npm-registry-packages-npm-production"}},"1.1.6":{"name":"@agently-org/sdk","version":"1.1.6","keywords":["agently","sdk","authentication","encryption","jwe","jws","jwt","webhook","security","typescript"],"author":"","license":"MIT","_id":"@agently-org/sdk@1.1.6","maintainers":[{"name":"ai-agently","email":"fremont.julian@gmail.com"}],"dist":{"shasum":"118c17ceee7eff91dcc6f5f0d7f54a1110521c3a","tarball":"https://registry.npmjs.org/@agently-org/sdk/-/sdk-1.1.6.tgz","fileCount":30,"integrity":"sha512-k5YURvTfkxch4BWsQIQAz2jpVORx1CwKBtKa7IP9jXT2l+5E6rj5IIPeU83KWG38R+ajinc6LVsfP1L2o49bXg==","signatures":[{"sig":"MEQCIDhu/FID+aucm4AHlBwF8k1P9YS5LmWMm1g5YKDJDd5HAiA9kRsX58OmaOYBpmVH2Iw5xYGMRJpj+vmXzI4z2Dy/Kg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":86540},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"03eac7b4cf553b84827c40ffd2346262a69f6c8a","scripts":{"lint":"eslint src --ext .ts","test":"jest --passWithNoTests","build":"tsc","clean":"rimraf dist","format":"prettier --write \"src/**/*.ts\"","lint:fix":"eslint src --ext .ts --fix","test:watch":"jest --watch","build:watch":"tsc --watch","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"ai-agently","email":"fremont.julian@gmail.com"},"_npmVersion":"11.6.2","description":"A fully-typed TypeScript SDK for SaaS applications to securely encrypt and send authentication tokens to Agently","directories":{},"_nodeVersion":"22.13.0","dependencies":{"jose":"^5.2.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.56.0","rimraf":"^5.0.5","ts-jest":"^29.1.2","ts-node":"^10.9.2","prettier":"^3.2.5","typescript":"^5.3.3","@types/jest":"^29.5.12","@types/node":"^20.11.19","@typescript-eslint/parser":"^6.21.0","@typescript-eslint/eslint-plugin":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.1.6_1761395576310_0.7384865665242624","host":"s3://npm-registry-packages-npm-production"}},"1.1.7":{"name":"@agently-org/sdk","version":"1.1.7","keywords":["agently","sdk","authentication","encryption","jwe","jws","jwt","webhook","security","typescript"],"author":"","license":"MIT","_id":"@agently-org/sdk@1.1.7","maintainers":[{"name":"ai-agently","email":"fremont.julian@gmail.com"}],"dist":{"shasum":"351075e45b2786471fe2022db3441d4ae216564a","tarball":"https://registry.npmjs.org/@agently-org/sdk/-/sdk-1.1.7.tgz","fileCount":30,"integrity":"sha512-pIyulTWD3fjAaw1AiTCLVz9rj6ExDNpjbDI+pIIXhYCaNtHdsrCvkQM5fazgONnC+Nu0eSKh25PY1fq4woOL8A==","signatures":[{"sig":"MEUCIQCZGcqfJpxxREM1r2c4L4AKlUjSKaiIJ3hCUDtlFvmHOgIgQ4OcRfmIsecadPEft6k+p6TuelCtqc/o85SX6jNWi2E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":88042},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"669c837e175e056cdf91c28fc25f8d9ed83c03c4","scripts":{"lint":"eslint src --ext .ts","test":"jest --passWithNoTests","build":"tsc","clean":"rimraf dist","format":"prettier --write \"src/**/*.ts\"","lint:fix":"eslint src --ext .ts --fix","test:watch":"jest --watch","build:watch":"tsc --watch","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"ai-agently","email":"fremont.julian@gmail.com"},"_npmVersion":"11.6.2","description":"A fully-typed TypeScript SDK for SaaS applications to securely encrypt and send authentication tokens to Agently","directories":{},"_nodeVersion":"22.13.0","dependencies":{"jose":"^5.2.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.56.0","rimraf":"^5.0.5","ts-jest":"^29.1.2","ts-node":"^10.9.2","prettier":"^3.2.5","typescript":"^5.3.3","@types/jest":"^29.5.12","@types/node":"^20.11.19","@typescript-eslint/parser":"^6.21.0","@typescript-eslint/eslint-plugin":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.1.7_1761397802646_0.7521410858465913","host":"s3://npm-registry-packages-npm-production"}},"1.1.8":{"name":"@agently-org/sdk","version":"1.1.8","keywords":["agently","sdk","authentication","encryption","jwe","jws","jwt","webhook","security","typescript"],"author":"","license":"MIT","_id":"@agently-org/sdk@1.1.8","maintainers":[{"name":"ai-agently","email":"fremont.julian@gmail.com"}],"dist":{"shasum":"42653da9109e71bc7d3b7d99ebcc8de43a2fbd5e","tarball":"https://registry.npmjs.org/@agently-org/sdk/-/sdk-1.1.8.tgz","fileCount":30,"integrity":"sha512-rdUEtcw70uF+O5aM9I13qmCW8QqqBxvnVp5hYFF9JfkwfK9Aed9stPicygwFhAEDHzU1nxq8/3FRS91N3H9PAA==","signatures":[{"sig":"MEYCIQCLXEK+/nQR0S4Sy/vWr4X3ebX039SAmz8KM08erH3JqwIhALfIEb0oYA61RcrUwrxXlBgtDAh/vOHnMJjnzxf2CNRh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":88067},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"eede875daaec60525426717d2317019531c1c153","scripts":{"lint":"eslint src --ext .ts","test":"jest --passWithNoTests","build":"tsc","clean":"rimraf dist","format":"prettier --write \"src/**/*.ts\"","lint:fix":"eslint src --ext .ts --fix","test:watch":"jest --watch","build:watch":"tsc --watch","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"ai-agently","email":"fremont.julian@gmail.com"},"_npmVersion":"11.6.2","description":"A fully-typed TypeScript SDK for SaaS applications to securely encrypt and send authentication tokens to Agently","directories":{},"_nodeVersion":"22.13.0","dependencies":{"jose":"^5.2.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","dotenv":"^17.2.3","eslint":"^8.56.0","rimraf":"^5.0.5","ts-jest":"^29.1.2","ts-node":"^10.9.2","prettier":"^3.2.5","typescript":"^5.3.3","@types/jest":"^29.5.12","@types/node":"^20.11.19","@typescript-eslint/parser":"^6.21.0","@typescript-eslint/eslint-plugin":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.1.8_1761400204527_0.10572881356320507","host":"s3://npm-registry-packages-npm-production"}},"1.1.9":{"name":"@agently-org/sdk","version":"1.1.9","keywords":["agently","sdk","authentication","encryption","jwe","jws","jwt","webhook","security","typescript"],"author":"","license":"MIT","_id":"@agently-org/sdk@1.1.9","maintainers":[{"name":"ai-agently","email":"fremont.julian@gmail.com"}],"dist":{"shasum":"676438cd96d1227a5a345bdf727690321015f382","tarball":"https://registry.npmjs.org/@agently-org/sdk/-/sdk-1.1.9.tgz","fileCount":30,"integrity":"sha512-chwcAi86Ih413ECxM0SxGqICgeDhSy98oHDz5FwLRSiOBUDsmLqToNWuY/Cal6Zux1Ft4hFzz0LKFsdZT3BuVg==","signatures":[{"sig":"MEUCIFRDGPtaXXrAC/wp9uTC9+P1GAh7e4x87ETq9+9RIpSBAiEAmJyqSyR5smqoSC3ft/96v3I5qt80Px6+6/oUQCS2Q8U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":88076},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"27c6d24e8628accf104680543f6a098a09e71fd1","scripts":{"lint":"eslint src --ext .ts","test":"jest --passWithNoTests","build":"tsc","clean":"rimraf dist","format":"prettier --write \"src/**/*.ts\"","lint:fix":"eslint src --ext .ts --fix","test:watch":"jest --watch","build:watch":"tsc --watch","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"ai-agently","email":"fremont.julian@gmail.com"},"_npmVersion":"11.6.2","description":"A fully-typed TypeScript SDK for SaaS applications to securely encrypt and send authentication tokens to Agently","directories":{},"_nodeVersion":"22.13.0","dependencies":{"jose":"^5.2.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","dotenv":"^17.2.3","eslint":"^8.56.0","rimraf":"^5.0.5","ts-jest":"^29.1.2","ts-node":"^10.9.2","prettier":"^3.2.5","typescript":"^5.3.3","@types/jest":"^29.5.12","@types/node":"^20.11.19","@typescript-eslint/parser":"^6.21.0","@typescript-eslint/eslint-plugin":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.1.9_1761406793114_0.279313274459305","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@agently-org/sdk","version":"1.2.0","description":"A fully-typed TypeScript SDK for SaaS applications to securely encrypt and send authentication tokens to Agently","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","build:watch":"tsc --watch","clean":"rimraf dist","prepublishOnly":"npm run clean && npm run build","test":"jest --passWithNoTests","test:watch":"jest --watch","lint":"eslint src --ext .ts","lint:fix":"eslint src --ext .ts --fix","format":"prettier --write \"src/**/*.ts\""},"keywords":["agently","sdk","authentication","encryption","jwe","jws","jwt","webhook","security","typescript"],"author":"","license":"MIT","devDependencies":{"@types/jest":"^29.5.12","@types/node":"^20.11.19","@typescript-eslint/eslint-plugin":"^6.21.0","@typescript-eslint/parser":"^6.21.0","eslint":"^8.56.0","jest":"^29.7.0","prettier":"^3.2.5","rimraf":"^5.0.5","ts-jest":"^29.1.2","ts-node":"^10.9.2","typescript":"^5.3.3","dotenv":"^17.2.3"},"dependencies":{"jose":"^5.2.2"},"engines":{"node":">=16.0.0"},"_id":"@agently-org/sdk@1.2.0","gitHead":"3fda5737f33ff808fba61d6bf1f6c11cc6acf7cf","_nodeVersion":"24.7.0","_npmVersion":"11.5.1","dist":{"integrity":"sha512-M/VOX5IfG+ZjF5CHT2fIwErIQgatxCSsaLzOhyNPG4NJDfS0Mw0D7S0++UZNQDmzKyaadNq6imx9Ifk8tgCcFg==","shasum":"ad095abd3b046ee668e24918fd37a9a548e5f7e2","tarball":"https://registry.npmjs.org/@agently-org/sdk/-/sdk-1.2.0.tgz","fileCount":30,"unpackedSize":88345,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD1AxeFahELGRaLSyIF7DmPhsNt2ZWQ9YIm3R7WIyxeYwIgNPA+kXT9wkGtM/g0+Nq+WnRxftEsJXzkxan9GSLdk7c="}]},"_npmUser":{"name":"ai-agently","email":"fremont.julian@gmail.com"},"directories":{},"maintainers":[{"name":"ai-agently","email":"fremont.julian@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_1.2.0_1763053004008_0.1653216431534894"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-16T14:33:13.908Z","modified":"2025-11-13T16:56:44.455Z","1.0.0":"2025-10-07T02:14:24.760Z","1.1.0":"2025-10-16T14:33:14.180Z","1.1.1":"2025-10-16T14:50:31.779Z","1.1.2":"2025-10-16T17:58:58.942Z","1.1.3":"2025-10-16T18:07:06.906Z","1.1.4":"2025-10-18T03:48:53.877Z","1.1.5":"2025-10-21T07:08:19.356Z","1.1.6":"2025-10-25T12:32:56.531Z","1.1.7":"2025-10-25T13:10:02.856Z","1.1.8":"2025-10-25T13:50:04.768Z","1.1.9":"2025-10-25T15:39:53.352Z","1.2.0":"2025-11-13T16:56:44.218Z"},"license":"MIT","keywords":["agently","sdk","authentication","encryption","jwe","jws","jwt","webhook","security","typescript"],"description":"A fully-typed TypeScript SDK for SaaS applications to securely encrypt and send authentication tokens to Agently","maintainers":[{"name":"ai-agently","email":"fremont.julian@gmail.com"}],"readme":"# Agently SDK\n\nA fully-typed TypeScript SDK for encrypting authentication tokens and securely sending them to Agently. Uses **JWS** (JSON Web Signature) and **JWE** (JSON Web Encryption) for maximum security.\n\n## Features\n\n✨ **Fully Typed** - Complete TypeScript support with comprehensive type definitions\n\n🔐 **Secure** - Industry-standard JWS/JWE for signing and encryption\n\n🎯 **Simple API** - Just 3 lines of code to authenticate users\n\n🚀 **One-Step Authentication** - Built-in encryption and HTTP sending\n\n🛡️ **Token Validation** - Built-in token validation and expiration checking\n\n📦 **Zero Config** - Sensible defaults with full customization options\n\n## Installation\n\n```bash\nnpm install @agently-org/sdk\n```\n\n## Quick Start\n\n```typescript\nimport { AgentlyAuth } from \"@agently-org/sdk\";\n\nconst auth = new AgentlyAuth({\n  signingPrivateKey: process.env.SIGNING_PRIVATE_KEY!,\n  signingPublicKey: process.env.SIGNING_PUBLIC_KEY!,\n  agentlyPublicKey: process.env.AGENTLY_PUBLIC_KEY!,\n  agentId: process.env.AGENTLY_AGENT_ID!,\n});\n\nconst tokens = [\n  {\n    name: \"Authorization\",\n    value: \"your-token-value\",\n    exp: Math.floor(Date.now() / 1000) + 3600,\n    location: \"header\",\n    format: \"Bearer {token}\",\n  },\n];\n\n// Authenticate user with one call (link code auto-generated)\nawait auth.authenticateUser({\n  context: {\n    identifier: \"user123\",\n    email: \"user@example.com\",\n    username: \"johndoe\",\n  },\n  tokens,\n});\n```\n\nThat's it! The SDK encrypts the tokens and sends them securely to Agently. 🎉\n\n## How It Works\n\nThe SDK performs two security operations before sending to Agently:\n\n1. **JWS (Signing)**: Signs the payload with your SaaS private key\n2. **JWE (Encryption)**: Encrypts the signed payload with Agently's public key\n\n```\n[Tokens] → Sign with Your Private Key → [JWS] → Encrypt with Agently Public Key → [JWE] → Send to Agently\n```\n\nOnly Agently can decrypt it (with their private key), and they can verify it came from you (with your public key).\n\n## Setup\n\n### Set Environment Variables\n\n**All keys are provided by Agently** - you don't need to generate any keys yourself.\n\n```bash\n# .env file - All values provided by Agently\nSIGNING_PRIVATE_KEY=\"-----BEGIN PRIVATE KEY-----\\n...\\n-----END PRIVATE KEY-----\"  # Provided by Agently\nSIGNING_PUBLIC_KEY=\"-----BEGIN PUBLIC KEY-----\\n...\\n-----END PUBLIC KEY-----\"    # Provided by Agently\nAGENTLY_PUBLIC_KEY=\"-----BEGIN PUBLIC KEY-----\\n...\\n-----END PUBLIC KEY-----\"    # Provided by Agently\nAGENTLY_AGENT_ID=\"your-agent-id\"                                                    # Provided by Agently\n```\n\n### 3. Use It!\n\nSee the [Quick Start](#quick-start) above.\n\n## API Reference\n\n### AgentlyAuth\n\nThe main class for encrypting and authenticating users with Agently.\n\n#### Constructor\n\n```typescript\nnew AgentlyAuth(config: AuthConfig)\n```\n\n**AuthConfig:**\n\n| Property                     | Type     | Required | Default          | Description                                       |\n| ---------------------------- | -------- | -------- | ---------------- | ------------------------------------------------- |\n| `signingPrivateKey`          | `string` | ✓        | -                | SaaS private key (PKCS#8) - Provided by Agently   |\n| `signingPublicKey`           | `string` | ✓        | -                | SaaS public key (SPKI) - Provided by Agently      |\n| `agentlyPublicKey`           | `string` | ✓        | -                | Agently's public key (SPKI) - Provided by Agently |\n| `agentId`                    | `string` | ✓        | -                | Agent ID - Provided by Agently                    |\n| `expirationTime`             | `string` | ✗        | `'5m'`           | JWT expiration time                               |\n| `signingAlgorithm`           | `string` | ✗        | `'RS256'`        | Signing algorithm                                 |\n| `encryptionAlgorithm`        | `string` | ✗        | `'RSA-OAEP-256'` | Encryption algorithm                              |\n| `contentEncryptionAlgorithm` | `string` | ✗        | `'A256GCM'`      | Content encryption                                |\n\n#### Methods\n\n**`authenticateUser(input: Omit<AuthInput, 'linkCode'>): Promise<AuthResult>`**\n\nAuthenticates a user by automatically generating a link code, encrypting and sending their tokens to Agently. This is the recommended method.\n\n```typescript\nconst result = await auth.authenticateUser({\n  context: {\n    identifier: \"user123\",\n    email: \"user@example.com\",\n    username: \"johndoe\",\n  },\n  tokens,\n  // linkCode is automatically generated\n});\n\nif (result.success) {\n  console.log(\"User authenticated!\", result.status);\n  console.log(\"Session ID:\", result.sessionId);\n} else {\n  console.error(\"Authentication failed:\", result.error);\n}\n```\n\n**`authenticateUserWithCode(input: AuthInput): Promise<AuthResult>`**\n\nAuthenticates a user with a provided link code. Use this method when you have a specific link code to use.\n\n```typescript\nconst result = await auth.authenticateUserWithCode({\n  context: {\n    identifier: \"user123\",\n    email: \"user@example.com\",\n    username: \"johndoe\",\n  },\n  tokens,\n  linkCode: \"link-code-123\", // Must provide linkCode\n});\n\nif (result.success) {\n  console.log(\"User authenticated!\", result.status);\n} else {\n  console.error(\"Authentication failed:\", result.error);\n}\n```\n\n**`encryptPayload(input: AuthInput): Promise<EncryptionResult>`**\n\nEncrypts a payload and returns detailed result with metadata. Use this if you want to send the JWE yourself.\n\n```typescript\nconst result = await auth.encryptPayload({\n  context: {\n    identifier: \"user123\",\n    email: \"user@example.com\",\n    username: \"johndoe\",\n  },\n  tokens,\n  linkCode: \"link-code-123\",\n});\n\nif (result.success) {\n  console.log(\"JTI:\", result.metadata?.jti);\n  console.log(\"JWE:\", result.jwe);\n\n  // Send JWE yourself if needed\n  await fetch(\"https://api.agently.best/client/auth/your-agent-id\", {\n    method: \"POST\",\n    headers: { \"Content-Type\": \"application/json\" },\n    body: JSON.stringify({ jwe: result.jwe }),\n  });\n}\n```\n\n## Types\n\n### Context\n\nThe `Context` interface provides a flexible way to identify users and include additional metadata:\n\n```typescript\ninterface Context {\n  identifier: string; // unique and mandatory - primary user reference\n  [x: string]: any; // additional metadata about the user\n}\n```\n\n**Properties:**\n\n- `identifier` (required): Unique identifier for the user (userId, email, username, etc.)\n- `[x: string]` (optional): Additional metadata about the user (role, department, etc.)\n\n**Examples:**\n\n```typescript\n// Simple user identification\nconst context: Context = {\n  identifier: \"user_12345\",\n};\n\n// With additional metadata\nconst context: Context = {\n  identifier: \"user_12345\",\n  email: \"user@example.com\",\n  username: \"johndoe\",\n  role: \"admin\",\n  department: \"engineering\",\n};\n\n// Using email as identifier\nconst context: Context = {\n  identifier: \"user@example.com\",\n  username: \"johndoe\",\n  role: \"user\",\n};\n```\n\n### AgentlyToken\n\n```typescript\ninterface AgentlyToken {\n  name: string; // Token name - for headers: 'Authorization', 'X-xsrf-token', etc. For cookies: cookie name\n  value: string; // Token value\n  exp: number; // Expiration (Unix timestamp in seconds)\n  location: \"header\" | \"cookie\"; // Where to store\n  format: TokenFormatTemplate; // Format template that must contain {token} placeholder\n}\n```\n\n**Example:**\n\n```typescript\nconst token: AgentlyToken = {\n  name: \"Authorization\", // HTTP header name\n  value: \"eyJhbGc...\",\n  exp: Math.floor(Date.now() / 1000) + 3600, // 1 hour\n  location: \"header\",\n  format: \"Bearer {token}\", // Must contain {token} placeholder\n};\n```\n\n**Format Template Requirements:**\n\nThe `format` property must contain the `{token}` placeholder string. This ensures proper token substitution when the token is used. Common examples:\n\n- `\"Bearer {token}\"` - For Authorization headers\n- `\"jwt {token}\"` - For JWT tokens\n- `\"{token}\"` - For raw token values\n- `\"Token {token}\"` - For custom token formats\n\n## Utility Functions\n\n### Token Validation\n\nValidate tokens before sending:\n\n```typescript\nimport { validateTokens, filterExpiredTokens } from \"@agently-org/sdk\";\n\n// Validate all tokens\nconst validation = validateTokens(tokens);\nif (!validation.valid) {\n  console.error(\"Invalid tokens:\", validation.errors);\n}\n\n// Filter expired tokens\nconst { valid, expired } = filterExpiredTokens(tokens);\nconsole.log(`${valid.length} valid, ${expired.length} expired`);\n\n// Check tokens expiring soon\nimport { hasTokensExpiringSoon } from \"@agently-org/sdk\";\nconst expiringSoon = hasTokensExpiringSoon(tokens, 300); // 5 minutes\nif (expiringSoon.expiringSoon) {\n  console.warn(\"Some tokens expire soon!\");\n}\n```\n\n## Complete Example\n\n```typescript\nimport { AgentlyAuth, AgentlyToken, validateTokens } from \"@agently-org/sdk\";\n\nasync function authenticateWithAgently() {\n  // 1. Initialize auth client\n  const auth = new AgentlyAuth({\n    signingPrivateKey: process.env.SIGNING_PRIVATE_KEY!,\n    signingPublicKey: process.env.SIGNING_PUBLIC_KEY!,\n    agentlyPublicKey: process.env.AGENTLY_PUBLIC_KEY!,\n    agentId: process.env.AGENTLY_AGENT_ID!, // Provided by Agently\n  });\n\n  // 2. Prepare tokens\n  const tokens: AgentlyToken[] = [\n    {\n      name: \"Authorization\",\n      value: \"eyJhbGc...\",\n      exp: Math.floor(Date.now() / 1000) + 3600,\n      location: \"header\",\n      format: \"Bearer {token}\",\n    },\n    {\n      name: \"X-xsrf-token\",\n      value: \"xsrf_token_value\",\n      exp: Math.floor(Date.now() / 1000) + 3600,\n      location: \"header\",\n      format: \"{token}\",\n    },\n    {\n      name: \"session_id\",\n      value: \"sess_abc123\",\n      exp: Math.floor(Date.now() / 1000) + 86400,\n      location: \"cookie\",\n      format: \"jwt {token}\",\n    },\n  ];\n\n  // 3. Validate tokens (optional but recommended)\n  const validation = validateTokens(tokens);\n  if (!validation.valid) {\n    throw new Error(\"Invalid tokens: \" + validation.errors.join(\", \"));\n  }\n\n  // 4. Authenticate user with Agently (link code auto-generated)\n  const result = await auth.authenticateUser({\n    context: {\n      identifier: \"user123\",\n      email: \"user@example.com\",\n      username: \"johndoe\",\n      role: \"admin\",\n    },\n    tokens,\n    // linkCode is automatically generated\n  });\n\n  if (result.success) {\n    console.log(\"✓ User authenticated successfully!\");\n    console.log(\"Status:\", result.status);\n    console.log(\"Session ID:\", result.sessionId);\n  } else {\n    console.error(\"✗ Authentication failed:\", result.error);\n  }\n}\n```\n\n## Error Handling\n\n```typescript\nimport {\n  EncryptionError,\n  ConfigurationError,\n  TokenExpiredError,\n} from \"@agently-org/sdk\";\n\ntry {\n  await auth.authenticateUser({\n    context: {\n      identifier: \"user123\",\n      email: \"user@example.com\",\n      username: \"johndoe\",\n    },\n    tokens,\n    // linkCode is automatically generated\n  });\n} catch (error) {\n  if (error instanceof ConfigurationError) {\n    console.error(\"Config error:\", error.message);\n  } else if (error instanceof EncryptionError) {\n    console.error(\"Encryption failed:\", error.message);\n  } else if (error instanceof TokenExpiredError) {\n    console.error(\"Token expired:\", error.details);\n  }\n}\n```\n\n## TypeScript Support\n\nFull TypeScript support with strict mode enabled:\n\n```typescript\nconst auth = new AgentlyAuth(config);\n//    ^? AgentlyAuth\n\nconst result = await auth.authenticateUser({\n  context: {\n    identifier: \"user123\",\n    email: \"user@example.com\",\n    username: \"johndoe\",\n  },\n  tokens,\n  // linkCode is automatically generated\n});\n//    ^? { success: boolean; status?: number; sessionId?: string; ... }\n```\n\nYour IDE will provide complete autocomplete and type checking!\n\n## Security Best Practices\n\n1. **Never commit private keys** to version control\n2. **Use environment variables** for all keys\n3. **Rotate keys regularly** in production\n4. **Validate tokens** before sending\n5. **Check expiration** to ensure tokens are valid\n6. **Use HTTPS** always (handled automatically by the SDK)\n7. **Set appropriate expiration times** for JWTs (default: 5 minutes)\n\n## License\n\nMIT\n\n---\n\nMade with ❤️ for secure authentication\n","readmeFilename":"README.md"}