@signet-auth/vercel-ai 0.4.4 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,14 +1,26 @@
1
1
  # @signet-auth/vercel-ai
2
2
 
3
- Signet signing callbacks for Vercel AI SDK. Signs every tool call with Ed25519 3 lines of code, no infrastructure.
3
+ Vercel AI SDK callbacks for Signet. Add a small callback bundle, sign every tool call, and keep receipts in memory without adding MCP-specific code.
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/@signet-auth/vercel-ai?style=flat-square)](https://www.npmjs.com/package/@signet-auth/vercel-ai)
6
6
  [![GitHub Stars](https://img.shields.io/github/stars/Prismer-AI/signet?style=flat-square&color=yellow)](https://github.com/Prismer-AI/signet)
7
7
 
8
+ Best for:
9
+
10
+ - Apps using `generateText()` and tool calling in the Vercel AI SDK
11
+ - Collecting signed receipts from tool calls with minimal integration work
12
+ - Keeping Vercel AI-specific logic out of your lower-level signing code
13
+
14
+ Use another package if:
15
+
16
+ - You need MCP transport signing: [`@signet-auth/mcp`](https://www.npmjs.com/package/@signet-auth/mcp)
17
+ - You need MCP execution-boundary verification: [`@signet-auth/mcp-server`](https://www.npmjs.com/package/@signet-auth/mcp-server)
18
+ - You want lower-level primitives only: [`@signet-auth/core`](https://www.npmjs.com/package/@signet-auth/core)
19
+
8
20
  ## Install
9
21
 
10
22
  ```bash
11
- npm install @signet-auth/vercel-ai @signet-auth/core
23
+ npm install ai @signet-auth/vercel-ai @signet-auth/core
12
24
  ```
13
25
 
14
26
  ## Usage
@@ -32,8 +44,11 @@ const result = await generateText({
32
44
  console.log(callbacks.receipts); // signed receipts for every tool call
33
45
  ```
34
46
 
35
- ## Links
47
+ ## Related packages
36
48
 
49
+ - [`@signet-auth/core`](https://www.npmjs.com/package/@signet-auth/core) — lower-level signing and verification primitives
50
+ - [`@signet-auth/mcp`](https://www.npmjs.com/package/@signet-auth/mcp) — client-side signing transport for MCP
51
+ - [`@signet-auth/mcp-server`](https://www.npmjs.com/package/@signet-auth/mcp-server) — server-side execution-boundary verification for MCP
37
52
  - [Full documentation & all SDKs](https://github.com/Prismer-AI/signet)
38
53
 
39
54
  If Signet is useful to you, [star us on GitHub](https://github.com/Prismer-AI/signet) — it helps others discover the project.
@@ -32,6 +32,8 @@ export interface SignetCallbackOptions {
32
32
  target?: string;
33
33
  /** Whether to include tool args hash in the receipt (default: true). */
34
34
  hashArgs?: boolean;
35
+ /** Custom warning logger. Defaults to console.warn. Set to `() => {}` to silence. */
36
+ onWarn?: (message: string, error: unknown) => void;
35
37
  }
36
38
  /**
37
39
  * Create Vercel AI SDK callbacks that sign every tool call with Signet.
package/dist/src/index.js CHANGED
@@ -31,6 +31,7 @@ export function createSignetCallbacks(secretKey, signerName, options = {}) {
31
31
  const signerOwner = options.signerOwner ?? "";
32
32
  const target = options.target ?? "vercel-ai://local";
33
33
  const hashArgs = options.hashArgs ?? true;
34
+ const warn = options.onWarn ?? ((msg, err) => console.warn(msg, err));
34
35
  const receipts = [];
35
36
  return {
36
37
  receipts,
@@ -48,7 +49,7 @@ export function createSignetCallbacks(secretKey, signerName, options = {}) {
48
49
  }
49
50
  catch (err) {
50
51
  // Never block tool execution, but log for debugging
51
- console.warn("[signet] Failed to sign tool call:", err);
52
+ warn("[signet] Failed to sign tool call:", err);
52
53
  }
53
54
  },
54
55
  experimental_onToolCallFinish({ toolCallId, toolName, result, durationMs, }) {
package/package.json CHANGED
@@ -1,11 +1,30 @@
1
1
  {
2
2
  "name": "@signet-auth/vercel-ai",
3
- "version": "0.4.4",
4
- "description": "Signet signing middleware for Vercel AI SDK",
3
+ "version": "0.4.6",
4
+ "description": "Vercel AI SDK callbacks for signing Signet tool-call receipts",
5
+ "keywords": [
6
+ "signet",
7
+ "vercel-ai-sdk",
8
+ "ai-sdk",
9
+ "tool-calls",
10
+ "receipts",
11
+ "signing"
12
+ ],
13
+ "homepage": "https://github.com/Prismer-AI/signet/tree/main/packages/signet-vercel-ai#readme",
14
+ "bugs": {
15
+ "url": "https://github.com/Prismer-AI/signet/issues"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/Prismer-AI/signet.git",
20
+ "directory": "packages/signet-vercel-ai"
21
+ },
5
22
  "type": "module",
6
23
  "main": "dist/src/index.js",
7
24
  "types": "dist/src/index.d.ts",
8
- "files": ["dist/"],
25
+ "files": [
26
+ "dist/"
27
+ ],
9
28
  "scripts": {
10
29
  "build": "npx tsc",
11
30
  "test": "npx tsc -p tsconfig.test.json && node --test dist-test/tests/vercel-ai.test.js"
@@ -14,7 +33,7 @@
14
33
  "access": "public"
15
34
  },
16
35
  "dependencies": {
17
- "@signet-auth/core": "^0.4.4"
36
+ "@signet-auth/core": "^0.4.6"
18
37
  },
19
38
  "devDependencies": {
20
39
  "@types/node": "^22",