Node / TypeScript SDK
(opens in a new tab)
(opens in a new tab)
Repository: github.com/bissaphq/bissap-sdk (opens in a new tab)
Install
npm install @bissap/sdkQuick Example
import express from "express";
import { enableAgentAccess } from "@bissap/sdk";
import { z } from "zod";
const app = express();
enableAgentAccess(app, {
userResolver: (req) => req.user.id,
scopes: ["read", "write"],
intents: {
ping: {
name: "ping",
requiredScopes: ["read"],
input: z.object({}).optional(),
handler: async () => ({ ok: true }),
},
},
strictIntents: true,
onAgentIntent: async () => { throw new Error("All intents handled via registry"); },
});
app.listen(3000);See the Node quickstart for a full walkthrough.
Key Features
- Intent registry with Zod schema validation
strictIntents: truerejects unknown intents (404)- Scoped API keys (
bs_live_prefix, SHA-256 hashed) - Per-key rate limiting (in-memory)
- Local enforcement (
denyKeyLocally,flagKey) - Local, hybrid, and cloud key management modes
Error Codes
See Error codes reference for the full list.