@faapi/faapi 6.13.0 → 6.14.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/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as FaapiMiddleware, A as AppRegistries, R as RouteManifest, a as FaapiContext, C as CorsOptions, T as TaskClient, H as HelmetOptions, L as LogConfig, I as InjectorMap, b as TaskFailedHandler, c as TaskQueueDeps, d as TaskQueue, e as TaskDriver, f as TaskRegistry, g as TaskManifest, h as ToolMetadata, i as AgentCore, j as AgentMetadata, k as CreateLoggerOptions, l as Logger, W as WsRouteManifest } from './routeTypes-CVPV8Yd3.js';
2
- export { m as AgentHandleFactory, n as AgentHandleStore, o as AgentPathMeta, p as AgentRegistry, q as AgentToolDescriptor, r as FaapiContextConfig, s as FaapiTaskMeta, t as FailOptions, u as Injector, v as LogEntry, w as LogLevel, x as LogSink, y as RouteInfo, z as RouteInputSchema, B as RouteOutputSchema, D as RouteParamSchema, S as SkillRegistry, E as SseEvent, G as SseWriter, J as TaskContext, K as TaskDriverJob, M as TaskDriverProcess, N as TaskDriverRecord, O as TaskFailedInfo, P as TaskJob, Q as TaskJobStatus, U as TaskMetadata, V as TaskModule, X as TaskRegistriesSnapshot, Y as TaskRegistriesView, Z as ToolCore, _ as ToolPathMeta, $ as ToolRegistry, a0 as cors, a1 as createAppRegistries, a2 as createTaskRegistriesView, a3 as createTaskRegistry, a4 as helmet } from './routeTypes-CVPV8Yd3.js';
1
+ import { F as FaapiMiddleware, A as AppRegistries, R as RouteManifest, a as FaapiContext, C as CorsOptions, T as TaskClient, H as HelmetOptions, L as LogConfig, I as InjectorMap, b as TaskFailedHandler, c as TaskQueueDeps, d as TaskQueue, e as TaskDriver, f as TaskRegistry, g as TaskManifest, h as ToolMetadata, i as AgentCore, j as AgentMetadata, k as CreateLoggerOptions, l as Logger, W as WsRouteManifest } from './routeTypes-C7yHYxPg.js';
2
+ export { m as AgentHandleFactory, n as AgentHandleStore, o as AgentPathMeta, p as AgentRegistry, q as AgentToolDescriptor, r as FaapiContextConfig, s as FaapiTaskMeta, t as FailOptions, u as Injector, v as LogEntry, w as LogLevel, x as LogSink, y as RouteInfo, z as RouteInputSchema, B as RouteOutputSchema, D as RouteParamSchema, S as SkillRegistry, E as SseEvent, G as SseWriter, J as TaskContext, K as TaskDriverJob, M as TaskDriverProcess, N as TaskDriverRecord, O as TaskFailedInfo, P as TaskJob, Q as TaskJobStatus, U as TaskMetadata, V as TaskModule, X as TaskRegistriesSnapshot, Y as TaskRegistriesView, Z as ToolCore, _ as ToolPathMeta, $ as ToolRegistry, a0 as cors, a1 as createAppRegistries, a2 as createTaskRegistriesView, a3 as createTaskRegistry, a4 as helmet } from './routeTypes-C7yHYxPg.js';
3
3
  import * as node_http from 'node:http';
4
4
  import { Server, IncomingMessage, ServerResponse } from 'node:http';
5
5
  import { Socket } from 'node:net';
package/dist/index.js CHANGED
@@ -6302,7 +6302,7 @@ function extractAgentMetadata(program, filePath, pathMeta) {
6302
6302
  const jsDoc = getJSDocFromNode(configFound.jsDocOwner);
6303
6303
  const description = extractDescription(jsDoc);
6304
6304
  const agentNameOverride = extractJSDocTagValue(jsDoc, "agent");
6305
- const { systemPrompt, tools, agents, model, maxTurns } = extractConfigFields(
6305
+ const { systemPrompt, tools, agents, model, maxTurns, inputDescription } = extractConfigFields(
6306
6306
  objectLiteral,
6307
6307
  sourceFile
6308
6308
  );
@@ -6315,7 +6315,8 @@ function extractAgentMetadata(program, filePath, pathMeta) {
6315
6315
  tools,
6316
6316
  agents,
6317
6317
  model,
6318
- maxTurns
6318
+ maxTurns,
6319
+ inputDescription
6319
6320
  };
6320
6321
  }
6321
6322
  function findConfigExport(sourceFile) {
@@ -6364,6 +6365,7 @@ function extractConfigFields(objLit, sourceFile) {
6364
6365
  let agents;
6365
6366
  let model;
6366
6367
  let maxTurns;
6368
+ let inputDescription;
6367
6369
  for (const prop of objLit.properties) {
6368
6370
  if (ts10.isSpreadAssignment(prop)) continue;
6369
6371
  if (!ts10.isPropertyAssignment(prop)) {
@@ -6394,11 +6396,14 @@ function extractConfigFields(objLit, sourceFile) {
6394
6396
  case "maxTurns":
6395
6397
  maxTurns = requireNumberValue(prop, "maxTurns", sourceFile);
6396
6398
  break;
6399
+ case "inputDescription":
6400
+ inputDescription = requireStringValue(prop, "inputDescription", sourceFile);
6401
+ break;
6397
6402
  default:
6398
6403
  throw SchemaExtractionError.at(
6399
6404
  prop,
6400
6405
  `config.${propName}`,
6401
- "\u672A\u77E5 config \u5B57\u6BB5\u2014\u2014\u4EC5\u652F\u6301 systemPrompt / tools / agents / model / maxTurns",
6406
+ "\u672A\u77E5 config \u5B57\u6BB5\u2014\u2014\u4EC5\u652F\u6301 systemPrompt / tools / agents / model / maxTurns / inputDescription",
6402
6407
  sourceFile
6403
6408
  );
6404
6409
  }
@@ -6411,7 +6416,7 @@ function extractConfigFields(objLit, sourceFile) {
6411
6416
  sourceFile
6412
6417
  );
6413
6418
  }
6414
- return { systemPrompt, tools, agents, model, maxTurns };
6419
+ return { systemPrompt, tools, agents, model, maxTurns, inputDescription };
6415
6420
  }
6416
6421
  function getPropertyName(name) {
6417
6422
  if (ts10.isIdentifier(name)) return name.text;