@witqq/agent-sdk 0.6.1 → 0.7.0
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 +433 -6
- package/dist/auth/index.cjs +188 -1
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.cts +154 -138
- package/dist/auth/index.d.ts +154 -138
- package/dist/auth/index.js +188 -2
- package/dist/auth/index.js.map +1 -1
- package/dist/backends/claude.cjs +315 -21
- package/dist/backends/claude.cjs.map +1 -1
- package/dist/backends/claude.d.cts +2 -1
- package/dist/backends/claude.d.ts +2 -1
- package/dist/backends/claude.js +315 -21
- package/dist/backends/claude.js.map +1 -1
- package/dist/backends/copilot.cjs +132 -24
- package/dist/backends/copilot.cjs.map +1 -1
- package/dist/backends/copilot.d.cts +2 -1
- package/dist/backends/copilot.d.ts +2 -1
- package/dist/backends/copilot.js +132 -24
- package/dist/backends/copilot.js.map +1 -1
- package/dist/backends/vercel-ai.cjs +56 -17
- package/dist/backends/vercel-ai.cjs.map +1 -1
- package/dist/backends/vercel-ai.d.cts +1 -1
- package/dist/backends/vercel-ai.d.ts +1 -1
- package/dist/backends/vercel-ai.js +56 -17
- package/dist/backends/vercel-ai.js.map +1 -1
- package/dist/chat/accumulator.cjs +147 -0
- package/dist/chat/accumulator.cjs.map +1 -0
- package/dist/chat/accumulator.d.cts +61 -0
- package/dist/chat/accumulator.d.ts +61 -0
- package/dist/chat/accumulator.js +145 -0
- package/dist/chat/accumulator.js.map +1 -0
- package/dist/chat/backends.cjs +3534 -0
- package/dist/chat/backends.cjs.map +1 -0
- package/dist/chat/backends.d.cts +62 -0
- package/dist/chat/backends.d.ts +62 -0
- package/dist/chat/backends.js +3501 -0
- package/dist/chat/backends.js.map +1 -0
- package/dist/chat/context.cjs +230 -0
- package/dist/chat/context.cjs.map +1 -0
- package/dist/chat/context.d.cts +167 -0
- package/dist/chat/context.d.ts +167 -0
- package/dist/chat/context.js +227 -0
- package/dist/chat/context.js.map +1 -0
- package/dist/chat/core.cjs +282 -0
- package/dist/chat/core.cjs.map +1 -0
- package/dist/chat/core.d.cts +435 -0
- package/dist/chat/core.d.ts +435 -0
- package/dist/chat/core.js +261 -0
- package/dist/chat/core.js.map +1 -0
- package/dist/chat/errors.cjs +251 -0
- package/dist/chat/errors.cjs.map +1 -0
- package/dist/chat/errors.d.cts +122 -0
- package/dist/chat/errors.d.ts +122 -0
- package/dist/chat/errors.js +243 -0
- package/dist/chat/errors.js.map +1 -0
- package/dist/chat/events.cjs +203 -0
- package/dist/chat/events.cjs.map +1 -0
- package/dist/chat/events.d.cts +241 -0
- package/dist/chat/events.d.ts +241 -0
- package/dist/chat/events.js +196 -0
- package/dist/chat/events.js.map +1 -0
- package/dist/chat/index.cjs +5359 -0
- package/dist/chat/index.cjs.map +1 -0
- package/dist/chat/index.d.cts +52 -0
- package/dist/chat/index.d.ts +52 -0
- package/dist/chat/index.js +5296 -0
- package/dist/chat/index.js.map +1 -0
- package/dist/chat/react.cjs +2739 -0
- package/dist/chat/react.cjs.map +1 -0
- package/dist/chat/react.d.cts +619 -0
- package/dist/chat/react.d.ts +619 -0
- package/dist/chat/react.js +2714 -0
- package/dist/chat/react.js.map +1 -0
- package/dist/chat/runtime.cjs +1030 -0
- package/dist/chat/runtime.cjs.map +1 -0
- package/dist/chat/runtime.d.cts +118 -0
- package/dist/chat/runtime.d.ts +118 -0
- package/dist/chat/runtime.js +1028 -0
- package/dist/chat/runtime.js.map +1 -0
- package/dist/chat/server.cjs +643 -0
- package/dist/chat/server.cjs.map +1 -0
- package/dist/chat/server.d.cts +287 -0
- package/dist/chat/server.d.ts +287 -0
- package/dist/chat/server.js +617 -0
- package/dist/chat/server.js.map +1 -0
- package/dist/chat/sessions.cjs +398 -0
- package/dist/chat/sessions.cjs.map +1 -0
- package/dist/chat/sessions.d.cts +239 -0
- package/dist/chat/sessions.d.ts +239 -0
- package/dist/chat/sessions.js +394 -0
- package/dist/chat/sessions.js.map +1 -0
- package/dist/chat/state.cjs +177 -0
- package/dist/chat/state.cjs.map +1 -0
- package/dist/chat/state.d.cts +92 -0
- package/dist/chat/state.d.ts +92 -0
- package/dist/chat/state.js +167 -0
- package/dist/chat/state.js.map +1 -0
- package/dist/chat/storage.cjs +240 -0
- package/dist/chat/storage.cjs.map +1 -0
- package/dist/chat/storage.d.cts +191 -0
- package/dist/chat/storage.d.ts +191 -0
- package/dist/chat/storage.js +236 -0
- package/dist/chat/storage.js.map +1 -0
- package/dist/errors-BDLbNu9w.d.cts +13 -0
- package/dist/errors-BDLbNu9w.d.ts +13 -0
- package/dist/in-process-transport-C2oPTYs6.d.ts +223 -0
- package/dist/in-process-transport-DG-w5G6k.d.cts +223 -0
- package/dist/index.cjs +25 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -4
- package/dist/index.d.ts +32 -4
- package/dist/index.js +25 -13
- package/dist/index.js.map +1 -1
- package/dist/transport-D1OaUgRk.d.ts +67 -0
- package/dist/transport-DX1Nhm4N.d.cts +67 -0
- package/dist/types-Bh5AhqD-.d.ts +141 -0
- package/dist/types-CGF7AEX1.d.cts +141 -0
- package/dist/{types-BvwNzZCj.d.cts → types-CqvUAYxt.d.cts} +21 -3
- package/dist/{types-BvwNzZCj.d.ts → types-CqvUAYxt.d.ts} +21 -3
- package/dist/types-DLZzlJxt.d.ts +39 -0
- package/dist/types-tE0CXwBl.d.cts +39 -0
- package/package.json +149 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@witqq/agent-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Universal AI agent abstraction layer supporting Copilot CLI, Claude CLI, and Vercel AI SDK backends",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -56,6 +56,136 @@
|
|
|
56
56
|
"types": "./dist/auth/index.d.cts",
|
|
57
57
|
"default": "./dist/auth/index.cjs"
|
|
58
58
|
}
|
|
59
|
+
},
|
|
60
|
+
"./chat": {
|
|
61
|
+
"import": {
|
|
62
|
+
"types": "./dist/chat/index.d.ts",
|
|
63
|
+
"default": "./dist/chat/index.js"
|
|
64
|
+
},
|
|
65
|
+
"require": {
|
|
66
|
+
"types": "./dist/chat/index.d.cts",
|
|
67
|
+
"default": "./dist/chat/index.cjs"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"./chat/core": {
|
|
71
|
+
"import": {
|
|
72
|
+
"types": "./dist/chat/core.d.ts",
|
|
73
|
+
"default": "./dist/chat/core.js"
|
|
74
|
+
},
|
|
75
|
+
"require": {
|
|
76
|
+
"types": "./dist/chat/core.d.cts",
|
|
77
|
+
"default": "./dist/chat/core.cjs"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"./chat/errors": {
|
|
81
|
+
"import": {
|
|
82
|
+
"types": "./dist/chat/errors.d.ts",
|
|
83
|
+
"default": "./dist/chat/errors.js"
|
|
84
|
+
},
|
|
85
|
+
"require": {
|
|
86
|
+
"types": "./dist/chat/errors.d.cts",
|
|
87
|
+
"default": "./dist/chat/errors.cjs"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"./chat/events": {
|
|
91
|
+
"import": {
|
|
92
|
+
"types": "./dist/chat/events.d.ts",
|
|
93
|
+
"default": "./dist/chat/events.js"
|
|
94
|
+
},
|
|
95
|
+
"require": {
|
|
96
|
+
"types": "./dist/chat/events.d.cts",
|
|
97
|
+
"default": "./dist/chat/events.cjs"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"./chat/storage": {
|
|
101
|
+
"import": {
|
|
102
|
+
"types": "./dist/chat/storage.d.ts",
|
|
103
|
+
"default": "./dist/chat/storage.js"
|
|
104
|
+
},
|
|
105
|
+
"require": {
|
|
106
|
+
"types": "./dist/chat/storage.d.cts",
|
|
107
|
+
"default": "./dist/chat/storage.cjs"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"./chat/sessions": {
|
|
111
|
+
"import": {
|
|
112
|
+
"types": "./dist/chat/sessions.d.ts",
|
|
113
|
+
"default": "./dist/chat/sessions.js"
|
|
114
|
+
},
|
|
115
|
+
"require": {
|
|
116
|
+
"types": "./dist/chat/sessions.d.cts",
|
|
117
|
+
"default": "./dist/chat/sessions.cjs"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"./chat/context": {
|
|
121
|
+
"import": {
|
|
122
|
+
"types": "./dist/chat/context.d.ts",
|
|
123
|
+
"default": "./dist/chat/context.js"
|
|
124
|
+
},
|
|
125
|
+
"require": {
|
|
126
|
+
"types": "./dist/chat/context.d.cts",
|
|
127
|
+
"default": "./dist/chat/context.cjs"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"./chat/accumulator": {
|
|
131
|
+
"import": {
|
|
132
|
+
"types": "./dist/chat/accumulator.d.ts",
|
|
133
|
+
"default": "./dist/chat/accumulator.js"
|
|
134
|
+
},
|
|
135
|
+
"require": {
|
|
136
|
+
"types": "./dist/chat/accumulator.d.cts",
|
|
137
|
+
"default": "./dist/chat/accumulator.cjs"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"./chat/state": {
|
|
141
|
+
"import": {
|
|
142
|
+
"types": "./dist/chat/state.d.ts",
|
|
143
|
+
"default": "./dist/chat/state.js"
|
|
144
|
+
},
|
|
145
|
+
"require": {
|
|
146
|
+
"types": "./dist/chat/state.d.cts",
|
|
147
|
+
"default": "./dist/chat/state.cjs"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"./chat/backends": {
|
|
151
|
+
"import": {
|
|
152
|
+
"types": "./dist/chat/backends.d.ts",
|
|
153
|
+
"default": "./dist/chat/backends.js"
|
|
154
|
+
},
|
|
155
|
+
"require": {
|
|
156
|
+
"types": "./dist/chat/backends.d.cts",
|
|
157
|
+
"default": "./dist/chat/backends.cjs"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"./chat/runtime": {
|
|
161
|
+
"import": {
|
|
162
|
+
"types": "./dist/chat/runtime.d.ts",
|
|
163
|
+
"default": "./dist/chat/runtime.js"
|
|
164
|
+
},
|
|
165
|
+
"require": {
|
|
166
|
+
"types": "./dist/chat/runtime.d.cts",
|
|
167
|
+
"default": "./dist/chat/runtime.cjs"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"./chat/react": {
|
|
171
|
+
"import": {
|
|
172
|
+
"types": "./dist/chat/react.d.ts",
|
|
173
|
+
"default": "./dist/chat/react.js"
|
|
174
|
+
},
|
|
175
|
+
"require": {
|
|
176
|
+
"types": "./dist/chat/react.d.cts",
|
|
177
|
+
"default": "./dist/chat/react.cjs"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"./chat/server": {
|
|
181
|
+
"import": {
|
|
182
|
+
"types": "./dist/chat/server.d.ts",
|
|
183
|
+
"default": "./dist/chat/server.js"
|
|
184
|
+
},
|
|
185
|
+
"require": {
|
|
186
|
+
"types": "./dist/chat/server.d.cts",
|
|
187
|
+
"default": "./dist/chat/server.cjs"
|
|
188
|
+
}
|
|
59
189
|
}
|
|
60
190
|
},
|
|
61
191
|
"files": [
|
|
@@ -65,10 +195,12 @@
|
|
|
65
195
|
"scripts": {
|
|
66
196
|
"build": "tsup",
|
|
67
197
|
"test": "vitest run",
|
|
198
|
+
"test:e2e": "vitest run --config vitest.e2e.config.ts",
|
|
68
199
|
"test:watch": "vitest",
|
|
69
200
|
"typecheck": "tsc --noEmit",
|
|
70
201
|
"lint": "tsc --noEmit",
|
|
71
|
-
"prepublishOnly": "npm run build"
|
|
202
|
+
"prepublishOnly": "npm run build",
|
|
203
|
+
"demo": "tsx scripts/demo.ts"
|
|
72
204
|
},
|
|
73
205
|
"keywords": [
|
|
74
206
|
"ai",
|
|
@@ -88,7 +220,9 @@
|
|
|
88
220
|
"@ai-sdk/openai-compatible": ">=2.0.0",
|
|
89
221
|
"@anthropic-ai/claude-agent-sdk": ">=0.2.0",
|
|
90
222
|
"@github/copilot-sdk": "^0.1.22",
|
|
223
|
+
"@types/react": ">=18",
|
|
91
224
|
"ai": ">=4.0.0",
|
|
225
|
+
"react": ">=18",
|
|
92
226
|
"zod": "^3.23.0 || ^4.0.0"
|
|
93
227
|
},
|
|
94
228
|
"peerDependenciesMeta": {
|
|
@@ -103,14 +237,27 @@
|
|
|
103
237
|
},
|
|
104
238
|
"@ai-sdk/openai-compatible": {
|
|
105
239
|
"optional": true
|
|
240
|
+
},
|
|
241
|
+
"react": {
|
|
242
|
+
"optional": true
|
|
243
|
+
},
|
|
244
|
+
"@types/react": {
|
|
245
|
+
"optional": true
|
|
106
246
|
}
|
|
107
247
|
},
|
|
108
248
|
"devDependencies": {
|
|
109
249
|
"@ai-sdk/openai-compatible": "^2.0.27",
|
|
110
250
|
"@anthropic-ai/claude-agent-sdk": "^0.2.37",
|
|
111
251
|
"@github/copilot-sdk": "^0.1.22",
|
|
252
|
+
"@testing-library/react": "^16.3.2",
|
|
253
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
112
254
|
"@types/node": "^25.2.1",
|
|
255
|
+
"@types/react-dom": "^19.2.3",
|
|
113
256
|
"ai": "^6.0.73",
|
|
257
|
+
"better-sqlite3": "^12.6.2",
|
|
258
|
+
"drizzle-orm": "^0.45.1",
|
|
259
|
+
"jsdom": "^28.1.0",
|
|
260
|
+
"react-dom": "^19.2.4",
|
|
114
261
|
"testfold": "^0.2.1",
|
|
115
262
|
"tsup": "^8.4.0",
|
|
116
263
|
"typescript": "^5.8.0",
|