{"_id":"@afauthhq/agent","_rev":"10-fb1c959bb844e11aa68ac7dbd6f254ee","name":"@afauthhq/agent","dist-tags":{"alpha":"0.1.0-alpha.0","latest":"0.6.1"},"versions":{"0.1.0-alpha.0":{"name":"@afauthhq/agent","version":"0.1.0-alpha.0","license":"MIT","_id":"@afauthhq/agent@0.1.0-alpha.0","maintainers":[{"name":"wenguo","email":"guowen89@gmail.com"}],"homepage":"https://github.com/AFAuthHQ/typescript-sdk#readme","bugs":{"url":"https://github.com/AFAuthHQ/typescript-sdk/issues"},"dist":{"shasum":"9c8d91acc5e783b119ffe222db7789fe64f68e8a","tarball":"https://registry.npmjs.org/@afauthhq/agent/-/agent-0.1.0-alpha.0.tgz","fileCount":5,"integrity":"sha512-bKHqeYfcGPQyM+703uruyGPIbXnUr9tFgMqKlwqjiTDwxXm0ebU4UmXqUHOVWSOTFGvDNHhXhVO/5S8386iPzQ==","signatures":[{"sig":"MEQCIE5PDIMyhG6BAUSY7wBPXG1SSyFtFdbvYEmqVQyZcOTaAiArNZQRJQyd0o73QaDJY4B4kj2h9UrR/3BklgT99ZO4+Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13356},"main":"./dist/index.js","type":"module","_from":"file:afauthhq-agent-0.1.0-alpha.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"lint":"echo TODO: configure lint","test":"vitest run --passWithNoTests","build":"tsup src/index.ts --format esm --dts --clean","coverage":"vitest run --coverage --passWithNoTests","typecheck":"tsc --noEmit"},"_npmUser":{"name":"wenguo","email":"guowen89@gmail.com"},"_resolved":"/private/var/folders/hk/yf2t06h97pdcy_ynlkn2rq3c0000gn/T/db40dee2019546f498e173911d462b2e/afauthhq-agent-0.1.0-alpha.0.tgz","_integrity":"sha512-bKHqeYfcGPQyM+703uruyGPIbXnUr9tFgMqKlwqjiTDwxXm0ebU4UmXqUHOVWSOTFGvDNHhXhVO/5S8386iPzQ==","repository":{"url":"git+https://github.com/AFAuthHQ/typescript-sdk.git","type":"git","directory":"packages/agent"},"_npmVersion":"10.9.4","description":"AFAuth agent SDK — keypair, did:key, signed requests, protocol-aware builders","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@noble/curves":"^2.2.0","@afauthhq/core":"0.1.0-alpha.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.0.0","typescript":"^5.5.0"},"_npmOperationalInternal":{"tmp":"tmp/agent_0.1.0-alpha.0_1779354503047_0.17385637612757998","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@afauthhq/agent","version":"0.1.0","license":"MIT","_id":"@afauthhq/agent@0.1.0","maintainers":[{"name":"wenguo","email":"guowen89@gmail.com"}],"homepage":"https://github.com/AFAuthHQ/typescript-sdk#readme","bugs":{"url":"https://github.com/AFAuthHQ/typescript-sdk/issues"},"dist":{"shasum":"8236efdbf0906544436c1c2b57fbc01e48193552","tarball":"https://registry.npmjs.org/@afauthhq/agent/-/agent-0.1.0.tgz","fileCount":5,"integrity":"sha512-3Sfa8kxe3yt/3m3R47NWPpGHarx0uucLnO+ssxRqsajxRtB8t/18tpkvBXmlP/5T9iLm3RCjczcbcTOBbuusKw==","signatures":[{"sig":"MEUCIDY/WtG0MDaa/JSqgBb+ENY5mgEBw857fqgG3NhfY8PQAiEAnqcF/FeaJGRcXGJKR88V40xF8ybX1gWNTmhDq3Bb+dM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13340},"main":"./dist/index.js","type":"module","_from":"file:afauthhq-agent-0.1.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"lint":"echo TODO: configure lint","test":"vitest run --passWithNoTests","build":"tsup src/index.ts --format esm --dts --clean","coverage":"vitest run --coverage --passWithNoTests","typecheck":"tsc --noEmit"},"_npmUser":{"name":"wenguo","email":"guowen89@gmail.com"},"_resolved":"/private/var/folders/hk/yf2t06h97pdcy_ynlkn2rq3c0000gn/T/3145f6b6aae61aa5926b24b3d3e20db8/afauthhq-agent-0.1.0.tgz","_integrity":"sha512-3Sfa8kxe3yt/3m3R47NWPpGHarx0uucLnO+ssxRqsajxRtB8t/18tpkvBXmlP/5T9iLm3RCjczcbcTOBbuusKw==","repository":{"url":"git+https://github.com/AFAuthHQ/typescript-sdk.git","type":"git","directory":"packages/agent"},"_npmVersion":"10.9.4","description":"AFAuth agent SDK — keypair, did:key, signed requests, protocol-aware builders","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@noble/curves":"^2.2.0","@afauthhq/core":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.0.0","typescript":"^5.5.0"},"_npmOperationalInternal":{"tmp":"tmp/agent_0.1.0_1779355999596_0.3649507172877182","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@afauthhq/agent","version":"0.1.1","license":"MIT","_id":"@afauthhq/agent@0.1.1","maintainers":[{"name":"wenguo","email":"guowen89@gmail.com"}],"homepage":"https://github.com/AFAuthHQ/typescript-sdk#readme","bugs":{"url":"https://github.com/AFAuthHQ/typescript-sdk/issues"},"dist":{"shasum":"621fad8f752e45e5bfcc0de96cc768c6c00cc0b6","tarball":"https://registry.npmjs.org/@afauthhq/agent/-/agent-0.1.1.tgz","fileCount":5,"integrity":"sha512-t2EquyqBKv4xYcoh5ZlFTZwmQkTpj/nz4tuRgwrzN3SqfuTKbOJLlsstXQTkbQ3yVbNEfr3mHs+3yLCaSJxsxA==","signatures":[{"sig":"MEQCIH9ourLQXxy1S9SCvmMagY9Z2+vL9rGqDDFWUirSGrn7AiA7dqBoz/39IaokXeMqnSyZwRDY9P65UfjYG0sF8Vl6ZA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13812},"main":"./dist/index.js","type":"module","_from":"file:afauthhq-agent-0.1.1.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"lint":"echo TODO: configure lint","test":"vitest run --passWithNoTests","build":"tsup src/index.ts --format esm --dts --clean","coverage":"vitest run --coverage --passWithNoTests","typecheck":"tsc --noEmit"},"_npmUser":{"name":"wenguo","email":"guowen89@gmail.com"},"_resolved":"/private/var/folders/hk/yf2t06h97pdcy_ynlkn2rq3c0000gn/T/44cc3f36d69ade89331eaea6716a9806/afauthhq-agent-0.1.1.tgz","_integrity":"sha512-t2EquyqBKv4xYcoh5ZlFTZwmQkTpj/nz4tuRgwrzN3SqfuTKbOJLlsstXQTkbQ3yVbNEfr3mHs+3yLCaSJxsxA==","repository":{"url":"git+https://github.com/AFAuthHQ/typescript-sdk.git","type":"git","directory":"packages/agent"},"_npmVersion":"10.9.4","description":"AFAuth agent SDK — keypair, did:key, signed requests, protocol-aware builders","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@noble/curves":"^2.2.0","@afauthhq/core":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.0.0","typescript":"^5.5.0"},"_npmOperationalInternal":{"tmp":"tmp/agent_0.1.1_1779530288639_0.898156623581911","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@afauthhq/agent","version":"0.2.0","license":"MIT","_id":"@afauthhq/agent@0.2.0","maintainers":[{"name":"wenguo","email":"guowen89@gmail.com"}],"homepage":"https://github.com/AFAuthHQ/typescript-sdk#readme","bugs":{"url":"https://github.com/AFAuthHQ/typescript-sdk/issues"},"dist":{"shasum":"1169cb002279c9a8cecdc451cab15820a5c4674b","tarball":"https://registry.npmjs.org/@afauthhq/agent/-/agent-0.2.0.tgz","fileCount":5,"integrity":"sha512-7MTKwlIrxPhpr3ytd7uaDV7BfmuIYjb7QYtFoZY7EzZoT1vsKepsH994Txr4LEyGGZbDyYCAsz4qxnUvJMv+MA==","signatures":[{"sig":"MEQCIDaQWJzo+x7PtPywFzVR91W1vXHeIHoiWMISsh5cWGjHAiAm0wOfC+8LXs5Jj2mfIcJbQSN52nmjX+gcvmah1GXlTw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":24114},"main":"./dist/index.js","type":"module","_from":"file:afauthhq-agent-0.2.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"lint":"echo TODO: configure lint","test":"vitest run --passWithNoTests","build":"tsup src/index.ts --format esm --dts --clean","coverage":"vitest run --coverage --passWithNoTests","typecheck":"tsc --noEmit"},"_npmUser":{"name":"wenguo","email":"guowen89@gmail.com"},"_resolved":"/private/var/folders/hk/yf2t06h97pdcy_ynlkn2rq3c0000gn/T/df7270de3b6c6e97b709777382919ce4/afauthhq-agent-0.2.0.tgz","_integrity":"sha512-7MTKwlIrxPhpr3ytd7uaDV7BfmuIYjb7QYtFoZY7EzZoT1vsKepsH994Txr4LEyGGZbDyYCAsz4qxnUvJMv+MA==","repository":{"url":"git+https://github.com/AFAuthHQ/typescript-sdk.git","type":"git","directory":"packages/agent"},"_npmVersion":"10.9.4","description":"AFAuth agent SDK — keypair, did:key, signed requests, protocol-aware builders","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@noble/curves":"^2.2.0","@afauthhq/core":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.0.0","typescript":"^5.5.0"},"_npmOperationalInternal":{"tmp":"tmp/agent_0.2.0_1779952185108_0.6715422388713734","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@afauthhq/agent","version":"0.3.0","license":"MIT","_id":"@afauthhq/agent@0.3.0","maintainers":[{"name":"wenguo","email":"guowen89@gmail.com"}],"homepage":"https://github.com/AFAuthHQ/typescript-sdk#readme","bugs":{"url":"https://github.com/AFAuthHQ/typescript-sdk/issues"},"dist":{"shasum":"7630ada1076875142f34aa6591279d72d0856369","tarball":"https://registry.npmjs.org/@afauthhq/agent/-/agent-0.3.0.tgz","fileCount":5,"integrity":"sha512-QO2ZTHpipGn09FMyS8S7g7uqMdrABo7Kc5QyIy1b9l2p99gKTpU65nytsv711QDUbWEUtkUSCod7ueWM2nyBrw==","signatures":[{"sig":"MEUCIQDC1eWOgCppje/e/n1NZveNtqOf5HlVk/xcJ8ENXeDXRwIga18SE8dX5voL7iHcqaCOKZUz01nOKssYggmGnynUo94=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30869},"main":"./dist/index.js","type":"module","_from":"file:afauthhq-agent-0.3.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"lint":"echo TODO: configure lint","test":"vitest run --passWithNoTests","build":"tsup src/index.ts --format esm --dts --clean","coverage":"vitest run --coverage --passWithNoTests","typecheck":"tsc --noEmit"},"_npmUser":{"name":"wenguo","email":"guowen89@gmail.com"},"_resolved":"/private/tmp/claude-501/ae315c4cf1fa692ba7a683c98a2ae87c/afauthhq-agent-0.3.0.tgz","_integrity":"sha512-QO2ZTHpipGn09FMyS8S7g7uqMdrABo7Kc5QyIy1b9l2p99gKTpU65nytsv711QDUbWEUtkUSCod7ueWM2nyBrw==","repository":{"url":"git+https://github.com/AFAuthHQ/typescript-sdk.git","type":"git","directory":"packages/agent"},"_npmVersion":"10.9.4","description":"AFAuth agent SDK — keypair, did:key, signed requests, protocol-aware builders","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@noble/curves":"^2.2.0","@afauthhq/core":"0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.0.0","typescript":"^5.5.0"},"_npmOperationalInternal":{"tmp":"tmp/agent_0.3.0_1780414469705_0.9011012691436837","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@afauthhq/agent","version":"0.4.0","license":"MIT","_id":"@afauthhq/agent@0.4.0","maintainers":[{"name":"wenguo","email":"guowen89@gmail.com"}],"homepage":"https://github.com/AFAuthHQ/typescript-sdk#readme","bugs":{"url":"https://github.com/AFAuthHQ/typescript-sdk/issues"},"dist":{"shasum":"6f75e531d191af028cb743e5add24c870c36e9ef","tarball":"https://registry.npmjs.org/@afauthhq/agent/-/agent-0.4.0.tgz","fileCount":5,"integrity":"sha512-jpNQ7Av1xn80p4ZjkBPh7mkdBGpQL+FSPX1GTj8GVBHXN4ouM/ZEfyoejKwHYMba/IHwPCs/Y+dVB9CX3sqiQw==","signatures":[{"sig":"MEUCIF8LE0NHosiqQMd6XOjPnGaJtpGPQvX9trNMtaeztWVgAiEAr8K5bMLGw/7dHrBMhlfL8QLxl4Q8Dxt5eM0HgI4PDGc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":34088},"main":"./dist/index.js","type":"module","_from":"file:afauthhq-agent-0.4.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"lint":"echo TODO: configure lint","test":"vitest run --passWithNoTests","build":"tsup src/index.ts --format esm --dts --clean","coverage":"vitest run --coverage --passWithNoTests","typecheck":"tsc --noEmit"},"_npmUser":{"name":"wenguo","email":"guowen89@gmail.com"},"_resolved":"/private/tmp/claude-501/97c34a97b7baf7042919a9ad1330b328/afauthhq-agent-0.4.0.tgz","_integrity":"sha512-jpNQ7Av1xn80p4ZjkBPh7mkdBGpQL+FSPX1GTj8GVBHXN4ouM/ZEfyoejKwHYMba/IHwPCs/Y+dVB9CX3sqiQw==","repository":{"url":"git+https://github.com/AFAuthHQ/typescript-sdk.git","type":"git","directory":"packages/agent"},"_npmVersion":"10.9.4","description":"AFAuth agent SDK — keypair, did:key, signed requests, protocol-aware builders","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@noble/curves":"^2.2.0","@afauthhq/core":"0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.0.0","typescript":"^5.5.0"},"_npmOperationalInternal":{"tmp":"tmp/agent_0.4.0_1780468767336_0.2999007089381087","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@afauthhq/agent","version":"0.5.0","license":"MIT","_id":"@afauthhq/agent@0.5.0","maintainers":[{"name":"wenguo","email":"guowen89@gmail.com"}],"homepage":"https://github.com/AFAuthHQ/typescript-sdk#readme","bugs":{"url":"https://github.com/AFAuthHQ/typescript-sdk/issues"},"dist":{"shasum":"d598e892fee70abae47b5617162561a8aa547967","tarball":"https://registry.npmjs.org/@afauthhq/agent/-/agent-0.5.0.tgz","fileCount":5,"integrity":"sha512-F7EDCiEsd4q732l44EvGinWlxqiwSd33MK8EZ9234Npn5ERZ9iOUcZmXRK2/UFFVuXv7u86w9bSD+WIiGc/W2Q==","signatures":[{"sig":"MEUCIQCF3Hn7XfTmVBAQnZxF5GaMvam94lHD2May75eBr+oJwQIgJYxxIpQkqFnEP8WdDuNqxLYi76WCgnAtDrcZJHCrvFg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35162},"main":"./dist/index.js","type":"module","_from":"file:afauthhq-agent-0.5.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"lint":"echo TODO: configure lint","test":"vitest run --passWithNoTests","build":"tsup src/index.ts --format esm --dts --clean","coverage":"vitest run --coverage --passWithNoTests","typecheck":"tsc --noEmit"},"_npmUser":{"name":"wenguo","email":"guowen89@gmail.com"},"_resolved":"/private/tmp/claude-501/f4a90eca474a350a68e5d5a146bf69a1/afauthhq-agent-0.5.0.tgz","_integrity":"sha512-F7EDCiEsd4q732l44EvGinWlxqiwSd33MK8EZ9234Npn5ERZ9iOUcZmXRK2/UFFVuXv7u86w9bSD+WIiGc/W2Q==","repository":{"url":"git+https://github.com/AFAuthHQ/typescript-sdk.git","type":"git","directory":"packages/agent"},"_npmVersion":"10.9.4","description":"AFAuth agent SDK — keypair, did:key, signed requests, protocol-aware builders","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@noble/curves":"^2.2.0","@afauthhq/core":"0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.0.0","typescript":"^5.5.0"},"_npmOperationalInternal":{"tmp":"tmp/agent_0.5.0_1780545085917_0.3115977699697494","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@afauthhq/agent","version":"0.6.0","license":"MIT","_id":"@afauthhq/agent@0.6.0","maintainers":[{"name":"wenguo","email":"guowen89@gmail.com"}],"homepage":"https://github.com/AFAuthHQ/typescript-sdk#readme","bugs":{"url":"https://github.com/AFAuthHQ/typescript-sdk/issues"},"dist":{"shasum":"b3a2e8227aff16b1ab8df7b104959251856974e9","tarball":"https://registry.npmjs.org/@afauthhq/agent/-/agent-0.6.0.tgz","fileCount":8,"integrity":"sha512-jRiwVSTokBdvj6HwkVCvAEVEXk6Zd2aC3IKdWy2PZmnIgo9p+pfrOGjMC5SaAVltNwfL2ad4W93C7KTwohmG1Q==","signatures":[{"sig":"MEQCICFSrWCeO8mkGvEtpE0ijrDUbiqU4GJb6kpn+fFHJsgWAiBeTqg0fwddxSl2Pm5mcZNnnkHAUZzr3W38EftD2IyHxA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57386},"main":"./dist/index.js","type":"module","_from":"file:afauthhq-agent-0.6.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.js"}},"scripts":{"lint":"echo TODO: configure lint","test":"vitest run --passWithNoTests","build":"tsup src/index.ts src/node.ts --format esm --dts --clean","coverage":"vitest run --coverage --passWithNoTests","typecheck":"tsc --noEmit"},"_npmUser":{"name":"wenguo","email":"guowen89@gmail.com"},"_resolved":"/private/var/folders/hk/yf2t06h97pdcy_ynlkn2rq3c0000gn/T/55ef927326b7df73a663510846016e52/afauthhq-agent-0.6.0.tgz","_integrity":"sha512-jRiwVSTokBdvj6HwkVCvAEVEXk6Zd2aC3IKdWy2PZmnIgo9p+pfrOGjMC5SaAVltNwfL2ad4W93C7KTwohmG1Q==","repository":{"url":"git+https://github.com/AFAuthHQ/typescript-sdk.git","type":"git","directory":"packages/agent"},"_npmVersion":"10.9.4","description":"AFAuth agent SDK — keypair, did:key, signed requests, protocol-aware builders","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@noble/curves":"^2.2.0","@afauthhq/core":"0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.0.0","typescript":"^5.5.0"},"_npmOperationalInternal":{"tmp":"tmp/agent_0.6.0_1780750391047_0.13858575700303","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Broken on clean install: re-exports formatChallenge from @afauthhq/core@0.2.0, which does not ship it. Use @afauthhq/agent@0.6.1+ (depends on core@0.3.0)."},"0.6.1":{"name":"@afauthhq/agent","version":"0.6.1","license":"MIT","_id":"@afauthhq/agent@0.6.1","maintainers":[{"name":"wenguo","email":"guowen89@gmail.com"}],"homepage":"https://github.com/AFAuthHQ/typescript-sdk#readme","bugs":{"url":"https://github.com/AFAuthHQ/typescript-sdk/issues"},"dist":{"shasum":"1205bb8992b7fd06eab69a452bbb1c29d66f76b4","tarball":"https://registry.npmjs.org/@afauthhq/agent/-/agent-0.6.1.tgz","fileCount":8,"integrity":"sha512-HwPTw1u3HfmwOyG1/DT8V8wXz1dZu8ThdSMcihqnsi3e2a3q9z0qJ5HYLn/KOIR6VA3uFDUlHF4KITJrxfOT8w==","signatures":[{"sig":"MEQCIFr+bmYZurPvv9PXfszcM91xfEl92dp8sFj5OqboASUhAiAY+Tnp00p2cVB6JT4rOIR5JE/Qt6+L0cLVxs1BtO2boA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57386},"main":"./dist/index.js","type":"module","_from":"file:afauthhq-agent-0.6.1.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.js"}},"scripts":{"lint":"echo TODO: configure lint","test":"vitest run --passWithNoTests","build":"tsup src/index.ts src/node.ts --format esm --dts --clean","coverage":"vitest run --coverage --passWithNoTests","typecheck":"tsc --noEmit"},"_npmUser":{"name":"wenguo","email":"guowen89@gmail.com"},"_resolved":"/private/var/folders/hk/yf2t06h97pdcy_ynlkn2rq3c0000gn/T/24d8c8ff4ed26f0b68060843aa914cca/afauthhq-agent-0.6.1.tgz","_integrity":"sha512-HwPTw1u3HfmwOyG1/DT8V8wXz1dZu8ThdSMcihqnsi3e2a3q9z0qJ5HYLn/KOIR6VA3uFDUlHF4KITJrxfOT8w==","repository":{"url":"git+https://github.com/AFAuthHQ/typescript-sdk.git","type":"git","directory":"packages/agent"},"_npmVersion":"10.9.4","description":"AFAuth agent SDK — keypair, did:key, signed requests, protocol-aware builders","directories":{},"_nodeVersion":"22.22.1","dependencies":{"@noble/curves":"^2.2.0","@afauthhq/core":"0.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.0.0","typescript":"^5.5.0"},"_npmOperationalInternal":{"tmp":"tmp/agent_0.6.1_1780972421989_0.7018540926382841","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-05-21T09:08:22.910Z","modified":"2026-06-09T03:13:08.256Z","0.1.0-alpha.0":"2026-05-21T09:08:23.187Z","0.1.0":"2026-05-21T09:33:19.746Z","0.1.1":"2026-05-23T09:58:08.780Z","0.2.0":"2026-05-28T07:09:45.246Z","0.3.0":"2026-06-02T15:34:29.929Z","0.4.0":"2026-06-03T06:39:27.469Z","0.5.0":"2026-06-04T03:51:26.099Z","0.6.0":"2026-06-06T12:53:11.198Z","0.6.1":"2026-06-09T02:33:42.146Z"},"bugs":{"url":"https://github.com/AFAuthHQ/typescript-sdk/issues"},"license":"MIT","homepage":"https://github.com/AFAuthHQ/typescript-sdk#readme","repository":{"url":"git+https://github.com/AFAuthHQ/typescript-sdk.git","type":"git","directory":"packages/agent"},"description":"AFAuth agent SDK — keypair, did:key, signed requests, protocol-aware builders","maintainers":[{"name":"wenguo","email":"guowen89@gmail.com"}],"readme":"# `@afauthhq/agent`\n\nAgent SDK for the AFAuth Protocol. Generates and uses an Ed25519\nkeypair to sign requests per RFC 9421, and builds protocol-aware\nrequests for the v0.1 endpoints.\n\n## Quickstart\n\n```typescript\nimport { Agent, TrustClient, fetchDiscovery } from \"@afauthhq/agent\";\n\nconst agent = await Agent.generate();\nconsole.log(agent.did); // \"did:key:z6Mk...\"\n\nconst disc = await fetchDiscovery(\"https://api.example.com\");\n\n// Build a complete signed request for owner invitation:\nconst signed = await agent.buildOwnerInvitation({\n  baseUrl: \"https://api.example.com\",\n  recipient: { type: \"email\", value: \"alice@example.com\" },\n});\n\n// Link this agent to a human once — default services require it.\nconst trust = new TrustClient({\n  agentDid: agent.did,\n  agentPublicKey: agent.publicKey,\n  agentPrivateKey: agent.exportPrivateKey(),\n});\nconst link = await trust.linkStart({ label: \"my-agent\" });\nconsole.log(`Open to confirm: ${link.link_url}`);\nwhile (!(await trust.linkPoll(link.req_id))) {\n  await new Promise((r) => setTimeout(r, 2_000));\n}\nconst { jwt } = await trust.token(disc.service_did);\n\n// Send it, presenting the attestation:\nconst res = await fetch(signed.url, {\n  method: signed.method,\n  headers: { ...signed.headers, \"AFAuth-Attestation\": jwt },\n  body: signed.body,\n});\n```\n\n## Exports\n\n- **`Agent`** — `Agent.generate()`, `Agent.fromPrivateKey(seed)`,\n  `agent.did`, `agent.publicKey`, `agent.exportPrivateKey()`,\n  `agent.signRequest(req, opts?)` (lower-level), and protocol\n  builders: `buildOwnerInvitation`, `buildKeyRotation`,\n  `buildAccountIntrospection`.\n- **`fetchDiscovery(baseUrl)`** — unsigned GET of\n  `/.well-known/afauth` with full §4.3 / §4.5 validation.\n- **`assertDiscoveryDocument(value)`** — validates a parsed\n  discovery doc without fetching.\n- **`TrustClient`** (AFAP-0006) — trust-attestor client. `linkStart()` →\n  show `link_url` to a human → `linkPoll(reqId)` returns a `TrustBinding`\n  (persist it). `token(serviceDid)` mints a short-lived §10 attestation\n  JWT (cached per audience) to send as the `AFAuth-Attestation` header.\n  Defaults to `trust.afauth.org` (`AFAUTH_TRUST_DEFAULT_BASE`).\n- **`TrustHttpError`** — surfaces upstream codes (`binding_expired`,\n  `binding_revoked`, `verification_required`) for actionable recovery.\n- **`AttestedFetcher`** (§10.7) — wraps an `Agent` + `TrustClient` and\n  runs the refresh-on-challenge loop: signs each request and, on\n  `401 attestation_required`, mints a fresh attestation and retries\n  once. A revoked/expired binding surfaces as a terminal\n  `TrustHttpError` rather than an unbounded retry. Reactive by default;\n  `proactive: true` attaches an attestation on the first attempt.\n\n> Services built with `defineService` default to `attested_only`, so an\n> agent that only signs a request is rejected with `attestation_required`.\n> Link to a human and attach a `TrustClient.token()` JWT to reach them.\n\n## See also\n\n- [`AFAuthHQ/spec`](https://github.com/AFAuthHQ/spec) — protocol spec.\n- [`@afauthhq/core`](../core/) — shared types and primitives this\n  package consumes.\n","readmeFilename":"README.md"}