@ai-sdk/devtools 1.0.55 → 1.0.56

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.
Files changed (2) hide show
  1. package/README.md +3 -91
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -4,25 +4,14 @@ A local development tool for debugging and inspecting AI SDK applications. View
4
4
 
5
5
  > **Note**: This package is experimental and intended for local development only. Do not use in production environments.
6
6
 
7
- ## Installation
7
+ ## Setup
8
8
 
9
9
  ```bash
10
- npm install @ai-sdk/devtools
11
- # or
12
- pnpm add @ai-sdk/devtools
10
+ npm i ai @ai-sdk/devtools
13
11
  ```
14
12
 
15
- ## Requirements
16
-
17
- - AI SDK v7 canary (`ai@canary`)
18
- - Node.js compatible runtime
19
-
20
13
  ## Usage
21
14
 
22
- ### 1. Register the telemetry integration
23
-
24
- Register `DevToolsTelemetry` globally so it captures all AI SDK calls:
25
-
26
15
  ```typescript
27
16
  import { registerTelemetry } from 'ai';
28
17
  import { DevToolsTelemetry } from '@ai-sdk/devtools';
@@ -30,81 +19,4 @@ import { DevToolsTelemetry } from '@ai-sdk/devtools';
30
19
  registerTelemetry(DevToolsTelemetry());
31
20
  ```
32
21
 
33
- Telemetry is enabled automatically once an integration is registered:
34
-
35
- ```typescript
36
- import { generateText } from 'ai';
37
-
38
- const result = await generateText({
39
- model: yourModel,
40
- prompt: 'What cities are in the United States?',
41
- });
42
- ```
43
-
44
- You can also pass the integration to individual calls instead of registering it
45
- globally:
46
-
47
- ```typescript
48
- import { streamText } from 'ai';
49
- import { DevToolsTelemetry } from '@ai-sdk/devtools';
50
-
51
- const result = streamText({
52
- model: yourModel,
53
- prompt: 'Hello!',
54
- telemetry: {
55
- integrations: [DevToolsTelemetry()],
56
- },
57
- });
58
- ```
59
-
60
- ### 2. Run the viewer
61
-
62
- ```bash
63
- npx @ai-sdk/devtools@latest
64
- ```
65
-
66
- Open http://localhost:4983 to view your AI SDK interactions.
67
-
68
- The viewer uses the dark theme by default. Use the theme button in the header to
69
- switch between dark and light themes. The browser remembers your selection for
70
- the next time you open the viewer at the same origin.
71
-
72
- If you are using a monorepo, start DevTools from the same workspace where your
73
- AI SDK code runs. The explicit `@latest` tag ensures that `npx` installs an
74
- executable copy instead of selecting a transitive dependency whose binary is
75
- not linked into that workspace.
76
-
77
- ## How it works
78
-
79
- The `DevToolsTelemetry` integration hooks into the AI SDK telemetry lifecycle to
80
- capture `generateText`, `streamText`, `generateObject`, and `streamObject` calls.
81
- It captures:
82
-
83
- - Input parameters and prompts
84
- - Output content and tool calls
85
- - Token usage and timing
86
- - Raw provider data
87
-
88
- Data is stored locally in a JSON file (`.devtools/generations.json`) and served through a web UI.
89
-
90
- ### Data flow
91
-
92
- ```
93
- AI SDK call -> DevToolsTelemetry -> JSON file -> Hono API -> React UI
94
- ```
95
-
96
- ### Key concepts
97
-
98
- - **Run**: A complete multi-step AI interaction, grouped by initial prompt
99
- - **Step**: A single LLM call within a run
100
-
101
- ## Development
102
-
103
- ```bash
104
- pnpm install
105
- pnpm dev # Start dev server at http://localhost:5173
106
- ```
107
-
108
- ## License
109
-
110
- MIT
22
+ See the [DevTools documentation](https://ai-sdk.dev/docs/ai-sdk-core/devtools) for more information.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/devtools",
3
- "version": "1.0.55",
3
+ "version": "1.0.56",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -24,9 +24,9 @@
24
24
  "bin"
25
25
  ],
26
26
  "dependencies": {
27
- "@ai-sdk/provider": "4.0.33",
27
+ "@ai-sdk/provider": "4.0.34",
28
28
  "@hono/node-server": "^1.19.15",
29
- "ai": "7.0.152",
29
+ "ai": "7.0.153",
30
30
  "hono": "^4.13.7"
31
31
  },
32
32
  "devDependencies": {