@faapi/faapi 5.0.1 → 5.2.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.
@@ -150,15 +150,15 @@ interface AgentCore {
150
150
  name: string;
151
151
  /** JSDoc 描述(agent 描述,对 LLM 可见),无 JSDoc 或 JSDoc 无自由文本时为 `undefined` */
152
152
  description?: string;
153
- /** 系统提示词(config 块字面量提取),无/非字面量时为 `undefined` */
153
+ /** 系统提示词(config 块字面量提取);文件型 agent 必填(构建期校验),DB skill 由业务方自治 */
154
154
  systemPrompt?: string;
155
- /** agent 显式声明可用的 tool 引用列表(config 块字面量提取),无/含非字面量元素时为 `undefined` */
155
+ /** agent 显式声明可用的 tool 引用列表(config 块字面量提取),未声明时为 `undefined`;声明了但含无法静态求值的元素在构建期抛错 */
156
156
  tools?: string[];
157
- /** 可调用的其他 agent 名列表(config 块字面量提取),无/含非字面量元素时为 `undefined` */
157
+ /** 可调用的其他 agent 名列表(config 块字面量提取),未声明时为 `undefined`;声明了但含无法静态求值的元素在构建期抛错 */
158
158
  agents?: string[];
159
- /** LLM 模型名(config 块字面量提取),无/非字面量时为 `undefined` */
159
+ /** LLM 模型名(config 块字面量提取),未声明时为 `undefined`;声明了但非字面量在构建期抛错 */
160
160
  model?: string;
161
- /** 最大对话轮数(config 块字面量提取),无/非字面量时为 `undefined` */
161
+ /** 最大对话轮数(config 块字面量提取),未声明时为 `undefined`;声明了但非数字字面量在构建期抛错 */
162
162
  maxTurns?: number;
163
163
  }
164
164
  /**
package/dist/testing.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { F as FaapiContext, a as FaapiMiddleware, I as InjectorMap, R as RouteManifest, W as WsRouteManifest, C as CorsOptions, H as HelmetOptions, L as LoggerOptions } from './routeTypes-DnJuuvq-.js';
1
+ import { F as FaapiContext, a as FaapiMiddleware, I as InjectorMap, R as RouteManifest, W as WsRouteManifest, C as CorsOptions, H as HelmetOptions, L as LoggerOptions } from './routeTypes-Bm--uTbm.js';
2
2
  import { Server } from 'node:http';
3
3
  import { WebSocket } from 'ws';
4
4
 
package/dist/testing.js CHANGED
@@ -1426,15 +1426,19 @@ var SchemaExtractionError = class _SchemaExtractionError extends Error {
1426
1426
  *
1427
1427
  * 所有抛错点应优先使用此工厂——错误无行号时,几百行的类型文件只能靠
1428
1428
  * 类型名肉眼定位;解析 lib.d.ts 类型别名时还会出现错误文本与文件上下文错位
1429
+ *
1430
+ * `sourceFile` 可选:未触达 checker 的纯语法遍历路径(binder 未运行)没有
1431
+ * parent 指针,`node.getSourceFile()` 返回 undefined,此时调用方需显式传入
1432
+ * `program.getSourceFile(filePath)` 的结果以携带位置。
1429
1433
  */
1430
- static at(node, typeText, reason) {
1431
- const sourceFile = node.getSourceFile();
1432
- if (!sourceFile) {
1434
+ static at(node, typeText, reason, sourceFile) {
1435
+ const sf = sourceFile ?? node.getSourceFile();
1436
+ if (!sf) {
1433
1437
  return new _SchemaExtractionError(typeText, reason);
1434
1438
  }
1435
- const { line, character } = sourceFile.getLineAndCharacterOfPosition(node.getStart());
1439
+ const { line, character } = sf.getLineAndCharacterOfPosition(node.getStart(sf));
1436
1440
  return new _SchemaExtractionError(typeText, reason, void 0, {
1437
- file: sourceFile.fileName,
1441
+ file: sf.fileName,
1438
1442
  line: line + 1,
1439
1443
  column: character + 1
1440
1444
  });