{"id":47714631,"url":"https://github.com/agentscore/node-gate","last_synced_at":"2026-04-19T01:15:33.005Z","repository":{"id":345768895,"uuid":"1187154583","full_name":"agentscore/node-gate","owner":"agentscore","description":"Express middleware for trust-gating requests using AgentScore","archived":false,"fork":false,"pushed_at":"2026-03-30T03:44:23.000Z","size":73,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-30T06:03:29.935Z","etag":null,"topics":["agentscore","ai-agent","erc-8004","express","gate","middleware","reputation","trust","x402"],"latest_commit_sha":null,"homepage":"https://docs.agentscore.sh","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agentscore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-20T12:02:15.000Z","updated_at":"2026-03-30T03:42:30.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/agentscore/node-gate","commit_stats":null,"previous_names":["agentscore/node-gate"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/agentscore/node-gate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentscore%2Fnode-gate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentscore%2Fnode-gate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentscore%2Fnode-gate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentscore%2Fnode-gate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agentscore","download_url":"https://codeload.github.com/agentscore/node-gate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentscore%2Fnode-gate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31313433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentscore","ai-agent","erc-8004","express","gate","middleware","reputation","trust","x402"],"created_at":"2026-04-02T18:50:22.955Z","updated_at":"2026-04-19T01:15:32.987Z","avatar_url":"https://github.com/agentscore.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @agent-score/gate\n\n[![npm version](https://img.shields.io/npm/v/@agent-score/gate.svg)](https://www.npmjs.com/package/@agent-score/gate)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\nExpress middleware for identity-gating requests using [AgentScore](https://agentscore.sh).\n\n## Install\n\n```bash\nnpm install @agent-score/gate\n# or\nbun add @agent-score/gate\n```\n\n## Quick Start\n\n```typescript\nimport express from \"express\";\nimport { agentscoreGate } from \"@agent-score/gate\";\n\nconst app = express();\n\napp.use(agentscoreGate({\n  apiKey: \"as_live_...\",\n  requireKyc: true,\n  minAge: 21,\n}));\n```\n\n## Options\n\n| Option | Type | Default | Description |\n|---|---|---|---|\n| `apiKey` | `string` | --- | API key from [agentscore.sh](https://agentscore.sh) |\n| `requireKyc` | `boolean` | --- | Require KYC verification |\n| `requireSanctionsClear` | `boolean` | --- | Require clean sanctions status |\n| `minAge` | `number` | --- | Minimum age bracket (18 or 21) |\n| `blockedJurisdictions` | `string[]` | --- | ISO country codes to block |\n| `allowedJurisdictions` | `string[]` | --- | ISO country codes to allow (only these pass) |\n| `chain` | `string` | --- | Optional chain filter |\n| `failOpen` | `boolean` | `false` | Allow requests when API is unreachable |\n| `cacheSeconds` | `number` | `300` | Cache TTL for results |\n| `baseUrl` | `string` | `https://api.agentscore.sh` | API base URL |\n| `extractIdentity` | `(req) =\u003e AgentIdentity` | Reads headers | Custom identity extraction |\n| `createSessionOnMissing` | `CreateSessionOnMissing` | --- | Auto-create session when no identity |\n| `onDenied` | `(req, res, reason) =\u003e void` | Returns 403 JSON | Custom denial handler |\n\n## Identity\n\nThe gate checks `X-Operator-Token` first, then `X-Wallet-Address`:\n\n```typescript\n// Custom extraction\napp.use(agentscoreGate({\n  apiKey: \"as_live_...\",\n  extractIdentity: (req) =\u003e ({\n    operatorToken: req.headers[\"x-operator-token\"] as string,\n    address: req.headers[\"x-wallet-address\"] as string,\n  }),\n}));\n```\n\n### Auto-Create Session\n\nWhen no identity is found, create a verification session automatically:\n\n```typescript\napp.use(agentscoreGate({\n  apiKey: \"as_live_...\",\n  requireKyc: true,\n  createSessionOnMissing: {\n    apiKey: \"as_live_...\",\n    context: \"wine purchase\",\n    productName: \"Cabernet Reserve 2021\",\n  },\n}));\n// 403 response includes: verify_url, session_id, poll_secret, agent_instructions\n```\n\n## Documentation\n\n- [API Reference](https://docs.agentscore.sh)\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentscore%2Fnode-gate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagentscore%2Fnode-gate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentscore%2Fnode-gate/lists"}