@faapi/schema 7.2.0 → 7.3.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/CHANGELOG.md +283 -0
- package/package.json +7 -6
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
# @faapi/schema
|
|
2
|
+
|
|
3
|
+
## 7.3.0
|
|
4
|
+
|
|
5
|
+
## 7.2.0
|
|
6
|
+
|
|
7
|
+
## 7.1.0
|
|
8
|
+
|
|
9
|
+
## 7.0.0
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [6e70a55]
|
|
14
|
+
- @faapi/faapi@7.0.0
|
|
15
|
+
- @faapi/mcp@7.0.0
|
|
16
|
+
|
|
17
|
+
## 6.51.0
|
|
18
|
+
|
|
19
|
+
## 6.50.0
|
|
20
|
+
|
|
21
|
+
## 6.49.0
|
|
22
|
+
|
|
23
|
+
## 6.48.0
|
|
24
|
+
|
|
25
|
+
## 6.47.0
|
|
26
|
+
|
|
27
|
+
## 6.46.0
|
|
28
|
+
|
|
29
|
+
## 6.45.0
|
|
30
|
+
|
|
31
|
+
## 6.44.0
|
|
32
|
+
|
|
33
|
+
## 6.43.0
|
|
34
|
+
|
|
35
|
+
## 6.42.0
|
|
36
|
+
|
|
37
|
+
## 6.41.0
|
|
38
|
+
|
|
39
|
+
## 6.40.0
|
|
40
|
+
|
|
41
|
+
## 6.39.0
|
|
42
|
+
|
|
43
|
+
## 6.38.0
|
|
44
|
+
|
|
45
|
+
## 6.37.0
|
|
46
|
+
|
|
47
|
+
## 6.36.0
|
|
48
|
+
|
|
49
|
+
## 6.35.0
|
|
50
|
+
|
|
51
|
+
## 6.34.0
|
|
52
|
+
|
|
53
|
+
## 6.33.0
|
|
54
|
+
|
|
55
|
+
## 6.32.0
|
|
56
|
+
|
|
57
|
+
## 6.31.0
|
|
58
|
+
|
|
59
|
+
## 6.30.0
|
|
60
|
+
|
|
61
|
+
## 6.29.0
|
|
62
|
+
|
|
63
|
+
## 6.28.0
|
|
64
|
+
|
|
65
|
+
## 6.27.0
|
|
66
|
+
|
|
67
|
+
## 6.26.0
|
|
68
|
+
|
|
69
|
+
## 6.25.0
|
|
70
|
+
|
|
71
|
+
## 6.24.0
|
|
72
|
+
|
|
73
|
+
## 6.23.0
|
|
74
|
+
|
|
75
|
+
## 6.22.0
|
|
76
|
+
|
|
77
|
+
## 6.21.1
|
|
78
|
+
|
|
79
|
+
## 6.21.0
|
|
80
|
+
|
|
81
|
+
## 6.20.0
|
|
82
|
+
|
|
83
|
+
## 6.19.0
|
|
84
|
+
|
|
85
|
+
## 6.18.1
|
|
86
|
+
|
|
87
|
+
## 6.18.0
|
|
88
|
+
|
|
89
|
+
## 6.17.0
|
|
90
|
+
|
|
91
|
+
## 6.16.0
|
|
92
|
+
|
|
93
|
+
## 6.15.0
|
|
94
|
+
|
|
95
|
+
## 6.14.0
|
|
96
|
+
|
|
97
|
+
## 6.13.0
|
|
98
|
+
|
|
99
|
+
## 6.12.0
|
|
100
|
+
|
|
101
|
+
## 6.11.0
|
|
102
|
+
|
|
103
|
+
## 6.10.1
|
|
104
|
+
|
|
105
|
+
## 6.10.0
|
|
106
|
+
|
|
107
|
+
## 6.9.1
|
|
108
|
+
|
|
109
|
+
## 6.9.0
|
|
110
|
+
|
|
111
|
+
## 6.8.0
|
|
112
|
+
|
|
113
|
+
## 6.7.0
|
|
114
|
+
|
|
115
|
+
## 6.6.0
|
|
116
|
+
|
|
117
|
+
## 6.5.0
|
|
118
|
+
|
|
119
|
+
## 6.4.1
|
|
120
|
+
|
|
121
|
+
## 6.4.0
|
|
122
|
+
|
|
123
|
+
## 6.3.0
|
|
124
|
+
|
|
125
|
+
## 6.2.0
|
|
126
|
+
|
|
127
|
+
## 6.1.0
|
|
128
|
+
|
|
129
|
+
## 6.0.0
|
|
130
|
+
|
|
131
|
+
### Patch Changes
|
|
132
|
+
|
|
133
|
+
- Updated dependencies [c5a6775]
|
|
134
|
+
- @faapi/faapi@6.0.0
|
|
135
|
+
- @faapi/mcp@6.0.0
|
|
136
|
+
|
|
137
|
+
## 5.4.0
|
|
138
|
+
|
|
139
|
+
## 5.3.0
|
|
140
|
+
|
|
141
|
+
## 5.2.0
|
|
142
|
+
|
|
143
|
+
## 5.1.0
|
|
144
|
+
|
|
145
|
+
## 5.0.1
|
|
146
|
+
|
|
147
|
+
### Patch Changes
|
|
148
|
+
|
|
149
|
+
- 版本线修复:此前 5.0.0 被误发布到 npm(其中 `@faapi/faapi` 与 `@faapi/mcp` 因依赖关系无法 unpublish,该版本号已作废不可复用),版本线跳过 5.0.0 对齐到 5.0.1。本版本功能内容与 4.5.0 完全一致(含移除 `config.agent` 的 `defaultAgent` / `defaultLlm` 配置——`agent.run/stream` 改为每次调用显式传 `options.agent` 与 `options.model` / `options.provider`)。
|
|
150
|
+
|
|
151
|
+
## 4.5.0
|
|
152
|
+
|
|
153
|
+
## 4.4.0
|
|
154
|
+
|
|
155
|
+
## 4.3.0
|
|
156
|
+
|
|
157
|
+
## 4.2.1
|
|
158
|
+
|
|
159
|
+
## 4.2.0
|
|
160
|
+
|
|
161
|
+
## 4.1.0
|
|
162
|
+
|
|
163
|
+
## 4.0.0
|
|
164
|
+
|
|
165
|
+
### Patch Changes
|
|
166
|
+
|
|
167
|
+
- 06b1f05: 修复 resource 批量重建的 N+1 广播风暴:
|
|
168
|
+
|
|
169
|
+
- `mcpServer` 的 `removeResource` / `removeResourceTemplate` 新增 `{ silent: true }` 选项——跳过 `notifications/resources/list_changed` 逐次广播
|
|
170
|
+
- `@faapi/schema` 的 schemaServer 资源重建(先清 N 个旧 resource 再注册)改为静默删除、末尾统一广播一次——路由多的项目此前每次 dev reload 会向所有 SSE session 发送 N+1 次相同通知
|
|
171
|
+
|
|
172
|
+
- Updated dependencies [0337482]
|
|
173
|
+
- Updated dependencies [8947f46]
|
|
174
|
+
- Updated dependencies [eadf440]
|
|
175
|
+
- Updated dependencies
|
|
176
|
+
- Updated dependencies [981c99f]
|
|
177
|
+
- Updated dependencies [f60d137]
|
|
178
|
+
- Updated dependencies [f60d137]
|
|
179
|
+
- Updated dependencies [d822718]
|
|
180
|
+
- Updated dependencies [c18c62e]
|
|
181
|
+
- Updated dependencies [13c6297]
|
|
182
|
+
- Updated dependencies [6f2903f]
|
|
183
|
+
- Updated dependencies [b31a442]
|
|
184
|
+
- Updated dependencies [3c12dc6]
|
|
185
|
+
- Updated dependencies [4617c07]
|
|
186
|
+
- Updated dependencies [5d95fdd]
|
|
187
|
+
- Updated dependencies [9d5865d]
|
|
188
|
+
- Updated dependencies [06b1f05]
|
|
189
|
+
- Updated dependencies [a0cb30c]
|
|
190
|
+
- @faapi/faapi@4.0.0
|
|
191
|
+
- @faapi/mcp@4.0.0
|
|
192
|
+
|
|
193
|
+
## 3.3.0
|
|
194
|
+
|
|
195
|
+
## 3.2.1
|
|
196
|
+
|
|
197
|
+
## 3.2.0
|
|
198
|
+
|
|
199
|
+
## 3.1.0
|
|
200
|
+
|
|
201
|
+
## 3.0.0
|
|
202
|
+
|
|
203
|
+
### Patch Changes
|
|
204
|
+
|
|
205
|
+
- Updated dependencies [1d54523]
|
|
206
|
+
- Updated dependencies [1d54523]
|
|
207
|
+
- Updated dependencies [49d7ac9]
|
|
208
|
+
- @faapi/faapi@3.0.0
|
|
209
|
+
- @faapi/mcp@3.0.0
|
|
210
|
+
|
|
211
|
+
## 2.0.1
|
|
212
|
+
|
|
213
|
+
## 2.0.0
|
|
214
|
+
|
|
215
|
+
### Patch Changes
|
|
216
|
+
|
|
217
|
+
- Updated dependencies [1258e39]
|
|
218
|
+
- @faapi/faapi@2.0.0
|
|
219
|
+
- @faapi/mcp@2.0.0
|
|
220
|
+
|
|
221
|
+
## 1.5.0
|
|
222
|
+
|
|
223
|
+
## 1.4.0
|
|
224
|
+
|
|
225
|
+
## 1.3.1
|
|
226
|
+
|
|
227
|
+
## 1.3.0
|
|
228
|
+
|
|
229
|
+
### Minor Changes
|
|
230
|
+
|
|
231
|
+
- 新增统一响应包装能力:ctx.ok / ctx.fail 便捷方法 + handler 返回值自动包裹
|
|
232
|
+
|
|
233
|
+
- 新增 `ctx.ok(data)`:显式包裹成功响应,等价于 `return data`(框架自动包裹)
|
|
234
|
+
- 新增 `ctx.fail({ status?, code?, message })`:返回错误响应,status 和 code 均可独立省略(无推导关系)
|
|
235
|
+
- 新增 `config.response` 配置(`ok` / `fail` 可选):自定义成功/错误响应包装结构
|
|
236
|
+
- `invokeHandler.wrapResult` 自动包裹:handler return 非 Response 的值(含 null/undefined)时用 `config.response.ok`(默认 `(data) => ({ data })`)包裹
|
|
237
|
+
- `Response` 对象原样透传,不被包裹(`ctx.ok`/`ctx.fail`/`ctx.json` 等返回的 Response 均属此类)
|
|
238
|
+
|
|
239
|
+
**Breaking**:handler `return data` 的默认响应格式从原样返回变为 `{ data }` 包裹。如需原样返回,用 `return ctx.json(data)`。
|
|
240
|
+
|
|
241
|
+
## 1.2.1
|
|
242
|
+
|
|
243
|
+
## 1.2.0
|
|
244
|
+
|
|
245
|
+
## 1.1.1
|
|
246
|
+
|
|
247
|
+
### Patch Changes
|
|
248
|
+
|
|
249
|
+
- 改进发布流程:通过 tag 区分 canary 和 stable 发布
|
|
250
|
+
|
|
251
|
+
## 1.1.0
|
|
252
|
+
|
|
253
|
+
### Patch Changes
|
|
254
|
+
|
|
255
|
+
- Updated dependencies [853a175]
|
|
256
|
+
- @faapi/faapi@1.1.0
|
|
257
|
+
- @faapi/mcp@1.1.0
|
|
258
|
+
|
|
259
|
+
## 1.0.2
|
|
260
|
+
|
|
261
|
+
### Patch Changes
|
|
262
|
+
|
|
263
|
+
- Updated dependencies
|
|
264
|
+
- @faapi/faapi@1.0.2
|
|
265
|
+
- @faapi/mcp@1.0.2
|
|
266
|
+
|
|
267
|
+
## 1.0.1
|
|
268
|
+
|
|
269
|
+
### Patch Changes
|
|
270
|
+
|
|
271
|
+
- Updated dependencies
|
|
272
|
+
- @faapi/faapi@1.0.1
|
|
273
|
+
- @faapi/mcp@1.0.1
|
|
274
|
+
|
|
275
|
+
## 1.0.0
|
|
276
|
+
|
|
277
|
+
### Major Changes
|
|
278
|
+
|
|
279
|
+
- 首次发布 @faapi/schema——基于 @faapi/mcp 实现,通过 MCP 协议(Streamable HTTP transport)暴露路由 schema 给 AI 助手。插件在 `/mcp` 路径挂载端点,AI 助手通过 HTTP 连接 `http://localhost:3000/mcp`。通过 `ctx.wrapHandler` 拦截 `/mcp` 路径,与 faapi 路由系统原生集成。`createSchemaServer` 通过 `getRoutes` getter 替代路由快照,dev 热替换后 schema 自动刷新。提供三个 tool:`list_routes`(列出所有路由)、`get_route_schema`(获取单个路由详细 schema)、`get_api_schema`(获取完整 API schema,类似 OpenAPI)。在 `faapi.config.ts` 的 `plugins` 字段声明即可加载。
|
|
280
|
+
|
|
281
|
+
### Minor Changes
|
|
282
|
+
|
|
283
|
+
- 删除冗余 `dependencies.zod`(不直接 import),改为 `peerDependencies` 保持一致。业务方需在项目 `package.json` 显式安装 `zod@^4`。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faapi/schema",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"description": "Schema introspection for faapi — expose API schema to AI assistants via MCP",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
|
-
"dist"
|
|
15
|
+
"dist",
|
|
16
|
+
"CHANGELOG.md"
|
|
16
17
|
],
|
|
17
18
|
"engines": {
|
|
18
19
|
"node": ">=24"
|
|
@@ -25,14 +26,14 @@
|
|
|
25
26
|
"typescript": "^5.7.0",
|
|
26
27
|
"vitest": "^5.0.3",
|
|
27
28
|
"zod": "^4.4.3",
|
|
28
|
-
"@faapi/faapi": "7.
|
|
29
|
-
"@faapi/mcp": "7.
|
|
29
|
+
"@faapi/faapi": "7.3.0",
|
|
30
|
+
"@faapi/mcp": "7.3.0"
|
|
30
31
|
},
|
|
31
32
|
"peerDependencies": {
|
|
32
33
|
"typescript": ">=5.7.0",
|
|
33
34
|
"zod": "^4.4.3",
|
|
34
|
-
"@faapi/faapi": "^7.
|
|
35
|
-
"@faapi/mcp": "^7.
|
|
35
|
+
"@faapi/faapi": "^7.3.0",
|
|
36
|
+
"@faapi/mcp": "^7.3.0"
|
|
36
37
|
},
|
|
37
38
|
"peerDependenciesMeta": {
|
|
38
39
|
"typescript": {
|